aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-04 02:07:19 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-04 02:07:19 +0800
commitc4b9c39ec588430681b25d52a1cd5f57dab716d4 (patch)
tree6b35647c1ea93b1b6b9a185dbe7a043d0a631a46 /embed/ephy-embed.c
parent3c97a9bf4a384a76c51e4684b2d9a02266cf458f (diff)
downloadgsoc2013-epiphany-c4b9c39ec588430681b25d52a1cd5f57dab716d4.tar
gsoc2013-epiphany-c4b9c39ec588430681b25d52a1cd5f57dab716d4.tar.gz
gsoc2013-epiphany-c4b9c39ec588430681b25d52a1cd5f57dab716d4.tar.bz2
gsoc2013-epiphany-c4b9c39ec588430681b25d52a1cd5f57dab716d4.tar.lz
gsoc2013-epiphany-c4b9c39ec588430681b25d52a1cd5f57dab716d4.tar.xz
gsoc2013-epiphany-c4b9c39ec588430681b25d52a1cd5f57dab716d4.tar.zst
gsoc2013-epiphany-c4b9c39ec588430681b25d52a1cd5f57dab716d4.zip
Add types for some enums and flags.
2005-01-03 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-embed-event.c: (ephy_embed_event_context_get_type), (ephy_embed_event_type_get_type): * embed/ephy-embed-event.h: * embed/ephy-embed.c: (ephy_embed_net_state_get_type), (ephy_embed_ppv_navigation_get_type), (ephy_embed_security_level_get_type), (ephy_embed_base_init): * embed/ephy-embed.h: * embed/mozilla/mozilla-embed.cpp: * lib/ephy-marshal.list: * src/ephy-tab.c: (update_net_state_message), (build_progress_from_requests), (ephy_tab_net_state_cb): Add types for some enums and flags.
Diffstat (limited to 'embed/ephy-embed.c')
-rw-r--r--embed/ephy-embed.c83
1 files changed, 79 insertions, 4 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 2719808e4..4c2a2c0b4 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -30,6 +30,34 @@
static void ephy_embed_base_init (gpointer g_class);
GType
+ephy_embed_net_state_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GFlagsValue values[] =
+ {
+ { EMBED_STATE_UNKNOWN, "EMBED_STATE_UNKNOWN", "unknown" },
+ { EMBED_STATE_START, "EMBED_STATE_START", "start" },
+ { EMBED_STATE_REDIRECTING, "EMBED_STATE_REDIRECTING", "redirecting" },
+ { EMBED_STATE_TRANSFERRING, "EMBED_STATE_TRANSFERRING", "transferring" },
+ { EMBED_STATE_NEGOTIATING, "EMBED_STATE_NEGOTIATING", "negotiating", },
+ { EMBED_STATE_STOP, "EMBED_STATE_STOP", "stop" },
+ { EMBED_STATE_IS_REQUEST, "EMBED_STATE_IS_REQUEST", "is-request" },
+ { EMBED_STATE_IS_DOCUMENT, "EMBED_STATE_IS_DOCUMENT", "is-document" },
+ { EMBED_STATE_IS_NETWORK, "EMBED_STATE_IS_NETWORK", "is-network" },
+ { EMBED_STATE_IS_WINDOW, "EMBED_STATE_IS_WINDOW", "is-window" },
+ { 0, NULL, NULL }
+ };
+
+ type = g_flags_register_static ("EphyEmbedNetState", values);
+ }
+
+ return type;
+}
+
+GType
ephy_embed_chrome_get_type (void)
{
static GType type = 0;
@@ -52,6 +80,53 @@ ephy_embed_chrome_get_type (void)
}
GType
+ephy_embed_ppv_navigation_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GEnumValue values[] =
+ {
+ { PRINTPREVIEW_GOTO_PAGENUM, "PRINTPREVIEW_GOTO_PAGENUM", "page-num" },
+ { PRINTPREVIEW_PREV_PAGE, "PRINTPREVIEW_PREV_PAGE", "prev" },
+ { PRINTPREVIEW_NEXT_PAGE, "PRINTPREVIEW_NEXT_PAGE", "next" },
+ { PRINTPREVIEW_HOME, "PRINTPREVIEW_HOME", "home" },
+ { PRINTPREVIEW_END, "PRINTPREVIEW_END", "end" },
+ { 0, NULL, NULL }
+ };
+
+ type = g_enum_register_static ("EphyEmbedPPVNavigation", values);
+ }
+
+ return type;
+}
+
+GType
+ephy_embed_security_level_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GEnumValue values[] =
+ {
+ { STATE_IS_UNKNOWN, "STATE_IS_UNKNOWN", "unknown" },
+ { STATE_IS_INSECURE, "STATE_IS_INSECURE", "insecure" },
+ { STATE_IS_BROKEN, "STATE_IS_BROKEN", "broken" },
+ { STATE_IS_SECURE_LOW, "STATE_IS_SECURE_LOW", "low" },
+ { STATE_IS_SECURE_MED, "STATE_IS_SECURE_MED", "medium" },
+ { STATE_IS_SECURE_HIGH, "STATE_IS_SECURE_HIGH", "high" },
+ { 0, NULL, NULL }
+ };
+
+ type = g_enum_register_static ("EphyEmbedSecurityLevel", values);
+ }
+
+ return type;
+}
+
+GType
ephy_embed_document_type_get_type (void)
{
static GType type = 0;
@@ -210,11 +285,11 @@ ephy_embed_base_init (gpointer g_class)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (EphyEmbedIface, net_state),
NULL, NULL,
- ephy_marshal_VOID__STRING_INT,
+ ephy_marshal_VOID__STRING_FLAGS,
G_TYPE_NONE,
2,
G_TYPE_STRING,
- G_TYPE_INT);
+ EPHY_TYPE_EMBED_NET_STATE);
/**
* EphyEmbed::ge-dom-mouse-click:
* @embed:
@@ -262,10 +337,10 @@ ephy_embed_base_init (gpointer g_class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EphyEmbedIface, security_change),
NULL, NULL,
- g_cclosure_marshal_VOID__INT,
+ g_cclosure_marshal_VOID__ENUM,
G_TYPE_NONE,
1,
- G_TYPE_INT);
+ EPHY_TYPE_EMBED_SECURITY_LEVEL);
/**
* EphyEmbed::ge-zoom-change:
* @embed: