[grits] Change GdkEventExpose to gpointer
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grits] Change GdkEventExpose to gpointer
- Date: Mon, 21 Jan 2013 05:25:43 +0000 (UTC)
commit cca3466d1d77b5de277631d51b08753978d8f6b1
Author: Andy Spencer <andy753421 gmail com>
Date: Sun Jan 20 05:05:54 2013 +0000
Change GdkEventExpose to gpointer
On GTK 2 this a GdkEvent, but in GTK 3 it's a cairo surface. Since we
don't use the structure anyway we'll just call it a pointer.
examples/gl/gl.c | 12 ++++++------
src/grits-opengl.c | 4 ++--
src/gtkgl.h | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/examples/gl/gl.c b/examples/gl/gl.c
index dd33a20..45075f6 100644
--- a/examples/gl/gl.c
+++ b/examples/gl/gl.c
@@ -13,7 +13,7 @@
************************/
#if defined(SYS_CAIRO)
gpointer setup(GtkWidget *widget) { return NULL; }
-gboolean expose(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+gboolean expose(GtkWidget *widget, gpointer data, gpointer user_data)
{
GtkAllocation alloc;
gtk_widget_get_allocation(widget, &alloc);
@@ -50,7 +50,7 @@ gpointer setup(GtkWidget *widget)
glconfig, NULL, TRUE, GDK_GL_RGBA_TYPE);
return NULL;
}
-gboolean expose(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+gboolean expose(GtkWidget *widget, gpointer data, gpointer user_data)
{
GtkAllocation alloc;
gtk_widget_get_allocation(widget, &alloc);
@@ -110,7 +110,7 @@ gpointer setup(GtkWidget *widget)
return context;
}
-gboolean expose(GtkWidget *widget, GdkEventExpose *event, GLXContext context)
+gboolean expose(GtkWidget *widget, gpointer data, GLXContext context)
{
/* Make current */
Display *xdisplay = GDK_SCREEN_XDISPLAY(gdk_screen_get_default());
@@ -168,7 +168,7 @@ gpointer setup(GtkWidget *widget)
gtk_widget_set_double_buffered(widget, FALSE);
return FALSE;
}
-gboolean expose(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+gboolean expose(GtkWidget *widget, gpointer data, gpointer user_data)
{
GtkWidget *toplevel = gtk_widget_get_toplevel(widget);
GdkWindow *window = gtk_widget_get_window(widget);
@@ -270,7 +270,7 @@ gboolean configure(GtkWidget *widget, GdkEventConfigure *event, NSOpenGLContext
[ctx update];
return FALSE;
}
-gboolean expose(GtkWidget *widget, GdkEventExpose *event, NSOpenGLContext *ctx)
+gboolean expose(GtkWidget *widget, gpointer data, NSOpenGLContext *ctx)
{
gdk_window_ensure_native(gtk_widget_get_window(widget));
@@ -304,7 +304,7 @@ gboolean expose(GtkWidget *widget, GdkEventExpose *event, NSOpenGLContext *ctx)
****************************/
#else
gpointer setup(GtkWidget *widget) { return NULL; }
-gboolean expose(GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+gboolean expose(GtkWidget *widget, gpointer data, gpointer user_data)
{
g_message("unimplemented");
return FALSE;
diff --git a/src/grits-opengl.c b/src/grits-opengl.c
index c14593e..6a5ea32 100644
--- a/src/grits-opengl.c
+++ b/src/grits-opengl.c
@@ -356,12 +356,12 @@ static void _draw_level(gpointer _level, gpointer _opengl)
nunsorted, nsorted);
}
-static gboolean on_expose(GritsOpenGL *opengl, GdkEventExpose *event, gpointer _)
+static gboolean on_expose(GritsOpenGL *opengl, gpointer data, gpointer _)
{
g_debug("GritsOpenGL: on_expose - begin");
if (opengl->pickmode)
- return run_mouse_move(opengl, (GdkEventMotion*)event);
+ return run_mouse_move(opengl, &(GdkEventMotion){});
if (opengl->mouse_queue.type != GDK_NOTHING) {
run_mouse_move(opengl, &opengl->mouse_queue);
diff --git a/src/gtkgl.h b/src/gtkgl.h
index c0a8bd6..fac5086 100644
--- a/src/gtkgl.h
+++ b/src/gtkgl.h
@@ -33,7 +33,7 @@
/* Call before widget is realized */
void gtk_gl_enable(GtkWidget *widget);
-/* Call at the start of "expose" */
+/* Call at the start of "expose-event" */
void gtk_gl_begin(GtkWidget *widget);
/* Call at the end of "expose-event" */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]