* generator/ManagedCallString.cs: revert last change. There are a
lot of "broken" callback sigs out there which expose user data because
it's not in the last parameter in the list. I don't think we can
reasonably make a change to hide all those at this point. This change
at least hides all the user_data which comes right before a GError
param at the end of the list. I need to follow up with a change which
handles data parameters in any parameter position, but allows the user
to mark "exposed" data params for compatibility reasons.
* generator/Parameters.cs: hide data params which are at the end of a
list behind an error param.
* gtk/Gtk.metadata: mark an array parameter on
TextBufferDeserializeFunc.
svn path=/trunk/gtk-sharp/; revision=111716
* generator/ReturnValue.cs: use new ListPtrToArray marshaler for
lists with known element types.
* glib/Marshaller.cs: new ListPtrToArray marshaller with more
aggressive list disposal.
* gtk/Container.custom: remove manual Children impl. Use Children
in GetEnumerator instead of pinvoking directly.
* gtk/Gtk.metadata: remove hidden attr and add element type and owned
for Container.GetChildren to generate it properly.
svn path=/trunk/gtk-sharp/; revision=111173
Patch from Christian Hoff with a few minor tweaks.
* generator/CallbackGen.cs: refactor to use ManagedCallString
and drop a ton of redundant, half-baked code.
* generator/ManagedCallString.cs: add Unconditional setup
method for stuff that has to happen before the try block.
Add "drop_first" concept so it can be reused by CallbackGen
which doesn't drop first params.
* generator/Signal.cs: use Unconditional method for prep.
* generator/VirtualMethod.cs: use Unconditional method for prep.
* gtk/Gtk.metadata: mark a ref param. [Fixes#394352]
svn path=/trunk/gtk-sharp/; revision=107494
* gtk/Gtk.metadata: mark ListStore.Reorder array param.
* gtk/ListStore.cs: compat obsolete method, though the old one
was useless.
svn path=/trunk/gtk-sharp/; revision=106853
* gtk/Object.custom: move Dispose call to a vm override so that
it runs after all signals and native overrides have run.
* gtk/glue/object.c: destroy override implementation.
svn path=/trunk/gtk-sharp/; revision=104315
* gtk/Object.custom: If all destroy handlers have been
unregistered, remove the hashtable entry since it is
not needed anymore.
svn path=/trunk/gtk-sharp/; revision=104287
* gtk/Widget.custom: guard against MissingIntPtrCtorException in
the Activate and SetScrollAdjustments funky signal VM impl. Can't
use SignalClosure easily. Could be reworked more cleanly at some
point. Or not.
svn path=/trunk/gtk-sharp/; revision=103827
* kill the makefile.win32 build system. it has been unmaintained
for quite some time, replaced by the auto* build in cygwin.
svn path=/trunk/gtk-sharp/; revision=103308
* atk/atk-api-2.12.raw: reparsed.
* gdk/gdk-api-2.12.raw: reparsed.
* gtk/gtk-api-2.12.raw: reparsed.
* parser/gapi2xml.pl: fixes for signal and vm order needed for
proper interface struct layout. [Fixes#386802]
svn path=/trunk/gtk-sharp/; revision=102848
* generator/GenerationInfo.cs: refactor glue writer implementation
so that GlueEnabled means there is a valid glue writer available.
Avoids crashes in scenarios where an unwriteable glue path is provided
to the generator. Generate a glue function which scans the type
hierarchy of an object for the most-derived unmanaged ancestor so
that we can invoke class methods on it, avoiding infinite recursions.
* generator/Signal.cs: revamp the default handler vm overriding
mechanism. When class fields exist which can be directly hooked into,
we now generate glue to override and chain up to unmanaged base funcs.
This avoids some strangeness in the g_signal_override_class_closure
and g_signal_chain_from_overridden reported in #332300 and also lays
the groundwork for automated generation of non-signal VMs.
* gtk/Gtk.metadata: block signal glue generation for a few types which
don't seem to install headers.
svn path=/trunk/gtk-sharp/; revision=102350
* parser/gapi2xml.pl: put class struct field in the signal elems.
* atk/atk-api-2.12.raw:
* gdk/gdk-api-2.12.raw:
* gtk/gtk-api-2.12.raw:
svn path=/trunk/gtk-sharp/; revision=102238
* glib/ToggleRef.cs: Add a Harden method to switch to a standard
ref and just leak it.
* gtk/Application.cs: revert the QuitPrepare stuff since it didn't
always work.
svn path=/trunk/gtk-sharp/; revision=101021
* gtk/TreeModelAdapter.custom:
* gtk/TreeModelFilter.custom:
* gtk/TreeModelSort.custom: reworked patch from Christian Hoff to
throw NotImplementedException for SetValue methods. Those should
never have been added to the interface, and it's better to throw
an exception than have infinite recursion kill the program.
[Fixes#379542]
svn path=/trunk/gtk-sharp/; revision=100996
* gtk/Gtk.metadata: hide PrintContext.get_CairoContext.
* gtk/PrintContext.custom: manual get_cairo_context implementation.
Mono.Cairo assumes it is wrapping owned references, so we need to
take a ref out on the returned cairo_t pointer.
* sample/GtkDemo/DemoPrinting.cs: dispose the CairoContext in
to be a good citizen and avoid warnings.
svn path=/trunk/gtk-sharp/; revision=100942
* glib/Global.cs: renamed from Program.cs. Program.Name is now
Global.ProgramName to try to avoid clashes with existing Gnome.Program
usage.
* gtk/Application.cs: s/GLib.Program.Name/GLib.Global.ProgramName.
svn path=/trunk/gtk-sharp/; revision=99875
the code to call g_set_prgname() from gtk/Application.cs to here,
and changing return value of g_set_program_name from bool to void.
* gtk/Application.cs: Use Program.Name as a replacement of
calling the native function g_set_prgname().
* glib/Makefile.am: add Program.cs.
(Patch reviewed by mkestner)
svn path=/trunk/gtk-sharp/; revision=99134
* glib/DestroyNotify.cs: add CDeclCallback to the delegate.
* glib/Signal.cs: use DestroyHelper.
* gdk/Input.custom: use DestroyHelper.
* gtk/Quit.custom: remove new on DestroyHelper handler.
* gtk/TreeModelFilter.custom: remove new on DestroyHelper handler.
* gtk/TreeViewColumn.custom: remove new on DestroyHelper handler.
svn path=/trunk/gtk-sharp/; revision=86897
* generator/*.cs: implement the interfaces on the adapters too.
Generate an Implementor interface for users which exposes the
methods to implement. Register based on the Implementor sub-iface.
* gtk/*Adapter.custom: custom implementations for the custom
interface members.
* gtk/TreeIter.custom: make UserData public.
* sample/TreeModelDemo.cs: sample for implementing a TreeModel
interface.
svn path=/trunk/gtk-sharp/; revision=86753
* gtk/Gtk.metadata: virtual_method rules for GInterface generation.
* generator/ReturnValue.cs (ToNative): new method for the virtual
method generation.
* generator/Parameters.cs (FromNative): null guarding.
* generator/ManagedCallString.cs: rework for interface method
generation including callback and error param support.
* generator/CallbackGen.cs: Invoker support. new class that deals
with persistence of native and wrapper delegates in native to managed
callback method signatures.
* generator/VirtualMethod.cs: support for generation of interface
methods, and all the funky parameters that come with that.
* generator/InterfaceGen.cs: Fill out the adapter implementation.
* generator/MethodBody.cs: Initialize overload. Extend ThrowsException
to support GError outside the last parameter slot.
* glib/GInterfaceAttribute.cs: New attribute to mark interfaces and
obtain adapter type.
* glib/Object.cs (AddInterfaces): interface registration method.
* glib/GInterfaceAdapter.cs: New abstract class for interface
adapter generation.
* glib/Makefile.am: add new files.
svn path=/trunk/gtk-sharp/; revision=85658
* gtk/Object.custom (Destroy): add a null check to avoid
Gtk criticals. The destroy case seems to be problematic with
a bunch of existing code, so this turns it into a noop.
svn path=/trunk/gtk-sharp/; revision=85657
* AssemblyInfo.cs.in : add IgnoreClassInitializers attr to all.
* generator/ObjectGen.cs : add custom-attr generation for objects.
* glib/ClassInitializerAttribute.cs : obsolete
* glib/IgnoreClassInitializersAttribute.cs : new assembly attr
to avoid a blind GetMethods reflection.
* glib/Makefile.am : add files
* glib/TypeInitializerAttribute.cs : new attr to specify init
method to be run at type registration.
* gtk/Widget.custom : remove the ClassInitializerAttr.
* gtk/Gtk.metadata : add a custom-attr node to GtkWidget.
* sample/Subclass.cs : use the IgnoreClassInitializers attr.
svn path=/trunk/gtk-sharp/; revision=85480
* generator/*.cs : switch to IntPtr marshaling for struct types
in the managed to native direction.
* gtk/*.custom : adjust to new gapi struct pinvoke sigs.
svn path=/trunk/gtk-sharp/; revision=83961
* gtk/gtk-api-2.10.raw : refresh.
* parser/gapi_pp.pl : combine lines that end in '\' before sending
them through the pattern matching. [Fixes#79214]
svn path=/trunk/gtk-sharp/; revision=82359
* gtk/Widget.custom (StyleGetProperty): return null if
gtksharp_widget_style_get_property returns FALSE (property
doesn't exist) [Fixes#81445]
* gtk/glue/widget.c (gtksharp_widget_style_get_property): check
return of gtk_widget_class_find_style_property for NULL; function now
returns TRUE if spec is not NULL, FALSE otherwise
svn path=/trunk/gtk-sharp/; revision=76217
* gtk/TreePath.custom: Override Equals and compare based upon the
underlying indicies, instead of the object reference.
[Fixes#81398]
svn path=/trunk/gtk-sharp/; revision=76131
* generator/CallbackGen.cs : switch to NativeCallbackSignature.
* generator/GenBase.cs : add NativeCallbackType member.
* generator/IGeneratable.cs : add NativeCallbackType member.
* generator/ManagedCallString.cs : add guarded post call struct
marshaling back to the native struct.
* generator/NativeCallbackSignature.cs : new parallel to ImportSignature
but using NativeCallbackType instead of MarshalType.
* generator/Signal.cs : switch vm and sig marshaler callbacks to
NativeCallbackSignature. Perform guarding post call struct marshaling
back to the native struct.
* generator/Parameters.cs : add NativeCallbackType member.
* generator/SimpleBase.cs : add NativeCallbackType member.
* generator/StructBase.cs : add NativeCallbackType member using IntPtr
to support NULL handling.
* gtk/NodeCellDataFunc.cs : update native marshaler sig.
svn path=/trunk/gtk-sharp/; revision=76011
* gtk/Gtk.metadata : hide TreeModel.RowsReordered signal so we can do
a correct implementation while maintaining compat with the existing
broken "NewOrder" parameter.
* gtk/ListStore.custom : manual RowsReordered signal implementation.
* gtk/RowsReorderedHandler.cs : manual implementation for preserve compat
in the Args class. Adds NewChildOrder to replace the broken ChildOrder.
* gtk/TreeModel.custom : manual RowsReordered signal declaration.
* gtk/TreeModelFilter.custom : manual RowsReordered signal implementation.
* gtk/TreeModelSort.custom : manual RowsReordered signal implementation.
* gtk/TreeStore.custom : manual RowsReordered signal implementation.
[Fixes#78512]
svn path=/trunk/gtk-sharp/; revision=75837
* gtk/Widget.custom:
StyleGetPropertyValue that returns a GLib.Value when StyleGetProperty cannot automatically cast the GLib.Value (eg: Gdk.Color)
[Fixes#81253]
* doc/en/Gtk/Widget.xml:
Documentation for the new StyleGetPropertyValue method and improved documentation for StyleGetProperty
* gtk/TreeView.custom:
OddRowColor and EvenRowColor properties
* doc/en/Gtk/TreeView.xml:
documentation for OddRowColor and EvenRowColor properties
svn path=/trunk/gtk-sharp/; revision=75816
* gtk/Application.custom : set prgname in Init methods so
that WM_CLASS is more appropriate. Programs using Gnome.Program
already get a nice prgname, but Gtk.Application.Init apps were
getting a path instead of a filename without extension.
svn path=/trunk/gtk-sharp/; revision=73766
* gtk/CellRenderer*.custom: new custom overrides for VMs.
* gtk/glue/cellrenderer.c: add GType parameters to the invoke methods
so we can identify the correct vtable to invoke from.
svn path=/trunk/gtk-sharp/; revision=73037
* glib/Object.cs : switch to ToggleRefs for all items created with
CreateNativeObject. This gets all managed subclasses, with a little
overhang into simple wrappers.
* glib/ToggleRef.cs : new class to manage the weak to strong ref
transitions as a native object flips between shared and unshared
ownership.
* gtk/Object.custom : revamp of the Destroyed signal handling.
* gtk/Gtk.metadata : hide destroy signal so we can deal with it
manually. [Fixes the reopen note of #72018.]
svn path=/trunk/gtk-sharp/; revision=73023
* gtk/StatusIcon.custom : obsolete overload for backcompat on
GetGeometry, and custom PresentMenu method to invoke new glue.
* gtk/glue/statusicon.c : glue method to connect to gtk_menu_popup
without having to go across the native/managed boundary multiple
times using gtk_status_icon_position_menu wrapper.
[Fixes#79500]
svn path=/trunk/gtk-sharp/; revision=72236
* generator/CallbackGen.cs : add PersistUntilCalled method generation
to the wrapper class. Holds a GCHandle for the wrapper which is Freed
when the delegate is invoked.
* generator/MethodBody.cs : add "async" case for delegate scope. Use
this scope to identify a callback parameter that needs to persist
until the native side calls back. Only valid for single-invoke
callbacks.
* gtk/Gtk.metadata : mark Print.RunPageSetupDialogAsync done_cb param
with the new async scope.
svn path=/trunk/gtk-sharp/; revision=71767
* gtk/Gtk.metadata : remainder of new API massaging for existing
types.
* gtk/Printer.custom : new static method.
* gtk/TextBuffer.custom : serialization API implementations.
svn path=/trunk/gtk-sharp/; revision=63448
* gtk/Gtk.metadata : markup for new Clipboard Rich text funcs.
* gtk/Clipboard.custom : manually implement RequestRichText and
WaitForRichText methods to deal with array marshaling and delegate
persistence.
svn path=/trunk/gtk-sharp/; revision=63430
* gtk/Gtk.metadata : fix a couple of compat breaks against 2.8.
* gtk/TreeModelFilter.cs : hand implement ConvertChildIterToIter
to match the 2.8 version of the method.
svn path=/trunk/gtk-sharp/; revision=63271
* gtk/gtk-api-2.10.raw : reparsed
* parser/gapi_pp.pl : put a newline after G_DEFINE_TYPE macros
on the output and do a next if we shouldn't fall out of the
branch.
svn path=/trunk/gtk-sharp/; revision=63232
* gtk/TextBuffer.custom : add some obsolete overloads for backward
compat with some not-completely-unusable 1.0.x methods.
svn path=/trunk/gtk-sharp/; revision=52131
* glib/Opaque.cs : remove the Opaques hash. As f-spot demonstrated,
we cannot rely on a pointer continuing to point at the same type in
memory, since there is no destroy notification for most opaques.
* glib/Value.cs : use more explicit GetOpaque overload.
* gtk/Style.custom : use more explicit GetOpaque overload.
svn path=/trunk/gtk-sharp/; revision=50884
* sample/NodeViewDemo.cs: take advantage of the stuff below
* gtk/TreeNodeValueAttribute.cs: Allow on props
* gtk/TreeNodeAttribute.cs: Obsolete column count
* gtk/NodeStore.cs: Change this to not need the TreeNodeAttribute
column count. Handle fields as well as properties.
svn path=/trunk/gtk-sharp/; revision=49374
* gtk/Widget.custom : add overloads for Modify* without a Gdk.Color
param to reset color to default. [Fixes#75913]
svn path=/trunk/gtk-sharp/; revision=49085
2005-08-28 Ben Maurer <bmaurer@ximian.com>
* en/Gtk/NodeSelection.xml: Docs
In .:
2005-08-28 Ben Maurer <bmaurer@ximian.com>
* gtk/NodeSelection.cs: helper api
svn path=/trunk/gtk-sharp/; revision=49040
makes it safe to create tree nodes in a worker thread as long as
you reparent them into the tree with another thread. Thanks to mk
for allowing a bit of threadedness in :-).
svn path=/trunk/gtk-sharp/; revision=48683
they or their accessors are marked deprecated. (Affects
Gtk.Entry.Editable, Gtk.FontSelection.Font,
Gtk.Notebook.*TabBorder, Gtk.Object.UserData, and a bunch of old
Gtk.ProgressBar properties).
* gtk/Gtk.metadata: Hide Entry.Editable. Mark Notebook.Homogeneous
deprecated.
* gtk/Entry.custom: Implement Editable property with an Obsolete
pointing to IsEditable.
svn path=/trunk/gtk-sharp/; revision=48680
* glib/Object.cs : hold strong refs for managed subclasses and
weakrefs for wrappers.
* gtk/Object.custom : don't hold managed refs here, they are now held
in GLib.Object.
svn path=/trunk/gtk-sharp/; revision=48389
a constructor or a ref, unref, or destroy method, then it must be
a reference type, so mark it "opaque" but then also mark all of
its fields public and writable.
* */*-api*.raw: Regen
* generator/Parser.cs (ParseNamespace): make the opaque attribute
check actually look at the value of the attribute rather than just
checking if it's there, so that you can change a struct's opaque
attribute from "true" to "false" via metadata and have that work.
* generator/BoxedGen.cs (Generate): do not generate the boxed's
"Free" method (since it's guaranteed to crash when we pass it a
stack pointer). If "Copy" is marked deprecated, create a
deprecated no-op for it, otherwise just skip it (since otherwise
it will just leak memory when we copy its result onto the stack).
* pango/Pango.metadata: deprecate Pango.Color.Copy and
Pango.Matrix.Copy. Hide some array fields in Pango.GlyphString
that we've never generated correctly. Tweak Pango.LayoutLine
fields to be the same as they used to be.
* pango/GlyphItem.custom (glyphs, item):
* pango/GlyphString.custom (Zero, New):
* pango/Item.custom (Zero, New):
* pango/LayoutRun.custom (glyphs, item): add deprecated API compat
* gdk/Gdk.metadata: undo the parser's new opaquification of
Gdk.Font; it's been deprecated since pre-gtk# times, and no one
should be using it, so there's no point in fixing it now. Fix up a
few other things to match how they used to be. Fix RgbCmap's
constructor args.
* gdk/RgbCmap.custom (Zero, New): deprecated API compat
* gdk/PangoAttrEmbossed.custom:
* gdk/PangoAttrStipple.custom (Zero, New, Attr): deprecated API
compat
(explicit operator ...): allow casting back and forth between
Pango.Attribute. (We can't usefully make them real subclasses of
Pango.Attribute, because there's no way for
Pango.Attribute.GetAttribute() to be able to dtrt with them.)
* gtk/Gtk.metadata: deprecate Gtk.Requisition.Copy,
Gtk.TextIter.Copy, and Gtk.TreeIter.Copy. Mark the return value of
TextView.DefaultAttributes as "owned". Mark TargetList's fields
private so it stays how it used to be.
* gtk/TextAttributes.custom (Zero, New): deprecated API compat
* gnomevfs/Gnomevfs.metadata: remove a bunch of opaque
declarations that the parser figures out on its own now.
* art/Art.metadata:
* glade/Glade.metadata:
* rsvg/Rsvg.metadata: un-mark everything the parser marked opaque
in these libraries, because all of the structs in question would
still be unusably broken, so the API churn would be pointless.
svn path=/trunk/gtk-sharp/; revision=48387
a bit; only Ref the pointer if Owned is false (and then set it to
true), and vice versa for Unref.
* glib/Opaque.cs (Opaque): set owned before setting Raw, so
that Raw will be reffed properly.
(GetOpaque): Fix this up to dtrt in all cases with refcounted
opaques.
* gtk/TreeView.custom (GetPathAtPos): Use "GetOpaque(...)" rather
than "new TreePath()"
* sample/opaquetest/*: regression test for opaque free/ref/unref
handling
* sample/Makefile.am (SUBDIRS): add opaquetest
* configure.in.in (AC_OUTPUT): add opaquetest files
svn path=/trunk/gtk-sharp/; revision=48168
TargetEntry[], so you can use methods like
TargetList.AddTextTargets() in situations where you need a
TargetEntry[] rather than a TargetList.
* gtk/glue/targetlist.c: glue for that
svn path=/trunk/gtk-sharp/; revision=48006
* glib/Opaque.cs (Owned): new property saying whether or not gtk#
owns the memory.
(Opaque): Set Owned to true in the void ctor and false in the
IntPtr one.
(GetOpaque): add a new overload that can also create opaques, a la
GLib.Object.GetObject.
(Ref, Unref, Free): empty virtual methods to be overridden by
subclasses.
(set_Raw): Unref() and possibly Free() the old value, Ref() the
new one.
(~Opaque, Dispose): set Raw to IntPtr.Zero (triggering Free/Unref
if needed)
* parser/gapi2xml.pl (addReturnElem): if the method is named Copy
and returns a pointer, set the "owned" attribute on the
return-type.
* */*-api.raw: Regen
* generator/HandleBase.cs (FromNative): Add new
FromNative/FromNativeReturn overloads that takes a "bool owned"
param. Implement the 1-arg FromNative and FromNativeReturn in
terms of that.
* generator/ObjectBase.cs (FromNative): Implement HandleBase's new
overload. Use the two-arg version of GLib.Object.GetObject when
"owned" is true.
* generator/OpaqueGen.cs (Generate): Pull out Ref, Unref, and
Free/Destroy/Dispose methods and handle them specially by
overriding Opaque.Ref, .Unref, and .Free appropriately. (If any
of the methods are marked deprecated, output a deprecated
do-nothing method as well, to save us from having to write all
those deprecated methods by hand.)
(FromNative): use GetOpaque, passing "owned".
* generator/ReturnValue.cs (FromNative): if the value is a
HandleBase, pass Owned to its FromNative().
* generator/Parameters.cs (Owned): new property (for use on out
params)
(FromNative): Call FromNative() on the generatable, handling Owned
in the case of HandleBase.
* generator/ManagedCallString.cs:
* generator/MethodBody.cs:
* generator/Signal.cs: use param.FromNative() rather than
param.Generatable.FromNative(), to get ownership right.
* */*.metadata: Mark opaque ref/unref/free methods deprecated
(except where we were hiding them before). Add "owned" attributes
to return values and out params as needed.
* pango/AttrIterator.custom (GetFont): work around a
memory-management oddity of the underlying method.
* pango/AttrFontDesc.cs (AttrFontDesc): copy the passed-in
FontDescriptor, since the attribute will assume ownership of it.
* gtk/TreeView.custom (GetPathAtPos): set the "owned" flag on the
returned TreePaths.
* gtk/TargetList.custom: Remove refcounting stuff, which is
now handled automatically
* gtk/NodeStore.cs (GetPath): clear the Owned flag on the created
TreePath so that the underlying structure doesn't get freed when
the function returns
* gtkhtml/HTMLStream.custom (Destroy): hide this and then
reimplement it by hand to keep OpaqueGen from using it in
Dispose(), since calling it after an HTMLStream.Close() will
result in a crash.
svn path=/trunk/gtk-sharp/; revision=47928
* gtk/Gtk.metadata: Change the Gtk.Style.Paint* methods to use a
Gdk.Drawable instead of a Gdk.Window
* doc/en/Gtk/Style.xml: Update the documentation for the above
change.
svn path=/trunk/gtk-sharp/; revision=47895
params... some functions use that to mark const "out" params. In
fact, let's use it as a hint to mark them pass_as="out" too...
* pango/pango-api-2.4.raw:
* pango/pango-api-2.6.raw:
* gtk/gtk-api-2.6.raw: Regen, fixing pango_script_iter_get_range
and gtk_image_get_icon_name.
* pango/Pango.metadata:
* pango/ScriptIter.cs: Alas, exposing GetRange makes it clear that
PangoScriptIter is really weird and we weren't wrapping it
correctly before anyway, so mark the whole thing hidden and wrap
it by hand.
svn path=/trunk/gtk-sharp/; revision=47748
anonymous function pointer types in method signatures. Before, we
added a <callback> child to the <parameters> node, but the
generator just ignored it. Now we add the callback (with a made-up
name) to the toplevel node, and add an ordinary <param> node
referencing it to the <parameters> node. Also, if the last param
of the callback is a gpointer, rename it from "arg#" to "data" so
it will be treated correctly (as the user data passed from the
calling method). [Fixes#66241]
* art/art-api.raw:
* gdk/gdk-api-2.4.raw:
* gdk/gdk-api-2.6.raw: Regen
* generator/Parameters.cs (IsHidden): loosen the definition of
hideable user_data; it doesn't have to occur at the end of the
parameter list, as long as there's a callback arg before it.
* generator/MethodBody.cs (GetCallString): Use Parameters.IsHidden
to decide whether or not to squash user_data params, rather than
trying to duplicate its logic. As a side effect, this also causes
a handful of methods that take non-hidden IntPtr arguments to
start actually passing those arguments to C rather than always
passing IntPtr.Zero.
* generator/Method.cs (Equals, GetHashCode): Remove unnecessary
and possibly erroneous hashing overrides.
* gtk/Gtk.metadata: Hide Gtk.Container.ForeachFull, since it's
useless and wasn't in gtk# 1.0
* gtk/Menu.custom (Popup):
* gtk/TextIter.custom (ForwardFindChar, BackwardFindChar):
* gnome/App.custom (CreateMenusInterp, InsertMenusInterp,
CreateToolbarInterp):
* gnome/Client.custom (RequestInteractionInterp):
* gnome/Popup.custom (MenuDoPopupModal, MenuDoPopup): Add
[Obsolete] compat overloads for methods that have now lost a
useless IntPtr.
svn path=/trunk/gtk-sharp/; revision=47566
as well as class properties
* gtk/gtk-api-2.4.raw:
* gtk/gtk-api-2.6.raw: Regen (adding properties to GtkFileChooser).
* generator/Property.cs (GenerateDecl): new method to generate
just a property declaration (for an interface).
(Generate): Add an "implementor" arg as with Method.Generate.
* generator/InterfaceGen.cs (Generate): Generate properties. Also,
validate methods *before* checking if they should be ignored,
since certain Method properties aren't set until Validate-time.
* generator/*.cs: misc minor changes/reorg for the above.
svn path=/trunk/gtk-sharp/; revision=47563
* gtk/TreeSelection.custom: Add an overload for GetSelected to remove
the need to always pass in that damn TreeModel.
* doc/en/Gtk/TreeSelection.xml: Add documentation for the new
overload.
svn path=/trunk/gtk-sharp/; revision=47475
* generator/CallbackGen.cs : implement new IAccessor iface so that
callback fields on structs can now be accessed.
* generator/ClassBase.cs : remove/abstract some methods incorrectly
located here.
* generator/ClassGen.cs : implement methods previously inherited from
ClassBase incorrectly.
* generator/HandleBase.cs : new base class for native ptr wrappers.
Implements new IAccessor interface and code moved from ClassBase.
* generator/IAccessor.cs : new iface to generate field/prop accessors.
* generator/InterfaceGen.cs : derive from new ObjectBase.
* generator/LPGen.cs : implement IAccessor.
* generator/LPUGen.cs : implement IAccessor.
* generator/ObjectBase.cs : new base class for Object/Iface types.
* generator/ObjectGen.cs : derive from new ObjectBase.
* generator/OpaqueGen.cs : derive from HandleBase.
* generator/StructField.cs : refactor Generate method using new
IAccessor interface.
* */*.custom : add obsolete impls for some existing c_cased struct
field accessors that are now StudlyNamed.
svn path=/trunk/gtk-sharp/; revision=46878
* generator/ReturnValue.cs : support owned and elements_owned for lists.
* glib/List.cs : add ctor overloads for memory mgmt.
* glib/ListBase.cs : add ctor overloads for memory mgmt. Dispose
elements if specified.
* glib/SList.cs : add ctor overloads for memory mgmt.
* gnome/Gnome.metadata : unhide and generate a List prop.
* gnomevfs/Gnomevfs.metadata : unhide and generate a List prop.
* gtk/FileChooser.custom : new. add hidden props.
* gtk/FileChooserButton.custom : new. impl hidden props.
* gtk/FileChooserDialog.custom : remove some List props and use the
GLib.Marshaller for the remaining ones..
* gtk/FileChooserWidget.custom : remove some List props and use the
GLib.Marshaller for the remaining ones..
* gtk/Gtk.metadata : unhide and let the generator do some List props.
svn path=/trunk/gtk-sharp/; revision=46457
be set at construct time") and CONSTRUCT_ONLY ("can only be set at
construct time") properties, rather than marking them all
"construct-only".
* gnome/gnome-api.raw:
* gtk/gtk-api-2.4.raw:
* gtk/gtk-api-2.6.raw: Regen, causing a few formerly-read-only
properties to become writable.
svn path=/trunk/gtk-sharp/; revision=45767
* generator/ReturnValue.cs : don't write a sem in FromNative.
* glib/ListBase.cs : handle GLib.Object explicit element types.
* glib/Marshaler.cs : only copy lists if Count > 0.
* gtk/Gtk.metadata : unhide Window.ListToplevels with a proper element
type for automatic list to array marshaling.
* gtk/Window.custom : kill manual ListToplevels impl.
svn path=/trunk/gtk-sharp/; revision=45654
* glib/ListBase.cs : add a nested class to support filename encoded
string element marshaling.
* gtk/Gtk.metadata : mark the filenames and folders as filename
encoded.
* gtk/FileChooserDialog.custom : use new ListBase.FilenameString type
for list element type of filenames and folders.
* gtk/FileChooserWidget.custom : use new ListBase.FilenameString type
for list element type of filenames and folders.
[Fixes#72701]
svn path=/trunk/gtk-sharp/; revision=45334
* gtk/Object.custom : only connect to Destroyed for managed subclasses
and let the wrappers get disposed by the GC.
svn path=/trunk/gtk-sharp/; revision=45326
string[] (using a G_TYPE_STRV boxed value).
* generator/SymbolTable.cs (SymbolTable): Map GStrv to string[].
(The mapping relies on the above GLib.Value magic, so it only
works correctly for properties, but that's ok, because GStrv isn't
a real type anyway and only shows up in the api files for
G_TYPE_STRV properties.) Makes the Gtk.AboutDialog Artists,
Authors, and Documenters properties show up.
* gtk/Gtk.metadata: hide
AboutDialog.Get/SetArtists/Authors/Documenters, which can't be
used to implement the Artists/Authors/Documenters properties,
because the generated code doesn't know to NULL-terminate the
arrays.
svn path=/trunk/gtk-sharp/; revision=45301
thing with parenthesized values ("FOO = (1 << 2)") and within-type
aliases ("GTK_ANCHOR_N = GTK_ANCHOR_NORTH"). Make it intentionally
do the wrong thing with unparsable values (outputting them as-is
into the api file) so that we are forced to fix them with metadata
rather than silently getting incorrect values.
* gdk/gdk-api-2.4.raw:
* gdk/gdk-api-2.6.raw (PixdataType): Now recognized as flags,
not enum
* gtk/Gtk.metadata: hide the enums ArgFlags and RcTokenType (which
are not used by any wrapped API, and which formerly contained
entirely wrong values).
* gtk/gtk-api-2.4.raw:
* gtk/gtk-api-2.6.raw (AnchorType, SelectionMode): update with
values for aliases
* gnome/Gnome.metadata: fix value of Gnome.PrintButtons.Cancel
* gnome/gnome-api.raw (PrintUnitBase, PaperSelectorFlags,
PrintDialogFlags, PrintDialogRangeFlags): Now recognized as flags,
with values.
svn path=/trunk/gtk-sharp/; revision=44937
* 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 <fields> 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
* gtk/Object.custom : hold refs for all managed subclasses. Release on
Destroy. Dispose plain wrappers on Destroy also.
* gtk/Widget.custom : remove the parent set hack since it's "handled"
on Gtk.Object now. All this will get fixed properly when we have
access to owen's toggle_refs.
svn path=/trunk/gtk-sharp/; revision=44506
* gtk/Object.custom : Dispose on a Destroyed event.
* gtk/Widget.custom : rework the parent_set hack to go direct to
the native signal instead of using the event so we avoid rewrapping of
already destroyed parents.
svn path=/trunk/gtk-sharp/; revision=44388
* bootstrap :
* bootstrap-2.4 : use ln instead of cp for api files so reparsing
causes rebuilds.
* sources/gtk-sharp-2.6-sources.xml : moved from gtk-sharp-sources.xml
plus fixed the pango, atk, and gdk raw filenames.
* sources/gtk-sharp-2.4-sources.xml : sources file for 2.4 api.
* sources/Makefile.am : added 2.4/2.6 targets for api and get-source
with make api/get-source-code getting/parsing both versions.
* */*.raw : regenerate
svn path=/trunk/gtk-sharp/; revision=44150
* autogen.sh : error out with bootstrap help message.
* bootstrap : replaces autogen.sh for the 2.5.x release line.
* bootstrap-2.4 : replaces autogen.sh for the 1.9.x release line.
* configure.in.in : renamed from configure.in and added substitution
for version, dependencies, CFLAGS and CSFLAGS.
* README : bootstrap docs
* */*-api.raw : moved to api-2.6.raw for bootstrapping.
* */*-api-2.4.raw : added 2.4 api files for bootstrapping.
* */glue/Makefile.am : add GTK_SHARP_VERSION_CFLAGS.
* pango/Attribute.cs : add a #if GTK_SHARP_2_6 block.
* pango/glue/attribute.c : add a couple #ifdef GTK_SHARP_2_6 blocks.
* sample/GtkDemo/* : make the 2.6 demos conditional.
svn path=/trunk/gtk-sharp/; revision=44047
* */*-api.xml: Regen, adding gtype="..." to many enum types
* generator/EnumGen.cs (Generate): if the enum has the
"gtype" property, add a GTypeAttribute pointing to an internal
FooGType class whose GType property can be used to get the enum's
GType.
* generator/ObjectGen.cs:
s/ObjectManager.RegisterType/GType.Register/
* glib/GTypeAttribute.cs: attribute for indicating a property that
will return the GType of a type (particularly for enums, which
can't have GType properties added to them).
* glib/GType.cs: renamed from Type.cs to match the type name
(public static readonly GType ...): add a few missing types.
(Register): moved from ObjectManager.RegisterType
(LookupGType): moved from TypeConverter.LookupType and extended to
handle GTypeAttribute. Also, fix mappings for sbyte/byte/char, and
return specific GTypes for Object subclasses rather than always
returning GType.Object. [Fixes#74699]
(LookupType): moved from ObjectWrapper.LookupType
(ToString): return the type name
* glib/Object.cs (RegisterGType):
s/ObjectManager.Register/GType.Register/
(LookupGType): Make this protected internal so GType can access
it.
* glib/ObjectManager.cs (RegisterType): deprecate in favor of
GType.Register.
(LookupType): moved to GType
* glib/TypeConverter.cs (LookupType): now a deprecated wrapper
around GType.LookupGType.
* glib/Value.cs: Use GType casts rather than TypeConverter
* gtk/NodeStore.cs (ScanType):
* gtk/ListStore.custom (ListStore):
* gtk/TreeStore.custom (TreeStore): Use (GType) cast rather than
TypeConverter. Remove the error check and exception, since the
cast never returns GType.Invalid. (The check probably predates
GLib.ManagedValue.)
* gnome/PanelAppletFactory.cs (Register): Use a GType cast rather
than GLib.Object.LookupGType (which is no longer accessible after
an mcs bugfix)
* sample/GtkDemo/DemoIconView.cs (CreateStore): use the Type[]
constructor rather than the GType[] constructor, since it
translates typeof(Gdk.Pixbuf) correctly now.
svn path=/trunk/gtk-sharp/; revision=44038
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
floating when we get it, since GLib assumes we hold a ref on it.
[Fixes#74468]
* gtk/Window.custom: remove refcount special-handling here
svn path=/trunk/gtk-sharp/; revision=42653
* gtk/Menu.custom: don't re-implement the Screen getter in Gtk.Menu.
Instead just return base.Screen, which is implemented by Widget.
svn path=/trunk/gtk-sharp/; revision=42546
* 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
resource-file constructors (using code formerly in Pixbuf.custom)
* gdk/Pixbuf.custom: Redo the stream and resource ctors in terms
of the PixbufLoader ones.
* gdk/PixbufAnimation.custom: Add stream and resource ctors
* gtk/Image.custom: Add stream and resource ctors
svn path=/trunk/gtk-sharp/; revision=42463
* 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
* gtk/ITreeNode.cs: add a "child" arg to TreeNodeRemovedHandler
* gtk/TreeNode.cs (RemoveChild, OnChildRemoved): update for that
* gtk/NodeStore.cs (child_deleted_cb): use the passed-in child;
GetNodeAtPath won't work because the parent node already removed
the child from its list
svn path=/trunk/gtk-sharp/; revision=41837
* gtk/NodeStore.cs (AddNode): likewise
(AddNode, child_added_cb): when adding a node, recursively connect
to the node signals on its children
(RemoveNode, child_deleted_cb): when removing a node, recursively
remove its children from node_hash.
svn path=/trunk/gtk-sharp/; revision=41805
* 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/CallbackGen.cs : don't derive Wrappers from DelegateWrapper
any more. It leaks delegates like crazy. We effectively now use call
scope as the default for delegate parameters.
* generator/MethodBody.cs : use new simpler Wrapper ctor.
* glib/DelegateWrapper.cs : mark the ctor obsolete so people know to
update any manually coded wrappers out there.
* */*.custom : use new simpler Callback Wrapper ctors.
svn path=/trunk/gtk-sharp/; revision=41738
* */*.cs : scrub for StringToPtrAnsi and string usage in DllImports.
* */*.custom : begin the scrub here too.
* generator/ConstStringGen.cs : implement IManualMarshaler and move to
100% IntPtr marshaling.
* generator/Ctor.cs : call Body.Finish too.
* generator/IManualMarshaler.cs : new interface for generatables that
marshal manually and need cleanup.
* generator/Makefile.am : new file.
* generator/MethodBody.cs : use IManualMarshaler if applicable.
svn path=/trunk/gtk-sharp/; revision=41579
* 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/Widget.custom : use a static method for the ParentSet hack
so we don't leak objects because the delegate holds an object ref.
svn path=/trunk/gtk-sharp/; revision=40346
* gtk/FileChooserDialog.custom : move backend to first param to
avoid conflicts with button names in overloaded ctor.
svn path=/trunk/gtk-sharp/; revision=39856
* 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/NodeSelection.cs : use new GetSelectedRows() overload.
* gtk/TreeSelection.custom : add a GetSelectedRows overload without the
out model param. [Fixes#71814]
svn path=/trunk/gtk-sharp/; revision=39654
* 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 : kill a ton of redundant stuff.
* AssemblyInfo.cs.in : moved here, only need one.
* Makefile.include : rules for building generated assemblies.
* Makefile.am : removed gtk-sharp-2.0.pc handling.
* */AssemblyInfo.cs.in : killed
* */Makefile.am : refactored out a ton of rules to an include.
* */*-pc.in : added Cflags entries pointing to the gapi files.
* generator/CodeGenerator.cs : add -I: synonym --include.
* gnomevfs/gnome-vfs-api.raw : remamed from gnomevfs-api.raw.
* gtk/gtk-sharp-2.0.pc.in : moved here from top.
* parser/gapi-fixup.cs : add --symbol arg to merge sym files.
* sources/gtk-sharp-sources.xml : remamed gnome-vfs-api.raw.
svn path=/trunk/gtk-sharp/; revision=38551
* 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/TreeView.custom : add back the TreeCellDataFunc overloads for
backward compat.
* gtk/TreeViewColumn.custom : add back the TreeCellDataFunc overloads for
backward compat.
svn path=/trunk/gtk-sharp/; revision=38396
* gtk/TextBuffer.custom : Mark SetText obsolete in favour of the Text
property, and use Text in SetText in the meantime.
svn path=/trunk/gtk-sharp/; revision=38368
* glib/ClassInitializerAttribute.cs : new attr for identifying type.
inialization methods to be run by RegisterGType.
* glib/Makefile.am : add file.
* glib/Object.cs : add private method to invoke ClassInitializers.
* gtk/glue/widget.c : some new glue for binding registration.
* gtk/BindingAttribute.cs : new attr for registering key bindings.
* gtk/Makefile.am : add file.
* gtk/Widget.custom : add ClassInitializer method to scan types
for [Binding] and register key bindings.
svn path=/trunk/gtk-sharp/; revision=38074
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
GLib.Marshaller.CharToGUnichar and .GUnicharToChar [#70704]
* generator/SymbolTable.cs (SymbolTable): add a GUnicharGen.
* generator/Makefile.am (sources): add GUnicharGen.cs
* parser/gapi2xml.pl (addPropElem): g_param_spec_unichar() has
type "gunichar" not "unichar".
* gtk/gtk-api.raw: Regen
* glib/Marshaller.cs: Import CharToGUnichar's glue method by the
right name
svn path=/trunk/gtk-sharp/; revision=37998
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/ColorSelectionDialog.custom : fix some incorrect object wrapping
and mark the ColorSelectionButton nested class Obsolete with a heinous
warning message. [Fixes#68450]
svn path=/trunk/gtk-sharp/; revision=37923
* gtk/ListStore.custom : dispose a bunch of GLib.Values.
* gtk/TreeStore.custom : ditto. Reworked and expanded from a patch
by Ben "valgrind-boy" Maurer. [Fixes#69925]
svn path=/trunk/gtk-sharp/; revision=37919
* 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
* gdk/Gdk.metadata : mark out param on Window.GetFrameExtents.
* gdk/WindowAttr.custom : new typed Mask prop.
* gtk/Widget.custom : new typed WidgetFlags prop. mark Flags obsolete.
svn path=/trunk/gtk-sharp/; revision=37909
* gtk/Makefile.am : add new file.
* gtk/glue/makefile.win32 : add missing file.
* gtk/NodeCellDataFunc.cs : new callback delegate type and marshaler
for NodeStore tree views using GtkTreeCellDataFuncs.
* gtk/NodeStore.cs : add internal GetNode overload by TreeIter.
* gtk/NodeView.cs : add AppendColumn overload that uses data funcs.
* gtk/TreeViewColumn.custom : manual implementation for SetCellDataFunc
to support both TreeIter and ITreeNode models. We need to hold a ref
to a delegate for each cell renderer on a column. [Fixes#63062]
* sample/NodeViewDemo.cs : use a NodeCellDataFunc for one of the
cell renderers in the tree.
svn path=/trunk/gtk-sharp/; revision=37904
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
/*< private >*/ comments.
* parser/gapi2xml.pl: Use those comments to determine the
accessibility of struct/object fields, and set the "access"
attribute on fields with non-default accessibiliy (private for
structs, public for objects). Also, output a StudlyName for each
field as well as a c_name.
* */*-api.raw: Regen
* generator/Field.cs (StudlyName): Use the parser-generated studly
name rather than studlifying Name, which might have been mangled
to avoid conflicts with an all-lowercase keyword.
(Generate): Respect the access property on all field types rather
than always making certain types public. Don't bother outputting
wrapper properties for private fields, since the only code that
could use them is the generated code, which won't.
See doc/ChangeLog for the (very minimal) fallout from these
changes.
* en/Art/AlphaGamma.xml:
* en/Gtk/TextAttributes.xml (Refcount):
* en/Pango/GlyphString.xml (Space): these are now private
* en/Gda/XqlItem.xml:
* en/Glade/SignalInfo.xml:
* en/Gnome.Vfs/ModuleCallbackSaveAuthenticationIn.xml:
* en/Gnome.Vfs/ModuleCallbackFullAuthenticationIn.xml:
* en/Gnome.Vfs/ModuleCallbackFillAuthenticationIn.xml: rename
Objekt to Object.
* en/Atk/KeyEventStruct.xml: rename Str1ng to String
svn path=/trunk/gtk-sharp/; revision=37853
* sample/NodeViewDemo.cs : rework of TreeViewDemo to use NodeStore.
* sample/TreeViewDemo.cs : added some timing and node counting fu.
2004-12-16 Duncan Mak <duncan@ximian.com>
* gtk/Makefile.am (sources): Added NodeSelection and NodeView.
* gtk/NodeSelection.cs: New file, an implementation of
TreeSelection that exposes ITreeNodes instead of TreeIters.
* gtk/NodeStore.cs : added internal GetIter and GetPath methods for
NodeSelection. Reworked [TreeNodeValue] lookup logic.
out what the Type of data the store holds.
* gtk/NodeView.cs: New subclass of TreeView utilizing NodeStore and
NodeSelection.
* gtk/TreeIter.custom : new internal UserData prop.
* gtk/TreeNodeValueAttribute.cs: Set AllowMultiple to true.
* gtk/TreeView.custom: Obsoleted constructor that uses a NodeStore as
parameter. NodeView should be used instead.
svn path=/trunk/gtk-sharp/; revision=37845