diff --git a/ChangeLog b/ChangeLog index ef0fb873a..f6cdee693 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-06-07 Todd Berman + + * gtk/Widget.custom: expose some easy bool properties for checking + certain WidgetFlags. Make Allocation a settable property. + * gtk/glue/widget.c: bit of glue to make Allocation settable. + * gdk/Window.custom: expose UserData as a usable IntPtr property. + * gdk/Gdk.metadata: hide old GetUserData/SetUserData methods. + * doc/*: ran the updater. + 2004-06-07 Jeroen Zwartepoorte * gtk/Widget.custom: Add FocusLineWidth property. diff --git a/doc/en/Gdk/Window.xml b/doc/en/Gdk/Window.xml index 9867d8ce2..60f345d49 100644 --- a/doc/en/Gdk/Window.xml +++ b/doc/en/Gdk/Window.xml @@ -283,21 +283,6 @@ To be added - - - Method - - System.Void - - - - - - To be added - To be added: an object of type 'IntPtr' - To be added - - Method @@ -541,21 +526,6 @@ To be added - - - Method - - System.Void - - - - - - To be added - To be added: an object of type 'IntPtr' - To be added - - Method @@ -1474,5 +1444,18 @@ To be added + + + Property + + System.IntPtr + + + + To be added + a + To be added + + \ No newline at end of file diff --git a/doc/en/Gnome/CanvasItem.xml b/doc/en/Gnome/CanvasItem.xml index a1ab155d2..5a56ed20d 100644 --- a/doc/en/Gnome/CanvasItem.xml +++ b/doc/en/Gnome/CanvasItem.xml @@ -713,8 +713,19 @@ To be added - - + + + Constructor + + + + To be added + a + To be added + + + + Method System.Void @@ -725,8 +736,8 @@ To be added - - + + Method System.Double @@ -749,8 +760,8 @@ To be added - - + + Method System.Void @@ -772,8 +783,8 @@ To be added - - + + Method System.Void @@ -787,8 +798,8 @@ To be added - - + + Method System.Void @@ -806,16 +817,5 @@ To be added - - - Constructor - - - - To be added - a - To be added - - \ No newline at end of file diff --git a/doc/en/Gtk/CellRenderer.xml b/doc/en/Gtk/CellRenderer.xml index cf491ffd7..a24f3fe2e 100644 --- a/doc/en/Gtk/CellRenderer.xml +++ b/doc/en/Gtk/CellRenderer.xml @@ -75,35 +75,6 @@ - - - Method - - System.Void - - - - - - - - - - - Obtains the and needed to render the cell. - an object of type - an object of type - an object of type - an object of type - an object of type - an object of type - - Used by view widgets to determine the appropriate size for the passed to gtk_cell_renderer_render(). - If is not , fills in the x and y offsets (if set) of the cell relative to this location. - Please note that the values set in and , as well as those in and are inclusive of the xpad and ypad properties. - - - Method @@ -138,32 +109,6 @@ To be added - - - Method - - Gtk.CellEditable - - - - - - - - - - - Passes an activate event to the for possible processing. - an object of type - an object of type - an object of type - an object of type - an object of type - an object of type - an object of type - To be added - - Method @@ -455,33 +400,59 @@ To be added - - + + + Constructor + + + + To be added + a + To be added + + + + + Method + + System.Void + + + + + + To be added + a + To be added + + + + Method System.Void - + - To be added + Obtains the and needed to render the cell. a a a a a a - To be added + Used by view widgets to determine the appropriate size for the passed to gtk_cell_renderer_render(). If is not , fills in the x and y offsets (if set) of the cell relative to this location. Please note that the values set in and , as well as those in and are inclusive of the xpad and ypad properties. - - + + Method System.Void @@ -505,25 +476,29 @@ To be added - - - Constructor - - + + + Method + + Gtk.CellEditable + + + + + + + + + - To be added - a - To be added - - - - - Constructor - - - - To be added - a + Passes an activate event to the for possible processing. + a + a + a + a + a + a + a To be added diff --git a/doc/en/Gtk/Container.xml b/doc/en/Gtk/Container.xml index b92ccba8f..4e8574fdb 100644 --- a/doc/en/Gtk/Container.xml +++ b/doc/en/Gtk/Container.xml @@ -643,8 +643,19 @@ To be added - - + + + Constructor + + + + To be added + a + To be added + + + + Method System.Void @@ -660,16 +671,5 @@ To be added - - - Constructor - - - - To be added - a - To be added - - \ No newline at end of file diff --git a/doc/en/Gtk/Widget.xml b/doc/en/Gtk/Widget.xml index 273aff61e..9aa0bc6f0 100644 --- a/doc/en/Gtk/Widget.xml +++ b/doc/en/Gtk/Widget.xml @@ -1182,18 +1182,6 @@ - - - Property - - Gdk.Rectangle - - - To be added - To be added: an object of type 'Gdk.Rectangle' - To be added - - Property @@ -4721,5 +4709,70 @@ handle focus grabs. + + + Property + + Gdk.Rectangle + + + + Gets or Sets the widget's allocation. + a representing the size of the widget's allocation. + None. + + + + + Property + + System.Boolean + + + + Check to see if the widget is Mapped + true if the widget is Mapped, false otherwise. + None. + + + + + Property + + System.Boolean + + + + Checks to see if the widget is Realized + returns true if the widget is Realized + None. + + + + + Property + + System.Boolean + + + + Checks for the NoWindow + returns true if the NoWindow flag is set + None. + + + + + Property + + System.Boolean + + + + Checks to see if the widget is Drawable + returns true if the widget is Drawable + None. + + - \ No newline at end of file + diff --git a/doc/scan-deprecations.cs b/doc/scan-deprecations.cs index 3fb2f4001..c582c5685 100644 --- a/doc/scan-deprecations.cs +++ b/doc/scan-deprecations.cs @@ -34,7 +34,10 @@ namespace GtkSharp.Docs { while (iter.MoveNext ()) { XmlElement elem = ((IHasXmlNode)iter.Current).GetNode () as XmlElement; string member_type = elem["MemberType"].InnerText; - switch (member_type) { + switch (member_type) { + case "Method": + case "Property": + case "Constructor": case "Field": string summary = elem["Docs"]["summary"].InnerText; string remarks = elem["Docs"]["remarks"].InnerText; diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata index bd146d110..63435cde1 100644 --- a/gdk/Gdk.metadata +++ b/gdk/Gdk.metadata @@ -71,6 +71,8 @@ 1 1 1 + 1 + 1 1 1 1 diff --git a/gdk/Window.custom b/gdk/Window.custom index d1edb2898..9ebf50d06 100644 --- a/gdk/Window.custom +++ b/gdk/Window.custom @@ -63,6 +63,22 @@ gdk_window_clear_area (Handle, rect.X, rect.Y, rect.Width, rect.Height); } + [DllImport ("libgdk-win32-2.0-0.dll")] + static extern void gdk_window_get_user_data (IntPtr raw, out IntPtr data); + + [DllImport("libgdk-win32-2.0-0.dll")] + static extern void gdk_window_set_user_data(IntPtr raw, IntPtr user_data); + public IntPtr UserData { + get { + IntPtr data; + gdk_window_get_user_data (Handle, out data); + return data; + } + set { + gdk_window_set_user_data(Handle, value); + } + } + #if MANLY_ENOUGH_TO_INCLUDE public Cairo.Graphics CairoGraphics (out int offset_x, out int offset_y) { @@ -83,4 +99,4 @@ int x, y; return CairoGraphics (out x, out y); } -#endif \ No newline at end of file +#endif diff --git a/gtk/Widget.custom b/gtk/Widget.custom index 10d2fd394..81dbfb2ba 100644 --- a/gtk/Widget.custom +++ b/gtk/Widget.custom @@ -11,8 +11,12 @@ [DllImport("gtksharpglue")] static extern IntPtr gtksharp_gtk_widget_get_allocation (IntPtr style); +[DllImport("gtksharpglue")] +static extern void gtksharp_gtk_widget_set_allocation (IntPtr raw, Gdk.Rectangle rect); + public Gdk.Rectangle Allocation { get { return Gdk.Rectangle.New (gtksharp_gtk_widget_get_allocation (Handle)); } + set { gtksharp_gtk_widget_set_allocation (Handle, value); } } @@ -72,6 +76,30 @@ public int Flags { } } +public bool IsMapped { + get { + return ((Flags & (int)Gtk.WidgetFlags.Mapped) != 0); + } +} + +public bool IsRealized { + get { + return ((Flags & (int)Gtk.WidgetFlags.Realized) != 0); + } +} + +public bool NoWindow { + get { + return ((Flags & (int)Gtk.WidgetFlags.NoWindow) != 0); + } +} + +public bool Drawable { + get { + return (Visible && IsMapped); + } +} + [DllImport("gtksharpglue")] static extern int gtksharp_gtk_widget_style_get_int (IntPtr raw, string name); diff --git a/gtk/glue/widget.c b/gtk/glue/widget.c index fd7b028c1..7ec70b3a6 100644 --- a/gtk/glue/widget.c +++ b/gtk/glue/widget.c @@ -9,9 +9,12 @@ /* Forward declarations */ GdkRectangle *gtksharp_gtk_widget_get_allocation (GtkWidget *widget); +void gtksharp_gtk_widget_set_allocation (GtkWidget *widget, GdkRectangle rect); GdkWindow *gtksharp_gtk_widget_get_window (GtkWidget *widget); void gtksharp_gtk_widget_set_window (GtkWidget *widget, GdkWindow *window); int gtksharp_gtk_widget_get_state (GtkWidget *widget); +int gtksharp_gtk_widget_get_flags (GtkWidget *widget); +void gtksharp_gtk_widget_set_flags (GtkWidget *widget, int flags); int gtksharp_gtk_widget_style_get_int (GtkWidget *widget, const char *name); /* */ @@ -21,6 +24,12 @@ gtksharp_gtk_widget_get_allocation (GtkWidget *widget) return &widget->allocation; } +void +gtksharp_gtk_widget_set_allocation (GtkWidget *widget, GdkRectangle rect) +{ + widget->allocation = rect; +} + GdkWindow * gtksharp_gtk_widget_get_window (GtkWidget *widget) {