1 /* Eye of Gnome - Main Window 2 * 3 * Copyright (C) 2000-2008 The Free Software Foundation 4 * 5 * Author: Lucas Rocha <lucasr@gnome.org> 6 * 7 * Based on code by: 8 * - Federico Mena-Quintero <federico@gnome.org> 9 * - Jens Finke <jens@gnome.org> 10 * Based on evince code (shell/ev-window.c) by: 11 * - Martin Kretzschmar <martink@gnome.org> 12 * 13 * This program is free software; you can redistribute it and/or modify 14 * it under the terms of the GNU General Public License as published by 15 * the Free Software Foundation; either version 2 of the License, or 16 * (at your option) any later version. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * You should have received a copy of the GNU General Public License along 24 * with this program; if not, write to the Free Software Foundation, Inc., 25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 */ 27 28 #ifndef __EOG_WINDOW_H__ 29 #define __EOG_WINDOW_H__ 30 31 #include "eog-list-store.h" 32 #include "eog-image.h" 33 34 #include <glib.h> 35 #include <glib-object.h> 36 #include <gio/gmenu.h> 37 #include <gtk/gtk.h> 38 39 G_BEGIN_DECLS 40 41 typedef struct _EogWindow EogWindow; 42 typedef struct _EogWindowClass EogWindowClass; 43 typedef struct _EogWindowPrivate EogWindowPrivate; 44 45 #define EOG_TYPE_WINDOW (eog_window_get_type ()) 46 #define EOG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EOG_TYPE_WINDOW, EogWindow)) 47 #define EOG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EOG_TYPE_WINDOW, EogWindowClass)) 48 #define EOG_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EOG_TYPE_WINDOW)) 49 #define EOG_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EOG_TYPE_WINDOW)) 50 #define EOG_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EOG_TYPE_WINDOW, EogWindowClass)) 51 52 #define EOG_WINDOW_ERROR (eog_window_error_quark ()) 53 54 typedef enum { 55 EOG_WINDOW_MODE_UNKNOWN, 56 EOG_WINDOW_MODE_NORMAL, 57 EOG_WINDOW_MODE_FULLSCREEN, 58 EOG_WINDOW_MODE_SLIDESHOW 59 } EogWindowMode; 60 61 typedef enum { 62 EOG_WINDOW_GALLERY_POS_BOTTOM, 63 EOG_WINDOW_GALLERY_POS_LEFT, 64 EOG_WINDOW_GALLERY_POS_TOP, 65 EOG_WINDOW_GALLERY_POS_RIGHT 66 } EogWindowGalleryPos; 67 68 //TODO 69 typedef enum { 70 EOG_WINDOW_ERROR_CONTROL_NOT_FOUND, 71 EOG_WINDOW_ERROR_UI_NOT_FOUND, 72 EOG_WINDOW_ERROR_NO_PERSIST_FILE_INTERFACE, 73 EOG_WINDOW_ERROR_IO, 74 EOG_WINDOW_ERROR_TRASH_NOT_FOUND, 75 EOG_WINDOW_ERROR_GENERIC, 76 EOG_WINDOW_ERROR_UNKNOWN 77 } EogWindowError; 78 79 typedef enum { 80 EOG_STARTUP_FULLSCREEN = 1 << 0, 81 EOG_STARTUP_SLIDE_SHOW = 1 << 1, 82 EOG_STARTUP_DISABLE_GALLERY = 1 << 2, 83 EOG_STARTUP_SINGLE_WINDOW = 1 << 3 84 } EogStartupFlags; 85 86 struct _EogWindow { 87 GtkApplicationWindow win; 88 89 EogWindowPrivate *priv; 90 }; 91 92 struct _EogWindowClass { 93 GtkApplicationWindowClass parent_class; 94 95 void (* prepared) (EogWindow *window); 96 }; 97 98 GType eog_window_get_type (void) G_GNUC_CONST; 99 100 GtkWidget *eog_window_new (EogStartupFlags flags); 101 102 EogWindowMode eog_window_get_mode (EogWindow *window); 103 104 void eog_window_set_mode (EogWindow *window, 105 EogWindowMode mode); 106 107 GMenu *eog_window_get_gear_menu_section (EogWindow *window, 108 const gchar *id); 109 110 EogListStore *eog_window_get_store (EogWindow *window); 111 112 GtkWidget *eog_window_get_view (EogWindow *window); 113 114 GtkWidget *eog_window_get_sidebar (EogWindow *window); 115 116 GtkWidget *eog_window_get_thumb_view (EogWindow *window); 117 118 GtkWidget *eog_window_get_thumb_nav (EogWindow *window); 119 120 GtkWidget *eog_window_get_statusbar (EogWindow *window); 121 122 EogImage *eog_window_get_image (EogWindow *window); 123 124 void eog_window_open_file_list (EogWindow *window, 125 GSList *file_list); 126 127 gboolean eog_window_is_empty (EogWindow *window); 128 gboolean eog_window_is_not_initializing (const EogWindow *window); 129 130 void eog_window_reload_image (EogWindow *window); 131 GtkWidget *eog_window_get_properties_dialog (EogWindow *window); 132 133 void eog_window_show_about_dialog (EogWindow *window); 134 void eog_window_show_preferences_dialog (EogWindow *window); 135 136 void eog_window_close (EogWindow *window); 137 138 G_END_DECLS 139 140 #endif 141