src/video/directfb/SDL_DirectFB_video.c
changeset 767 d9e79e31a7b7
parent 759 26ac9609211f
child 769 b8d311d90021
     1.1 --- a/src/video/directfb/SDL_DirectFB_video.c	Sun Jan 04 15:48:44 2004 +0000
     1.2 +++ b/src/video/directfb/SDL_DirectFB_video.c	Sun Jan 04 15:57:16 2004 +0000
     1.3 @@ -52,6 +52,11 @@
     1.4  #include "SDL_DirectFB_events.h"
     1.5  #include "SDL_DirectFB_yuv.h"
     1.6  
     1.7 +/* The implementation dependent data for the window manager cursor */
     1.8 +struct WMcursor {
     1.9 +	int unused;
    1.10 +};
    1.11 +
    1.12  
    1.13  /* Initialization/Query functions */
    1.14  static int DirectFB_VideoInit(_THIS, SDL_PixelFormat *vformat);
    1.15 @@ -73,6 +78,7 @@
    1.16  static int DirectFB_SetHWColorKey(_THIS, SDL_Surface *surface, Uint32 key);
    1.17  static int DirectFB_SetHWAlpha(_THIS, SDL_Surface *surface, Uint8 alpha);
    1.18  static int DirectFB_FlipHWSurface(_THIS, SDL_Surface *surface);
    1.19 +static int DirectFB_ShowWMCursor(_THIS, WMcursor *cursor);
    1.20  
    1.21  /* Various screen update functions available */
    1.22  static void DirectFB_DirectUpdate(_THIS, int numrects, SDL_Rect *rects);
    1.23 @@ -139,6 +145,7 @@
    1.24    device->UnlockHWSurface = DirectFB_UnlockHWSurface;
    1.25    device->FlipHWSurface = DirectFB_FlipHWSurface;
    1.26    device->FreeHWSurface = DirectFB_FreeHWSurface;
    1.27 +  device->ShowWMCursor = DirectFB_ShowWMCursor;
    1.28    device->SetCaption = NULL;
    1.29    device->SetIcon = NULL;
    1.30    device->IconifyWindow = NULL;
    1.31 @@ -1143,6 +1150,21 @@
    1.32    HIDDEN->initialized = 0;
    1.33  }
    1.34  
    1.35 +
    1.36 +int DirectFB_ShowWMCursor(_THIS, WMcursor *cursor)
    1.37 +{
    1.38 +  /* We can only hide or show the default cursor */
    1.39 +  if ( cursor == NULL )
    1.40 +    {
    1.41 +      SetCursorOpacity(HIDDEN->layer, 0);
    1.42 +    }
    1.43 +    else
    1.44 +    {
    1.45 +      SetCursorOpacity(HIDDEN->layer, 256);
    1.46 +    }
    1.47 +  return 1;
    1.48 +}
    1.49 +
    1.50  void DirectFB_FinalQuit(void) 
    1.51  {
    1.52  }