GTK_TYPE_ for GdkRectangle and other
- From: Oskar Liljeblad <osk hem passagen se>
- To: gtk-devel-list gnome org
- Subject: GTK_TYPE_ for GdkRectangle and other
- Date: Mon, 4 Sep 2000 20:01:27 +0200
Hello
Not long ago I wrote to this list asking why there was no GtkType for
GdkRectangle. The fact is that there are at least four essential
structures with missing types.
They are essential because some signals send them as parameters. These
signals currently use GTK_TYPE_POINTER instead of a more specific type.
I am adding dynamic signal support for the Gnome-GCJ bindings, and with
GTK_TYPE_POINTER I would had to check signal name and class and
override manually.
Besides GdkRectangle, there is also GtkNotebookPage, GtkRequisition,
and GtkAllocation that miss GtkType's. The attached patch - applied
against the Gtk+ 2000-09-04 CVS - should add the missing types
(and also fix the relevant signals). I don't know if it is complete -
I didn't even test it because I was unable to configure Gtk+. But
maybe it is useful anyway.
Oskar Liljeblad (osk@hem.passagen.se)
diff -ruN gtk+-cvs-20000904/gtk/gtk-boxed.defs gtk+-cvs-20000904-fix/gtk/gtk-boxed.defs
--- gtk+-cvs-20000904/gtk/gtk-boxed.defs Tue Jun 20 23:04:30 2000
+++ gtk+-cvs-20000904-fix/gtk/gtk-boxed.defs Mon Sep 4 19:43:15 2000
@@ -19,6 +19,15 @@
(define-boxed GtkCTreeNode
)
+(define-boxed GtkNotebookPage
+)
+
+(define-boxed GtkRequisition
+)
+
+(define-boxed GtkAllocation
+)
+
;;; Gdk boxed types
;(define-boxed GdkPoint
@@ -42,6 +51,9 @@
gdk_color_copy
gdk_color_free
"sizeof(GdkColor)")
+
+(define-boxed GdkRectangle
+)
(define-func gtk_style_get_white_interp
GdkColor
diff -ruN gtk+-cvs-20000904/gtk/gtk.def gtk+-cvs-20000904-fix/gtk/gtk.def
--- gtk+-cvs-20000904/gtk/gtk.def Sat Aug 19 23:46:04 2000
+++ gtk+-cvs-20000904-fix/gtk/gtk.def Mon Sep 4 19:46:51 2000
@@ -1,6 +1,7 @@
EXPORTS
GTK_TYPE_ACCEL_FLAGS
GTK_TYPE_ACCEL_GROUP
+ GTK_TYPE_ALLOCATION
GTK_TYPE_ANCHOR_TYPE
GTK_TYPE_ARG_FLAGS
GTK_TYPE_ARROW_TYPE
@@ -55,6 +56,7 @@
GTK_TYPE_GDK_OVERLAP_TYPE
GTK_TYPE_GDK_PROPERTY_STATE
GTK_TYPE_GDK_PROP_MODE
+ GTK_TYPE_GDK_RECTANGLE
GTK_TYPE_GDK_RGB_DITHER
GTK_TYPE_GDK_SCROLL_DIRECTION
GTK_TYPE_GDK_SELECTION
@@ -76,6 +78,7 @@
GTK_TYPE_MENU_DIRECTION_TYPE
GTK_TYPE_MENU_FACTORY_TYPE
GTK_TYPE_METRIC_TYPE
+ GTK_TYPE_NOTEBOOK_PAGE
GTK_TYPE_OBJECT_FLAGS
GTK_TYPE_ORIENTATION
GTK_TYPE_PACKER_OPTIONS
@@ -91,6 +94,7 @@
GTK_TYPE_RC_FLAGS
GTK_TYPE_RC_TOKEN_TYPE
GTK_TYPE_RELIEF_STYLE
+ GTK_TYPE_REQUISITION
GTK_TYPE_RESIZE_MODE
GTK_TYPE_SCROLL_TYPE
GTK_TYPE_SELECTION_DATA
diff -ruN gtk+-cvs-20000904/gtk/gtknotebook.c gtk+-cvs-20000904-fix/gtk/gtknotebook.c
--- gtk+-cvs-20000904/gtk/gtknotebook.c Wed Jul 26 13:32:45 2000
+++ gtk+-cvs-20000904-fix/gtk/gtknotebook.c Mon Sep 4 19:43:15 2000
@@ -275,7 +275,7 @@
GTK_SIGNAL_OFFSET (GtkNotebookClass, switch_page),
gtk_marshal_NONE__POINTER_UINT,
GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER,
+ GTK_TYPE_NOTEBOOK_PAGE,
GTK_TYPE_UINT);
gtk_object_class_add_signals (object_class, notebook_signals, LAST_SIGNAL);
diff -ruN gtk+-cvs-20000904/gtk/gtkwidget.c gtk+-cvs-20000904-fix/gtk/gtkwidget.c
--- gtk+-cvs-20000904/gtk/gtkwidget.c Tue Aug 22 05:05:14 2000
+++ gtk+-cvs-20000904-fix/gtk/gtkwidget.c Mon Sep 4 19:43:15 2000
@@ -404,7 +404,7 @@
GTK_SIGNAL_OFFSET (GtkWidgetClass, draw),
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
+ GTK_TYPE_GDK_RECTANGLE);
widget_signals[DRAW_FOCUS] =
gtk_signal_new ("draw_focus",
GTK_RUN_FIRST,
@@ -426,7 +426,7 @@
GTK_SIGNAL_OFFSET (GtkWidgetClass, size_request),
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
+ GTK_TYPE_REQUISITION);
widget_signals[SIZE_ALLOCATE] =
gtk_signal_new ("size_allocate",
GTK_RUN_FIRST,
@@ -434,7 +434,7 @@
GTK_SIGNAL_OFFSET (GtkWidgetClass, size_allocate),
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
+ GTK_TYPE_ALLOCATION);
widget_signals[STATE_CHANGED] =
gtk_signal_new ("state_changed",
GTK_RUN_FIRST,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]