Skip to content
Permalink
Browse files

riscos: implement SDL_WM_IconifyWindow()

  • Loading branch information
ccawley2011 committed Sep 3, 2019
1 parent 9e6e012 commit 5a2838513b9205b10dd1fdf192ee519e2f7e6163
Showing with 30 additions and 2 deletions.
  1. +1 −1 README.RISCOS
  2. +1 −0 WhatsNew
  3. +3 −0 docs.html
  4. +25 −1 src/video/riscos/SDL_wimpvideo.c
@@ -81,7 +81,7 @@ Current level of implementation
The following list is an overview of how much of the SDL is implemented. The areas match the main areas of the SDL.

video - Mostly done. Doesn't cover gamma, YUV-overlay or OpenGL.
Window Manager - Mostly done. SetIcon/IconifyWindow not implemented.
Window Manager - Mostly done. SetIcon not implemented.
Events - Mostly done. Resize and some joystick events missing.
Joystick - Currently assumes a single joystick with 4 buttons.
Audio - Done
@@ -80,6 +80,7 @@ Changes include:
- RISC OS: mouse fixes. restore mouse palette when exiting while mouse
is in focus. don't reset mouse focus when recreating the window.
- RISC OS: support Windows and Menu key input.
- RISC OS: implement SDL_WM_IconifyWindow()
- Configuration: fix library detection selecting wrong lib (bug 2795.)
- Configuration: fix detecting dynamic library support on powerpc64le
(bug 3481.)
@@ -196,6 +196,9 @@ <H2> SDL 1.2.16 Release Notes </H2>
<P>
RISC OS: support Windows and Menu key input.
</P>
<P>
RISC OS: implement SDL_WM_IconifyWindow()
</P>
<P>
Configuration: fix library detection selecting wrong lib (bug <a href="https://bugzilla.libsdl.org/show_bug.cgi?id=2795">2795</a>.)
</P>
@@ -45,6 +45,7 @@

static int WIMP_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors);
static void WIMP_SetWMCaption(_THIS, const char *title, const char *icon);
static int WIMP_IconifyWindow(_THIS);
static void WIMP_UpdateRects(_THIS, int numrects, SDL_Rect *rects);

/* RISC OS Wimp handling helpers */
@@ -194,7 +195,7 @@ void WIMP_SetDeviceMode(_THIS)

this->SetCaption = WIMP_SetWMCaption;
this->SetIcon = NULL;
this->IconifyWindow = NULL;
this->IconifyWindow = WIMP_IconifyWindow;

this->ShowWMCursor = WIMP_ShowWMCursor;
this->WarpWMCursor = WIMP_WarpWMCursor;
@@ -382,6 +383,29 @@ void WIMP_SetWMCaption(_THIS, const char *title, const char *icon)
}
}

int WIMP_IconifyWindow(_THIS)
{
_kernel_swi_regs regs;

int block[12];
block[0] = 48;
block[1] = RISCOS_GetTaskHandle();
block[2] = 0;
block[3] = 0;
block[4] = 0x400ca; /* Message_Iconize */
block[5] = this->hidden->window_handle;
block[6] = RISCOS_GetTaskHandle();

SDL_strlcpy((char *)&block[7], this->hidden->title, 20);

regs.r[0] = 17; /* User_Message */
regs.r[1] = (int)block;
regs.r[2] = 0;
_kernel_swi(Wimp_SendMessage, &regs, &regs);

return 1;
}

/* Toggle to window from full screen */
int WIMP_ToggleFromFullScreen(_THIS)
{

0 comments on commit 5a28385

Please sign in to comment.