| 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 WebKitDOMKeyboardEvent_h |
| 25 | #define WebKitDOMKeyboardEvent_h |
| 26 | |
| 27 | #include <glib-object.h> |
| 28 | #include <webkitdom/WebKitDOMUIEvent.h> |
| 29 | #include <webkitdom/webkitdomdefines.h> |
| 30 | |
| 31 | G_BEGIN_DECLS |
| 32 | |
| 33 | #define WEBKIT_DOM_TYPE_KEYBOARD_EVENT (webkit_dom_keyboard_event_get_type()) |
| 34 | #define WEBKIT_DOM_KEYBOARD_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_DOM_TYPE_KEYBOARD_EVENT, WebKitDOMKeyboardEvent)) |
| 35 | #define WEBKIT_DOM_KEYBOARD_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_DOM_TYPE_KEYBOARD_EVENT, WebKitDOMKeyboardEventClass) |
| 36 | #define WEBKIT_DOM_IS_KEYBOARD_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_DOM_TYPE_KEYBOARD_EVENT)) |
| 37 | #define WEBKIT_DOM_IS_KEYBOARD_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_DOM_TYPE_KEYBOARD_EVENT)) |
| 38 | #define WEBKIT_DOM_KEYBOARD_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_DOM_TYPE_KEYBOARD_EVENT, WebKitDOMKeyboardEventClass)) |
| 39 | |
| 40 | #ifndef WEBKIT_DISABLE_DEPRECATED |
| 41 | |
| 42 | /** |
| 43 | * WEBKIT_DOM_KEYBOARD_EVENT_KEY_LOCATION_STANDARD: |
| 44 | * |
| 45 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 46 | */ |
| 47 | #define WEBKIT_DOM_KEYBOARD_EVENT_KEY_LOCATION_STANDARD 0x00 |
| 48 | |
| 49 | /** |
| 50 | * WEBKIT_DOM_KEYBOARD_EVENT_KEY_LOCATION_LEFT: |
| 51 | * |
| 52 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 53 | */ |
| 54 | #define WEBKIT_DOM_KEYBOARD_EVENT_KEY_LOCATION_LEFT 0x01 |
| 55 | |
| 56 | /** |
| 57 | * WEBKIT_DOM_KEYBOARD_EVENT_KEY_LOCATION_RIGHT: |
| 58 | * |
| 59 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 60 | */ |
| 61 | #define WEBKIT_DOM_KEYBOARD_EVENT_KEY_LOCATION_RIGHT 0x02 |
| 62 | |
| 63 | /** |
| 64 | * WEBKIT_DOM_KEYBOARD_EVENT_KEY_LOCATION_NUMPAD: |
| 65 | * |
| 66 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 67 | */ |
| 68 | #define WEBKIT_DOM_KEYBOARD_EVENT_KEY_LOCATION_NUMPAD 0x03 |
| 69 | |
| 70 | #endif /* WEBKIT_DISABLE_DEPRECATED */ |
| 71 | |
| 72 | struct _WebKitDOMKeyboardEvent { |
| 73 | WebKitDOMUIEvent parent_instance; |
| 74 | }; |
| 75 | |
| 76 | struct _WebKitDOMKeyboardEventClass { |
| 77 | WebKitDOMUIEventClass parent_class; |
| 78 | }; |
| 79 | |
| 80 | WEBKIT_DEPRECATED GType |
| 81 | webkit_dom_keyboard_event_get_type(void); |
| 82 | |
| 83 | /** |
| 84 | * webkit_dom_keyboard_event_get_modifier_state: |
| 85 | * @self: A #WebKitDOMKeyboardEvent |
| 86 | * @keyIdentifierArg: A #gchar |
| 87 | * |
| 88 | * Returns: A #gboolean |
| 89 | * |
| 90 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 91 | **/ |
| 92 | WEBKIT_DEPRECATED gboolean |
| 93 | webkit_dom_keyboard_event_get_modifier_state(WebKitDOMKeyboardEvent* self, const gchar* keyIdentifierArg); |
| 94 | |
| 95 | /** |
| 96 | * webkit_dom_keyboard_event_init_keyboard_event: |
| 97 | * @self: A #WebKitDOMKeyboardEvent |
| 98 | * @type: A #gchar |
| 99 | * @canBubble: A #gboolean |
| 100 | * @cancelable: A #gboolean |
| 101 | * @view: A #WebKitDOMDOMWindow |
| 102 | * @keyIdentifier: A #gchar |
| 103 | * @location: A #gulong |
| 104 | * @ctrlKey: A #gboolean |
| 105 | * @altKey: A #gboolean |
| 106 | * @shiftKey: A #gboolean |
| 107 | * @metaKey: A #gboolean |
| 108 | * @altGraphKey: A #gboolean |
| 109 | * |
| 110 | * |
| 111 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 112 | **/ |
| 113 | WEBKIT_DEPRECATED void |
| 114 | webkit_dom_keyboard_event_init_keyboard_event(WebKitDOMKeyboardEvent* self, const gchar* type, gboolean canBubble, gboolean cancelable, WebKitDOMDOMWindow* view, const gchar* keyIdentifier, gulong location, gboolean ctrlKey, gboolean altKey, gboolean shiftKey, gboolean metaKey, gboolean altGraphKey); |
| 115 | |
| 116 | /** |
| 117 | * webkit_dom_keyboard_event_get_key_identifier: |
| 118 | * @self: A #WebKitDOMKeyboardEvent |
| 119 | * |
| 120 | * Returns: A #gchar |
| 121 | * |
| 122 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 123 | **/ |
| 124 | WEBKIT_DEPRECATED gchar* |
| 125 | webkit_dom_keyboard_event_get_key_identifier(WebKitDOMKeyboardEvent* self); |
| 126 | |
| 127 | /** |
| 128 | * webkit_dom_keyboard_event_get_key_location: |
| 129 | * @self: A #WebKitDOMKeyboardEvent |
| 130 | * |
| 131 | * Returns: A #gulong |
| 132 | * |
| 133 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 134 | **/ |
| 135 | WEBKIT_DEPRECATED gulong |
| 136 | webkit_dom_keyboard_event_get_key_location(WebKitDOMKeyboardEvent* self); |
| 137 | |
| 138 | /** |
| 139 | * webkit_dom_keyboard_event_get_ctrl_key: |
| 140 | * @self: A #WebKitDOMKeyboardEvent |
| 141 | * |
| 142 | * Returns: A #gboolean |
| 143 | * |
| 144 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 145 | **/ |
| 146 | WEBKIT_DEPRECATED gboolean |
| 147 | webkit_dom_keyboard_event_get_ctrl_key(WebKitDOMKeyboardEvent* self); |
| 148 | |
| 149 | /** |
| 150 | * webkit_dom_keyboard_event_get_shift_key: |
| 151 | * @self: A #WebKitDOMKeyboardEvent |
| 152 | * |
| 153 | * Returns: A #gboolean |
| 154 | * |
| 155 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 156 | **/ |
| 157 | WEBKIT_DEPRECATED gboolean |
| 158 | webkit_dom_keyboard_event_get_shift_key(WebKitDOMKeyboardEvent* self); |
| 159 | |
| 160 | /** |
| 161 | * webkit_dom_keyboard_event_get_alt_key: |
| 162 | * @self: A #WebKitDOMKeyboardEvent |
| 163 | * |
| 164 | * Returns: A #gboolean |
| 165 | * |
| 166 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 167 | **/ |
| 168 | WEBKIT_DEPRECATED gboolean |
| 169 | webkit_dom_keyboard_event_get_alt_key(WebKitDOMKeyboardEvent* self); |
| 170 | |
| 171 | /** |
| 172 | * webkit_dom_keyboard_event_get_meta_key: |
| 173 | * @self: A #WebKitDOMKeyboardEvent |
| 174 | * |
| 175 | * Returns: A #gboolean |
| 176 | * |
| 177 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 178 | **/ |
| 179 | WEBKIT_DEPRECATED gboolean |
| 180 | webkit_dom_keyboard_event_get_meta_key(WebKitDOMKeyboardEvent* self); |
| 181 | |
| 182 | /** |
| 183 | * webkit_dom_keyboard_event_get_alt_graph_key: |
| 184 | * @self: A #WebKitDOMKeyboardEvent |
| 185 | * |
| 186 | * Returns: A #gboolean |
| 187 | * |
| 188 | * Deprecated: 2.22: Use JavaScriptCore API instead |
| 189 | **/ |
| 190 | WEBKIT_DEPRECATED gboolean |
| 191 | webkit_dom_keyboard_event_get_alt_graph_key(WebKitDOMKeyboardEvent* self); |
| 192 | |
| 193 | G_END_DECLS |
| 194 | |
| 195 | #endif /* WebKitDOMKeyboardEvent_h */ |
| 196 | |