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 		import gtkc.gobject : g_object_ref;
158 		g_object_ref(cast(GObject*)p);
159 		
160 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p);
161 	}
162 	
163 	/**
164 	 * Warning
165 	 * 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.
166 	 * Params:
167 	 * stockId = the stock id
168 	 */
169 	public void setStockId(string stockId)
170 	{
171 		// void gtk_source_gutter_renderer_pixbuf_set_stock_id  (GtkSourceGutterRendererPixbuf *renderer,  const gchar *stock_id);
172 		gtk_source_gutter_renderer_pixbuf_set_stock_id(gtkSourceGutterRendererPixbuf, Str.toStringz(stockId));
173 	}
174 	
175 	/**
176 	 * Warning
177 	 * 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.
178 	 * Returns: the stock id.
179 	 */
180 	public string getStockId()
181 	{
182 		// const gchar * gtk_source_gutter_renderer_pixbuf_get_stock_id  (GtkSourceGutterRendererPixbuf *renderer);
183 		return Str.toString(gtk_source_gutter_renderer_pixbuf_get_stock_id(gtkSourceGutterRendererPixbuf));
184 	}
185 	
186 	/**
187 	 */
188 	public void setGicon(IconIF icon)
189 	{
190 		// void gtk_source_gutter_renderer_pixbuf_set_gicon  (GtkSourceGutterRendererPixbuf *renderer,  GIcon *icon);
191 		gtk_source_gutter_renderer_pixbuf_set_gicon(gtkSourceGutterRendererPixbuf, (icon is null) ? null : icon.getIconTStruct());
192 	}
193 	
194 	/**
195 	 * Get the gicon of the renderer
196 	 * Returns: a GIcon. [transfer none]
197 	 */
198 	public IconIF getGicon()
199 	{
200 		// GIcon * gtk_source_gutter_renderer_pixbuf_get_gicon  (GtkSourceGutterRendererPixbuf *renderer);
201 		auto p = gtk_source_gutter_renderer_pixbuf_get_gicon(gtkSourceGutterRendererPixbuf);
202 		
203 		if(p is null)
204 		{
205 			return null;
206 		}
207 		
208 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
209 	}
210 	
211 	/**
212 	 */
213 	public void setIconName(string iconName)
214 	{
215 		// void gtk_source_gutter_renderer_pixbuf_set_icon_name  (GtkSourceGutterRendererPixbuf *renderer,  const gchar *icon_name);
216 		gtk_source_gutter_renderer_pixbuf_set_icon_name(gtkSourceGutterRendererPixbuf, Str.toStringz(iconName));
217 	}
218 	
219 	/**
220 	 */
221 	public string getIconName()
222 	{
223 		// const gchar * gtk_source_gutter_renderer_pixbuf_get_icon_name  (GtkSourceGutterRendererPixbuf *renderer);
224 		return Str.toString(gtk_source_gutter_renderer_pixbuf_get_icon_name(gtkSourceGutterRendererPixbuf));
225 	}
226 }