GtkSharpPlan
Table of contents sh
1 Stable Releases2 Plans for Gtk# 2.x2.1 2.4/2.6/2.8 Bindings2.2 2.10 Bindings2.3 2.12 bindings2.3.1 Memory and Reference Management Improvements2.3.2 Gtk.Object destruction enhancements2.3.3 Revamped the GLib.Object finalization mechanism2.3.4 Better exception handling2.3.5 Structure marshaling2.3.6 GInterface Registration2.4 Future Plans2.4.1 Documentation2.4.2 Databinding2.4.3 Indexer Autogeneration2.4.4 GUI Designer Support Improvements Stable Releases
Gtk# 2.4.3, 2.6.3, 2.8.5, and 2.10.4 and 2.12.0 have been released.
Plans for Gtk# 2.x
2.4/2.6/2.8 Bindings
We are now in stable bugfixing mode for the 2.4, 2.6, and 2.8bindings. There are no current plans to add new features for thesereleases.
Novell is packaging the 2.4 releases for our currentlysupported platforms. We recommend developers stick to the 2.4 API formore widespread availability of your applications, unless there is areally compelling reason to use 2.6 or 2.8 APIs. Our 2.6.x releases aresource only.
We are also packaging 2.8 releases for distributions supporting gtk+ 2.8, such as SUSE 10, SLED10, and FC5.
2.10 Bindings
Gtk# 2.10 and the new Gnome# 2.16 package are released in source form on
GNOME FTP (
http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.10)and packaged for platforms which support Gtk+ 2.10. Gtk# 2.10 isincluded in the GNOME platform bindings as a blessed binding fordesktop development. The Gnome# 2.16 releases are included in the GNOMEdesktop release.
2.12 bindings
Gtk# 2.12 bindings are in stable release. Gnome# 2.20 and the newGnomeDesktop# unstable library bindings package have been released aswell. Source tarballs are available from
GNOME FTP (
http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.12).The following enhancements and new features were delivered in 2.12,along with newly bound API members from Gtk+ 2.12 and GNOME 2.20:
Memory and Reference Management Improvements
We now use the toggle_ref API introduced in glib-2.8 to provide moreaccurate reference management for managed subclasses of GLib.Object.Toggle refs are a special class of reference that lets us determine ifwe are the sole owner of a native object. This is especially importantwhen dealing with managed subclasses of GLib.Object. As long asunmanaged code holds references to a managed subclass, we have toartificially keep a managed ref around to ensure garbage collectiondoesn't occur, since the objects likely contain instance data thatwould be lost if the managed object is finalized.
Gtk.Object destruction enhancements
We have simplified and improved the notification and releasemechanism for Gtk object destruction, eliminating a substantial numberof leakage scenarios.
Revamped the GLib.Object finalization mechanism
In the previous implementation, the finalizers invokedGLib.Object.Dispose. GLib.Object.Dispose would queue up the object fora timeout handler to process it. This approach caused problems forsubclasses that override Dispose. Basically, any Dispose override wouldhave had to do a similar timeout mechanism to ensure that any GObjectoperations they performed would not occur on the GC thread.
We now do the timeout in the finalizer itself. It queues up theobject for a timeout handler which invokes Dispose on the queuedobjects. This ensures that all Dispose invocations occur on the "GUIthread" and takes the burden off the subclass author to do the switchin their Dispose overrides.
Better exception handling
Exceptions thrown during native to managed callbacks like signalhandlers and callback parameters previously caused stack corruption andwere nearly impossible to debug. Trunk contains a newGLib.ExceptionManager.UnhandledException event that applications canconnect to be notified of any exceptions thrown in these scenarios. Theexceptions can not be thrown across the native to managed boundary sothis is a mechanism to "catch" those exceptions and deal with themgracefully.
The following code snippet would display an error dialog and terminate the application:
...
UnhandledExceptionHandler h =
new UnhandledExceptionHandler
(OnException
);
ExceptionManager.
UnhandledException += h;
Gtk.
Application.
Run ();
...
void OnException
(object o, UnhandledExceptionArgs args
) { ShowErrorDialog
(args.
ExceptionObject, args.
IsTerminating);
args.
ExitApplication =
true;
}
Structure marshaling
Structures passed to callback marshaling delegates in many cases canbe NULL pointers. We previously marshaled these parameters as "ref Foo"types, which caused crashes in the runtime marshaling code. Thegenerator has been enhanced to treat these parameters as IntPtr toallow for NULL checking prior to marshaling.
GInterface Registration
Registration of GInterface implementations is now supported. Detailson how to implement an interface with a tutorial can be found at
ImplementingGInterfaces
Future Plans
The following list is a prioritized view of the planned feature additions:
Documentation
We have already invested substantial effort into completing the APIdocumentation and will continue to improve the state of the APIdocumentation. Our goal is to introduce no new undocumented APIs goingforward, and to improve the existing documentation coverage, filling instubbed API documentation.
Databinding
We want to build on some existing efforts to provide an integrateddatabinding capability similar to the .Net databinding capability inwinforms.
Indexer Autogeneration
We want to provide autogeneration of indexers and enumerators fortypes which expose foreach methods. This feature is in thefeasibility-study category.
GUI Designer Support Improvements
We want to provide an attribute system to make it easier for Steticto interface with not only the Gtk# widgets, but third partysuper-widgets.