2005-12-10 Mike Kestner <mkestner@novell.com>

* 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]

svn path=/trunk/gtk-sharp/; revision=54192
This commit is contained in:
Mike Kestner 2005-12-10 13:17:47 +00:00
parent cef7589d14
commit 98b4307aba
6 changed files with 195 additions and 12 deletions

View file

@ -1,3 +1,11 @@
2005-12-10 Mike Kestner <mkestner@novell.com>
* 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 <mkestner@novell.com>
* gdk/gdk-symbols.xml : add GrabBroken mapping.

View file

@ -53,7 +53,8 @@
</ReturnValue>
<Docs>
<summary>Indicates a keyboard grab.</summary>
<value><see langword="true" /> for a keyboard grab or <see langword="false" /> for mouse.</value>
<value>
<see langword="true" /> for a keyboard grab or <see langword="false" /> for mouse.</value>
<remarks />
</Docs>
</Member>
@ -65,7 +66,8 @@
</ReturnValue>
<Docs>
<summary>Indicates if the broken grab was implicit.</summary>
<value><see langword="true" /> for an implicit grab.</value>
<value>
<see langword="true" /> for an implicit grab.</value>
<remarks />
</Docs>
</Member>

View file

@ -1,5 +1,5 @@
<Type Name="IconView" FullName="Gtk.IconView">
<TypeSignature Language="C#" Maintainer="auto" Value="public class IconView : Gtk.Container" />
<TypeSignature Language="C#" Maintainer="auto" Value="public class IconView : Gtk.Container, Gtk.CellLayout" />
<AssemblyInfo>
<AssemblyName>gtk-sharp</AssemblyName>
<AssemblyPublicKey>[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]</AssemblyPublicKey>
@ -184,6 +184,9 @@ public class DemoIconView : Window
<BaseTypeName>Gtk.Container</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Gtk.CellLayout</InterfaceName>
</Interface>
</Interfaces>
<Members>
<Member MemberName="OnSelectionChanged">
@ -1123,5 +1126,150 @@ public class DemoIconView : Window
<since version="Gtk# 2.8" />
</Docs>
</Member>
<Member MemberName="SetCellDataFunc">
<MemberSignature Language="C#" Value="public void SetCellDataFunc (Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="func" Type="Gtk.CellLayoutDataFunc" />
</Parameters>
<Docs>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /> of the view.</param>
<param name="func">a <see cref="T:Gtk.CellLayoutDataFunc" />, or <see langword="null" /> to remove an existing delegate.</param>
<summary>Sets the Cell Data delegate for a renderer.</summary>
<remarks>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.</remarks>
<since version="Gtk# 2.8" />
</Docs>
</Member>
<Member MemberName="ClearAttributes">
<MemberSignature Language="C#" Value="public void ClearAttributes (Gtk.CellRenderer cell);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
</Parameters>
<Docs>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /> of the view.</param>
<summary>Clears attribute bindings for a cell renderer.</summary>
<remarks />
<since version="Gtk# 2.8" />
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Clears attribute bindings and removes all renderers.</summary>
<remarks />
<since version="Gtk# 2.8" />
</Docs>
</Member>
<Member MemberName="AddAttribute">
<MemberSignature Language="C#" Value="public void AddAttribute (Gtk.CellRenderer cell, string attribute, int column);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="attribute" Type="System.String" />
<Parameter Name="column" Type="System.Int32" />
</Parameters>
<Docs>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /> of the view.</param>
<param name="attribute">an attribute name on <paramref name="cell" />.</param>
<param name="column">the model column index to bind to <paramref name="attribute" />.</param>
<summary>Binds a model column to an Attribute of a Cell Renderer.</summary>
<remarks />
<since version="Gtk# 2.8" />
</Docs>
</Member>
<Member MemberName="PackEnd">
<MemberSignature Language="C#" Value="public void PackEnd (Gtk.CellRenderer cell, bool expand);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /> to add to the view.</param>
<param name="expand">indicates if the <paramref name="cell" /> should expand to available space.</param>
<summary>Packs a renderer at the end of a cell.</summary>
<remarks />
<since version="Gtk# 2.8" />
</Docs>
</Member>
<Member MemberName="Reorder">
<MemberSignature Language="C#" Value="public void Reorder (Gtk.CellRenderer cell, int position);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /> of the view.</param>
<param name="position">desired index within the list of renderers.</param>
<summary>Moves a renderer to a position in the list of renderers.</summary>
<remarks />
<since version="Gtk# 2.8" />
</Docs>
</Member>
<Member MemberName="PackStart">
<MemberSignature Language="C#" Value="public void PackStart (Gtk.CellRenderer cell, bool expand);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="expand" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /> to add to the view.</param>
<param name="expand">indicates if the <paramref name="cell" /> should expand to available space.</param>
<summary>Packs a renderer to the beginning of the cell.</summary>
<remarks />
<since version="Gtk# 2.8" />
</Docs>
</Member>
<Member MemberName="SetAttributes">
<MemberSignature Language="C#" Value="public void SetAttributes (Gtk.CellRenderer cell, object[] attrs);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cell" Type="Gtk.CellRenderer" />
<Parameter Name="attrs" Type="System.Object[]">
<Attributes>
<Attribute>
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="cell">a <see cref="T:Gtk.CellRenderer" /> of the view.</param>
<param name="attrs">an array of name/value pairs.</param>
<summary>Set the attributes of a given Cell Renderer.</summary>
<remarks />
<since version="Gtk# 2.8" />
</Docs>
</Member>
</Members>
</Type>

View file

@ -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);

View file

@ -6463,6 +6463,9 @@
<parameter type="gint" name="count" />
</parameters>
</signal>
<implements>
<interface cname="GtkCellLayout" />
</implements>
<method name="CreateDragIcon" cname="gtk_icon_view_create_drag_icon">
<return-type type="GdkPixmap*" />
<parameters>

View file

@ -193,6 +193,26 @@ foreach $fname (@srcs, @privhdrs) {
while ($line = <INFILE>) {
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 = <INFILE>;
} 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 = <INFILE>;
}
$macro .= $line;
print $macro;
next;
}
$comment = 0;