Commit Graph

212 Commits

Author SHA1 Message Date
Mike Kestner
8152f4899e 2005-01-26 Mike Kestner <mkestner@novell.com>
* glib/Value.cs : add a private debugging DllImport for ref_counts
	since the glue is there already.  g_value_get_object returns an
	unowned ref, so don't pretend like we own it. Make get_Val work for
	GObject subclasses. [Fixes #71125]

svn path=/trunk/gtk-sharp/; revision=39615
2005-01-27 00:50:46 +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
Dan Winship
7a30d17a4d * glib/Object.cs (ConnectDefaultHandlers): Don't call a signal's
ConnectionMethod if it's already been called for a superclass of
	the current class. #71278

svn path=/trunk/gtk-sharp/; revision=38957
2005-01-14 19:54:07 +00:00
Mike Kestner
b6b39dbbfe 2005-01-11 Mike Kestner <mkestner@novell.com>
* glib/Argv.cs : add automatic progname handling.
	* gdk/Global.custom : kill obsolete warnings by using GLib.Argv.

svn path=/trunk/gtk-sharp/; revision=38729
2005-01-11 20:49:50 +00:00
Mike Kestner
8fd87b2e0a 2005-01-08 Mike Kestner <mkestner@novell.com>
* 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
2005-01-09 00:26:45 +00:00
Mike Kestner
56a0288b7b 2004-12-30 Mike Kestner <mkestner@novell.com>
* glib/Object.cs : mark the Data hashtable obsolete.

svn path=/trunk/gtk-sharp/; revision=38201
2004-12-30 18:59:09 +00:00
Mike Kestner
adef5f7bbd 2004-12-23 Mike Kestner <mkestner@novell.com>
* 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
2004-12-23 22:59:59 +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
256bc09aee 2004-12-16 Tambet Ingo <tambet@ximian.com>
* glib/Opaque.cs : hold a weakref in the hash, not a strong ref.

svn path=/trunk/gtk-sharp/; revision=37840
2004-12-16 17:09:58 +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
3d6cb09562 2004-12-03 Jorge Garcia <jgarcia@ac.upc.es>
* glib/Type.cs:          add Int64 and UInt64 support.
	* glib/TypeConverter.cs: add Int64 and UInt64 support.
	* glib/Value.cs:         add Int64 and UInt64 support.

svn path=/trunk/gtk-sharp/; revision=37049
2004-12-03 20:04:18 +00:00
Todd Berman
6d9785c7f7 2004-12-01 Todd Berman <tberman@off.net>
* generator/StructGen.cs: Check to see if a GType is going to be
        generated. If not, generate a GType.Pointer. This fixes bug
        #70017.
        * glib/TypeConverter.cs: Remove the .IsValueType check, as those
        now have GType properties.
        * gda/Gda.metadata: Change GdaValue.GType to GdaValue.GdaType.
        * doc/en/Gda/Value.xml: Regenerated to reflect new API.

svn path=/trunk/gtk-sharp/; revision=36912
2004-12-01 21:41:10 +00:00
Mike Kestner
70d245e7fe 2004-11-30 Mike Kestner <mkestner@novell.com>
* glib/glue/value.c : add back some code lost in the merge of
	2-4-branch. [Fixes #70045]


svn path=/trunk/gtk-sharp/; revision=36845
2004-11-30 14:36:10 +00:00
Dan Winship
9d04b4dd06 Redo child property handling; now we generate classes to hold
the
        child properties for a given widget in a container, and generate
        the child properties as properties on those classes.
        
        * parser/gapi2xml.pl (addPropElem): don't prepend "child_" to
        child prop names any more

        * generator/ClassBase.cs (ClassBase): keep childprops separate
        from properties
        (GenChildProperties): create a subclass of Gtk.ContainerChild
        containing the container type's child properties, and override
the
        Container indexer to return that type.

        * generator/ObjectGen.cs (Generate): call GenChildProperties

        * generator/Property.cs:
        * generator/ChildProperty.cs: Simplify these a bunch, since
        * child
        properties are now represented as C# properties as well. Also
add
        [GLib.Property(cname)] and [Gtk.ChildProperty(cname)]
attributes.

        * glib/Makefile.am (sources): add PropertyAttribute.cs

        * glib/PropertyAttribute.cs: attribute used to label
        GObject properties

        * gtk/Makefile.am (sources): add ChildPropertyAttribute.cs

        * gtk/gtk-api.raw: regenerate for parser changes (remove
        "Child"/"child_" from child property names).

        * gtk/ChildPropertyAttribute.cs: attribute used to label
        GtkContainer child properties

        * gtk/Container.custom: define the ContainerChild class, and an
        indexer to return instances of it.

        * doc/en/Gtk/: update for container child property change

svn path=/trunk/gtk-sharp/; revision=36284
2004-11-18 20:31:22 +00:00
Dan Winship
598f8e28e5 * glib/Value.cs: add new constructors for enum and boxed values
that take the name of the type rather than an object/property
        name pair; this way they work for both GObject properties and
        GtkContainer child properties.

        * glib/glue/value.c (gtksharp_value_create_from_type_name): glue
        for that

        * glib/Opaque.cs (GetOpaque): Fix this.

        * generator/Property.cs (Generate): Use the new GLib.Value
        constructors. (Fixes setting of enum-valued child properties.)

svn path=/trunk/gtk-sharp/; revision=36174
2004-11-16 18:03:58 +00:00
Mike Kestner
cd10436742 2004-11-09 Mike Kestner <mkestner@novell.com>
* */Makefile.am : make the Obsolete warnings shaddup.

svn path=/trunk/gtk-sharp/; revision=35999
2004-11-11 03:58:14 +00:00
Dan Winship
e1dc10e4c8 * glib/Object.cs (CreateNativeObject): virtualize
(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
2004-11-09 14:22:39 +00:00
Dan Winship
df41dcc177 * parser/gapi2xml.pl (parseInitFunc, addPropElem): handle
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
2004-11-05 16:47:15 +00:00
Todd Berman
532947448e 2004-11-04 Todd Berman <tberman@off.net>
* glib/ListBase.cs: In Empty, call FreeList, not Dispose.

svn path=/trunk/gtk-sharp/; revision=35665
2004-11-04 20:01:40 +00:00
Todd Berman
838882b81a 2004-11-04 Todd Berman <tberman@off.net>
* glib/ListBase.cs: Make sure to properly check if it is a
        GLib.Object subclass.

svn path=/trunk/gtk-sharp/; revision=35654
2004-11-04 19:43:10 +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
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
a5ee1fee3b mark Boxed [Obsolete]
svn path=/trunk/gtk-sharp/; revision=35191
2004-10-21 01:08:10 +00:00
Mike Kestner
cd85c4b3de 2004-09-29 Mike Kestner <mkestner@ximian.com>
* glib/GString.cs : new marshaling class for GStrings.  Used by
	generator to map GString params and returns onto managed strings.
	* glib/Makefile.am : add new file.

svn path=/trunk/gtk-sharp/; revision=34523
2004-09-29 17:47:51 +00:00
Mike Kestner
d75f4ef6ca 2004-09-26 Mike Kestner <mkestner@ximian.com>
* glib/Idle.cs : proxy hash keys are uints, not ints.

svn path=/trunk/gtk-sharp/; revision=34420
2004-09-27 00:28:16 +00:00
Miguel de Icaza
95978e0ce7 2004-09-18 Miguel de Icaza <miguel@ximian.com>
* glib/Source.cs: Add new base class to hold the method to be
	called, and the proxy handler we use to keep references to them
	and avoid a collection.

	Exposes a new variables that references all the active Timeouts
	and Idle handlers to avoid collection/

	* glib/Timeout.cs: Implement TimeoutProxy that acts as a filter to
	remove the proxy when the timeout is removed.

	Register a TimeoutProxy when we create a timeout.

	* glib/Idle.cs: Implement IdleProxy that acts as a filter to
	remove the proxy when the idle handler is removed.

	Register an IdleProxy when we create a timeout.

svn path=/trunk/gtk-sharp/; revision=34094
2004-09-20 16:43:16 +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
b6bd5a901a 2004-08-30 Tambet Ingo <tambet@ximian.com>
* glib/ListBase.cs : indexing bugfix for CopyTo.

svn path=/trunk/gtk-sharp/; revision=33038
2004-08-30 13:10:44 +00:00
Mike Kestner
7a395905ac 2004-08-25 Mike Kestner <mkestner@ximian.com>
* generator/Signal.cs : use typeof instead of Type.GetType to
	specify the event args type.
	* glib/ObjectManager.cs : beef up the type lookup code using
	Assembly.LoadWithPartialName to fix a very popular win32 bug.
	[Fixes #61139 and friends]  Thanks to John Luke for expert
	patch testing on win32.

svn path=/trunk/gtk-sharp/; revision=32831
2004-08-25 18:16:17 +00:00
John Luke
0343bf93e6 2004-08-25 John Luke <john.luke@gmail.com>
* glib/MainLoop.cs: MainLoop implementation by Jeroen
        [Fixes #61493]

svn path=/trunk/gtk-sharp/; revision=32830
2004-08-25 18:11:41 +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
5c0078ec1c 2004-07-24 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide Window.Destroy.
	* gdk/Window.custom : manually impl Destroy since it releases our ref.
	* glib/Object.cs : support unset of Raw values.

svn path=/trunk/gtk-sharp/; revision=31448
2004-07-24 23:36:39 +00:00
Mike Kestner
d9f518cd57 2004-07-09 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : allow null for ctor(GLib.Object).

svn path=/trunk/gtk-sharp/; revision=31408
2004-07-23 14:54:48 +00:00
Mike Kestner
652b7fc82f remove a bunch of doc comments
svn path=/trunk/gtk-sharp/; revision=30951
2004-07-09 15:25:39 +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
Todd Berman
80726b6454 2004-06-12 Todd Berman <tberman@sevenl.net>
* glib/ObjectManager.cs: change CreateInstance overload being used
        to properly pick up protected ctors.

svn path=/trunk/gtk-sharp/; revision=29412
2004-06-12 17:48:58 +00:00
Mike Kestner
112f066abf 2004-06-11 Mike Kestner <mkestner@ximian.com>
* configure.in : deal with a csc-ism in source paths.
	* */Makefile.am : use the GENERATED_SOURCES var.
	* */glue/Makefile.am : add -no-undefined for win32 dll builds.

svn path=/trunk/gtk-sharp/; revision=29367
2004-06-11 18:19:41 +00:00
Mike Kestner
c1440d52d1 2004-06-10 Mike Kestner <mkestner@ximian.com>
* configure.in : AC_SUBST GACUTIL_FLAGS. require mono-0.95 (though
	it's really cvs bleeding edge.)
	* * AssemblyInfo.cs.in : s/pub/snk.  delaysign=no.
	* * Makefile.am : s/pub/snk.  portability fixes to csc from John
	Luke.  Switch to GACUTIL_FLAGS.
	* doc/Makefile.am : don't build docs, install raw xml to the prefix.

svn path=/trunk/gtk-sharp/; revision=29227
2004-06-10 19:45:20 +00:00
Todd Berman
32116e27c7 2004-06-09 Todd Berman <tberman@sevenl.net>
* gdk/Gdk.metadata: mark Window.SetBackPixmap as null_ok.
        * glib/Object.cs: in set_Raw, if value == IntPtr.Zero, dont put that
        in the weakref hashtable, as it creates later issues with gtk+
        returning null and gtk# mistaking if for an object.

svn path=/trunk/gtk-sharp/; revision=29126
2004-06-09 17:53:05 +00:00
Todd Berman
01e3962bc8 2004-06-04 Todd Berman <tberman@sevenl.net>
* glib/Object.cs: ConnectDefaultHandlers needs to look at public api
        as well for virtual methods.
        * gtk/CellRenderer.custom:
        * gtk/Container.custom:
        * gnome/CanvasItem.custom: Add DefaultSignalHandler to remove the need
        for the static ctor.

svn path=/trunk/gtk-sharp/; revision=28851
2004-06-05 01:01:07 +00:00
Mike Kestner
73632b2747 2004-05-28 Mike Kestner <mkestner@ximian.com>
* generator/ObjectGen.cs : adjust to ObjectManager ns change.
	* glib/ManagedValue.cs : move to GLib and internalize.
	* glib/Object.cs : adjust to ObjectManager ns change.
	* glib/ObjectManager.cs : move to GLib.
	* glib/TypeConverter.cs : move to GLib.  return ManagedValue.GType
	when we can't match a type instead of GType.None.
	* gtk/*.custom: adjust for new TypeConverter ns and behavior.

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

	* en/* : run updater. fix a few *Sharp copy/pastisms.

svn path=/trunk/gtk-sharp/; revision=28362
2004-05-28 16:59:21 +00:00
Mike Kestner
2eada8c950 2004-05-27 Mike Kestner <mkestner@ximian.com>
* glib/Object.cs: mark GType property public.

svn path=/trunk/gtk-sharp/; revision=28286
2004-05-27 16:35:21 +00:00
Mike Kestner
7a518421ab 2004-05-25 Mike Kestner <mkestner@ximian.com>
* configure.in : don't expand the GAPI Makefile.
	* parser/Makefile.am : remove SUBDIRS.
	* parser/gapi2xml.pl : remove GAPI::Metadata usage.
	* parser/GAPI/* : kill. long live gapi-fixup.

svn path=/trunk/gtk-sharp/; revision=28085
2004-05-25 21:27:41 +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
Zoltan Varga
fed2de1fe7 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
* glib/time_t_CustomMarshaler.cs: Fix custom marshalling after runtime
	changes.

svn path=/trunk/gtk-sharp/; revision=27621
2004-05-18 19:19:37 +00:00
Mike Kestner
0d052516f1 2004-05-18 Mike Kestner <mkestner@ximian.com>
* glib/MissingIntPtrCtorException.cs : new exception to throw if
	unable to access an IntPtr ctor on a GLib.Object subclass.  We need
	an IntPtr ctor to be able to wrap arbitrary object handles.
	* glib/Object.cs : have NativeType call LookupGType.
	* glib/ObjectManager.cs : throw the new exception in a try/catch.

svn path=/trunk/gtk-sharp/; revision=27563
2004-05-18 05:06:10 +00:00
Mike Kestner
ffe268c415 2004-05-17 Mike Kestner <mkestner@ximian.com>
* generator/SignalHandler.cs : fix some broken/redundant generation in
	the Object/Struct wrapping for sig params.
	* glib/Object.cs : internalize/protect lots of API that shouldn't need
	to be used by non-subclass/non-glib code. Return GType.Object as GType.
	* glib/Value.cs : use internal GLib.Object.NativeType prop.
	* sample/TestDnd.cs : use ToString instead of TypeName.

svn path=/trunk/gtk-sharp/; revision=27530
2004-05-17 17:52:00 +00:00
Todd Berman
e474eaca89 2004-05-14 Todd Berman <tberman@sevenl.net>
* glib/Object.cs: make static GLib.Object.LookupGType protected for now.        * gtk/CellRenderer.custom: code to allow for subclassing and
        implementing a custom cell renderer.
        * gtk/Makefile.am: add custom to build.
        * gtk/glue/Makefile.am: add glue to build.
        * gtk/glue/cellrenderer.c: glue code to override get_size and render
        from cellrenderer.
        * sample/CustomCellRenderer.cs: new sample to show how to implement a
        custom cell renderer.
        * sample/Makefile.am: add CustomCellRenderer sample.

svn path=/trunk/gtk-sharp/; revision=27426
2004-05-14 20:25:57 +00:00