Initial import of ephy (rev# 7126) from svn
[ephy-soc.git] / embed / .svn / text-base / ephy-embed-event.c.svn-base
blobf7a0543fa9f76120d606c319e422ba760771154c
1 /*
2  *  Copyright © 2000-2003 Marco Pesenti Gritti
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2, or (at your option)
7  *  any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  *  $Id$
19  */
21 #include "config.h"
23 #include "ephy-embed-event.h"
24 #include "ephy-embed-type-builtins.h"
26 #include <glib/ghash.h>
27 #include <gtk/gtktypeutils.h>
29 static void ephy_embed_event_base_init (gpointer g_class);
31 GType
32 ephy_embed_event_get_type (void)
34        static GType type = 0;
36         if (G_UNLIKELY (type == 0))
37         {
38                 const GTypeInfo our_info =
39                 {
40                         sizeof (EphyEmbedEventIface),
41                         ephy_embed_event_base_init,
42                         NULL,
43                 };
45                 type = g_type_register_static (G_TYPE_INTERFACE,
46                                                "EphyEmbedEvent",
47                                                &our_info,
48                                                (GTypeFlags) 0);
49         }
51         return type;
54 static void
55 ephy_embed_event_base_init (gpointer g_class)
57         static gboolean initialised = FALSE;
59         initialised = TRUE;
62 EphyEmbedEventContext
63 ephy_embed_event_get_context (EphyEmbedEvent *event)
65         EphyEmbedEventIface *iface = EPHY_EMBED_EVENT_GET_IFACE (event);
66         return iface->get_context (event);
69 guint
70 ephy_embed_event_get_button (EphyEmbedEvent *event)
72         EphyEmbedEventIface *iface = EPHY_EMBED_EVENT_GET_IFACE (event);
73         return iface->get_button (event);
76 guint
77 ephy_embed_event_get_modifier (EphyEmbedEvent *event)
79         EphyEmbedEventIface *iface = EPHY_EMBED_EVENT_GET_IFACE (event);
80         return iface->get_modifier (event);
83 void
84 ephy_embed_event_get_coords (EphyEmbedEvent *event,
85                              guint *x, guint *y)
87         EphyEmbedEventIface *iface = EPHY_EMBED_EVENT_GET_IFACE (event);
88         iface->get_coordinates (event, x, y);
91 const GValue*
92 ephy_embed_event_get_property   (EphyEmbedEvent *event,
93                                  const char *name)
95         EphyEmbedEventIface *iface = EPHY_EMBED_EVENT_GET_IFACE (event);
96         return iface->get_property (event, name);
99 gboolean
100 ephy_embed_event_has_property   (EphyEmbedEvent *event,
101                                  const char *name)
103         EphyEmbedEventIface *iface = EPHY_EMBED_EVENT_GET_IFACE (event);
104         return iface->has_property (event, name);
107 gpointer
108 ephy_embed_event_get_dom_event (EphyEmbedEvent *event)
110         EphyEmbedEventIface *iface = EPHY_EMBED_EVENT_GET_IFACE (event);
111         return iface->get_dom_event (event);