/src/wrappers/gdk/library/gdk_point.e

http://github.com/tybor/Liberty · Specman e · 57 lines · 43 code · 12 blank · 2 comment · 2 complexity · 067fad5a844fe5df7ca0a0a314c83f9b MD5 · raw file

  1. indexing
  2. description: "GdkPoint is a simple structure containing an x and y coordinate of a point.."
  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_POINT
  19. inherit G_STRUCT
  20. creation from_external_pointer
  21. feature -- size
  22. struct_size: INTEGER is
  23. external "C inline use <gtk/gtk.h>"
  24. alias "sizeof(GdkPoint)"
  25. end
  26. feature -- Getters
  27. x: INTEGER is
  28. -- x coordinate of the point
  29. do
  30. Result := get_x (handle)
  31. end
  32. y: INTEGER is
  33. -- y coordinate of the point.
  34. do
  35. Result := get_y (handle)
  36. end
  37. feature -- TODO: Setters (if needed)
  38. feature {} -- Struct accesing
  39. get_x (span: POINTER): INTEGER is
  40. external "C struct GdkPoint get x use <gdk/gdk.h>"
  41. end
  42. get_y (span: POINTER): INTEGER is
  43. external "C struct GdkPoint get y use <gdk/gdk.h>"
  44. end
  45. end