/src/wrappers/gdk/library/gdk_span.e

http://github.com/tybor/Liberty · Specman e · 68 lines · 50 code · 15 blank · 3 comment · 2 complexity · c1c76a281079c6e630628a6971128bc7 MD5 · raw file

  1. indexing
  2. description: "A GdkSpan represents a horizontal line of pixels starting at the pixel with coordinates x, y and ending before x + width, y."
  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_SPAN
  19. inherit G_STRUCT
  20. creation from_external_pointer
  21. feature -- Getters
  22. x: INTEGER is
  23. -- x coordinate of the first pixel.
  24. do
  25. Result := get_x (handle)
  26. end
  27. y: INTEGER is
  28. -- y coordinate of the first pixel.
  29. do
  30. Result := get_y (handle)
  31. end
  32. width: INTEGER is
  33. -- number of pixels in the span.
  34. do
  35. Result := get_width (handle)
  36. end
  37. feature -- TODO: Setters (if needed)
  38. feature -- size
  39. struct_size: INTEGER is
  40. external "C inline use <gtk/gtk.h>"
  41. alias "sizeof(GdkSpan)"
  42. end
  43. feature {} -- Struct accesing
  44. get_x (span: POINTER): INTEGER is
  45. external "C struct GdkSpan get x use <gdk/gdk.h>"
  46. end
  47. get_y (span: POINTER): INTEGER is
  48. external "C struct GdkSpan get y use <gdk/gdk.h>"
  49. end
  50. get_width (span: POINTER): INTEGER is
  51. external "C struct GdkSpan get width use <gdk/gdk.h>"
  52. end
  53. end