* glib/Value.cs: Change the pad fields handling again as the
previous approach didn't work on Win32. [Fixes#478578]
svn path=/trunk/gtk-sharp/; revision=127892
* generator/OpaqueGen.cs: generate a finalizer for classes which
have free or unref methods and ensure it runs on the gui thread.
* glib/Opaque.cs: remove finalize handling.
Fixes a 'resurrection' issue with the previous 419777 fix.
svn path=/trunk/gtk-sharp/; revision=124940
* glib/Opaque.cs: ensure we are running on the gui thread when we
dispose from the finalizer. [Fixes#419777]
svn path=/trunk/gtk-sharp/; revision=124683
* glib/Value.cs: make the pad fields a blink explicitly sized struct
instead to avoid alignment issues on x86. [Fixes#469135]
svn path=/trunk/gtk-sharp/; revision=124561
* gdk/glue/event.c: kill
* gdk/glue/selection.c: kill
* gdk/Selection.cs: hardcode the primary, secondary, and clipboard
atom definitions instead of using glue to access their macros.
* gdk/Event*.cs: rewrite to use layout structures instead of glue
for field accessors. Also enable writing for all fields.
[Fixes#323373]
svn path=/trunk/gtk-sharp/; revision=123197
* configure.in.in: don't hardcode CC when cross-compiling.
* gapi-cdecl-insert: monodis support on mono.
* Makefile.am: add a cross-compile bundling target. The goal is to
build a .zip which can be extracted on win32 to run candle and light,
avoiding cygwin to produce installers. Hopefully some day wix will
run on linux.
svn path=/trunk/gtk-sharp/; revision=123139
* cairo/Makefile.am: use mono.snk to sign the Mono.Cairo assembly
so that it's compatible with mono built versions. Initial patch
from Christian Hoff with a few tweaks.
svn path=/trunk/gtk-sharp/; revision=122821
* generator/InterfaceGen.cs: generate Adapters for consume_only ifaces
too. This seems unusual, but is primarily to produce at least one
'generic' implementation of every interface and a GetObject method
so that the marshaling code can always return an object which
implements the interface, even if no public object wrapper exists for
the underlying c GObject type.
svn path=/trunk/gtk-sharp/; revision=122814
* generator/ReturnValue.cs: map gfilename* list elements to type
ListBase.FilenameString so they are marshaled correctly.
* glib/Marshaller.cs: handle FilenameStrings in ListPtrToArray.
* gtk/Gtk.metadata: FileChooser.GetFilenames and ListShortcutFolders
return type mangling to avoid custom implementations.
* gtk/FileChooser*.custom: kill manual Filenames and ShortcutFolders.
svn path=/trunk/gtk-sharp/; revision=122802
* configure.in.in: update to use mdoc.
* doc/Makefile.am: update to use mdoc.
* doc/gtk-sharp-docs.source: add node element to conform to new
monodoc layout model.
svn path=/trunk/gtk-sharp/; revision=122568
* GType.cs: convert GType.Is to a non-static function.
* Value.cs: track API.
[Last cosmetic bit from #448009]
svn path=/trunk/gtk-sharp/; revision=122505
* generator/InterfaceGen.cs: use the new GLib API to detect
instances that don't implement GInterfaces.
* glib/GType.cs: add new API for checking if an IntPtr instance
implements a certain GType.
[Fixes#448009]
svn path=/trunk/gtk-sharp/; revision=121990
* generator/Ctor.cs:
* generator/Method.cs:
* generator/MethodBase.cs: refactor the Protection from Method to
MethodBase, generate ctors with the correct proteciton too.
svn path=/trunk/gtk-sharp/; revision=120487
* generator/Signal.cs: remove ref int workaround now that we fallback
to signal-specific marshalers for G_TYPE_POINTER using signals.
Fixes#450119.
svn path=/trunk/gtk-sharp/; revision=120254
* glib/ManagedValue.cs: rework to ref count a ManagedValue instance
and pass a GCHandle to it around, instead of taking out multiple
gchandles on the managed target itself.
svn path=/trunk/gtk-sharp/; revision=119648
2008-11-21 Stephane Delcroix <sdelcroix@novell.com>
* Makefile.am:
* glib/Format.cs: new class to map the g_format methods
svn path=/trunk/gtk-sharp/; revision=119630
* gtk/Gtk.metadata: mark the SpinButton::Output signal as manually
marshaled to avoid a compat break. The old manual marshaler expected
and int RetVal and the new signal closure more accurately expects a
bool. Since returning 1 previously worked, we need to revert to the
int expectation, even though bool is technically more correct.
svn path=/trunk/gtk-sharp/; revision=118944
* atk/atk-api-2.12.raw: regen
* gtk/gtk-api-2.12.raw: regen
* generator/Signal.cs: reinstate old custom marshaler generation and
generate custom marshaling when 'manual' attr is set.
* parser/gapi2xml.pl: set manual attr on sigs that have G_TYPE_POINTER
parameters since the generic closure can't cope with them.
svn path=/trunk/gtk-sharp/; revision=118068
* gtk/TreeModelAdapter.custom:
* gtk/TreeModelFilter.custom:
* gtk/TreeModelSort.custom:
* gtk/TreeStore.custom: Don't trigger any gtk+ critical
warnings when the 'rows-reodered' signal is fired.
svn path=/trunk/gtk-sharp/; revision=116800
* generator/InterfaceGen.cs: throw ArgumentNullException in
the Adapter's constructor that receives an implementor.
svn path=/trunk/gtk-sharp/; revision=115571
* configure.in.in: magic for local Mono.Cairo build.
* cairo/*: a local build of Mono.Cairo for .Net-only builds on win32.
* */Makefile.am: use local Mono.Cairo where necessary.
svn path=/trunk/gtk-sharp/; revision=115399
* glib/GType.cs: kill the FindTypeInReferences recursive loading
algorithm and instead do a name-based search through the references
of loaded assemblies only. Fixes the original bug #400595 and it
hopefully will have fewer sideeffects that the recursive loading
approach.
svn path=/trunk/gtk-sharp/; revision=114008
* glib/GType.cs: just fail on location null or empty instead of
checking the assembly type. Avoids failures on the ms runtime.
svn path=/trunk/gtk-sharp/; revision=113989
* atk/Object.custom: Provide a new overload that receives an
enum instead of an ulong, for a friendlier managed API.
svn path=/trunk/gtk-sharp/; revision=113822
* bootstrap-2.12: bump svn version.
* generator/Signal.cs: add a workaround for G_TYPE_POINTER usage
in the GtkEditable::text_inserted signal. The signal parameter
received by the closure will be an IntPtr, which we then have to
use to read/write the value directly from unmanaged memory.
[Fixes#427588]
svn path=/trunk/gtk-sharp/; revision=113547
* generator/LPGen.cs: remove WIN64LONGS hackery.
* generator/LPUGen.cs: remove WIN64LONGS hackery.
* generator/SymbolTable.cs: for WIN64LONGS, map them directly to
(u)int SimpleGens instead of using the LP generatables.
svn path=/trunk/gtk-sharp/; revision=113420
* generator/Property.cs (IsDeprecated): Allow "1" or "true".
* generator/Method.cs (.ctor): Allow "1" or "true".
* generator/ClassBase.cs: Allow a value of "true" to work the same
as "1" for the deprecated and abstract attributes.
svn path=/trunk/gtk-sharp/; revision=113239
* glib/GType.cs (FindTypeInReferences): Put a try-catch around the assembly
loading as failure to load a referenced assembly is not really an error.
svn path=/trunk/gtk-sharp/; revision=112905
* glib/GType.cs: beef up the referenced assembly loading code to
handle assemblies located in the same directory as the referring
assembly. Fixes#423450.
svn path=/trunk/gtk-sharp/; revision=112545
* 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/ManagedCallString.cs: fixes for data parameter hiding
in native to managed callback generation.
svn path=/trunk/gtk-sharp/; revision=111706
* 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
* atk/Atk.metadata: switch Value methods to ref params since atk
actually checks for initialized values instead of just treating it
like uninitialized memory. Makes for uglier API, but avoids crashes
in unfortunate memory content scenarios.
svn path=/trunk/gtk-sharp/; revision=110382
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
* glib/SignalClosure.cs: post back the gvalues after the closure is
invoked using a new Update method on GLib.Value. This only impacts
boxed types, since they are the only "value types" passed by ref in
the signal marshaling environment. We can't call set_boxed on the
value to update it, since that allocs new memory, we need to marshal
the updated struct out to the existing native memory address using
g_value_get_boxed.
* glib/Value.cs (Update): new update method for writing values to
an existing boxed type instance instead of allocating a new native
struct. Fixes#398929.
svn path=/trunk/gtk-sharp/; revision=106058
* glib/glue/object.c: fixes for object, boxed, and gtype
property paramspec creation. Patch provided by Christian Hoff.
svn path=/trunk/gtk-sharp/; revision=105905
Initial Patch submitted by Christian Hoff with some small
style alterations and a round trip sample by me. Supports the
registration of managed properties with the GType system, so
that things like custom cell renderers can be accessed via the
native property system from treeview.
* glib/glue/object.c : property registration related glue.
* glib/Object.cs: implement managed property registration.
* glib/PropertyAttribute.cs: add new props and ctor for managed
property registration.
* sample/PropertyRegistration.cs: little test app to test round-
tripping of registered properties.
* sample/Makefile.am: add new sample.
svn path=/trunk/gtk-sharp/; revision=105177
* atk/Object.custom: use 'as StateSet' instead of cast to avoid
cast exceptions in the null case. Apparently it's not an exception
any more, according to folks on #monodev. I still prefer as for
GetObject 'casting'.
svn path=/trunk/gtk-sharp/; revision=105176
* gdk/Pixbuf.custom: don't use the autogenerated PixbufDestroyNative
delegate type since is has a byte[] parameter that blows up.
svn path=/trunk/gtk-sharp/; revision=104582
* 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
* generator/Method.cs (GenerateBody): when generating value type
methods, we should demarshal the 'this' memory before any ref or
out parameters in the event that someone passes 'this' as a param.
That will ensure that an updated value coming back from the native
side ends up in the memory location.
svn path=/trunk/gtk-sharp/; revision=104166
* 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
* glib/Signal.cs: AddEmissionHook binding (for closing #386950), and
change API of Emit to mimic the detailed_signal pattern.
* glib/GType.cs: GType.FromName: new wrapper for native call.
* glib/ObjectManager.cs: Use the new FromName managed method.
svn path=/trunk/gtk-sharp/; revision=103198
* 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
* glib/Object.cs: revert the connection optimization from r102349.
It breaks under the current CellRenderer implementation which probably
can't be reworked compatibly to take advantage of this code.
* glib/SignalClosure.cs: use IntPtr.ToInt64 instead of (long) since
the cast apparently has issues on bleeding edge mono.
svn path=/trunk/gtk-sharp/; revision=102693
* 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
* glib/Object.cs: Don't bother hooking VM into the class field
if another managed ancestor has already done so. Add a LogFunc
printing a stack trace for the GObject log domain if GTK_SHARP_DEBUG
is set in the environment. It's a bit noisy to do unconditionally.
svn path=/trunk/gtk-sharp/; revision=102349
* generator/InterfaceGen.cs: use CName and mangle it. ClassFieldName
is not guaranteed to be set now.
* generator/Signal.cs: read ClassFieldName from the api xml. Move
glue writer lookup inside the block to avoid exceptions for now.
svn path=/trunk/gtk-sharp/; revision=102276
* generator/InterfaceGen.cs:
* generator/Signal.cs: use generic signal marshaling instead of
generating signature specific marshaling callbacks.
* glib/glue/closure.c: glue for new closure impl.
* glib/Object.cs: open up a couple hashes internally.
* glib/Signal.cs: hook in closure based connection and expose
EmissionHook functionality for atk usage.
* glib/SignalClosure.cs: new generic signal marshaling mechanism.
* glib/ToggleRef.cs: null guarding in Target and let Signal remove
itself from hash when it disposes itself.
svn path=/trunk/gtk-sharp/; revision=102241
* 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/Value.cs : Add GParam support and beef up the Boxed
type marshaling to support types with New methods via reflection.
svn path=/trunk/gtk-sharp/; revision=102064