Re: GTK+ Application class
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: GTK Development List <gtk-devel-list gnome org>
- Subject: Re: GTK+ Application class
- Date: Wed, 25 Oct 2006 16:07:59 +0200
On Mon, 2006-10-23 at 19:14 +0100, Emmanuele Bassi wrote:
> struct _GtkDocumentModelClass
> {
> GTypeInterfaceClass iface;
>
> GtkDocumentHandle *(*document_open) (GtkDocumentModel *model,
> const gchar *uri,
> gboolean read_only,
> GtkDocumentOpenCallback callback,
> gpointer callback_data,
> GError **error);
> GtkDocumentHandle *(*document_save) (GtkDocumentModel *model,
> const gchar *uri,
> gboolean save_backup,
> gboolean overwrite,
> GtkDocumentSaveCallback callback
> gpointer callback_data,
> GError **error);
>
these should be open_document and save_document, not document_... :-)
>
> Not every application has the same needs; but many of them use the same
> logic, or share the same structure. Bindings for object oriented
> programming languages already offer such a base class, abstracting some
> of the GTK+ functions like gtk_init(), gtk_main() and gtk_main_quit(),
> in order to fit them into an OOP approach.
>
yes, a gtk_application_new() could do all that (gtk_init, gtk_main and,
when destroyed, gtk_main_quit).
> There has been also a definite movement towards a set of abstractions
> for desktop usage: the GtkSession API from Dan Winship, the
> GdkScreensaver API from Rodrigo Moya, the network state abstraction I
> proposed; all of these makes sense when handled by a single application
> class.
>
> Finally, the GtkUniqueApplication class makes little sense if we don't
> provide non-unique application class.
>
rather than GtkApplication/GtkUniqueApplication, I guess it would make
more sense to have a "unique" property on the GtkApplication class.
--
Rodrigo Moya <rodrigo gnome-db org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]