2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
27 * outFile = TextAttributes
28 * strct = GtkTextAttributes
31 * clss = TextAttributes
39 * - gtk_text_attributes_
44 * - gtk.TextAttributes
46 * - GtkTextAttributes* -> TextAttributes
50 module gtk
.TextAttributes
;
52 private import gtk
.gtktypes
;
54 private import lib
.gtk
;
56 private import gtk
.TextAttributes
;
60 * You may wish to begin by reading the text widget
61 * conceptual overview which gives an overview of all the objects and data
62 * types related to the text widget and how they work together.
63 * Tags should be in the GtkTextTagTable for a given GtkTextBuffer
64 * before using them with that buffer.
65 * gtk_text_buffer_create_tag() is the best way to create tags.
66 * See gtk-demo for numerous examples.
67 * The "invisible" property was not implemented for GTK+ 2.0; it's
68 * planned to be implemented in future releases.
70 public class TextAttributes
73 /** the main Gtk struct */
74 protected GtkTextAttributes
* gtkTextAttributes
;
77 public GtkTextAttributes
* getTextAttributesStruct()
79 return gtkTextAttributes
;
83 /** the main Gtk struct as a void* */
84 protected void* getStruct()
86 return cast(void*)gtkTextAttributes
;
90 * Sets our main struct and passes it to the parent class
92 public this (GtkTextAttributes
* gtkTextAttributes
)
94 this.gtkTextAttributes
= gtkTextAttributes
;
100 // imports for the signal processing
101 private import gobject
.Signals
;
102 private import gdk
.gdktypes
;
103 int[char[]] connectedSignals
;
105 gboolean
delegate(GObject
*, GdkEvent
*, GtkTextIter
*, TextAttributes
)[] onListeners
;
106 void addOn(gboolean
delegate(GObject
*, GdkEvent
*, GtkTextIter
*, TextAttributes
) dlg
)
108 if ( !("event" in connectedSignals
) )
113 cast(GCallback
)&callBack
,
116 cast(ConnectFlags
)0);
117 connectedSignals
["event"] = 1;
121 extern(C
) static void callBack(GtkTextTag
* texttagStruct
, GObject
* arg1
, GdkEvent
* event
, GtkTextIter
* arg2
, TextAttributes textAttributes
)
123 bit consumed
= false;
125 foreach ( gboolean
delegate(GObject
*, GdkEvent
*, GtkTextIter
*, TextAttributes
) dlg
; textAttributes
.onListeners
)
127 dlg(arg1
, event
, arg2
, textAttributes
);
143 * Creates a GtkTextAttributes, which describes
144 * a set of properties on some text.
146 * a new GtkTextAttributes
150 // GtkTextAttributes* gtk_text_attributes_new (void);
151 this(cast(GtkTextAttributes
*)gtk_text_attributes_new() );
155 * Copies src and returns a new GtkTextAttributes.
157 * a GtkTextAttributes to be copied
161 public TextAttributes
copy()
163 // GtkTextAttributes* gtk_text_attributes_copy (GtkTextAttributes *src);
164 return new TextAttributes( gtk_text_attributes_copy(gtkTextAttributes
) );
168 * Copies the values from src to dest so that dest has the same values
169 * as src. Frees existing values in dest.
171 * a GtkTextAttributes
173 * another GtkTextAttributes
175 public void copyValues(TextAttributes dest
)
177 // void gtk_text_attributes_copy_values (GtkTextAttributes *src, GtkTextAttributes *dest);
178 gtk_text_attributes_copy_values(gtkTextAttributes
, (dest
is null) ?
null : dest
.getTextAttributesStruct());
182 * Decrements the reference count on values, freeing the structure
183 * if the reference count reaches 0.
185 * a GtkTextAttributes
189 // void gtk_text_attributes_unref (GtkTextAttributes *values);
190 gtk_text_attributes_unref(gtkTextAttributes
);
194 * Increments the reference count on values.
196 * a GtkTextAttributes
198 * the GtkTextAttributes that were passed in
200 * The "background" property
201 * "background" gchararray : Write
202 * Background color as a string.
203 * Default value: NULL
205 public TextAttributes
ref()
207 // GtkTextAttributes* gtk_text_attributes_ref (GtkTextAttributes *values);
208 return new TextAttributes( gtk_text_attributes_ref(gtkTextAttributes
) );