1 /*
2  * This file is part of EvinceD.
3  * EvinceD is based on GtkD.
4  *
5  * EvinceD is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation; either version 3
8  * of the License, or (at your option) any later version, with
9  * some exceptions, please read the COPYING file.
10  *
11  * EvinceD is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with EvinceD; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
19  */
20 
21 // generated automatically - do not change
22 // find conversion definition on APILookup.txt
23 
24 
25 module evince.document.DocumentInfo;
26 
27 private import evince.document.DocumentLicense;
28 private import evince.document.c.functions;
29 public  import evince.document.c.types;
30 private import glib.MemorySlice;
31 private import glib.Str;
32 private import gobject.ObjectG;
33 private import gtkd.Loader;
34 
35 
36 /** */
37 public final class DocumentInfo
38 {
39 	/** the main Gtk struct */
40 	protected EvDocumentInfo* evDocumentInfo;
41 	protected bool ownedRef;
42 
43 	/** Get the main Gtk struct */
44 	public EvDocumentInfo* getDocumentInfoStruct(bool transferOwnership = false)
45 	{
46 		if (transferOwnership)
47 			ownedRef = false;
48 		return evDocumentInfo;
49 	}
50 
51 	/** the main Gtk struct as a void* */
52 	protected void* getStruct()
53 	{
54 		return cast(void*)evDocumentInfo;
55 	}
56 
57 	/**
58 	 * Sets our main struct and passes it to the parent class.
59 	 */
60 	public this (EvDocumentInfo* evDocumentInfo, bool ownedRef = false)
61 	{
62 		this.evDocumentInfo = evDocumentInfo;
63 		this.ownedRef = ownedRef;
64 	}
65 
66 	~this ()
67 	{
68 		if ( Linker.isLoaded(LIBRARY_EVINCEDOCUMENT) && ownedRef )
69 			ev_document_info_free(evDocumentInfo);
70 	}
71 
72 
73 	/** */
74 	public @property string title()
75 	{
76 		return Str.toString(evDocumentInfo.title);
77 	}
78 
79 	/** Ditto */
80 	public @property void title(string value)
81 	{
82 		evDocumentInfo.title = Str.toStringz(value);
83 	}
84 
85 	/** */
86 	public @property string format()
87 	{
88 		return Str.toString(evDocumentInfo.format);
89 	}
90 
91 	/** Ditto */
92 	public @property void format(string value)
93 	{
94 		evDocumentInfo.format = Str.toStringz(value);
95 	}
96 
97 	/** */
98 	public @property string author()
99 	{
100 		return Str.toString(evDocumentInfo.author);
101 	}
102 
103 	/** Ditto */
104 	public @property void author(string value)
105 	{
106 		evDocumentInfo.author = Str.toStringz(value);
107 	}
108 
109 	/** */
110 	public @property string subject()
111 	{
112 		return Str.toString(evDocumentInfo.subject);
113 	}
114 
115 	/** Ditto */
116 	public @property void subject(string value)
117 	{
118 		evDocumentInfo.subject = Str.toStringz(value);
119 	}
120 
121 	/** */
122 	public @property string keywords()
123 	{
124 		return Str.toString(evDocumentInfo.keywords);
125 	}
126 
127 	/** Ditto */
128 	public @property void keywords(string value)
129 	{
130 		evDocumentInfo.keywords = Str.toStringz(value);
131 	}
132 
133 	/** */
134 	public @property string creator()
135 	{
136 		return Str.toString(evDocumentInfo.creator);
137 	}
138 
139 	/** Ditto */
140 	public @property void creator(string value)
141 	{
142 		evDocumentInfo.creator = Str.toStringz(value);
143 	}
144 
145 	/** */
146 	public @property string producer()
147 	{
148 		return Str.toString(evDocumentInfo.producer);
149 	}
150 
151 	/** Ditto */
152 	public @property void producer(string value)
153 	{
154 		evDocumentInfo.producer = Str.toStringz(value);
155 	}
156 
157 	/** */
158 	public @property string linearized()
159 	{
160 		return Str.toString(evDocumentInfo.linearized);
161 	}
162 
163 	/** Ditto */
164 	public @property void linearized(string value)
165 	{
166 		evDocumentInfo.linearized = Str.toStringz(value);
167 	}
168 
169 	/** */
170 	public @property string security()
171 	{
172 		return Str.toString(evDocumentInfo.security);
173 	}
174 
175 	/** Ditto */
176 	public @property void security(string value)
177 	{
178 		evDocumentInfo.security = Str.toStringz(value);
179 	}
180 
181 	/** */
182 	public @property GTime creationDate()
183 	{
184 		return evDocumentInfo.creationDate;
185 	}
186 
187 	/** Ditto */
188 	public @property void creationDate(GTime value)
189 	{
190 		evDocumentInfo.creationDate = value;
191 	}
192 
193 	/** */
194 	public @property GTime modifiedDate()
195 	{
196 		return evDocumentInfo.modifiedDate;
197 	}
198 
199 	/** Ditto */
200 	public @property void modifiedDate(GTime value)
201 	{
202 		evDocumentInfo.modifiedDate = value;
203 	}
204 
205 	/** */
206 	public @property EvDocumentLayout layout()
207 	{
208 		return evDocumentInfo.layout;
209 	}
210 
211 	/** Ditto */
212 	public @property void layout(EvDocumentLayout value)
213 	{
214 		evDocumentInfo.layout = value;
215 	}
216 
217 	/** */
218 	public @property EvDocumentMode mode()
219 	{
220 		return evDocumentInfo.mode;
221 	}
222 
223 	/** Ditto */
224 	public @property void mode(EvDocumentMode value)
225 	{
226 		evDocumentInfo.mode = value;
227 	}
228 
229 	/** */
230 	public @property uint uiHints()
231 	{
232 		return evDocumentInfo.uiHints;
233 	}
234 
235 	/** Ditto */
236 	public @property void uiHints(uint value)
237 	{
238 		evDocumentInfo.uiHints = value;
239 	}
240 
241 	/** */
242 	public @property uint permissions()
243 	{
244 		return evDocumentInfo.permissions;
245 	}
246 
247 	/** Ditto */
248 	public @property void permissions(uint value)
249 	{
250 		evDocumentInfo.permissions = value;
251 	}
252 
253 	/** */
254 	public @property int nPages()
255 	{
256 		return evDocumentInfo.nPages;
257 	}
258 
259 	/** Ditto */
260 	public @property void nPages(int value)
261 	{
262 		evDocumentInfo.nPages = value;
263 	}
264 
265 	/** */
266 	public @property double paperHeight()
267 	{
268 		return evDocumentInfo.paperHeight;
269 	}
270 
271 	/** Ditto */
272 	public @property void paperHeight(double value)
273 	{
274 		evDocumentInfo.paperHeight = value;
275 	}
276 
277 	/** */
278 	public @property double paperWidth()
279 	{
280 		return evDocumentInfo.paperWidth;
281 	}
282 
283 	/** Ditto */
284 	public @property void paperWidth(double value)
285 	{
286 		evDocumentInfo.paperWidth = value;
287 	}
288 
289 	/** */
290 	public @property DocumentLicense license()
291 	{
292 		return ObjectG.getDObject!(DocumentLicense)(evDocumentInfo.license, false);
293 	}
294 
295 	/** Ditto */
296 	public @property void license(DocumentLicense value)
297 	{
298 		evDocumentInfo.license = value.getDocumentLicenseStruct();
299 	}
300 
301 	/** */
302 	public @property uint fieldsMask()
303 	{
304 		return evDocumentInfo.fieldsMask;
305 	}
306 
307 	/** Ditto */
308 	public @property void fieldsMask(uint value)
309 	{
310 		evDocumentInfo.fieldsMask = value;
311 	}
312 
313 	/** */
314 	public static GType getType()
315 	{
316 		return ev_document_info_get_type();
317 	}
318 
319 	/** */
320 	public DocumentInfo copy()
321 	{
322 		auto __p = ev_document_info_copy(evDocumentInfo);
323 
324 		if(__p is null)
325 		{
326 			return null;
327 		}
328 
329 		return ObjectG.getDObject!(DocumentInfo)(cast(EvDocumentInfo*) __p, true);
330 	}
331 
332 	/** */
333 	public void free()
334 	{
335 		ev_document_info_free(evDocumentInfo);
336 		ownedRef = false;
337 	}
338 }