/src/wrappers/gdk/library/gdk_segment.e

http://github.com/tybor/Liberty · Specman e · 71 lines · 56 code · 9 blank · 6 comment · 2 complexity · ac722ca2ad7b769e7e4c04aa52ca6531 MD5 · raw file

  1. indexing
  2. description: "GdkSegment."
  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. -- Specifies the start and end point of a line for use by the
  19. -- gdk_draw_segments() function.
  20. class GDK_SEGMENT
  21. inherit G_STRUCT
  22. creation from_external_pointer
  23. feature
  24. x1: INTEGER is
  25. -- the x coordinate of the start point.
  26. do
  27. Result := get_x1 (handle)
  28. end
  29. y1: INTEGER is
  30. -- the y coordinate of the start point.
  31. do
  32. Result := get_y1 (handle)
  33. end
  34. x2: INTEGER is
  35. -- the x coordinate of the end point.
  36. do
  37. Result := get_x2 (handle)
  38. end
  39. y2: INTEGER is
  40. -- the y coordinate of the end point.
  41. do
  42. Result := get_y2 (handle)
  43. end
  44. feature -- size
  45. struct_size: INTEGER is
  46. external "C inline use <gtk/gtk.h>"
  47. alias "sizeof(GdkSegment)"
  48. end
  49. feature {} -- External calls
  50. get_x1 (segment: POINTER): INTEGER is
  51. external "C struct GdkSegment get x1 use <gdk/gdk.h>"
  52. end
  53. get_y1 (segment: POINTER): INTEGER is
  54. external "C struct GdkSegment get y1 use <gdk/gdk.h>"
  55. end
  56. get_x2 (segment: POINTER): INTEGER is
  57. external "C struct GdkSegment get x2 use <gdk/gdk.h>"
  58. end
  59. get_y2 (segment: POINTER): INTEGER is
  60. external "C struct GdkSegment get y2 use <gdk/gdk.h>"
  61. end
  62. end