summaryrefslogtreecommitdiff
path: root/src/gui_gtk_f.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui_gtk_f.h')
-rw-r--r--src/gui_gtk_f.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui_gtk_f.h b/src/gui_gtk_f.h
index 73b0024f8..fa0f40aa3 100644
--- a/src/gui_gtk_f.h
+++ b/src/gui_gtk_f.h
@@ -9,8 +9,12 @@
#ifndef __GTK_FORM_H__
#define __GTK_FORM_H__
+#ifdef USE_GTK3
+#include <gtk/gtk.h>
+#else
#include <gdk/gdk.h>
#include <gtk/gtkcontainer.h>
+#endif
#ifdef __cplusplus
@@ -18,10 +22,17 @@ extern "C" {
#endif
#define GTK_TYPE_FORM (gtk_form_get_type ())
+#ifdef USE_GTK3
+#define GTK_FORM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_FORM, GtkForm))
+#define GTK_FORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_FORM, GtkFormClass))
+#define GTK_IS_FORM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_FORM))
+#define GTK_IS_FORM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_FORM))
+#else
#define GTK_FORM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FORM, GtkForm))
#define GTK_FORM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FORM, GtkFormClass))
#define GTK_IS_FORM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FORM))
#define GTK_IS_FORM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FORM))
+#endif
typedef struct _GtkForm GtkForm;
@@ -33,13 +44,17 @@ struct _GtkForm
GList *children;
+#ifndef USE_GTK3
guint width;
guint height;
+#endif
GdkWindow *bin_window;
+#ifndef USE_GTK3
GdkVisibilityState visibility;
gulong configure_serial;
+#endif
gint freeze_count;
};
@@ -49,7 +64,11 @@ struct _GtkFormClass
GtkContainerClass parent_class;
};
+#ifdef USE_GTK3
+GType gtk_form_get_type(void);
+#else
GtkType gtk_form_get_type(void);
+#endif
GtkWidget *gtk_form_new(void);