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 change22 // find conversion definition on APILookup.txt23 24 25 moduleevince.document.AnnotationAttachment;
26 27 privateimportevince.document.Annotation;
28 privateimportevince.document.AnnotationMarkupIF;
29 privateimportevince.document.AnnotationMarkupT;
30 privateimportevince.document.Attachment;
31 privateimportevince.document.Page;
32 privateimportevince.document.c.functions;
33 publicimportevince.document.c.types;
34 privateimportglib.ConstructionException;
35 privateimportgobject.ObjectG;
36 37 38 /** */39 publicclassAnnotationAttachment : Annotation, AnnotationMarkupIF40 {
41 /** the main Gtk struct */42 protectedEvAnnotationAttachment* evAnnotationAttachment;
43 44 /** Get the main Gtk struct */45 publicEvAnnotationAttachment* getAnnotationAttachmentStruct(booltransferOwnership = false)
46 {
47 if (transferOwnership)
48 ownedRef = false;
49 returnevAnnotationAttachment;
50 }
51 52 /** the main Gtk struct as a void* */53 protectedoverridevoid* getStruct()
54 {
55 returncast(void*)evAnnotationAttachment;
56 }
57 58 /**
59 * Sets our main struct and passes it to the parent class.
60 */61 publicthis (EvAnnotationAttachment* evAnnotationAttachment, boolownedRef = false)
62 {
63 this.evAnnotationAttachment = evAnnotationAttachment;
64 super(cast(EvAnnotation*)evAnnotationAttachment, ownedRef);
65 }
66 67 // add the AnnotationMarkup capabilities68 mixinAnnotationMarkupT!(EvAnnotationAttachment);
69 70 71 /** */72 publicstaticGTypegetType()
73 {
74 returnev_annotation_attachment_get_type();
75 }
76 77 /** */78 publicthis(Pagepage, Attachmentattachment)
79 {
80 auto__p = ev_annotation_attachment_new((pageisnull) ? null : page.getPageStruct(), (attachmentisnull) ? null : attachment.getAttachmentStruct());
81 82 if(__pisnull)
83 {
84 thrownewConstructionException("null returned by new");
85 }
86 87 this(cast(EvAnnotationAttachment*) __p, true);
88 }
89 90 /**
91 * Returns: an #EvAttachment
92 */93 publicAttachmentgetAttachment()
94 {
95 auto__p = ev_annotation_attachment_get_attachment(evAnnotationAttachment);
96 97 if(__pisnull)
98 {
99 returnnull;
100 }
101 102 returnObjectG.getDObject!(Attachment)(cast(EvAttachment*) __p);
103 }
104 105 /** */106 publicboolsetAttachment(Attachmentattachment)
107 {
108 returnev_annotation_attachment_set_attachment(evAnnotationAttachment, (attachmentisnull) ? null : attachment.getAttachmentStruct()) != 0;
109 }
110 }