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