Commit Graph

21 Commits

Author SHA1 Message Date
Dan Winship
faa783fba7 * gnome/Gnome.metadata: mark GnomeTriggerActionFunction's char**
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
2005-04-22 19:43:46 +00:00
Mike Kestner
9001c6fa25 2005-03-29 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs : special case ucs4 "0" conversion.
	[Fixes #74175]

svn path=/trunk/gtk-sharp/; revision=42337
2005-03-29 15:28:02 +00:00
Mike Kestner
ac91f1c8b1 2005-03-10 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs : don't use g_utf8_strlen to determine the byte
	count to be copied, it returns chars, not bytes.
	* glib/glue/unichar.c : implement a quick and dirty strlen glue func.

svn path=/trunk/gtk-sharp/; revision=41661
2005-03-10 20:33:57 +00:00
Mike Kestner
ae7d9dfbf9 2005-03-09 Mike Kestner <mkestner@novell.com>
* glib/Marshaller.cs : add IntPtr.Zero guarding.

svn path=/trunk/gtk-sharp/; revision=41607
2005-03-09 17:01:35 +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
Mike Kestner
0b0700bae6 2005-03-04 Mike Kestner <mkestner@novell.com>
* 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
2005-03-04 18:59:09 +00:00
Mike Kestner
a8f16beaa7 2005-02-01 Fredrik Nilsson <jymdman@home.se>
* glib/Marshaller.cs : DateTime marshaling fix.

svn path=/trunk/gtk-sharp/; revision=39952
2005-02-01 22:35:48 +00:00
Dan Winship
67e7fc486b * glib/Marshaller.cs (StringFormat): Calls String.Format and makes
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
2005-01-20 15:45:13 +00:00
Mike Kestner
e38ece1fdb 2004-12-21 Mike Kestner <mkestner@novell.com>
* glib/Argv.cs : argv marshaling class.
	* glib/Makefile.am : add file.
	* glib/Marshaller.cs : mark the argv methods obsolete.
	* gtk/Application.cs : use GLib.Argv. [Fixes #68812]

svn path=/trunk/gtk-sharp/; revision=38046
2004-12-21 19:47:55 +00:00
Dan Winship
a610fb9a79 * generator/GUnicharGen.cs: generatable for gunichar, using
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
2004-12-20 22:05:21 +00:00
Mike Kestner
993d91fa31 2004-12-07 Mike Kestner <mkestner@novell.com>
* */*.cs : s/glue-2.0/glue-2 so that dllimport works on win32.
	* */*.custom : s/glue-2.0/glue-2
	* */glue/makefile.win32 : s/glue-2.0/glue-2
	* */glue/Makefile.am : s/glue-2.0/glue-2

svn path=/trunk/gtk-sharp/; revision=37324
2004-12-07 19:03:55 +00:00
Mike Kestner
7f3171c814 merge to HEAD of jeroen and friends' work on the 2-4 branch. HEAD
is now tracking Gnome 2.6.

svn path=/trunk/gtk-sharp/; revision=35479
2004-10-29 20:33:07 +00:00
Mike Kestner
0d9c6b74e2 kill a C.WL
svn path=/trunk/gtk-sharp/; revision=33124
2004-08-31 19:18:28 +00:00
Mike Kestner
da322c565f 2004-08-31 Mike Kestner <mkestner@ximian.com>
* glib/Marshaller.cs : fix utc offseting for time_tToDateTime.
	[Fixes #60960]

svn path=/trunk/gtk-sharp/; revision=33107
2004-08-31 16:36:32 +00:00
Mike Kestner
fdcc41a70b 2004-08-17 Mike Kestner <mkestner@ximian.com>
* pango/Pango.metadata : metadata for the pango audit.
	* pango/*.custom : customizations to fix audited API.
	* doc/en/* : docs for some api changes and additions.
	* glib/Marshaller.cs : some gunichar marshal-fu.
	* glib/glue/unichar.c : a new glue method.

svn path=/trunk/gtk-sharp/; revision=32462
2004-08-17 20:43:49 +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
Owen Fraser-Green
ce55d821aa Minor fixed to get gstreamer working.
svn path=/trunk/gtk-sharp/; revision=26341
2004-04-29 21:21:57 +00:00
Peter Williams
4feed7bb77 2004-01-18 Peter Williams <peter@newton.cx>
* glib/Marshaller.cs (ArrayPtrToArgv, ArgvToArrayPtr): new
	functions for marshalling and unmarshalling string arrays
	to/from char **. Not pretty, but lets us call gtk_init()
	in Gtk.

	* gtk/Application.cs (do_init): New helper function to handle
	passing args to Gtk. Uses above functions.
	(Init): Use do_init, take a new progname parameter.
	(InitCheck): Same.

doc/:

2003-01-13  Peter Williams  <peter@newton.cx>

	* en/Gtk/Application.xml: Update Init, InitCheck functions
	for new progname argument. Fix a paste-o in the docs for InitCheck.

svn path=/trunk/gtk-sharp/; revision=22237
2004-01-19 03:24:25 +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