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 
67 private import glib.Str;
68 private import gio.Icon;
69 private import gio.IconIF;
70 private import gdk.Pixbuf;
71 
72 
73 
74 private import gsv.SourceGutterRenderer;
75 
76 /**
77  */
78 public class SourceGutterRendererPixbuf : SourceGutterRenderer
79 {
80 	
81 	/** the main Gtk struct */
82 	protected GtkSourceGutterRendererPixbuf* gtkSourceGutterRendererPixbuf;
83 	
84 	
85 	public GtkSourceGutterRendererPixbuf* getSourceGutterRendererPixbufStruct()
86 	{
87 		return gtkSourceGutterRendererPixbuf;
88 	}
89 	
90 	
91 	/** the main Gtk struct as a void* */
92 	protected override void* getStruct()
93 	{
94 		return cast(void*)gtkSourceGutterRendererPixbuf;
95 	}
96 	
97 	/**
98 	 * Sets our main struct and passes it to the parent class
99 	 */
100 	public this (GtkSourceGutterRendererPixbuf* gtkSourceGutterRendererPixbuf)
101 	{
102 		super(cast(GtkSourceGutterRenderer*)gtkSourceGutterRendererPixbuf);
103 		this.gtkSourceGutterRendererPixbuf = gtkSourceGutterRendererPixbuf;
104 	}
105 	
106 	protected override void setStruct(GObject* obj)
107 	{
108 		super.setStruct(obj);
109 		gtkSourceGutterRendererPixbuf = cast(GtkSourceGutterRendererPixbuf*)obj;
110 	}
111 	
112 	/** */
113 	public void setStockId(StockID stockId)
114 	{
115 		setStockId(StockDesc[stockId]);
116 	}
117 	
118 	/**
119 	 */
120 	
121 	/**
122 	 * Create a new GtkSourceGutterRendererPixbuf.
123 	 * Throws: ConstructionException GTK+ fails to create the object.
124 	 */
125 	public this ()
126 	{
127 		// GtkSourceGutterRenderer * gtk_source_gutter_renderer_pixbuf_new  (void);
128 		auto p = gtk_source_gutter_renderer_pixbuf_new();
129 		if(p is null)
130 		{
131 			throw new ConstructionException("null returned by gtk_source_gutter_renderer_pixbuf_new()");
132 		}
133 		this(cast(GtkSourceGutterRendererPixbuf*) p);
134 	}
135 	
136 	/**
137 	 */
138 	public void setPixbuf(Pixbuf pixbuf)
139 	{
140 		// void gtk_source_gutter_renderer_pixbuf_set_pixbuf  (GtkSourceGutterRendererPixbuf *renderer,  GdkPixbuf *pixbuf);
141 		gtk_source_gutter_renderer_pixbuf_set_pixbuf(gtkSourceGutterRendererPixbuf, (pixbuf is null) ? null : pixbuf.getPixbufStruct());
142 	}
143 	
144 	/**
145 	 * Get the pixbuf of the renderer.
146 	 * Returns: a GdkPixbuf. [transfer none]
147 	 */
148 	public Pixbuf getPixbuf()
149 	{
150 		// GdkPixbuf * gtk_source_gutter_renderer_pixbuf_get_pixbuf  (GtkSourceGutterRendererPixbuf *renderer);
151 		auto p = gtk_source_gutter_renderer_pixbuf_get_pixbuf(gtkSourceGutterRendererPixbuf);
152 		
153 		if(p is null)
154 		{
155 			return null;
156 		}
157 		
158 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p);
159 	}
160 	
161 	/**
162 	 * Warning
163 	 * 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.
164 	 * Params:
165 	 * stockId = the stock id
166 	 */
167 	public void setStockId(string stockId)
168 	{
169 		// void gtk_source_gutter_renderer_pixbuf_set_stock_id  (GtkSourceGutterRendererPixbuf *renderer,  const gchar *stock_id);
170 		gtk_source_gutter_renderer_pixbuf_set_stock_id(gtkSourceGutterRendererPixbuf, Str.toStringz(stockId));
171 	}
172 	
173 	/**
174 	 * Warning
175 	 * 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.
176 	 * Returns: the stock id.
177 	 */
178 	public string getStockId()
179 	{
180 		// const gchar * gtk_source_gutter_renderer_pixbuf_get_stock_id  (GtkSourceGutterRendererPixbuf *renderer);
181 		return Str.toString(gtk_source_gutter_renderer_pixbuf_get_stock_id(gtkSourceGutterRendererPixbuf));
182 	}
183 	
184 	/**
185 	 */
186 	public void setGicon(IconIF icon)
187 	{
188 		// void gtk_source_gutter_renderer_pixbuf_set_gicon  (GtkSourceGutterRendererPixbuf *renderer,  GIcon *icon);
189 		gtk_source_gutter_renderer_pixbuf_set_gicon(gtkSourceGutterRendererPixbuf, (icon is null) ? null : icon.getIconTStruct());
190 	}
191 	
192 	/**
193 	 * Get the gicon of the renderer
194 	 * Returns: a GIcon. [transfer none]
195 	 */
196 	public IconIF getGicon()
197 	{
198 		// GIcon * gtk_source_gutter_renderer_pixbuf_get_gicon  (GtkSourceGutterRendererPixbuf *renderer);
199 		auto p = gtk_source_gutter_renderer_pixbuf_get_gicon(gtkSourceGutterRendererPixbuf);
200 		
201 		if(p is null)
202 		{
203 			return null;
204 		}
205 		
206 		return ObjectG.getDObject!(Icon, IconIF)(cast(GIcon*) p);
207 	}
208 	
209 	/**
210 	 */
211 	public void setIconName(string iconName)
212 	{
213 		// void gtk_source_gutter_renderer_pixbuf_set_icon_name  (GtkSourceGutterRendererPixbuf *renderer,  const gchar *icon_name);
214 		gtk_source_gutter_renderer_pixbuf_set_icon_name(gtkSourceGutterRendererPixbuf, Str.toStringz(iconName));
215 	}
216 	
217 	/**
218 	 */
219 	public string getIconName()
220 	{
221 		// const gchar * gtk_source_gutter_renderer_pixbuf_get_icon_name  (GtkSourceGutterRendererPixbuf *renderer);
222 		return Str.toString(gtk_source_gutter_renderer_pixbuf_get_icon_name(gtkSourceGutterRendererPixbuf));
223 	}
224 }