Re: GTK+ Application class



Hi Rodrigo;

On Wed, 2006-10-25 at 16:03 +0200, Rodrigo Moya wrote:

I'll have to update the GtkApplication class vfuncs; I'm afraid that
makes more sense to use the wiki for discussing this - cutting and
pasting stuff on emails is a lot cruftier. :-)
 
> > Subclasses of GtkApplication *must* override the new_document,
> > save_document and open_document vfuncs; close_document and list_document
> > can offer a default implementation (close_document calls save_document
> > and if successful will remove the document id from the list of known
> > documents, and list_documents returns the list of known document ids).
> > 
> so, who would be calling those vfuncs? Gtkapplication internals?

The implementers of the actual GtkApplication subclass - that is you and
me. :-)

Some trivial stuff like "list_documents" or "add_window" can have a
default implementation (this is why I used a GObject instead of a
GTypeInterface, even though GTypeInterface objects *in C* can have
default implementations).

Anyway, after the remarks from Tristan, Paolo and you, we can split the
document model stuff from GtkApplication into its own interface and just
use GtkApplication as a controller object for:

  * documents
  * windows
  * session related stuff (session client)
  * desktop related stuff (screensaver, network state, ...)

We could even *not* subclass GtkApplication and still have a working
application - for those not into subclassing stuff in C. :-) 

> I would really like to have a more generic GtkApplication object, not
> really tied to a window (even though it could perfectly have ways for
> binding it to a Window). That way, any app (think GUI daemons, like
> power manager, for instance) could use it as a central point of access
> to the session management, unique apps, main windows, etc.

I agree.

I'll update the page on the wiki[1] and keep working on this stuff in
order to get the structure and the objects more fleshed out.

Ciao,
 Emmanuele.

+++

[1] http://live.gnome.org/GTK+/ApplicationClass

-- 
Emmanuele Bassi,  E: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]