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; }
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, ®s, ®s); if (block[0] == (int)this->hidden->window_handle) { regs.r[0] = -1; _kernel_swi(Wimp_SetCaretPosition, ®s,®s); } else { regs.r[0] = this->hidden->window_handle; regs.r[1] = -1; regs.r[2] = -1; regs.r[3] = -1; _kernel_swi(Wimp_SetCaretPosition, ®s,®s); } 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, ®s,®s); } else { regs.r[0] = this->hidden->window_handle; regs.r[1] = 0x4b534154; /* "TASK" */ regs.r[2] = 3; /* Redraw title */ _kernel_swi(Wimp_ForceRedraw, ®s, ®s); } }