PageRenderTime 26ms CodeModel.GetById 23ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/gdk/library/gdk_event_scroll.e

http://github.com/tybor/Liberty
Specman e | 93 lines | 59 code | 19 blank | 15 comment | 3 complexity | 6b7a72b4d941bb3b929e4791a6210649 MD5 | raw file
 1indexing
 2	description: "Used for mouse scroll events."
 3	copyright: "[
 4					Copyright (C) 2006 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_SCROLL
23
24inherit GDK_EVENT
25
26insert
27	GDK_EVENT_SCROLL_EXTERNALS
28	GDK_MODIFIER_TYPE
29	GDK_SCROLL_DIRECTION
30
31creation from_external_pointer
32
33feature -- access
34
35	time: INTEGER is
36			-- the time of the event in milliseconds.
37		do
38			Result := gdk_event_scroll_get_time (handle)
39		end
40
41	x: REAL_64 is
42			-- the x coordinate of the pointer relative to the window.
43		do
44			Result := gdk_event_scroll_get_x (handle)
45		end
46
47	y: REAL_64 is
48			-- the y coordinate of the pointer relative to the window.
49		do
50			Result := gdk_event_scroll_get_y (handle)
51		end
52
53	state: INTEGER is
54			-- a bit-mask representing the state of the modifier keys
55			-- (e.g. Control, Shift and Alt) and the pointer buttons.
56			-- See GDK_MODIFIER_TYPE.
57		do
58			Result := gdk_event_scroll_get_state (handle)
59		ensure
60			is_valid_gdk_modifier_type (Result)
61		end
62
63	direction: INTEGER is
64			-- the scroll direction, one of GDK_SCROLL_DIRECTION constants
65		do
66			Result := gdk_event_scroll_get_direction (handle)
67		ensure
68			is_valid_gdk_scroll_direction (Result)
69		end
70
71-- Not implemented: GdkDevice *device; 	the device where the event originated.
72
73	x_root: REAL_64 is
74			-- the x coordinate of the pointer relative to the root of the screen.
75		do
76			Result := gdk_event_scroll_get_x_root (handle)
77		end
78
79	y_root: REAL_64 is
80			-- the y coordinate of the pointer relative to the root of the screen.
81		do
82			Result := gdk_event_scroll_get_y_root (handle)
83		end
84
85-- feature -- size
86-- 	struct_size: INTEGER is
87-- 		external "C inline use <gdk/gdk.h>"
88-- 		alias "sizeof(GdkEventScroll)"
89-- 		end
90
91invariant is_event_scroll
92
93end -- class GDK_EVENT_SCROLL