## EogApplication

EogApplication

## Synopsis

    #define             EOG_APP
                        EogApplication;
    EogApplication *    eog_application_get_instance        (void);
    gboolean            eog_application_register_service    (EogApplication *application);
    void                eog_application_shutdown            (EogApplication *application);
    gboolean            eog_application_open_window         (EogApplication *application,
                                                             guint timestamp,
                                                             EogStartupFlags flags,
                                                             GError **error);
    gboolean            eog_application_open_uri_list       (EogApplication *application,
                                                             GSList *uri_list,
                                                             guint timestamp,
                                                             EogStartupFlags flags,
                                                             GError **error);
    gboolean            eog_application_open_file_list      (EogApplication *application,
                                                             GSList *file_list,
                                                             guint timestamp,
                                                             EogStartupFlags flags,
                                                             GError **error);
    gboolean            eog_application_open_uris           (EogApplication *application,
                                                             gchar **uris,
                                                             guint timestamp,
                                                             EogStartupFlags flags,
                                                             GError **error);
    GList *             eog_application_get_windows         (EogApplication *application);
    EggToolbarsModel *  eog_application_get_toolbars_model  (EogApplication *application);
    void                eog_application_save_toolbars_model (EogApplication *application);
    void                eog_application_reset_toolbars_model
                                                            (EogApplication *app);
    void                eog_application_screensaver_enable  (EogApplication *application);
    void                eog_application_screensaver_disable (EogApplication *application);

## Object Hierarchy

      GObject
       +----EogApplication

## Description

## Details

### EOG_APP

    #define EOG_APP				(eog_application_get_instance ())

### EogApplication

    typedef struct _EogApplication EogApplication;

### eog_application_get_instance ()

    EogApplication *    eog_application_get_instance        (void);

Returns a singleton instance of EogApplication currently running. If not running yet, it will create one.

Returns : | a running EogApplication.

### eog_application_register_service ()

    gboolean            eog_application_register_service    (EogApplication *application);

Registers EogApplication's DBus service, to allow remote calls. If the DBus service is already registered, or there is any other connection error, returns `FALSE`.

`application` : | An EogApplication.
Returns : | `TRUE` if the service was registered succesfully. `FALSE` otherwise.

### eog_application_shutdown ()

    void                eog_application_shutdown            (EogApplication *application);

Takes care of shutting down the Eye of GNOME, and quits.

`application` : | An EogApplication.

### eog_application_open_window ()

    gboolean            eog_application_open_window         (EogApplication *application,
                                                             guint timestamp,
                                                             EogStartupFlags flags,
                                                             GError **error);

Opens and presents an empty EogWindow to the user. If there is an empty window already open, this will be used. Otherwise, a new one will be instantiated.

`application` : | An EogApplication.
`timestamp` : | The timestamp of the user interaction which triggered this call (see `gtk_window_present_with_time()`).
`flags` : | A set of EogStartupFlags influencing a new windows' state.
`error` : | Return location for a GError, or NULL to ignore errors.
Returns : | `FALSE` if `application` is invalid, `TRUE` otherwise

### eog_application_open_uri_list ()

    gboolean            eog_application_open_uri_list       (EogApplication *application,
                                                             GSList *uri_list,
                                                             guint timestamp,
                                                             EogStartupFlags flags,
                                                             GError **error);

Opens a list of images, from a list of URIs. See `eog_application_open_file_list()` for details.

`application` : | An EogApplication.
`uri_list` : | A list of URIs.
`timestamp` : | The timestamp of the user interaction which triggered this call (see `gtk_window_present_with_time()`).
`flags` : | A set of EogStartupFlags influencing a new windows' state.
`error` : | Return location for a GError, or NULL to ignore errors.
Returns : | Currently always `TRUE`.

### eog_application_open_file_list ()

    gboolean            eog_application_open_file_list      (EogApplication *application,
                                                             GSList *file_list,
                                                             guint timestamp,
                                                             EogStartupFlags flags,
                                                             GError **error);

Opens a list of files in a EogWindow. If an EogWindow displaying the first image in the list is already open, this will be used. Otherwise, an empty EogWindow is used, either already existing or newly created.

`application` : | An EogApplication.
`file_list` : | A list of GFiles.
`timestamp` : | The timestamp of the user interaction which triggered this call (see `gtk_window_present_with_time()`).
`flags` : | A set of EogStartupFlags influencing a new windows' state.
`error` : | Return location for a GError, or NULL to ignore errors.
Returns : | Currently always `TRUE`.

### eog_application_open_uris ()

    gboolean            eog_application_open_uris           (EogApplication *application,
                                                             gchar **uris,
                                                             guint timestamp,
                                                             EogStartupFlags flags,
                                                             GError **error);

Opens a list of images, from a list of URI strings. See `eog_application_open_file_list()` for details.

`application` : | an EogApplication
`uris` : | A GList of URI strings.
`timestamp` : | The timestamp of the user interaction which triggered this call (see `gtk_window_present_with_time()`).
`flags` : | A set of EogStartupFlags influencing a new windows' state.
`error` : | Return location for a GError, or NULL to ignore errors.
Returns : | Currently always `TRUE`.

### eog_application_get_windows ()

    GList *             eog_application_get_windows         (EogApplication *application);

Gets the list of existing EogApplications. The windows in this list are not individually referenced, you need to keep your own references if you want to perform actions that may destroy them.

`application` : | An EogApplication.
Returns : | A new list of EogWindows.

### eog_application_get_toolbars_model ()

    EggToolbarsModel *  eog_application_get_toolbars_model  (EogApplication *application);

Retrieves the EogTolbarsModel for the toolbar in EogApplication.

`application` : | An EogApplication.
Returns : | An EogToolbarsModel.

### eog_application_save_toolbars_model ()

    void                eog_application_save_toolbars_model (EogApplication *application);

Causes the saving of the model of the toolbar in EogApplication to a file.

`application` : | An EogApplication.

### eog_application_reset_toolbars_model ()

    void                eog_application_reset_toolbars_model
                                                            (EogApplication *app);

Restores the toolbars model to the defaults.

`app` : | an EogApplication

### eog_application_screensaver_enable ()

    void                eog_application_screensaver_enable  (EogApplication *application);

Enables the screensaver. Usually necessary after a call to `eog_application_screensaver_disable()`.

`application` : | an EogApplication.

### eog_application_screensaver_disable ()

    void                eog_application_screensaver_disable (EogApplication *application);

Disables the screensaver. Useful when the application is in fullscreen or similar mode.

`application` : | an EogApplication.