|
XenevaOS
|
#include <stdlib.h>#include <string.h>#include "events/keyboard_event.h"#include "core/document.h"#include "utils/utils.h"
| dom_exception _dom_keyboard_event_create | ( | struct dom_keyboard_event ** | evt | ) |
| void _dom_keyboard_event_destroy | ( | struct dom_keyboard_event * | evt | ) |
| void _dom_keyboard_event_finalise | ( | struct dom_keyboard_event * | evt | ) |
| dom_exception _dom_keyboard_event_get_alt_key | ( | dom_keyboard_event * | evt, |
| bool * | key | ||
| ) |
Get the alt key state
| evt | The Event object |
| key | Whether the Alt key is pressed down |
| dom_exception _dom_keyboard_event_get_code | ( | dom_keyboard_event * | evt, |
| dom_string ** | code | ||
| ) |
Get the code
| evt | The Event object |
| code | The returned code |
| dom_exception _dom_keyboard_event_get_ctrl_key | ( | dom_keyboard_event * | evt, |
| bool * | key | ||
| ) |
Get the ctrl key state
| evt | The Event object |
| key | Whether the Control key is pressed down |
| dom_exception _dom_keyboard_event_get_key | ( | dom_keyboard_event * | evt, |
| dom_string ** | key | ||
| ) |
Get the key
| evt | The Event object |
| key | The returned key |
| dom_exception _dom_keyboard_event_get_location | ( | dom_keyboard_event * | evt, |
| dom_key_location * | location | ||
| ) |
Get the key location
| evt | The Event object |
| location | The returned key location |
| dom_exception _dom_keyboard_event_get_meta_key | ( | dom_keyboard_event * | evt, |
| bool * | key | ||
| ) |
Get the meta key state
| evt | The Event object |
| key | Whether the Meta key is pressed down |
| dom_exception _dom_keyboard_event_get_modifier_state | ( | dom_keyboard_event * | evt, |
| dom_string * | m, | ||
| bool * | state | ||
| ) |
Query the state of a modifier using a key identifier
| evt | The event object |
| ml | The modifier identifier, such as "Alt", "Control", "Meta", "AltGraph", "CapsLock", "NumLock", "Scroll", "Shift". |
| state | Whether the modifier key is pressed |
| dom_exception _dom_keyboard_event_get_shift_key | ( | dom_keyboard_event * | evt, |
| bool * | key | ||
| ) |
Get the shift key state
| evt | The Event object |
| key | Whether the Shift key is pressed down |
| dom_exception _dom_keyboard_event_init | ( | dom_keyboard_event * | evt, |
| dom_string * | type, | ||
| bool | bubble, | ||
| bool | cancelable, | ||
| struct dom_abstract_view * | view, | ||
| dom_string * | key, | ||
| dom_string * | code, | ||
| dom_key_location | location, | ||
| bool | ctrl_key, | ||
| bool | shift_key, | ||
| bool | alt_key, | ||
| bool | meta_key, | ||
| bool | repeat, | ||
| bool | is_composing | ||
| ) |
Initialise the keyboard event with namespace
| evt | The Event object |
| type | The event's type |
| bubble | Whether this is a bubbling event |
| cancelable | Whether this is a cancelable event |
| view | The AbstractView associated with this event |
| key | The key identifier of pressed key |
| code | The code identifier of pressed key |
| location | The key location of the preesed key |
| ctrl_key | Whether the ctrl_key is pressed |
| shift_key | Whether the shift_key is pressed |
| alt_key | Whether the alt_key is pressed |
| meta_key | Whether the ctrl_key is pressed |
| repeat | Whether this is a repeat press from a held key |
| is_composing | Whether the input is being composed |
| dom_exception _dom_keyboard_event_init_ns | ( | dom_keyboard_event * | evt, |
| dom_string * | namespace, | ||
| dom_string * | type, | ||
| bool | bubble, | ||
| bool | cancelable, | ||
| struct dom_abstract_view * | view, | ||
| dom_string * | key, | ||
| dom_string * | code, | ||
| dom_key_location | location, | ||
| bool | ctrl_key, | ||
| bool | shift_key, | ||
| bool | alt_key, | ||
| bool | meta_key, | ||
| bool | repeat, | ||
| bool | is_composing | ||
| ) |
Initialise the keyboard event with namespace
| evt | The Event object |
| namespace | The namespace of this event |
| type | The event's type |
| bubble | Whether this is a bubbling event |
| cancelable | Whether this is a cancelable event |
| view | The AbstractView associated with this event |
| key | The key identifier of pressed key |
| code | The code identifier of pressed key |
| location | The key location of the preesed key |
| ctrl_key | Whether the ctrl_key is pressed |
| shift_key | Whether the shift_key is pressed |
| alt_key | Whether the alt_key is pressed |
| meta_key | Whether the ctrl_key is pressed |
| repeat | Whether this is a repeat press from a held key |
| is_composing | Whether the input is being composed |
| dom_exception _dom_keyboard_event_initialise | ( | struct dom_keyboard_event * | evt | ) |
| dom_exception _dom_parse_modifier_list | ( | dom_string * | modifier_list, |
| uint32_t * | modifier_state | ||
| ) |
Parse the modifier list string to corresponding bool variable state
| modifier_list | The modifier list string |
| modifier_state | The returned state |