diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-shell.c | 90 | ||||
-rw-r--r-- | src/ephy-shell.h | 10 | ||||
-rw-r--r-- | src/ephy-tab.c | 38 | ||||
-rw-r--r-- | src/ephy-tab.h | 7 |
4 files changed, 145 insertions, 0 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 4dfb77783..a4ebdf9f5 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -94,6 +94,96 @@ ephy_shell_error_quark (void) return q; } + +GType +ephy_shell_error_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + static const GEnumValue values[] = + { + { EPHY_SHELL_ERROR_MISSING_SERVER, + "EPHY_SHELL_ERROR_MISSING_SERVER", "missing-server" }, + { EPHY_SHELL_ERROR_OBJECT_REG_FAILED, + "EPHY_SHELL_ERROR_OBJECT_REG_FAILED", "object-reg-failed" }, + { EPHY_SHELL_ERROR_FACTORY_REG_FAILED, + "EPHY_SHELL_ERROR_FACTORY_REG_FAILED", "factory-reg-failed" }, + { 0, NULL, NULL } + }; + type = g_enum_register_static ("EphyShellError", values); + } + return type; +} + +GType +ephy_shell_startup_flags_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + static const GFlagsValue values[] = + { + { EPHY_SHELL_STARTUP_TABS, "EPHY_SHELL_STARTUP_TABS", + "tabs" }, + { EPHY_SHELL_STARTUP_EXISTING_WINDOW, "EPHY_SHELL_STARTUP_EXISTING_WINDOW", + "existing-window" }, + { EPHY_SHELL_STARTUP_FULLSCREEN, "EPHY_SHELL_STARTUP_FULLSCREEN", + "fullscreen" }, + { EPHY_SHELL_STARTUP_BOOKMARKS_EDITOR, "EPHY_SHELL_STARTUP_BOOKMARKS_EDITOR", + "bookmarks-editor" }, + { EPHY_SHELL_STARTUP_SESSION, "EPHY_SHELL_STARTUP_SESSION", + "session" }, + { EPHY_SHELL_STARTUP_IMPORT_BOOKMARKS, "EPHY_SHELL_STARTUP_IMPORT_BOOKMARKS", + "import-bookmarks" }, + { EPHY_SHELL_STARTUP_ADD_BOOKMARK, "EPHY_SHELL_STARTUP_ADD_BOOKMARK", + "add-bookmark" }, + { 0, NULL, NULL } + }; + type = g_flags_register_static ("EphyShellStartupFlags", values); + } + return type; +} + + +GType +ephy_new_tab_flags_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + static const GFlagsValue values[] = + { + { EPHY_NEW_TAB_HOME_PAGE, "EPHY_NEW_TAB_HOME_PAGE", + "home-page" }, + { EPHY_NEW_TAB_NEW_PAGE, "EPHY_NEW_TAB_NEW_PAGE", + "new-page" }, + { EPHY_NEW_TAB_OPEN_PAGE, "EPHY_NEW_TAB_OPEN_PAGE", + "open-page" }, + { EPHY_NEW_TAB_FULLSCREEN_MODE, "EPHY_NEW_TAB_FULLSCREEN_MODE", + "fullscreen-mode" }, + { EPHY_NEW_TAB_APPEND_LAST, "EPHY_NEW_TAB_APPEND_LAST", + "append-last" }, + { EPHY_NEW_TAB_APPEND_AFTER, "EPHY_NEW_TAB_APPEND_AFTER", + "append-after" }, + { EPHY_NEW_TAB_JUMP, "EPHY_NEW_TAB_JUMP", + "jump" }, + { EPHY_NEW_TAB_IN_NEW_WINDOW, "EPHY_NEW_TAB_IN_NEW_WINDOW", + "new-window" }, + { EPHY_NEW_TAB_IN_EXISTING_WINDOW, "EPHY_NEW_TAB_IN_EXISTING_WINDOW", + "existing-window" }, + { 0, NULL, NULL } + }; + type = g_flags_register_static ("EphyNewTabFlags", values); + } + return type; +} + + + GType ephy_shell_get_type (void) { diff --git a/src/ephy-shell.h b/src/ephy-shell.h index cac87a89e..b12b30af8 100644 --- a/src/ephy-shell.h +++ b/src/ephy-shell.h @@ -38,6 +38,10 @@ G_BEGIN_DECLS #define EPHY_IS_SHELL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_SHELL)) #define EPHY_IS_SHELL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_SHELL)) #define EPHY_SHELL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_SHELL, EphyShellClass)) +#define EPHY_TYPE_SHELL_ERROR (ephy_shell_error_get_type()) +#define EPHY_TYPE_SHELL_STARTUP_FLAGS (ephy_shell_startup_flags_get_type()) +#define EPHY_TYPE_NEW_TAB_FLAGS (ephy_new_tab_flags_get_type()) + typedef struct EphyShell EphyShell; typedef struct EphyShellClass EphyShellClass; @@ -96,6 +100,12 @@ struct EphyShellClass EphyEmbedShellClass parent_class; }; +GType ephy_shell_error_get_type (void) G_GNUC_CONST; + +GType ephy_shell_startup_flags_get_type (void) G_GNUC_CONST; + +GType ephy_new_tab_flags_get_type (void) G_GNUC_CONST; + GType ephy_shell_get_type (void); GQuark ephy_shell_error_quark (void); diff --git a/src/ephy-tab.c b/src/ephy-tab.c index 4f0588a9d..02ea45ff7 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -142,6 +142,44 @@ static guint popup_blocker_n_hidden (EphyTab *tab); static gboolean ephy_tab_get_popups_allowed (EphyTab *tab); static void ephy_tab_set_popups_allowed (EphyTab *tab, gboolean allowed); +GType +ephy_tab_address_expire_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + static const GEnumValue values[] = + { + { TAB_ADDRESS_EXPIRE_NOW, "TAB_ADDRESS_EXPIRE_NOW", "expire-now" }, + { TAB_ADDRESS_EXPIRE_NEXT, "TAB_ADDRESS_EXPIRE_NEXT", "expire-next" }, + { TAB_ADDRESS_EXPIRE_CURRENT, "TAB_ADDRESS_EXPIRE_CURRENT", "expire-current" }, + { 0, NULL, NULL } + }; + type = g_enum_register_static ("TabAddressExpire", values); + } + return type; +} + +GType +ephy_tab_navigation_flags_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + static const GFlagsValue values[] = + { + { TAB_NAV_UP, "TAB_NAV_UP", "up" }, + { TAB_NAV_BACK, "TAB_NAV_BACK", "back" }, + { TAB_NAV_FORWARD, "TAB_NAV_FORWARD", "forward" }, + { 0, NULL, NULL } + }; + type = g_flags_register_static ("TabNavigationFlags", values); + } + return type; +} + /* Class functions */ diff --git a/src/ephy-tab.h b/src/ephy-tab.h index 133fe4ccc..9cb9a9dbc 100644 --- a/src/ephy-tab.h +++ b/src/ephy-tab.h @@ -35,6 +35,9 @@ G_BEGIN_DECLS #define EPHY_IS_TAB_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_TAB)) #define EPHY_TAB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_TAB, EphyTabClass)) +#define EPHY_TYPE_TAB_NAVIGATION_FLAGS (ephy_tab_navigation_flags_get_type()) +#define EPHY_TYPE_TAB_ADDRESS_EXPIRE (ephy_tab_address_expire_get_type()) + typedef struct _EphyTabClass EphyTabClass; typedef struct _EphyTab EphyTab; typedef struct _EphyTabPrivate EphyTabPrivate; @@ -66,6 +69,10 @@ struct _EphyTabClass GtkBinClass parent_class; }; +GType ephy_tab_address_expire_get_type (void); + +GType ephy_tab_navigation_flags_get_type (void); + GType ephy_tab_get_type (void); EphyTab *ephy_tab_new (void); |