diff options
Diffstat (limited to 'embed/ephy-embed-event.h')
-rw-r--r-- | embed/ephy-embed-event.h | 88 |
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 |