Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3584 sourcerer 1
/*
2
 * This file is part of libdom.
3
 * Licensed under the MIT License,
4
 *                http://www.opensource.org/licenses/mit-license.php
5
 * Copyright 2009 Bo Yang 
6
 */
7
 
8
#ifndef dom_interntal_events_keyboard_event_h_
9
#define dom_interntal_events_keyboard_event_h_
10
 
11
#include 
12
 
13
#include "events/ui_event.h"
14
 
15
/**
16
 * The keyboard event
17
 */
18
struct dom_keyboard_event {
19
	struct dom_ui_event base;	/**< The base class */
20
 
21
	dom_string *key_ident;	/**< The identifier of the key in this
22
					 * event, please refer:
23
					 * http://www.w3.org/TR/DOM-Level-3-Events/keyset.html#KeySet-Set
24
					 * for detail
25
					 */
26
 
27
	dom_key_location key_loc;	/**< Indicate the location of the key on
28
					 * the keyboard
29
					 */
30
 
31
	uint32_t modifier_state;	/**< The modifier keys state */
32
};
33
 
34
/* Constructor */
35
dom_exception _dom_keyboard_event_create(struct dom_document *doc,
36
		struct dom_keyboard_event **evt);
37
 
38
/* Destructor */
39
void _dom_keyboard_event_destroy(struct dom_keyboard_event *evt);
40
 
41
/* Initialise function */
42
dom_exception _dom_keyboard_event_initialise(struct dom_document *doc,
43
		struct dom_keyboard_event *evt);
44
 
45
/* Finalise function */
46
void _dom_keyboard_event_finalise(struct dom_keyboard_event *evt);
47
 
48
 
49
/* Parse the modifier list string to corresponding bool variable state */
50
dom_exception _dom_parse_modifier_list(dom_string *modifier_list,
51
		uint32_t *modifier_state);
52
 
53
#endif