From b6d7f14268eff068e642df196b33e09cec402642 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 16 May 2005 14:28:55 +0000 Subject: [PATCH] * generator/StructBase.cs: update field-generation logic a bit * generator/CodeGenerator.cs: add a --glue-includes flag * generator/GenerationInfo.cs: Accept glue_includes value from Main and output it to the glue_filename. * generator/FieldBase.cs (Ignored): handle more ignorable cases. (CheckGlue): New method to figure out what kind of glue we'll need for a field. (GenerateImports): generate appropriate imports per CheckGlue. (GenerateGlue): Generate C glue for accessing a struct field; either a fully-C-based accessor, or a method to just return the field's offset in the struct. (Generate): Use the generated glue to read the field. * generator/PropertyBase.cs (CType): if the field is a single bit, set its type to gboolean. * generator/ObjectGen.cs (Generate): * generator/OpaqueGen.cs (Generate): Call GenFields. * generator/StructField.cs: Use FieldBase's glue-generation code to handle bitfields. [#54489] * generator/ObjectField.cs: Generates accessors for public fields of objects and opaque structs. [#69514] * generator/ClassBase.cs (ClassBase): Parse nodes and create ObjectField objects. (GenFields): Output field properties (IgnoreMethod): Ignore Get/Set methods that duplicate fields * generator/Makefile.am (sources): update * {gdk,gnome,gtk,pango}/*.metadata: Mark some additional fields as public. Rename/retype some fields for consistency with earlier hand-coded bindings. * {gdk,gnome,gtk,pango}/*.custom: Remove custom methods that can now be autogenerated. * {gdk,gnome,gtk,pango}/glue/*.c: Remove glue methods that can now be autogenerated * {gdk,glade,gnome,gtk,pango,vte}/Makefile.am * {gdk,glade,gnome,gtk,pango,vte}/glue/Makefile.am * {gdk,gnome,gtk,pango}/glue/makefile.win32: Update svn path=/trunk/gtk-sharp/; revision=44563 --- ChangeLog | 51 ++++++++ Makefile.include | 3 +- doc/ChangeLog | 47 +++++++ doc/en/Gdk/Colormap.xml | 13 ++ doc/en/Gdk/Image.xml | 117 +++++++++++++++++ doc/en/Glade/SignalInfo.xml | 13 ++ doc/en/Gnome/App.xml | 52 +++++++- doc/en/Gnome/CanvasBuf.xml | 26 ++++ doc/en/Gnome/Druid.xml | 65 ++++++++++ doc/en/Gnome/DruidPageEdge.xml | 107 +++++++++------- doc/en/Gnome/DruidPageStandard.xml | 44 ++++--- doc/en/Gnome/PrintPaper.xml | 8 +- doc/en/Gnome/PrintUnit.xml | 16 +-- doc/en/Gtk/AccelKey.xml | 8 +- doc/en/Gtk/FileSelection.xml | 14 ++ doc/en/Gtk/FontSelectionDialog.xml | 42 ++++++ doc/en/Gtk/RcStyle.xml | 52 ++++++++ doc/en/Gtk/Style.xml | 39 ++++++ doc/en/Gtk/TextAppearance.xml | 21 ++- doc/en/Gtk/TextAttributes.xml | 52 ++++++++ doc/en/Gtk/Toolbar.xml | 13 ++ doc/en/Gtk/TreeStore.xml | 16 +++ doc/en/Gtk/Widget.xml | 12 ++ doc/en/Pango/GlyphVisAttr.xml | 13 ++ doc/en/Pango/LogAttr.xml | 184 +++++++++++++++++++++++++++ doc/en/Vte/CharAttributes.xml | 28 +++- gdk/Device.custom | 61 --------- gdk/DragContext.custom | 80 ------------ gdk/Gdk.metadata | 12 +- gdk/Makefile.am | 1 + gdk/glue/Makefile.am | 2 + gdk/glue/device.c | 46 ------- gdk/glue/dragcontext.c | 72 ----------- gdk/glue/makefile.win32 | 1 + generator/ClassBase.cs | 22 +++- generator/CodeGenerator.cs | 9 +- generator/FieldBase.cs | 197 ++++++++++++++++++++++++++++- generator/GenerationInfo.cs | 15 ++- generator/Makefile.am | 1 + generator/ObjectField.cs | 48 +++++++ generator/ObjectGen.cs | 2 +- generator/OpaqueGen.cs | 1 + generator/PropertyBase.cs | 8 +- generator/StructBase.cs | 20 +-- generator/StructField.cs | 33 +---- glade/Makefile.am | 3 +- glade/glue/Makefile.am | 2 + gnome/Canvas.custom | 16 --- gnome/CanvasItem.custom | 6 - gnome/Gnome.metadata | 31 ++++- gnome/Makefile.am | 3 +- gnome/glue/Makefile.am | 3 +- gnome/glue/canvas.c | 30 ----- gnome/glue/canvasitem.c | 8 -- gtk/AccelKey.custom | 1 + gtk/Button.custom | 14 -- gtk/Combo.custom | 18 --- gtk/Container.custom | 21 --- gtk/Dialog.custom | 12 -- gtk/FileSelection.custom | 104 --------------- gtk/Gtk.metadata | 62 ++++++++- gtk/InputDialog.custom | 42 ------ gtk/Layout.custom | 41 ------ gtk/Makefile.am | 3 +- gtk/SelectionData.custom | 46 ------- gtk/Style.custom | 14 -- gtk/Widget.custom | 1 - gtk/glue/Makefile.am | 11 +- gtk/glue/button.c | 35 ----- gtk/glue/combo.c | 38 ------ gtk/glue/container.c | 8 -- gtk/glue/dialog.c | 39 ------ gtk/glue/fileselection.c | 168 ------------------------ gtk/glue/inputdialog.c | 40 ------ gtk/glue/layout.c | 33 ----- gtk/glue/makefile.win32 | 9 +- gtk/glue/paned.c | 39 ------ gtk/glue/selectiondata.c | 36 ------ gtk/glue/style.c | 16 --- gtk/glue/widget.c | 2 + pango/LayoutLine.custom | 34 ----- pango/Makefile.am | 1 + pango/Pango.metadata | 3 + pango/glue/Makefile.am | 3 +- pango/glue/layoutline.c | 46 ------- pango/glue/makefile.win32 | 2 +- vte/Makefile.am | 4 + vte/glue/Makefile.am | 24 ++++ 88 files changed, 1435 insertions(+), 1324 deletions(-) create mode 100644 generator/ObjectField.cs delete mode 100644 gnome/glue/canvas.c delete mode 100644 gtk/InputDialog.custom delete mode 100644 gtk/Layout.custom delete mode 100644 gtk/glue/button.c delete mode 100644 gtk/glue/combo.c delete mode 100644 gtk/glue/dialog.c delete mode 100644 gtk/glue/fileselection.c delete mode 100644 gtk/glue/inputdialog.c delete mode 100644 gtk/glue/layout.c delete mode 100644 gtk/glue/paned.c delete mode 100644 pango/glue/layoutline.c create mode 100644 vte/glue/Makefile.am diff --git a/ChangeLog b/ChangeLog index 05ab30f26..d2d467440 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,54 @@ +2005-05-16 Dan Winship + + * generator/StructBase.cs: update field-generation logic a bit + + * generator/CodeGenerator.cs: add a --glue-includes flag + + * generator/GenerationInfo.cs: Accept glue_includes value from + Main and output it to the glue_filename. + + * generator/FieldBase.cs (Ignored): handle more ignorable cases. + (CheckGlue): New method to figure out what kind of glue we'll need + for a field. + (GenerateImports): generate appropriate imports per CheckGlue. + (GenerateGlue): Generate C glue for accessing a struct field; + either a fully-C-based accessor, or a method to just return the + field's offset in the struct. + (Generate): Use the generated glue to read the field. + + * generator/PropertyBase.cs (CType): if the field is a single bit, + set its type to gboolean. + + * generator/ObjectGen.cs (Generate): + * generator/OpaqueGen.cs (Generate): Call GenFields. + + * generator/StructField.cs: Use FieldBase's glue-generation code + to handle bitfields. [#54489] + + * generator/ObjectField.cs: Generates accessors for public fields + of objects and opaque structs. [#69514] + + * generator/ClassBase.cs (ClassBase): Parse nodes and + create ObjectField objects. + (GenFields): Output field properties + (IgnoreMethod): Ignore Get/Set methods that duplicate fields + + * generator/Makefile.am (sources): update + + * {gdk,gnome,gtk,pango}/*.metadata: Mark some additional fields as + public. Rename/retype some fields for consistency with earlier + hand-coded bindings. + + * {gdk,gnome,gtk,pango}/*.custom: Remove custom methods that can + now be autogenerated. + + * {gdk,gnome,gtk,pango}/glue/*.c: Remove glue methods that can now + be autogenerated + + * {gdk,glade,gnome,gtk,pango,vte}/Makefile.am + * {gdk,glade,gnome,gtk,pango,vte}/glue/Makefile.am + * {gdk,gnome,gtk,pango}/glue/makefile.win32: Update + 2005-05-15 Ben Maurer * bootstrap (GTK_SHARP_VERSION): Bump so that Todd's md tarballs diff --git a/Makefile.include b/Makefile.include index 313add85f..2a7d78a56 100644 --- a/Makefile.include +++ b/Makefile.include @@ -33,7 +33,8 @@ generated-stamp: $(API) $(top_builddir)/generator/gapi_codegen.exe $(build_custo $(RUNTIME) $(top_builddir)/generator/gapi_codegen.exe --generate $(API) \ $(api_includes) \ --outdir=generated --customdir=$(srcdir) --assembly-name=$(ASSEMBLY_NAME) \ - --gluelib-name=$(pkg)sharpglue --glue-filename=glue/generated.c \ + --gluelib-name=$(pkg)sharpglue-2 --glue-filename=glue/generated.c \ + --glue-includes=$(glue_includes) \ && touch generated-stamp $(SNK): $(top_srcdir)/$(SNK) diff --git a/doc/ChangeLog b/doc/ChangeLog index a6710fbae..23e42dcf3 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -423,6 +423,53 @@ * en/GLib/ClassInitializerAttribute.xml : doc new attr. * en/Gtk/BindingAttribute.xml : doc new attr. +2004-12-22 Dan Winship + + Update for changes from automatic field generation. + + * en/Gdk/Colormap.xml (Size): New read-only property. + + * en/Gdk/Image.xml (Bpp, Bpl, Depth, ByteOrder, BitsPerPixel, + Width, Visual, Type, Height): New read-only properties + + * en/Gtk/FileSelection.xml (MainVBox): New read-only property + + * en/Gtk/FontSelectionDialog.xml (ApplyButton, CancelButton, + OkButton): New read-only properties. + + * en/Gtk/RcStyle.xml (Name, Xthickness, Ythickness, FontDesc): + New read-only properties. + + * en/Gtk/Style.xml (Xthickness, Ythickness, FontDesc): New + read-only properties. + + * en/Gtk/Toolbar.xml (NumChildren): New read-only property. + + * en/Gtk/Widget.xml (Requisition): New read-write property. + + * en/Gnome/App.xml (Contents, Statusbar): Now read-write + rather than write-only + (Name, Prefix, AccelGroup): New read-only properties. + + * en/Gnome/DateEdit.xml (InitialTime): Fixed to use DateTime + rather than ulong. + + * en/Gnome/Druid.xml (FinishButton, NextButton, HelpButton, + BackButton, CancelButton): New read-only properties. + + * en/Gnome/DruidPageEdge.xml (BgColor, Title, TextboxColor, + TextColor, LogoBgColor, Watermark, TopWatermark, TitleColor, + Logo, Text): Now read-write rather than write-only. + (Position): New read-only property. + + * en/Gnome/DruidPageStandard.xml (ContentsBackground, + TitleForeground, LogoBackground, Background): Now read-write + rather than write-only. + (VBox): New read-only property. + + * en/Gnome/FontPicker.xml (Font): Fixed to use Gdk.Font rather + than IntPtr. + 2004-12-22 Dan Winship * en/Gtk/Decorated.xml: diff --git a/doc/en/Gdk/Colormap.xml b/doc/en/Gdk/Colormap.xml index 961a4a3a0..13899ae7a 100644 --- a/doc/en/Gdk/Colormap.xml +++ b/doc/en/Gdk/Colormap.xml @@ -265,5 +265,18 @@ To be added + + + Property + + System.Int32 + + + + The size of the + The size of the + + + \ No newline at end of file diff --git a/doc/en/Gdk/Image.xml b/doc/en/Gdk/Image.xml index 792bf9bc3..015dca026 100644 --- a/doc/en/Gdk/Image.xml +++ b/doc/en/Gdk/Image.xml @@ -202,5 +202,122 @@ To be added + + + Property + + System.UInt16 + + + + The number of bytes per pixel. + a + + + + + + Property + + System.UInt16 + + + + The number of bytes per line of the image. + a + + + + + + Property + + System.UInt16 + + + + The image depth (ie, the number of bits per pixel). + a + + + + + + Property + + Gdk.ByteOrder + + + + The image byte order. + a + + + + + + Property + + System.UInt16 + + + + The number of bits per pixel. + a + + + + + + Property + + System.Int32 + + + + The width of the image in pixels. + a + + + + + + Property + + Gdk.Visual + + + + The image's . + a + + + + + + Property + + Gdk.ImageType + + + + The image's + a + + + + + + Property + + System.Int32 + + + + The height of the image in pixels. + a + + + \ No newline at end of file diff --git a/doc/en/Glade/SignalInfo.xml b/doc/en/Glade/SignalInfo.xml index 7e893f789..d3972855f 100644 --- a/doc/en/Glade/SignalInfo.xml +++ b/doc/en/Glade/SignalInfo.xml @@ -86,5 +86,18 @@ + + + Property + + System.Boolean + + + + To be added + a + To be added + + \ No newline at end of file diff --git a/doc/en/Gnome/App.xml b/doc/en/Gnome/App.xml index bf819b180..52fa18e53 100644 --- a/doc/en/Gnome/App.xml +++ b/doc/en/Gnome/App.xml @@ -612,7 +612,7 @@ - + Property Gtk.Widget @@ -620,7 +620,7 @@ - Sets the content area of the main window of . + The content area of the main window of the . an object of type an object of type @@ -628,7 +628,7 @@ - + Property Gtk.MenuBar @@ -644,7 +644,7 @@ - + Property Gtk.Widget @@ -652,7 +652,7 @@ - Sets the status bar of the application window. + The status bar of the application window. an object of type an object of type @@ -973,5 +973,47 @@ To be added + + + Property + + System.String + + + + The application name + a + + + + + + + Property + + System.String + + + + The application's install prefix + a + + + + + + + Property + + Gtk.AccelGroup + + + + The 's + a + + + + \ No newline at end of file diff --git a/doc/en/Gnome/CanvasBuf.xml b/doc/en/Gnome/CanvasBuf.xml index 40234a6da..b6fdd4e48 100644 --- a/doc/en/Gnome/CanvasBuf.xml +++ b/doc/en/Gnome/CanvasBuf.xml @@ -98,5 +98,31 @@ To be added + + + Property + + System.Boolean + + + + To be added + a + To be added + + + + + Property + + System.Boolean + + + + To be added + a + To be added + + \ No newline at end of file diff --git a/doc/en/Gnome/Druid.xml b/doc/en/Gnome/Druid.xml index 67c9a6177..1a22f2abe 100644 --- a/doc/en/Gnome/Druid.xml +++ b/doc/en/Gnome/Druid.xml @@ -370,5 +370,70 @@ The widget which ultimately holds all of the druid's pages and information. This To be added + + + Property + + Gtk.Button + + + + The druid's "Finish" button. + a + + + + + + Property + + Gtk.Button + + + + The druid's "Next" button. + a + + + + + + Property + + Gtk.Button + + + + The druid's "Help" button. + a + + + + + + Property + + Gtk.Button + + + + The druid's "Back" button. + a + + + + + + Property + + Gtk.Button + + + + The druid's "Cancel" button. + a + + + \ No newline at end of file diff --git a/doc/en/Gnome/DruidPageEdge.xml b/doc/en/Gnome/DruidPageEdge.xml index 238bb905b..363f0107b 100644 --- a/doc/en/Gnome/DruidPageEdge.xml +++ b/doc/en/Gnome/DruidPageEdge.xml @@ -130,7 +130,7 @@ - + Property Gdk.Color @@ -138,15 +138,15 @@ - This will set the background color. - an object of type - an object of type + The color of the page border. + The color. + The color. - + Property System.String @@ -154,15 +154,15 @@ - This will set the background color. - The new background color. - an object of type + The page title. + The page title. + The page title. - + Property Gdk.Color @@ -170,15 +170,15 @@ - Sets the contents of the page's title text. - The title text. - an object of type + The background color of the main text area. + The color. + The color. - + Property Gdk.Color @@ -186,15 +186,15 @@ - Sets the color of the background in the main text area of the page. - The new textbox color. - an object of type + The color of the text in the body of the page. + The color. + The color. - + Property Gdk.Color @@ -202,15 +202,15 @@ - Sets the color of the text in the body of the druid page. - The new text color. - an object of type + The background color to render the logo image against. + The color. + The color. - + Property Gdk.Pixbuf @@ -218,14 +218,14 @@ - Set the color behind the druid page's logo. - an object of type - an object of type - If , it is reset to the normal color. + The watermark image to display on the left strip on the druid. + The to use as a watermark. + The watermark, as a + If set to , then no left-side watermark will be displayed. - + Property Gdk.Pixbuf @@ -233,14 +233,14 @@ - Sets a as the watermark on the left strip on the druid. + The watermark image to display on the top strip on the druid. The to use as a watermark. - an object of type - If watermark is set to null, it is reset to the normal color. + The watermark, as a + If set to , then no top watermark will be displayed. - + Property Gdk.Color @@ -248,14 +248,15 @@ - Sets a as the watermark on top of the top strip on the druid. - The to use as a top watermark - an object of type - If the top watermark is set to null, it is reset to the normal color. + The color of the title text. + The color. + The color. + + - + Property Gdk.Pixbuf @@ -263,14 +264,14 @@ - Sets the color of the title text on the current page. - The color of the title text. - an object of type - If , then no logo will be displayed. + The logo to display in the top right corner. + The logo image. + the logo, as a + If set to , then no logo will be displayed. - + Property System.String @@ -278,10 +279,11 @@ - Sets a as the logo in the top right corner. - The to use as a logo. - an object of type - If set to null, then no logo will be displayed. + The current text of the page. + The text. + The text. + + @@ -292,9 +294,9 @@ - Sets the contents of the text portion of the druid page. + GType Property. a - To be added + Returns the native value for . @@ -322,5 +324,18 @@ To be added + + + Property + + Gnome.EdgePosition + + + + The position of the page within the druid. + a + + + \ No newline at end of file diff --git a/doc/en/Gnome/DruidPageStandard.xml b/doc/en/Gnome/DruidPageStandard.xml index fdd80d2a1..060b81a57 100644 --- a/doc/en/Gnome/DruidPageStandard.xml +++ b/doc/en/Gnome/DruidPageStandard.xml @@ -114,7 +114,7 @@ - + Property Gdk.Color @@ -192,7 +192,7 @@ - + Property Gdk.Color @@ -200,14 +200,13 @@ - Sets a as the logo in the top right corner. - The to use as a logo. + The color of the title text. + The color of the title text. an object of type - If set to null, then no logo will be displayed. - + Property Gdk.Color @@ -215,15 +214,15 @@ - Sets the title text to the specified color. - The new color of the title text. - an object of type + The background color to render the logo image against. + The color. + The color. - + Property Gdk.Color @@ -231,9 +230,9 @@ - Set the color behind the druid page's logo. - The new color for the logo background. - an object of type + The color of the page border. + The color. + The color. @@ -247,9 +246,9 @@ - Sets the background color of the top section of the druid page. - The new background color. - an object of type + The page title. + The page title. + The page title. @@ -342,5 +341,18 @@ Chain to this constructor if you have manually registered a native value for your subclass. + + + Property + + Gtk.VBox + + + + The page's + The page's + + + \ No newline at end of file diff --git a/doc/en/Gnome/PrintPaper.xml b/doc/en/Gnome/PrintPaper.xml index baa6672be..462388dc0 100644 --- a/doc/en/Gnome/PrintPaper.xml +++ b/doc/en/Gnome/PrintPaper.xml @@ -144,15 +144,15 @@ - - Field + + Property System.UInt32 - - + To be added + a To be added diff --git a/doc/en/Gnome/PrintUnit.xml b/doc/en/Gnome/PrintUnit.xml index 8fe4536e1..e1420e2fe 100644 --- a/doc/en/Gnome/PrintUnit.xml +++ b/doc/en/Gnome/PrintUnit.xml @@ -174,28 +174,28 @@ - - Field + + Property System.UInt32 - - + To be added + a To be added - - Field + + Property System.UInt32 - - + To be added + a To be added diff --git a/doc/en/Gtk/AccelKey.xml b/doc/en/Gtk/AccelKey.xml index 20cc29f17..ca4eccc25 100644 --- a/doc/en/Gtk/AccelKey.xml +++ b/doc/en/Gtk/AccelKey.xml @@ -61,15 +61,15 @@ - - Field + + Property Gtk.AccelFlags - - + The flags for this AccelKey that determine whether will display it. + a diff --git a/doc/en/Gtk/FileSelection.xml b/doc/en/Gtk/FileSelection.xml index e758c774a..05caf1432 100644 --- a/doc/en/Gtk/FileSelection.xml +++ b/doc/en/Gtk/FileSelection.xml @@ -397,6 +397,20 @@ class FileSelectionSample + + + Property + + Gtk.VBox + + + + The main in the file selector. + a + + + + Property diff --git a/doc/en/Gtk/FontSelectionDialog.xml b/doc/en/Gtk/FontSelectionDialog.xml index 89555a83c..db4846fea 100644 --- a/doc/en/Gtk/FontSelectionDialog.xml +++ b/doc/en/Gtk/FontSelectionDialog.xml @@ -165,5 +165,47 @@ + + + Property + + Gtk.Widget + + + + The dialog's "Apply" button. + a + + + + + + + Property + + Gtk.Widget + + + + The dialog's "Cancel" button. + a + + + + + + + Property + + Gtk.Widget + + + + The dialog's "OK" button. + a + + + + \ No newline at end of file diff --git a/doc/en/Gtk/RcStyle.xml b/doc/en/Gtk/RcStyle.xml index 5c0ac37ad..12c4f25f1 100644 --- a/doc/en/Gtk/RcStyle.xml +++ b/doc/en/Gtk/RcStyle.xml @@ -105,5 +105,57 @@ Chain to this constructor if you have manually registered a native value for your subclass. + + + Property + + System.String + + + + The name of the RC style. + a + + + + + + Property + + System.Int32 + + + + The "xthickness" value of the RC style. + a + This value is used for various horizontal padding values in Gtk. + + + + + Property + + System.Int32 + + + + The "ythickness" value of the RC style. + a + This value is used for various vertical padding values in Gtk. + + + + + Property + + Pango.FontDescription + + + + The value parsed from the RC style's "font_name" property. + a + + + \ No newline at end of file diff --git a/doc/en/Gtk/Style.xml b/doc/en/Gtk/Style.xml index b15ebaffa..a1d330db5 100644 --- a/doc/en/Gtk/Style.xml +++ b/doc/en/Gtk/Style.xml @@ -1525,6 +1525,45 @@ color or pixmap specified by this style for . + + + Property + + System.Int32 + + + + The "xthickness" value of the style. + a + This value is used for various horizontal padding values in Gtk. + + + + + Property + + System.Int32 + + + + The "ythickness" value of the style. + a + This value is used for various vertical padding values in Gtk. + + + + + Property + + Pango.FontDescription + + + + The value for the style. + a + + + Property diff --git a/doc/en/Gtk/TextAppearance.xml b/doc/en/Gtk/TextAppearance.xml index f857b6a22..6a7bce1d0 100644 --- a/doc/en/Gtk/TextAppearance.xml +++ b/doc/en/Gtk/TextAppearance.xml @@ -117,16 +117,29 @@ - - Field + + Property - System.UInt32 + Pango.Underline Style of underlining for this text. - See for possible values. + + + + + + Property + + System.Boolean + + + + Whether or not the text should be struck-through. + a + diff --git a/doc/en/Gtk/TextAttributes.xml b/doc/en/Gtk/TextAttributes.xml index 2d910aa65..44411b864 100644 --- a/doc/en/Gtk/TextAttributes.xml +++ b/doc/en/Gtk/TextAttributes.xml @@ -313,5 +313,57 @@ + + + Property + + System.Boolean + + + + Whether or not the text should be hidden. + a + + + + + + Property + + System.Boolean + + + + Whether background is fit to full line height + a + + + + + + Property + + System.Boolean + + + + Whether or not the text is editable. + a + + + + + + Property + + System.Boolean + + + + Whether or not the attribute is fully-realized. + a + + + \ No newline at end of file diff --git a/doc/en/Gtk/Toolbar.xml b/doc/en/Gtk/Toolbar.xml index f56d83887..e97db88c4 100644 --- a/doc/en/Gtk/Toolbar.xml +++ b/doc/en/Gtk/Toolbar.xml @@ -758,6 +758,19 @@ If type == , widget is used as the n You can cast the returned object to to access its child properties. + + + Property + + System.Int32 + + + + The number of items in the toolbar. + The number of itesm. + + + Method diff --git a/doc/en/Gtk/TreeStore.xml b/doc/en/Gtk/TreeStore.xml index 5b372c321..dc05429b2 100644 --- a/doc/en/Gtk/TreeStore.xml +++ b/doc/en/Gtk/TreeStore.xml @@ -1797,5 +1797,21 @@ store = new TreeStore (typeof (int), typeof (string)); This method is meant to be used together with + + + Method + + GLib.GType + + + + + + To be added + a + 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 0cfdec3fd..c6d5a14e9 100644 --- a/doc/en/Gtk/Widget.xml +++ b/doc/en/Gtk/Widget.xml @@ -3790,6 +3790,18 @@ Widgets are required to honor the size allocation they receive; a size request i None. + + + Property + + Gtk.Requisition + + + + Gets or Sets the widget's requisition + a representing the widget's requisition + + Property diff --git a/doc/en/Pango/GlyphVisAttr.xml b/doc/en/Pango/GlyphVisAttr.xml index 0e8c99e60..ad2f68422 100644 --- a/doc/en/Pango/GlyphVisAttr.xml +++ b/doc/en/Pango/GlyphVisAttr.xml @@ -47,5 +47,18 @@ This is an internal method, and should not be used by user code. + + + Property + + System.Boolean + + + + To be added + a + To be added + + \ No newline at end of file diff --git a/doc/en/Pango/LogAttr.xml b/doc/en/Pango/LogAttr.xml index b707bd2f6..a09a3c4f3 100644 --- a/doc/en/Pango/LogAttr.xml +++ b/doc/en/Pango/LogAttr.xml @@ -47,5 +47,189 @@ This is an internal method, and should not be used by user code. + + + Property + + System.Boolean + + + + Whether or not a line break is allowed before this character. + a + + + + + + Property + + System.Boolean + + + + Whether or not a line break is required before this character. + a + + + + + + Property + + System.Boolean + + + + Whether or not a break is allowed before this character when doing character wrap. + a + + + + + + Property + + System.Boolean + + + + Whether or not this is a whitespace character. + a + + + + + + Property + + System.Boolean + + + + Whether or not the cursor can appear in front of this character. + a + + + + + + Property + + System.Boolean + + + + Whether or not this is the first character in a word. + a + + Note that in degenerate cases, you could have both this + propery and set + on the same character, most likely for sentences (e.g. no + space after a period, so the next sentence starts right + away) + + + + + + Property + + System.Boolean + + + + Whether or not this is the first non-word character after a word. + a + + Note that in degenerate cases, you could have both this + propery and set + on the same character, most likely for sentences (e.g. no + space after a period, so the next sentence starts right + away) + + + + + + Property + + System.Boolean + + + + Whether or not this character is a sentence boundary. + a + + There are two ways to divide sentences. The first assigns + all intersentence whitespace/control/format chars to some + sentence, so all characters are in some sentence; denotes the + boundaries in this case. See and for the other + method. + + + + + + Property + + System.Boolean + + + + Whether or not this is the first character in a sentence. + a + + There are two ways to divide sentences. The first is the + method used by (qv). The + second way is to consider intersentence characters to not + be part of any sentence, in which case identifies the + first character in a sentence and identifies the + first non-sentence character after a sentence. + + + + + + Property + + System.Boolean + + + + Whether or not this is the first non-sentence character after a sentence. + a + + There are two ways to divide sentences. The first is the + method used by (qv). The + second way is to consider intersentence characters to not + be part of any sentence, in which case identifies the + first character in a sentence and identifies the + first non-sentence character after a sentence. + + + + + + Property + + System.Boolean + + + + Whether Backspace deletes individual characters rather than complete grapheme clusters. + a + + + \ No newline at end of file diff --git a/doc/en/Vte/CharAttributes.xml b/doc/en/Vte/CharAttributes.xml index 260c919c8..6ff2fa51f 100644 --- a/doc/en/Vte/CharAttributes.xml +++ b/doc/en/Vte/CharAttributes.xml @@ -100,5 +100,31 @@ To be added + + + Property + + System.Boolean + + + + To be added + a + To be added + + + + + Property + + System.Boolean + + + + To be added + a + To be added + + - + \ No newline at end of file diff --git a/gdk/Device.custom b/gdk/Device.custom index 886f0f0d8..486910e15 100644 --- a/gdk/Device.custom +++ b/gdk/Device.custom @@ -19,77 +19,16 @@ // Boston, MA 02111-1307, USA. - [DllImport("gdksharpglue-2")] - static extern IntPtr gtksharp_gdk_device_get_name (IntPtr device); - - [DllImport("gdksharpglue-2")] - static extern InputSource gtksharp_gdk_device_get_source (IntPtr device); - - [DllImport("gdksharpglue-2")] - static extern InputMode gtksharp_gdk_device_get_mode (IntPtr device); - - [DllImport("gdksharpglue-2")] - static extern bool gtksharp_gdk_device_has_cursor (IntPtr device); - - [DllImport("gdksharpglue-2")] - static extern int gtksharp_gdk_device_get_num_axes (IntPtr device); - - [DllImport("gdksharpglue-2")] - static extern int gtksharp_gdk_device_get_num_keys (IntPtr device); - [DllImport("gdksharpglue-2")] static extern DeviceAxis gtksharp_gdk_device_get_device_axis (IntPtr device, uint axis); [DllImport("gdksharpglue-2")] static extern DeviceKey gtksharp_gdk_device_get_device_key (IntPtr device, uint axis); - [DllImport("libgdk-win32-2.0-0.dll")] - static extern void gdk_device_set_source(IntPtr device, int source); - [DllImport("libgdk-win32-2.0-0.dll")] static extern void gdk_device_get_state(IntPtr device, IntPtr window, double [] axes, out int maskAsInt); - public string Name { - get { - IntPtr rawName = gtksharp_gdk_device_get_name (Handle); - return GLib.Marshaller.Utf8PtrToString (rawName); - } - } - - public Gdk.InputSource Source { - get { - return gtksharp_gdk_device_get_source (Handle); - } - set { - gdk_device_set_source(Handle, (int) value); - } - } - - public Gdk.InputMode Mode { - get { - return gtksharp_gdk_device_get_mode (Handle); - } - } - - public bool HasCursor { - get { - return gtksharp_gdk_device_has_cursor (Handle); - } - } - - public int NumAxes { - get { - return gtksharp_gdk_device_get_num_axes (Handle); - } - } - - public int NumKeys { - get { - return gtksharp_gdk_device_get_num_keys (Handle); - } - } - public void GetState(Gdk.Window window, out double [] axes, out Gdk.ModifierType mask) { int maskAsInt; axes = new double [this.NumAxes]; diff --git a/gdk/DragContext.custom b/gdk/DragContext.custom index f634fa836..42a33abdb 100644 --- a/gdk/DragContext.custom +++ b/gdk/DragContext.custom @@ -20,46 +20,6 @@ // Boston, MA 02111-1307, USA. -[DllImport("gdksharpglue-2")] -static extern DragProtocol gtksharp_drag_context_get_protocol (IntPtr ptr); - -public unsafe DragProtocol DragProtocol { - get { - return gtksharp_drag_context_get_protocol (this.Handle); - } -} - - -[DllImport("gdksharpglue-2")] -static extern bool gtksharp_drag_context_get_is_source (IntPtr ptr); - -public bool IsSource { - get { - return gtksharp_drag_context_get_is_source (this.Handle); - } -} - - -[DllImport("gdksharpglue-2")] -static extern IntPtr gtksharp_drag_context_get_source_window (IntPtr ptr); - -public Gdk.Window SourceWindow { - get { - return GLib.Object.GetObject (gtksharp_drag_context_get_source_window (this.Handle), false) as Gdk.Window; - } -} - - -[DllImport("gdksharpglue-2")] -static extern IntPtr gtksharp_drag_context_get_dest_window (IntPtr ptr); - -public Gdk.Window DestWindow { - get { - return GLib.Object.GetObject (gtksharp_drag_context_get_dest_window (this.Handle), false) as Gdk.Window; - } -} - - [DllImport("gdksharpglue-2")] static extern IntPtr gtksharp_drag_context_get_targets (IntPtr ptr); @@ -76,43 +36,3 @@ public Atom [] Targets { return entries; } } - - -[DllImport("gdksharpglue-2")] -static extern DragAction gtksharp_drag_context_get_actions (IntPtr ptr); - -public DragAction Actions { - get { - return gtksharp_drag_context_get_actions (this.Handle); - } -} - -[DllImport("gdksharpglue-2")] -static extern DragAction gtksharp_drag_context_get_suggested_action (IntPtr ptr); - -public DragAction SuggestedAction { - get { - return gtksharp_drag_context_get_suggested_action (this.Handle); - } -} - - -[DllImport("gdksharpglue-2")] -static extern DragAction gtksharp_drag_context_get_action (IntPtr ptr); - -public DragAction Action { - get { - return gtksharp_drag_context_get_action (this.Handle); - } -} - - -[DllImport("gdksharpglue-2")] -static extern uint gtksharp_drag_context_get_start_time (IntPtr ptr); - -public uint StartTime { - get { - return gtksharp_drag_context_get_start_time (this.Handle); - } -} - diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata index 1c5eae5b8..1c94d02df 100644 --- a/gdk/Gdk.metadata +++ b/gdk/Gdk.metadata @@ -42,20 +42,28 @@ 1 CreateBitmapFromData /api/namespace/object[@cname='GdkPixmap'] + 1 ref 1 1 ref 1 + public + public + public + public + public + public 1 1 1 1 - 1 1 1 1 1 + DragProtocol + 1 1 1 1 @@ -66,6 +74,8 @@ 1 out gpointer + private + private 1 1 1 diff --git a/gdk/Makefile.am b/gdk/Makefile.am index 1363c2125..047e84727 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -5,6 +5,7 @@ SYMBOLS = gdk-symbols.xml INCLUDE_API = ../pango/pango-api.xml METADATA = Gdk.metadata references = ../glib/glib-sharp.dll ../pango/pango-sharp.dll +glue_includes = gdk/gdk.h sources = \ EventButton.cs \ diff --git a/gdk/glue/Makefile.am b/gdk/glue/Makefile.am index 48965019a..69490f583 100644 --- a/gdk/glue/Makefile.am +++ b/gdk/glue/Makefile.am @@ -8,6 +8,8 @@ libgdksharpglue_2_la_SOURCES = \ vmglueheaders.h \ windowmanager.c +nodist_libgdksharpglue_2_la_SOURCES = generated.c + # Adding a new glue file? # Please remember to update makefile.win32 diff --git a/gdk/glue/device.c b/gdk/glue/device.c index 82b362e1d..b3de6635c 100644 --- a/gdk/glue/device.c +++ b/gdk/glue/device.c @@ -23,54 +23,8 @@ #include /* Forward declarations */ -gchar* gtksharp_gdk_device_get_name (GdkDevice *device); -GdkInputSource gtksharp_gdk_device_get_source (GdkDevice *device); -GdkInputMode gtksharp_gdk_device_get_mode (GdkDevice *device); -gboolean gtksharp_gdk_device_has_cursor (GdkDevice *device); -gint gtksharp_gdk_device_get_num_axes (GdkDevice *device); -gint gtksharp_gdk_device_get_num_keys (GdkDevice *device); -GdkDeviceAxis* gtksharp_gdk_device_get_axes (GdkDevice *device); -GdkDeviceKey* gtksharp_gdk_device_get_keys (GdkDevice *device); GdkDeviceAxis gtksharp_gdk_device_get_device_axis (GdkDevice *device, guint i); GdkDeviceKey gtksharp_gdk_device_get_device_key (GdkDevice *device, guint i); -/* */ - - -gchar* -gtksharp_gdk_device_get_name (GdkDevice *device) -{ - return device->name; -} - -GdkInputSource -gtksharp_gdk_device_get_source (GdkDevice *device) -{ - return device->source; -} - -GdkInputMode -gtksharp_gdk_device_get_mode (GdkDevice *device) -{ - return device->mode; -} - -gboolean -gtksharp_gdk_device_has_cursor (GdkDevice *device) -{ - return device->has_cursor; -} - -gint -gtksharp_gdk_device_get_num_axes (GdkDevice *device) -{ - return device->num_axes; -} - -gint -gtksharp_gdk_device_get_num_keys (GdkDevice *device) -{ - return device->num_keys; -} GdkDeviceAxis gtksharp_gdk_device_get_device_axis (GdkDevice *device, guint i) diff --git a/gdk/glue/dragcontext.c b/gdk/glue/dragcontext.c index a47407a62..a6b8dc02a 100644 --- a/gdk/glue/dragcontext.c +++ b/gdk/glue/dragcontext.c @@ -21,42 +21,6 @@ #include -GdkDragProtocol gtksharp_drag_context_get_protocol (GdkDragContext *context); - -GdkDragProtocol -gtksharp_drag_context_get_protocol (GdkDragContext *context) -{ - return context->protocol; -} - - -gboolean gtksharp_drag_context_get_is_source (GdkDragContext *context); - -gboolean -gtksharp_drag_context_get_is_source (GdkDragContext *context) -{ - return context->is_source; -} - - -GdkWindow *gtksharp_drag_context_get_source_window (GdkDragContext *context); - -GdkWindow * -gtksharp_drag_context_get_source_window (GdkDragContext *context) -{ - return context->source_window; -} - - -GdkWindow *gtksharp_drag_context_get_dest_window (GdkDragContext *context); - -GdkWindow * -gtksharp_drag_context_get_dest_window (GdkDragContext *context) -{ - return context->dest_window; -} - - GList *gtksharp_drag_context_get_targets (GdkDragContext *context); GList * @@ -64,39 +28,3 @@ gtksharp_drag_context_get_targets (GdkDragContext *context) { return context->targets; } - - -GdkDragAction gtksharp_drag_context_get_actions (GdkDragContext *context); - -GdkDragAction -gtksharp_drag_context_get_actions (GdkDragContext *context) -{ - return context->actions; -} - - -GdkDragAction gtksharp_drag_context_get_suggested_action (GdkDragContext *context); - -GdkDragAction -gtksharp_drag_context_get_suggested_action (GdkDragContext *context) -{ - return context->suggested_action; -} - - -GdkDragAction gtksharp_drag_context_get_action (GdkDragContext *context); - -GdkDragAction -gtksharp_drag_context_get_action (GdkDragContext *context) -{ - return context->action; -} - - -guint32 gtksharp_drag_context_get_start_time (GdkDragContext *context); - -guint32 -gtksharp_drag_context_get_start_time (GdkDragContext *context) -{ - return context->start_time; -} diff --git a/gdk/glue/makefile.win32 b/gdk/glue/makefile.win32 index da81223a5..a0ba44714 100755 --- a/gdk/glue/makefile.win32 +++ b/gdk/glue/makefile.win32 @@ -7,6 +7,7 @@ GLUE_OBJS = \ dragcontext.o \ device.o \ event.o \ + generated.o \ selection.o \ win32dll.o diff --git a/generator/ClassBase.cs b/generator/ClassBase.cs index 9ae2edb9e..6b97dfed0 100644 --- a/generator/ClassBase.cs +++ b/generator/ClassBase.cs @@ -31,6 +31,7 @@ namespace GtkSharp.Generation { public abstract class ClassBase : GenBase { protected Hashtable props = new Hashtable(); + protected Hashtable fields = new Hashtable(); protected Hashtable sigs = new Hashtable(); protected Hashtable methods = new Hashtable(); protected ArrayList interfaces = new ArrayList(); @@ -94,6 +95,13 @@ namespace GtkSharp.Generation { props.Add (name, new Property (member, this)); break; + case "field": + name = member.GetAttribute("name"); + while (fields.ContainsKey (name)) + name += "mangled"; + fields.Add (name, new ObjectField (member, this)); + break; + case "signal": name = member.GetAttribute("name"); while (sigs.ContainsKey(name)) @@ -132,6 +140,7 @@ namespace GtkSharp.Generation { switch (name) { case "method": case "property": + case "field": case "signal": case "implements": case "constructor": @@ -194,6 +203,16 @@ namespace GtkSharp.Generation { } } + protected void GenFields (GenerationInfo gen_info) + { + foreach (ObjectField field in fields.Values) { + if (field.Validate ()) + field.Generate (gen_info, "\t\t"); + else + Console.WriteLine("in Object " + QualifiedName); + } + } + private void ParseImplements (XmlElement member) { foreach (XmlNode node in member.ChildNodes) { @@ -211,7 +230,8 @@ namespace GtkSharp.Generation { { string mname = method.Name; return ((method.IsSetter || (method.IsGetter && mname.StartsWith("Get"))) && - (props != null) && props.ContainsKey(mname.Substring(3))); + ((props != null) && props.ContainsKey(mname.Substring(3)) || + (fields != null) && fields.ContainsKey(mname.Substring(3)))); } public void GenMethods (GenerationInfo gen_info, Hashtable collisions, ClassBase implementor) diff --git a/generator/CodeGenerator.cs b/generator/CodeGenerator.cs index 44ccd5314..10d18ddbd 100644 --- a/generator/CodeGenerator.cs +++ b/generator/CodeGenerator.cs @@ -40,6 +40,7 @@ namespace GtkSharp.Generation { string custom_dir = ""; string assembly_name = ""; string glue_filename = ""; + string glue_includes = ""; string gluelib_name = ""; SymbolTable table = SymbolTable.Table; @@ -71,6 +72,10 @@ namespace GtkSharp.Generation { generate = false; glue_filename = arg.Substring (16); continue; + } else if (arg.StartsWith ("--glue-includes=")) { + generate = false; + glue_includes = arg.Substring (16); + continue; } else if (arg.StartsWith ("--gluelib-name=")) { generate = false; gluelib_name = arg.Substring (15); @@ -85,8 +90,8 @@ namespace GtkSharp.Generation { } GenerationInfo gen_info = null; - if (dir != "" || assembly_name != "" || glue_filename != "" || gluelib_name != "") - gen_info = new GenerationInfo (dir, custom_dir, assembly_name, glue_filename, gluelib_name); + if (dir != "" || assembly_name != "" || glue_filename != "" || glue_includes != "" || gluelib_name != "") + gen_info = new GenerationInfo (dir, custom_dir, assembly_name, glue_filename, glue_includes, gluelib_name); foreach (IGeneratable gen in gens) { if (gen_info == null) diff --git a/generator/FieldBase.cs b/generator/FieldBase.cs index e324bf201..29c14f244 100644 --- a/generator/FieldBase.cs +++ b/generator/FieldBase.cs @@ -28,6 +28,17 @@ namespace GtkSharp.Generation { public abstract class FieldBase : PropertyBase { public FieldBase (XmlElement elem, ClassBase container_type) : base (elem, container_type) {} + public bool Validate () + { + if (!Ignored && !Hidden && CSType == "") { + Console.Write("Field {0} has unknown Type {1} ", Name, CType); + Statistics.ThrottledCount++; + return false; + } + + return true; + } + protected virtual bool Readable { get { return elem.GetAttribute ("readable") != "false"; @@ -62,7 +73,191 @@ namespace GtkSharp.Generation { public bool Ignored { get { - return IsArray || Access == "private"; + if (container_type.GetProperty (Name) != null) + return true; + if (IsArray) + return true; + if (Access == "private" && (Getter == null) && (Setter == null)) + return true; + return false; + } + } + + string getterName, setterName; + string getOffsetName, offsetName; + + void CheckGlue () + { + getterName = setterName = getOffsetName = null; + if (Access != "public") + return; + + string prefix = (container_type.NS + "Sharp_" + container_type.NS + "_" + container_type.Name).ToLower (); + + if (IsBitfield) { + if (Readable && Getter == null) + getterName = prefix + "_get_" + CName; + if (Writable && Setter == null) + setterName = prefix + "_set_" + CName; + } else { + if ((Readable && Getter == null) || (Writable && Setter == null)) { + offsetName = CName + "_offset"; + getOffsetName = prefix + "_get_" + offsetName; + } + } + } + + protected override void GenerateImports (GenerationInfo gen_info, string indent) + { + StreamWriter sw = gen_info.Writer; + SymbolTable table = SymbolTable.Table; + + if (getterName != null) { + sw.WriteLine (indent + "[DllImport (\"{0}\")]", gen_info.GluelibName); + sw.WriteLine (indent + "extern static {0} {1} ({2} raw);", + table.GetMarshalReturnType (CType), getterName, + container_type.MarshalType); + } + + if (setterName != null) { + sw.WriteLine (indent + "[DllImport (\"{0}\")]", gen_info.GluelibName); + sw.WriteLine (indent + "extern static void {0} ({1} raw, {2} value);", + setterName, container_type.MarshalType, table.GetMarshalType (CType)); + } + + if (getOffsetName != null) { + sw.WriteLine (indent + "[DllImport (\"{0}\")]", gen_info.GluelibName); + sw.WriteLine (indent + "extern static uint {0} ();", getOffsetName); + sw.WriteLine (); + sw.WriteLine (indent + "static uint " + offsetName + " = " + getOffsetName + " ();"); + } + + base.GenerateImports (gen_info, indent); + } + + public override void Generate (GenerationInfo gen_info, string indent) + { + if (Ignored || Hidden) + return; + + CheckGlue (); + if ((getterName != null || setterName != null || getOffsetName != null) && + gen_info.GlueWriter == null) { + Console.WriteLine ("No glue-filename specified, can't create glue for {0}.{1}", + container_type.Name, Name); + return; + } + + GenerateImports (gen_info, indent); + + SymbolTable table = SymbolTable.Table; + StreamWriter sw = gen_info.Writer; + string modifiers = elem.HasAttribute ("new_flag") ? "new " : ""; + bool is_struct = table.IsStruct (CType) || table.IsBoxed (CType); + + sw.WriteLine (indent + "public " + modifiers + CSType + " " + Name + " {"); + + if (Getter != null) { + sw.Write (indent + "\tget "); + Getter.GenerateBody (gen_info, "\t"); + sw.WriteLine (""); + } else if (getterName != null) { + sw.WriteLine (indent + "\tget {"); + sw.WriteLine (indent + "\t\treturn " + table.FromNativeReturn (ctype, getterName + " (" + container_type.CallByName () + ")") + ";"); + sw.WriteLine (indent + "\t}"); + } else if (Readable && offsetName != null) { + sw.WriteLine (indent + "\tget {"); + sw.WriteLine (indent + "\t\tunsafe {"); + if (is_struct) { + sw.WriteLine (indent + "\t\t\t" + CSType + "* raw_ptr = (" + CSType + "*)(((byte*)" + container_type.CallByName () + ") + " + offsetName + ");"); + sw.WriteLine (indent + "\t\t\treturn *raw_ptr;"); + } else { + sw.WriteLine (indent + "\t\t\t" + table.GetMarshalReturnType (CType) + "* raw_ptr = (" + table.GetMarshalReturnType (CType) + "*)(((byte*)" + container_type.CallByName () + ") + " + offsetName + ");"); + sw.WriteLine (indent + "\t\t\treturn " + table.FromNativeReturn (ctype, "(*raw_ptr)") + ";"); + } + sw.WriteLine (indent + "\t\t}"); + sw.WriteLine (indent + "\t}"); + } + + if (Setter != null) { + sw.Write (indent + "\tset "); + Setter.GenerateBody (gen_info, "\t"); + sw.WriteLine (""); + } else if (setterName != null) { + sw.WriteLine (indent + "\tset {"); + sw.WriteLine (indent + "\t\t" + setterName + " (" + container_type.CallByName () + ", " + table.CallByName (ctype, "value") + ");"); + sw.WriteLine (indent + "\t}"); + } else if (Writable && offsetName != null) { + sw.WriteLine (indent + "\tset {"); + sw.WriteLine (indent + "\t\tunsafe {"); + if (is_struct) { + sw.WriteLine (indent + "\t\t\t" + CSType + "* raw_ptr = (" + CSType + "*)(((byte*)" + container_type.CallByName () + ") + " + offsetName + ");"); + sw.WriteLine (indent + "\t\t\t*raw_ptr = value;"); + } else { + sw.WriteLine (indent + "\t\t\t" + table.GetMarshalReturnType (CType) + "* raw_ptr = (" + table.GetMarshalReturnType (CType) + "*)(((byte*)" + container_type.CallByName () + ") + " + offsetName + ");"); + sw.WriteLine (indent + "\t\t\t*raw_ptr = " + table.CallByName (ctype, "value") + ";"); + } + sw.WriteLine (indent + "\t\t}"); + sw.WriteLine (indent + "\t}"); + } + + sw.WriteLine (indent + "}"); + sw.WriteLine (""); + + if (getterName != null || setterName != null || getOffsetName != null) + GenerateGlue (gen_info); + } + + protected void GenerateGlue (GenerationInfo gen_info) + { + StreamWriter sw = gen_info.GlueWriter; + SymbolTable table = SymbolTable.Table; + + string FieldCType = CType.Replace ("-", " "); + bool byref = table[CType] is ByRefGen || table[CType] is StructGen; + string GlueCType = byref ? FieldCType + " *" : FieldCType; + string ContainerCType = container_type.CName; + string ContainerCName = container_type.Name.ToLower (); + + if (getterName != null) { + sw.WriteLine ("{0} {1} ({2} *{3});", + GlueCType, getterName, ContainerCType, ContainerCName); + } + if (setterName != null) { + sw.WriteLine ("void {0} ({1} *{2}, {3} value);", + setterName, ContainerCType, ContainerCName, GlueCType); + } + if (getOffsetName != null) + sw.WriteLine ("guint {0} (void);", getOffsetName); + sw.WriteLine (""); + + if (getterName != null) { + sw.WriteLine (GlueCType); + sw.WriteLine ("{0} ({1} *{2})", getterName, ContainerCType, ContainerCName); + sw.WriteLine ("{"); + sw.WriteLine ("\treturn ({0}){1}{2}->{3};", GlueCType, + byref ? "&" : "", ContainerCName, CName); + sw.WriteLine ("}"); + sw.WriteLine (""); + } + if (setterName != null) { + sw.WriteLine ("void"); + sw.WriteLine ("{0} ({1} *{2}, {3} value)", + setterName, ContainerCType, ContainerCName, GlueCType); + sw.WriteLine ("{"); + sw.WriteLine ("\t{0}->{1} = ({2}){3}value;", ContainerCName, CName, + FieldCType, byref ? "*" : ""); + sw.WriteLine ("}"); + sw.WriteLine (""); + } + if (getOffsetName != null) { + sw.WriteLine ("guint"); + sw.WriteLine ("{0} (void)", getOffsetName); + sw.WriteLine ("{"); + sw.WriteLine ("\treturn (guint)G_STRUCT_OFFSET ({0}, {1});", + ContainerCType, CName); + sw.WriteLine ("}"); + sw.WriteLine (""); } } } diff --git a/generator/GenerationInfo.cs b/generator/GenerationInfo.cs index 626c722ff..ab9f6ecaf 100644 --- a/generator/GenerationInfo.cs +++ b/generator/GenerationInfo.cs @@ -32,6 +32,7 @@ namespace GtkSharp.Generation { string custom_dir; string assembly_name; string glue_filename; + string glue_includes; string gluelib_name; StreamWriter sw; @@ -44,16 +45,18 @@ namespace GtkSharp.Generation { assembly_name = ns_name.ToLower () + "-sharp"; gluelib_name = ""; glue_filename = ""; + glue_includes = ""; } - public GenerationInfo (string dir, string assembly_name) : this (dir, dir, assembly_name, "", "") {} + public GenerationInfo (string dir, string assembly_name) : this (dir, dir, assembly_name, "", "", "") {} - public GenerationInfo (string dir, string custom_dir, string assembly_name, string glue_filename, string gluelib_name) + public GenerationInfo (string dir, string custom_dir, string assembly_name, string glue_filename, string glue_includes, string gluelib_name) { this.dir = dir; this.custom_dir = custom_dir; this.assembly_name = assembly_name; this.glue_filename = glue_filename; + this.glue_includes = glue_includes; this.gluelib_name = gluelib_name; } @@ -106,6 +109,14 @@ namespace GtkSharp.Generation { glue_sw.WriteLine ("// This file was generated by the Gtk# code generator."); glue_sw.WriteLine ("// Any changes made will be lost if regenerated."); glue_sw.WriteLine (); + + if (glue_includes != "") { + foreach (string header in glue_includes.Split (new char[] {',', ' '})) { + if (header != "") + glue_sw.WriteLine ("#include <{0}>", header); + } + glue_sw.WriteLine (""); + } } return glue_sw; diff --git a/generator/Makefile.am b/generator/Makefile.am index 3e49cc737..8120e34c3 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -33,6 +33,7 @@ sources = \ MethodBase.cs \ MethodBody.cs \ Method.cs \ + ObjectField.cs \ ObjectGen.cs \ OpaqueGen.cs \ Parameters.cs \ diff --git a/generator/ObjectField.cs b/generator/ObjectField.cs new file mode 100644 index 000000000..47e015623 --- /dev/null +++ b/generator/ObjectField.cs @@ -0,0 +1,48 @@ +// GtkSharp.Generation.ObjectField.cs - autogenerated field glue +// +// Copyright (c) 2004 Novell, Inc. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the GNU General Public +// License as published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + + +namespace GtkSharp.Generation { + + using System; + using System.Collections; + using System.IO; + using System.Xml; + + public class ObjectField : FieldBase { + + public ObjectField (XmlElement elem, ClassBase container_type) : base (elem, container_type) + { + if (CType == "char*" || CType == "gchar*") + ctype = "const-" + CType; + } + + protected override bool Writable { + get { + return elem.GetAttribute ("writeable") == "true"; + } + } + + protected override string DefaultAccess { + get { + return "private"; + } + } + } +} + diff --git a/generator/ObjectGen.cs b/generator/ObjectGen.cs index 7cb273ff5..c8b51f9cb 100644 --- a/generator/ObjectGen.cs +++ b/generator/ObjectGen.cs @@ -44,7 +44,6 @@ namespace GtkSharp.Generation { XmlElement member = (XmlElement) node; switch (node.Name) { - case "field": case "callback": Statistics.IgnoreCount++; break; @@ -156,6 +155,7 @@ namespace GtkSharp.Generation { GenCtors (gen_info); GenProperties (gen_info); + GenFields (gen_info); GenChildProperties (gen_info); bool has_sigs = (sigs != null && sigs.Count > 0); diff --git a/generator/OpaqueGen.cs b/generator/OpaqueGen.cs index 336c99644..fb8e19e56 100644 --- a/generator/OpaqueGen.cs +++ b/generator/OpaqueGen.cs @@ -67,6 +67,7 @@ namespace GtkSharp.Generation { sw.WriteLine (" {"); sw.WriteLine (); + GenFields (gen_info); GenMethods (gen_info, null, null); GenCtors (gen_info); sw.WriteLine ("#endregion"); diff --git a/generator/PropertyBase.cs b/generator/PropertyBase.cs index bbdff99f6..15c5ff2df 100644 --- a/generator/PropertyBase.cs +++ b/generator/PropertyBase.cs @@ -49,8 +49,12 @@ namespace GtkSharp.Generation { protected string ctype; public string CType { get { - if (ctype == null) - ctype = elem.GetAttribute ("type"); + if (ctype == null) { + if (elem.GetAttribute("bits") == "1") + ctype = "gboolean"; + else + ctype = elem.GetAttribute("type"); + } return ctype; } } diff --git a/generator/StructBase.cs b/generator/StructBase.cs index e150c6a40..a3b082d2b 100644 --- a/generator/StructBase.cs +++ b/generator/StructBase.cs @@ -29,7 +29,7 @@ namespace GtkSharp.Generation { public abstract class StructBase : ClassBase { - ArrayList fields = new ArrayList (); + new ArrayList fields = new ArrayList (); protected StructBase (XmlElement ns, XmlElement elem) : base (ns, elem) { @@ -112,16 +112,19 @@ namespace GtkSharp.Generation { } } - protected void GenFields (GenerationInfo gen_info) + protected new void GenFields (GenerationInfo gen_info) { - StructField.bitfields = 0; + int bitfields = 0; bool need_field = true; + foreach (StructField field in fields) { - if (field.IsBit) { - if (need_field) + if (field.IsBitfield) { + if (need_field) { + StreamWriter sw = gen_info.Writer; + + sw.WriteLine ("\t\tprivate uint _bitfield{0};\n", bitfields++); need_field = false; - else - continue; + } } else need_field = true; field.Generate (gen_info, "\t\t"); @@ -133,7 +136,8 @@ namespace GtkSharp.Generation { foreach (StructField field in fields) { if (!field.Validate ()) { Console.WriteLine ("in Struct " + QualifiedName); - return false; + if (!field.IsPointer) + return false; } } diff --git a/generator/StructField.cs b/generator/StructField.cs index 988af12e3..b84bf897e 100644 --- a/generator/StructField.cs +++ b/generator/StructField.cs @@ -60,8 +60,6 @@ namespace GtkSharp.Generation { string type = base.CSType; if (IsArray) type += "[]"; - else if (IsBit) - type = "uint"; else if ((IsPointer || SymbolTable.Table.IsOpaque (CType)) && type != "string") type = "IntPtr"; else if (SymbolTable.Table.IsCallback (CType)) @@ -71,12 +69,6 @@ namespace GtkSharp.Generation { } } - public bool IsBit { - get { - return elem.GetAttribute("bits") == "1"; - } - } - public bool IsPadding { get { return (CName.StartsWith ("dummy") || CName.StartsWith ("padding")); @@ -94,11 +86,7 @@ namespace GtkSharp.Generation { string result = ""; if ((IsPointer || SymbolTable.Table.IsOpaque (CType)) && CSType != "string") result = "_"; - - if (IsBit) - result = String.Format ("_bitfield{0}", bitfields++); - else - result += SymbolTable.Table.MangleName (CName); + result += SymbolTable.Table.MangleName (CName); return result; } @@ -124,16 +112,6 @@ namespace GtkSharp.Generation { } } - public bool Validate () - { - if (CSType == "" && !Hidden) { - Console.Write ("Field {0} has unknown Type {1} ", Name, CType); - Statistics.ThrottledCount++; - return false; - } - return true; - } - public override void Generate (GenerationInfo gen_info, string indent) { if (Hidden) @@ -153,9 +131,8 @@ namespace GtkSharp.Generation { sw.WriteLine (indent + "{0} {1} {2};", Access, CSType, StudlyName); } else if (IsPadding) { sw.WriteLine (indent + "private {0} {1};", CSType, Name); - } else if (IsBit) { - // FIXME - sw.WriteLine (indent + "private {0} {1};", CSType, Name); + } else if (IsBitfield) { + base.Generate (gen_info, indent); } else if (table.IsCallback (CType)) { // FIXME sw.WriteLine (indent + "private {0} {1};", CSType, Name); @@ -173,7 +150,7 @@ namespace GtkSharp.Generation { sw.WriteLine (indent + "private {0} {1};", CSType, Name); if (Access != "private") { - sw.WriteLine (indent + "" + Access + " " + wrapped + " " + wrapped_name + " {"); + sw.WriteLine (indent + Access + " " + wrapped + " " + wrapped_name + " {"); sw.WriteLine (indent + "\tget { "); sw.WriteLine (indent + "\t\treturn " + table.FromNativeReturn(CType, Name) + ";"); sw.WriteLine (indent + "\t}"); @@ -185,7 +162,7 @@ namespace GtkSharp.Generation { sw.WriteLine (indent + "private {0} {1};", CSType, Name); sw.WriteLine (); if (Access != "private") { - sw.WriteLine (indent + "" + Access + " " + wrapped + " " + wrapped_name + " {"); + sw.WriteLine (indent + Access + " " + wrapped + " " + wrapped_name + " {"); sw.WriteLine (indent + "\tget { return " + table.FromNativeReturn (CType, Name) + "; }"); sw.WriteLine (indent + "}"); } diff --git a/glade/Makefile.am b/glade/Makefile.am index d833f7570..6201f8a96 100644 --- a/glade/Makefile.am +++ b/glade/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = glue +SUBDIRS = . glue if ENABLE_GLADE pkg = glade @@ -12,6 +12,7 @@ INCLUDE_API = ../pango/pango-api.xml ../atk/atk-api.xml ../gdk/gdk-api.xml ../gt METADATA = Glade.metadata SYMBOLS = references = ../glib/glib-sharp.dll ../pango/pango-sharp.dll ../atk/atk-sharp.dll ../gdk/gdk-sharp.dll ../gtk/gtk-sharp.dll +glue_includes = glade/glade.h,glade/glade-parser.h sources = \ HandlerNotFoundExeception.cs \ diff --git a/glade/glue/Makefile.am b/glade/glue/Makefile.am index 3840c558e..d30e62868 100644 --- a/glade/glue/Makefile.am +++ b/glade/glue/Makefile.am @@ -11,6 +11,8 @@ libgladesharpglue_2_la_LDFLAGS = -module -avoid-version -no-undefined libgladesharpglue_2_la_SOURCES = \ gladexml.c +nodist_libgladesharpglue_2_la_SOURCES = generated.c + libgladesharpglue_2_la_LIBADD = $(GLADE_LIBS) INCLUDES = $(GLADE_CFLAGS) $(GTK_SHARP_VERSION_CFLAGS) -I$(top_srcdir) diff --git a/gnome/Canvas.custom b/gnome/Canvas.custom index 6df4175e3..292167b79 100644 --- a/gnome/Canvas.custom +++ b/gnome/Canvas.custom @@ -32,19 +32,3 @@ affine = new double [6]; gnome_canvas_w2c_affine(Handle, affine); } - - [DllImport("gnomesharpglue-2")] - static extern double gnomesharp_canvas_get_pixels_per_unit (IntPtr raw); - - [DllImport("gnomecanvas-2")] - static extern void gnome_canvas_set_pixels_per_unit(IntPtr raw, double pixels_per_unit); - - public double PixelsPerUnit { - get { - return gnomesharp_canvas_get_pixels_per_unit (Handle); - } - set { - gnome_canvas_set_pixels_per_unit (Handle, value); - } - } - diff --git a/gnome/CanvasItem.custom b/gnome/CanvasItem.custom index 7840f80fd..ed104f4fa 100644 --- a/gnome/CanvasItem.custom +++ b/gnome/CanvasItem.custom @@ -34,12 +34,6 @@ g_object_ref (Handle); } - [DllImport("gnomesharpglue-2")] - static extern IntPtr gtksharp_gnome_canvas_item_get_canvas (IntPtr i); - public Canvas Canvas { - get { return GLib.Object.GetObject (gtksharp_gnome_canvas_item_get_canvas (this.Handle), false) as Canvas; } - } - [DllImport("gnomecanvas-2")] static extern void gnome_canvas_item_i2c_affine(IntPtr raw, double[] affine); diff --git a/gnome/Gnome.metadata b/gnome/Gnome.metadata index 2cb268301..8d14bfb64 100644 --- a/gnome/Gnome.metadata +++ b/gnome/Gnome.metadata @@ -1,6 +1,14 @@ 1 + public + public + Menus + public + GtkMenuBar* + public + public + public dateedit_flags time 1 @@ -26,6 +34,7 @@ 1 1 PromptCleared + public out out gboolean @@ -34,7 +43,6 @@ out out out - 1 out out out @@ -42,6 +50,7 @@ 1 ArtWindRule 1 + public 1 out 1 @@ -60,15 +69,35 @@ 1 1 1 + public + GtkButton* + BackButton + CancelButton + FinishButton + HelpButton + NextButton out BackClicked CancelClicked FinishClicked NextClicked Prepared + BgColor + LogoBgColor + Logo + TopWatermark + Watermark 1 1 1 + 1 + 1 + VBox + GtkVBox* + 1 + 1 + 1 + 1 1 Activated 1 diff --git a/gnome/Makefile.am b/gnome/Makefile.am index db819a60d..98159540a 100644 --- a/gnome/Makefile.am +++ b/gnome/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = glue +SUBDIRS = . glue if ENABLE_GNOME pkg = gnome @@ -12,6 +12,7 @@ INCLUDE_API = ../pango/pango-api.xml ../atk/atk-api.xml ../gdk/gdk-api.xml ../gt METADATA = Gnome.metadata SYMBOLS = references = ../glib/glib-sharp.dll ../pango/pango-sharp.dll ../atk/atk-sharp.dll ../gdk/gdk-sharp.dll ../gtk/gtk-sharp.dll ../art/art-sharp.dll +glue_includes = gnome.h,libgnomeprint/gnome-print.h,libgnomeprint/gnome-print-paper.h sources = \ BonoboUIVerb.cs \ diff --git a/gnome/glue/Makefile.am b/gnome/glue/Makefile.am index 97ff95162..d60a6a01e 100644 --- a/gnome/glue/Makefile.am +++ b/gnome/glue/Makefile.am @@ -9,13 +9,14 @@ endif libgnomesharpglue_2_la_LDFLAGS = -module -avoid-version -no-undefined libgnomesharpglue_2_la_SOURCES = \ - canvas.c \ canvasitem.c \ canvaspoints.c \ panelapplet.c \ program.c \ # +nodist_libgnomesharpglue_2_la_SOURCES = generated.c + libgnomesharpglue_2_la_LIBADD = $(GNOME_LIBS) INCLUDES = $(GNOME_CFLAGS) $(GTK_SHARP_VERSION_CFLAGS) -I$(top_srcdir) diff --git a/gnome/glue/canvas.c b/gnome/glue/canvas.c deleted file mode 100644 index 259587b80..000000000 --- a/gnome/glue/canvas.c +++ /dev/null @@ -1,30 +0,0 @@ -/* canvas.c : Glue for accessing fields in a GnomeCanvas - * - * Author: Mike Kestner (mkestner@ximian.com) - * - * Copyright (C) 2004 Novell, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -gdouble gnomesharp_canvas_get_pixels_per_unit (GnomeCanvas *canvas); - -gdouble -gnomesharp_canvas_get_pixels_per_unit (GnomeCanvas *canvas) -{ - return canvas->pixels_per_unit; -} diff --git a/gnome/glue/canvasitem.c b/gnome/glue/canvasitem.c index 47bb67561..a83978ac2 100644 --- a/gnome/glue/canvasitem.c +++ b/gnome/glue/canvasitem.c @@ -23,14 +23,6 @@ #include -GnomeCanvas* gtksharp_gnome_canvas_item_get_canvas (GnomeCanvasItem *item); - -GnomeCanvas* -gtksharp_gnome_canvas_item_get_canvas (GnomeCanvasItem *item) -{ - return item->canvas; -} - void gnomesharp_canvas_item_base_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags); void diff --git a/gtk/AccelKey.custom b/gtk/AccelKey.custom index 3730e00b6..59a83994d 100644 --- a/gtk/AccelKey.custom +++ b/gtk/AccelKey.custom @@ -17,5 +17,6 @@ public AccelKey (Gdk.Key key, Gdk.ModifierType mods, Gtk.AccelFlags flags) { this.Key = key; this.AccelMods = mods; + this._bitfield0 = 0; this.AccelFlags = flags; } diff --git a/gtk/Button.custom b/gtk/Button.custom index bb4765998..df992dec0 100644 --- a/gtk/Button.custom +++ b/gtk/Button.custom @@ -41,20 +41,6 @@ public Button (string stock_id) : base (IntPtr.Zero) GLib.Marshaller.Free (native); } -[DllImport("gtksharpglue-2")] -static extern int gtksharp_button_get_in_button (IntPtr button); -[DllImport("gtksharpglue-2")] -static extern void gtksharp_button_set_in_button (IntPtr button, int b); - -public bool InButton { - get { - return gtksharp_button_get_in_button (Handle) == 1 ? true : false; - } - set { - gtksharp_button_set_in_button (Handle, value ? 1 : 0); - } -} - public Button (Widget widget) : this () { Add (widget); diff --git a/gtk/Combo.custom b/gtk/Combo.custom index 7597a3b20..7b54eeabf 100644 --- a/gtk/Combo.custom +++ b/gtk/Combo.custom @@ -25,21 +25,3 @@ public string[] PopdownStrings { gtk_combo_set_popdown_strings(Handle, list.Handle); } } - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_combo_get_entry(IntPtr i); - -public Gtk.Entry Entry { - get { - return GLib.Object.GetObject (gtksharp_combo_get_entry(this.Handle), false) as Gtk.Entry; - } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_combo_get_button(IntPtr i); - -public Gtk.Button Button { - get { - return GLib.Object.GetObject (gtksharp_combo_get_button(this.Handle), false) as Gtk.Button; - } -} diff --git a/gtk/Container.custom b/gtk/Container.custom index f07c9185b..ecc787903 100644 --- a/gtk/Container.custom +++ b/gtk/Container.custom @@ -100,27 +100,6 @@ public Widget[] FocusChain { } -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_container_get_focus_child(IntPtr raw); - -[DllImport("libgtk-win32-2.0-0.dll")] -static extern void gtk_container_set_focus_child(IntPtr raw, IntPtr child); - -public Gtk.Widget FocusChild { - get { - IntPtr raw_ret = gtksharp_container_get_focus_child (Handle); - Gtk.Widget ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else - ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret); - return ret; - } - set { - gtk_container_set_focus_child (Handle, value.Handle); - } -} - [DllImport("gtksharpglue-2")] static extern void gtksharp_container_base_forall (IntPtr handle, bool include_internals, IntPtr cb, IntPtr data); diff --git a/gtk/Dialog.custom b/gtk/Dialog.custom index b5bd695f7..2b20389fa 100644 --- a/gtk/Dialog.custom +++ b/gtk/Dialog.custom @@ -51,18 +51,6 @@ public Dialog (string title, Gtk.Window parent, Gtk.DialogFlags flags, params ob AddButton ((string) button_data [i], (int) button_data [i + 1]); } -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_dialog_get_vbox (IntPtr i); -public Gtk.VBox VBox { - get { return GLib.Object.GetObject (gtksharp_dialog_get_vbox (this.Handle), false) as VBox; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_dialog_get_action_area (IntPtr i); -public Gtk.HButtonBox ActionArea { - get { return GLib.Object.GetObject (gtksharp_dialog_get_action_area (this.Handle), false) as HButtonBox; } -} - public void AddActionWidget (Widget child, ResponseType response) { this.AddActionWidget (child, (int) response); diff --git a/gtk/FileSelection.custom b/gtk/FileSelection.custom index 2bbdfe532..dce3c3a55 100644 --- a/gtk/FileSelection.custom +++ b/gtk/FileSelection.custom @@ -36,110 +36,6 @@ public class FSButton : Gtk.Button { } } -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_dir_list (IntPtr i); -public Gtk.TreeView DirList { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_dir_list (this.Handle), false) as Gtk.TreeView; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_file_list (IntPtr i); -public Gtk.TreeView FileList { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_file_list (this.Handle), false) as Gtk.TreeView; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_selection_entry (IntPtr i); -public Gtk.Entry SelectionEntry { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_selection_entry (this.Handle), false) as Gtk.Entry; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_selection_text (IntPtr i); -public Gtk.Label SelectionText { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_selection_text (this.Handle), false) as Gtk.Label; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_ok_button (IntPtr i); -public Gtk.Button OkButton { - get { return new FSButton (this, gtksharp_file_selection_get_ok_button (this.Handle)); } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_cancel_button (IntPtr i); -public Gtk.Button CancelButton { - get { return new FSButton (this, gtksharp_file_selection_get_cancel_button (this.Handle)); } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_help_button (IntPtr i); -public Gtk.Button HelpButton { - get { return new FSButton (this, gtksharp_file_selection_get_help_button (this.Handle)); } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_history_pulldown (IntPtr i); -public Gtk.OptionMenu HistoryPulldown { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_history_pulldown (this.Handle), false) as Gtk.OptionMenu; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_history_menu (IntPtr i); -public Gtk.Menu HistoryMenu { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_history_menu (this.Handle), false) as Gtk.Menu; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_fileop_dialog (IntPtr i); -public Gtk.MessageDialog FileopDialog { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_fileop_dialog (this.Handle), false) as Gtk.MessageDialog; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_fileop_entry (IntPtr i); -public Gtk.Entry FileopEntry { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_fileop_entry (this.Handle), false) as Gtk.Entry; } -} - -[DllImport("gtksharpglue-2", CallingConvention=CallingConvention.Cdecl)] -static extern IntPtr gtksharp_file_selection_get_fileop_file (IntPtr i); -public string FileopFile { - get { - return GLib.Marshaller.Utf8PtrToString (gtksharp_file_selection_get_fileop_file (this.Handle)); - } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_fileop_c_dir (IntPtr i); -public Gtk.Button FileopCDir { - get { return new FSButton (this, gtksharp_file_selection_get_fileop_c_dir(this.Handle)); } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_fileop_del_file (IntPtr i); -public Gtk.Button FileopDelFile { - get { return new FSButton (this, gtksharp_file_selection_get_fileop_del_file (this.Handle)); } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_fileop_ren_file (IntPtr i); -public Gtk.Button FileopRenFile { - get { return new FSButton (this, gtksharp_file_selection_get_fileop_ren_file (this.Handle)); } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_button_area (IntPtr i); -public Gtk.HButtonBox ButtonArea { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_button_area (this.Handle), false) as Gtk.HButtonBox; } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_file_selection_get_action_area (IntPtr i); -public new Gtk.HButtonBox ActionArea { - get { return GLib.Object.GetObject (gtksharp_file_selection_get_action_area (this.Handle), false) as Gtk.HButtonBox; } -} - [DllImport("libgtk-win32-2.0-0.dll")] static extern IntPtr gtk_file_selection_get_selections (IntPtr handle); diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 19f656a29..d15e9f30f 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -12,6 +12,11 @@ 1 1 1 + public + public + public + public + public 1 1 1 @@ -141,10 +146,13 @@ ChangeValue 1 1 + 1 PackEnd PackStart true 1 + public + true Click Press Release @@ -173,9 +181,14 @@ 1 1 1 + GtkButton* + public + GtkEntry* + public 1 out + public 1 call call @@ -186,13 +199,15 @@ 1 1 1 - 1 Added ResizeChecked Removed FocusChildSet 1 1 + GtkHButtonBox* + VBox + GtkVBox* Respond GtkResponseType GtkResponseType @@ -205,11 +220,38 @@ ClipboardPasted PrefixInserted 1 + Activated 1 1 + GtkHButtonBox* + 1 + GtkHButtonBox* + private + GtkButton* + GtkTreeView* + GtkTreeView* + GtkButton* + GtkButton* + GtkMessageDialog* + GtkEntry* + GtkButton* + GtkButton* + private + GtkMenu* + GtkOptionMenu* + MainVBox + GtkVBox* + GtkButton* + GtkEntry* + GtkLabel* 1 GObject - Activated + GtkButton* + public + GtkButton* + public + GtkButton* + public 1 1 1 @@ -239,6 +281,10 @@ out out out + GtkButton* + public + GtkButton* + public 1 1 GetItem @@ -307,6 +353,8 @@ out 1 1 + 1 + 1 n_columns n_rows Attach @@ -364,6 +412,8 @@ Toggle 1 Toggle + 1 + 1 1 1 1 @@ -425,6 +475,9 @@ 1 1 1 + 1 + true + 1 out 1 1 @@ -472,6 +525,7 @@ ref Unmapped Unrealized + 1 1 out 1 @@ -517,6 +571,10 @@ n_targets 1 1 + PangoUnderline + 1 + 1 + 1 1 1 1 diff --git a/gtk/InputDialog.custom b/gtk/InputDialog.custom deleted file mode 100644 index 44db6e9c5..000000000 --- a/gtk/InputDialog.custom +++ /dev/null @@ -1,42 +0,0 @@ -// Gtk.InputDialog.custom - Gtk InputDialog class customizations -// -// Author: Manuel V. Santos -// -// Copyright (C) 2004 Manuel V. Santos. -// -// This code is inserted after the automatically generated code. -// -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this program; if not, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - - [DllImport("gtksharpglue-2")] - static extern IntPtr gtksharp_input_dialog_get_save_button (IntPtr i); - - public Gtk.Button SaveButton { - get { - IntPtr rawButton = gtksharp_input_dialog_get_save_button (Handle); - return new Button (rawButton); - } - } - - [DllImport("gtksharpglue-2")] - static extern IntPtr gtksharp_input_dialog_get_close_button (IntPtr i); - - public Gtk.Button CloseButton { - get { - IntPtr rawButton = gtksharp_input_dialog_get_close_button (Handle); - return new Button (rawButton); - } - } diff --git a/gtk/Layout.custom b/gtk/Layout.custom deleted file mode 100644 index 2253f0fb7..000000000 --- a/gtk/Layout.custom +++ /dev/null @@ -1,41 +0,0 @@ -// -// Gtk.Widget.custom - Gtk Widget class customizations -// -// Author: Ettore Perazzoli -// Rachel Hestilow -// -// Copyright (C) 2003 Ettore Perazzoli, Rachel Hestilow -// -// This code is inserted after the automatically generated code. -// -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this program; if not, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_gtk_layout_get_bin_window (IntPtr layout); - -public Gdk.Window BinWindow { - get { - IntPtr raw = gtksharp_gtk_layout_get_bin_window (Handle); - - if (raw != (IntPtr) 0) { - Gdk.Window ret = (Gdk.Window) GLib.Object.GetObject (raw, false); - return ret; - } - - return null; - } -} diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 41a7548c6..337af08bd 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -8,6 +8,7 @@ SYMBOLS = gtk-symbols.xml INCLUDE_API = ../pango/pango-api.xml ../atk/atk-api.xml ../gdk/gdk-api.xml METADATA = Gtk.metadata references = ../glib/glib-sharp.dll ../pango/pango-sharp.dll ../atk/atk-sharp.dll ../gdk/gdk-sharp.dll +glue_includes = gtk/gtk.h sources = \ ActionEntry.cs \ @@ -65,10 +66,8 @@ customs = \ ImageMenuItem.custom \ Init.custom \ Input.custom \ - InputDialog.custom \ ItemFactory.custom \ Label.custom \ - Layout.custom \ ListStore.custom \ MessageDialog.custom \ Menu.custom \ diff --git a/gtk/SelectionData.custom b/gtk/SelectionData.custom index 93e4fe5c7..f3a0aeb4f 100644 --- a/gtk/SelectionData.custom +++ b/gtk/SelectionData.custom @@ -18,24 +18,6 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport("gtksharpglue-2")] - private static extern int gtksharp_gtk_selection_data_get_format (IntPtr selection_data); - - public int Format { - get { - return gtksharp_gtk_selection_data_get_format (Handle); - } - } - - [DllImport("gtksharpglue-2")] - private static extern int gtksharp_gtk_selection_data_get_length (IntPtr selection_data); - - public int Length { - get { - return gtksharp_gtk_selection_data_get_length (Handle); - } - } - [DllImport("libgtk-win32-2.0-0.dll")] private static extern IntPtr gtk_selection_data_get_text (IntPtr selection_data); @@ -72,24 +54,6 @@ Set(type, format, data, data.Length); } - [DllImport("gtksharpglue-2")] - private static extern IntPtr gtksharp_gtk_selection_data_get_selection (IntPtr selection_data); - - public Gdk.Atom Selection { - get { - return new Gdk.Atom (gtksharp_gtk_selection_data_get_selection (Handle)); - } - } - - [DllImport("gtksharpglue-2")] - private static extern IntPtr gtksharp_gtk_selection_data_get_target (IntPtr selection_data); - - public Gdk.Atom Target { - get { - return new Gdk.Atom (gtksharp_gtk_selection_data_get_target (Handle)); - } - } - [DllImport("libglib-2.0-0.dll")] static extern void g_free (IntPtr ptr); @@ -112,13 +76,3 @@ return new Gdk.Atom [0]; } } - - [DllImport("gtksharpglue-2")] - private static extern IntPtr gtksharp_gtk_selection_data_get_type (IntPtr selection_data); - - public Gdk.Atom Type { - get { - return new Gdk.Atom (gtksharp_gtk_selection_data_get_type (Handle)); - } - } - diff --git a/gtk/Style.custom b/gtk/Style.custom index 7a539f57e..63cb26764 100644 --- a/gtk/Style.custom +++ b/gtk/Style.custom @@ -203,20 +203,6 @@ public void SetMidGC (StateType state, Gdk.GC gc) gtksharp_gtk_style_set_mid_gc (Handle, (int) state, gc.Handle); } -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_gtk_style_get_white (IntPtr style); - -public Gdk.Color White { - get { return Gdk.Color.New (gtksharp_gtk_style_get_white (Handle)); } -} - -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_gtk_style_get_black (IntPtr style); - -public Gdk.Color Black { - get { return Gdk.Color.New (gtksharp_gtk_style_get_black (Handle)); } -} - [DllImport("gtksharpglue-2")] static extern IntPtr gtksharp_gtk_style_get_bg (IntPtr style, int i); diff --git a/gtk/Widget.custom b/gtk/Widget.custom index 1e5cba870..77ad6e1b7 100644 --- a/gtk/Widget.custom +++ b/gtk/Widget.custom @@ -45,7 +45,6 @@ public Gdk.Rectangle Allocation { set { SizeAllocate (value); } } - [DllImport ("gtksharpglue-2")] static extern IntPtr gtksharp_gtk_widget_get_window (IntPtr widget); [DllImport ("gtksharpglue-2")] diff --git a/gtk/glue/Makefile.am b/gtk/glue/Makefile.am index 12b6c8f44..156b0580d 100644 --- a/gtk/glue/Makefile.am +++ b/gtk/glue/Makefile.am @@ -2,24 +2,19 @@ lib_LTLIBRARIES = libgtksharpglue-2.la libgtksharpglue_2_la_SOURCES = \ adjustment.c \ - button.c \ cellrenderer.c \ clipboard.c \ - colorseldialog.c \ - combo.c \ + colorseldialog.c \ container.c \ - dialog.c \ - fileselection.c \ - inputdialog.c \ - layout.c \ nodestore.c \ object.c \ - paned.c \ selectiondata.c \ style.c \ vmglueheaders.h \ widget.c +nodist_libgtksharpglue_2_la_SOURCES = generated.c + # Adding a new glue file? # Please remember to update makefile.win32 diff --git a/gtk/glue/button.c b/gtk/glue/button.c deleted file mode 100644 index e66be1dd7..000000000 --- a/gtk/glue/button.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * button.c : Glue for utility functions for GtkButton - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -/* Forward declarations */ -int gtksharp_button_get_in_button (GtkButton* button); -void gtksharp_button_set_in_button (GtkButton* button, int b); - -int -gtksharp_button_get_in_button (GtkButton* button) -{ - return button->in_button; -} - -void -gtksharp_button_set_in_button (GtkButton* button, int b) -{ - button->in_button = b; -} diff --git a/gtk/glue/combo.c b/gtk/glue/combo.c deleted file mode 100644 index 04799f9a0..000000000 --- a/gtk/glue/combo.c +++ /dev/null @@ -1,38 +0,0 @@ -/* combo.c : Glue for accessing fields in the GtkCombo widget. - * - * Author: Pablo Baena (pbaena@uol.com.ar) - * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -/* Forward declarations */ -GtkWidget *gtksharp_combo_get_entry (GtkCombo* combo); -GtkWidget *gtksharp_combo_get_button (GtkCombo* combo); -/* */ - -GtkWidget* -gtksharp_combo_get_entry (GtkCombo* combo) -{ - return combo->entry; -} - -GtkWidget* -gtksharp_combo_get_button (GtkCombo* combo) -{ - return combo->button; -} diff --git a/gtk/glue/container.c b/gtk/glue/container.c index 5a9c7efa7..369d8d5e7 100644 --- a/gtk/glue/container.c +++ b/gtk/glue/container.c @@ -21,14 +21,6 @@ #include -GtkWidget *gtksharp_container_get_focus_child (GtkContainer *container); - -GtkWidget * -gtksharp_container_get_focus_child (GtkContainer *container) -{ - return container->focus_child; -} - void gtksharp_container_base_forall (GtkContainer *container, gboolean include_internals, GtkCallback cb, gpointer data); void diff --git a/gtk/glue/dialog.c b/gtk/glue/dialog.c deleted file mode 100644 index d71a75d91..000000000 --- a/gtk/glue/dialog.c +++ /dev/null @@ -1,39 +0,0 @@ -/* dialog.c : Glue for accessing fields in the GtkDialog widget. - * - * Author: Duncan Mak (duncan@ximian.com) - * - * Copyright (c) Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -/* Forward declarations */ -GtkWidget *gtksharp_dialog_get_vbox (GtkDialog *dialog); -GtkWidget *gtksharp_dialog_get_action_area (GtkDialog *dialog); -/* */ - -GtkWidget* -gtksharp_dialog_get_vbox (GtkDialog *dialog) -{ - return dialog->vbox; -} - -GtkWidget* -gtksharp_dialog_get_action_area (GtkDialog *dialog) -{ - return dialog->action_area; -} diff --git a/gtk/glue/fileselection.c b/gtk/glue/fileselection.c deleted file mode 100644 index b5579a6d3..000000000 --- a/gtk/glue/fileselection.c +++ /dev/null @@ -1,168 +0,0 @@ -/* fileselection.c : Glue for accessing fields in the GtkFileSelection widget. - * - * Author: Duncan Mak (duncan@ximian.com) - * - * Copyright (c) Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -/* Forward declarations */ -GtkWidget *gtksharp_file_selection_get_dir_list (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_file_list (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_selection_entry (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_selection_text (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_main_vbox (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_ok_button (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_cancel_button (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_help_button (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_history_pulldown (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_history_menu (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_fileop_dialog (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_fileop_entry (GtkFileSelection *file); - -const gchar *gtksharp_file_selection_get_fileop_file (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_fileop_c_dir (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_fileop_del_file (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_fileop_ren_file (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_button_area (GtkFileSelection *file); - -GtkWidget *gtksharp_file_selection_get_action_area (GtkFileSelection *file); -/* */ - -GtkWidget* -gtksharp_file_selection_get_dir_list (GtkFileSelection *file) -{ - return file->dir_list; -} - -GtkWidget* -gtksharp_file_selection_get_file_list (GtkFileSelection *file) -{ - return file->file_list; -} - -GtkWidget* -gtksharp_file_selection_get_selection_entry (GtkFileSelection *file) -{ - return file->selection_entry; -} - -GtkWidget* -gtksharp_file_selection_get_selection_text (GtkFileSelection *file) -{ - return file->selection_text; -} - -GtkWidget* -gtksharp_file_selection_get_main_vbox (GtkFileSelection *file) -{ - return file->main_vbox; -} - -GtkWidget* -gtksharp_file_selection_get_ok_button (GtkFileSelection *file) -{ - return file->ok_button; -} - -GtkWidget* -gtksharp_file_selection_get_cancel_button (GtkFileSelection *file) -{ - return file->cancel_button; -} - -GtkWidget* -gtksharp_file_selection_get_help_button (GtkFileSelection *file) -{ - return file->help_button; -} - -GtkWidget* -gtksharp_file_selection_get_history_pulldown (GtkFileSelection *file) -{ - return file->history_pulldown; -} - -GtkWidget* -gtksharp_file_selection_get_history_menu (GtkFileSelection *file) -{ - return file->history_menu; -} - -GtkWidget* -gtksharp_file_selection_get_fileop_dialog (GtkFileSelection *file) -{ - return file->fileop_dialog; -} - -GtkWidget* -gtksharp_file_selection_get_fileop_entry (GtkFileSelection *file) -{ - return file->fileop_entry; -} - -const gchar* -gtksharp_file_selection_get_fileop_file (GtkFileSelection *file) -{ - return file->fileop_file; -} - -GtkWidget* -gtksharp_file_selection_get_fileop_c_dir (GtkFileSelection *file) -{ - return file->fileop_c_dir; -} - -GtkWidget* -gtksharp_file_selection_get_fileop_del_file (GtkFileSelection *file) -{ - return file->fileop_del_file; -} - -GtkWidget* -gtksharp_file_selection_get_fileop_ren_file (GtkFileSelection *file) -{ - return file->fileop_ren_file; -} - -GtkWidget* -gtksharp_file_selection_get_button_area (GtkFileSelection *file) -{ - return file->button_area; -} - -GtkWidget* -gtksharp_file_selection_get_action_area (GtkFileSelection *file) -{ - return file->action_area; -} diff --git a/gtk/glue/inputdialog.c b/gtk/glue/inputdialog.c deleted file mode 100644 index d862ad353..000000000 --- a/gtk/glue/inputdialog.c +++ /dev/null @@ -1,40 +0,0 @@ -/* inputdialog.c : Glue for accessing fields in the GtkInputDialog widget. - * - * Author: Manuel V. Santos - * - * Copyright (c) 2004 Manuel V. Santos - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -/* Forward declarations */ -GtkWidget *gtksharp_input_dialog_get_save_button (GtkInputDialog *dialog); - -GtkWidget *gtksharp_input_dialog_get_close_button (GtkInputDialog *dialog); -/* */ - -GtkWidget* -gtksharp_input_dialog_get_save_button (GtkInputDialog *dialog) -{ - return dialog->save_button; -} - -GtkWidget* -gtksharp_input_dialog_get_close_button (GtkInputDialog *dialog) -{ - return dialog->close_button; -} diff --git a/gtk/glue/layout.c b/gtk/glue/layout.c deleted file mode 100644 index 1596e47ed..000000000 --- a/gtk/glue/layout.c +++ /dev/null @@ -1,33 +0,0 @@ -/* layout.c: Glue to access fields in GtkLayout. - * - * Author: Ettore Perazzoli - * - * Copyright (c) 2003 Ettore Perazzoli - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - - -GdkWindow *gtksharp_gtk_layout_get_bin_window (GtkLayout *layout); - -GdkWindow * -gtksharp_gtk_layout_get_bin_window (GtkLayout *layout) -{ - return layout->bin_window; -} - - diff --git a/gtk/glue/makefile.win32 b/gtk/glue/makefile.win32 index f88d1dc91..9b2f4167d 100755 --- a/gtk/glue/makefile.win32 +++ b/gtk/glue/makefile.win32 @@ -5,19 +5,14 @@ DLLWRAP=dllwrap -mno-cygwin -mms-bitfields --target i386-mingw32 --export-all-sy GLUE_OBJS = \ adjustment.o \ - button.o \ + cellrenderer.o \ cellrenderer.o \ clipboard.o \ colorseldialog.o \ - combo.o \ container.o \ - dialog.o \ - fileselection.o \ - inputdialog.o \ - layout.o \ + generated.o \ nodestore.o \ object.o \ - paned.o \ selectiondata.o \ style.o \ widget.o \ diff --git a/gtk/glue/paned.c b/gtk/glue/paned.c deleted file mode 100644 index f9d93d979..000000000 --- a/gtk/glue/paned.c +++ /dev/null @@ -1,39 +0,0 @@ -/* paned.c : Glue for accessing fields in the GtkPaned widget. - * - * Author: Duncan Mak (duncan@ximian.com) - * - * Copyright (c) 2003 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -/* Forward declarations */ -GtkWidget *gtksharp_paned_get_child1 (GtkPaned *paned); -GtkWidget *gtksharp_paned_get_child2 (GtkPaned *paned); -/* */ - -GtkWidget* -gtksharp_paned_get_child1 (GtkPaned *paned) -{ - return paned->child1; -} - -GtkWidget* -gtksharp_paned_get_child2 (GtkPaned *paned) -{ - return paned->child2; -} diff --git a/gtk/glue/selectiondata.c b/gtk/glue/selectiondata.c index a9ec77012..a68986d39 100644 --- a/gtk/glue/selectiondata.c +++ b/gtk/glue/selectiondata.c @@ -19,48 +19,12 @@ * Boston, MA 02111-1307, USA. */ -#include #include -gint gtksharp_gtk_selection_data_get_length (GtkSelectionData *data); -gint gtksharp_gtk_selection_data_get_format (GtkSelectionData *data); guchar *gtksharp_gtk_selection_data_get_data_pointer (GtkSelectionData *data); -GdkAtom gtksharp_gtk_selection_data_get_selection (GtkSelectionData *data); -GdkAtom gtksharp_gtk_selection_data_get_target (GtkSelectionData *data); -GdkAtom gtksharp_gtk_selection_data_get_type (GtkSelectionData *data); guchar * gtksharp_gtk_selection_data_get_data_pointer (GtkSelectionData *data) { return data->data; } - -gint -gtksharp_gtk_selection_data_get_length (GtkSelectionData *data) -{ - return data->length; -} - -gint -gtksharp_gtk_selection_data_get_format (GtkSelectionData *data) -{ - return data->format; -} - -GdkAtom -gtksharp_gtk_selection_data_get_selection (GtkSelectionData *data) -{ - return data->selection; -} - -GdkAtom -gtksharp_gtk_selection_data_get_target (GtkSelectionData *data) -{ - return data->target; -} - -GdkAtom -gtksharp_gtk_selection_data_get_type (GtkSelectionData *data) -{ - return data->type; -} diff --git a/gtk/glue/style.c b/gtk/glue/style.c index 652989802..d62e062d0 100644 --- a/gtk/glue/style.c +++ b/gtk/glue/style.c @@ -59,10 +59,6 @@ void gtksharp_gtk_style_set_dark_gc (GtkStyle *style, int i, GdkGC *gc); void gtksharp_gtk_style_set_mid_gc (GtkStyle *style, int i, GdkGC *gc); -GdkColor *gtksharp_gtk_style_get_white (GtkStyle *style); - -GdkColor *gtksharp_gtk_style_get_black (GtkStyle *style); - GdkColor *gtksharp_gtk_style_get_fg (GtkStyle *style, int i); GdkColor *gtksharp_gtk_style_get_bg (GtkStyle *style, int i); @@ -210,18 +206,6 @@ gtksharp_gtk_style_set_dark_gc (GtkStyle *style, int i, GdkGC *gc) style->dark_gc[i] = gc; } -GdkColor* -gtksharp_gtk_style_get_white (GtkStyle *style) -{ - return &style->white; -} - -GdkColor* -gtksharp_gtk_style_get_black (GtkStyle *style) -{ - return &style->black; -} - GdkColor* gtksharp_gtk_style_get_fg (GtkStyle *style, int i) { diff --git a/gtk/glue/widget.c b/gtk/glue/widget.c index 290731339..adcd3e719 100644 --- a/gtk/glue/widget.c +++ b/gtk/glue/widget.c @@ -55,6 +55,8 @@ gtksharp_gtk_widget_get_window (GtkWidget *widget) void gtksharp_gtk_widget_set_window (GtkWidget *widget, GdkWindow *window) { + if (widget->window) + g_object_unref (widget->window); widget->window = g_object_ref (window); } diff --git a/pango/LayoutLine.custom b/pango/LayoutLine.custom index 5e6bc9f91..2da731f74 100644 --- a/pango/LayoutLine.custom +++ b/pango/LayoutLine.custom @@ -21,40 +21,6 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. -[DllImport("pangosharpglue-2")] -static extern IntPtr pangosharp_pango_layout_line_get_layout (IntPtr line); - -public Layout Layout { - get { - IntPtr raw_ret = pangosharp_pango_layout_line_get_layout (Handle); - Pango.Layout ret; - if (raw_ret == IntPtr.Zero) - ret = null; - else - ret = (Pango.Layout) GLib.Object.GetObject (raw_ret); - return ret; - } -} - -[DllImport("pangosharpglue-2")] -static extern int pangosharp_pango_layout_line_get_start_index (IntPtr line); - -public int StartIndex { - get { - return pangosharp_pango_layout_line_get_start_index (Handle); - } -} - -[DllImport("pangosharpglue-2")] -static extern int pangosharp_pango_layout_line_get_length (IntPtr line); - -public int Length { - get { - return pangosharp_pango_layout_line_get_length (Handle); - } -} - - #if NOT_BROKEN [DllImport("libpango-1.0-0.dll")] static extern void pango_layout_line_get_x_ranges(IntPtr raw, int start_index, int end_index, out IntPtr ranges_handle, out int n_ranges); diff --git a/pango/Makefile.am b/pango/Makefile.am index 179667908..6392e5896 100644 --- a/pango/Makefile.am +++ b/pango/Makefile.am @@ -4,6 +4,7 @@ pkg = pango METADATA = Pango.metadata SYMBOLS = pango-symbols.xml references = ../glib/glib-sharp.dll +glue_includes = pango/pango.h sources = \ Attribute.cs \ diff --git a/pango/Pango.metadata b/pango/Pango.metadata index 21db0b7d4..731973f41 100644 --- a/pango/Pango.metadata +++ b/pango/Pango.metadata @@ -45,6 +45,9 @@ 1 1 1 + public + public + public ref ref 1 diff --git a/pango/glue/Makefile.am b/pango/glue/Makefile.am index 5d3406f66..c2219232c 100644 --- a/pango/glue/Makefile.am +++ b/pango/glue/Makefile.am @@ -2,9 +2,10 @@ lib_LTLIBRARIES = libpangosharpglue-2.la libpangosharpglue_2_la_SOURCES = \ attribute.c \ - layoutline.c \ units.c +nodist_libpangosharpglue_2_la_SOURCES = generated.c + # Adding a new glue file? # Please remember to update makefile.win32 diff --git a/pango/glue/layoutline.c b/pango/glue/layoutline.c deleted file mode 100644 index 95579b3f3..000000000 --- a/pango/glue/layoutline.c +++ /dev/null @@ -1,46 +0,0 @@ -/* layoutline.c : Glue to access fields in PangoLayoutLine struct. - * - * Author: Jeroen Zwartepoorte - -/* Forward declarations */ -PangoLayout *pangosharp_pango_layout_line_get_layout (PangoLayoutLine *line); -gint pangosharp_pango_layout_line_get_start_index (PangoLayoutLine *line); -gint pangosharp_pango_layout_line_get_length (PangoLayoutLine *line); -/* */ - -PangoLayout * -pangosharp_pango_layout_line_get_layout (PangoLayoutLine *line) -{ - return line->layout; -} - -gint -pangosharp_pango_layout_line_get_start_index (PangoLayoutLine *line) -{ - return line->start_index; -} - -gint -pangosharp_pango_layout_line_get_length (PangoLayoutLine *line) -{ - return line->length; -} diff --git a/pango/glue/makefile.win32 b/pango/glue/makefile.win32 index 5330a2ce3..ed29b51e7 100644 --- a/pango/glue/makefile.win32 +++ b/pango/glue/makefile.win32 @@ -5,7 +5,7 @@ DLLWRAP=dllwrap -mno-cygwin -mms-bitfields --target i386-mingw32 --export-all-sy GLUE_OBJS = \ attribute.c \ - layoutline.o \ + generated.o \ units.o \ win32dll.o diff --git a/vte/Makefile.am b/vte/Makefile.am index e2ab7376f..057fa71e0 100644 --- a/vte/Makefile.am +++ b/vte/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS = . glue + if ENABLE_VTE pkg = vte pkgconfigdir = $(libdir)/pkgconfig @@ -5,10 +7,12 @@ pkgconfig_DATA = vte-sharp-2.0.pc else pkg = endif + INCLUDE_API = ../pango/pango-api.xml ../atk/atk-api.xml ../gdk/gdk-api.xml ../gtk/gtk-api.xml METADATA = Vte.metadata SYMBOLS = references = ../glib/glib-sharp.dll ../pango/pango-sharp.dll ../atk/atk-sharp.dll ../gdk/gdk-sharp.dll ../gtk/gtk-sharp.dll +glue_includes = vte/vte.h sources = diff --git a/vte/glue/Makefile.am b/vte/glue/Makefile.am new file mode 100644 index 000000000..ab970ef83 --- /dev/null +++ b/vte/glue/Makefile.am @@ -0,0 +1,24 @@ +lib_LTLIBRARIES = $(TARGET) + +if ENABLE_VTE +TARGET = libvtesharpglue-2.la +else +TARGET = +endif + +libvtesharpglue_2_la_SOURCES = # empty + +nodist_libvtesharpglue_2_la_SOURCES = generated.c + +libvtesharpglue_2_la_LDFLAGS = -module -avoid-version -no-undefined + +libvtesharpglue_2_la_LIBADD = $(VTE_LIBS) + +INCLUDES = $(VTE_CFLAGS) -I$(top_srcdir) + +libvtesharpglue.dll: $(libvtesharpglue_2_la_OBJECTS) libvtesharpglue.rc libvtesharpglue.def + ./build-dll libvtesharpglue-2 $(VERSION) + +CLEANFILES = lib*.a lib*.dll + +EXTRA_DIST = makefile.win32 win32dll.c