aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-event.h
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-09-20 05:06:01 +0800
committerXan Lopez <xan@gnome.org>2009-09-20 05:06:01 +0800
commit98361f61fcdfc52d2ae2682234778f3e1b384916 (patch)
treeb31f644a5fb16a636cf872408840e4cba971bc86 /embed/ephy-embed-event.h
parent0fa8e2fb6780e75923da248bb5d94e30d8556dd7 (diff)
downloadgsoc2013-epiphany-98361f61fcdfc52d2ae2682234778f3e1b384916.tar.gz
gsoc2013-epiphany-98361f61fcdfc52d2ae2682234778f3e1b384916.tar.zst
gsoc2013-epiphany-98361f61fcdfc52d2ae2682234778f3e1b384916.zip
Bring back epiphany context menu
There's a few items (like email link) and actions (like bookmark link) missing or not working because of missing information in the WebKitHitTestResult object, but most of the stuff is working. For some reason the g-ir-scanner is not picking up the correct type name for WebKitHitTestResult (it uses WebKitHitTestResult instead of WebKit.HitTestResult), so the introspection support is broken unless that error is fixed manually. Looking into that ... Bug #562617
Diffstat (limited to 'embed/ephy-embed-event.h')
-rw-r--r--embed/ephy-embed-event.h88
1 files changed, 33 insertions, 55 deletions
diff --git a/embed/ephy-embed-event.h b/embed/ephy-embed-event.h
index 0c7d9aa8c..6347be957 100644
--- a/embed/ephy-embed-event.h
+++ b/embed/ephy-embed-event.h
@@ -1,6 +1,8 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* Copyright © 2000-2003 Marco Pesenti Gritti
* Copyright © 2004 Christian Persch
+ * Copyright © 2009 Igalia S.L.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,71 +29,47 @@
#include <glib-object.h>
#include <glib.h>
+#include <webkit/webkit.h>
G_BEGIN_DECLS
-#define EPHY_TYPE_EMBED_EVENT (ephy_embed_event_get_type ())
-#define EPHY_EMBED_EVENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_EMBED_EVENT, EphyEmbedEvent))
-#define EPHY_EMBED_EVENT_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_EMBED_EVENT, EphyEmbedEventIface))
-#define EPHY_IS_EMBED_EVENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_EMBED_EVENT))
-#define EPHY_IS_EMBED_EVENT_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_EMBED_EVENT))
-#define EPHY_EMBED_EVENT_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EPHY_TYPE_EMBED_EVENT, EphyEmbedEventIface))
+#define EPHY_TYPE_EMBED_EVENT (ephy_embed_event_get_type ())
+#define EPHY_EMBED_EVENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_EMBED_EVENT, EphyEmbedEvent))
+#define EPHY_EMBED_EVENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EPHY_TYPE_EMBED_EVENT, EphyEmbedEventClass))
+#define EPHY_IS_EMBED_EVENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_EMBED_EVENT))
+#define EPHY_IS_EMBED_EVENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_EMBED_EVENT))
+#define EPHY_EMBED_EVENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_EMBED_EVENT, EphyEmbedEventClass))
-typedef struct _EphyEmbedEventIface EphyEmbedEventIface;
-typedef struct _EphyEmbedEvent EphyEmbedEvent;
+typedef struct EphyEmbedEventClass EphyEmbedEventClass;
+typedef struct EphyEmbedEvent EphyEmbedEvent;
+typedef struct EphyEmbedEventPrivate EphyEmbedEventPrivate;
-typedef enum
-{
- EPHY_EMBED_CONTEXT_NONE = 0,
- EPHY_EMBED_CONTEXT_DEFAULT = 1 << 1,
- EPHY_EMBED_CONTEXT_LINK = 1 << 2,
- EPHY_EMBED_CONTEXT_IMAGE = 1 << 3,
- EPHY_EMBED_CONTEXT_DOCUMENT = 1 << 4,
- EPHY_EMBED_CONTEXT_INPUT = 1 << 5,
- EPHY_EMBED_CONTEXT_INPUT_PASSWORD = 1 << 6,
- EPHY_EMBED_CONTEXT_XUL = 1 << 7,
- EPHY_EMBED_CONTEXT_EMAIL_LINK = 1 << 8
-} EphyEmbedEventContext;
+struct EphyEmbedEvent {
+ GObject parent_instance;
-struct _EphyEmbedEventIface
-{
- GTypeInterface parent_iface;
-
- /* Methods */
- EphyEmbedEventContext (* get_context) (EphyEmbedEvent *event);
- guint (* get_button) (EphyEmbedEvent *event);
- guint (* get_modifier) (EphyEmbedEvent *event);
- void (* get_coordinates) (EphyEmbedEvent *event,
- guint *x,
- guint *y);
- const GValue* (* get_property) (EphyEmbedEvent *event,
- const char *name);
- gboolean (* has_property) (EphyEmbedEvent *event,
- const char *name);
- gpointer (* get_dom_event) (EphyEmbedEvent *event);
+ /*< private >*/
+ EphyEmbedEventPrivate *priv;
};
-GType ephy_embed_event_get_type (void);
-
-GType ephy_embed_event_context_get_type (void);
-
-EphyEmbedEventContext ephy_embed_event_get_context (EphyEmbedEvent *event);
-
-guint ephy_embed_event_get_button (EphyEmbedEvent *event);
-
-guint ephy_embed_event_get_modifier (EphyEmbedEvent *event);
-
-
-void ephy_embed_event_get_coords (EphyEmbedEvent *event,
- guint *x, guint *y);
-
-const GValue* ephy_embed_event_get_property (EphyEmbedEvent *event,
- const char *name);
+struct EphyEmbedEventClass {
+ GObjectClass parent_class;
+};
-gboolean ephy_embed_event_has_property (EphyEmbedEvent *event,
- const char *name);
-gpointer ephy_embed_event_get_dom_event (EphyEmbedEvent *event);
+GType ephy_embed_event_get_type (void);
+EphyEmbedEvent *ephy_embed_event_new (GdkEventButton *event,
+ WebKitHitTestResult *hit_test_result);
+guint ephy_embed_event_get_context (EphyEmbedEvent *event);
+guint ephy_embed_event_get_button (EphyEmbedEvent *event);
+guint ephy_embed_event_get_modifier (EphyEmbedEvent *event);
+void ephy_embed_event_get_coords (EphyEmbedEvent *event,
+ guint *x,
+ guint *y);
+void ephy_embed_event_get_property (EphyEmbedEvent *event,
+ const char *name,
+ GValue *value);
+gboolean ephy_embed_event_has_property (EphyEmbedEvent *event,
+ const char *name);
G_END_DECLS