/src/wrappers/gtk/library/gtk_graphics_context.e

http://github.com/tybor/Liberty · Specman e · 83 lines · 40 code · 14 blank · 29 comment · 2 complexity · 9ed49711ee56f47a669921ac0157e21d MD5 · raw file

  1. indexing
  2. description: "."
  3. copyright: "[
  4. Copyright (C) 2007 Paolo Redaelli, 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 hopeOA 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. wrapped_version: "2.10.6"
  19. class GTK_GRAPHICS_CONTEXT
  20. -- Graphics context picked from a shared pool of GdkGC
  21. -- objects. When a new GdkGC is needed, `make' is called with the
  22. -- required depth, colormap and GdkGCValues. If a GdkGC with the
  23. -- required properties already exists then that is returned. If
  24. -- not, a new GdkGC is created. When the GdkGC is no longer needed,
  25. -- `dispose' should be called.
  26. inherit C_STRUCT
  27. creation from_external_pointer
  28. feature {} -- Creation
  29. -- TODO: implement creation
  30. -- gtk_gc_get ()
  31. --
  32. -- GdkGC* gtk_gc_get (gint depth,
  33. -- GdkColormap *colormap,
  34. -- GdkGCValues *values,
  35. -- GdkGCValuesMask values_mask);
  36. --
  37. -- Gets a GdkGC with the given depth, colormap and GdkGCValues. If a GdkGC
  38. -- with the given properties already exists then it is returned, otherwise a
  39. -- new GdkGC is created. The returned GdkGC should be released with
  40. -- gtk_gc_release() when it is no longer needed.
  41. --
  42. -- depth : the depth of the GdkGC to create.
  43. -- colormap : the GdkColormap (FIXME: I don't know why this is needed).
  44. -- values : a GdkGCValues struct containing settings for the GdkGC.
  45. -- values_mask : a set of flags indicating which of the fields in values has
  46. -- been set.
  47. -- Returns : a GdkGC.
  48. feature
  49. dispose is
  50. -- Releases a GdkGC.
  51. do
  52. gtk_gc_release(handle)
  53. end
  54. feature {} -- External calls
  55. gtk_gc_get (a_depth: INTEGER; a_colormap, some_gc_values: POINTER; somegdkgcvaluesmask: INTEGER): POINTER is
  56. -- GdkGC* gtk_gc_get (gint depth, GdkColormap *colormap,
  57. -- GdkGCValues *values, GdkGCValuesMask values_mask);
  58. external "C use <gtk/gtk.h>"
  59. end
  60. gtk_gc_release (a_gc: POINTER) is
  61. -- void gtk_gc_release (GdkGC *gc);
  62. external "C use <gtk/gtk.h>"
  63. end
  64. feature -- size
  65. struct_size: INTEGER is
  66. external "C inline use <gtk/gtk.h>"
  67. alias "sizeof(GdkGC)"
  68. end
  69. end -- class GTK_GRAPHICS_CONTEXT