Commit Graph

10 Commits

Author SHA1 Message Date
Andrés G. Aragoneses
f1005da47c glib: Make all DllImports in custom code use a common const
This way there's less redundancy, and if the library name changes in the
future, it will be changed only in one place.

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2013-11-17 13:05:12 +01:00
Christian Hoff
7b752d233c 2009-09-03 Christian Hoff <christian_hoff@gmx.net>
* glib/Global.cs: Kill the calling convention field again.
	It breaks GLib 2.x compatibility in the generator and there is
	probably no need to make the calling convention configurable.
	* .cs, *.custom: Hardcode Cdecl calling convention instead of
	using GLib's field.

svn path=/trunk/gtk-sharp/; revision=141283
2009-09-03 19:50:53 +00:00
Christian Hoff
58e97c087a 2009-09-02 Christian Hoff <christian_hoff@gmx.net>
* glib/Global.cs: Add a public constant field specifying the
	calling convention used by GLib and depending libraries.
	By now it's hardcoded to Cdecl as every non-Win32 runtime
	should ignore this attribute.
	* *.cs, *.custom: Use GLib.Global.CallingConvention for both
	pinvokes and callbacks. Plugs a stack leak on Win32. All
	pinvokes defaulted to StdCall and thus the stack was never
	cleaned up.

svn path=/trunk/gtk-sharp/; revision=141175
2009-09-02 20:17:37 +00:00
Mike Kestner
90a870e2de 2005-03-08 Mike Kestner <mkestner@novell.com>
* */*.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
2005-03-08 21:28:08 +00:00
Todd Berman
cac3c4a368 2004-11-04 Todd Berman <tberman@off.net>
* doc/en/GLib/ListBase.xml: Add documentation for ListBase.Empty
        * glib/ListBase.cs: Add ListBase.Empty, frees the children and the
        list.
        * glib/Markup.cs: Fix Alex's tomboy crash, sending -1 instead of
        Length.
        * gtk/FileChooserDialog.custom:
        * gtk/FileChooserWidget.custom: properly free the list.

svn path=/trunk/gtk-sharp/; revision=35650
2004-11-04 19:29:01 +00:00
Mike Kestner
7a6d6b2128 2004-06-25 Mike Kestner <mkestner@ximian.com>
* */*.cs : add lgpl license blurb and clean up (c)'s.
	* */*.custom : add lgpl license blurb and clean up (c)'s.
	* */glue/*.c : add lgpl license blurb and clean up (c)'s.
	file adds without license from now on are punishable by wedgie.

svn path=/trunk/gtk-sharp/; revision=30401
2004-06-25 18:42:19 +00:00
Mike Kestner
9f54a63375 2004-05-19 Mike Kestner <mkestner@ximian.com>
* gtk/Container.custom : add CallbackInvoke and use it in OnForall.

2004-05-19  Mike Kestner  <mkestner@ximian.com>

	* generator/Makefile.am : add TimeTGen.cs
	* generator/SymbolTable.cs : use new TimeTGen.
	* generator/StringGen.cs : s/GLibSharp/GLib
	* generator/TimeTGen.cs : generatable to marshal time_t.
	* glib/time_t_CustomMarshaler.cs : kill
	* glib/Makefile.am : remove time_t_CustomMarshaler.cs
	* glib/Markup.cs : s/GLibSharp/GLib
	* glib/Marshaller.cs : move to GLib namespace. Add methods to
	marshal time_t to and from DateTime.
	* glib/glue/time_t.c : kill
	* glib/glue/Makefile.am : remove time_t.c
	* glib/glue/makefile.win32 : remove time_t.o
	* gnome/*.custom : use GLib.Marshaller instead of the time_t custom
	marshaler.
	* gtk/*.custom : s/GLibSharp/GLib

svn path=/trunk/gtk-sharp/; revision=27704
2004-05-19 18:57:28 +00:00
Miguel de Icaza
f1e095a87b 2003-11-27 Miguel de Icaza <miguel@ximian.com>
* glib/Log.cs: Make LogLevelFlags CLS compliant.

	* glib/SignalCallback.cs: Set the constructor protection level to
	protected, since it can not be instantiate.d

	* glib/Marshaller.cs: Do not allow instances of this class as it
	only exposes static methods.

	* glib/Source.cs, glib/FileUtils.cs, glib/Timeout.cs,
	glib/Thread.cs, glib/Markup.cs, glib/TypeConverter.cs: Ditto.

svn path=/trunk/gtk-sharp/; revision=20573
2003-11-28 05:29:34 +00:00
Rachel Hestilow
fe699e9fbb 2003-05-29 Rachel Hestilow <rachel@nullenvoid.com>
* gconf/Value.cs: Update to use new string marshalling.

	* generator/StringGen.cs, ConstStringGen.cs: Added.
	* generator/IGeneratable.cs: Add new method ToNativeReturn.
	* generator/CallbackGen.cs: Implement ToNativeReturn. Call
	ToNativeReturn for the return statement. Fix a couple of
	places where s_ret was being used incorrectly for m_ret.
	* generator/ClassGen.cs, EnumGen.cs, ManualGen.cs,
	SimpleGen.cs, StructBase.cs: Implement ToNativeReturn.
	* generator/SignalHandler.cs: Call ToNativeReturn for the
	return statement, instead of CallByName.
	* generator/SymbolTable.cs: Use StringGen for gchar, char,
	and gunichar, and ConstStringGen for their const variants.
	Add a new method wrapper for ToNativeReturn.
	(Trim): Add a special-case for const strings so that the
	const is not stripped. Otherwise there is no way of
	resolving the const case.

	* glade/XML.custom: Update to use new string marshalling.

	* glib/Marshaller.cs: Added.
	* glib/GException.cs, Markup.cs, ObjectManager.cs,
	Value.cs: Update to use new string marshalling.
	* glib/Object.cs: Remove old g_type_name DllImport
	as it is no longer used.

	* glue/fileselection.c (gtksharp_file_selection_get_fileop_entry):
	Mark this as const return.

	* gtk/ColorSelection.custom, FileSelection.custom,
	SelectionData.custom: Update to use new string marshalling.

svn path=/trunk/gtk-sharp/; revision=15286
2003-06-10 18:09:47 +00:00
Miguel de Icaza
e547fa0e3f 2003-03-02 Miguel de Icaza <miguel@ximian.com>
* glib/Markup.cs: Add new file.

svn path=/trunk/gtk-sharp/; revision=12114
2003-03-03 01:42:26 +00:00