From 14770e890aba8fb40b97a05fa27c25906555df95 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 1 Apr 2014 16:01:49 -0400 Subject: [PATCH] Moved includes in the GTK+ backend to gtk_unix.h; organized that file a bit. --- callbacks_unix.go | 1 - dialog_unix.go | 1 - gtk_unix.h | 11 +++++++++-- gtkcalls_unix.go | 1 - listbox_unix.go | 1 - 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/callbacks_unix.go b/callbacks_unix.go index 1efe723..5c7afc3 100644 --- a/callbacks_unix.go +++ b/callbacks_unix.go @@ -16,7 +16,6 @@ while we're at it the callback for our idle function will be handled here too // #cgo pkg-config: gtk+-3.0 // #include "gtk_unix.h" -// #include // extern gboolean our_window_delete_event_callback(GtkWidget *, GdkEvent *, gpointer); // extern gboolean our_window_configure_event_callback(GtkWidget *, GdkEvent *, gpointer); // extern void our_button_clicked_callback(GtkButton *, gpointer); diff --git a/dialog_unix.go b/dialog_unix.go index 510d9c5..3889086 100644 --- a/dialog_unix.go +++ b/dialog_unix.go @@ -9,7 +9,6 @@ import ( ) // #cgo pkg-config: gtk+-3.0 -// #include // #include "gtk_unix.h" // /* because cgo seems to choke on ... */ // /* TODO does NULL parent make the box application-global? docs are unclear */ diff --git a/gtk_unix.h b/gtk_unix.h index 1647722..0eac4ac 100644 --- a/gtk_unix.h +++ b/gtk_unix.h @@ -7,12 +7,19 @@ MIN_REQUIRED signals that programs are expected to run on at least GLib 2.32/GTK MAX_ALLOWED signals that programs will not use features introduced in newer versions of GLib/GTK+ and that the compiler should warn us if we slip. Thanks to desrt in irc.gimp.net/#gtk+ */ + +/* GLib/GObject */ #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_32 #define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_32 + +/* GDK/GTK+ */ #define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_4 #define GDK_VERSION_MAX_ALLOWED GDK_VERSION_3_4 -/* TODO are there equivalent compatibility macros for the other components of GTK+? */ +/* TODO are there equivalent compatibility macros for the other components of GTK+? Specifically: + cairo + gdk-pixbuf +*/ +#include #include -/* TODO include too */ diff --git a/gtkcalls_unix.go b/gtkcalls_unix.go index c7b409a..d1158d5 100644 --- a/gtkcalls_unix.go +++ b/gtkcalls_unix.go @@ -10,7 +10,6 @@ import ( ) // #cgo pkg-config: gtk+-3.0 -// #include // #include "gtk_unix.h" import "C" diff --git a/listbox_unix.go b/listbox_unix.go index fd9995e..02c4aed 100644 --- a/listbox_unix.go +++ b/listbox_unix.go @@ -29,7 +29,6 @@ and the GTK+ reference documentation. */ // #cgo pkg-config: gtk+-3.0 -// #include // #include "gtk_unix.h" // /* because cgo seems to choke on ... */ // void gtkTreeModelGet(GtkTreeModel *model, GtkTreeIter *iter, gchar **gs)