diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-01-16 02:08:26 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-01-16 02:08:26 +0800 |
commit | 216c6fa203c77b1ea3aa21dd822c3688783cac42 (patch) | |
tree | 4fcc01185a3bc213497bfcf90fbdc47b6044becf /embed/ephy-embed-event.h | |
parent | 5e2c715ab1b0ae755542a02914b2377fd0878d99 (diff) | |
download | gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.tar.gz gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.tar.zst gsoc2013-epiphany-216c6fa203c77b1ea3aa21dd822c3688783cac42.zip |
Make EphyEmbedEvent abstract, implemented by MozillaEmbedEvent. Port
2004-01-15 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-embed-event.c: (ephy_embed_event_get_type),
(ephy_embed_event_base_init), (ephy_embed_event_get_event_type),
(ephy_embed_event_get_context), (ephy_embed_event_get_modifier),
(ephy_embed_event_get_coords), (ephy_embed_event_get_property),
(ephy_embed_event_has_property), (ephy_embed_event_get_dom_event):
* embed/ephy-embed-event.h:
* embed/mozilla/EventContext.cpp:
* embed/mozilla/EventContext.h:
* embed/mozilla/Makefile.am:
* embed/mozilla/mozilla-embed-event.cpp:
* embed/mozilla/mozilla-embed-event.h:
* embed/mozilla/mozilla-embed.cpp:
* src/ephy-window.c: (popup_menu_at_coords):
* src/popup-commands.c: (popup_cmd_copy_link_address):
Make EphyEmbedEvent abstract, implemented by MozillaEmbedEvent.
Port callers to the new api.
Fix some callers in src/ which were using private fields of
EphyEmbedEvent struct.
Diffstat (limited to 'embed/ephy-embed-event.h')
-rw-r--r-- | embed/ephy-embed-event.h | 67 |
1 files changed, 33 insertions, 34 deletions
diff --git a/embed/ephy-embed-event.h b/embed/ephy-embed-event.h index a056082f1..0cd3c58c6 100644 --- a/embed/ephy-embed-event.h +++ b/embed/ephy-embed-event.h @@ -1,5 +1,6 @@ /* - * Copyright (C) 2000, 2001, 2002 Marco Pesenti Gritti + * Copyright (C) 2000-2003 Marco Pesenti Gritti + * Copyright (C) 2004 Christian Persch * * 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 @@ -14,6 +15,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ */ #ifndef EPHY_EMBED_EVENT_H @@ -24,16 +27,15 @@ 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_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)) +#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)) -typedef struct EphyEmbedEventClass EphyEmbedEventClass; -typedef struct EphyEmbedEvent EphyEmbedEvent; -typedef struct EphyEmbedEventPrivate EphyEmbedEventPrivate; +typedef struct EphyEmbedEventIFace EphyEmbedEventIFace; +typedef struct EphyEmbedEvent EphyEmbedEvent; typedef enum { @@ -55,42 +57,37 @@ typedef enum EPHY_EMBED_EVENT_KEY } EphyEmbedEventType; -struct EphyEmbedEvent +struct EphyEmbedEventIFace { - GObject parent; - - /*< private >*/ - EphyEmbedEventPrivate *priv; - - /* Public to the embed implementations */ - guint modifier; - EphyEmbedEventType type; - guint context; - guint x, y; - guint keycode; -}; - -struct EphyEmbedEventClass -{ - GObjectClass parent_class; + GTypeInterface parent_iface; + + /* Methods */ + EphyEmbedEventType (* get_type) (EphyEmbedEvent *event); + EmbedEventContext (* get_context) (EphyEmbedEvent *event); + guint (* get_modifier) (EphyEmbedEvent *event); + void (* get_coordinates) (EphyEmbedEvent *event, + guint *x, + guint *y); + void (* get_property) (EphyEmbedEvent *event, + const char *name, + const GValue **value); + gboolean (* has_property) (EphyEmbedEvent *event, + const char *name); + gpointer (* get_dom_event) (EphyEmbedEvent *event); }; GType ephy_embed_event_get_type (void); -EphyEmbedEvent *ephy_embed_event_new (void); +EphyEmbedEventType ephy_embed_event_get_event_type (EphyEmbedEvent *event); + +EmbedEventContext ephy_embed_event_get_context (EphyEmbedEvent *event); guint ephy_embed_event_get_modifier (EphyEmbedEvent *event); -EphyEmbedEventType ephy_embed_event_get_event_type (EphyEmbedEvent *event); void ephy_embed_event_get_coords (EphyEmbedEvent *event, guint *x, guint *y); -EmbedEventContext ephy_embed_event_get_context (EphyEmbedEvent *event); - -void ephy_embed_event_set_property (EphyEmbedEvent *event, - const char *name, - GValue *value); void ephy_embed_event_get_property (EphyEmbedEvent *event, const char *name, @@ -99,6 +96,8 @@ void ephy_embed_event_get_property (EphyEmbedEvent *event, gboolean ephy_embed_event_has_property (EphyEmbedEvent *event, const char *name); +gpointer ephy_embed_event_get_dom_event (EphyEmbedEvent *event); + G_END_DECLS #endif |