예제 #1
0
int RISCOS_GetWmInfo(_THIS, SDL_SysWMinfo *info)
{
	SDL_VERSION(&(info->version));
	info->wimpVersion = RISCOS_GetWimpVersion();
	info->taskHandle = RISCOS_GetTaskHandle();
	info->window = this->hidden->window_handle;

	return 1;
}
예제 #2
0
void WIMP_SetWMCaption(_THIS, const char *title, const char *icon)
{
	_kernel_swi_regs regs;

	SDL_strlcpy(this->hidden->title, title, SDL_arraysize(this->hidden->title));

	if (RISCOS_GetWimpVersion() < 380)
	{
		int block[6];

		regs.r[1] = (int)block;
		_kernel_swi(Wimp_GetCaretPosition, &regs, &regs);
		if (block[0] == (int)this->hidden->window_handle)
		{
			regs.r[0] = -1;
			_kernel_swi(Wimp_SetCaretPosition, &regs,&regs);
		} else
		{
			regs.r[0] = this->hidden->window_handle;
			regs.r[1] = -1;
			regs.r[2] = -1;
			regs.r[3] = -1;
			_kernel_swi(Wimp_SetCaretPosition, &regs,&regs);
		}
		regs.r[0] = block[0];
		regs.r[1] = block[1];
		regs.r[2] = block[2];
		regs.r[3] = block[3];
		regs.r[4] = block[4];
		regs.r[5] = block[5];
		_kernel_swi(Wimp_SetCaretPosition, &regs,&regs);
	} else
	{
		regs.r[0] = this->hidden->window_handle;
		regs.r[1] = 0x4b534154; /* "TASK" */
		regs.r[2] = 3; /* Redraw title */
		_kernel_swi(Wimp_ForceRedraw, &regs, &regs);
	}
}