diff --git a/ChangeLog b/ChangeLog index 91248290a..f4d5b2c62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,48 @@ +2002-06-26 Rachel Hestilow + + * configure.in, makefile, makefile.win32: add gnome. + + * doc/index.html, netdoc.xsl: Add gnome. + + * gdk/Event.cs: New manual wrap for GdkEvent. + + * generator/ClassBase.cs: Add methods GetProperty, + GetPropertyRecursively, GetMethodRecursively. + Move Parent property here from ObjectGen.cs. Pass this pointer + into Property. + + * generator/Ctor.cs: Generate docs. + + * generator/Method.cs, Property.cs: Tag method as "new" if a + Method/Property with the same name is found in the class hierarchy. + + * generator/SignalHandler.cs: Correctly wrap complex signal argument + types. Add gnome directory. + + * generator/SymbolTable.cs: Add manually wrapped types hash + (contains GLib.GSList and Gdk.Event). Add method IsManuallyWrapped. + + * glib/SList.cs: Add constructor from IntPtr. + + * glue/slist.c, glue/event.c: Added (field accessor glue). + + * glue/Makefile.am: Update. + + * parser/Gtk.metadata: Add new signal renames for new signals + exposed by GdkEvent changes. + + * parser/README, parser/build.pl: Add libgnome, libgnomecanvas, + libgnomeui. + + * parser/gapi2xml.pl: Handle literal-length array parameters, + and NULL property doc strings. + + * sample/: Add new test GnomeHelloWorld.cs. + + * gnome/: Added. + + * parser/Gnome.metadata: Added. + 2002-06-25 Mike Kestner * generator/gtkapi.xml : lots of fixes, plus GtkHTML! diff --git a/configure.in b/configure.in index 3c5fdbd24..3f98b9d6e 100644 --- a/configure.in +++ b/configure.in @@ -81,6 +81,7 @@ pango/Makefile atk/Makefile gdk/Makefile gtk/Makefile +gnome/Makefile sample/Makefile ]) diff --git a/doc/atk-sharp-docs.xml b/doc/atk-sharp-docs.xml index ab8807928..9b825dbf3 100644 --- a/doc/atk-sharp-docs.xml +++ b/doc/atk-sharp-docs.xml @@ -237,6 +237,10 @@ + + StateSet Constructor + To be completed + IsEmpty Method To be completed @@ -1113,6 +1117,10 @@ AccessibleType Property To be completed + + NoOpObjectFactory Constructor + To be completed + Layer enumeration @@ -1158,6 +1166,10 @@ + + NoOpObject Constructor + To be completed + PropertyValues Struct @@ -1168,6 +1180,10 @@ + + RelationSet Constructor + To be completed + GetRelation Method To be completed @@ -1214,6 +1230,10 @@ + + Relation Constructor + To be completed + RelationType Property To be completed diff --git a/doc/gdk-sharp-docs.xml b/doc/gdk-sharp-docs.xml index 3562391f2..8105cf45d 100644 --- a/doc/gdk-sharp-docs.xml +++ b/doc/gdk-sharp-docs.xml @@ -264,6 +264,10 @@ + + Image Constructor + To be completed + GetPixel Method To be completed @@ -571,6 +575,30 @@ + + Pixbuf Constructor + To be completed + + + Pixbuf Constructor + To be completed + + + Pixbuf Constructor + To be completed + + + Pixbuf Constructor + To be completed + + + Pixbuf Constructor + To be completed + + + Pixbuf Constructor + To be completed + Scale Method To be completed @@ -676,6 +704,10 @@ + + PixbufAnimation Constructor + To be completed + IsStaticImage Method To be completed @@ -1106,6 +1138,10 @@ + + Window Constructor + To be completed + PeekChildren Method To be completed @@ -1539,6 +1575,10 @@ + + Colormap Constructor + To be completed + FreeColors Method To be completed @@ -1979,6 +2019,10 @@ + + DragContext Constructor + To be completed + Device Class @@ -2920,6 +2964,14 @@ + + PixbufLoader Constructor + To be completed + + + PixbufLoader Constructor + To be completed + Close Method To be completed @@ -3062,11 +3114,23 @@ + + Pixmap Constructor + To be completed + GC Class + + GC Constructor + To be completed + + + GC Constructor + To be completed + SetDashes Method To be completed diff --git a/doc/glib-sharp-docs.xml b/doc/glib-sharp-docs.xml index 0819c559d..fbdfad474 100644 --- a/doc/glib-sharp-docs.xml +++ b/doc/glib-sharp-docs.xml @@ -375,6 +375,15 @@ Constructs a Value from a specified uint. + + + Value Constructor + + + + Constructs a Value from a specified enum wrapper. + + Value to Boolean Conversion @@ -441,6 +450,18 @@ object value. + + + Value to Unresolved Object Conversion + + + + Extracts an object from a Value without looking up its wrapping + class. + Note, this method will produce an exception if the Value does + not hold a object value. + + Value to Pointer Conversion @@ -474,6 +495,17 @@ unsigned integer value. + + + Value to Enum Conversion + + + + Extracts an enum from a Value. Note, this method + will produce an exception if the Value does not hold an + enum value. + + Handle Property diff --git a/doc/gtk-sharp-docs.xml b/doc/gtk-sharp-docs.xml index 0e8a915e2..a8373f3d4 100644 --- a/doc/gtk-sharp-docs.xml +++ b/doc/gtk-sharp-docs.xml @@ -87,6 +87,10 @@ EnsureStyle Method To be completed + + SendExpose Method + To be completed + TranslateCoordinates Method To be completed @@ -255,6 +259,10 @@ CreatePangoLayout Method To be completed + + ProcessEvent Method + To be completed + GrabFocus Method To be completed @@ -395,11 +403,6 @@ - - ShowHelp Event - - - PropertyNotifyEvent Event @@ -420,6 +423,11 @@ + + HelpShown Event + + + DeleteEvent Event @@ -460,6 +468,11 @@ + + Event Event + + + SelectionRequestEvent Event @@ -906,6 +919,10 @@ + + VPaned Constructor + To be completed + Label Class @@ -952,6 +969,14 @@ + + Label Constructor + To be completed + + + Label Constructor + To be completed + GetSelectionBounds Method To be completed @@ -1125,11 +1150,19 @@ Value Property To be completed + + VScrollbar Constructor + To be completed + Layout Class + + Layout Constructor + To be completed + Put Method To be completed @@ -1501,6 +1534,10 @@ + + List Constructor + To be completed + PrependItems Method To be completed @@ -1617,6 +1654,10 @@ + + TreeViewColumn Constructor + To be completed + AddAttribute Method To be completed @@ -1810,6 +1851,10 @@ Layout Property To be completed + + VButtonBox Constructor + To be completed + ItemFactoryItem Struct @@ -1820,6 +1865,10 @@ + + Notebook Constructor + To be completed + AppendPage Method To be completed @@ -2024,6 +2073,10 @@ Child Property To be completed + + Window Constructor + To be completed + BeginMoveDrag Method To be completed @@ -2218,6 +2271,11 @@ + + FrameEvent Event + + + FocusActivated Event @@ -2287,6 +2345,10 @@ The default Size of the Window in Screen Coordinates. + + Plug Constructor + To be completed + Construct Method To be completed @@ -2362,6 +2424,14 @@ + + ListItem Constructor + To be completed + + + ListItem Constructor + To be completed + Deselect Method To be completed @@ -2440,6 +2510,22 @@ + + Button Constructor + To be completed + + + Button Constructor + To be completed + + + Button Constructor + To be completed + + + Button Constructor + To be completed + Press Method To be completed @@ -2510,6 +2596,10 @@ + + OptionMenu Constructor + To be completed + RemoveMenu Method To be completed @@ -2772,6 +2862,10 @@ + + ListStore Constructor + To be completed + Clear Method To be completed @@ -2827,6 +2921,309 @@ + + HTML Class + + + + + HTML Constructor + To be completed + + + HTML Constructor + To be completed + + + SetEditorApi Method + To be completed + + + GetObjectById Method + To be completed + + + ImagePreload Method + To be completed + + + ModifyIndentByDelta Method + To be completed + + + Copy Method + To be completed + + + SelectParagraph Method + To be completed + + + InsertHtml Method + To be completed + + + SelectParagraphExtended Method + To be completed + + + Redo Method + To be completed + + + Paste Method + To be completed + + + Command Method + To be completed + + + ToggleFontStyle Method + To be completed + + + EditMakeCursorVisible Method + To be completed + + + SelectWord Method + To be completed + + + ZoomOut Method + To be completed + + + ZoomReset Method + To be completed + + + EnableDebug Method + To be completed + + + ImageRef Method + To be completed + + + SelectLine Method + To be completed + + + UpdateStyles Method + To be completed + + + InsertGtkHtml Method + To be completed + + + AppendHtml Method + To be completed + + + DropUndo Method + To be completed + + + ImagesRef Method + To be completed + + + LoadEmpty Method + To be completed + + + JumpToAnchor Method + To be completed + + + Export Method + To be completed + + + Cut Method + To be completed + + + LoadFromString Method + To be completed + + + AllowSelection Method + To be completed + + + SelectAll Method + To be completed + + + Undo Method + To be completed + + + SetFontStyle Method + To be completed + + + ImagesUnref Method + To be completed + + + ZoomIn Method + To be completed + + + Save Method + To be completed + + + HasUndo Method + To be completed + + + ImageUnref Method + To be completed + + + GetUrlBaseRelative Method + To be completed + + + CurrentParagraphStyleChanged Event + + + + + SetBase Event + + + + + CursorMove Event + + + + + CurrentParagraphIndentationChanged Event + + + + + SizeChanged Event + + + + + SetBaseTarget Event + + + + + Redirect Event + + + + + CurrentParagraphAlignmentChanged Event + + + + + OnUrl Event + + + + + Submit Event + + + + + InsertionFontStyleChanged Event + + + + + LinkClicked Event + + + + + IframeCreated Event + + + + + Scroll Event + + + + + TitleChanged Event + + + + + OnCommand Event + + + + + InsertionColorChanged Event + + + + + LoadDone Event + + + + + Title Property + To be completed + + + Base Property + To be completed + + + DefaultContentType Property + To be completed + + + Editable Property + To be completed + + + ParagraphStyle Property + To be completed + + + Indent Property + To be completed + + + AllowFrameset Property + To be completed + + + ParagraphAlignment Property + To be completed + + + Magnification Property + To be completed + + + DefaultBackgroundColor Property + To be completed + + + Blocking Property + To be completed + PreviewInfo Struct @@ -2935,6 +3332,10 @@ + + Menu Constructor + To be completed + AttachToWidget Method To be completed @@ -2997,6 +3398,10 @@ + + SizeGroup Constructor + To be completed + RemoveWidget Method To be completed @@ -3170,6 +3575,10 @@ + + VBox Constructor + To be completed + MenuDirectionType enumeration @@ -3200,6 +3609,10 @@ + + MenuBar Constructor + To be completed + CellPixText Struct @@ -3210,6 +3623,18 @@ + + MenuItem Constructor + To be completed + + + MenuItem Constructor + To be completed + + + MenuItem Constructor + To be completed + RemoveSubmenu Method To be completed @@ -3325,10 +3750,18 @@ SetFixedSize Method To be completed + + StartEditing Method + To be completed + GetFixedSize Method To be completed + + Activate Method + To be completed + Render Method To be completed @@ -3387,6 +3820,10 @@ + + CellRendererToggle Constructor + To be completed + Activatable Property @@ -3442,6 +3879,14 @@ + + TreeItem Constructor + To be completed + + + TreeItem Constructor + To be completed + Deselect Method To be completed @@ -3486,6 +3931,18 @@ + + ToggleButton Constructor + To be completed + + + ToggleButton Constructor + To be completed + + + ToggleButton Constructor + To be completed + Toggle Method To be completed @@ -3514,11 +3971,27 @@ Mode Property To be completed + + CheckButton Constructor + To be completed + + + CheckButton Constructor + To be completed + + + CheckButton Constructor + To be completed + ColorSelection Class + + ColorSelection Constructor + To be completed + IsAdjusting Method To be completed @@ -3620,6 +4093,10 @@ + + Dialog Constructor + To be completed + Respond Method To be completed @@ -3834,6 +4311,10 @@ + + TextBuffer Constructor + To be completed + SetText Method To be completed @@ -4371,6 +4852,10 @@ + + Socket Constructor + To be completed + AddId Method To be completed @@ -4514,6 +4999,10 @@ + + ScrolledWindow Constructor + To be completed + AddWithViewport Method To be completed @@ -4595,6 +5084,10 @@ + + Pixmap Constructor + To be completed + Set Method To be completed @@ -4643,6 +5136,10 @@ + + Frame Constructor + To be completed + SetLabelAlign Method To be completed @@ -4681,6 +5178,10 @@ + + AspectFrame Constructor + To be completed + Set Method To be completed @@ -4785,6 +5286,14 @@ + + CList Constructor + To be completed + + + CList Constructor + To be completed + UnselectRow Method To be completed @@ -5017,6 +5526,91 @@ UndoSelection Method To be completed + + ToggleAddMode Event + + + + + StartSelection Event + + + + + SelectionUndone Event + + + + + RowUnselected Event + + + + + SetScrollAdjustments Event + + + + + EndSelection Event + + + + + ClickColumn Event + + + + + AllSelected Event + + + + + AllUnselected Event + + + + + ScrollHorizontal Event + + + + + RowSelected Event + + + + + RowMoved Event + + + + + AbortColumnResize Event + + + + + ToggleFocusRow Event + + + + + ResizeColumn Event + + + + + ScrollVertical Event + + + + + ExtendSelection Event + + + ShadowType Property To be completed @@ -5156,6 +5750,10 @@ + + ProgressBar Constructor + To be completed + Pulse Method To be completed @@ -5395,6 +5993,10 @@ + + VRuler Constructor + To be completed + RcContext Struct @@ -5405,6 +6007,10 @@ + + Toolbar Constructor + To be completed + AppendSpace Method To be completed @@ -5506,6 +6112,14 @@ + + TreeView Constructor + To be completed + + + TreeView Constructor + To be completed + WidgetToTreeCoords Method To be completed @@ -5813,6 +6427,14 @@ + + VScale Constructor + To be completed + + + VScale Constructor + To be completed + Clipboard Struct @@ -5863,6 +6485,18 @@ + + CheckMenuItem Constructor + To be completed + + + CheckMenuItem Constructor + To be completed + + + CheckMenuItem Constructor + To be completed + Toggle Method To be completed @@ -5882,6 +6516,18 @@ + + RadioMenuItem Constructor + To be completed + + + RadioMenuItem Constructor + To be completed + + + RadioMenuItem Constructor + To be completed + Group Property To be completed @@ -5921,6 +6567,30 @@ + + RadioButton Constructor + To be completed + + + RadioButton Constructor + To be completed + + + RadioButton Constructor + To be completed + + + RadioButton Constructor + To be completed + + + RadioButton Constructor + To be completed + + + RadioButton Constructor + To be completed + Group Property To be completed @@ -5945,6 +6615,10 @@ + + TipsQuery Constructor + To be completed + SetLabels Method To be completed @@ -6001,6 +6675,10 @@ + + RcStyle Constructor + To be completed + Ref Method To be completed @@ -6118,6 +6796,10 @@ + + Tooltips Constructor + To be completed + Disable Method To be completed @@ -6263,6 +6945,10 @@ + + Text Constructor + To be completed + Thaw Method To be completed @@ -6364,6 +7050,10 @@ + + SeparatorMenuItem Constructor + To be completed + Separator Class @@ -6499,6 +7189,10 @@ RemoveWidget Method To be completed + + StartEditing Method + To be completed + FinishEditing Method To be completed @@ -6513,6 +7207,10 @@ + + Entry Constructor + To be completed + GetLayoutOffsets Method To be completed @@ -6616,6 +7314,14 @@ Layout Property To be completed + + SpinButton Constructor + To be completed + + + SpinButton Constructor + To be completed + SetIncrements Method To be completed @@ -6713,6 +7419,10 @@ + + Arrow Constructor + To be completed + Set Method To be completed @@ -6797,6 +7507,14 @@ + + HBox Constructor + To be completed + + + Statusbar Constructor + To be completed + Push Method To be completed @@ -6832,6 +7550,10 @@ + + Style Constructor + To be completed + Attach Method To be completed @@ -6890,6 +7612,10 @@ + + TextTagTable Constructor + To be completed + Lookup Method To be completed @@ -6930,6 +7656,14 @@ + + CTree Constructor + To be completed + + + CTree Constructor + To be completed + Select Method To be completed @@ -7146,6 +7880,36 @@ NodeGetSelectable Method To be completed + + TreeUnselectRow Event + + + + + TreeExpand Event + + + + + TreeCollapse Event + + + + + TreeMove Event + + + + + ChangeFocusRowExpansion Event + + + + + TreeSelectRow Event + + + Spacing Property To be completed @@ -7175,6 +7939,10 @@ + + Table Constructor + To be completed + AttachDefaults Method To be completed @@ -7241,6 +8009,10 @@ + + TearoffMenuItem Constructor + To be completed + TreeViewPrivate Struct @@ -7266,6 +8038,14 @@ + + TextTag Constructor + To be completed + + + ProcessEvent Method + To be completed + Style Property @@ -7436,6 +8216,11 @@ + + Event Event + + + Priority Property To be completed @@ -7445,6 +8230,10 @@ + + TreeStore Constructor + To be completed + Clear Method To be completed @@ -7503,6 +8292,10 @@ + + TextChildAnchor Constructor + To be completed + Deleted Property To be completed @@ -7576,6 +8369,10 @@ + + Tree Constructor + To be completed + RemoveItem Method To be completed @@ -7692,6 +8489,14 @@ + + TextView Constructor + To be completed + + + TextView Constructor + To be completed + GetBorderWindowSize Method To be completed @@ -8000,6 +8805,10 @@ + + AccelGroup Constructor + To be completed + DisconnectKey Method To be completed @@ -8042,11 +8851,100 @@ + + HTMLFontStyle enumeration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AccelLabel Class + + AccelLabel Constructor + To be completed + Refetch Method To be completed @@ -8065,16 +8963,44 @@ AccelWidth Property To be completed + + HTMLEtchStyle enumeration + + + + + + + + + + + + + + + + + + VSeparator Class + + VSeparator Constructor + To be completed + Viewport Class + + Viewport Constructor + To be completed + ShadowType Property @@ -8100,6 +9026,10 @@ + + Calendar Constructor + To be completed + Thaw Method To be completed @@ -8201,6 +9131,10 @@ + + WindowGroup Constructor + To be completed + AddWindow Method To be completed @@ -8223,6 +9157,10 @@ + + CellRendererText Constructor + To be completed + Scale Property @@ -8377,6 +9315,10 @@ + + Adjustment Constructor + To be completed + ClampPage Method To be completed @@ -8408,6 +9350,10 @@ + + ColorSelectionDialog Constructor + To be completed + CTreeNode Struct @@ -8418,6 +9364,10 @@ + + Alignment Constructor + To be completed + Set Method To be completed @@ -8482,6 +9432,10 @@ + + CellRendererPixbuf Constructor + To be completed + PixbufExpanderOpen Property @@ -8527,6 +9481,10 @@ + + Combo Constructor + To be completed + SetItemString Method To be completed @@ -8607,6 +9565,14 @@ + + DrawingArea Constructor + To be completed + + + Curve Constructor + To be completed + GetVector Method To be completed @@ -8822,11 +9788,19 @@ + + EventBox Constructor + To be completed + FileSelection Class + + FileSelection Constructor + To be completed + Complete Method To be completed @@ -8863,6 +9837,10 @@ + + FontSelection Constructor + To be completed + FontName Property @@ -8883,6 +9861,10 @@ + + Fixed Constructor + To be completed + Move Method To be completed @@ -8910,6 +9892,10 @@ + + FontSelectionDialog Constructor + To be completed + SetFontName Method To be completed @@ -8927,41 +9913,77 @@ + + GammaCurve Constructor + To be completed + HButtonBox Class + + HButtonBox Constructor + To be completed + HPaned Class + + HPaned Constructor + To be completed + HRuler Class + + HRuler Constructor + To be completed + HScale Class + + HScale Constructor + To be completed + + + HScale Constructor + To be completed + HScrollbar Class + + HScrollbar Constructor + To be completed + HSeparator Class + + HSeparator Constructor + To be completed + HandleBox Class + + HandleBox Constructor + To be completed + SnapEdge Property @@ -8997,6 +10019,36 @@ + + DeleteSurrounding Event + + + + + PreeditChanged Event + + + + + Commit Event + + + + + RetrieveSurrounding Event + + + + + PreeditStart Event + + + + + PreeditEnd Event + + + IMContextSimple Class @@ -9012,6 +10064,10 @@ + + IconFactory Constructor + To be completed + AddDefault Method To be completed @@ -9088,6 +10144,38 @@ + + Image Constructor + To be completed + + + Image Constructor + To be completed + + + Image Constructor + To be completed + + + Image Constructor + To be completed + + + Image Constructor + To be completed + + + Image Constructor + To be completed + + + Image Constructor + To be completed + + + Image Constructor + To be completed + SetFromPixmap Method To be completed @@ -9185,6 +10273,22 @@ + + ImageMenuItem Constructor + To be completed + + + ImageMenuItem Constructor + To be completed + + + ImageMenuItem Constructor + To be completed + + + ImageMenuItem Constructor + To be completed + Image Property @@ -9210,6 +10314,10 @@ + + InputDialog Constructor + To be completed + EnableDevice Event @@ -9265,6 +10373,10 @@ + + ItemFactory Constructor + To be completed + Popup Method To be completed @@ -9326,6 +10438,10 @@ + + Invisible Constructor + To be completed + KeyHash Struct @@ -9346,11 +10462,885 @@ + + HTMLStreamStatus enumeration + + + + + + + + + + + + + + + HTMLParagraphAlignment enumeration + + + + + + + + + + + + + + + + + + + + HTMLEditorAPI Struct + + + + + HTMLCommandType enumeration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTMLParagraphStyle enumeration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTMLCursorSkipType enumeration + + + + + + + + + + + + + + + + + + + + + + + + + HTMLEditorEventType enumeration + + + + + + + + + + + + + + + + + + + + + + + HSV Class + + HSV Constructor + To be completed + SetMetrics Method To be completed @@ -9371,6 +11361,16 @@ GetColor Method To be completed + + Move Event + + + + + Changed Event + + + Application Class diff --git a/doc/index.html b/doc/index.html index cdffdeb7e..b37b10525 100644 --- a/doc/index.html +++ b/doc/index.html @@ -11,7 +11,8 @@ Documentation on the following assemblies is available: -

