Re: GTK+ Application class



Emmanuele Bassi wrote:

[snip]

We have a document-based API using these five vfuncs:

... gchar * (*new_document) (GtkApplication *application);
 gboolean      (*save_document)     (GtkApplication       *application,
                                     const gchar          *document_name,
                                     const gchar          *document_uri,
                                     gboolean              save_backup,
                                     gboolean              overwrite,
                                     GError              **error);
 gboolean      (*open_document)     (GtkApplication       *application,
                                     const gchar          *document_uri,
                                     gboolean              read_only,
                                     GError              **error);
 gboolean      (*close_document)    (GtkApplication       *application,
                                     const gchar          *document_name,
                                     GError              **error);
What are these going to do and who is going to call them?

[snip]

Each GtkApplication should declare which MIME types it supports:

 void          (*set_mime_types)    (GtkApplication       *application,
                                     const gchar * const   mime_types[],
                                     gint                  n_mime_types);
 GSList       *(*get_mime_types)    (GtkApplication       *application);
What's the purpose of this?

[snip]

 void          (*add_window)        (GtkApplication       *application,
                                     const gchar          *document_name,
                                     GtkWindow            *window);
 void          (*remove_window)     (GtkApplication       *application,
                                     const gchar          *document_name,
                                     GtkWindow            *window);
What does it mean to "add window"? And is this one-window-one-document
setup?

[snip]

I'd like to hear from developers using an "application" abstraction in
their code (like Gedit, Evince and Epiphany) what they think about this
API and what they think an application API should provide for their
needs.  For instance, this API is designed for document-based
applications;
All in all, it's really not clear what this api is doing. The document
stuff looks like it's a desktop file taken to the next level, but what for?

And a minor thing: there should be something like try-quit and
really-quit methods; the latter must always be called when application
quits, and it should not be delegated to finalize().

Best regards,
Yevgen




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