PageRenderTime 31ms CodeModel.GetById 25ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/gdk/library/gdk_event_key.e

http://github.com/tybor/Liberty
Specman e | 64 lines | 39 code | 13 blank | 12 comment | 3 complexity | 72b44bda75c242db9fcc867872003c6d MD5 | raw file
 1indexing
 2	description: "Used for key press and key release events."
 3	copyright: "[
 4					Copyright (C) 2007 eiffel-libraries team, GTK+ team
 5					
 6					This library is free software; you can redistribute it and/or
 7					modify it under the terms of the GNU Lesser General Public License
 8					as published by the Free Software Foundation; either version 2.1 of
 9					the License, or (at your option) any later version.
10					
11					This library is distributed in the hope that it will be useful, but
12					WITHOUT ANY WARRANTY; without even the implied warranty of
13					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14					Lesser General Public License for more details.
15
16					You should have received a copy of the GNU Lesser General Public
17					License along with this library; if not, write to the Free Software
18					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19					02110-1301 USA
20			]"
21
22class GDK_EVENT_KEY
23
24inherit GDK_EVENT
25
26insert
27	GDK_EVENT_KEY_EXTERNALS
28	GDK_MODIFIER_TYPE
29
30creation from_external_pointer
31
32feature -- access
33
34	time: INTEGER is
35			-- the time of the event in milliseconds.
36		do
37			Result := gdk_event_key_get_time (handle)
38		end
39
40	state: INTEGER is
41			-- a bit-mask representing the state of the modifier keys
42			-- (e.g. Control, Shift and Alt) and the pointer buttons.
43			-- See GDK_MODIFIER_TYPE.
44		do
45			Result := gdk_event_key_get_state (handle)
46		ensure
47			is_valid_gdk_modifier_type (Result)
48		end
49
50	key_value: INTEGER is
51			-- the key that was pressed or released. See the 
52			-- <gdk/gdkkeysyms.h> header file for a complete list of GDK
53			-- key codes.
54		do
55			Result := gdk_event_key_get_keyval (handle)
56		end
57
58-- feature -- size
59-- 	struct_size: INTEGER is
60-- 		external "C inline use <gdk/gdk.h>"
61-- 		alias "sizeof(GdkEventKey)"
62-- 		end
63
64end -- class GDK_EVENT_KEY