src/video/quartz/SDL_QuartzVideo.h
changeset 563 04dcaf3da918
parent 561 4bcf7dd06c47
child 588 2c6510c0a304
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.h	Fri Dec 20 03:37:28 2002 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.h	Fri Dec 27 20:52:41 2002 +0000
     1.3 @@ -132,8 +132,12 @@
     1.4      SDLKey             keymap[256];        /* Mac OS X to SDL key mapping */
     1.5      Uint32             current_mods;       /* current keyboard modifiers, to track modifier state */
     1.6      Uint32             last_virtual_button;/* last virtual mouse button pressed */
     1.7 -    io_connect_t       powerConnection;    /* used with IOKit to detect wake from sleep */
     1.8 -
     1.9 +    io_connect_t       power_connection;   /* used with IOKit to detect wake from sleep */
    1.10 +    Uint8              expect_mouse_up;    /* used to determine when to send mouse up events */
    1.11 +    Uint8              grab_state;         /* used to manage grab behavior */
    1.12 +    NSPoint            cursor_loc;         /* saved cursor coords, for activate/deactivate when grabbed */
    1.13 +    BOOL          	   cursor_visible;     /* tells if cursor was hidden or not */
    1.14 +    
    1.15      ImageDescriptionHandle yuv_idh;
    1.16      MatrixRecordPtr        yuv_matrix;
    1.17      DecompressorComponent  yuv_codec;
    1.18 @@ -167,7 +171,11 @@
    1.19  #define keymap (this->hidden->keymap)
    1.20  #define current_mods (this->hidden->current_mods)
    1.21  #define last_virtual_button (this->hidden->last_virtual_button)
    1.22 -#define powerConnection (this->hidden->powerConnection)
    1.23 +#define power_connection (this->hidden->power_connection)
    1.24 +#define expect_mouse_up (this->hidden->expect_mouse_up)
    1.25 +#define grab_state (this->hidden->grab_state)
    1.26 +#define cursor_loc (this->hidden->cursor_loc)
    1.27 +#define cursor_visible (this->hidden->cursor_visible)
    1.28  
    1.29  #define yuv_idh (this->hidden->yuv_idh)
    1.30  #define yuv_matrix (this->hidden->yuv_matrix)
    1.31 @@ -179,6 +187,22 @@
    1.32  #define yuv_height (this->hidden->yuv_height)
    1.33  #define yuv_port (this->hidden->yuv_port)
    1.34  
    1.35 +
    1.36 +/* grab states - the input is in one of these states */
    1.37 +enum {
    1.38 +    QZ_UNGRABBED = 0,
    1.39 +    QZ_VISIBLE_GRAB,
    1.40 +    QZ_INVISIBLE_GRAB
    1.41 +};
    1.42 +
    1.43 +/* grab actions - these can change the grabbed state */
    1.44 +enum {
    1.45 +    QZ_ENABLE_GRAB = 0,
    1.46 +    QZ_DISABLE_GRAB,
    1.47 +    QZ_HIDECURSOR,
    1.48 +    QZ_SHOWCURSOR
    1.49 +};
    1.50 +
    1.51  /* 
    1.52      Obscuring code: maximum number of windows above ours (inclusive) 
    1.53