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  = GtkSourceGutterRendererPixbuf.html
27  * outPack = gsv
28  * outFile = SourceGutterRendererPixbuf
29  * strct   = GtkSourceGutterRendererPixbuf
30  * realStrct=
31  * ctorStrct=GtkSourceGutterRenderer
32  * clss    = SourceGutterRendererPixbuf
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = GtkSourceGutterRenderer
38  * implements:
39  * prefixes:
40  * 	- gtk_source_gutter_renderer_pixbuf_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- gio.Icon
48  * 	- gio.IconIF
49  * 	- gdk.Pixbuf
50  * structWrap:
51  * 	- GIcon* -> IconIF
52  * 	- GdkPixbuf* -> Pixbuf
53  * module aliases:
54  * local aliases:
55  * overrides:
56  */
57 
58 module gsv.SourceGutterRendererPixbuf;
59 
60 public  import gsvc.gsvtypes;
61 
62 private import gsvc.gsv;
63 private import glib.ConstructionException;
64 private import gobject.ObjectG;
65 
66 private import glib.Str;
67 private import gio.Icon;
68 private import gio.IconIF;
69 private import gdk.Pixbuf;
70 
71 
72 private import gsv.SourceGutterRenderer;
73 
74 /**
75  */
76 public class SourceGutterRendererPixbuf : SourceGutterRenderer
77 {
78 	
79 	/** the main Gtk struct */
80 	protected GtkSourceGutterRendererPixbuf* gtkSourceGutterRendererPixbuf;
81 	
82 	
83 	/** Get the main Gtk struct */
84 	public GtkSourceGutterRendererPixbuf* getSourceGutterRendererPixbufStruct()
85 	{
86 		return gtkSourceGutterRendererPixbuf;
87 	}
88 	
89 	
90 	/** the main Gtk struct as a void* */
91 	protected override void* getStruct()
92 	{
93 		return cast(void*)gtkSourceGutterRendererPixbuf;
94 	}
95 	
96 	/**
97 	 * Sets our main struct and passes it to the parent class
98 	 */
99 	public this (GtkSourceGutterRendererPixbuf* gtkSourceGutterRendererPixbuf)
100 	{
101 		super(cast(GtkSourceGutterRenderer*)gtkSourceGutterRendererPixbuf);
102 		this.gtkSourceGutterRendererPixbuf = gtkSourceGutterRendererPixbuf;
103 	}
104 	
105 	protected override void setStruct(GObject* obj)
106 	{
107 		super.setStruct(obj);
108 		gtkSourceGutterRendererPixbuf = cast(GtkSourceGutterRendererPixbuf*)obj;
109 	}
110 	
111 	/** */
112 	public void setStockId(StockID stockId)
113 	{
114 		setStockId(StockDesc[stockId]);
115 	}
116 	
117 	/**
118 	 */
119 	
120 	/**
121 	 * Create a new GtkSourceGutterRendererPixbuf.
122 	 * Throws: ConstructionException GTK+ fails to create the object.
123 	 */
124 	public this ()
125 	{
126 		// GtkSourceGutterRenderer * gtk_source_gutter_renderer_pixbuf_new  (void);
127 		auto p = gtk_source_gutter_renderer_pixbuf_new();
128 		if(p is null)
129 		{
130 			throw new ConstructionException("null returned by gtk_source_gutter_renderer_pixbuf_new()");
131 		}
132 		this(cast(GtkSourceGutterRendererPixbuf*) p);
133 	}
134 	
135 	/**
136 	 */
137 	public void setPixbuf(Pixbuf pixbuf)
138 	{
139 		// void gtk_source_gutter_renderer_pixbuf_set_pixbuf  (GtkSourceGutterRendererPixbuf *renderer,  GdkPixbuf *pixbuf);
140 		gtk_source_gutter_renderer_pixbuf_set_pixbuf(gtkSourceGutterRendererPixbuf, (pixbuf is null) ? null : pixbuf.getPixbufStruct());
141 	}
142 	
143 	/**
144 	 * Get the pixbuf of the renderer.
145 	 * Returns: a GdkPixbuf. [transfer none]
146 	 */
147 	public Pixbuf getPixbuf()
148 	{
149 		// GdkPixbuf * gtk_source_gutter_renderer_pixbuf_get_pixbuf  (GtkSourceGutterRendererPixbuf *renderer);
150 		auto p = gtk_source_gutter_renderer_pixbuf_get_pixbuf(gtkSourceGutterRendererPixbuf);
151 		
152 		if(p is null)
153 		{
154 			return null;
155 		}
156 		
157 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p);
158 	}
159 	
160 	/**
161 	 * Warning
162 	 * gtk_source_gutter_renderer_pixbuf_set_stock_id has been deprecated since version 3.10 and should not be used in newly-written code. Don't use this function.
163 	 * Params:
164 	 * stockId = the stock id
165 	 */
166 	public void setStockId(string stockId)
167 	{
168 		// void gtk_source_gutter_renderer_pixbuf_set_stock_id  (GtkSourceGutterRendererPixbuf *renderer,  const gchar *stock_id);
169 		gtk_source_gutter_renderer_pixbuf_set_stock_id(gtkSourceGutterRendererPixbuf, Str.toStringz(stockId));
170 	}
171 	
172 	/**
173 	 * Warning
174 	 * gtk_source_gutter_renderer_pixbuf_get_stock_id has been deprecated since version 3.10 and should not be used in newly-written code. Don't use this function.
175 	 * Returns: the stock id.
176 	 */
177 	public string getStockId()
178 	{
179 		// const gchar * gtk_source_gutter_renderer_pixbuf_get_stock_id  (GtkSourceGutterRendererPixbuf *renderer);
180 		return Str.toString(gtk_source_gutter_renderer_pixbuf_get_stock_id(gtkSourceGutterRendererPixbuf));
181 	}
182 	
183 	/**
184 	 */
185 	public void setGicon(IconIF icon)
186 	{
187 		// void gtk_source_gutter_renderer_pixbuf_set_gicon  (GtkSourceGutterRendererPixbuf *renderer,  GIcon *icon);
188 		gtk_source_gutter_renderer_pixbuf_set_gicon(gtkSourceGutterRendererPixbuf, (icon is null) ? null : icon.getIconTStruct());
189 	}
190 	
191 	/**
192 	 * Get the gicon of the renderer
193 	 * Returns: a GIcon. [transfer none]
194 	 */
195 	public IconIF getGicon()
196 	{
197 		// GIcon * gtk_source_gutter_renderer_pixbuf_get_gicon  (GtkSourceGutterRendererPixbuf *renderer);
198 		auto p = gtk_source_gutter_renderer_pixbuf_get_gicon(gtkSourceGutterRendererPixbuf);
199 		
200 		if(p is null)
201 		{
202 			return null;
203 		}
204 		
205 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
206 	}
207 	
208 	/**
209 	 */
210 	public void setIconName(string iconName)
211 	{
212 		// void gtk_source_gutter_renderer_pixbuf_set_icon_name  (GtkSourceGutterRendererPixbuf *renderer,  const gchar *icon_name);
213 		gtk_source_gutter_renderer_pixbuf_set_icon_name(gtkSourceGutterRendererPixbuf, Str.toStringz(iconName));
214 	}
215 	
216 	/**
217 	 */
218 	public string getIconName()
219 	{
220 		// const gchar * gtk_source_gutter_renderer_pixbuf_get_icon_name  (GtkSourceGutterRendererPixbuf *renderer);
221 		return Str.toString(gtk_source_gutter_renderer_pixbuf_get_icon_name(gtkSourceGutterRendererPixbuf));
222 	}
223 }