PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  1indexing
  2	description: "GtkTextAttributes."
  3	copyright: "[
  4					Copyright (C) 2006 eiffel-libraries team, GTK+ team
  5					
  6					This library is free software; you can redistribute it and/or
  7					modify it under the terms of the GNU Lesser General Public License
  8					as published by the Free Software Foundation; either version 2.1 of
  9					the License, or (at your option) any later version.
 10					
 11					This library is distributed in the hope that it will be useful, but
 12					WITHOUT ANY WARRANTY; without even the implied warranty of
 13					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14					Lesser General Public License for more details.
 15
 16					You should have received a copy of the GNU Lesser General Public
 17					License along with this library; if not, write to the Free Software
 18					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 19					02110-1301 USA
 20				]"
 21class GTK_TEXT_ATTRIBUTES
 22	
 23inherit G_STRUCT
 24
 25creation from_external_pointer
 26
 27	-- TODO: wrap this structure for real
 28
 29feature {} -- Creation
 30
 31feature -- size
 32	struct_size: INTEGER is
 33		external "C inline use <gtk/gtk.h>"
 34		alias "sizeof(GtkTextAttributes)"
 35		end
 36
 37feature -- Access
 38
 39	font: PANGO_FONT_DESCRIPTION is
 40		do
 41			create Result.from_external_pointer (gtk_text_attributes_get_font (handle))
 42		end
 43
 44	--   gtk_text_attributes_new ()
 45
 46	--  GtkTextAttributes* gtk_text_attributes_new  (void);
 47
 48	--    Creates a GtkTextAttributes, which describes a set of properties on some text.
 49
 50	--    Returns : a new GtkTextAttributes
 51
 52	--    -------------------------------------------------------------------------------------
 53
 54	--   gtk_text_attributes_copy ()
 55
 56	--  GtkTextAttributes* gtk_text_attributes_copy (GtkTextAttributes *src);
 57
 58	--    Copies src and returns a new GtkTextAttributes.
 59
 60	--    src :     a GtkTextAttributes to be copied
 61	--    Returns : a copy of src
 62
 63	--    -------------------------------------------------------------------------------------
 64
 65	--   gtk_text_attributes_copy_values ()
 66
 67	--  void        gtk_text_attributes_copy_values (GtkTextAttributes *src,
 68	--                                               GtkTextAttributes *dest);
 69
 70	--    Copies the values from src to dest so that dest has the same values as src. Frees
 71	--    existing values in dest.
 72
 73	--    src :  a GtkTextAttributes
 74	--    dest : another GtkTextAttributes
 75
 76	--    -------------------------------------------------------------------------------------
 77
 78	--   gtk_text_attributes_unref ()
 79
 80	--  void        gtk_text_attributes_unref       (GtkTextAttributes *values);
 81
 82	--    Decrements the reference count on values, freeing the structure if the reference
 83	--    count reaches 0.
 84
 85	--    values : a GtkTextAttributes
 86
 87	--    -------------------------------------------------------------------------------------
 88
 89	--   gtk_text_attributes_ref ()
 90
 91	--  GtkTextAttributes* gtk_text_attributes_ref  (GtkTextAttributes *values);
 92
 93	--    Increments the reference count on values.
 94
 95	--    values :  a GtkTextAttributes
 96	--    Returns : the GtkTextAttributes that were passed in
 97
 98feature {} -- External calls
 99	gtk_text_attributes_new: POINTER is -- GtkTextAttributes* 
100		external "C use <gtk/gtk.h>"
101		end
102	
103	gtk_text_attributes_copy (a_src_gtktextattributes: POINTER): POINTER is -- GtkTextAttributes*
104		external "C use <gtk/gtk.h>"
105		end
106
107	gtk_text_attributes_copy_values (src_gtktextattributes, dest_gtktextattributes: POINTER) is
108		external "C use <gtk/gtk.h>"
109		end
110	
111	gtk_text_attributes_unref (gtktextattributes_values: POINTER) is -- void
112		external "C use <gtk/gtk.h>"
113		end
114
115	gtk_text_attributes_ref (gtktextattributes_values: POINTER) is -- GtkTextAttributes*
116		external "C use <gtk/gtk.h>"
117		end
118
119	
120feature {} -- Structure accessing
121	--   GtkTextAttributes
122	
123	--  typedef struct {
124	--    GtkTextAppearance appearance;
125	
126	--    GtkJustification justification;
127	--    GtkTextDirection direction;
128
129	--    /* Individual chunks of this can be set/unset as a group */
130
131	gtk_text_attributes_get_font (a_text_attr: POINTER): POINTER is
132		external "C struct GtkTextAttributes get font use <gtk/gtk.h>"
133		end
134
135	--    gdouble font_scale;
136
137	--    gint left_margin;
138
139	--    gint indent;
140
141	--    gint right_margin;
142
143	--    gint pixels_above_lines;
144
145	--    gint pixels_below_lines;
146
147	--    gint pixels_inside_wrap;
148
149	--    PangoTabArray *tabs;
150
151	--    GtkWrapMode wrap_mode;        /* How to handle wrap-around for this tag.
152	--                                   * Must be GTK_WRAPMODE_CHAR,
153	--                                   * GTK_WRAPMODE_NONE, GTK_WRAPMODE_WORD
154	--                                   */
155	
156	--    PangoLanguage *language;
157
158	--    /* hide the text  */
159	--    guint invisible : 1;
160	
161	--    /* Background is fit to full line height rather than
162	--     * baseline +/- ascent/descent (font height)
163	--     */
164	--    guint bg_full_height : 1;
165
166	--    /* can edit this text */
167	--    guint editable : 1;
168
169	--    /* colors are allocated etc. */
170	--    guint realized : 1;
171	--  } GtkTextAttributes;
172
173	--    Using GtkTextAttributes directly should rarely be necessary. It's primarily useful
174	--    with gtk_text_iter_get_attributes(). As with most GTK+ structs, the fields in this
175	--    struct should only be read, never modified directly.
176
177	--    GtkTextAppearance appearance;   pointer to sub-struct containing certain attributes
178	--    GtkJustification justification;
179	--    GtkTextDirection direction;
180	--    PangoFontDescription *font;
181	--    gdouble font_scale;
182	--    gint left_margin;
183	--    gint indent;
184	--    gint right_margin;
185	--    gint pixels_above_lines;
186	--    gint pixels_below_lines;
187	--    gint pixels_inside_wrap;
188	--    PangoTabArray *tabs;
189	--    GtkWrapMode wrap_mode;
190	--    PangoLanguage *language;
191	--    guint invisible : 1;
192	--    guint bg_full_height : 1;
193	--    guint editable : 1;
194	--    guint realized : 1;
195
196end