1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GtkStyle.html
27  * outPack = gtk
28  * outFile = Style
29  * strct   = GtkStyle
30  * realStrct=
31  * ctorStrct=
32  * clss    = Style
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_style_
41  * 	- gtk_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- std.stdarg
48  * 	- glib.Str
49  * 	- cairo.Context
50  * 	- gobject.Value
51  * 	- gdk.Color
52  * 	- gdk.Pixbuf
53  * 	- gdk.Window
54  * 	- gtk.IconSet
55  * 	- gtk.IconSource
56  * 	- gtk.Widget
57  * 	- pango.PgLayout
58  * structWrap:
59  * 	- GValue* -> Value
60  * 	- GdkColor* -> Color
61  * 	- GdkPixbuf* -> Pixbuf
62  * 	- GdkWindow* -> Window
63  * 	- GtkIconSet* -> IconSet
64  * 	- GtkIconSource* -> IconSource
65  * 	- GtkStyle* -> Style
66  * 	- GtkWidget* -> Widget
67  * 	- PangoLayout* -> PgLayout
68  * 	- cairo_t* -> Context
69  * module aliases:
70  * local aliases:
71  * overrides:
72  */
73 
74 module gtk.Style;
75 
76 public  import gtkc.gtktypes;
77 
78 private import gtkc.gtk;
79 private import glib.ConstructionException;
80 private import gobject.ObjectG;
81 
82 private import gobject.Signals;
83 public  import gtkc.gdktypes;
84 
85 private import glib.Str;
86 private import cairo.Context;
87 private import gobject.Value;
88 private import gdk.Color;
89 private import gdk.Pixbuf;
90 private import gdk.Window;
91 private import gtk.IconSet;
92 private import gtk.IconSource;
93 private import gtk.Widget;
94 private import pango.PgLayout;
95 
96 
97 version(Tango) {
98 	private import tango.core.Vararg;
99 
100 	version = druntime;
101 } else version(D_Version2) {
102 	private import core.vararg;
103 
104 	version = druntime;
105 } else {
106 	private import std.stdarg;
107 }
108 
109 
110 private import gobject.ObjectG;
111 
112 /**
113  * A GtkStyle object encapsulates the information that provides the look and
114  * feel for a widget.
115  *
116  * Warning
117  *
118  * In GTK+ 3.0, GtkStyle has been deprecated and replaced by GtkStyleContext.
119  *
120  * Each GtkWidget has an associated GtkStyle object that is used when
121  * rendering that widget. Also, a GtkStyle holds information for the five
122  * possible widget states though not every widget supports all five
123  * states; see GtkStateType.
124  *
125  * Usually the GtkStyle for a widget is the same as the default style that
126  * is set by GTK+ and modified the theme engine.
127  *
128  * Usually applications should not need to use or modify the GtkStyle of
129  * their widgets.
130  */
131 public class Style : ObjectG
132 {
133 	
134 	/** the main Gtk struct */
135 	protected GtkStyle* gtkStyle;
136 	
137 	
138 	public GtkStyle* getStyleStruct()
139 	{
140 		return gtkStyle;
141 	}
142 	
143 	
144 	/** the main Gtk struct as a void* */
145 	protected override void* getStruct()
146 	{
147 		return cast(void*)gtkStyle;
148 	}
149 	
150 	/**
151 	 * Sets our main struct and passes it to the parent class
152 	 */
153 	public this (GtkStyle* gtkStyle)
154 	{
155 		super(cast(GObject*)gtkStyle);
156 		this.gtkStyle = gtkStyle;
157 	}
158 	
159 	protected override void setStruct(GObject* obj)
160 	{
161 		super.setStruct(obj);
162 		gtkStyle = cast(GtkStyle*)obj;
163 	}
164 	
165 	deprecated:
166 	
167 	/**
168 	 */
169 	int[string] connectedSignals;
170 	
171 	void delegate(Style)[] onRealizeListeners;
172 	/**
173 	 * Emitted when the style has been initialized for a particular
174 	 * visual. Connecting to this signal is probably seldom
175 	 * useful since most of the time applications and widgets only
176 	 * deal with styles that have been already realized.
177 	 * Since 2.4
178 	 */
179 	void addOnRealize(void delegate(Style) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
180 	{
181 		if ( !("realize" in connectedSignals) )
182 		{
183 			Signals.connectData(
184 			getStruct(),
185 			"realize",
186 			cast(GCallback)&callBackRealize,
187 			cast(void*)this,
188 			null,
189 			connectFlags);
190 			connectedSignals["realize"] = 1;
191 		}
192 		onRealizeListeners ~= dlg;
193 	}
194 	extern(C) static void callBackRealize(GtkStyle* styleStruct, Style _style)
195 	{
196 		foreach ( void delegate(Style) dlg ; _style.onRealizeListeners )
197 		{
198 			dlg(_style);
199 		}
200 	}
201 	
202 	void delegate(Style)[] onUnrealizeListeners;
203 	/**
204 	 * Emitted when the aspects of the style specific to a particular visual
205 	 * is being cleaned up. A connection to this signal can be useful
206 	 * if a widget wants to cache objects as object data on GtkStyle.
207 	 * This signal provides a convenient place to free such cached objects.
208 	 * Since 2.4
209 	 */
210 	void addOnUnrealize(void delegate(Style) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
211 	{
212 		if ( !("unrealize" in connectedSignals) )
213 		{
214 			Signals.connectData(
215 			getStruct(),
216 			"unrealize",
217 			cast(GCallback)&callBackUnrealize,
218 			cast(void*)this,
219 			null,
220 			connectFlags);
221 			connectedSignals["unrealize"] = 1;
222 		}
223 		onUnrealizeListeners ~= dlg;
224 	}
225 	extern(C) static void callBackUnrealize(GtkStyle* styleStruct, Style _style)
226 	{
227 		foreach ( void delegate(Style) dlg ; _style.onUnrealizeListeners )
228 		{
229 			dlg(_style);
230 		}
231 	}
232 	
233 	
234 	/**
235 	 * Warning
236 	 * gtk_style_new has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext
237 	 * Creates a new GtkStyle.
238 	 * Throws: ConstructionException GTK+ fails to create the object.
239 	 */
240 	public this ()
241 	{
242 		// GtkStyle * gtk_style_new (void);
243 		auto p = gtk_style_new();
244 		if(p is null)
245 		{
246 			throw new ConstructionException("null returned by gtk_style_new()");
247 		}
248 		this(cast(GtkStyle*) p);
249 	}
250 	
251 	/**
252 	 * Warning
253 	 * gtk_style_copy has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead
254 	 * Creates a copy of the passed in GtkStyle object.
255 	 * Returns: a copy of style. [transfer full]
256 	 */
257 	public Style copy()
258 	{
259 		// GtkStyle * gtk_style_copy (GtkStyle *style);
260 		auto p = gtk_style_copy(gtkStyle);
261 		
262 		if(p is null)
263 		{
264 			return null;
265 		}
266 		
267 		return ObjectG.getDObject!(Style)(cast(GtkStyle*) p);
268 	}
269 	
270 	/**
271 	 * Warning
272 	 * gtk_style_attach has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_style_attach() instead
273 	 * Attaches a style to a window; this process allocates the
274 	 * colors and creates the GC's for the style - it specializes
275 	 * it to a particular visual. The process may involve the creation
276 	 * of a new style if the style has already been attached to a
277 	 * window with a different style and visual.
278 	 * Since this function may return a new object, you have to use it
279 	 * Params:
280 	 * window = a GdkWindow.
281 	 * Returns: Either style, or a newly-created GtkStyle. If the style is newly created, the style parameter will be unref'ed, and the new style will have a reference count belonging to the caller.
282 	 */
283 	public Style attach(Window window)
284 	{
285 		// GtkStyle * gtk_style_attach (GtkStyle *style,  GdkWindow *window);
286 		auto p = gtk_style_attach(gtkStyle, (window is null) ? null : window.getWindowStruct());
287 		
288 		if(p is null)
289 		{
290 			return null;
291 		}
292 		
293 		return ObjectG.getDObject!(Style)(cast(GtkStyle*) p);
294 	}
295 	
296 	/**
297 	 * Warning
298 	 * gtk_style_detach has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead
299 	 * Detaches a style from a window. If the style is not attached
300 	 * to any windows anymore, it is unrealized. See gtk_style_attach().
301 	 */
302 	public void detach()
303 	{
304 		// void gtk_style_detach (GtkStyle *style);
305 		gtk_style_detach(gtkStyle);
306 	}
307 	
308 	/**
309 	 * Returns whether style has an associated GtkStyleContext.
310 	 * Returns: TRUE if style has a GtkStyleContext Since 3.0
311 	 */
312 	public int hasContext()
313 	{
314 		// gboolean gtk_style_has_context (GtkStyle *style);
315 		return gtk_style_has_context(gtkStyle);
316 	}
317 	
318 	/**
319 	 * Warning
320 	 * gtk_style_set_background has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_style_context_set_background() instead
321 	 * Sets the background of window to the background color or pixmap
322 	 * specified by style for the given state.
323 	 * Params:
324 	 * window = a GdkWindow
325 	 * stateType = a state
326 	 */
327 	public void setBackground(Window window, GtkStateType stateType)
328 	{
329 		// void gtk_style_set_background (GtkStyle *style,  GdkWindow *window,  GtkStateType state_type);
330 		gtk_style_set_background(gtkStyle, (window is null) ? null : window.getWindowStruct(), stateType);
331 	}
332 	
333 	/**
334 	 * Warning
335 	 * gtk_style_apply_default_background has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead
336 	 */
337 	public void applyDefaultBackground(Context cr, Window window, GtkStateType stateType, int x, int y, int width, int height)
338 	{
339 		// void gtk_style_apply_default_background (GtkStyle *style,  cairo_t *cr,  GdkWindow *window,  GtkStateType state_type,  gint x,  gint y,  gint width,  gint height);
340 		gtk_style_apply_default_background(gtkStyle, (cr is null) ? null : cr.getContextStruct(), (window is null) ? null : window.getWindowStruct(), stateType, x, y, width, height);
341 	}
342 	
343 	/**
344 	 * Warning
345 	 * gtk_style_lookup_color has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_style_context_lookup_color() instead
346 	 * Looks up color_name in the style's logical color mappings,
347 	 * filling in color and returning TRUE if found, otherwise
348 	 * returning FALSE. Do not cache the found mapping, because
349 	 * it depends on the GtkStyle and might change when a theme
350 	 * switch occurs.
351 	 * Since 2.10
352 	 * Params:
353 	 * colorName = the name of the logical color to look up
354 	 * color = the GdkColor to fill in. [out]
355 	 * Returns: TRUE if the mapping was found.
356 	 */
357 	public int lookupColor(string colorName, Color color)
358 	{
359 		// gboolean gtk_style_lookup_color (GtkStyle *style,  const gchar *color_name,  GdkColor *color);
360 		return gtk_style_lookup_color(gtkStyle, Str.toStringz(colorName), (color is null) ? null : color.getColorStruct());
361 	}
362 	
363 	/**
364 	 * Warning
365 	 * gtk_style_lookup_icon_set has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_style_context_lookup_icon_set() instead
366 	 * Looks up stock_id in the icon factories associated with style
367 	 * and the default icon factory, returning an icon set if found,
368 	 * otherwise NULL.
369 	 * Params:
370 	 * stockId = an icon name
371 	 * Returns: icon set of stock_id. [transfer none]
372 	 */
373 	public IconSet lookupIconSet(string stockId)
374 	{
375 		// GtkIconSet * gtk_style_lookup_icon_set (GtkStyle *style,  const gchar *stock_id);
376 		auto p = gtk_style_lookup_icon_set(gtkStyle, Str.toStringz(stockId));
377 		
378 		if(p is null)
379 		{
380 			return null;
381 		}
382 		
383 		return ObjectG.getDObject!(IconSet)(cast(GtkIconSet*) p);
384 	}
385 	
386 	/**
387 	 * Warning
388 	 * gtk_style_render_icon has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_icon_pixbuf() instead
389 	 * Renders the icon specified by source at the given size
390 	 * according to the given parameters and returns the result in a
391 	 * pixbuf.
392 	 * Params:
393 	 * source = the GtkIconSource specifying the icon to render
394 	 * direction = a text direction
395 	 * state = a state
396 	 * size = the size to render the icon at. A size of
397 	 * (GtkIconSize)-1 means render at the size of the source and
398 	 * don't scale. [type int]
399 	 * widget = the widget. [allow-none]
400 	 * detail = a style detail. [allow-none]
401 	 * Returns: a newly-created GdkPixbuf containing the rendered icon. [transfer full]
402 	 */
403 	public Pixbuf renderIcon(IconSource source, GtkTextDirection direction, GtkStateType state, GtkIconSize size, Widget widget, string detail)
404 	{
405 		// GdkPixbuf * gtk_style_render_icon (GtkStyle *style,  const GtkIconSource *source,  GtkTextDirection direction,  GtkStateType state,  GtkIconSize size,  GtkWidget *widget,  const gchar *detail);
406 		auto p = gtk_style_render_icon(gtkStyle, (source is null) ? null : source.getIconSourceStruct(), direction, state, size, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail));
407 		
408 		if(p is null)
409 		{
410 			return null;
411 		}
412 		
413 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p);
414 	}
415 	
416 	/**
417 	 * Queries the value of a style property corresponding to a
418 	 * widget class is in the given style.
419 	 * Since 2.16
420 	 * Params:
421 	 * widgetType = the GType of a descendant of GtkWidget
422 	 * propertyName = the name of the style property to get
423 	 * value = a GValue where the value of the property being
424 	 * queried will be stored
425 	 */
426 	public void getStyleProperty(GType widgetType, string propertyName, Value value)
427 	{
428 		// void gtk_style_get_style_property (GtkStyle *style,  GType widget_type,  const gchar *property_name,  GValue *value);
429 		gtk_style_get_style_property(gtkStyle, widgetType, Str.toStringz(propertyName), (value is null) ? null : value.getValueStruct());
430 	}
431 	
432 	/**
433 	 * Non-vararg variant of gtk_style_get().
434 	 * Used primarily by language bindings.
435 	 * Since 2.16
436 	 * Params:
437 	 * widgetType = the GType of a descendant of GtkWidget
438 	 * firstPropertyName = the name of the first style property to get
439 	 * varArgs = a va_list of pairs of property names and
440 	 * locations to return the property values, starting with the
441 	 * location for first_property_name.
442 	 */
443 	public void getValist(GType widgetType, string firstPropertyName, void* varArgs)
444 	{
445 		// void gtk_style_get_valist (GtkStyle *style,  GType widget_type,  const gchar *first_property_name,  va_list var_args);
446 		gtk_style_get_valist(gtkStyle, widgetType, Str.toStringz(firstPropertyName), varArgs);
447 	}
448 	
449 	/**
450 	 * Warning
451 	 * gtk_paint_arrow has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_arrow() instead
452 	 * Draws an arrow in the given rectangle on cr using the given
453 	 * parameters. arrow_type determines the direction of the arrow.
454 	 * Params:
455 	 * cr = a cairo_t
456 	 * stateType = a state
457 	 * shadowType = the type of shadow to draw
458 	 * widget = the widget. [allow-none]
459 	 * detail = a style detail. [allow-none]
460 	 * arrowType = the type of arrow to draw
461 	 * fill = TRUE if the arrow tip should be filled
462 	 * x = x origin of the rectangle to draw the arrow in
463 	 * y = y origin of the rectangle to draw the arrow in
464 	 * width = width of the rectangle to draw the arrow in
465 	 * height = height of the rectangle to draw the arrow in
466 	 */
467 	public void paintArrow(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, GtkArrowType arrowType, int fill, int x, int y, int width, int height)
468 	{
469 		// void gtk_paint_arrow (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  GtkArrowType arrow_type,  gboolean fill,  gint x,  gint y,  gint width,  gint height);
470 		gtk_paint_arrow(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), arrowType, fill, x, y, width, height);
471 	}
472 	
473 	/**
474 	 * Warning
475 	 * gtk_paint_box has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_frame() and gtk_render_background() instead
476 	 * Draws a box on cr with the given parameters.
477 	 * Params:
478 	 * cr = a cairo_t
479 	 * stateType = a state
480 	 * shadowType = the type of shadow to draw
481 	 * widget = the widget. [allow-none]
482 	 * detail = a style detail. [allow-none]
483 	 * x = x origin of the box
484 	 * y = y origin of the box
485 	 * width = the width of the box
486 	 * height = the height of the box
487 	 */
488 	public void paintBox(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height)
489 	{
490 		// void gtk_paint_box (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height);
491 		gtk_paint_box(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height);
492 	}
493 	
494 	/**
495 	 * Warning
496 	 * gtk_paint_box_gap has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_frame_gap() instead
497 	 * Draws a box in cr using the given style and state and shadow type,
498 	 * leaving a gap in one side.
499 	 * Params:
500 	 * cr = a cairo_t
501 	 * stateType = a state
502 	 * shadowType = type of shadow to draw
503 	 * widget = the widget. [allow-none]
504 	 * detail = a style detail. [allow-none]
505 	 * x = x origin of the rectangle
506 	 * y = y origin of the rectangle
507 	 * width = width of the rectangle
508 	 * height = width of the rectangle
509 	 * gapSide = side in which to leave the gap
510 	 * gapX = starting position of the gap
511 	 * gapWidth = width of the gap
512 	 */
513 	public void paintBoxGap(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height, GtkPositionType gapSide, int gapX, int gapWidth)
514 	{
515 		// void gtk_paint_box_gap (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height,  GtkPositionType gap_side,  gint gap_x,  gint gap_width);
516 		gtk_paint_box_gap(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height, gapSide, gapX, gapWidth);
517 	}
518 	
519 	/**
520 	 * Warning
521 	 * gtk_paint_check has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_check() instead
522 	 * Draws a check button indicator in the given rectangle on cr with
523 	 * the given parameters.
524 	 * Params:
525 	 * cr = a cairo_t
526 	 * stateType = a state
527 	 * shadowType = the type of shadow to draw
528 	 * widget = the widget. [allow-none]
529 	 * detail = a style detail. [allow-none]
530 	 * x = x origin of the rectangle to draw the check in
531 	 * y = y origin of the rectangle to draw the check in
532 	 * width = the width of the rectangle to draw the check in
533 	 * height = the height of the rectangle to draw the check in
534 	 */
535 	public void paintCheck(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height)
536 	{
537 		// void gtk_paint_check (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height);
538 		gtk_paint_check(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height);
539 	}
540 	
541 	/**
542 	 * Warning
543 	 * gtk_paint_diamond has been deprecated since version 3.0 and should not be used in newly-written code. Use cairo instead
544 	 * Draws a diamond in the given rectangle on window using the given
545 	 * parameters.
546 	 * Params:
547 	 * cr = a cairo_t
548 	 * stateType = a state
549 	 * shadowType = the type of shadow to draw
550 	 * widget = the widget. [allow-none]
551 	 * detail = a style detail. [allow-none]
552 	 * x = x origin of the rectangle to draw the diamond in
553 	 * y = y origin of the rectangle to draw the diamond in
554 	 * width = width of the rectangle to draw the diamond in
555 	 * height = height of the rectangle to draw the diamond in
556 	 */
557 	public void paintDiamond(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height)
558 	{
559 		// void gtk_paint_diamond (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height);
560 		gtk_paint_diamond(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height);
561 	}
562 	
563 	/**
564 	 * Warning
565 	 * gtk_paint_extension has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_extension() instead
566 	 * Draws an extension, i.e. a notebook tab.
567 	 * Params:
568 	 * cr = a cairo_t
569 	 * stateType = a state
570 	 * shadowType = type of shadow to draw
571 	 * widget = the widget. [allow-none]
572 	 * detail = a style detail. [allow-none]
573 	 * x = x origin of the extension
574 	 * y = y origin of the extension
575 	 * width = width of the extension
576 	 * height = width of the extension
577 	 * gapSide = the side on to which the extension is attached
578 	 */
579 	public void paintExtension(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height, GtkPositionType gapSide)
580 	{
581 		// void gtk_paint_extension (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height,  GtkPositionType gap_side);
582 		gtk_paint_extension(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height, gapSide);
583 	}
584 	
585 	/**
586 	 * Warning
587 	 * gtk_paint_flat_box has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_frame() and gtk_render_background() instead
588 	 * Draws a flat box on cr with the given parameters.
589 	 * Params:
590 	 * cr = a cairo_t
591 	 * stateType = a state
592 	 * shadowType = the type of shadow to draw
593 	 * widget = the widget. [allow-none]
594 	 * detail = a style detail. [allow-none]
595 	 * x = x origin of the box
596 	 * y = y origin of the box
597 	 * width = the width of the box
598 	 * height = the height of the box
599 	 */
600 	public void paintFlatBox(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height)
601 	{
602 		// void gtk_paint_flat_box (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height);
603 		gtk_paint_flat_box(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height);
604 	}
605 	
606 	/**
607 	 * Warning
608 	 * gtk_paint_focus has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_focus() instead
609 	 * Draws a focus indicator around the given rectangle on cr using the
610 	 * given style.
611 	 * Params:
612 	 * cr = a cairo_t
613 	 * stateType = a state
614 	 * widget = the widget. [allow-none]
615 	 * detail = a style detail. [allow-none]
616 	 * x = the x origin of the rectangle around which to draw a focus indicator
617 	 * y = the y origin of the rectangle around which to draw a focus indicator
618 	 * width = the width of the rectangle around which to draw a focus indicator
619 	 * height = the height of the rectangle around which to draw a focus indicator
620 	 */
621 	public void paintFocus(Context cr, GtkStateType stateType, Widget widget, string detail, int x, int y, int width, int height)
622 	{
623 		// void gtk_paint_focus (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height);
624 		gtk_paint_focus(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height);
625 	}
626 	
627 	/**
628 	 * Warning
629 	 * gtk_paint_handle has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_handle() instead
630 	 * Draws a handle as used in GtkHandleBox and GtkPaned.
631 	 * Params:
632 	 * cr = a cairo_t
633 	 * stateType = a state
634 	 * shadowType = type of shadow to draw
635 	 * widget = the widget. [allow-none]
636 	 * detail = a style detail. [allow-none]
637 	 * x = x origin of the handle
638 	 * y = y origin of the handle
639 	 * width = with of the handle
640 	 * height = height of the handle
641 	 * orientation = the orientation of the handle
642 	 */
643 	public void paintHandle(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height, GtkOrientation orientation)
644 	{
645 		// void gtk_paint_handle (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height,  GtkOrientation orientation);
646 		gtk_paint_handle(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height, orientation);
647 	}
648 	
649 	/**
650 	 * Warning
651 	 * gtk_paint_hline has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_line() instead
652 	 * Draws a horizontal line from (x1, y) to (x2, y) in cr
653 	 * using the given style and state.
654 	 * Params:
655 	 * cr = a caio_t
656 	 * stateType = a state
657 	 * widget = the widget. [allow-none]
658 	 * detail = a style detail. [allow-none]
659 	 * x1 = the starting x coordinate
660 	 * x2 = the ending x coordinate
661 	 * y = the y coordinate
662 	 */
663 	public void paintHline(Context cr, GtkStateType stateType, Widget widget, string detail, int x1, int x2, int y)
664 	{
665 		// void gtk_paint_hline (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkWidget *widget,  const gchar *detail,  gint x1,  gint x2,  gint y);
666 		gtk_paint_hline(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x1, x2, y);
667 	}
668 	
669 	/**
670 	 * Warning
671 	 * gtk_paint_option has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_option() instead
672 	 * Draws a radio button indicator in the given rectangle on cr with
673 	 * the given parameters.
674 	 * Params:
675 	 * cr = a cairo_t
676 	 * stateType = a state
677 	 * shadowType = the type of shadow to draw
678 	 * widget = the widget. [allow-none]
679 	 * detail = a style detail. [allow-none]
680 	 * x = x origin of the rectangle to draw the option in
681 	 * y = y origin of the rectangle to draw the option in
682 	 * width = the width of the rectangle to draw the option in
683 	 * height = the height of the rectangle to draw the option in
684 	 */
685 	public void paintOption(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height)
686 	{
687 		// void gtk_paint_option (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height);
688 		gtk_paint_option(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height);
689 	}
690 	
691 	/**
692 	 * Warning
693 	 * gtk_paint_shadow has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_frame() instead
694 	 * Draws a shadow around the given rectangle in cr
695 	 * using the given style and state and shadow type.
696 	 * Params:
697 	 * cr = a cairo_t
698 	 * stateType = a state
699 	 * shadowType = type of shadow to draw
700 	 * widget = the widget. [allow-none]
701 	 * detail = a style detail. [allow-none]
702 	 * x = x origin of the rectangle
703 	 * y = y origin of the rectangle
704 	 * width = width of the rectangle
705 	 * height = width of the rectangle
706 	 */
707 	public void paintShadow(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height)
708 	{
709 		// void gtk_paint_shadow (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height);
710 		gtk_paint_shadow(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height);
711 	}
712 	
713 	/**
714 	 * Warning
715 	 * gtk_paint_shadow_gap has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_frame_gap() instead
716 	 * Draws a shadow around the given rectangle in cr
717 	 * using the given style and state and shadow type, leaving a
718 	 * gap in one side.
719 	 * Params:
720 	 * cr = a cairo_t
721 	 * stateType = a state
722 	 * shadowType = type of shadow to draw
723 	 * widget = the widget. [allow-none]
724 	 * detail = a style detail. [allow-none]
725 	 * x = x origin of the rectangle
726 	 * y = y origin of the rectangle
727 	 * width = width of the rectangle
728 	 * height = width of the rectangle
729 	 * gapSide = side in which to leave the gap
730 	 * gapX = starting position of the gap
731 	 * gapWidth = width of the gap
732 	 */
733 	public void paintShadowGap(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height, GtkPositionType gapSide, int gapX, int gapWidth)
734 	{
735 		// void gtk_paint_shadow_gap (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height,  GtkPositionType gap_side,  gint gap_x,  gint gap_width);
736 		gtk_paint_shadow_gap(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height, gapSide, gapX, gapWidth);
737 	}
738 	
739 	/**
740 	 * Warning
741 	 * gtk_paint_slider has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_slider() instead
742 	 * Draws a slider in the given rectangle on cr using the
743 	 * given style and orientation.
744 	 * Params:
745 	 * cr = a cairo_t
746 	 * stateType = a state
747 	 * shadowType = a shadow
748 	 * widget = the widget. [allow-none]
749 	 * detail = a style detail. [allow-none]
750 	 * x = the x origin of the rectangle in which to draw a slider
751 	 * y = the y origin of the rectangle in which to draw a slider
752 	 * width = the width of the rectangle in which to draw a slider
753 	 * height = the height of the rectangle in which to draw a slider
754 	 * orientation = the orientation to be used
755 	 */
756 	public void paintSlider(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height, GtkOrientation orientation)
757 	{
758 		// void gtk_paint_slider (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height,  GtkOrientation orientation);
759 		gtk_paint_slider(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height, orientation);
760 	}
761 	
762 	/**
763 	 * Warning
764 	 * gtk_paint_spinner has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_activity() instead
765 	 * Draws a spinner on window using the given parameters.
766 	 * Params:
767 	 * cr = a cairo_t
768 	 * stateType = a state
769 	 * widget = the widget (may be NULL). [allow-none]
770 	 * detail = a style detail (may be NULL). [allow-none]
771 	 * step = the nth step, a value between 0 and "num-steps"
772 	 * x = the x origin of the rectangle in which to draw the spinner
773 	 * y = the y origin of the rectangle in which to draw the spinner
774 	 * width = the width of the rectangle in which to draw the spinner
775 	 * height = the height of the rectangle in which to draw the spinner
776 	 */
777 	public void paintSpinner(Context cr, GtkStateType stateType, Widget widget, string detail, uint step, int x, int y, int width, int height)
778 	{
779 		// void gtk_paint_spinner (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkWidget *widget,  const gchar *detail,  guint step,  gint x,  gint y,  gint width,  gint height);
780 		gtk_paint_spinner(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), step, x, y, width, height);
781 	}
782 	
783 	/**
784 	 * Warning
785 	 * gtk_paint_tab has been deprecated since version 3.0 and should not be used in newly-written code. Use cairo instead
786 	 * Draws an option menu tab (i.e. the up and down pointing arrows)
787 	 * in the given rectangle on cr using the given parameters.
788 	 * Params:
789 	 * cr = a cairo_t
790 	 * stateType = a state
791 	 * shadowType = the type of shadow to draw
792 	 * widget = the widget. [allow-none]
793 	 * detail = a style detail. [allow-none]
794 	 * x = x origin of the rectangle to draw the tab in
795 	 * y = y origin of the rectangle to draw the tab in
796 	 * width = the width of the rectangle to draw the tab in
797 	 * height = the height of the rectangle to draw the tab in
798 	 */
799 	public void paintTab(Context cr, GtkStateType stateType, GtkShadowType shadowType, Widget widget, string detail, int x, int y, int width, int height)
800 	{
801 		// void gtk_paint_tab (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkShadowType shadow_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  gint width,  gint height);
802 		gtk_paint_tab(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, shadowType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, width, height);
803 	}
804 	
805 	/**
806 	 * Warning
807 	 * gtk_paint_vline has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_line() instead
808 	 * Draws a vertical line from (x, y1_) to (x, y2_) in cr
809 	 * using the given style and state.
810 	 * Params:
811 	 * cr = a cairo_t
812 	 * stateType = a state
813 	 * widget = the widget. [allow-none]
814 	 * detail = a style detail. [allow-none]
815 	 * y1_ = the starting y coordinate
816 	 * y2_ = the ending y coordinate
817 	 * x = the x coordinate
818 	 */
819 	public void paintVline(Context cr, GtkStateType stateType, Widget widget, string detail, int y1_, int y2_, int x)
820 	{
821 		// void gtk_paint_vline (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkWidget *widget,  const gchar *detail,  gint y1_,  gint y2_,  gint x);
822 		gtk_paint_vline(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), y1_, y2_, x);
823 	}
824 	
825 	/**
826 	 * Warning
827 	 * gtk_paint_expander has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_expander() instead
828 	 * Draws an expander as used in GtkTreeView. x and y specify the
829 	 * center the expander. The size of the expander is determined by the
830 	 * "expander-size" style property of widget. (If widget is not
831 	 * specified or doesn't have an "expander-size" property, an
832 	 * unspecified default size will be used, since the caller doesn't
833 	 * have sufficient information to position the expander, this is
834 	 * likely not useful.) The expander is expander_size pixels tall
835 	 * in the collapsed position and expander_size pixels wide in the
836 	 * expanded position.
837 	 * Params:
838 	 * cr = a cairo_t
839 	 * stateType = a state
840 	 * widget = the widget. [allow-none]
841 	 * detail = a style detail. [allow-none]
842 	 * x = the x position to draw the expander at
843 	 * y = the y position to draw the expander at
844 	 * expanderStyle = the style to draw the expander in; determines
845 	 * whether the expander is collapsed, expanded, or in an
846 	 * intermediate state.
847 	 */
848 	public void paintExpander(Context cr, GtkStateType stateType, Widget widget, string detail, int x, int y, GtkExpanderStyle expanderStyle)
849 	{
850 		// void gtk_paint_expander (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  GtkExpanderStyle expander_style);
851 		gtk_paint_expander(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, expanderStyle);
852 	}
853 	
854 	/**
855 	 * Warning
856 	 * gtk_paint_layout has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_layout() instead
857 	 * Draws a layout on cr using the given parameters.
858 	 * Params:
859 	 * cr = a cairo_t
860 	 * stateType = a state
861 	 * useText = whether to use the text or foreground
862 	 * graphics context of style
863 	 * widget = the widget. [allow-none]
864 	 * detail = a style detail. [allow-none]
865 	 * x = x origin
866 	 * y = y origin
867 	 * layout = the layout to draw
868 	 */
869 	public void paintLayout(Context cr, GtkStateType stateType, int useText, Widget widget, string detail, int x, int y, PgLayout layout)
870 	{
871 		// void gtk_paint_layout (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  gboolean use_text,  GtkWidget *widget,  const gchar *detail,  gint x,  gint y,  PangoLayout *layout);
872 		gtk_paint_layout(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, useText, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), x, y, (layout is null) ? null : layout.getPgLayoutStruct());
873 	}
874 	
875 	/**
876 	 * Warning
877 	 * gtk_paint_resize_grip has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_render_handle() instead
878 	 * Draws a resize grip in the given rectangle on cr using the given
879 	 * parameters.
880 	 * Params:
881 	 * cr = a cairo_t
882 	 * stateType = a state
883 	 * widget = the widget. [allow-none]
884 	 * detail = a style detail. [allow-none]
885 	 * edge = the edge in which to draw the resize grip
886 	 * x = the x origin of the rectangle in which to draw the resize grip
887 	 * y = the y origin of the rectangle in which to draw the resize grip
888 	 * width = the width of the rectangle in which to draw the resize grip
889 	 * height = the height of the rectangle in which to draw the resize grip
890 	 */
891 	public void paintResizeGrip(Context cr, GtkStateType stateType, Widget widget, string detail, GdkWindowEdge edge, int x, int y, int width, int height)
892 	{
893 		// void gtk_paint_resize_grip (GtkStyle *style,  cairo_t *cr,  GtkStateType state_type,  GtkWidget *widget,  const gchar *detail,  GdkWindowEdge edge,  gint x,  gint y,  gint width,  gint height);
894 		gtk_paint_resize_grip(gtkStyle, (cr is null) ? null : cr.getContextStruct(), stateType, (widget is null) ? null : widget.getWidgetStruct(), Str.toStringz(detail), edge, x, y, width, height);
895 	}
896 	
897 	/**
898 	 * Warning
899 	 * gtk_draw_insertion_cursor has been deprecated since version 3.4 and should not be used in newly-written code. Use gtk_render_insertion_cursor() instead.
900 	 * Draws a text caret on cr at location. This is not a style function
901 	 * but merely a convenience function for drawing the standard cursor shape.
902 	 * Params:
903 	 * widget = a GtkWidget
904 	 * cr = cairo context to draw to
905 	 * location = location where to draw the cursor (location->width is ignored)
906 	 * isPrimary = if the cursor should be the primary cursor color.
907 	 * direction = whether the cursor is left-to-right or
908 	 * right-to-left. Should never be GTK_TEXT_DIR_NONE
909 	 * drawArrow = TRUE to draw a directional arrow on the
910 	 * cursor. Should be FALSE unless the cursor is split.
911 	 * Since 3.0
912 	 */
913 	public static void drawInsertionCursor(Widget widget, Context cr, ref Rectangle location, int isPrimary, GtkTextDirection direction, int drawArrow)
914 	{
915 		// void gtk_draw_insertion_cursor (GtkWidget *widget,  cairo_t *cr,  const GdkRectangle *location,  gboolean is_primary,  GtkTextDirection direction,  gboolean draw_arrow);
916 		gtk_draw_insertion_cursor((widget is null) ? null : widget.getWidgetStruct(), (cr is null) ? null : cr.getContextStruct(), &location, isPrimary, direction, drawArrow);
917 	}
918 }