/src/wrappers/gtk/library/gtk_text_attributes.e

http://github.com/tybor/Liberty · Specman e · 196 lines · 52 code · 62 blank · 82 comment · 2 complexity · d24664ddb38dde50d92257bc854b3b7c MD5 · raw file

  1. indexing
  2. description: "GtkTextAttributes."
  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 GTK_TEXT_ATTRIBUTES
  19. inherit G_STRUCT
  20. creation from_external_pointer
  21. -- TODO: wrap this structure for real
  22. feature {} -- Creation
  23. feature -- size
  24. struct_size: INTEGER is
  25. external "C inline use <gtk/gtk.h>"
  26. alias "sizeof(GtkTextAttributes)"
  27. end
  28. feature -- Access
  29. font: PANGO_FONT_DESCRIPTION is
  30. do
  31. create Result.from_external_pointer (gtk_text_attributes_get_font (handle))
  32. end
  33. -- gtk_text_attributes_new ()
  34. -- GtkTextAttributes* gtk_text_attributes_new (void);
  35. -- Creates a GtkTextAttributes, which describes a set of properties on some text.
  36. -- Returns : a new GtkTextAttributes
  37. -- -------------------------------------------------------------------------------------
  38. -- gtk_text_attributes_copy ()
  39. -- GtkTextAttributes* gtk_text_attributes_copy (GtkTextAttributes *src);
  40. -- Copies src and returns a new GtkTextAttributes.
  41. -- src : a GtkTextAttributes to be copied
  42. -- Returns : a copy of src
  43. -- -------------------------------------------------------------------------------------
  44. -- gtk_text_attributes_copy_values ()
  45. -- void gtk_text_attributes_copy_values (GtkTextAttributes *src,
  46. -- GtkTextAttributes *dest);
  47. -- Copies the values from src to dest so that dest has the same values as src. Frees
  48. -- existing values in dest.
  49. -- src : a GtkTextAttributes
  50. -- dest : another GtkTextAttributes
  51. -- -------------------------------------------------------------------------------------
  52. -- gtk_text_attributes_unref ()
  53. -- void gtk_text_attributes_unref (GtkTextAttributes *values);
  54. -- Decrements the reference count on values, freeing the structure if the reference
  55. -- count reaches 0.
  56. -- values : a GtkTextAttributes
  57. -- -------------------------------------------------------------------------------------
  58. -- gtk_text_attributes_ref ()
  59. -- GtkTextAttributes* gtk_text_attributes_ref (GtkTextAttributes *values);
  60. -- Increments the reference count on values.
  61. -- values : a GtkTextAttributes
  62. -- Returns : the GtkTextAttributes that were passed in
  63. feature {} -- External calls
  64. gtk_text_attributes_new: POINTER is -- GtkTextAttributes*
  65. external "C use <gtk/gtk.h>"
  66. end
  67. gtk_text_attributes_copy (a_src_gtktextattributes: POINTER): POINTER is -- GtkTextAttributes*
  68. external "C use <gtk/gtk.h>"
  69. end
  70. gtk_text_attributes_copy_values (src_gtktextattributes, dest_gtktextattributes: POINTER) is
  71. external "C use <gtk/gtk.h>"
  72. end
  73. gtk_text_attributes_unref (gtktextattributes_values: POINTER) is -- void
  74. external "C use <gtk/gtk.h>"
  75. end
  76. gtk_text_attributes_ref (gtktextattributes_values: POINTER) is -- GtkTextAttributes*
  77. external "C use <gtk/gtk.h>"
  78. end
  79. feature {} -- Structure accessing
  80. -- GtkTextAttributes
  81. -- typedef struct {
  82. -- GtkTextAppearance appearance;
  83. -- GtkJustification justification;
  84. -- GtkTextDirection direction;
  85. -- /* Individual chunks of this can be set/unset as a group */
  86. gtk_text_attributes_get_font (a_text_attr: POINTER): POINTER is
  87. external "C struct GtkTextAttributes get font use <gtk/gtk.h>"
  88. end
  89. -- gdouble font_scale;
  90. -- gint left_margin;
  91. -- gint indent;
  92. -- gint right_margin;
  93. -- gint pixels_above_lines;
  94. -- gint pixels_below_lines;
  95. -- gint pixels_inside_wrap;
  96. -- PangoTabArray *tabs;
  97. -- GtkWrapMode wrap_mode; /* How to handle wrap-around for this tag.
  98. -- * Must be GTK_WRAPMODE_CHAR,
  99. -- * GTK_WRAPMODE_NONE, GTK_WRAPMODE_WORD
  100. -- */
  101. -- PangoLanguage *language;
  102. -- /* hide the text */
  103. -- guint invisible : 1;
  104. -- /* Background is fit to full line height rather than
  105. -- * baseline +/- ascent/descent (font height)
  106. -- */
  107. -- guint bg_full_height : 1;
  108. -- /* can edit this text */
  109. -- guint editable : 1;
  110. -- /* colors are allocated etc. */
  111. -- guint realized : 1;
  112. -- } GtkTextAttributes;
  113. -- Using GtkTextAttributes directly should rarely be necessary. It's primarily useful
  114. -- with gtk_text_iter_get_attributes(). As with most GTK+ structs, the fields in this
  115. -- struct should only be read, never modified directly.
  116. -- GtkTextAppearance appearance; pointer to sub-struct containing certain attributes
  117. -- GtkJustification justification;
  118. -- GtkTextDirection direction;
  119. -- PangoFontDescription *font;
  120. -- gdouble font_scale;
  121. -- gint left_margin;
  122. -- gint indent;
  123. -- gint right_margin;
  124. -- gint pixels_above_lines;
  125. -- gint pixels_below_lines;
  126. -- gint pixels_inside_wrap;
  127. -- PangoTabArray *tabs;
  128. -- GtkWrapMode wrap_mode;
  129. -- PangoLanguage *language;
  130. -- guint invisible : 1;
  131. -- guint bg_full_height : 1;
  132. -- guint editable : 1;
  133. -- guint realized : 1;
  134. end