/src/wrappers/gdk/library/gdk_event_crossing.e

http://github.com/tybor/Liberty · Specman e · 116 lines · 80 code · 20 blank · 16 comment · 3 complexity · b9ce2817ffe628aa44acb05b47744f7f MD5 · raw file

  1. indexing
  2. description: "Event generated when the pointer enters or leaves a window."
  3. copyright: "[
  4. Copyright (C) 2006 eiffel-libraries team, GTK+ team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. class GDK_EVENT_CROSSING
  19. inherit
  20. GDK_EVENT
  21. insert
  22. GDK_EVENT_CROSSING_EXTERNALS
  23. GDK_MODIFIER_TYPE
  24. GDK_CROSSING_MODE
  25. GDK_NOTIFY_TYPE
  26. creation from_external_pointer
  27. feature -- access
  28. subwindow: GDK_WINDOW is
  29. -- the window that was entered or left.
  30. local
  31. window_ptr: POINTER; factory: G_OBJECT_FACTORY[GDK_WINDOW]
  32. do
  33. window_ptr := gdk_event_crossing_get_subwindow (handle)
  34. Result := factory.existant_wrapper (window_ptr)
  35. if Result=Void then
  36. create Result.from_external_pointer (window_ptr)
  37. end
  38. end
  39. time: INTEGER is
  40. -- the time of the event in milliseconds.
  41. do
  42. Result := gdk_event_crossing_get_time (handle)
  43. end
  44. x: REAL_64 is
  45. -- the x coordinate of the pointer relative to the window.
  46. do
  47. Result := gdk_event_crossing_get_x (handle)
  48. end
  49. y: REAL_64 is
  50. -- the y coordinate of the pointer relative to the window.
  51. do
  52. Result := gdk_event_crossing_get_y (handle)
  53. end
  54. x_root: REAL_64 is
  55. -- the x coordinate of the pointer relative to the root of the screen.
  56. do
  57. Result := gdk_event_crossing_get_x_root (handle)
  58. end
  59. y_root: REAL_64 is
  60. -- the y coordinate of the pointer relative to the root of the screen.
  61. do
  62. Result := gdk_event_crossing_get_y_root (handle)
  63. end
  64. mode: INTEGER is
  65. do
  66. Result := gdk_event_crossing_get_mode (handle)
  67. ensure
  68. is_valid_gdk_crossing_mode (Result)
  69. end
  70. detail: INTEGER is
  71. do
  72. Result := gdk_event_crossing_get_detail (handle)
  73. ensure
  74. is_valid_gdk_notify_type (Result)
  75. end
  76. focus: BOOLEAN is
  77. do
  78. Result := gdk_event_crossing_get_focus (handle).to_boolean
  79. end
  80. state: INTEGER is
  81. -- a bit-mask representing the state of the modifier keys
  82. -- (e.g. Control, Shift and Alt) and the pointer buttons.
  83. -- See GDK_MODIFIER_TYPE.
  84. do
  85. Result := gdk_event_crossing_get_state (handle)
  86. ensure
  87. is_valid_gdk_modifier_type (Result)
  88. end
  89. -- feature -- size
  90. --
  91. -- struct_size: INTEGER is
  92. -- external "C inline use <gdk/gdk.h>"
  93. -- alias "sizeof(GdkEventCrossing)"
  94. -- end
  95. --
  96. end -- class GDK_EVENT_CROSSING