Initial import of ephy (rev# 7126) from svn
[ephy-soc.git] / embed / ephy-embed-event.h
blob40b86e6a8bd0b2faca4c681d702024cbded939dc
1 /*
2 * Copyright © 2000-2003 Marco Pesenti Gritti
3 * Copyright © 2004 Christian Persch
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * $Id: ephy-embed-event.h 6952 2007-03-11 19:42:02Z chpe $
22 #ifndef EPHY_EMBED_EVENT_H
23 #define EPHY_EMBED_EVENT_H
25 #include <glib-object.h>
26 #include <glib.h>
28 G_BEGIN_DECLS
30 #define EPHY_TYPE_EMBED_EVENT (ephy_embed_event_get_type ())
31 #define EPHY_EMBED_EVENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_EMBED_EVENT, EphyEmbedEvent))
32 #define EPHY_EMBED_EVENT_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_EMBED_EVENT, EphyEmbedEventIface))
33 #define EPHY_IS_EMBED_EVENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_EMBED_EVENT))
34 #define EPHY_IS_EMBED_EVENT_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_EMBED_EVENT))
35 #define EPHY_EMBED_EVENT_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EPHY_TYPE_EMBED_EVENT, EphyEmbedEventIface))
37 typedef struct _EphyEmbedEventIface EphyEmbedEventIface;
38 typedef struct _EphyEmbedEvent EphyEmbedEvent;
40 typedef enum
42 EPHY_EMBED_CONTEXT_NONE = 0,
43 EPHY_EMBED_CONTEXT_DEFAULT = 1 << 1,
44 EPHY_EMBED_CONTEXT_LINK = 1 << 2,
45 EPHY_EMBED_CONTEXT_IMAGE = 1 << 3,
46 EPHY_EMBED_CONTEXT_DOCUMENT = 1 << 4,
47 EPHY_EMBED_CONTEXT_INPUT = 1 << 5,
48 EPHY_EMBED_CONTEXT_INPUT_PASSWORD = 1 << 6,
49 EPHY_EMBED_CONTEXT_XUL = 1 << 7,
50 EPHY_EMBED_CONTEXT_EMAIL_LINK = 1 << 8
51 } EphyEmbedEventContext;
53 struct _EphyEmbedEventIface
55 GTypeInterface parent_iface;
57 /* Methods */
58 EphyEmbedEventContext (* get_context) (EphyEmbedEvent *event);
59 guint (* get_button) (EphyEmbedEvent *event);
60 guint (* get_modifier) (EphyEmbedEvent *event);
61 void (* get_coordinates) (EphyEmbedEvent *event,
62 guint *x,
63 guint *y);
64 const GValue* (* get_property) (EphyEmbedEvent *event,
65 const char *name);
66 gboolean (* has_property) (EphyEmbedEvent *event,
67 const char *name);
68 gpointer (* get_dom_event) (EphyEmbedEvent *event);
71 GType ephy_embed_event_get_type (void);
73 GType ephy_embed_event_context_get_type (void);
75 GType ephy_embed_event_type_get_type (void);
77 EphyEmbedEventContext ephy_embed_event_get_context (EphyEmbedEvent *event);
79 guint ephy_embed_event_get_button (EphyEmbedEvent *event);
81 guint ephy_embed_event_get_modifier (EphyEmbedEvent *event);
84 void ephy_embed_event_get_coords (EphyEmbedEvent *event,
85 guint *x, guint *y);
87 const GValue* ephy_embed_event_get_property (EphyEmbedEvent *event,
88 const char *name);
90 gboolean ephy_embed_event_has_property (EphyEmbedEvent *event,
91 const char *name);
93 gpointer ephy_embed_event_get_dom_event (EphyEmbedEvent *event);
95 G_END_DECLS
97 #endif