end with "callback, gpointer, GDestroyNotify", then mark the
callback as having "notified" Scope.
(Parameters.IsHidden): Hide user_data and GDestroyNotify after a
callback.
(Parameter.Scope): make this settable
(Parameter.IsDestroyNotify): new test
* generator/MethodBody.cs (Initialize): Handle "notified" callback
scope (using a GCHandle and GLib.DestroyHelper.NotifyHandler)
* generator/CallbackGen.cs (GenWrapper): Add a static
"GetManagedDelegate" method to the wrapper type, to translate a
native delegate back to its corresponding managed delegate.
(FromNative): use GetManagedDelegate.
* generator/ReturnValue.cs (Validate): We handle callback return
values now
* generator/SymbolTable.cs: marshal GDestroyNotify as
GLib.DestroyNotify
* glib/DestroyNotify.cs: Moved from gtk
* gtk/Gtk.metadata: globally change GtkDestroyNotify to
GDestroyNotify, but then change back the ones that are exposed in
the API. Un-hide lots of methods we can correctly autogenerate
now.
* gtk/DestroyHelper.cs: moved to glib
* gtk/*.custom: remove methods that are autogenerated now, add
Obsolete wrappers where needed, replace Gtk.DestroyHelper usage
with GLib.DestroyHelper.
* gdk/Gdk.metadata:
* gnome/Gnome.metadata: Turn Gdk.Drawable.SetData and
Gnome.IconList.SetIconDataFull's GDestroyNotify args into
gpointers so the generated API stays the same as it used to be.
* rsvg/Handle.custom: implement deprecated SetSizeCallback
* sample/GtkDemo/DemoIconView.cs (CreateSort): update for API
changes
svn path=/trunk/gtk-sharp/; revision=44020
parameter should be hidden in the managed sig (eg, because it's
user_data, or it's the length of the preceding array/string, etc).
(VisibleCount): the number of parameters that will actually be
exposed in the managed signature.
(IsAccessor): test VisibleCount, not Count
(AccessorReturnType, AccessorName): deal with the fact that the
accessor parameter might not be the first one.
* generator/CallbackGen.cs:
* generator/Signature.cs: use Parameters.IsHidden.
* generator/Method.cs (Initialize): set is_set based on
VisibleCount, not Count.
(Validate): call base.Validate() before Initialize() so that
VisibleCount will be correct in Initialize.
* generator/MethodBody.cs (GetCallString, CallArrayLength,
Initialize): update to deal with accessors with multiple args.
* gtk/Clipboard.custom (SetText): implement as an Obsolete variant
of the Text property
* gtk/IconTheme.custom (SearchPath, SetSearchPath): obsolete
SetSearchPath, implement a setter on SearchPath instead.
* gtk/ListStore.custom (SetColumnTypes):
* gtk/TreeStore.custom (SetColumnTypes): implement as an Obsolete
variant of the ColumnTypes property.
* glade/XML.custom (CustomHandler): implement as a property
(SetCustomHandler): Mark this obsolete
* glade/Global.custom (SetCustomHandler): deprecate in favor of
XML.CustomHandler.
* gnomedb/Editor.custom (SetText): implement as an Obsolete
variant of the Text property
svn path=/trunk/gtk-sharp/; revision=43898
param const
* glib/Marshaller.cs (Utf8PtrToString): Add an IntPtr[]->string[]
overload, since that's what we actually need in the case where
it's used (above). Leave the IntPtr[]->string[] overload of
PtrToStringGFree in case anyone is using it manually.
* gtk/Gtk.metadata: hide GtkModuleInitFunc and
GtkModuleDisplayInitFunc; they are the signatures of user-defined
methods that gtk only ever resolves via g_module_symbol(), so
they're not useful from C#. (And the marshalling was all wrong
anyway...)
svn path=/trunk/gtk-sharp/; revision=43461
and unmanaged interface declarations.
(Implements): check recursively
* generator/ObjectGen.cs (Generate): output managed interfaces
* gtk/Gtk.metadata: make Container implement IEnumerable
* gtk/Container.custom (GetEnumerator): implement (a simplified
form of Children).
(AllChildren): add this (which accumulates the results of
Forall()).
(ForAll): mark ForAll(bool,CallbackInvoker) obsolete and add a
ForAll(bool,Gtk.Callback) overload to replace it.
* sample/PolarFixed.cs: new silly but fully-functional demo of
how to subclass container.
* sample/CustomNotebook.cs: kill this, since it was really
complicated, and never fully functional.
* sample/GtkDemo/DemoImages.cs (ToggleSensitivity): Use foreach
directly on the container, rather than on its .Children.
svn path=/trunk/gtk-sharp/; revision=42805
* gdk/Gdk.metadata : hide some manually implemented callback methods.
* gdk/*.custom : implement several methods containing persistent
callback parameters.
* generator/BoxedGen.cs : set gen_info.CurrentType in Generate.
* generator/ClassGen.cs : set gen_info.CurrentType in Generate.
* generator/Ctor.cs : set gen_info.CurrentMember in Generate.
* generator/GenerationInfo.cs : add CurrentMember and CurrentType.
* generator/Method.cs : set gen_info.CurrentMember in Generate.
* generator/MethodBody.cs : always generate null guarding for array
parameters, and add a nag for callback parameters without a scope attr.
* generator/ObjectGen.cs : set gen_info.CurrentType in Generate.
* generator/OpaqueGen.cs : set gen_info.CurrentType in Generate.
* generator/Parameters.cs : kill NullOk. add Scope property.
* generator/StructGen.cs : set gen_info.CurrentType in Generate.
* gtk/Gtk.metadata : kill a few null_ok attrs.
* pango/Pango.metadata : mark the callback params as call scope. kill
a couple null_ok attrs.
svn path=/trunk/gtk-sharp/; revision=42529
* gtk/TreeStore.custom : fix a CLS incompliance in the Append
Prepend, Insert, InsertBefore, and InsertAfter methods by obsoleting
them and adding new *Node methods that are CLS compliant.
[Fixes#73876]
svn path=/trunk/gtk-sharp/; revision=42355
* glib/Makefile.am : add new file.
* glib/Object.cs : add protected PersistentData hash to hold data
across GC cycles.
* glib/WeakObject.cs : new object to hold managed refs weakly against
the native object.
* gtk/ListStore.custom : hold refs for DefaultSortFuncs.
* gtk/TreeModelSort.custom : hold refs for DefaultSortFuncs.
* gtk/TreeStore.custom : hold refs for DefaultSortFuncs.
svn path=/trunk/gtk-sharp/; revision=41740
* generator/ImportSignature.cs : out param handling fix.
* generator/Makefile.am : kill StringGen.cs.
* generator/MethodBody.cs : simplify out param handling.
* generator/StringGen.cs : kill it, now using MarshalGen.
* generator/SymbolTable.cs : make non-const strings use an appropriate
MarshalGen. Non-const strings are now correctly marshaled as Utf8.
* glib/Marshaller.cs : add some utf8-fu for strdup/free marshaling.
Add a method to alloc/copy structs to native memory, unused yet.
* gtk/Gtk.metadata : partially fix a broken delegate.
svn path=/trunk/gtk-sharp/; revision=41459
into the type name
* gtk/gtk-api.raw: Regen, exposing the previously-broken
AccelGroup.AccelActivate, AccelMap.Changed,
ActionGroup.ConnectProxy, ActionGroup.DisconnectProxy,
ActionGroup.PreActivate, ActionGroup.PostActivate, and
Widget.EventAfter.
* gtk/Gtk.metadata: Give proper names to the parameters of those
signals
svn path=/trunk/gtk-sharp/; revision=41111
valid type (or is hidden).
* generator/StructBase.cs (Validate): new, to check that all of
the struct fields have valid types
* generator/BoxedGen.cs (Generate):
* generator/StructGen.cs: (Generate): Call Validate() and bail out
if it fails; it's no good to generate a struct with the wrong
layout.
* gdk/gdk-symbols.xml: add a line for GdkKey -> Gdk.Key. (There's
no actual C type GdkKey, but we can use metadata to change uints
to GdkKeys, which will then become Gdk.Keys.)
* gtk/AccelKey.custom: remove the "Key" field (which was being
added in the wrong place in the struct), since it's properly
generated now.
* gtk/Gtk.metadata: Fix the line that renames AccelKey.AccelKey
to AccelKey.Key
* gnomevfs/Gnomevfs.metadata: hide the (mis-parsed) "action" field
in MimeAction, leaving the struct in the same broken state it was
in with the old generator code
svn path=/trunk/gtk-sharp/; revision=41104
they're generated wrong, and StyleGet to avoid an ellipsis
warning. (Also hide the deprecated ellipsis method "Set".)
* gtk/Widget.custom (StyleGetProperty): implement manually, a la
Gtk.Container.ChildGetProperty.
* gtk/glue/widget.c (gtksharp_widget_style_get_property): glue for that
svn path=/trunk/gtk-sharp/; revision=40481
* gtk/Dialog.custom : add a params array for button info to the ctor.
* gtk/FileChooserDialog.custom : add a params array for button info to
both ctors. Chain them to IntPtr.Zero.
* gtk/Gtk.metadata : hide the ellipsis ctors for the dialog types.
[Fixes#71818]
* sample/GtkDemo/DemoDialog.cs : make the InteractiveDialog use the
new Dialog ctor as it does in the c version.
svn path=/trunk/gtk-sharp/; revision=39713
* gtk/Gtk.metadata : hide all the SignalFunc using Toolbar methods.
* gtk/Makefile.am : add the new custom.
* gtk/Toolbar.custom : implement the SignalFunc methods. Deal with
null for Widget params in *Element.
svn path=/trunk/gtk-sharp/; revision=39509
* gda/Makefile.am : add new custom.
* gda/XmlConnection.custom : add backcompat static ctor.
* generator/ClassBase.cs : refactor lookup logic to here from Ctor
and improve the collision resolution.
* generator/Ctor.cs : refactor to use MethodBase.
* generator/Makefile.am : add new file.
* generator/MethodBase.cs : new base class for ctors and methods.
* generator/Method.cs : refactor to use MethodBase.
* generator/StructBase.cs : move some logic from here to Ctor.
* gnome/CanvasPathDef.custom : add backcompat static ctor.
* gnome/GPPath.custom : add backcompat static ctor.
* gnome/Makefile.am : add new custom.
* gtk/Gtk.metadata : mark a colliding Button ctor shared.
svn path=/trunk/gtk-sharp/; revision=39431
sure the output has no unescaped "%"s. (For wrapping printf-style
unmanaged methods with String.Format-style managed ones.)
* gtk/MessageDialog.custom (MessageDialog): use it. #71405. Also,
use gtk_message_dialog_new_with_markup by default, and add an
overloaded ctor that lets you use the non-markup version.
* gtk/Gtk.metadata: hide the GtkMessageDialog ctors so we don't
get ellipsis warnings about them.
* sample/GtkDemo/DemoApplicationWindow.cs:
* sample/GtkDemo/DemoDialog.cs: simplify the MessageDialog usage;
don't need to call String.Format separately now.
svn path=/trunk/gtk-sharp/; revision=39256
* configure.in : check for panelapplet in enable_gnome and remove
all the stuff for a separate panelapplet-sharp assembly.
* Makefile.am : remove panelapplet dir from build.
* gnome/BonoboUIVerb.cs : moved from panelapplet.
* gnome/Gnome.metadata : add rules from panelapplet.
* gnome/Makefile.am : add new files.
* gnome/PanelApplet.custom : moved from panelapplet.
* gnome/PanelAppletFactory.cs : moved from panelapplet.
* gnome/glue/panelapplet.c : moved from panelapplet.
* gnome/glue/Makefile.am : add new file.
* gnomedb/GnomeDb.metadata : hide a newly parsed "obsolete" type.
* gtk/Gtk.metadata : hide a newly parsed "obsolete" callback type.
* panelapplet : kill dir.
* parser/gapi2xml.pl : update callback name sanity check.
* sources/gtk-sharp-sources.xml : move panelapplet parse into gnome.
* */*-api.raw : regen.
svn path=/trunk/gtk-sharp/; revision=38509
* stetic/wrapper/Icon.cs: wrapper for Gtk.Images that show stock icons
* stetic/wrapper/SpinButton.cs: wrapper for Gtk.SpinButton
* stetic/wrapper/Frame.cs:
* stetic/wrapper/HBox.cs:
* stetic/wrapper/HButtonBox.cs:
* stetic/wrapper/HPaned.cs:
* stetic/wrapper/VBox.cs:
* stetic/wrapper/VButtonBox.cs:
* stetic/wrapper/VPaned.cs:
* stetic/wrapper/Table.cs:
* stetic/wrapper/Window.cs: Implement IObjectWrapper on these
(previously they just implemented IDesignTimeContainer)
* stetic/wrapper/Box.cs:
* stetic/wrapper/ButtonBox.cs:
* stetic/wrapper/Paned.cs: static classes that define
PropertyDescriptors used by their subclasses
* stetic/wrapper/DefaultWidgets.cs: Update for new wrappers
* stetic/editor/File.cs: editor for strings that represent filenames
* stetic/Stetic.cs: Use Gnome.Program rather than Gtk.Application
now, since we're using Gnome.FileEntry.
svn path=/trunk/gtk-sharp/; revision=38501
gtk headers.
* gtk/gtk-api.raw: regen
* gtk/Gtk.metadata: Remove some explicit hiding of things that
shouldn't have been there anyway. Hide a few types that just show
up as unusable stubs.
svn path=/trunk/gtk-sharp/; revision=38054
* generator/CodeGenerator.cs:
* generator/ManagedCallString.cs:
* generator/Property.cs: Remove unused vars
* generator/Method.cs (GetHashCode): have to implement this since
we're overriding Equals.
* generator/CallbackGen.cs: print a message when generating a
broken struct-returning callback. (Currently affects
GtkSharp.TextSegSplitFuncNative and
GtkSharp.TextSegCleanupFuncNative)
* gdk/glue/device.c:
* gdk/glue/dragcontext.c: Add missing prototypes
* gtk/Gtk.metadata: Mark SeparatorToolItem.Draw "new". Re-rename
CheckMenuItem.Toggled to EmitToggled rather than Toggle, since
that's a better description of what it does.
* gtk/CheckMenuItem.custom: implement a "Toggle" method that does
what the documentation claims it does.
* gtk/NodeStore.cs: remove unused var
* gnome/Gnome.metadata: mark DateEdit.Flags, Dialog.Default, and
PropertyBox.State "new". Hide GnomePixmapEntry.GnomeEntry and
GnomePixmapEntry.GtkEntry since they do exactly the same thing as
the methods of the same names inherited from GnomeFileEntry.
* gnome/glue/canvas-proxy.c:
* gnome/glue/canvas-proxy.h:
* gnome/glue/canvas-proxy-marshal.c:
* gnome/glue/canvas-proxy-marshal.h:
* gnome/glue/canvas-proxy-marshal.list: Remove unused code
* gnome/glue/Makefile.am (libgnomesharpglue_2_la_SOURCES): update
* panelapplet/PanelApplet.metadata: mark PanelApplet.Flags "new"
* sample/CanvasExample.cs:
* sample/CustomCellRenderer.cs:
* sample/CustomNotebook.cs:
* sample/DrawingSample.cs:
* sample/Fifteen.cs:
* sample/GladeTest.cs:
* sample/GtkDemo/DemoHyperText.cs:
* sample/GtkDemo/DemoPixbuf.cs:
* sample/ScribbleXInput.cs: remove unused vars, use
GLib.Timeout.Add rather than the deprecated Gtk.Timeout.Add
svn path=/trunk/gtk-sharp/; revision=38043
Lookup (so we can customize it) and AddStatic (since it can't work
right from managed code), and tweak the params of Add.
* gtk/Stock.custom: Implement Lookup() using a special
ConstStockItem struct so the p/invoke layer won't try to free
static strings. [#70589]
svn path=/trunk/gtk-sharp/; revision=37995
* gtk/Gtk.metadata : hide Object and Widget.Destroy.
* gtk/Object.custom : manual virtual Destroy impl.
* gtk/Widget.custom : manual virtual Destroy impl.
* gtk/Window.custom : hold a managed ref for all toplevels. Release
it in a Destroy override. Window is frequently subclassed and is
never parented, so this keeps a managed ref around to avoid GC.
[Fixes#70120]
svn path=/trunk/gtk-sharp/; revision=37914
SetFoo methods if they aren't in the right form to be turned into
property accessors. (Causes 13 previously ignored methods to now
be wrapped. See doc/ChangeLog.)
* gtk/Gtk.metadata: Fix up a few of those newly-exposed methods
svn path=/trunk/gtk-sharp/; revision=37891
new methods to allow arbitrary setup and teardown code around the
managed call. When passing a type with "complicated" marshalling
requirements as a ref or out param, first assign the value to a
temporary variable (in Setup), then pass the temp as the ref or
out param (in ToString), and then assign the new value back to the
original argument (in Finish).
* generator/Signal.cs:
* generator/SignalHandler.cs: Update to generate correct glue for
signals with "ref" or "out" params. (#70566)
* generator/VirtualMethod.cs: Update for ManagedCallString change
* generator/IGeneratable.cs: add comments explaining what each
member does
* gtk/Gtk.metadata: mark Editable.InsertText's "position" arg
* pass-by-ref
* sample/Size.cs: connect to the SizeRequested event and override
it, to test/demo the changes
svn path=/trunk/gtk-sharp/; revision=37854
[Fixes#70187]. Kill two varargs warnings.
* gtk/TextBuffer.custom: Update for that, and also implement
InsertWithTagsByName
* sample/GtkDemo/DemoHyperText.cs:
* sample/GtkDemo/DemoTextView.cs: Remove kludges for broken
TextIter handling. Also fix the i18n demo bits by translating the
octal-encoded UTF-8 to hex-encoded UTF-16.
svn path=/trunk/gtk-sharp/; revision=37039
* gtk/ActionEntry.cs:
* gtk/ActionGroup.custom:
* gtk/Gtk.metadata:
* gtk/Makefile.am:
* gtk/RadioActionEntry.cs:
* gtk/ToggleActionEntry.cs:
* gtk/UIManager.custom:
* sample/Actions.cs: Updated to use the new *ActionEntry code. Reflects
testactions.c from gtk+ now.
Added C# syntactic sugar for easily defining Action's for the UIManager.
Derived from the same ActionEntry structs in gtk+.
svn path=/trunk/gtk-sharp/; revision=36638
glue method to get container->focus_child
* gtk/Gtk.metadata: hide SetFocusChild
* gtk/Container.custom (FocusChild): implement with both getter
and setter
* en/Gtk/Container.xml (FocusChild): Has a getter now too.
(Added): Clarify that this only means "Gtk.Container.Add was
called", and doesn't get fired when you call Gtk.Box.PackStart,
etc
svn path=/trunk/gtk-sharp/; revision=36143
(Object(GType)): Mark this ctor Obsolete
* gtk/Gtk.metadata: disable the generated GType ctor on Gtk.Widget
* gtk/Widget.custom (Widget, CreateNativeObject,
Widget_ParentSet): Connect to our own ParentSet event from
CreateNativeObject and the GType ctor, and keep a static Hashtable
of parented widgets, so that adding a managed widget to a
container keeps both the GObject and the managed object alive.
* generator/ObjectGen.cs (GenCtors): handle the disable_gtype_ctor
flag. Also, mark GType ctors [Obsolete]
svn path=/trunk/gtk-sharp/; revision=35885
GtkContainer child properties
* generator/Property.cs:
* generator/ChildProperty.cs: make Property subclassable and add a
"ChildProperty" subclass.
* generator/Makefile.am (sources): add ChildProperty.cs
* generator/ClassBase.cs: handle "childprop" nodes by creating
ChildProperty objects.
* glib/Value.cs (explicit operator EnumWrapper): use
g_value_get_flags() rather than g_value_get_enum() when
appropriate.
* glib/glue/value.c (glibsharp_value_holds_flags): glue for that
* gtk/gtk-api.raw: regen to pick up child properties
* gtk/Gtk.metadata:
* gtk/Container.custom: hide the auto-generated
Gtk.Container.ChildGetProperty and implement a nicer one by hand.
* gtk/glue/container.c (gtksharp_container_child_get_property):
utility function to set up an appropriate GValue for us
svn path=/trunk/gtk-sharp/; revision=35702
* gtk/FileChooserDialog.custom: Add Filenames property to return
the data as a string[] instead of a GSList.
* gtk/FileChooserWidget.custom: Same as above.
* gtk/Makefile.am: Add FileChooserWidget.custom
svn path=/trunk/gtk-sharp/; revision=35492
if "disable_raw_ctor" is set on the opaque type.
* gtk/Gtk.metadata: Make GtkTargetList opaque (fixes a crash in
Gtk.Drag.Begin), hide the generated constructor and ref/unref
methods, and fix up the interpretation of AddTable.
* gtk/TargetList.custom (TargetList, ~TargetList): Implement the
suppressed constructors and add a finalizer, which handle
refcounting the underlying struct.
(Add, Find, Remove): convenience overloads that take string
instead of Gdk.Atom.
* gtk/Makefile.am (customs): add TargetList.custom
svn path=/trunk/gtk-sharp/; revision=35135
* gtk/Gtk.metadata : hide some methods on TextBuffer.
* gtk/TextBuffer.custom : pass -1 for the text length to some
more methods.
svn path=/trunk/gtk-sharp/; revision=32534
* gtk/Gtk.metadata : hide Insert and SetText for manual impl.
* gtk/TextBuffer.custom : pass -1 for length to Insert and SetText.
Adapted from a patch by borsanza@yahoo.es (Borja Sanchez Zamorano).
[Fixes#62985]
svn path=/trunk/gtk-sharp/; revision=32317
* gtk/Gtk.metadata:
* glade/Glade.metadata: mark return type as const-gchar* for
Gtk.Global.CheckVersion and Glade.Global.ModuleCheckVersion
so Gtk# does not try to free them. Thanks to
jaspervp@gmx.net (Jasper van Putten) for identifying the Glade
part. Fixes bugs #61329 and #60954
svn path=/trunk/gtk-sharp/; revision=31239
* gtk/Gtk.metadata : mark SizeRequest requisition as out, not ref.
[Fixes#59388]
2004-06-01 Mike Kestner <mkestner@ximian.com>
* en/Gtk/Widget.xml : move existing docs to new method sig.
svn path=/trunk/gtk-sharp/; revision=28629
* gtk/Gtk.metadata : change return-type on Global.EventsPending
to a bool to avoid compat problems in 2.4. Also rename to
GetEventsPending so that it's generated as a property.
[fixes#58292]
svn path=/trunk/gtk-sharp/; revision=27043
[Derived from a patch by Ben Maurer]
* generator/Ctor.cs : generate code to detect subclassing and handle
GType registration and native object creation properly.
* generator/Parameters.cs : add PropertyName accessor for param attr.
* generator/Property.cs : use a new GLib.Value ctor.
* glib/ObjectManager.cs : redo hash access.
* glib/Object.cs : CreateNativeObject method to invoke g_object_newv
and some refactoring of RegisterGType and LookupGType.
* glib/Value.cs : make gtype field an IntPtr.
* glib/glue/object.c : glue for g_object_newv use.
* glib/glue/value.c : new glue for value creation.
* gtk/Dialog.custom : fix a ctor declaration for auto-reg.
* gtk/Gtk.metadata : mark a couple property_name attrs as examples.
* sample/Subclass.cs : use auto-GType-registration now.
svn path=/trunk/gtk-sharp/; revision=26916
* generator/ClassBase.cs : remove default ctor generation and
hasDefaultConstructor field.
* generator/Ctor.cs : chain to base (IntPtr.Zero).
* generator/StructBase.cs : remove hasDefaultConstructor usage.
* glib/Object.cs : remove Object () ctor. Add Ben's GetGType
method, although nothing uses it yet. Still working on integrating
the remainder of Ben's patch.
* gtk/Gtk.metadata : remove all the disabledefaultctor rules.
* */*.custom : add base (IntPtr.Zero) or this (...) chaining for
all ctors.
svn path=/trunk/gtk-sharp/; revision=25184