Last updated Monday, June 24 2002

+ +

Last updated Wednesday, June 25 2002

Rachel Hestilow (hestilow at ximian.com)

diff --git a/doc/introspect.cs b/doc/introspect.cs index 5f49a6203..be61c92e8 100644 --- a/doc/introspect.cs +++ b/doc/introspect.cs @@ -37,7 +37,7 @@ namespace GtkSharp.DocGeneration { primitives["System.Void"] = "void"; /* FIXME: mcs does not support Assembly.GetReferencedAssemblies*/ - foreach (string asm in new string[] {"glib", "atk", "pango", "gdk"}) { + foreach (string asm in new string[] {"glib", "atk", "pango", "gdk", "gtk", "gnome"}) { string key = asm + "-sharp"; assemblies[key] = Assembly.Load (key); } @@ -63,9 +63,10 @@ namespace GtkSharp.DocGeneration { } else isArray = false; + if (type.IsArray) Console.WriteLine ("hi " + full); if (primitives.Contains (full)) { string ret = (string) primitives[full]; - if (isArray) ret += "[]"; + if (isArray || type.IsArray) ret += "[]"; return ret; } else { if (String.Compare (full, 0, current_ns, 0, current_ns.Length) == 0) { @@ -93,6 +94,7 @@ namespace GtkSharp.DocGeneration { MethodBase method = null; MethodBase[] methods; + if (isCtor) { MemberInfo[] bases = type.FindMembers (MemberTypes.Constructor | MemberTypes.Method, BindingFlags.Public | BindingFlags.Instance, Type.FilterName, ".ctor"); @@ -138,7 +140,8 @@ namespace GtkSharp.DocGeneration { XmlElement arg_node = (XmlElement) doc.CreateNode ("element", "argument", ""); args_node.AppendChild (arg_node); arg_node.SetAttribute ("modifiers", modifiers); - arg_node.SetAttribute ("type", StringifyType (signature[i])); + if (p.ParameterType.IsArray) { Console.WriteLine (p.ParameterType); } + arg_node.SetAttribute ("type", StringifyType (p.ParameterType)); arg_node.SetAttribute ("name", p.Name); i++; } diff --git a/doc/makefile.common b/doc/makefile.common index ce38744c6..dec6875f7 100644 --- a/doc/makefile.common +++ b/doc/makefile.common @@ -1,4 +1,4 @@ -TARGETS = glib pango atk gdk gtk +TARGETS = glib pango atk gdk gtk gnome output_files = $(TARGETS:=-sharp-docs.html) input_files = $(TARGETS:=-sharp-docs.xml) stage1_files = $(TARGETS:=-sharp-docs-stage1.xml) diff --git a/doc/netdoc.xsl b/doc/netdoc.xsl index 0e97da5e2..b2015884e 100644 --- a/doc/netdoc.xsl +++ b/doc/netdoc.xsl @@ -131,7 +131,7 @@ abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ - + -sharp-docs.html# diff --git a/doc/pango-sharp-docs.xml b/doc/pango-sharp-docs.xml index 7b96c3f09..999e4f17a 100644 --- a/doc/pango-sharp-docs.xml +++ b/doc/pango-sharp-docs.xml @@ -40,6 +40,10 @@ + + Layout Constructor + To be completed + GetLogAttrs Method To be completed @@ -691,6 +695,10 @@ + + Context Constructor + To be completed + ListFamilies Method To be completed diff --git a/gdk/Event.cs b/gdk/Event.cs new file mode 100644 index 000000000..60d042ebd --- /dev/null +++ b/gdk/Event.cs @@ -0,0 +1,28 @@ +// Gdk.Event.cs - Custom event wrapper +// +// Author: Rachel Hestilow +// +// (c) 2002 Rachel Hestilow + + +namespace Gdk { + + using System; + using System.Collections; + using System.Runtime.InteropServices; + + public class Event : GLib.Object { + + [DllImport("gtksharpglue")] + static extern EventType gtksharp_gdk_event_get_event_type (IntPtr evt); + + public Event(IntPtr raw) : base(raw) {} + + public EventType Type { + get { + return gtksharp_gdk_event_get_event_type (Handle); + } + } + } + +} diff --git a/generator/ClassBase.cs b/generator/ClassBase.cs index ab53dfdb8..55fa4639e 100644 --- a/generator/ClassBase.cs +++ b/generator/ClassBase.cs @@ -30,6 +30,13 @@ namespace GtkSharp.Generation { } } + public ClassBase Parent { + get { + string parent = Elem.GetAttribute("parent"); + return SymbolTable.GetClassGen(parent); + } + } + protected ClassBase (XmlElement ns, XmlElement elem) : base (ns, elem) { foreach (XmlNode node in elem.ChildNodes) { XmlElement member = (XmlElement) node; @@ -40,7 +47,7 @@ namespace GtkSharp.Generation { break; case "property": - props.Add (member.GetAttribute ("name"), new Property (member)); + props.Add (member.GetAttribute ("name"), new Property (member, this)); break; case "signal": @@ -170,5 +177,35 @@ namespace GtkSharp.Generation { { return (Method) methods[name]; } + + public Property GetProperty (string name) + { + return (Property) props[name]; + } + + public virtual Method GetMethodRecursively (string name) + { + ClassBase klass = this; + Method m = null; + while (klass != null && m == null) { + m = (Method) klass.GetMethod (name); + klass = klass.Parent; + } + + return m; + } + + public virtual Property GetPropertyRecursively (string name) + { + ClassBase klass = this; + Property p = null; + while (klass != null && p == null) { + p = (Property) klass.GetProperty (name); + klass = klass.Parent; + } + + return p; + } + } } diff --git a/generator/Ctor.cs b/generator/Ctor.cs index 89c210a0e..a5cb71603 100644 --- a/generator/Ctor.cs +++ b/generator/Ctor.cs @@ -86,6 +86,8 @@ namespace GtkSharp.Generation { sw.WriteLine("\t\tstatic extern " + safety + "IntPtr " + cname + isig); sw.WriteLine(); + sw.WriteLine("\t\t/// " + name + " Constructor "); + sw.WriteLine("\t\t/// To be completed "); if (clashes > 0 && !Preferred) { String mname = cname.Substring(cname.IndexOf("new")); mname = mname.Substring(0,1).ToUpper() + mname.Substring(1); diff --git a/generator/Method.cs b/generator/Method.cs index 005ed2158..c4d409876 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -179,7 +179,7 @@ namespace GtkSharp.Generation { sw.Write(Name.Substring (3)); sw.WriteLine(" { "); } else { - if (elem.HasAttribute("new_flag")) + if (elem.HasAttribute("new_flag") || (container_type.Parent != null && container_type.Parent.GetMethodRecursively (Name) != null)) sw.Write("new "); sw.Write(s_ret + " " + Name + sig); } @@ -258,6 +258,8 @@ namespace GtkSharp.Generation { /* we are generated by the get Method, if there is one */ if (is_set || is_get) { + if (container_type.GetProperty (Name.Substring (3)) != null) + return; comp = GetComplement (); if (comp != null && comp.Validate () && is_set && parms.AccessorReturnType == comp.s_ret) return; diff --git a/generator/ObjectGen.cs b/generator/ObjectGen.cs index a91690298..6af355e19 100644 --- a/generator/ObjectGen.cs +++ b/generator/ObjectGen.cs @@ -39,13 +39,6 @@ namespace GtkSharp.Generation { } } - private ObjectGen Parent { - get { - string parent = Elem.GetAttribute("parent"); - return (ObjectGen) SymbolTable.GetClassGen(parent); - } - } - public void Generate () { StreamWriter sw = CreateWriter (); diff --git a/generator/Property.cs b/generator/Property.cs index b39bcffd1..7ad20e11c 100644 --- a/generator/Property.cs +++ b/generator/Property.cs @@ -14,10 +14,18 @@ namespace GtkSharp.Generation { public class Property { private XmlElement elem; + private ClassBase container_type; - public Property (XmlElement elem) + public string Name { + get { + return elem.GetAttribute ("name"); + } + } + + public Property (XmlElement elem, ClassBase container_type) { this.elem = elem; + this.container_type = container_type; } public bool Validate () @@ -45,6 +53,10 @@ namespace GtkSharp.Generation { { string c_type = elem.GetAttribute("type"); string cs_type = SymbolTable.GetCSType(c_type); + string modifiers = ""; + + if (elem.HasAttribute("new_flag") || (container_type.Parent != null && container_type.Parent.GetPropertyRecursively (Name) != null)) + modifiers = "new "; XmlElement parent = (XmlElement) elem.ParentNode; string name = elem.GetAttribute("name"); @@ -76,7 +88,7 @@ namespace GtkSharp.Generation { sw.WriteLine("\t\t/// "); sw.WriteLine("\t\t/// "); - sw.WriteLine("\t\tpublic " + cs_type + " " + name + " {"); + sw.WriteLine("\t\tpublic " + modifiers + cs_type + " " + name + " {"); if (elem.HasAttribute("readable")) { sw.WriteLine("\t\t\tget {"); sw.WriteLine("\t\t\t\tGLib.Value val = new GLib.Value (Handle, " + cname + ");"); diff --git a/generator/SignalHandler.cs b/generator/SignalHandler.cs index e17909eb6..425fcafc6 100644 --- a/generator/SignalHandler.cs +++ b/generator/SignalHandler.cs @@ -90,6 +90,8 @@ namespace GtkSharp.Generation { dir = ".." + sep + "atk" + sep + "generated"; } else if (key.IndexOf("Pango") >= 0) { dir = ".." + sep + "pango" + sep + "generated"; + } else if (key.IndexOf("Gnome") >= 0) { + dir = ".." + sep + "gnome" + sep + "generated"; } else { dir = ".." + sep + "glib" + sep + "generated"; } @@ -140,7 +142,13 @@ namespace GtkSharp.Generation { sw.Write("\t\t\targs.Args[" + (idx-1) + "] "); sw.WriteLine("= GLib.Object.GetObject(arg" + idx + ");"); } else { - sw.WriteLine("\t\t\targs.Args[" + (idx-1) + "] = arg" + idx + ";"); + string ctype = (string) parms[idx]; + sw.WriteLine("\t\t\targs.Args[" + (idx-1) + "] = " + SymbolTable.FromNative (ctype, "arg" + idx) + ";"); + ClassBase wrapper = SymbolTable.GetClassGen (ctype); + if ((wrapper != null && !(wrapper is InterfaceGen)) || SymbolTable.IsManuallyWrapped (ctype) || SymbolTable.IsBoxed (ctype)) { + sw.WriteLine("\t\t\tif (args.Args[" + (idx-1) + "] == null)"); + sw.WriteLine("\t\t\t\targs.Args[{0}] = new {1}(arg{2});", idx-1, SymbolTable.GetCSType (ctype), idx); + } } } sw.WriteLine("\t\t\tinst._handler (inst._obj, args);"); diff --git a/generator/SymbolTable.cs b/generator/SymbolTable.cs index 348185f8a..f13366158 100644 --- a/generator/SymbolTable.cs +++ b/generator/SymbolTable.cs @@ -14,6 +14,7 @@ namespace GtkSharp.Generation { private static Hashtable alias = new Hashtable (); private static Hashtable complex_types = new Hashtable (); private static Hashtable simple_types; + private static Hashtable manually_wrapped_types; private static Hashtable dlls; static SymbolTable () @@ -27,6 +28,7 @@ namespace GtkSharp.Generation { simple_types.Add ("gshort", "short"); simple_types.Add ("guint32", "uint"); simple_types.Add ("const-gchar", "string"); + simple_types.Add ("const-char", "string"); simple_types.Add ("gchar", "string"); simple_types.Add ("GObject", "GLib.Object"); simple_types.Add ("gfloat", "float"); @@ -62,11 +64,14 @@ namespace GtkSharp.Generation { simple_types.Add ("GArray", "System.IntPtr"); simple_types.Add ("GData", "System.IntPtr"); simple_types.Add ("GTypeModule", "GLib.Object"); - simple_types.Add ("GSList", "GLib.SList"); simple_types.Add ("GHashTable", "System.IntPtr"); simple_types.Add ("va_list", "System.IntPtr"); simple_types.Add ("GParamSpec", "System.IntPtr"); - + + manually_wrapped_types = new Hashtable (); + manually_wrapped_types.Add ("GdkEvent", "Gdk.Event"); + manually_wrapped_types.Add ("GSList", "GLib.SList"); + dlls = new Hashtable(); dlls.Add("Pango", "pango-1.0"); dlls.Add("Atk", "atk-1.0"); @@ -123,6 +128,13 @@ namespace GtkSharp.Generation { } else if (complex_types.ContainsKey(c_type)) { IGeneratable gen = (IGeneratable) complex_types[c_type]; return gen.FromNative(val); + } else if (manually_wrapped_types.ContainsKey(c_type)) { + // FIXME: better way of handling this? + if (c_type == "GSList") { + return "new GLib.SList (" + val + ")"; + } else { + return "(" + GetCSType (c_type) + ") GLib.Object.GetObject(" + val + ")"; + } } else { return ""; } @@ -137,6 +149,8 @@ namespace GtkSharp.Generation { } else if (complex_types.ContainsKey(c_type)) { IGeneratable gen = (IGeneratable) complex_types[c_type]; return gen.QualifiedName; + } else if (manually_wrapped_types.ContainsKey(c_type)) { + return (string) manually_wrapped_types[c_type]; } else { return ""; } @@ -146,8 +160,12 @@ namespace GtkSharp.Generation { { c_type = Trim(c_type); c_type = DeAlias(c_type); - if (simple_types.ContainsKey(c_type)) { - string stype = (string) simple_types[c_type]; + if (simple_types.ContainsKey(c_type) || manually_wrapped_types.ContainsKey(c_type)) { + string stype; + if (simple_types.ContainsKey(c_type)) + stype = (string) simple_types[c_type]; + else + stype = (string) manually_wrapped_types[c_type]; int dotidx = stype.IndexOf("."); if (dotidx == -1) { return stype; @@ -168,6 +186,8 @@ namespace GtkSharp.Generation { c_type = DeAlias(c_type); if (simple_types.ContainsKey(c_type)) { return (string) simple_types[c_type]; + } else if (manually_wrapped_types.ContainsKey(c_type)) { + return "IntPtr"; } else if (complex_types.ContainsKey(c_type)) { IGeneratable gen = (IGeneratable) complex_types[c_type]; return gen.MarshalType; @@ -182,6 +202,8 @@ namespace GtkSharp.Generation { c_type = DeAlias(c_type); if (simple_types.ContainsKey(c_type)) { return var_name; + } else if (manually_wrapped_types.ContainsKey(c_type)) { + return var_name + ".Handle"; } else if (complex_types.ContainsKey(c_type)) { IGeneratable gen = (IGeneratable) complex_types[c_type]; return gen.CallByName(var_name); @@ -251,6 +273,14 @@ namespace GtkSharp.Generation { } return false; } + + public static bool IsManuallyWrapped(string c_type) + { + c_type = Trim(c_type); + c_type = DeAlias(c_type); + return manually_wrapped_types.ContainsKey(c_type); + } + } } diff --git a/generator/gtkapi.xml b/generator/gtkapi.xml index 4f3f3ee3a..c0fd9df18 100644 --- a/generator/gtkapi.xml +++ b/generator/gtkapi.xml @@ -1,2 +1,2 @@ - + diff --git a/glib/SList.cs b/glib/SList.cs index efe145806..8dcb8e980 100644 --- a/glib/SList.cs +++ b/glib/SList.cs @@ -60,5 +60,20 @@ namespace GLib { return l; } } + + [DllImport("gtksharp")] + static extern IntPtr gtksharp_slist_get_data (IntPtr l); + [DllImport("gtksharp")] + static extern IntPtr gtksharp_slist_get_next (IntPtr l); + + public SList (IntPtr raw) + { + IntPtr l = raw; + while (l != IntPtr.Zero) { + Add (gtksharp_slist_get_data (l)); + l = gtksharp_slist_get_next (l); + } + } + } } diff --git a/glue/Makefile.am b/glue/Makefile.am index dd51b77fb..f6bec5a55 100644 --- a/glue/Makefile.am +++ b/glue/Makefile.am @@ -7,6 +7,8 @@ libgtksharpglue_la_SOURCES = \ textiter.c \ fileselection.c \ error.c \ + event.c \ + slist.c \ # libgtksharpglue.dll: $(libgtksharpglue_la_OBJECTS) libgtksharpglue.rc libgtksharpglue.def diff --git a/glue/event.c b/glue/event.c new file mode 100644 index 000000000..3d92e6211 --- /dev/null +++ b/glue/event.c @@ -0,0 +1,16 @@ +/* event.c : Glue to access fields in GdkEvent. + * + * Author: Rachel Hestilow + * + * 2002 Rachel Hestilow, Mike Kestner + */ + + +#include + +GdkEventType +gtksharp_gdk_event_get_event_type (GdkEvent *event) +{ + return event->type; +} + diff --git a/glue/slist.c b/glue/slist.c new file mode 100644 index 000000000..88d68efdd --- /dev/null +++ b/glue/slist.c @@ -0,0 +1,21 @@ +/* slist.c : Glue to access fields in GSList. + * + * Author: Rachel Hestilow + * + * 2002 Rachel Hestilow, Mike Kestner + */ + + +#include + +gpointer +gtksharp_slist_get_data (GSList *l) +{ + return l->data; +} + +GSList* +gtksharp_slist_get_next (GSList *l) +{ + return l->next; +} diff --git a/gnome/Makefile.in b/gnome/Makefile.in new file mode 100755 index 000000000..8bb3d6a33 --- /dev/null +++ b/gnome/Makefile.in @@ -0,0 +1,19 @@ +MCS=mcs + +all: linux + +windows: + $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /r:../gdk/gdk-sharp.dll /r:../gtk/gtk-sharp.dll /out:gnome-sharp.dll /recurse:*.cs + +linux: gnome-sharp.dll + +gnome-sharp.dll: generated/*.cs + $(MCS) --unsafe --target library -r System.Drawing -L ../glib -L ../pango -L ../atk -L ../gdk -L ../gtk -r glib-sharp -r pango-sharp -r atk-sharp -r gdk-sharp -r gtk-sharp -o gnome-sharp.dll --recurse '*.cs' + +clean: + rm -f *.dll + rm -f generated/* + +install: all + cp gnome-sharp.dll @prefix@/lib + diff --git a/gnome/makefile.win32 b/gnome/makefile.win32 new file mode 100644 index 000000000..0cead7c9f --- /dev/null +++ b/gnome/makefile.win32 @@ -0,0 +1,8 @@ +all: windows + +windows: + $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /r:../gdk/gdk-sharp.dll /r:../gtk/gtk-sharp.dll /out:gnome-sharp.dll /recurse:*.cs + +docs: + $(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /r:../gdk/gdk-sharp.dll /r:../gtk/gtk-sharp.dll /doc:gnome-sharp-docs.xml /out:gnome-sharp.dll /recurse:*.cs + diff --git a/makefile b/makefile index d9586f63c..dba0107a7 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -DIRS=generator glib pango atk gdk gtk sample +DIRS=generator glib pango atk gdk gtk gnome sample ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT))) CSC=$(ROOT)/microsoft.net/framework/v1.0.3705/csc.exe MCS=mcs diff --git a/parser/Gnome.metadata b/parser/Gnome.metadata new file mode 100644 index 000000000..5f13a380e --- /dev/null +++ b/parser/Gnome.metadata @@ -0,0 +1,152 @@ + + + + + + + Connect + + + + name + Connected + + + + + + Disconnect + + + + name + Disconnected + + + + + + Back + + + + name + BackClicked + + + + + + Finish + + + + name + FinishClicked + + + + + + Cancel + + + + name + CancelClicked + + + + + + Next + + + + name + NextClicked + + + + + + Prepare + + + + name + Prepared + + + + + + FocusIcon + + + + name + IconFocused + + + + + + GtkEntry + + + + name + GetGtkEntry + + + + + + Activate + + + + name + Activated + + + + + + SelectIcon + + + + name + IconSelected + + + + + + UnselectIcon + + + + name + IconUnselected + + + + + + + + gnome_about_new + + + + const-gchar** + array + 1 + + + + + diff --git a/parser/Gtk.metadata b/parser/Gtk.metadata index f32e75ac3..d5ec70dc6 100644 --- a/parser/Gtk.metadata +++ b/parser/Gtk.metadata @@ -281,7 +281,31 @@ - + + + ShowHelp + + + + name + HelpShown + + + + + + Event + + + Event + + + + name + ProcessEvent + + + InsertPixbuf @@ -403,6 +427,29 @@ + + + SelectRow + + + + name + RowSelected + + + + + + UnselectRow + + + + name + RowUnselected + + + + SelectChild diff --git a/parser/README b/parser/README index 8dbc5467f..3daae25aa 100644 --- a/parser/README +++ b/parser/README @@ -6,5 +6,8 @@ glib-2.0.3 pango-1.0.2 atk-1.0.2 gtk+-2.0.3 +libgnome-2.0.1 +libgnomecanvas-2.0.1 +libgnomeui-2.0.1 gtkhtml: cvs branch gnome-2-port files gtkhtml.[ch], gtkhtml-types.h and gtkhtml-enums.h diff --git a/parser/build.pl b/parser/build.pl index c4b89343d..62f809793 100755 --- a/parser/build.pl +++ b/parser/build.pl @@ -9,7 +9,10 @@ unlink ($file); "gtk+-2.0.3/gdk" => "Gdk:gdk-x11-2.0", "gtk+-2.0.3/gdk-pixbuf" => "Gdk:gdk_pixbuf-2.0", "gtk+-2.0.3/gtk" => "Gtk:gtk-x11-2.0", - "gtkhtml" => "Gtk:gtkhtml-2"); + "libgnome-2.0.1/libgnome" => "Gnome:gnome-2", + "libgnomecanvas-2.0.1/libgnomecanvas" => "Gnome:gnomecanvas-2", + "libgnomeui-2.0.1/libgnomeui" => "Gnome:gnomeui-2", + "gtkhtml/src" => "Gtk:gtkhtml-2"); foreach $dir (keys %srcs) { ($ns, $lib) = split (/:/, $srcs{$dir}); diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index fa939ec76..afa286b33 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -486,7 +486,7 @@ sub addParamsElem $parm =~ /(\S+)\s+(\S+)/; $parm_elem->setAttribute('type', $1); my $name = $2; - if ($name =~ /(\w+)\[\]/) { + if ($name =~ /(\w+)\[.*\]/) { $name = $1; $parm_elem->setAttribute('array', "true"); } @@ -518,7 +518,7 @@ sub addPropElem $name = $params[0]; $name =~ s/\"//g; - while ($params[2] !~ /\"\s*\)?$/) { + while ($params[2] !~ /(\"|NULL)\s*\)?$/) { die "Unable to reconstruct doc string.\n" if (!$params[3]); $params[2] .= ",$params[3]"; @params = (@params[0..2],@params[4..$#params]); diff --git a/sample/GnomeHelloWorld.cs b/sample/GnomeHelloWorld.cs new file mode 100644 index 000000000..507b83a37 --- /dev/null +++ b/sample/GnomeHelloWorld.cs @@ -0,0 +1,160 @@ +// GnomeHelloWorld.cs - Basic Gnome/Gnome.UI sample app +// +// Author: Rachel Hestilow +// +// (c) 2002 Rachel Hestilow + +namespace GtkSamples { + + using Gtk; + using Gdk; + using GtkSharp; + using Gnome; + using System; + using System.IO; + using System.Drawing; + using System.Runtime.InteropServices; + + public struct DemoEntry { + public string program; + public string desc; + public string icon; + + public DemoEntry (string program, string desc, string icon) + { + this.program = program; + this.desc = desc; + this.icon = icon; + } + } + + public class GnomeHelloWorld { + DemoEntry[] entries; + + public GnomeHelloWorld () { + entries = new DemoEntry [3]; + entries[0] = new DemoEntry ("button.exe", "Button", "gnome-ccdialog.png"); + entries[1] = new DemoEntry ("menu.exe", "Menu", "gnome-gmenu.png"); + entries[2] = new DemoEntry ("gtk-hello-world.exe", "Gtk# Hello World", "gnome-mdi.png"); + } + + string BaseName (string filename) + { + int ind = filename.LastIndexOf (Path.DirectorySeparatorChar); + if (ind != -1) + return filename.Substring (ind); + else + return filename; + } + + IconList CreateList () + { + IconList icons = new IconList (64, new Gtk.Adjustment (IntPtr.Zero), 0); + + foreach (DemoEntry entry in entries) + { + icons.Append ("pixmaps" + Path.DirectorySeparatorChar + entry.icon, + entry.desc); + } + + icons.IconSelected += new EventHandler (icon_selected_cb); + + return icons; + } + + Gtk.Widget CreateMenus () + { + MenuBar bar = new MenuBar (); + + Menu file_menu = new Menu (); + MenuItem file_menu_item = new MenuItem ("_File"); + file_menu_item.Submenu = file_menu; + + MenuItem file_exit = new MenuItem ("E_xit"); + file_exit.Activated += new EventHandler (exit_cb); + file_menu.Append (file_exit); + bar.Append (file_menu_item); + + Menu help_menu = new Menu (); + MenuItem help_menu_item = new MenuItem ("_Help"); + help_menu_item.Submenu = help_menu; + + MenuItem file_help = new MenuItem ("_About"); + file_help.Activated += new EventHandler (about_cb); + help_menu.Append (file_help); + bar.Append (help_menu_item); + + return bar; + } + + public Gtk.Window CreateWindow () + { + Gtk.Window win = new Gtk.Window ("Gnome# Hello World"); + win.DeleteEvent += new EventHandler (Window_Delete); + + VBox vbox = new VBox (false, 0); + vbox.PackStart (CreateMenus (), false, false, 0); + vbox.PackStart (new Label ("The following demos are available.\nTo run a demo, double click on its icon."), false, false, 4); + vbox.PackStart (CreateList (), true, true, 4); + + win.DefaultSize = new Size (250, 130); + win.Add (vbox); + + return win; + } + + public static int Main (string[] args) + { + Application.Init (); + + GnomeHelloWorld hello = new GnomeHelloWorld (); + Window win = hello.CreateWindow (); + win.ShowAll (); + Application.Run (); + return 0; + } + + static void Window_Delete (object obj, EventArgs args) + { + SignalArgs sa = (SignalArgs) args; + Application.Quit (); + sa.RetVal = true; + } + + static void exit_cb (object o, EventArgs args) + { + Application.Quit (); + } + + static void about_cb (object o, EventArgs args) + { + Pixbuf logo = new Pixbuf ("pixmaps" + Path.DirectorySeparatorChar + "gtk-sharp-logo.png"); + String[] authors = new string[] { + "Rachel Hestilow (hestilow@ximian.com)" + }; + string[] documentors = new string[] {}; + + About about = new About ("Gnome# Hello World", "0.0.1", + "Copyright (C) 2002 Rachel Hestilow", + "A test application for the GNOME .NET bindings", + authors, documentors, "", logo); + about.Show (); + } + + // Wonder what the .NET func to do this is...and if it + // is implemented in mono yet. + [DllImport("glib-2.0")] + static extern bool g_spawn_command_line_async (string command, IntPtr err); + + void icon_selected_cb (object obj, EventArgs args) + { + SignalArgs sa = (SignalArgs) args; + int idx = (int) sa.Args[0]; + Event ev = (Event) sa.Args[1]; + + if (ev.Type == EventType.TwoButtonPress) { + g_spawn_command_line_async ("mono " + entries[idx].program, IntPtr.Zero); + } + } + } +} diff --git a/sample/Makefile.in b/sample/Makefile.in index cdd65a95d..d4baf4823 100755 --- a/sample/Makefile.in +++ b/sample/Makefile.in @@ -1,7 +1,7 @@ MCS=mcs -local_paths=-L ../glib -L ../pango -L ../atk -L ../gdk -L ../gtk -all_assemblies=-r glib-sharp -r pango-sharp -r atk-sharp -r gdk-sharp -r gtk-sharp -r System.Drawing +local_paths=-L ../glib -L ../pango -L ../atk -L ../gdk -L ../gtk -L ../gnome +all_assemblies=-r glib-sharp -r pango-sharp -r atk-sharp -r gdk-sharp -r gtk-sharp -r gnome-sharp -r System.Drawing all: linux @@ -10,11 +10,14 @@ windows: $(CSC) /unsafe /out:gtk-hello-world.exe /r:../glib/glib-sharp.dll /r:../gtk/gtk-sharp.dll /r:../gdk/gdk-sharp.dll HelloWorld.cs $(CSC) /unsafe /out:button.exe /r:../glib/glib-sharp.dll /r:../gtk/gtk-sharp.dll ButtonApp.cs -linux: gtk-hello-world.exe button.exe menu.exe +linux: gtk-hello-world.exe button.exe menu.exe gnome-hello-world.exe gtk-hello-world.exe: HelloWorld.cs $(MCS) --unsafe -o gtk-hello-world.exe $(local_paths) $(all_assemblies) HelloWorld.cs +gnome-hello-world.exe: GnomeHelloWorld.cs + $(MCS) --unsafe -o gnome-hello-world.exe $(local_paths) $(all_assemblies) GnomeHelloWorld.cs + button.exe: ButtonApp.cs $(MCS) --unsafe -o button.exe $(local_paths) $(all_assemblies) ButtonApp.cs diff --git a/sample/pixmaps/gnome-ccdialog.png b/sample/pixmaps/gnome-ccdialog.png new file mode 100644 index 000000000..00044786a Binary files /dev/null and b/sample/pixmaps/gnome-ccdialog.png differ diff --git a/sample/pixmaps/gnome-gmenu.png b/sample/pixmaps/gnome-gmenu.png new file mode 100644 index 000000000..431813fa3 Binary files /dev/null and b/sample/pixmaps/gnome-gmenu.png differ diff --git a/sample/pixmaps/gnome-mdi.png b/sample/pixmaps/gnome-mdi.png new file mode 100644 index 000000000..fddedaa54 Binary files /dev/null and b/sample/pixmaps/gnome-mdi.png differ diff --git a/sample/pixmaps/gtk-sharp-logo.png b/sample/pixmaps/gtk-sharp-logo.png new file mode 100644 index 000000000..d218ec948 Binary files /dev/null and b/sample/pixmaps/gtk-sharp-logo.png differ diff --git a/sources/Gnome.metadata b/sources/Gnome.metadata new file mode 100644 index 000000000..5f13a380e --- /dev/null +++ b/sources/Gnome.metadata @@ -0,0 +1,152 @@ + + + + + + + Connect + + + + name + Connected + + + + + + Disconnect + + + + name + Disconnected + + + + + + Back + + + + name + BackClicked + + + + + + Finish + + + + name + FinishClicked + + + + + + Cancel + + + + name + CancelClicked + + + + + + Next + + + + name + NextClicked + + + + + + Prepare + + + + name + Prepared + + + + + + FocusIcon + + + + name + IconFocused + + + + + + GtkEntry + + + + name + GetGtkEntry + + + + + + Activate + + + + name + Activated + + + + + + SelectIcon + + + + name + IconSelected + + + + + + UnselectIcon + + + + name + IconUnselected + + + + + + + + gnome_about_new + + + + const-gchar** + array + 1 + + + + + diff --git a/sources/Gtk.metadata b/sources/Gtk.metadata index f32e75ac3..d5ec70dc6 100644 --- a/sources/Gtk.metadata +++ b/sources/Gtk.metadata @@ -281,7 +281,31 @@ - + + + ShowHelp + + + + name + HelpShown + + + + + + Event + + + Event + + + + name + ProcessEvent + + + InsertPixbuf @@ -403,6 +427,29 @@ + + + SelectRow + + + + name + RowSelected + + + + + + UnselectRow + + + + name + RowUnselected + + + + SelectChild diff --git a/sources/README b/sources/README index 8dbc5467f..3daae25aa 100644 --- a/sources/README +++ b/sources/README @@ -6,5 +6,8 @@ glib-2.0.3 pango-1.0.2 atk-1.0.2 gtk+-2.0.3 +libgnome-2.0.1 +libgnomecanvas-2.0.1 +libgnomeui-2.0.1 gtkhtml: cvs branch gnome-2-port files gtkhtml.[ch], gtkhtml-types.h and gtkhtml-enums.h