X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fgtkutil%2Fcursor.h;h=89c6f72b4703911b3a2d9cb1954cc5f02a0d8808;hb=54a2bda443aace9c00a1615af10cc1dc8b1f0cd1;hp=2d16142eb9f71134c1bb93ae384632024c837565;hpb=e876e8ef487eeb9123f4906373622ffe3b6ea9d4;p=xonotic%2Fnetradiant.git diff --git a/libs/gtkutil/cursor.h b/libs/gtkutil/cursor.h index 2d16142e..89c6f72b 100644 --- a/libs/gtkutil/cursor.h +++ b/libs/gtkutil/cursor.h @@ -29,9 +29,11 @@ typedef struct _GdkCursor GdkCursor; typedef struct _GdkEventMotion GdkEventMotion; +#if 0 GdkCursor* create_blank_cursor(); void blank_cursor( ui::Widget widget ); void default_cursor( ui::Widget widget ); +#endif void Sys_GetCursorPos( ui::Window window, int *x, int *y ); void Sys_SetCursorPos( ui::Window window, int x, int y ); @@ -107,7 +109,8 @@ void motion_delta( int x, int y, unsigned int state ){ class FreezePointer { unsigned int handle_motion; -int recorded_x, recorded_y, last_x, last_y; +int recorded_x, recorded_y, last_x, last_y, center_x, center_y; +ui::Widget m_weedjet{ui::null}; typedef void ( *MotionDeltaFunction )( int x, int y, unsigned int state, void* data ); MotionDeltaFunction m_function; void* m_data; @@ -116,9 +119,9 @@ FreezePointer() : handle_motion( 0 ), m_function( 0 ), m_data( 0 ){ } static gboolean motion_delta( ui::Window widget, GdkEventMotion *event, FreezePointer* self ); -void freeze_pointer( ui::Window window, MotionDeltaFunction function, void* data ); +void freeze_pointer( ui::Window window, ui::Widget widget, MotionDeltaFunction function, void* data ); -void unfreeze_pointer( ui::Window window ); +void unfreeze_pointer( ui::Window window, bool centerize ); }; #endif