/src/wrappers/gdk/library/gdk_trapezoid.e

http://github.com/tybor/Liberty · Specman e · 90 lines · 70 code · 11 blank · 9 comment · 2 complexity · e6f3c9707f54bf9dc95f06f4bb16c70b 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 a trapezpoid for use by the gdk_draw_trapezoids(). The
  19. -- trapezoids used here have parallel, horizontal top and bottom
  20. -- edges.
  21. class GDK_TRAPEZOID
  22. inherit G_STRUCT
  23. creation from_external_pointer
  24. feature
  25. y1: REAL is
  26. -- the y coordinate of the start point.
  27. do
  28. Result := get_y1 (handle)
  29. end
  30. x11: REAL is
  31. -- the x coordinate of the top left corner
  32. do
  33. Result := get_x11 (handle)
  34. end
  35. x21: REAL is
  36. -- the x coordinate of the top right corner
  37. do
  38. Result := get_x21 (handle)
  39. end
  40. y2: REAL is
  41. -- the y coordinate of the end point.
  42. do
  43. Result := get_y2 (handle)
  44. end
  45. x12: REAL is
  46. -- the x coordinate of the bottom left corner
  47. do
  48. Result := get_x12 (handle)
  49. end
  50. x22: REAL is
  51. -- the x coordinate of the bottom right corner
  52. do
  53. Result := get_x22 (handle)
  54. end
  55. feature -- size
  56. struct_size: INTEGER is
  57. external "C inline use <gtk/gtk.h>"
  58. alias "sizeof(GdkSegment)"
  59. end
  60. feature {} -- External calls
  61. get_x11 (segment: POINTER): REAL is
  62. external "C struct GdkTrapezoid get x11 use <gdk/gdk.h>"
  63. end
  64. get_x21 (segment: POINTER): REAL is
  65. external "C struct GdkTrapezoid get x21 use <gdk/gdk.h>"
  66. end
  67. get_y1 (segment: POINTER): REAL is
  68. external "C struct GdkTrapezoid get y1 use <gdk/gdk.h>"
  69. end
  70. get_x12 (segment: POINTER): REAL is
  71. external "C struct GdkTrapezoid get x12 use <gdk/gdk.h>"
  72. end
  73. get_x22 (segment: POINTER): REAL is
  74. external "C struct GdkTrapezoid get x22 use <gdk/gdk.h>"
  75. end
  76. get_y2 (segment: POINTER): REAL is
  77. external "C struct GdkTrapezoid get y2 use <gdk/gdk.h>"
  78. end
  79. end