diff options
Diffstat (limited to 'src/direct/DirectWindow.c')
-rw-r--r-- | src/direct/DirectWindow.c | 935 |
1 files changed, 935 insertions, 0 deletions
diff --git a/src/direct/DirectWindow.c b/src/direct/DirectWindow.c new file mode 100644 index 0000000..dcba026 --- /dev/null +++ b/src/direct/DirectWindow.c @@ -0,0 +1,935 @@ +/* DirectWindow.c generated by valac 0.32.1, the Vala compiler + * generated from DirectWindow.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU LGPL (version 2.1 or later). + * See the COPYING file in this distribution. + */ + +#include <glib.h> +#include <glib-object.h> +#include <gtk/gtk.h> +#include <stdlib.h> +#include <string.h> +#include <gio/gio.h> +#include <gee.h> +#include <glib/gi18n-lib.h> +#include <gdk/gdk.h> + + +#define TYPE_PAGE_WINDOW (page_window_get_type ()) +#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow)) +#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass)) +#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW)) +#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW)) +#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass)) + +typedef struct _PageWindow PageWindow; +typedef struct _PageWindowClass PageWindowClass; +typedef struct _PageWindowPrivate PageWindowPrivate; + +#define TYPE_PAGE (page_get_type ()) +#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page)) +#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass)) +#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE)) +#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE)) +#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass)) + +typedef struct _Page Page; +typedef struct _PageClass PageClass; + +#define TYPE_APP_WINDOW (app_window_get_type ()) +#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow)) +#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass)) +#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW)) +#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW)) +#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass)) + +typedef struct _AppWindow AppWindow; +typedef struct _AppWindowClass AppWindowClass; +typedef struct _AppWindowPrivate AppWindowPrivate; + +#define TYPE_DIMENSIONS (dimensions_get_type ()) +typedef struct _Dimensions Dimensions; + +#define TYPE_DIRECT_WINDOW (direct_window_get_type ()) +#define DIRECT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_WINDOW, DirectWindow)) +#define DIRECT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_WINDOW, DirectWindowClass)) +#define IS_DIRECT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_WINDOW)) +#define IS_DIRECT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_WINDOW)) +#define DIRECT_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_WINDOW, DirectWindowClass)) + +typedef struct _DirectWindow DirectWindow; +typedef struct _DirectWindowClass DirectWindowClass; +typedef struct _DirectWindowPrivate DirectWindowPrivate; + +#define TYPE_SINGLE_PHOTO_PAGE (single_photo_page_get_type ()) +#define SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage)) +#define SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass)) +#define IS_SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_PHOTO_PAGE)) +#define IS_SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_PHOTO_PAGE)) +#define SINGLE_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass)) + +typedef struct _SinglePhotoPage SinglePhotoPage; +typedef struct _SinglePhotoPageClass SinglePhotoPageClass; + +#define TYPE_EDITING_HOST_PAGE (editing_host_page_get_type ()) +#define EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPage)) +#define EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDITING_HOST_PAGE, EditingHostPageClass)) +#define IS_EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDITING_HOST_PAGE)) +#define IS_EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDITING_HOST_PAGE)) +#define EDITING_HOST_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPageClass)) + +typedef struct _EditingHostPage EditingHostPage; +typedef struct _EditingHostPageClass EditingHostPageClass; + +#define TYPE_DIRECT_PHOTO_PAGE (direct_photo_page_get_type ()) +#define DIRECT_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage)) +#define DIRECT_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPageClass)) +#define IS_DIRECT_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_PAGE)) +#define IS_DIRECT_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_PAGE)) +#define DIRECT_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPageClass)) + +typedef struct _DirectPhotoPage DirectPhotoPage; +typedef struct _DirectPhotoPageClass DirectPhotoPageClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define TYPE_DATA_COLLECTION (data_collection_get_type ()) +#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) +#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) +#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) +#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) +#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) + +typedef struct _DataCollection DataCollection; +typedef struct _DataCollectionClass DataCollectionClass; + +#define TYPE_VIEW_COLLECTION (view_collection_get_type ()) +#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection)) +#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass)) +#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION)) +#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION)) +#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass)) + +typedef struct _ViewCollection ViewCollection; +typedef struct _ViewCollectionClass ViewCollectionClass; + +#define TYPE_DATA_OBJECT (data_object_get_type ()) +#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) +#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) +#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) +#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) +#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) + +typedef struct _DataObject DataObject; +typedef struct _DataObjectClass DataObjectClass; + +#define TYPE_ALTERATION (alteration_get_type ()) +#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) +#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) +#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) +#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) +#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) + +typedef struct _Alteration Alteration; +typedef struct _AlterationClass AlterationClass; +#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) + +#define TYPE_DATA_VIEW (data_view_get_type ()) +#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) +#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) +#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) +#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) +#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) + +typedef struct _DataView DataView; +typedef struct _DataViewClass DataViewClass; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE (direct_fullscreen_photo_page_get_type ()) +#define DIRECT_FULLSCREEN_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPage)) +#define DIRECT_FULLSCREEN_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPageClass)) +#define IS_DIRECT_FULLSCREEN_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE)) +#define IS_DIRECT_FULLSCREEN_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE)) +#define DIRECT_FULLSCREEN_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPageClass)) + +typedef struct _DirectFullscreenPhotoPage DirectFullscreenPhotoPage; +typedef struct _DirectFullscreenPhotoPageClass DirectFullscreenPhotoPageClass; + +#define TYPE_DATA_SOURCE (data_source_get_type ()) +#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) +#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) +#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) +#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) +#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) + +typedef struct _DataSource DataSource; +typedef struct _DataSourceClass DataSourceClass; + +#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) +#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) +#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) +#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) +#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) +#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) + +typedef struct _ThumbnailSource ThumbnailSource; +typedef struct _ThumbnailSourceClass ThumbnailSourceClass; + +#define TYPE_MEDIA_SOURCE (media_source_get_type ()) +#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) +#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) +#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) +#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) +#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) + +typedef struct _MediaSource MediaSource; +typedef struct _MediaSourceClass MediaSourceClass; + +#define TYPE_PHOTO_SOURCE (photo_source_get_type ()) +#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource)) +#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass)) +#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE)) +#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE)) +#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass)) + +typedef struct _PhotoSource PhotoSource; +typedef struct _PhotoSourceClass PhotoSourceClass; + +#define TYPE_PHOTO (photo_get_type ()) +#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo)) +#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass)) +#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO)) +#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO)) +#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass)) + +typedef struct _Photo Photo; +typedef struct _PhotoClass PhotoClass; + +#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ()) +#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) +#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) +#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) +#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) +#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) + +typedef struct _ConfigurationFacade ConfigurationFacade; +typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; + +#define CONFIG_TYPE_FACADE (config_facade_get_type ()) +#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) +#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) +#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) +#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) +#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) + +typedef struct _ConfigFacade ConfigFacade; +typedef struct _ConfigFacadeClass ConfigFacadeClass; + +struct _PageWindow { + GtkWindow parent_instance; + PageWindowPrivate * priv; + GtkUIManager* ui; +}; + +struct _PageWindowClass { + GtkWindowClass parent_class; + void (*switched_pages) (PageWindow* self, Page* old_page, Page* new_page); + void (*set_current_page) (PageWindow* self, Page* page); + void (*clear_current_page) (PageWindow* self); +}; + +struct _Dimensions { + gint width; + gint height; +}; + +struct _AppWindow { + PageWindow parent_instance; + AppWindowPrivate * priv; + GtkActionGroup** common_action_groups; + gint common_action_groups_length1; + gboolean maximized; + Dimensions dimensions; + gint pos_x; + gint pos_y; +}; + +struct _AppWindowClass { + PageWindowClass parent_class; + void (*on_fullscreen) (AppWindow* self); + gchar* (*get_app_role) (AppWindow* self); + void (*on_quit) (AppWindow* self); + GtkActionGroup** (*create_common_action_groups) (AppWindow* self, int* result_length1); + void (*replace_common_placeholders) (AppWindow* self, GtkUIManager* ui); + void (*update_common_action_availability) (AppWindow* self, Page* old_page, Page* new_page); + void (*update_common_actions) (AppWindow* self, Page* page, gint selected_count, gint count); +}; + +struct _DirectWindow { + AppWindow parent_instance; + DirectWindowPrivate * priv; +}; + +struct _DirectWindowClass { + AppWindowClass parent_class; +}; + +struct _DirectWindowPrivate { + DirectPhotoPage* direct_photo_page; +}; + + +static gpointer direct_window_parent_class = NULL; +extern AppWindow* app_window_instance; + +GType page_window_get_type (void) G_GNUC_CONST; +GType page_get_type (void) G_GNUC_CONST; +GType app_window_get_type (void) G_GNUC_CONST; +GType dimensions_get_type (void) G_GNUC_CONST; +Dimensions* dimensions_dup (const Dimensions* self); +void dimensions_free (Dimensions* self); +GType direct_window_get_type (void) G_GNUC_CONST; +GType single_photo_page_get_type (void) G_GNUC_CONST; +GType editing_host_page_get_type (void) G_GNUC_CONST; +GType direct_photo_page_get_type (void) G_GNUC_CONST; +#define DIRECT_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECT_WINDOW, DirectWindowPrivate)) +enum { + DIRECT_WINDOW_DUMMY_PROPERTY +}; +DirectWindow* direct_window_new (GFile* file); +DirectWindow* direct_window_construct (GType object_type, GFile* file); +AppWindow* app_window_construct (GType object_type); +DirectPhotoPage* direct_photo_page_new (GFile* file); +DirectPhotoPage* direct_photo_page_construct (GType object_type, GFile* file); +gpointer data_collection_ref (gpointer instance); +void data_collection_unref (gpointer instance); +GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_data_collection (GValue* value, gpointer v_object); +void value_take_data_collection (GValue* value, gpointer v_object); +gpointer value_get_data_collection (const GValue* value); +GType data_collection_get_type (void) G_GNUC_CONST; +GType view_collection_get_type (void) G_GNUC_CONST; +ViewCollection* page_get_view (Page* self); +static void direct_window_on_photo_changed (DirectWindow* self); +GType data_object_get_type (void) G_GNUC_CONST; +gpointer alteration_ref (gpointer instance); +void alteration_unref (gpointer instance); +GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_alteration (GValue* value, gpointer v_object); +void value_take_alteration (GValue* value, gpointer v_object); +gpointer value_get_alteration (const GValue* value); +GType alteration_get_type (void) G_GNUC_CONST; +static void _direct_window_on_photo_changed_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self); +GType data_view_get_type (void) G_GNUC_CONST; +static void _direct_window_on_photo_changed_view_collection_items_state_changed (ViewCollection* _sender, GeeIterable* changed, gpointer self); +void page_window_set_current_page (PageWindow* self, Page* page); +void direct_window_update_title (DirectWindow* self, GFile* file, gboolean modified); +void page_switched_to (Page* self); +GtkMenuBar* page_get_menubar (Page* self); +GtkToolbar* page_get_toolbar (Page* self); +DirectWindow* direct_window_get_app (void); +DirectPhotoPage* direct_window_get_direct_page (DirectWindow* self); +Page* page_window_get_current_page (PageWindow* self); +gchar* get_display_pathname (GFile* file); +#define RESOURCES_APP_TITLE "Shotwell" +static void direct_window_real_on_fullscreen (AppWindow* base); +GFile* direct_photo_page_get_current_file (DirectPhotoPage* self); +void app_window_go_fullscreen (AppWindow* self, Page* page); +DirectFullscreenPhotoPage* direct_fullscreen_photo_page_new (GFile* file); +DirectFullscreenPhotoPage* direct_fullscreen_photo_page_construct (GType object_type, GFile* file); +GType direct_fullscreen_photo_page_get_type (void) G_GNUC_CONST; +static gchar* direct_window_real_get_app_role (AppWindow* base); +#define RESOURCES_APP_DIRECT_ROLE _ ("Photo Viewer") +GType data_source_get_type (void) G_GNUC_CONST; +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType media_source_get_type (void) G_GNUC_CONST; +GType photo_source_get_type (void) G_GNUC_CONST; +GType photo_get_type (void) G_GNUC_CONST; +Photo* editing_host_page_get_photo (EditingHostPage* self); +GFile* media_source_get_file (MediaSource* self); +gboolean photo_has_alterations (Photo* self); +static void direct_window_real_on_quit (AppWindow* base); +gboolean direct_photo_page_check_quit (DirectPhotoPage* self); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +void configuration_facade_set_direct_window_state (ConfigurationFacade* self, gboolean maximize, Dimensions* dimensions); +void app_window_on_quit (AppWindow* self); +static gboolean direct_window_real_delete_event (GtkWidget* base, GdkEventAny* event); +static gboolean direct_window_real_button_press_event (GtkWidget* base, GdkEventButton* event); +void app_window_on_fullscreen (AppWindow* self); +static gboolean direct_window_real_key_press_event (GtkWidget* base, GdkEventKey* event); +static void direct_window_finalize (GObject* obj); + + +static void _direct_window_on_photo_changed_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) { +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_on_photo_changed ((DirectWindow*) self); +#line 371 "DirectWindow.c" +} + + +static void _direct_window_on_photo_changed_view_collection_items_state_changed (ViewCollection* _sender, GeeIterable* changed, gpointer self) { +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_on_photo_changed ((DirectWindow*) self); +#line 378 "DirectWindow.c" +} + + +DirectWindow* direct_window_construct (GType object_type, GFile* file) { + DirectWindow * self = NULL; + GFile* _tmp0_ = NULL; + DirectPhotoPage* _tmp1_ = NULL; + DirectPhotoPage* _tmp2_ = NULL; + ViewCollection* _tmp3_ = NULL; + ViewCollection* _tmp4_ = NULL; + DirectPhotoPage* _tmp5_ = NULL; + ViewCollection* _tmp6_ = NULL; + ViewCollection* _tmp7_ = NULL; + DirectPhotoPage* _tmp8_ = NULL; + GFile* _tmp9_ = NULL; + DirectPhotoPage* _tmp10_ = NULL; + GtkBox* layout = NULL; + GtkBox* _tmp11_ = NULL; + DirectPhotoPage* _tmp12_ = NULL; + GtkMenuBar* _tmp13_ = NULL; + GtkMenuBar* _tmp14_ = NULL; + DirectPhotoPage* _tmp15_ = NULL; + DirectPhotoPage* _tmp16_ = NULL; + GtkToolbar* _tmp17_ = NULL; + GtkToolbar* _tmp18_ = NULL; +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (G_IS_FILE (file), NULL); +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = (DirectWindow*) app_window_construct (object_type); +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = file; +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = direct_photo_page_new (_tmp0_); +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_object_ref_sink (_tmp1_); +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (self->priv->direct_photo_page); +#line 11 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self->priv->direct_photo_page = _tmp1_; +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = self->priv->direct_photo_page; +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PAGE, Page)); +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = _tmp3_; +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _direct_window_on_photo_changed_data_collection_items_altered, self, 0); +#line 12 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _data_collection_unref0 (_tmp4_); +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = self->priv->direct_photo_page; +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_PAGE, Page)); +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp7_ = _tmp6_; +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_signal_connect_object (_tmp7_, "items-state-changed", (GCallback) _direct_window_on_photo_changed_view_collection_items_state_changed, self, 0); +#line 13 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _data_collection_unref0 (_tmp7_); +#line 15 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp8_ = self->priv->direct_photo_page; +#line 15 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + page_window_set_current_page (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE_WINDOW, PageWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PAGE, Page)); +#line 17 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp9_ = file; +#line 17 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_update_title (self, _tmp9_, FALSE); +#line 19 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp10_ = self->priv->direct_photo_page; +#line 19 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + page_switched_to (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_PAGE, Page)); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp11_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_object_ref_sink (_tmp11_); +#line 23 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + layout = _tmp11_; +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp12_ = self->priv->direct_photo_page; +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp13_ = page_get_menubar (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_PAGE, Page)); +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp14_ = _tmp13_; +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_box_pack_start (layout, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 24 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp14_); +#line 25 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp15_ = self->priv->direct_photo_page; +#line 25 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_box_pack_start (layout, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0); +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp16_ = self->priv->direct_photo_page; +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp17_ = page_get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_PAGE, Page)); +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp18_ = _tmp17_; +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_box_pack_end (layout, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 26 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp18_); +#line 28 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (layout, gtk_widget_get_type (), GtkWidget)); +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (layout); +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return self; +#line 486 "DirectWindow.c" +} + + +DirectWindow* direct_window_new (GFile* file) { +#line 10 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return direct_window_construct (TYPE_DIRECT_WINDOW, file); +#line 493 "DirectWindow.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return self ? g_object_ref (self) : NULL; +#line 500 "DirectWindow.c" +} + + +DirectWindow* direct_window_get_app (void) { + DirectWindow* result = NULL; + AppWindow* _tmp0_ = NULL; + DirectWindow* _tmp1_ = NULL; +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = app_window_instance; +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DIRECT_WINDOW, DirectWindow)); +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = _tmp1_; +#line 32 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 516 "DirectWindow.c" +} + + +DirectPhotoPage* direct_window_get_direct_page (DirectWindow* self) { + DirectPhotoPage* result = NULL; + Page* _tmp0_ = NULL; +#line 35 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (IS_DIRECT_WINDOW (self), NULL); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE_WINDOW, PageWindow)); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage); +#line 36 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 531 "DirectWindow.c" +} + + +void direct_window_update_title (DirectWindow* self, GFile* file, gboolean modified) { + const gchar* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + GFile* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + GFile* _tmp5_ = NULL; + GFile* _tmp6_ = NULL; + GFile* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gchar* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; +#line 39 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_if_fail (IS_DIRECT_WINDOW (self)); +#line 39 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_if_fail (G_IS_FILE (file)); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = modified; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp1_) { +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = "*"; +#line 558 "DirectWindow.c" + } else { +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = ""; +#line 562 "DirectWindow.c" + } +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = file; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = g_file_get_basename (_tmp2_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = _tmp3_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = file; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = g_file_get_parent (_tmp5_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp7_ = _tmp6_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp8_ = get_display_pathname (_tmp7_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp9_ = _tmp8_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp10_ = g_strdup_printf ("%s%s (%s) - %s", _tmp0_, _tmp4_, _tmp9_, RESOURCES_APP_TITLE); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp11_ = _tmp10_; +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp11_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_free0 (_tmp11_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_free0 (_tmp9_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp7_); +#line 40 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_free0 (_tmp4_); +#line 594 "DirectWindow.c" +} + + +static void direct_window_real_on_fullscreen (AppWindow* base) { + DirectWindow * self; + GFile* file = NULL; + DirectPhotoPage* _tmp0_ = NULL; + DirectPhotoPage* _tmp1_ = NULL; + GFile* _tmp2_ = NULL; + GFile* _tmp3_ = NULL; + DirectFullscreenPhotoPage* _tmp4_ = NULL; + DirectFullscreenPhotoPage* _tmp5_ = NULL; +#line 44 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = direct_window_get_direct_page (self); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = direct_photo_page_get_current_file (_tmp1_); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = _tmp2_; +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp1_); +#line 45 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + file = _tmp3_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = direct_fullscreen_photo_page_new (file); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_object_ref_sink (_tmp4_); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = _tmp4_; +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + app_window_go_fullscreen (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_PAGE, Page)); +#line 47 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp5_); +#line 44 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (file); +#line 633 "DirectWindow.c" +} + + +static gchar* direct_window_real_get_app_role (AppWindow* base) { + DirectWindow * self; + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 50 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 51 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = g_strdup (RESOURCES_APP_DIRECT_ROLE); +#line 51 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = _tmp0_; +#line 51 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 649 "DirectWindow.c" +} + + +static void direct_window_on_photo_changed (DirectWindow* self) { + Photo* photo = NULL; + DirectPhotoPage* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; +#line 54 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_if_fail (IS_DIRECT_WINDOW (self)); +#line 55 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = self->priv->direct_photo_page; +#line 55 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EDITING_HOST_PAGE, EditingHostPage)); +#line 55 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + photo = _tmp1_; +#line 56 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = photo; +#line 56 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp2_ != NULL) { +#line 670 "DirectWindow.c" + Photo* _tmp3_ = NULL; + GFile* _tmp4_ = NULL; + GFile* _tmp5_ = NULL; + Photo* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = photo; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = _tmp4_; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = photo; +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp7_ = photo_has_alterations (_tmp6_); +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_update_title (self, _tmp5_, _tmp7_); +#line 57 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp5_); +#line 690 "DirectWindow.c" + } +#line 54 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (photo); +#line 694 "DirectWindow.c" +} + + +static void direct_window_real_on_quit (AppWindow* base) { + DirectWindow * self; + DirectPhotoPage* _tmp0_ = NULL; + DirectPhotoPage* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + ConfigFacade* _tmp4_ = NULL; + ConfigFacade* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + Dimensions _tmp7_ = {0}; +#line 60 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = direct_window_get_direct_page (self); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = direct_photo_page_check_quit (_tmp1_); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = !_tmp2_; +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp1_); +#line 61 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp3_) { +#line 62 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return; +#line 724 "DirectWindow.c" + } +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = config_facade_get_instance (); +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = _tmp4_; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)->maximized; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)->dimensions; +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + configuration_facade_set_direct_window_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp6_, &_tmp7_); +#line 64 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp5_); +#line 66 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + APP_WINDOW_CLASS (direct_window_parent_class)->on_quit (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)); +#line 740 "DirectWindow.c" +} + + +static gboolean direct_window_real_delete_event (GtkWidget* base, GdkEventAny* event) { + DirectWindow * self; + gboolean result = FALSE; + DirectPhotoPage* _tmp0_ = NULL; + DirectPhotoPage* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + gboolean _tmp4_ = FALSE; +#line 69 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 69 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = direct_window_get_direct_page (self); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = direct_photo_page_check_quit (_tmp1_); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = !_tmp2_; +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (_tmp1_); +#line 70 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp3_) { +#line 71 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = TRUE; +#line 71 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 772 "DirectWindow.c" + } +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (GTK_WIDGET_CLASS (direct_window_parent_class)->delete_event != NULL) { +#line 776 "DirectWindow.c" + GdkEventAny* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = event; +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp6_ = GTK_WIDGET_CLASS (direct_window_parent_class)->delete_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow), gtk_widget_get_type (), GtkWidget), _tmp5_); +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = _tmp6_; +#line 785 "DirectWindow.c" + } else { +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = FALSE; +#line 789 "DirectWindow.c" + } +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = _tmp4_; +#line 73 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 795 "DirectWindow.c" +} + + +static gboolean direct_window_real_button_press_event (GtkWidget* base, GdkEventButton* event) { + DirectWindow * self; + gboolean result = FALSE; + GdkEventButton* _tmp0_ = NULL; + GdkEventType _tmp1_ = 0; +#line 76 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 76 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 77 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = event; +#line 77 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_->type; +#line 77 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (_tmp1_ == GDK_2BUTTON_PRESS) { +#line 78 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + app_window_on_fullscreen (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)); +#line 80 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = TRUE; +#line 80 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 820 "DirectWindow.c" + } +#line 83 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = FALSE; +#line 83 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 826 "DirectWindow.c" +} + + +static gboolean direct_window_real_key_press_event (GtkWidget* base, GdkEventKey* event) { + DirectWindow * self; + gboolean result = FALSE; + GdkEventKey* _tmp0_ = NULL; + guint _tmp1_ = 0U; + const gchar* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; +#line 86 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_WINDOW, DirectWindow); +#line 86 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_return_val_if_fail (event != NULL, FALSE); +#line 88 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp0_ = event; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp1_ = _tmp0_->keyval; +#line 88 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp2_ = gdk_keyval_name (_tmp1_); +#line 88 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (g_strcmp0 (_tmp2_, "Escape") == 0) { +#line 89 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + app_window_on_quit (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow)); +#line 91 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = TRUE; +#line 91 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 855 "DirectWindow.c" + } +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + if (GTK_WIDGET_CLASS (direct_window_parent_class)->key_press_event != NULL) { +#line 859 "DirectWindow.c" + GdkEventKey* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp4_ = event; +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp5_ = GTK_WIDGET_CLASS (direct_window_parent_class)->key_press_event (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_APP_WINDOW, AppWindow), gtk_widget_get_type (), GtkWidget), _tmp4_); +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = _tmp5_; +#line 868 "DirectWindow.c" + } else { +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _tmp3_ = FALSE; +#line 872 "DirectWindow.c" + } +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + result = _tmp3_; +#line 95 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + return result; +#line 878 "DirectWindow.c" +} + + +static void direct_window_class_init (DirectWindowClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + direct_window_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + g_type_class_add_private (klass, sizeof (DirectWindowPrivate)); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((AppWindowClass *) klass)->on_fullscreen = direct_window_real_on_fullscreen; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((AppWindowClass *) klass)->get_app_role = direct_window_real_get_app_role; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((AppWindowClass *) klass)->on_quit = direct_window_real_on_quit; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((GtkWidgetClass *) klass)->delete_event = direct_window_real_delete_event; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((GtkWidgetClass *) klass)->button_press_event = direct_window_real_button_press_event; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + ((GtkWidgetClass *) klass)->key_press_event = direct_window_real_key_press_event; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + G_OBJECT_CLASS (klass)->finalize = direct_window_finalize; +#line 901 "DirectWindow.c" +} + + +static void direct_window_instance_init (DirectWindow * self) { +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self->priv = DIRECT_WINDOW_GET_PRIVATE (self); +#line 908 "DirectWindow.c" +} + + +static void direct_window_finalize (GObject* obj) { + DirectWindow * self; +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECT_WINDOW, DirectWindow); +#line 8 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + _g_object_unref0 (self->priv->direct_photo_page); +#line 7 "/home/jens/Source/shotwell/src/direct/DirectWindow.vala" + G_OBJECT_CLASS (direct_window_parent_class)->finalize (obj); +#line 920 "DirectWindow.c" +} + + +GType direct_window_get_type (void) { + static volatile gsize direct_window_type_id__volatile = 0; + if (g_once_init_enter (&direct_window_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (DirectWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectWindow), 0, (GInstanceInitFunc) direct_window_instance_init, NULL }; + GType direct_window_type_id; + direct_window_type_id = g_type_register_static (TYPE_APP_WINDOW, "DirectWindow", &g_define_type_info, 0); + g_once_init_leave (&direct_window_type_id__volatile, direct_window_type_id); + } + return direct_window_type_id__volatile; +} + + + |