/src/wrappers/gdk/library/gdk_event_crossing.e
Specman e | 116 lines | 80 code | 20 blank | 16 comment | 3 complexity | b9ce2817ffe628aa44acb05b47744f7f MD5 | raw file
1indexing 2 description: "Event generated when the pointer enters or leaves a window." 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_CROSSING 23 24inherit 25 GDK_EVENT 26 27insert 28 GDK_EVENT_CROSSING_EXTERNALS 29 GDK_MODIFIER_TYPE 30 GDK_CROSSING_MODE 31 GDK_NOTIFY_TYPE 32 33creation from_external_pointer 34 35feature -- access 36 37 subwindow: GDK_WINDOW is 38 -- the window that was entered or left. 39 local 40 window_ptr: POINTER; factory: G_OBJECT_FACTORY[GDK_WINDOW] 41 do 42 window_ptr := gdk_event_crossing_get_subwindow (handle) 43 Result := factory.existant_wrapper (window_ptr) 44 if Result=Void then 45 create Result.from_external_pointer (window_ptr) 46 end 47 end 48 49 time: INTEGER is 50 -- the time of the event in milliseconds. 51 do 52 Result := gdk_event_crossing_get_time (handle) 53 end 54 55 x: REAL_64 is 56 -- the x coordinate of the pointer relative to the window. 57 do 58 Result := gdk_event_crossing_get_x (handle) 59 end 60 61 y: REAL_64 is 62 -- the y coordinate of the pointer relative to the window. 63 do 64 Result := gdk_event_crossing_get_y (handle) 65 end 66 67 x_root: REAL_64 is 68 -- the x coordinate of the pointer relative to the root of the screen. 69 do 70 Result := gdk_event_crossing_get_x_root (handle) 71 end 72 73 y_root: REAL_64 is 74 -- the y coordinate of the pointer relative to the root of the screen. 75 do 76 Result := gdk_event_crossing_get_y_root (handle) 77 end 78 79 mode: INTEGER is 80 do 81 Result := gdk_event_crossing_get_mode (handle) 82 ensure 83 is_valid_gdk_crossing_mode (Result) 84 end 85 86 detail: INTEGER is 87 do 88 Result := gdk_event_crossing_get_detail (handle) 89 ensure 90 is_valid_gdk_notify_type (Result) 91 end 92 93 focus: BOOLEAN is 94 do 95 Result := gdk_event_crossing_get_focus (handle).to_boolean 96 end 97 98 state: INTEGER is 99 -- a bit-mask representing the state of the modifier keys 100 -- (e.g. Control, Shift and Alt) and the pointer buttons. 101 -- See GDK_MODIFIER_TYPE. 102 do 103 Result := gdk_event_crossing_get_state (handle) 104 ensure 105 is_valid_gdk_modifier_type (Result) 106 end 107 108-- feature -- size 109-- 110-- struct_size: INTEGER is 111-- external "C inline use <gdk/gdk.h>" 112-- alias "sizeof(GdkEventCrossing)" 113-- end 114-- 115end -- class GDK_EVENT_CROSSING 116