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 module atk.DocumentIF;
26 
27 private import glib.Str;
28 private import gobject.Signals;
29 private import gtkc.atk;
30 public  import gtkc.atktypes;
31 public  import gtkc.gdktypes;
32 
33 
34 /**
35  * The AtkDocument interface should be supported by any object whose
36  * content is a representation or view of a document.  The AtkDocument
37  * interface should appear on the toplevel container for the document
38  * content; however AtkDocument instances may be nested (i.e. an
39  * AtkDocument may be a descendant of another AtkDocument) in those
40  * cases where one document contains "embedded content" which can
41  * reasonably be considered a document in its own right.
42  */
43 public interface DocumentIF{
44 	/** Get the main Gtk struct */
45 	public AtkDocument* getDocumentStruct();
46 
47 	/** the main Gtk struct as a void* */
48 	protected void* getStruct();
49 
50 	/**
51 	 */
52 
53 	/**
54 	 *
55 	 * Params:
56 	 *     attributeName = a character string representing the name of the attribute
57 	 *         whose value is being queried.
58 	 * Return: a string value associated with the named
59 	 *     attribute for this document, or NULL if a value for
60 	 *     #attribute_name has not been specified for this document.
61 	 *
62 	 * Since: 1.12
63 	 */
64 	public string getAttributeValue(string attributeName);
65 
66 	/**
67 	 * Gets an AtkAttributeSet which describes document-wide
68 	 * attributes as name-value pairs.
69 	 *
70 	 * Return: An AtkAttributeSet containing the explicitly
71 	 *     set name-value-pair attributes associated with this document
72 	 *     as a whole.
73 	 *
74 	 * Since: 1.12
75 	 */
76 	public AtkAttributeSet* getAttributes();
77 
78 	/**
79 	 * Return: current page number inside @document. -1 if not
80 	 *     implemented, not know by the implementor or irrelevant.
81 	 *
82 	 * Since: 2.12
83 	 */
84 	public int getCurrentPageNumber();
85 
86 	/**
87 	 * Gets a %gpointer that points to an instance of the DOM.  It is
88 	 * up to the caller to check atk_document_get_type to determine
89 	 * how to cast this pointer.
90 	 *
91 	 * Deprecated: Since 2.12. @document is already a representation of
92 	 * the document. Use it directly, or one of his children, as an
93 	 * instance of the DOM.
94 	 *
95 	 * Return: a %gpointer that points to an instance of the DOM.
96 	 */
97 	public void* getDocument();
98 
99 	/**
100 	 * Gets a string indicating the document type.
101 	 *
102 	 * Deprecated: Since 2.12. Please use atk_document_get_attributes() to
103 	 * ask for the document type if it applies.
104 	 *
105 	 * Return: a string indicating the document type
106 	 */
107 	public string getDocumentType();
108 
109 	/**
110 	 * Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale
111 	 * of the content of this document instance.  Individual
112 	 * text substrings or images within this document may have
113 	 * a different locale, see atk_text_get_attributes and
114 	 * atk_image_get_image_locale.
115 	 *
116 	 * Deprecated: This method is deprecated since ATK version
117 	 * 2.7.90. Please use atk_object_get_object_locale() instead.
118 	 *
119 	 * Return: a UTF-8 string indicating the POSIX-style LC_MESSAGES
120 	 *     locale of the document content as a whole, or NULL if
121 	 *     the document content does not specify a locale.
122 	 */
123 	public string getLocale();
124 
125 	/**
126 	 * Return: total page count of @document. -1 if not implemented, not
127 	 *     know by the implementor or irrelevant.
128 	 *
129 	 * Since: 2.12
130 	 */
131 	public int getPageCount();
132 
133 	/**
134 	 *
135 	 * Params:
136 	 *     attributeName = a character string representing the name of the attribute
137 	 *         whose value is being set.
138 	 *     attributeValue = a string value to be associated with #attribute_name.
139 	 * Return: TRUE if #value is successfully associated with #attribute_name
140 	 *     for this document, FALSE otherwise (e.g. if the document does not
141 	 *     allow the attribute to be modified).
142 	 *
143 	 * Since: 1.12
144 	 */
145 	public bool setAttributeValue(string attributeName, string attributeValue);
146 	@property void delegate(DocumentIF)[] onLoadCompleteListeners();
147 	/**
148 	 * The 'load-complete' signal is emitted when a pending load of
149 	 * a static document has completed.  This signal is to be
150 	 * expected by ATK clients if and when AtkDocument implementors
151 	 * expose ATK_STATE_BUSY.  If the state of an AtkObject which
152 	 * implements AtkDocument does not include ATK_STATE_BUSY, it
153 	 * should be safe for clients to assume that the AtkDocument's
154 	 * static contents are fully loaded into the container.
155 	 * (Dynamic document contents should be exposed via other
156 	 * signals.)
157 	 */
158 	void addOnLoadComplete(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
159 
160 	@property void delegate(DocumentIF)[] onLoadStoppedListeners();
161 	/**
162 	 * The 'load-stopped' signal is emitted when a pending load of
163 	 * document contents is cancelled, paused, or otherwise
164 	 * interrupted by the user or application logic.  It should not
165 	 * however be emitted while waiting for a resource (for instance
166 	 * while blocking on a file or network read) unless a
167 	 * user-significant timeout has occurred.
168 	 */
169 	void addOnLoadStopped(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
170 
171 	@property void delegate(int, DocumentIF)[] onPageChangedListeners();
172 	/**
173 	 * The 'page-changed' signal is emitted when the current page of
174 	 * a document changes, e.g. pressing page up/down in a document
175 	 * viewer.
176 	 *
177 	 * Params:
178 	 *     pageNumber = the new page number. If this value is unknown
179 	 *         or not applicable, -1 should be provided.
180 	 *
181 	 * Since: 2.12
182 	 */
183 	void addOnPageChanged(void delegate(int, DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
184 
185 	@property void delegate(DocumentIF)[] onReloadListeners();
186 	/**
187 	 * The 'reload' signal is emitted when the contents of a
188 	 * document is refreshed from its source.  Once 'reload' has
189 	 * been emitted, a matching 'load-complete' or 'load-stopped'
190 	 * signal should follow, which clients may await before
191 	 * interrogating ATK for the latest document content.
192 	 */
193 	void addOnReload(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
194 
195 }