return gdk_cursor_new(GDK_BLANK_CURSOR);
}
-void blank_cursor( GtkWidget* widget ){
+void blank_cursor( ui::Widget widget ){
GdkCursor* cursor = create_blank_cursor();
gdk_window_set_cursor( gtk_widget_get_window(widget), cursor );
gdk_cursor_unref( cursor );
}
-void default_cursor( GtkWidget* widget ){
+void default_cursor( ui::Widget widget ){
gdk_window_set_cursor( gtk_widget_get_window(widget), 0 );
}
#include "debugging/debugging.h"
typedef struct _GdkCursor GdkCursor;
-typedef struct _GtkWidget GtkWidget;
GdkCursor* create_blank_cursor();
-void blank_cursor( GtkWidget* widget );
-void default_cursor( GtkWidget* widget );
+void blank_cursor( ui::Widget widget );
+void default_cursor( ui::Widget widget );
void Sys_GetCursorPos( ui::Window window, int *x, int *y );
void Sys_SetCursorPos( ui::Window window, int x, int y );
m_handler = g_idle_add( (GSourceFunc)deferred, this );
}
}
-static gboolean gtk_motion( GtkWidget *widget, GdkEventMotion *event, DeferredMotion* self ){
+static gboolean gtk_motion( ui::Widget widget, GdkEventMotion *event, DeferredMotion* self ){
self->motion( event->x, event->y, event->state );
return FALSE;
}
public:
FreezePointer() : handle_motion( 0 ), m_function( 0 ), m_data( 0 ){
}
-static gboolean motion_delta( GtkWidget *widget, GdkEventMotion *event, FreezePointer* self ){
+static gboolean motion_delta( ui::Widget widget, GdkEventMotion *event, FreezePointer* self ){
int current_x, current_y;
Sys_GetCursorPos( ui::Window(GTK_WINDOW( widget )), ¤t_x, ¤t_y );
int dx = current_x - self->last_x;