1/*
2 * This file is part of the WebKit open source project.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library 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 GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#if !defined(__WEBKITDOM_H_INSIDE__) && !defined(BUILDING_WEBKIT)
21#error "Only <webkitdom/webkitdom.h> can be included directly."
22#endif
23
24#ifndef WebKitDOMEvent_h
25#define WebKitDOMEvent_h
26
27#include <glib-object.h>
28#include <webkitdom/WebKitDOMObject.h>
29#include <webkitdom/webkitdomdefines.h>
30
31G_BEGIN_DECLS
32
33#define WEBKIT_DOM_TYPE_EVENT (webkit_dom_event_get_type())
34#define WEBKIT_DOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_DOM_TYPE_EVENT, WebKitDOMEvent))
35#define WEBKIT_DOM_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_DOM_TYPE_EVENT, WebKitDOMEventClass)
36#define WEBKIT_DOM_IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_DOM_TYPE_EVENT))
37#define WEBKIT_DOM_IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_DOM_TYPE_EVENT))
38#define WEBKIT_DOM_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_DOM_TYPE_EVENT, WebKitDOMEventClass))
39
40#ifndef WEBKIT_DISABLE_DEPRECATED
41
42/**
43 * WEBKIT_DOM_EVENT_NONE:
44 *
45 * Deprecated: 2.22: Use JavaScriptCore API instead
46 */
47#define WEBKIT_DOM_EVENT_NONE 0
48
49/**
50 * WEBKIT_DOM_EVENT_CAPTURING_PHASE:
51 *
52 * Deprecated: 2.22: Use JavaScriptCore API instead
53 */
54#define WEBKIT_DOM_EVENT_CAPTURING_PHASE 1
55
56/**
57 * WEBKIT_DOM_EVENT_AT_TARGET:
58 *
59 * Deprecated: 2.22: Use JavaScriptCore API instead
60 */
61#define WEBKIT_DOM_EVENT_AT_TARGET 2
62
63/**
64 * WEBKIT_DOM_EVENT_BUBBLING_PHASE:
65 *
66 * Deprecated: 2.22: Use JavaScriptCore API instead
67 */
68#define WEBKIT_DOM_EVENT_BUBBLING_PHASE 3
69
70/**
71 * WEBKIT_DOM_EVENT_MOUSEDOWN:
72 *
73 * Deprecated: 2.22: Use JavaScriptCore API instead
74 */
75#define WEBKIT_DOM_EVENT_MOUSEDOWN 1
76
77/**
78 * WEBKIT_DOM_EVENT_MOUSEUP:
79 *
80 * Deprecated: 2.22: Use JavaScriptCore API instead
81 */
82#define WEBKIT_DOM_EVENT_MOUSEUP 2
83
84/**
85 * WEBKIT_DOM_EVENT_MOUSEOVER:
86 *
87 * Deprecated: 2.22: Use JavaScriptCore API instead
88 */
89#define WEBKIT_DOM_EVENT_MOUSEOVER 4
90
91/**
92 * WEBKIT_DOM_EVENT_MOUSEOUT:
93 *
94 * Deprecated: 2.22: Use JavaScriptCore API instead
95 */
96#define WEBKIT_DOM_EVENT_MOUSEOUT 8
97
98/**
99 * WEBKIT_DOM_EVENT_MOUSEMOVE:
100 *
101 * Deprecated: 2.22: Use JavaScriptCore API instead
102 */
103#define WEBKIT_DOM_EVENT_MOUSEMOVE 16
104
105/**
106 * WEBKIT_DOM_EVENT_MOUSEDRAG:
107 *
108 * Deprecated: 2.22: Use JavaScriptCore API instead
109 */
110#define WEBKIT_DOM_EVENT_MOUSEDRAG 32
111
112/**
113 * WEBKIT_DOM_EVENT_CLICK:
114 *
115 * Deprecated: 2.22: Use JavaScriptCore API instead
116 */
117#define WEBKIT_DOM_EVENT_CLICK 64
118
119/**
120 * WEBKIT_DOM_EVENT_DBLCLICK:
121 *
122 * Deprecated: 2.22: Use JavaScriptCore API instead
123 */
124#define WEBKIT_DOM_EVENT_DBLCLICK 128
125
126/**
127 * WEBKIT_DOM_EVENT_KEYDOWN:
128 *
129 * Deprecated: 2.22: Use JavaScriptCore API instead
130 */
131#define WEBKIT_DOM_EVENT_KEYDOWN 256
132
133/**
134 * WEBKIT_DOM_EVENT_KEYUP:
135 *
136 * Deprecated: 2.22: Use JavaScriptCore API instead
137 */
138#define WEBKIT_DOM_EVENT_KEYUP 512
139
140/**
141 * WEBKIT_DOM_EVENT_KEYPRESS:
142 *
143 * Deprecated: 2.22: Use JavaScriptCore API instead
144 */
145#define WEBKIT_DOM_EVENT_KEYPRESS 1024
146
147/**
148 * WEBKIT_DOM_EVENT_DRAGDROP:
149 *
150 * Deprecated: 2.22: Use JavaScriptCore API instead
151 */
152#define WEBKIT_DOM_EVENT_DRAGDROP 2048
153
154/**
155 * WEBKIT_DOM_EVENT_FOCUS:
156 *
157 * Deprecated: 2.22: Use JavaScriptCore API instead
158 */
159#define WEBKIT_DOM_EVENT_FOCUS 4096
160
161/**
162 * WEBKIT_DOM_EVENT_BLUR:
163 *
164 * Deprecated: 2.22: Use JavaScriptCore API instead
165 */
166#define WEBKIT_DOM_EVENT_BLUR 8192
167
168/**
169 * WEBKIT_DOM_EVENT_SELECT:
170 *
171 * Deprecated: 2.22: Use JavaScriptCore API instead
172 */
173#define WEBKIT_DOM_EVENT_SELECT 16384
174
175/**
176 * WEBKIT_DOM_EVENT_CHANGE:
177 *
178 * Deprecated: 2.22: Use JavaScriptCore API instead
179 */
180#define WEBKIT_DOM_EVENT_CHANGE 32768
181
182#endif /* WEBKIT_DISABLE_DEPRECATED */
183
184struct _WebKitDOMEvent {
185 WebKitDOMObject parent_instance;
186};
187
188struct _WebKitDOMEventClass {
189 WebKitDOMObjectClass parent_class;
190};
191
192WEBKIT_DEPRECATED GType
193webkit_dom_event_get_type(void);
194
195/**
196 * webkit_dom_event_stop_propagation:
197 * @self: A #WebKitDOMEvent
198 *
199 *
200 * Deprecated: 2.22: Use JavaScriptCore API instead
201**/
202WEBKIT_DEPRECATED void
203webkit_dom_event_stop_propagation(WebKitDOMEvent* self);
204
205/**
206 * webkit_dom_event_prevent_default:
207 * @self: A #WebKitDOMEvent
208 *
209 *
210 * Deprecated: 2.22: Use JavaScriptCore API instead
211**/
212WEBKIT_DEPRECATED void
213webkit_dom_event_prevent_default(WebKitDOMEvent* self);
214
215/**
216 * webkit_dom_event_init_event:
217 * @self: A #WebKitDOMEvent
218 * @eventTypeArg: A #gchar
219 * @canBubbleArg: A #gboolean
220 * @cancelableArg: A #gboolean
221 *
222 *
223 * Deprecated: 2.22: Use JavaScriptCore API instead
224**/
225WEBKIT_DEPRECATED void
226webkit_dom_event_init_event(WebKitDOMEvent* self, const gchar* eventTypeArg, gboolean canBubbleArg, gboolean cancelableArg);
227
228/**
229 * webkit_dom_event_get_event_type:
230 * @self: A #WebKitDOMEvent
231 *
232 * Returns: A #gchar
233 *
234 * Deprecated: 2.22: Use JavaScriptCore API instead
235**/
236WEBKIT_DEPRECATED gchar*
237webkit_dom_event_get_event_type(WebKitDOMEvent* self);
238
239/**
240 * webkit_dom_event_get_target:
241 * @self: A #WebKitDOMEvent
242 *
243 * Returns: (transfer full): A #WebKitDOMEventTarget
244 *
245 * Deprecated: 2.22: Use JavaScriptCore API instead
246**/
247WEBKIT_DEPRECATED WebKitDOMEventTarget*
248webkit_dom_event_get_target(WebKitDOMEvent* self);
249
250/**
251 * webkit_dom_event_get_current_target:
252 * @self: A #WebKitDOMEvent
253 *
254 * Returns: (transfer full): A #WebKitDOMEventTarget
255 *
256 * Deprecated: 2.22: Use JavaScriptCore API instead
257**/
258WEBKIT_DEPRECATED WebKitDOMEventTarget*
259webkit_dom_event_get_current_target(WebKitDOMEvent* self);
260
261/**
262 * webkit_dom_event_get_event_phase:
263 * @self: A #WebKitDOMEvent
264 *
265 * Returns: A #gushort
266 *
267 * Deprecated: 2.22: Use JavaScriptCore API instead
268**/
269WEBKIT_DEPRECATED gushort
270webkit_dom_event_get_event_phase(WebKitDOMEvent* self);
271
272/**
273 * webkit_dom_event_get_bubbles:
274 * @self: A #WebKitDOMEvent
275 *
276 * Returns: A #gboolean
277 *
278 * Deprecated: 2.22: Use JavaScriptCore API instead
279**/
280WEBKIT_DEPRECATED gboolean
281webkit_dom_event_get_bubbles(WebKitDOMEvent* self);
282
283/**
284 * webkit_dom_event_get_cancelable:
285 * @self: A #WebKitDOMEvent
286 *
287 * Returns: A #gboolean
288 *
289 * Deprecated: 2.22: Use JavaScriptCore API instead
290**/
291WEBKIT_DEPRECATED gboolean
292webkit_dom_event_get_cancelable(WebKitDOMEvent* self);
293
294/**
295 * webkit_dom_event_get_time_stamp:
296 * @self: A #WebKitDOMEvent
297 *
298 * Returns: A #guint32
299 *
300 * Deprecated: 2.22: Use JavaScriptCore API instead
301**/
302WEBKIT_DEPRECATED guint32
303webkit_dom_event_get_time_stamp(WebKitDOMEvent* self);
304
305/**
306 * webkit_dom_event_get_src_element:
307 * @self: A #WebKitDOMEvent
308 *
309 * Returns: (transfer full): A #WebKitDOMEventTarget
310 *
311 * Deprecated: 2.22: Use JavaScriptCore API instead
312**/
313WEBKIT_DEPRECATED WebKitDOMEventTarget*
314webkit_dom_event_get_src_element(WebKitDOMEvent* self);
315
316/**
317 * webkit_dom_event_get_return_value:
318 * @self: A #WebKitDOMEvent
319 *
320 * Returns: A #gboolean
321 *
322 * Deprecated: 2.22: Use JavaScriptCore API instead
323**/
324WEBKIT_DEPRECATED gboolean
325webkit_dom_event_get_return_value(WebKitDOMEvent* self);
326
327/**
328 * webkit_dom_event_set_return_value:
329 * @self: A #WebKitDOMEvent
330 * @value: A #gboolean
331 *
332 *
333 * Deprecated: 2.22: Use JavaScriptCore API instead
334**/
335WEBKIT_DEPRECATED void
336webkit_dom_event_set_return_value(WebKitDOMEvent* self, gboolean value);
337
338/**
339 * webkit_dom_event_get_cancel_bubble:
340 * @self: A #WebKitDOMEvent
341 *
342 * Returns: A #gboolean
343 *
344 * Deprecated: 2.22: Use JavaScriptCore API instead
345**/
346WEBKIT_DEPRECATED gboolean
347webkit_dom_event_get_cancel_bubble(WebKitDOMEvent* self);
348
349/**
350 * webkit_dom_event_set_cancel_bubble:
351 * @self: A #WebKitDOMEvent
352 * @value: A #gboolean
353 *
354 *
355 * Deprecated: 2.22: Use JavaScriptCore API instead
356**/
357WEBKIT_DEPRECATED void
358webkit_dom_event_set_cancel_bubble(WebKitDOMEvent* self, gboolean value);
359
360G_END_DECLS
361
362#endif /* WebKitDOMEvent_h */
363