/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

  1. indexing
  2. description: "Used for key press and key release events."
  3. copyright: "[
  4. Copyright (C) 2007 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_KEY
  19. inherit GDK_EVENT
  20. insert
  21. GDK_EVENT_KEY_EXTERNALS
  22. GDK_MODIFIER_TYPE
  23. creation from_external_pointer
  24. feature -- access
  25. time: INTEGER is
  26. -- the time of the event in milliseconds.
  27. do
  28. Result := gdk_event_key_get_time (handle)
  29. end
  30. state: INTEGER is
  31. -- a bit-mask representing the state of the modifier keys
  32. -- (e.g. Control, Shift and Alt) and the pointer buttons.
  33. -- See GDK_MODIFIER_TYPE.
  34. do
  35. Result := gdk_event_key_get_state (handle)
  36. ensure
  37. is_valid_gdk_modifier_type (Result)
  38. end
  39. key_value: INTEGER is
  40. -- the key that was pressed or released. See the
  41. -- <gdk/gdkkeysyms.h> header file for a complete list of GDK
  42. -- key codes.
  43. do
  44. Result := gdk_event_key_get_keyval (handle)
  45. end
  46. -- feature -- size
  47. -- struct_size: INTEGER is
  48. -- external "C inline use <gdk/gdk.h>"
  49. -- alias "sizeof(GdkEventKey)"
  50. -- end
  51. end -- class GDK_EVENT_KEY