2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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
51 module gtk
.TextAttributes
;
57 import tango
.io
.Stdout
; // use the tango loging?
61 private import gtkc
.gtktypes
;
63 private import gtkc
.gtk
;
66 private import gtk
.TextAttributes
;
73 * You may wish to begin by reading the text widget
74 * conceptual overview which gives an overview of all the objects and data
75 * types related to the text widget and how they work together.
76 * Tags should be in the GtkTextTagTable for a given GtkTextBuffer
77 * before using them with that buffer.
78 * gtk_text_buffer_create_tag() is the best way to create tags.
79 * See gtk-demo for numerous examples.
80 * The "invisible" property was not implemented for GTK+ 2.0; it's
81 * planned to be implemented in future releases.
83 public class TextAttributes
86 /** the main Gtk struct */
87 protected GtkTextAttributes
* gtkTextAttributes
;
90 public GtkTextAttributes
* getTextAttributesStruct()
92 return gtkTextAttributes
;
96 /** the main Gtk struct as a void* */
97 protected void* getStruct()
99 return cast(void*)gtkTextAttributes
;
103 * Sets our main struct and passes it to the parent class
105 public this (GtkTextAttributes
* gtkTextAttributes
)
109 if ( gtkTextAttributes
is null )
114 Stdout("struct gtkTextAttributes is null on constructor").newline
;
118 printf("struct gtkTextAttributes is null on constructor");
125 assert(gtkTextAttributes
!is null, "struct gtkTextAttributes is null on constructor");
127 this.gtkTextAttributes
= gtkTextAttributes
;
133 // imports for the signal processing
134 private import gobject
.Signals
;
135 private import gtkc
.gdktypes
;
136 int[char[]] connectedSignals
;
138 gboolean
delegate(GObject
*, GdkEvent
*, GtkTextIter
*, TextAttributes
)[] onListeners
;
139 void addOn(gboolean
delegate(GObject
*, GdkEvent
*, GtkTextIter
*, TextAttributes
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
141 if ( !("event" in connectedSignals
) )
146 cast(GCallback
)&callBack
,
150 connectedSignals
["event"] = 1;
154 extern(C
) static void callBack(GtkTextTag
* texttagStruct
, GObject
* arg1
, GdkEvent
* event
, GtkTextIter
* arg2
, TextAttributes textAttributes
)
156 bool consumed
= false;
158 foreach ( gboolean
delegate(GObject
*, GdkEvent
*, GtkTextIter
*, TextAttributes
) dlg
; textAttributes
.onListeners
)
160 dlg(arg1
, event
, arg2
, textAttributes
);
176 * Creates a GtkTextAttributes, which describes
177 * a set of properties on some text.
179 * a new GtkTextAttributes
183 // GtkTextAttributes* gtk_text_attributes_new (void);
184 this(cast(GtkTextAttributes
*)gtk_text_attributes_new() );
188 * Copies src and returns a new GtkTextAttributes.
190 * a GtkTextAttributes to be copied
194 public TextAttributes
copy()
196 // GtkTextAttributes* gtk_text_attributes_copy (GtkTextAttributes *src);
197 return new TextAttributes( gtk_text_attributes_copy(gtkTextAttributes
) );
201 * Copies the values from src to dest so that dest has the same values
202 * as src. Frees existing values in dest.
204 * a GtkTextAttributes
206 * another GtkTextAttributes
208 public void copyValues(TextAttributes dest
)
210 // void gtk_text_attributes_copy_values (GtkTextAttributes *src, GtkTextAttributes *dest);
211 gtk_text_attributes_copy_values(gtkTextAttributes
, (dest
is null) ?
null : dest
.getTextAttributesStruct());
215 * Decrements the reference count on values, freeing the structure
216 * if the reference count reaches 0.
218 * a GtkTextAttributes
222 // void gtk_text_attributes_unref (GtkTextAttributes *values);
223 gtk_text_attributes_unref(gtkTextAttributes
);
227 * Increments the reference count on values.
229 * a GtkTextAttributes
231 * the GtkTextAttributes that were passed in
233 * The "background" property
234 * "background" gchararray : Write
235 * Background color as a string.
236 * Default value: NULL
238 public TextAttributes
doref()
240 // GtkTextAttributes* gtk_text_attributes_ref (GtkTextAttributes *values);
241 return new TextAttributes( gtk_text_attributes_ref(gtkTextAttributes
) );