diff --git a/ChangeLog b/ChangeLog index 743b90dcb..1b4077e7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2005-02-11 Dan Winship + * gtk/Gtk.metadata: Hide StyleGetProperty and StyleGetValist since + they're generated wrong, and StyleGet to avoid an ellipsis + warning. (Also hide the deprecated ellipsis method "Set".) + + * gtk/Widget.custom (StyleGetProperty): implement manually, a la + Gtk.Container.ChildGetProperty. + + * gtk/glue/widget.c (gtksharp_widget_style_get_property): glue for that + * generator/MethodBase.cs (Validate): use CName rather than always saying "in ctor" diff --git a/doc/ChangeLog b/doc/ChangeLog index 0bff51465..ec9bdf1dd 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2005-02-11 Dan Winship + + * en/Gtk/Widget.xml (StyleGetValist, StyleGetProperty): update + 2005-02-07 Ben Maurer * en/Gdk/Point.xml, en/Gdk/Rectangle.xml: Document new diff --git a/doc/en/Gtk/Widget.xml b/doc/en/Gtk/Widget.xml index 1f1f0122e..20a96e5fe 100644 --- a/doc/en/Gtk/Widget.xml +++ b/doc/en/Gtk/Widget.xml @@ -1,4 +1,4 @@ - + @@ -17,7 +17,7 @@ Style properties are set in resource files. This mechanism is used for configuring such things as the location of the scrollbar arrows through the theme, giving theme authors more control over the look of applications without the need to write a theme engine in C. - Use , or to obtain the value of a style property. + Use to obtain the value of a style property. @@ -312,27 +312,6 @@ - - - Method - - System.Void - - - - - - - Gets the values of a multiple style properties of . - The name of the first property to get. - A va_list of pairs of property names and locations to return the property values, starting with the location for . - - - Gets the values of a multiple style properties of . Used primarily by language bindings. - - - - Method @@ -2602,19 +2581,17 @@ handle focus grabs. - + Method - System.Void + System.Object - Obtains the value of a style property of . The name of a style property. - Location to return the property value. diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 0f3f6a385..c4a0d72bf 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -417,8 +417,13 @@ GdkEventMask 1 1 + 1 + 1 1 out + 1 + 1 + 1 1 AccelCanActivate ChildNotified @@ -436,7 +441,6 @@ ref Unmapped Unrealized - 1 1 out 1 diff --git a/gtk/Widget.custom b/gtk/Widget.custom index 76b92b74d..16210748c 100644 --- a/gtk/Widget.custom +++ b/gtk/Widget.custom @@ -294,3 +294,15 @@ static void ClassInit (GLib.GType gtype, Type t) } } +[DllImport("gtksharpglue-2")] +static extern void gtksharp_widget_style_get_property (IntPtr widget, string property, ref GLib.Value value); + +public object StyleGetProperty (string property_name) { + GLib.Value value = new GLib.Value (); + object ret; + + gtksharp_widget_style_get_property (Handle, property_name, ref value); + ret = value.Val; + value.Dispose (); + return ret; +} diff --git a/gtk/glue/widget.c b/gtk/glue/widget.c index a235b88d2..a562d187a 100644 --- a/gtk/glue/widget.c +++ b/gtk/glue/widget.c @@ -38,6 +38,7 @@ void gtksharp_gtk_widget_set_flags (GtkWidget *widget, int flags); int gtksharp_gtk_widget_style_get_int (GtkWidget *widget, const char *name); void gtksharp_widget_add_binding_signal (GType gtype, const char *sig_name, GCallback cb); void gtksharp_widget_register_binding (GType gtype, const char *sig_name, guint key, int mod, gpointer data); +void gtksharp_widget_style_get_property (GtkWidget *widget, const gchar* property, GValue *value); /* */ GdkRectangle* @@ -160,3 +161,11 @@ gtksharp_widget_register_binding (GType gtype, const gchar *signame, guint key, gtk_binding_entry_add_signal (set, key, mod, signame, 1, G_TYPE_LONG, data); } +void +gtksharp_widget_style_get_property (GtkWidget *widget, const gchar* property, GValue *value) +{ + GParamSpec *spec = gtk_widget_class_find_style_property (GTK_WIDGET_GET_CLASS (widget), property); + g_value_init (value, spec->value_type); + gtk_widget_style_get_property (widget, property, value); +} +