2005-06-02 Mike Kestner <mkestner@novell.com>

* gtk/gtk-api-2.6.raw : regen.
	* parser/gapi_pp.pl : add G_DEFINE_TYPE_WITH_CODE handling.
	* parser/gapi2xml.pl : add G_DEFINE_TYPE_WITH_CODE parsing.
	[Fixes #74833]

svn path=/trunk/gtk-sharp/; revision=45338
This commit is contained in:
Mike Kestner 2005-06-02 19:18:44 +00:00
parent ff096ac998
commit 0ceb4ccbca
5 changed files with 601 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2005-06-02 Mike Kestner <mkestner@novell.com>
* gtk/gtk-api-2.6.raw : regen.
* parser/gapi_pp.pl : add G_DEFINE_TYPE_WITH_CODE handling.
* parser/gapi2xml.pl : add G_DEFINE_TYPE_WITH_CODE parsing.
[Fixes #74833]
2005-06-02 Mike Kestner <mkestner@novell.com>
* glib/ListBase.cs : add a nested class to support filename encoded

View file

@ -1,5 +1,5 @@
<Type Name="FileChooserButton" FullName="Gtk.FileChooserButton">
<TypeSignature Language="C#" Maintainer="auto" Value="public class FileChooserButton : Gtk.HBox" />
<TypeSignature Language="C#" Maintainer="auto" Value="public class FileChooserButton : Gtk.HBox, Gtk.FileChooser" />
<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>
@ -14,6 +14,9 @@
<BaseTypeName>Gtk.HBox</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Gtk.FileChooser</InterfaceName>
</Interface>
</Interfaces>
<Members>
@ -139,5 +142,553 @@
<AttributeName>GLib.Property(Name="width-chars")</AttributeName>
</Attribute>
</Attributes></Member>
<Member MemberName="SelectionChanged">
<MemberSignature Language="C#" Value="public event EventHandler SelectionChanged;" />
<MemberType>Event</MemberType>
<Attributes>
<Attribute>
<AttributeName>GLib.Signal(CName="selection-changed")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FileActivated">
<MemberSignature Language="C#" Value="public event EventHandler FileActivated;" />
<MemberType>Event</MemberType>
<Attributes>
<Attribute>
<AttributeName>GLib.Signal(CName="file-activated")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UpdatePreview">
<MemberSignature Language="C#" Value="public event EventHandler UpdatePreview;" />
<MemberType>Event</MemberType>
<Attributes>
<Attribute>
<AttributeName>GLib.Signal(CName="update-preview")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CurrentFolderChanged">
<MemberSignature Language="C#" Value="public event EventHandler CurrentFolderChanged;" />
<MemberType>Event</MemberType>
<Attributes>
<Attribute>
<AttributeName>GLib.Signal(CName="current-folder-changed")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetCurrentFolderUri">
<MemberSignature Language="C#" Value="public bool SetCurrentFolderUri (string uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
</Parameters>
<Docs>
<param name="uri">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UnselectAll">
<MemberSignature Language="C#" Value="public void UnselectAll ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetFilename">
<MemberSignature Language="C#" Value="public bool SetFilename (string filename);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
</Parameters>
<Docs>
<param name="filename">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RemoveShortcutFolderUri">
<MemberSignature Language="C#" Value="public bool RemoveShortcutFolderUri (string uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
</Parameters>
<Docs>
<param name="uri">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddShortcutFolderUri">
<MemberSignature Language="C#" Value="public bool AddShortcutFolderUri (string uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
</Parameters>
<Docs>
<param name="uri">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SelectAll">
<MemberSignature Language="C#" Value="public void SelectAll ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SelectUri">
<MemberSignature Language="C#" Value="public bool SelectUri (string uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
</Parameters>
<Docs>
<param name="uri">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RemoveFilter">
<MemberSignature Language="C#" Value="public void RemoveFilter (Gtk.FileFilter filter);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filter" Type="Gtk.FileFilter" />
</Parameters>
<Docs>
<param name="filter">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddShortcutFolder">
<MemberSignature Language="C#" Value="public bool AddShortcutFolder (string folder);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="folder" Type="System.String" />
</Parameters>
<Docs>
<param name="folder">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SelectFilename">
<MemberSignature Language="C#" Value="public bool SelectFilename (string filename);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
</Parameters>
<Docs>
<param name="filename">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UnselectFilename">
<MemberSignature Language="C#" Value="public void UnselectFilename (string filename);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
</Parameters>
<Docs>
<param name="filename">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddFilter">
<MemberSignature Language="C#" Value="public void AddFilter (Gtk.FileFilter filter);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filter" Type="Gtk.FileFilter" />
</Parameters>
<Docs>
<param name="filter">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RemoveShortcutFolder">
<MemberSignature Language="C#" Value="public bool RemoveShortcutFolder (string folder);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="folder" Type="System.String" />
</Parameters>
<Docs>
<param name="folder">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UnselectUri">
<MemberSignature Language="C#" Value="public void UnselectUri (string uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
</Parameters>
<Docs>
<param name="uri">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetCurrentFolder">
<MemberSignature Language="C#" Value="public bool SetCurrentFolder (string filename);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
</Parameters>
<Docs>
<param name="filename">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetUri">
<MemberSignature Language="C#" Value="public bool SetUri (string uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
</Parameters>
<Docs>
<param name="uri">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnSelectionChanged">
<MemberSignature Language="C#" Value="protected virtual void OnSelectionChanged ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnFileActivated">
<MemberSignature Language="C#" Value="protected virtual void OnFileActivated ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnUpdatePreview">
<MemberSignature Language="C#" Value="protected virtual void OnUpdatePreview ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnCurrentFolderChanged">
<MemberSignature Language="C#" Value="protected virtual void OnCurrentFolderChanged ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CurrentFolderUri">
<MemberSignature Language="C#" Value="public string CurrentFolderUri { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ExtraWidget">
<MemberSignature Language="C#" Value="public Gtk.Widget ExtraWidget { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CurrentName">
<MemberSignature Language="C#" Value="public string CurrentName { set; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShowHidden">
<MemberSignature Language="C#" Value="public bool ShowHidden { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Filter">
<MemberSignature Language="C#" Value="public Gtk.FileFilter Filter { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.FileFilter</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="LocalOnly">
<MemberSignature Language="C#" Value="public bool LocalOnly { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PreviewWidgetActive">
<MemberSignature Language="C#" Value="public bool PreviewWidgetActive { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PreviewFilename">
<MemberSignature Language="C#" Value="public string PreviewFilename { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Uri">
<MemberSignature Language="C#" Value="public string Uri { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UsePreviewLabel">
<MemberSignature Language="C#" Value="public bool UsePreviewLabel { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Filename">
<MemberSignature Language="C#" Value="public string Filename { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PreviewUri">
<MemberSignature Language="C#" Value="public string PreviewUri { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SelectMultiple">
<MemberSignature Language="C#" Value="public bool SelectMultiple { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PreviewWidget">
<MemberSignature Language="C#" Value="public Gtk.Widget PreviewWidget { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Action">
<MemberSignature Language="C#" Value="public Gtk.FileChooserAction Action { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.FileChooserAction</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CurrentFolder">
<MemberSignature Language="C#" Value="public string CurrentFolder { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -5482,6 +5482,9 @@
<property name="Dialog" cname="dialog" type="GtkFileChooserDialog" writeable="true" construct-only="true" />
<property name="Title" cname="title" type="gchar*" readable="true" writeable="true" />
<property name="WidthChars" cname="width-chars" type="gint" readable="true" writeable="true" />
<implements>
<interface cname="GtkFileChooser" />
</implements>
<method name="GetTitle" cname="gtk_file_chooser_button_get_title">
<return-type type="const-gchar*" />
</method>

View file

@ -152,6 +152,8 @@ while ($line = <STDIN>) {
last if ($line =~ /^}/);
}
$typefuncs{lc($class)} = $pedef;
} elsif ($line =~ /^G_DEFINE_TYPE_WITH_CODE\s*\(\s*(\w+)/) {
$typefuncs{lc($1)} = $line;
} elsif ($line =~ /^(deprecated)?(const|G_CONST_RETURN)?\s*(struct\s+)?\w+\s*\**(\s*(const|G_CONST_RETURN)\s*\**)?\s*(\w+)\s*\(/) {
$fname = $6;
$fdef = "";
@ -375,7 +377,11 @@ foreach $type (sort(keys(%objects))) {
# Get the interfaces from the class_init func.
if ($typefunc) {
parseTypeFunc($obj_el, $typefunc);
if ($typefunc =~ /G_DEFINE_TYPE_WITH_CODE/) {
parseTypeFuncMacro($obj_el, $typefunc);
} else {
parseTypeFunc($obj_el, $typefunc);
}
} else {
warn "Don't have a GetType func for $inst.\n" if $debug;
}
@ -1022,6 +1028,28 @@ sub parseInitFunc
addVirtualMethods ($classdef, $obj_el);
}
sub parseTypeFuncMacro
{
my ($obj_el, $typefunc) = @_;
$impls_node = undef;
while ($typefunc =~ /G_IMPLEMENT_INTERFACE\s*\(\s*(\w+)/) {
$iface = $1;
if (not $impls_node) {
$impls_node = $doc->createElement ("implements");
$obj_el->appendChild ($impls_node);
}
addImplementsElem ($prop, $impl_node);
if ($iface =~ /(\w+)_TYPE_(\w+)/) {
$impl_elem = $doc->createElement('interface');
$name = StudlyCaps (lc ("$1_$2"));
$impl_elem->setAttribute ("cname", "$name");
$impls_node->appendChild($impl_elem);
}
$typefunc =~ s/G_IMPLEMENT_INTERFACE\s*\(.*?\)//;
}
}
sub parseTypeFunc
{
my ($obj_el, $typefunc) = @_;

View file

@ -189,7 +189,7 @@ foreach $fname (@srcs, @privhdrs) {
}
while ($line = <INFILE>) {
next if ($line !~ /^(struct|\w+_class_init|\w+_base_init|\w+_get_type\b)/);
next if ($line !~ /^(struct|\w+_class_init|\w+_base_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE)/);
if ($line =~ /^struct/) {
# need some of these to parse out parent types
@ -198,6 +198,15 @@ 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;