diff --git a/ChangeLog b/ChangeLog index 3fc13af14..a861b4e71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-12-10 Mike Kestner + + * gtk/gtk-api-2.8.raw : regenerated. + * gtk/IconView.custom : manually implement a new interface method. + * parser/gapi_pp.pl : more general G_DEFINE_TYPE_WITH_CODE parsing + implementation. + [Fixes #76266] + 2005-12-10 Mike Kestner * gdk/gdk-symbols.xml : add GrabBroken mapping. diff --git a/doc/en/Gdk/EventGrabBroken.xml b/doc/en/Gdk/EventGrabBroken.xml index 29fe64c49..7f9a60bca 100644 --- a/doc/en/Gdk/EventGrabBroken.xml +++ b/doc/en/Gdk/EventGrabBroken.xml @@ -53,7 +53,8 @@ Indicates a keyboard grab. - for a keyboard grab or for mouse. + + for a keyboard grab or for mouse. @@ -65,7 +66,8 @@ Indicates if the broken grab was implicit. - for an implicit grab. + + for an implicit grab. diff --git a/doc/en/Gtk/IconView.xml b/doc/en/Gtk/IconView.xml index 63c4b96d4..099c5c310 100644 --- a/doc/en/Gtk/IconView.xml +++ b/doc/en/Gtk/IconView.xml @@ -1,5 +1,5 @@ - + gtk-sharp [00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4] @@ -184,6 +184,9 @@ public class DemoIconView : Window Gtk.Container + + Gtk.CellLayout + @@ -1123,5 +1126,150 @@ public class DemoIconView : Window + + + Method + + System.Void + + + + + + + a of the view. + a , or to remove an existing delegate. + Sets the Cell Data delegate for a renderer. + The Cell data func is an alternative to binding attributes to model columns. The delegate is invoked any time the cell is renderer and it should set up all the appropriate renderer information. + + + + + + Method + + System.Void + + + + + + a of the view. + Clears attribute bindings for a cell renderer. + + + + + + + Method + + System.Void + + + + Clears attribute bindings and removes all renderers. + + + + + + + Method + + System.Void + + + + + + + + a of the view. + an attribute name on . + the model column index to bind to . + Binds a model column to an Attribute of a Cell Renderer. + + + + + + + Method + + System.Void + + + + + + + a to add to the view. + indicates if the should expand to available space. + Packs a renderer at the end of a cell. + + + + + + + Method + + System.Void + + + + + + + a of the view. + desired index within the list of renderers. + Moves a renderer to a position in the list of renderers. + + + + + + + Method + + System.Void + + + + + + + a to add to the view. + indicates if the should expand to available space. + Packs a renderer to the beginning of the cell. + + + + + + + Method + + System.Void + + + + + + + System.ParamArray + + + + + + a of the view. + an array of name/value pairs. + Set the attributes of a given Cell Renderer. + + + + diff --git a/gtk/IconView.custom b/gtk/IconView.custom index c2f59ba1b..c5094e8e9 100644 --- a/gtk/IconView.custom +++ b/gtk/IconView.custom @@ -20,6 +20,17 @@ #if GTK_SHARP_2_8 + public void SetAttributes (CellRenderer cell, params object[] attrs) + { + if (attrs.Length % 2 != 0) + throw new ArgumentException ("attrs should contain pairs of attribute/col"); + + ClearAttributes (cell); + for (int i = 0; i < attrs.Length - 1; i += 2) { + AddAttribute (cell, (string) attrs [i], (int) attrs [i + 1]); + } + } + [DllImport("libgtk-win32-2.0-0.dll")] static extern void gtk_icon_view_scroll_to_path(IntPtr raw, IntPtr path, bool use_align, float row_align, float col_align); diff --git a/gtk/gtk-api-2.8.raw b/gtk/gtk-api-2.8.raw index 014298c35..27251205d 100644 --- a/gtk/gtk-api-2.8.raw +++ b/gtk/gtk-api-2.8.raw @@ -6463,6 +6463,9 @@ + + + diff --git a/parser/gapi_pp.pl b/parser/gapi_pp.pl index c6c5aa3fc..a94ca3ff0 100755 --- a/parser/gapi_pp.pl +++ b/parser/gapi_pp.pl @@ -193,6 +193,26 @@ foreach $fname (@srcs, @privhdrs) { while ($line = ) { next if ($line !~ /^(struct|\w+_class_init|\w+_base_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE)/); + if ($line =~ /^G_DEFINE_TYPE_WITH_CODE/) { + my $macro; + my $parens = 0; + do { + chomp ($line); + $line =~ s/(.*)\\$/\1/; + $line =~ s/^\s+(.*)/ \1/; + $macro .= $line; + foreach $chr (split (//, $line)) { + if ($chr eq "(") { + $parens++; + } elsif ($chr eq ")") { + $parens--; + } + } + $line = ; + } while ($parens > 0); + print $macro; + } + if ($line =~ /^struct/) { # need some of these to parse out parent types print "private"; @@ -200,15 +220,6 @@ foreach $fname (@srcs, @privhdrs) { print $line; next; } - } elsif ($line =~ /^G_DEFINE_TYPE_WITH_CODE/) { - my $macro; - while ($line =~ /(.*)\\$/) { - $macro .= $1; - $line = ; - } - $macro .= $line; - print $macro; - next; } $comment = 0;