/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

  1. indexing
  2. description: "Used for mouse scroll events."
  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_SCROLL
  19. inherit GDK_EVENT
  20. insert
  21. GDK_EVENT_SCROLL_EXTERNALS
  22. GDK_MODIFIER_TYPE
  23. GDK_SCROLL_DIRECTION
  24. creation from_external_pointer
  25. feature -- access
  26. time: INTEGER is
  27. -- the time of the event in milliseconds.
  28. do
  29. Result := gdk_event_scroll_get_time (handle)
  30. end
  31. x: REAL_64 is
  32. -- the x coordinate of the pointer relative to the window.
  33. do
  34. Result := gdk_event_scroll_get_x (handle)
  35. end
  36. y: REAL_64 is
  37. -- the y coordinate of the pointer relative to the window.
  38. do
  39. Result := gdk_event_scroll_get_y (handle)
  40. end
  41. state: INTEGER is
  42. -- a bit-mask representing the state of the modifier keys
  43. -- (e.g. Control, Shift and Alt) and the pointer buttons.
  44. -- See GDK_MODIFIER_TYPE.
  45. do
  46. Result := gdk_event_scroll_get_state (handle)
  47. ensure
  48. is_valid_gdk_modifier_type (Result)
  49. end
  50. direction: INTEGER is
  51. -- the scroll direction, one of GDK_SCROLL_DIRECTION constants
  52. do
  53. Result := gdk_event_scroll_get_direction (handle)
  54. ensure
  55. is_valid_gdk_scroll_direction (Result)
  56. end
  57. -- Not implemented: GdkDevice *device; the device where the event originated.
  58. x_root: REAL_64 is
  59. -- the x coordinate of the pointer relative to the root of the screen.
  60. do
  61. Result := gdk_event_scroll_get_x_root (handle)
  62. end
  63. y_root: REAL_64 is
  64. -- the y coordinate of the pointer relative to the root of the screen.
  65. do
  66. Result := gdk_event_scroll_get_y_root (handle)
  67. end
  68. -- feature -- size
  69. -- struct_size: INTEGER is
  70. -- external "C inline use <gdk/gdk.h>"
  71. -- alias "sizeof(GdkEventScroll)"
  72. -- end
  73. invariant is_event_scroll
  74. end -- class GDK_EVENT_SCROLL