Support for PangoFT2, PangoCairo, fontconfig2, freetype22, GL, Clutter, ClutterX11...
[girtod.git] / gtk2 / atk.d
blob81a8cf92e82cbbd05b2b1af3ed414424e4a11570
1 // *** DO NOT EDIT ***
2 // Automatically generated from "/usr/share/gir-1.0/Atk-1.0.gir"
4 module Atk;
5 public import gtk2.glib2;
6 alias gtk2.glib2 GLib2;
7 public import gtk2.gobject2;
8 alias gtk2.gobject2 GObject2;
10 // package: "atk";
12 // c:symbol-prefixes: ["atk"]
13 // c:identifier-prefixes: ["Atk"]
15 // module Atk;
18 // This is a singly-linked list (a #GSList) of #AtkAttribute. It is
19 // used by atk_text_get_run_attributes(), atk_text_get_default_attributes()
20 // and atk_editable_text_set_run_attributes()
21 alias GLib2.SList AttributeSet;
22 alias ulong State;
23 struct Action {
25 // Perform the specified action on the object.
26 // RETURNS: %TRUE if success, %FALSE otherwise
27 // <i>: the action index corresponding to the action to be performed
28 int do_action(int i) {
29 return atk_action_do_action(&this, i);
32 // Returns a description of the specified action of the object.
33 // Returns a description string, or %NULL
34 // if @action does not implement this interface.
35 // <i>: the action index corresponding to the action to be performed
36 char* get_description(int i) {
37 return atk_action_get_description(&this, i);
40 // Returns a keybinding associated with this action, if one exists.
41 // The returned string is in the format "<a>;<b>;<c>"
42 // (i.e. semicolon-delimited), where <a> is the keybinding which
43 // activates the object if it is presently enabled onscreen,
44 // <b> corresponds to the keybinding or sequence of keys
45 // which invokes the action even if the relevant element is not
46 // currently posted on screen (for instance, for a menu item it
47 // posts the parent menus before invoking). The last token in the
48 // above string, if non-empty, represents a keyboard shortcut which
49 // invokes the same action without posting the component or its
50 // enclosing menus or dialogs.
51 // Returns a string representing the available keybindings, or %NULL
52 // if there is no keybinding for this action.
53 // <i>: the action index corresponding to the action to be performed
54 char* get_keybinding(int i) {
55 return atk_action_get_keybinding(&this, i);
58 // Returns the localized name of the specified action of the object.
59 // Returns a name string, or %NULL
60 // if @action does not implement this interface.
61 // <i>: the action index corresponding to the action to be performed
62 char* get_localized_name(int i) {
63 return atk_action_get_localized_name(&this, i);
66 // Gets the number of accessible actions available on the object.
67 // If there are more than one, the first one is considered the
68 // "default" action of the object.
69 // implement this interface.
70 // RETURNS: a the number of actions, or 0 if @action does not
71 int get_n_actions() {
72 return atk_action_get_n_actions(&this);
75 // Returns a non-localized string naming the specified action of the
76 // object. This name is generally not descriptive of the end result
77 // of the action, but instead names the 'interaction type' which the
78 // object supports. By convention, the above strings should be used to
79 // represent the actions which correspond to the common point-and-click
80 // "click", "press", "release", "drag", "drop", "popup", etc.
81 // The "popup" action should be used to pop up a context menu for the
82 // object, if one exists.
83 // For technical reasons, some toolkits cannot guarantee that the
84 // reported action is actually 'bound' to a nontrivial user event;
85 // i.e. the result of some actions via atk_action_do_action() may be
86 // NIL.
87 // Returns a name string, or %NULL
88 // if @action does not implement this interface.
89 // <i>: the action index corresponding to the action to be performed
90 char* get_name(int i) {
91 return atk_action_get_name(&this, i);
94 // Sets a description of the specified action of the object.
95 // RETURNS: a gboolean representing if the description was successfully set;
96 // <i>: the action index corresponding to the action to be performed
97 // <desc>: the description to be assigned to this action
98 int set_description(int i, char* desc) {
99 return atk_action_set_description(&this, i, desc);
103 struct ActionIface {
104 GObject2.TypeInterface parent;
106 // RETURNS: %TRUE if success, %FALSE otherwise
107 // <i>: the action index corresponding to the action to be performed
108 extern (C) int function (Action* action, int i) do_action;
109 // RETURNS: a the number of actions, or 0 if @action does not
110 extern (C) int function (Action* action) get_n_actions;
111 // <i>: the action index corresponding to the action to be performed
112 extern (C) char* function (Action* action, int i) get_description;
113 // <i>: the action index corresponding to the action to be performed
114 extern (C) char* function (Action* action, int i) get_name;
115 // <i>: the action index corresponding to the action to be performed
116 extern (C) char* function (Action* action, int i) get_keybinding;
118 // RETURNS: a gboolean representing if the description was successfully set;
119 // <i>: the action index corresponding to the action to be performed
120 // <desc>: the description to be assigned to this action
121 extern (C) int function (Action* action, int i, char* desc) set_description;
122 // <i>: the action index corresponding to the action to be performed
123 extern (C) char* function (Action* action, int i) get_localized_name;
124 Function pad2;
127 // A string name/value pair representing a text attribute.
128 struct Attribute {
129 char* name, value;
132 struct Component {
134 // Unintrospectable method: add_focus_handler() / atk_component_add_focus_handler()
135 // Add the specified handler to the set of functions to be called
136 // when this object receives focus events (in or out). If the handler is
137 // already added it is not added again
138 // or zero if the handler was already added.
139 // RETURNS: a handler id which can be used in atk_component_remove_focus_handler
140 // <handler>: The #AtkFocusHandler to be attached to @component
141 uint add_focus_handler(FocusHandler handler) {
142 return atk_component_add_focus_handler(&this, handler);
145 // Checks whether the specified point is within the extent of the @component.
146 // the extent of the @component or not
147 // RETURNS: %TRUE or %FALSE indicating whether the specified point is within
148 // <x>: x coordinate
149 // <y>: y coordinate
150 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
151 int contains(int x, int y, CoordType coord_type) {
152 return atk_component_contains(&this, x, y, coord_type);
155 // Returns the alpha value (i.e. the opacity) for this
156 // (fully opaque).
157 // RETURNS: An alpha value from 0 to 1.0, inclusive.
158 double get_alpha() {
159 return atk_component_get_alpha(&this);
162 // Gets the rectangle which gives the extent of the @component.
163 // <x>: address of #gint to put x coordinate
164 // <y>: address of #gint to put y coordinate
165 // <width>: address of #gint to put width
166 // <height>: address of #gint to put height
167 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
168 void get_extents(int* x, int* y, int* width, int* height, CoordType coord_type) {
169 atk_component_get_extents(&this, x, y, width, height, coord_type);
172 // Gets the layer of the component.
173 // RETURNS: an #AtkLayer which is the layer of the component
174 Layer get_layer() {
175 return atk_component_get_layer(&this);
178 // Gets the zorder of the component. The value G_MININT will be returned
179 // if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
180 // which the component is shown in relation to other components in the same
181 // container.
182 // RETURNS: a gint which is the zorder of the component, i.e. the depth at
183 int get_mdi_zorder() {
184 return atk_component_get_mdi_zorder(&this);
187 // Gets the position of @component in the form of
188 // a point specifying @component's top-left corner.
189 // <x>: address of #gint to put x coordinate position
190 // <y>: address of #gint to put y coordinate position
191 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
192 void get_position(int* x, int* y, CoordType coord_type) {
193 atk_component_get_position(&this, x, y, coord_type);
196 // Gets the size of the @component in terms of width and height.
197 // <width>: address of #gint to put width of @component
198 // <height>: address of #gint to put height of @component
199 void get_size(int* width, int* height) {
200 atk_component_get_size(&this, width, height);
203 // Grabs focus for this @component.
204 // RETURNS: %TRUE if successful, %FALSE otherwise.
205 int grab_focus() {
206 return atk_component_grab_focus(&this);
209 // Gets a reference to the accessible child, if one exists, at the
210 // coordinate point specified by @x and @y.
211 // RETURNS: a reference to the accessible child, if one exists
212 // <x>: x coordinate
213 // <y>: y coordinate
214 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
215 Object* /*new*/ ref_accessible_at_point(int x, int y, CoordType coord_type) {
216 return atk_component_ref_accessible_at_point(&this, x, y, coord_type);
219 // Remove the handler specified by @handler_id from the list of
220 // functions to be executed when this object receives focus events
221 // (in or out).
222 // <handler_id>: the handler id of the focus handler to be removed from @component
223 void remove_focus_handler(uint handler_id) {
224 atk_component_remove_focus_handler(&this, handler_id);
227 // Sets the extents of @component.
228 // RETURNS: %TRUE or %FALSE whether the extents were set or not
229 // <x>: x coordinate
230 // <y>: y coordinate
231 // <width>: width to set for @component
232 // <height>: height to set for @component
233 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
234 int set_extents(int x, int y, int width, int height, CoordType coord_type) {
235 return atk_component_set_extents(&this, x, y, width, height, coord_type);
238 // Sets the postition of @component.
239 // RETURNS: %TRUE or %FALSE whether or not the position was set or not
240 // <x>: x coordinate
241 // <y>: y coordinate
242 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
243 int set_position(int x, int y, CoordType coord_type) {
244 return atk_component_set_position(&this, x, y, coord_type);
247 // Set the size of the @component in terms of width and height.
248 // RETURNS: %TRUE or %FALSE whether the size was set or not
249 // <width>: width to set for @component
250 // <height>: height to set for @component
251 int set_size(int width, int height) {
252 return atk_component_set_size(&this, width, height);
254 extern (C) alias static void function (Component* this_, Rectangle* object, void* user_data=null) signal_bounds_changed;
256 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
257 return super_.signal_connect!name(cb, data, cf);
260 ulong signal_connect(string name:"bounds-changed", CB:signal_bounds_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
261 return signal_connect_data(&this, cast(char*)"bounds-changed",
262 cast(GObject2.Callback)cb, data, null, cf);
266 struct ComponentIface {
267 GObject2.TypeInterface parent;
269 // Unintrospectable functionp: add_focus_handler() / ()
271 // RETURNS: a handler id which can be used in atk_component_remove_focus_handler
272 // <handler>: The #AtkFocusHandler to be attached to @component
273 extern (C) uint function (Component* component, FocusHandler handler) add_focus_handler;
275 // RETURNS: %TRUE or %FALSE indicating whether the specified point is within
276 // <x>: x coordinate
277 // <y>: y coordinate
278 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
279 extern (C) int function (Component* component, int x, int y, CoordType coord_type) contains;
281 // RETURNS: a reference to the accessible child, if one exists
282 // <x>: x coordinate
283 // <y>: y coordinate
284 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
285 extern (C) Object* /*new*/ function (Component* component, int x, int y, CoordType coord_type) ref_accessible_at_point;
287 // <x>: address of #gint to put x coordinate
288 // <y>: address of #gint to put y coordinate
289 // <width>: address of #gint to put width
290 // <height>: address of #gint to put height
291 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
292 extern (C) void function (Component* component, int* x, int* y, int* width, int* height, CoordType coord_type) get_extents;
294 // <x>: address of #gint to put x coordinate position
295 // <y>: address of #gint to put y coordinate position
296 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
297 extern (C) void function (Component* component, int* x, int* y, CoordType coord_type) get_position;
299 // <width>: address of #gint to put width of @component
300 // <height>: address of #gint to put height of @component
301 extern (C) void function (Component* component, int* width, int* height) get_size;
302 // RETURNS: %TRUE if successful, %FALSE otherwise.
303 extern (C) int function (Component* component) grab_focus;
304 // <handler_id>: the handler id of the focus handler to be removed from @component
305 extern (C) void function (Component* component, uint handler_id) remove_focus_handler;
307 // RETURNS: %TRUE or %FALSE whether the extents were set or not
308 // <x>: x coordinate
309 // <y>: y coordinate
310 // <width>: width to set for @component
311 // <height>: height to set for @component
312 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
313 extern (C) int function (Component* component, int x, int y, int width, int height, CoordType coord_type) set_extents;
315 // RETURNS: %TRUE or %FALSE whether or not the position was set or not
316 // <x>: x coordinate
317 // <y>: y coordinate
318 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
319 extern (C) int function (Component* component, int x, int y, CoordType coord_type) set_position;
321 // RETURNS: %TRUE or %FALSE whether the size was set or not
322 // <width>: width to set for @component
323 // <height>: height to set for @component
324 extern (C) int function (Component* component, int width, int height) set_size;
325 // RETURNS: an #AtkLayer which is the layer of the component
326 extern (C) Layer function (Component* component) get_layer;
327 // RETURNS: a gint which is the zorder of the component, i.e. the depth at
328 extern (C) int function (Component* component) get_mdi_zorder;
329 extern (C) void function (Component* component, Rectangle* bounds) bounds_changed;
330 // RETURNS: An alpha value from 0 to 1.0, inclusive.
331 extern (C) double function (Component* component) get_alpha;
334 enum CoordType {
335 SCREEN = 0,
336 WINDOW = 1
338 struct Document {
340 // document, or NULL if a value for #attribute_name has not been specified
341 // for this document.
342 // RETURNS: a string value associated with the named attribute for this
343 // <attribute_name>: a character string representing the name of the attribute whose value is being queried.
344 char* get_attribute_value(char* attribute_name) {
345 return atk_document_get_attribute_value(&this, attribute_name);
348 // Gets an AtkAttributeSet which describes document-wide
349 // attributes as name-value pairs.
350 // set name-value-pair attributes associated with this document
351 // as a whole.
352 // RETURNS: An AtkAttributeSet containing the explicitly
353 AttributeSet* get_attributes() {
354 return atk_document_get_attributes(&this);
357 // Gets a %gpointer that points to an instance of the DOM. It is
358 // up to the caller to check atk_document_get_type to determine
359 // how to cast this pointer.
360 // RETURNS: a %gpointer that points to an instance of the DOM.
361 void* get_document() {
362 return atk_document_get_document(&this);
365 // Gets a string indicating the document type.
366 // RETURNS: a string indicating the document type
367 char* get_document_type() {
368 return atk_document_get_document_type(&this);
371 // Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale
372 // of the content of this document instance. Individual
373 // text substrings or images within this document may have
374 // a different locale, see atk_text_get_attributes and
375 // atk_image_get_image_locale.
376 // locale of the document content as a whole, or NULL if
377 // the document content does not specify a locale.
378 // RETURNS: a UTF-8 string indicating the POSIX-style LC_MESSAGES
379 char* get_locale() {
380 return atk_document_get_locale(&this);
383 // for this document, FALSE otherwise (e.g. if the document does not
384 // allow the attribute to be modified).
385 // RETURNS: TRUE if #value is successfully associated with #attribute_name
386 // <attribute_name>: a character string representing the name of the attribute whose value is being set.
387 // <attribute_value>: a string value to be associated with #attribute_name.
388 int set_attribute_value(char* attribute_name, char* attribute_value) {
389 return atk_document_set_attribute_value(&this, attribute_name, attribute_value);
391 extern (C) alias static void function (Document* this_, void* user_data=null) signal_load_complete;
393 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
394 return super_.signal_connect!name(cb, data, cf);
397 ulong signal_connect(string name:"load-complete", CB:signal_load_complete)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
398 return signal_connect_data(&this, cast(char*)"load-complete",
399 cast(GObject2.Callback)cb, data, null, cf);
401 extern (C) alias static void function (Document* this_, void* user_data=null) signal_load_stopped;
402 ulong signal_connect(string name:"load-stopped", CB:signal_load_stopped)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
403 return signal_connect_data(&this, cast(char*)"load-stopped",
404 cast(GObject2.Callback)cb, data, null, cf);
406 extern (C) alias static void function (Document* this_, void* user_data=null) signal_reload;
407 ulong signal_connect(string name:"reload", CB:signal_reload)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
408 return signal_connect_data(&this, cast(char*)"reload",
409 cast(GObject2.Callback)cb, data, null, cf);
413 struct DocumentIface {
414 GObject2.TypeInterface parent;
415 // RETURNS: a string indicating the document type
416 extern (C) char* function (Document* document) get_document_type;
417 // RETURNS: a %gpointer that points to an instance of the DOM.
418 extern (C) void* function (Document* document) get_document;
419 extern (C) char* function (Document* document) get_document_locale;
420 // Unintrospectable functionp: get_document_attributes() / ()
421 extern (C) AttributeSet* function (Document* document) get_document_attributes;
422 extern (C) char* function (Document* document, char* attribute_name) get_document_attribute_value;
423 extern (C) int function (Document* document, char* attribute_name, char* attribute_value) set_document_attribute;
424 Function pad1, pad2, pad3, pad4;
427 struct EditableText {
429 // Copy text from @start_pos up to, but not including @end_pos
430 // to the clipboard.
431 // <start_pos>: start position
432 // <end_pos>: end position
433 void copy_text(int start_pos, int end_pos) {
434 atk_editable_text_copy_text(&this, start_pos, end_pos);
437 // Copy text from @start_pos up to, but not including @end_pos
438 // to the clipboard and then delete from the widget.
439 // <start_pos>: start position
440 // <end_pos>: end position
441 void cut_text(int start_pos, int end_pos) {
442 atk_editable_text_cut_text(&this, start_pos, end_pos);
445 // Delete text @start_pos up to, but not including @end_pos.
446 // <start_pos>: start position
447 // <end_pos>: end position
448 void delete_text(int start_pos, int end_pos) {
449 atk_editable_text_delete_text(&this, start_pos, end_pos);
452 // Insert text at a given position.
453 // <string>: the text to insert
454 // <length>: the length of text to insert, in bytes
455 // <position>: The caller initializes this to the position at which to insert the text. After the call it points at the position after the newly inserted text.
456 void insert_text(char* string_, int length, int* position) {
457 atk_editable_text_insert_text(&this, string_, length, position);
460 // Paste text from clipboard to specified @position.
461 // <position>: position to paste
462 void paste_text(int position) {
463 atk_editable_text_paste_text(&this, position);
465 int set_run_attributes(AttributeSet* attrib_set, int start_offset, int end_offset) {
466 return atk_editable_text_set_run_attributes(&this, attrib_set, start_offset, end_offset);
469 // Set text contents of @text.
470 // <string>: string to set for text contents of @text
471 void set_text_contents(char* string_) {
472 atk_editable_text_set_text_contents(&this, string_);
476 struct EditableTextIface {
477 GObject2.TypeInterface parent_interface;
478 extern (C) int function (EditableText* text, AttributeSet* attrib_set, int start_offset, int end_offset) set_run_attributes;
479 // <string>: string to set for text contents of @text
480 extern (C) void function (EditableText* text, char* string_) set_text_contents;
482 // <string>: the text to insert
483 // <length>: the length of text to insert, in bytes
484 // <position>: The caller initializes this to the position at which to insert the text. After the call it points at the position after the newly inserted text.
485 extern (C) void function (EditableText* text, char* string_, int length, int* position) insert_text;
487 // <start_pos>: start position
488 // <end_pos>: end position
489 extern (C) void function (EditableText* text, int start_pos, int end_pos) copy_text;
491 // <start_pos>: start position
492 // <end_pos>: end position
493 extern (C) void function (EditableText* text, int start_pos, int end_pos) cut_text;
495 // <start_pos>: start position
496 // <end_pos>: end position
497 extern (C) void function (EditableText* text, int start_pos, int end_pos) delete_text;
498 // <position>: position to paste
499 extern (C) void function (EditableText* text, int position) paste_text;
500 Function pad1, pad2;
504 // A function which is called when an object emits a matching event,
505 // as used in #atk_add_focus_tracker.
506 // Currently the only events for which object-specific handlers are
507 // supported are events of type "focus:". Most clients of ATK will prefer to
508 // attach signal handlers for the various ATK signals instead.
509 // see atk_add_focus_tracker.
510 // <obj>: An #AtkObject instance for whom the callback will be called when the specified event (e.g. 'focus:') takes place.
511 extern (C) alias void function (Object* obj) EventListener;
514 // An #AtkEventListenerInit function is a special function that is
515 // called in order to initialize the per-object event registration system
516 // used by #AtkEventListener, if any preparation is required.
517 // see atk_focus_tracker_init.
518 extern (C) alias void function () EventListenerInit;
520 extern (C) alias void function (Object* arg_a, int arg_b) FocusHandler;
522 extern (C) alias int function (void* data) Function;
524 struct GObjectAccessible /* : Object */ {
525 alias parent this;
526 alias parent super_;
527 alias parent object;
528 Object parent;
531 // Gets the accessible object for the specified @obj.
532 // the @obj
533 // RETURNS: a #AtkObject which is the accessible object for
534 // <obj>: a #GObject
535 static Object* for_object(GObject2.Object* obj) {
536 return atk_gobject_accessible_for_object(obj);
539 // Gets the GObject for which @obj is the accessible object.
540 // the accessible object
541 // RETURNS: a #GObject which is the object for which @obj is
542 GObject2.Object* get_object() {
543 return atk_gobject_accessible_get_object(&this);
547 struct GObjectAccessibleClass {
548 ObjectClass parent_class;
549 Function pad1, pad2;
552 struct Hyperlink /* : GObject.Object */ {
553 alias parent this;
554 alias parent super_;
555 alias parent object;
556 GObject2.Object parent;
559 // Gets the index with the hypertext document at which this link ends.
560 // RETURNS: the index with the hypertext document at which this link ends
561 int get_end_index() {
562 return atk_hyperlink_get_end_index(&this);
565 // Gets the number of anchors associated with this hyperlink.
566 // RETURNS: the number of anchors associated with this hyperlink
567 int get_n_anchors() {
568 return atk_hyperlink_get_n_anchors(&this);
571 // Returns the item associated with this hyperlinks nth anchor.
572 // For instance, the returned #AtkObject will implement #AtkText
573 // if @link_ is a text hyperlink, #AtkImage if @link_ is an image
574 // hyperlink etc.
575 // Multiple anchors are primarily used by client-side image maps.
576 // i-th anchor
577 // RETURNS: an #AtkObject associated with this hyperlinks
578 // <i>: a (zero-index) integer specifying the desired anchor
579 Object* get_object(int i) {
580 return atk_hyperlink_get_object(&this, i);
583 // Gets the index with the hypertext document at which this link begins.
584 // RETURNS: the index with the hypertext document at which this link begins
585 int get_start_index() {
586 return atk_hyperlink_get_start_index(&this);
589 // Get a the URI associated with the anchor specified
590 // by @i of @link_.
591 // Multiple anchors are primarily used by client-side image maps.
592 // RETURNS: a string specifying the URI
593 // <i>: a (zero-index) integer specifying the desired anchor
594 char* /*new*/ get_uri(int i) {
595 return atk_hyperlink_get_uri(&this, i);
598 // Indicates whether the link currently displays some or all of its
599 // content inline. Ordinary HTML links will usually return
600 // %FALSE, but an inline &lt;src&gt; HTML element will return
601 // %TRUE.
602 // RETURNS: whether or not this link displays its content inline.
603 int is_inline() {
604 return atk_hyperlink_is_inline(&this);
607 // Since the document that a link is associated with may have changed
608 // this method returns %TRUE if the link is still valid (with
609 // respect to the document it references) and %FALSE otherwise.
610 // RETURNS: whether or not this link is still valid
611 int is_valid() {
612 return atk_hyperlink_is_valid(&this);
614 extern (C) alias static void function (Hyperlink* this_, void* user_data=null) signal_link_activated;
616 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
617 return super_.signal_connect!name(cb, data, cf);
620 ulong signal_connect(string name:"link-activated", CB:signal_link_activated)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
621 return signal_connect_data(&this, cast(char*)"link-activated",
622 cast(GObject2.Callback)cb, data, null, cf);
626 struct HyperlinkClass {
627 GObject2.ObjectClass parent;
629 // RETURNS: a string specifying the URI
630 // <i>: a (zero-index) integer specifying the desired anchor
631 extern (C) char* /*new*/ function (Hyperlink* link_, int i) get_uri;
633 // RETURNS: an #AtkObject associated with this hyperlinks
634 // <i>: a (zero-index) integer specifying the desired anchor
635 extern (C) Object* function (Hyperlink* link_, int i) get_object;
636 // RETURNS: the index with the hypertext document at which this link ends
637 extern (C) int function (Hyperlink* link_) get_end_index;
638 // RETURNS: the index with the hypertext document at which this link begins
639 extern (C) int function (Hyperlink* link_) get_start_index;
640 // RETURNS: whether or not this link is still valid
641 extern (C) int function (Hyperlink* link_) is_valid;
642 // RETURNS: the number of anchors associated with this hyperlink
643 extern (C) int function (Hyperlink* link_) get_n_anchors;
644 extern (C) uint function (Hyperlink* link_) link_state;
645 extern (C) int function (Hyperlink* link_) is_selected_link;
646 extern (C) void function (Hyperlink* link_) link_activated;
647 Function pad1;
650 struct HyperlinkImpl {
652 // Gets the hyperlink associated with this object.
653 // implementing AtkObject.
654 // RETURNS: an AtkHyperlink object which points to this
655 Hyperlink* /*new*/ get_hyperlink() {
656 return atk_hyperlink_impl_get_hyperlink(&this);
660 struct HyperlinkImplIface {
661 GObject2.TypeInterface parent;
662 // RETURNS: an AtkHyperlink object which points to this
663 extern (C) Hyperlink* /*new*/ function (HyperlinkImpl* impl) get_hyperlink;
664 Function pad1;
667 enum HyperlinkStateFlags {
668 INLINE = 1
670 struct Hypertext {
672 // Gets the link in this hypertext document at index
673 // index @link_index
674 // RETURNS: the link in this hypertext document at
675 // <link_index>: an integer specifying the desired link
676 Hyperlink* get_link(int link_index) {
677 return atk_hypertext_get_link(&this, link_index);
680 // Gets the index into the array of hyperlinks that is associated with
681 // the character specified by @char_index.
682 // or -1 if there is no hyperlink associated with this character.
683 // RETURNS: an index into the array of hyperlinks in @hypertext,
684 // <char_index>: a character index
685 int get_link_index(int char_index) {
686 return atk_hypertext_get_link_index(&this, char_index);
689 // Gets the number of links within this hypertext document.
690 // RETURNS: the number of links within this hypertext document
691 int get_n_links() {
692 return atk_hypertext_get_n_links(&this);
694 extern (C) alias static void function (Hypertext* this_, int object, void* user_data=null) signal_link_selected;
696 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
697 return super_.signal_connect!name(cb, data, cf);
700 ulong signal_connect(string name:"link-selected", CB:signal_link_selected)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
701 return signal_connect_data(&this, cast(char*)"link-selected",
702 cast(GObject2.Callback)cb, data, null, cf);
706 struct HypertextIface {
707 GObject2.TypeInterface parent;
709 // RETURNS: the link in this hypertext document at
710 // <link_index>: an integer specifying the desired link
711 extern (C) Hyperlink* function (Hypertext* hypertext, int link_index) get_link;
712 // RETURNS: the number of links within this hypertext document
713 extern (C) int function (Hypertext* hypertext) get_n_links;
715 // RETURNS: an index into the array of hyperlinks in @hypertext,
716 // <char_index>: a character index
717 extern (C) int function (Hypertext* hypertext, int char_index) get_link_index;
718 extern (C) void function (Hypertext* hypertext, int link_index) link_selected;
719 Function pad1, pad2, pad3;
722 struct Image {
724 // Get a textual description of this image.
725 // RETURNS: a string representing the image description
726 char* get_image_description() {
727 return atk_image_get_image_description(&this);
730 // Since ATK 1.12
731 // Returns a string corresponding to the POSIX LC_MESSAGES locale used by the image description, or NULL if the image does not specify a locale.
732 char* get_image_locale() {
733 return atk_image_get_image_locale(&this);
736 // Gets the position of the image in the form of a point specifying the
737 // images top-left corner.
738 // <x>: address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
739 // <y>: address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
740 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
741 void get_image_position(int* x, int* y, CoordType coord_type) {
742 atk_image_get_image_position(&this, x, y, coord_type);
745 // Get the width and height in pixels for the specified image.
746 // The values of @width and @height are returned as -1 if the
747 // values cannot be obtained (for instance, if the object is not onscreen).
748 // <width>: filled with the image width, or -1 if the value cannot be obtained.
749 // <height>: filled with the image height, or -1 if the value cannot be obtained.
750 void get_image_size(int* width, int* height) {
751 atk_image_get_image_size(&this, width, height);
754 // Sets the textual description for this image.
755 // not be completed.
756 // RETURNS: boolean TRUE, or FALSE if operation could
757 // <description>: a string description to set for @image
758 int set_image_description(char* description) {
759 return atk_image_set_image_description(&this, description);
763 struct ImageIface {
764 GObject2.TypeInterface parent;
766 // <x>: address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
767 // <y>: address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
768 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
769 extern (C) void function (Image* image, int* x, int* y, CoordType coord_type) get_image_position;
770 // RETURNS: a string representing the image description
771 extern (C) char* function (Image* image) get_image_description;
773 // <width>: filled with the image width, or -1 if the value cannot be obtained.
774 // <height>: filled with the image height, or -1 if the value cannot be obtained.
775 extern (C) void function (Image* image, int* width, int* height) get_image_size;
777 // RETURNS: boolean TRUE, or FALSE if operation could
778 // <description>: a string description to set for @image
779 extern (C) int function (Image* image, char* description) set_image_description;
780 extern (C) char* function (Image* image) get_image_locale;
781 Function pad1;
784 struct Implementor {
786 // Gets a reference to an object's #AtkObject implementation, if
787 // the object implements #AtkObjectIface
788 // implementation
789 // RETURNS: a reference to an object's #AtkObject
790 Object* /*new*/ ref_accessible() {
791 return atk_implementor_ref_accessible(&this);
795 struct ImplementorIface {
798 // Encapsulates information about a key event.
799 struct KeyEventStruct {
800 int type;
801 uint state, keyval;
802 int length;
803 char* string_;
804 ushort keycode;
805 uint timestamp;
808 enum KeyEventType {
809 PRESS = 0,
810 RELEASE = 1,
811 LAST_DEFINED = 2
814 // An #AtkKeySnoopFunc is a type of callback which is called whenever a key event occurs,
815 // if registered via atk_add_key_event_listener. It allows for pre-emptive
816 // interception of key events via the return code as described below.
817 // discarded without being passed to the normal GUI recipient; FALSE (zero) if the
818 // event dispatch to the client application should proceed as normal.
819 // see atk_add_key_event_listener.
820 // RETURNS: TRUE (nonzero) if the event emission should be stopped and the event
821 // <event>: an AtkKeyEventStruct containing information about the key event for which notification is being given.
822 // <func_data>: a block of data which will be passed to the event listener, on notification.
823 extern (C) alias int function (KeyEventStruct* event, void* func_data) KeySnoopFunc;
825 enum Layer {
826 INVALID = 0,
827 BACKGROUND = 1,
828 CANVAS = 2,
829 WIDGET = 3,
830 MDI = 4,
831 POPUP = 5,
832 OVERLAY = 6,
833 WINDOW = 7
835 struct Misc /* : GObject.Object */ {
836 alias parent this;
837 alias parent super_;
838 alias parent object;
839 GObject2.Object parent;
842 // Obtain the singleton instance of AtkMisc for this application.
843 // RETURNS: The singleton instance of AtkMisc for this application.
844 static Misc* get_instance() {
845 return atk_misc_get_instance();
848 // Take the thread mutex for the GUI toolkit,
849 // if one exists.
850 // (This method is implemented by the toolkit ATK implementation layer;
851 // for instance, for GTK+, GAIL implements this via GDK_THREADS_ENTER).
852 void threads_enter() {
853 atk_misc_threads_enter(&this);
856 // Release the thread mutex for the GUI toolkit,
857 // if one exists. This method, and atk_misc_threads_enter,
858 // are needed in some situations by threaded application code which
859 // services ATK requests, since fulfilling ATK requests often
860 // requires calling into the GUI toolkit. If a long-running or
861 // potentially blocking call takes place inside such a block, it should
862 // be bracketed by atk_misc_threads_leave/atk_misc_threads_enter calls.
863 // (This method is implemented by the toolkit ATK implementation layer;
864 // for instance, for GTK+, GAIL implements this via GDK_THREADS_LEAVE).
865 void threads_leave() {
866 atk_misc_threads_leave(&this);
870 struct MiscClass {
871 GObject2.ObjectClass parent;
872 extern (C) void function (Misc* misc) threads_enter;
873 extern (C) void function (Misc* misc) threads_leave;
874 void*[32] vfuncs;
877 struct NoOpObject /* : Object */ {
878 alias parent this;
879 alias parent super_;
880 alias parent object;
881 Object parent;
884 // Provides a default (non-functioning stub) #AtkObject.
885 // Application maintainers should not use this method.
886 // RETURNS: a default (non-functioning stub) #AtkObject
887 // <obj>: a #GObject
888 static NoOpObject* /*new*/ new_(GObject2.Object* obj) {
889 return atk_no_op_object_new(obj);
893 struct NoOpObjectClass {
894 ObjectClass parent_class;
897 struct NoOpObjectFactory /* : ObjectFactory */ {
898 alias parent this;
899 alias parent super_;
900 alias parent objectfactory;
901 ObjectFactory parent;
904 // Creates an instance of an #AtkObjectFactory which generates primitive
905 // (non-functioning) #AtkObjects.
906 // RETURNS: an instance of an #AtkObjectFactory
907 static NoOpObjectFactory* /*new*/ new_() {
908 return atk_no_op_object_factory_new();
912 struct NoOpObjectFactoryClass {
913 ObjectFactoryClass parent_class;
916 struct Object /* : GObject.Object */ {
917 alias parent this;
918 alias parent super_;
919 alias parent object;
920 GObject2.Object parent;
921 char* description, name;
922 Object* accessible_parent;
923 Role role;
924 RelationSet* relation_set;
925 Layer layer;
928 // Adds a relationship of the specified type with the specified target.
929 // Returns TRUE if the relationship is added.
930 // <relationship>: The #AtkRelationType of the relation
931 // <target>: The #AtkObject which is to be the target of the relation.
932 int add_relationship(RelationType relationship, Object* target) {
933 return atk_object_add_relationship(&this, relationship, target);
936 // Unintrospectable method: connect_property_change_handler() / atk_object_connect_property_change_handler()
937 // Specifies a function to be called when a property changes value.
938 // atk_object_remove_property_change_handler()
939 // RETURNS: a #guint which is the handler id used in
940 // <handler>: a function to be called when a property changes its value
941 uint connect_property_change_handler(PropertyChangeHandler* handler) {
942 return atk_object_connect_property_change_handler(&this, handler);
945 // Get a list of properties applied to this object as a whole, as an #AtkAttributeSet consisting of
946 // name-value pairs. As such these attributes may be considered weakly-typed properties or annotations,
947 // as distinct from strongly-typed object data available via other get/set methods.
948 // Not all objects have explicit "name-value pair" #AtkAttributeSet properties.
949 // properties/annotations applied to the object, or an empty set if the object
950 // has no name-value pair attributes assigned to it.
951 // RETURNS: an #AtkAttributeSet consisting of all explicit
952 AttributeSet* get_attributes() {
953 return atk_object_get_attributes(&this);
956 // Gets the accessible description of the accessible.
957 // of the accessible.
958 // RETURNS: a character string representing the accessible description
959 char* get_description() {
960 return atk_object_get_description(&this);
963 // Gets the 0-based index of this accessible in its parent; returns -1 if the
964 // accessible does not have an accessible parent.
965 // RETURNS: an integer which is the index of the accessible in its parent
966 int get_index_in_parent() {
967 return atk_object_get_index_in_parent(&this);
970 // Gets the number of accessible children of the accessible.
971 // of the accessible.
972 // RETURNS: an integer representing the number of accessible children
973 int get_n_accessible_children() {
974 return atk_object_get_n_accessible_children(&this);
977 // Gets the accessible name of the accessible.
978 // RETURNS: a character string representing the accessible name of the object.
979 char* get_name() {
980 return atk_object_get_name(&this);
983 // Gets the accessible parent of the accessible.
984 // of the accessible
985 // RETURNS: a #AtkObject representing the accessible parent
986 Object* get_parent() {
987 return atk_object_get_parent(&this);
990 // Gets the role of the accessible.
991 // RETURNS: an #AtkRole which is the role of the accessible
992 Role get_role() {
993 return atk_object_get_role(&this);
996 // This function is called when implementing subclasses of #AtkObject.
997 // It does initialization required for the new object. It is intended
998 // that this function should called only in the ..._new() functions used
999 // to create an instance of a subclass of #AtkObject
1000 // <data>: a #gpointer which identifies the object for which the AtkObject was created.
1001 void initialize(void* data) {
1002 atk_object_initialize(&this, data);
1005 // Emits a state-change signal for the specified state.
1006 // <state>: an #AtkState whose state is changed
1007 // <value>: a gboolean which indicates whether the state is being set on or off
1008 void notify_state_change(State state, int value) {
1009 atk_object_notify_state_change(&this, state, value);
1012 // Gets a reference to the specified accessible child of the object.
1013 // The accessible children are 0-based so the first accessible child is
1014 // at index 0, the second at index 1 and so on.
1015 // accessible child of the accessible.
1016 // RETURNS: an #AtkObject representing the specified
1017 // <i>: a gint representing the position of the child, starting from 0
1018 Object* /*new*/ ref_accessible_child(int i) {
1019 return atk_object_ref_accessible_child(&this, i);
1022 // Gets the #AtkRelationSet associated with the object.
1023 // of the object.
1024 // RETURNS: an #AtkRelationSet representing the relation set
1025 RelationSet* /*new*/ ref_relation_set() {
1026 return atk_object_ref_relation_set(&this);
1029 // Gets a reference to the state set of the accessible; the caller must
1030 // unreference it when it is no longer needed.
1031 // set of the accessible
1032 // RETURNS: a reference to an #AtkStateSet which is the state
1033 StateSet* /*new*/ ref_state_set() {
1034 return atk_object_ref_state_set(&this);
1037 // Removes a property change handler.
1038 // <handler_id>: a guint which identifies the handler to be removed.
1039 void remove_property_change_handler(uint handler_id) {
1040 atk_object_remove_property_change_handler(&this, handler_id);
1043 // Removes a relationship of the specified type with the specified target.
1044 // Returns TRUE if the relationship is removed.
1045 // <relationship>: The #AtkRelationType of the relation
1046 // <target>: The #AtkObject which is the target of the relation to be removed.
1047 int remove_relationship(RelationType relationship, Object* target) {
1048 return atk_object_remove_relationship(&this, relationship, target);
1051 // Sets the accessible description of the accessible.
1052 // <description>: a character string to be set as the accessible description
1053 void set_description(char* description) {
1054 atk_object_set_description(&this, description);
1057 // Sets the accessible name of the accessible.
1058 // <name>: a character string to be set as the accessible name
1059 void set_name(char* name) {
1060 atk_object_set_name(&this, name);
1063 // Sets the accessible parent of the accessible.
1064 // <parent>: an #AtkObject to be set as the accessible parent
1065 void set_parent(Object* parent) {
1066 atk_object_set_parent(&this, parent);
1069 // Sets the role of the accessible.
1070 // <role>: an #AtkRole to be set as the role
1071 void set_role(Role role) {
1072 atk_object_set_role(&this, role);
1074 extern (C) alias static void function (Object* this_, void* object, void* user_data=null) signal_active_descendant_changed;
1076 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1077 return super_.signal_connect!name(cb, data, cf);
1080 ulong signal_connect(string name:"active-descendant-changed", CB:signal_active_descendant_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1081 return signal_connect_data(&this, cast(char*)"active-descendant-changed",
1082 cast(GObject2.Callback)cb, data, null, cf);
1084 extern (C) alias static void function (Object* this_, c_uint object, void* p0, void* user_data=null) signal_children_changed;
1085 ulong signal_connect(string name:"children-changed", CB:signal_children_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1086 return signal_connect_data(&this, cast(char*)"children-changed",
1087 cast(GObject2.Callback)cb, data, null, cf);
1089 extern (C) alias static void function (Object* this_, c_int object, void* user_data=null) signal_focus_event;
1090 ulong signal_connect(string name:"focus-event", CB:signal_focus_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1091 return signal_connect_data(&this, cast(char*)"focus-event",
1092 cast(GObject2.Callback)cb, data, null, cf);
1094 extern (C) alias static void function (Object* this_, void* object, void* user_data=null) signal_property_change;
1095 ulong signal_connect(string name:"property-change", CB:signal_property_change)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1096 return signal_connect_data(&this, cast(char*)"property-change",
1097 cast(GObject2.Callback)cb, data, null, cf);
1099 extern (C) alias static void function (Object* this_, char* object, c_int p0, void* user_data=null) signal_state_change;
1100 ulong signal_connect(string name:"state-change", CB:signal_state_change)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1101 return signal_connect_data(&this, cast(char*)"state-change",
1102 cast(GObject2.Callback)cb, data, null, cf);
1104 extern (C) alias static void function (Object* this_, void* user_data=null) signal_visible_data_changed;
1105 ulong signal_connect(string name:"visible-data-changed", CB:signal_visible_data_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1106 return signal_connect_data(&this, cast(char*)"visible-data-changed",
1107 cast(GObject2.Callback)cb, data, null, cf);
1111 struct ObjectClass {
1112 GObject2.ObjectClass parent;
1113 // RETURNS: a character string representing the accessible name of the object.
1114 extern (C) char* function (Object* accessible) get_name;
1115 // RETURNS: a character string representing the accessible description
1116 extern (C) char* function (Object* accessible) get_description;
1117 // RETURNS: a #AtkObject representing the accessible parent
1118 extern (C) Object* function (Object* accessible) get_parent;
1119 extern (C) int function (Object* accessible) get_n_children;
1120 // Unintrospectable functionp: ref_child() / ()
1121 extern (C) Object* function (Object* accessible, int i) ref_child;
1122 // RETURNS: an integer which is the index of the accessible in its parent
1123 extern (C) int function (Object* accessible) get_index_in_parent;
1124 // RETURNS: an #AtkRelationSet representing the relation set
1125 extern (C) RelationSet* /*new*/ function (Object* accessible) ref_relation_set;
1126 // RETURNS: an #AtkRole which is the role of the accessible
1127 extern (C) Role function (Object* accessible) get_role;
1128 extern (C) Layer function (Object* accessible) get_layer;
1129 extern (C) int function (Object* accessible) get_mdi_zorder;
1130 // RETURNS: a reference to an #AtkStateSet which is the state
1131 extern (C) StateSet* /*new*/ function (Object* accessible) ref_state_set;
1132 // <name>: a character string to be set as the accessible name
1133 extern (C) void function (Object* accessible, char* name) set_name;
1134 // <description>: a character string to be set as the accessible description
1135 extern (C) void function (Object* accessible, char* description) set_description;
1136 // <parent>: an #AtkObject to be set as the accessible parent
1137 extern (C) void function (Object* accessible, Object* parent) set_parent;
1138 // <role>: an #AtkRole to be set as the role
1139 extern (C) void function (Object* accessible, Role role) set_role;
1141 // Unintrospectable functionp: connect_property_change_handler() / ()
1143 // RETURNS: a #guint which is the handler id used in
1144 // <handler>: a function to be called when a property changes its value
1145 extern (C) uint function (Object* accessible, PropertyChangeHandler* handler) connect_property_change_handler;
1146 // <handler_id>: a guint which identifies the handler to be removed.
1147 extern (C) void function (Object* accessible, uint handler_id) remove_property_change_handler;
1148 // <data>: a #gpointer which identifies the object for which the AtkObject was created.
1149 extern (C) void function (Object* accessible, void* data) initialize;
1150 extern (C) void function (Object* accessible, uint change_index, void* changed_child) children_changed;
1151 extern (C) void function (Object* accessible, int focus_in) focus_event;
1152 // Unintrospectable functionp: property_change() / ()
1153 extern (C) void function (Object* accessible, _PropertyValues* values) property_change;
1154 extern (C) void function (Object* accessible, char* name, int state_set) state_change;
1155 extern (C) void function (Object* accessible) visible_data_changed;
1156 extern (C) void function (Object* accessible, void** child) active_descendant_changed;
1157 // RETURNS: an #AtkAttributeSet consisting of all explicit
1158 extern (C) AttributeSet* function (Object* accessible) get_attributes;
1159 Function pad1, pad2;
1162 struct ObjectFactory /* : GObject.Object */ {
1163 alias parent this;
1164 alias parent super_;
1165 alias parent object;
1166 GObject2.Object parent;
1169 // Provides an #AtkObject that implements an accessibility interface
1170 // on behalf of @obj
1171 // interface on behalf of @obj
1172 // RETURNS: an #AtkObject that implements an accessibility
1173 // <obj>: a #GObject
1174 Object* /*new*/ create_accessible(GObject2.Object* obj) {
1175 return atk_object_factory_create_accessible(&this, obj);
1178 // Gets the GType of the accessible which is created by the factory.
1179 // The value G_TYPE_INVALID is returned if no type if found.
1180 // RETURNS: the type of the accessible which is created by the @factory.
1181 Type get_accessible_type() {
1182 return atk_object_factory_get_accessible_type(&this);
1185 // Inform @factory that it is no longer being used to create
1186 // accessibles. When called, @factory may need to inform
1187 // #AtkObjects which it has created that they need to be re-instantiated.
1188 // in object registries.
1189 void invalidate() {
1190 atk_object_factory_invalidate(&this);
1194 struct ObjectFactoryClass {
1195 GObject2.ObjectClass parent_class;
1196 // Unintrospectable functionp: create_accessible() / ()
1197 extern (C) Object* function (GObject2.Object* obj) create_accessible;
1198 extern (C) void function (ObjectFactory* factory) invalidate;
1199 extern (C) Type function () get_accessible_type;
1200 Function pad1, pad2;
1203 struct Plug /* : Object */ {
1204 alias parent this;
1205 alias parent super_;
1206 alias parent object;
1207 Object parent;
1209 static Plug* /*new*/ new_() {
1210 return atk_plug_new();
1212 char* /*new*/ get_id() {
1213 return atk_plug_get_id(&this);
1217 struct PlugClass {
1218 ObjectClass parent_class;
1219 extern (C) char* /*new*/ function (Plug* obj) get_object_id;
1222 // Unintrospectable callback: PropertyChangeHandler() / ()
1223 extern (C) alias void function (Object* arg_a, _PropertyValues* arg_b) PropertyChangeHandler;
1225 struct Rectangle {
1226 int x, y, width, height;
1229 struct Registry /* : GObject.Object */ {
1230 alias method_parent this;
1231 alias method_parent super_;
1232 alias method_parent object;
1233 GObject2.Object method_parent;
1236 // Gets an #AtkObjectFactory appropriate for creating #AtkObjects
1237 // appropriate for @type.
1238 // #AtkObjects appropriate for @type.
1239 // RETURNS: an #AtkObjectFactory appropriate for creating
1240 // <type>: a #GType with which to look up the associated #AtkObjectFactory
1241 ObjectFactory* get_factory(Type type) {
1242 return atk_registry_get_factory(&this, type);
1245 // Provides a #GType indicating the #AtkObjectFactory subclass
1246 // associated with @type.
1247 // RETURNS: a #GType associated with type @type
1248 // <type>: a #GType with which to look up the associated #AtkObjectFactory subclass
1249 Type get_factory_type(Type type) {
1250 return atk_registry_get_factory_type(&this, type);
1253 // Associate an #AtkObjectFactory subclass with a #GType. Note:
1254 // The associated @factory_type will thereafter be responsible for
1255 // the creation of new #AtkObject implementations for instances
1256 // appropriate for @type.
1257 // <type>: an #AtkObject type
1258 // <factory_type>: an #AtkObjectFactory type to associate with @type. Must implement AtkObject appropriate for @type.
1259 void set_factory_type(Type type, Type factory_type) {
1260 atk_registry_set_factory_type(&this, type, factory_type);
1264 struct Relation /* : GObject.Object */ {
1265 alias parent this;
1266 alias parent super_;
1267 alias parent object;
1268 GObject2.Object parent;
1269 void*[666] target;
1270 RelationType relationship;
1273 // Create a new relation for the specified key and the specified list
1274 // of targets. See also atk_object_add_relationship().
1275 // RETURNS: a pointer to a new #AtkRelation
1276 // <targets>: an array of pointers to #AtkObjects
1277 // <n_targets>: number of #AtkObjects pointed to by @targets
1278 // <relationship>: an #AtkRelationType with which to create the new #AtkRelation
1279 static Relation* /*new*/ new_(Object** targets, int n_targets, RelationType relationship) {
1280 return atk_relation_new(targets, n_targets, relationship);
1283 // Adds the specified AtkObject to the target for the relation, if it is
1284 // not already present. See also atk_object_add_relationship().
1285 // <target>: an #AtkObject
1286 void add_target(Object* target) {
1287 atk_relation_add_target(&this, target);
1290 // Gets the type of @relation
1291 // RETURNS: the type of @relation
1292 RelationType get_relation_type() {
1293 return atk_relation_get_relation_type(&this);
1296 // Gets the target list of @relation
1297 // RETURNS: the target list of @relation
1298 PtrArray* get_target() {
1299 return atk_relation_get_target(&this);
1302 // Remove the specified AtkObject from the target for the relation.
1303 // Returns TRUE if the removal is successful.
1304 // <target>: an #AtkObject
1305 int remove_target(Object* target) {
1306 return atk_relation_remove_target(&this, target);
1310 struct RelationClass {
1311 GObject2.ObjectClass parent;
1314 struct RelationSet /* : GObject.Object */ {
1315 alias parent this;
1316 alias parent super_;
1317 alias parent object;
1318 GObject2.Object parent;
1319 void*[666] relations;
1322 // Creates a new empty relation set.
1323 // RETURNS: a new #AtkRelationSet
1324 static RelationSet* /*new*/ new_() {
1325 return atk_relation_set_new();
1328 // Add a new relation to the current relation set if it is not already
1329 // present.
1330 // This function ref's the AtkRelation so the caller of this function
1331 // should unref it to ensure that it will be destroyed when the AtkRelationSet
1332 // is destroyed.
1333 // <relation>: an #AtkRelation
1334 void add(Relation* relation) {
1335 atk_relation_set_add(&this, relation);
1338 // Add a new relation of the specified type with the specified target to
1339 // the current relation set if the relation set does not contain a relation
1340 // of that type. If it is does contain a relation of that typea the target
1341 // is added to the relation.
1342 // <relationship>: an #AtkRelationType
1343 // <target>: an #AtkObject
1344 void add_relation_by_type(RelationType relationship, Object* target) {
1345 atk_relation_set_add_relation_by_type(&this, relationship, target);
1348 // Determines whether the relation set contains a relation that matches the
1349 // specified type.
1350 // in @set, %FALSE otherwise
1351 // RETURNS: %TRUE if @relationship is the relationship type of a relation
1352 // <relationship>: an #AtkRelationType
1353 int contains(RelationType relationship) {
1354 return atk_relation_set_contains(&this, relationship);
1357 // Determines the number of relations in a relation set.
1358 // RETURNS: an integer representing the number of relations in the set.
1359 int get_n_relations() {
1360 return atk_relation_set_get_n_relations(&this);
1363 // Determines the relation at the specified position in the relation set.
1364 // position i in the set.
1365 // RETURNS: a #AtkRelation, which is the relation at
1366 // <i>: a gint representing a position in the set, starting from 0.
1367 Relation* get_relation(int i) {
1368 return atk_relation_set_get_relation(&this, i);
1371 // Finds a relation that matches the specified type.
1372 // specified type.
1373 // RETURNS: an #AtkRelation, which is a relation matching the
1374 // <relationship>: an #AtkRelationType
1375 Relation* get_relation_by_type(RelationType relationship) {
1376 return atk_relation_set_get_relation_by_type(&this, relationship);
1379 // Removes a relation from the relation set.
1380 // This function unref's the #AtkRelation so it will be deleted unless there
1381 // is another reference to it.
1382 // <relation>: an #AtkRelation
1383 void remove(Relation* relation) {
1384 atk_relation_set_remove(&this, relation);
1388 struct RelationSetClass {
1389 GObject2.ObjectClass parent;
1390 Function pad1, pad2;
1393 enum RelationType {
1394 NULL = 0,
1395 CONTROLLED_BY = 1,
1396 CONTROLLER_FOR = 2,
1397 LABEL_FOR = 3,
1398 LABELLED_BY = 4,
1399 MEMBER_OF = 5,
1400 NODE_CHILD_OF = 6,
1401 FLOWS_TO = 7,
1402 FLOWS_FROM = 8,
1403 SUBWINDOW_OF = 9,
1404 EMBEDS = 10,
1405 EMBEDDED_BY = 11,
1406 POPUP_FOR = 12,
1407 PARENT_WINDOW_OF = 13,
1408 DESCRIBED_BY = 14,
1409 DESCRIPTION_FOR = 15,
1410 NODE_PARENT_OF = 16,
1411 LAST_DEFINED = 17
1413 enum Role {
1414 INVALID = 0,
1415 ACCEL_LABEL = 1,
1416 ALERT = 2,
1417 ANIMATION = 3,
1418 ARROW = 4,
1419 CALENDAR = 5,
1420 CANVAS = 6,
1421 CHECK_BOX = 7,
1422 CHECK_MENU_ITEM = 8,
1423 COLOR_CHOOSER = 9,
1424 COLUMN_HEADER = 10,
1425 COMBO_BOX = 11,
1426 DATE_EDITOR = 12,
1427 DESKTOP_ICON = 13,
1428 DESKTOP_FRAME = 14,
1429 DIAL = 15,
1430 DIALOG = 16,
1431 DIRECTORY_PANE = 17,
1432 DRAWING_AREA = 18,
1433 FILE_CHOOSER = 19,
1434 FILLER = 20,
1435 FONT_CHOOSER = 21,
1436 FRAME = 22,
1437 GLASS_PANE = 23,
1438 HTML_CONTAINER = 24,
1439 ICON = 25,
1440 IMAGE = 26,
1441 INTERNAL_FRAME = 27,
1442 LABEL = 28,
1443 LAYERED_PANE = 29,
1444 LIST = 30,
1445 LIST_ITEM = 31,
1446 MENU = 32,
1447 MENU_BAR = 33,
1448 MENU_ITEM = 34,
1449 OPTION_PANE = 35,
1450 PAGE_TAB = 36,
1451 PAGE_TAB_LIST = 37,
1452 PANEL = 38,
1453 PASSWORD_TEXT = 39,
1454 POPUP_MENU = 40,
1455 PROGRESS_BAR = 41,
1456 PUSH_BUTTON = 42,
1457 RADIO_BUTTON = 43,
1458 RADIO_MENU_ITEM = 44,
1459 ROOT_PANE = 45,
1460 ROW_HEADER = 46,
1461 SCROLL_BAR = 47,
1462 SCROLL_PANE = 48,
1463 SEPARATOR = 49,
1464 SLIDER = 50,
1465 SPLIT_PANE = 51,
1466 SPIN_BUTTON = 52,
1467 STATUSBAR = 53,
1468 TABLE = 54,
1469 TABLE_CELL = 55,
1470 TABLE_COLUMN_HEADER = 56,
1471 TABLE_ROW_HEADER = 57,
1472 TEAR_OFF_MENU_ITEM = 58,
1473 TERMINAL = 59,
1474 TEXT = 60,
1475 TOGGLE_BUTTON = 61,
1476 TOOL_BAR = 62,
1477 TOOL_TIP = 63,
1478 TREE = 64,
1479 TREE_TABLE = 65,
1480 UNKNOWN = 66,
1481 VIEWPORT = 67,
1482 WINDOW = 68,
1483 HEADER = 69,
1484 FOOTER = 70,
1485 PARAGRAPH = 71,
1486 RULER = 72,
1487 APPLICATION = 73,
1488 AUTOCOMPLETE = 74,
1489 EDITBAR = 75,
1490 EMBEDDED = 76,
1491 ENTRY = 77,
1492 CHART = 78,
1493 CAPTION = 79,
1494 DOCUMENT_FRAME = 80,
1495 HEADING = 81,
1496 PAGE = 82,
1497 SECTION = 83,
1498 REDUNDANT_OBJECT = 84,
1499 FORM = 85,
1500 LINK = 86,
1501 INPUT_METHOD_WINDOW = 87,
1502 TABLE_ROW = 88,
1503 TREE_ITEM = 89,
1504 DOCUMENT_SPREADSHEET = 90,
1505 DOCUMENT_PRESENTATION = 91,
1506 DOCUMENT_TEXT = 92,
1507 DOCUMENT_WEB = 93,
1508 DOCUMENT_EMAIL = 94,
1509 COMMENT = 95,
1510 LIST_BOX = 96,
1511 GROUPING = 97,
1512 IMAGE_MAP = 98,
1513 NOTIFICATION = 99,
1514 INFO_BAR = 100,
1515 LAST_DEFINED = 101
1517 struct Selection {
1519 // Adds the specified accessible child of the object to the
1520 // object's selection.
1521 // RETURNS: TRUE if success, FALSE otherwise.
1522 // <i>: a #gint specifying the child index.
1523 int add_selection(int i) {
1524 return atk_selection_add_selection(&this, i);
1527 // Clears the selection in the object so that no children in the object
1528 // are selected.
1529 // RETURNS: TRUE if success, FALSE otherwise.
1530 int clear_selection() {
1531 return atk_selection_clear_selection(&this);
1534 // Gets the number of accessible children currently selected.
1535 // indication of whether AtkSelectionIface is implemented, they should
1536 // use type checking/interface checking macros or the
1537 // atk_get_accessible_value() convenience method.
1538 // if @selection does not implement this interface.
1539 // RETURNS: a gint representing the number of items selected, or 0
1540 int get_selection_count() {
1541 return atk_selection_get_selection_count(&this);
1544 // Determines if the current child of this object is selected
1545 // indication of whether AtkSelectionIface is implemented, they should
1546 // use type checking/interface checking macros or the
1547 // atk_get_accessible_value() convenience method.
1548 // if @selection does not implement this interface.
1549 // RETURNS: a gboolean representing the specified child is selected, or 0
1550 // <i>: a #gint specifying the child index.
1551 int is_child_selected(int i) {
1552 return atk_selection_is_child_selected(&this, i);
1555 // Gets a reference to the accessible object representing the specified
1556 // selected child of the object.
1557 // indication of whether AtkSelectionIface is implemented, they should
1558 // use type checking/interface checking macros or the
1559 // atk_get_accessible_value() convenience method.
1560 // accessible , or %NULL if @selection does not implement this interface.
1561 // RETURNS: an #AtkObject representing the selected
1562 // <i>: a #gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
1563 Object* /*new*/ ref_selection(int i) {
1564 return atk_selection_ref_selection(&this, i);
1567 // Removes the specified child of the object from the object's selection.
1568 // RETURNS: TRUE if success, FALSE otherwise.
1569 // <i>: a #gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
1570 int remove_selection(int i) {
1571 return atk_selection_remove_selection(&this, i);
1574 // Causes every child of the object to be selected if the object
1575 // supports multiple selections.
1576 // RETURNS: TRUE if success, FALSE otherwise.
1577 int select_all_selection() {
1578 return atk_selection_select_all_selection(&this);
1580 extern (C) alias static void function (Selection* this_, void* user_data=null) signal_selection_changed;
1582 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1583 return super_.signal_connect!name(cb, data, cf);
1586 ulong signal_connect(string name:"selection-changed", CB:signal_selection_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1587 return signal_connect_data(&this, cast(char*)"selection-changed",
1588 cast(GObject2.Callback)cb, data, null, cf);
1592 struct SelectionIface {
1593 GObject2.TypeInterface parent;
1595 // RETURNS: TRUE if success, FALSE otherwise.
1596 // <i>: a #gint specifying the child index.
1597 extern (C) int function (Selection* selection, int i) add_selection;
1598 // RETURNS: TRUE if success, FALSE otherwise.
1599 extern (C) int function (Selection* selection) clear_selection;
1601 // RETURNS: an #AtkObject representing the selected
1602 // <i>: a #gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
1603 extern (C) Object* /*new*/ function (Selection* selection, int i) ref_selection;
1604 // RETURNS: a gint representing the number of items selected, or 0
1605 extern (C) int function (Selection* selection) get_selection_count;
1607 // RETURNS: a gboolean representing the specified child is selected, or 0
1608 // <i>: a #gint specifying the child index.
1609 extern (C) int function (Selection* selection, int i) is_child_selected;
1611 // RETURNS: TRUE if success, FALSE otherwise.
1612 // <i>: a #gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
1613 extern (C) int function (Selection* selection, int i) remove_selection;
1614 // RETURNS: TRUE if success, FALSE otherwise.
1615 extern (C) int function (Selection* selection) select_all_selection;
1616 extern (C) void function (Selection* selection) selection_changed;
1617 Function pad1, pad2;
1620 struct Socket /* : Object */ {
1621 alias parent this;
1622 alias parent super_;
1623 alias parent object;
1624 Object parent;
1625 private char* embedded_plug_id;
1627 static Socket* /*new*/ new_() {
1628 return atk_socket_new();
1631 // Embeds the children of an #AtkPlug as the children of the #AtkSocket. The
1632 // plug may be in the same process or in a different process.
1633 // THe class item used by this function should be filled in by the IPC layer
1634 // (ie, at-spi2-atk). The implementor of the AtkSocket should call this
1635 // function and pass the id for the plug as returned by atk_plug_get_id.
1636 // It is the responsibility of the application to pass the plug id on to
1637 // the process implementing the AtkSocket as needed.
1638 // <plug_id>: the ID of an #AtkPlug
1639 void embed(char* plug_id) {
1640 atk_socket_embed(&this, plug_id);
1643 // Determines whether or not the socket has an embedded plug.
1644 // RETURNS: TRUE if a plug is embedded in the socket
1645 int is_occupied() {
1646 return atk_socket_is_occupied(&this);
1650 struct SocketClass {
1651 ObjectClass parent_class;
1652 // <plug_id>: the ID of an #AtkPlug
1653 extern (C) void function (Socket* obj, char* plug_id) embed;
1656 struct StateSet /* : GObject.Object */ {
1657 alias parent this;
1658 alias parent super_;
1659 alias parent object;
1660 GObject2.Object parent;
1663 // Creates a new empty state set.
1664 // RETURNS: a new #AtkStateSet
1665 static StateSet* /*new*/ new_() {
1666 return atk_state_set_new();
1669 // Add a new state for the specified type to the current state set if
1670 // it is not already present.
1671 // RETURNS: %TRUE if the state for @type is not already in @set.
1672 // <type>: an #AtkStateType
1673 int add_state(StateType type) {
1674 return atk_state_set_add_state(&this, type);
1677 // Add the states for the specified types to the current state set.
1678 // <types>: an array of #AtkStateType
1679 // <n_types>: The number of elements in the array
1680 void add_states(StateType* types, int n_types) {
1681 atk_state_set_add_states(&this, types, n_types);
1684 // Constructs the intersection of the two sets, returning %NULL if the
1685 // intersection is empty.
1686 // the two sets.
1687 // RETURNS: a new #AtkStateSet which is the intersection of
1688 // <compare_set>: another #AtkStateSet
1689 StateSet* /*new*/ and_sets(StateSet* compare_set) {
1690 return atk_state_set_and_sets(&this, compare_set);
1692 // Removes all states from the state set.
1693 void clear_states() {
1694 atk_state_set_clear_states(&this);
1697 // Checks whether the state for the specified type is in the specified set.
1698 // RETURNS: %TRUE if @type is the state type is in @set.
1699 // <type>: an #AtkStateType
1700 int contains_state(StateType type) {
1701 return atk_state_set_contains_state(&this, type);
1704 // Checks whether the states for all the specified types are in the
1705 // specified set.
1706 // RETURNS: %TRUE if all the states for @type are in @set.
1707 // <types>: an array of #AtkStateType
1708 // <n_types>: The number of elements in the array
1709 int contains_states(StateType* types, int n_types) {
1710 return atk_state_set_contains_states(&this, types, n_types);
1713 // Checks whether the state set is empty, i.e. has no states set.
1714 // RETURNS: %TRUE if @set has no states set, otherwise %FALSE
1715 int is_empty() {
1716 return atk_state_set_is_empty(&this);
1719 // Constructs the union of the two sets.
1720 // sets, returning %NULL is empty.
1721 // RETURNS: a new #AtkStateSet which is the union of the two
1722 // <compare_set>: another #AtkStateSet
1723 StateSet* /*new*/ or_sets(StateSet* compare_set) {
1724 return atk_state_set_or_sets(&this, compare_set);
1727 // Removes the state for the specified type from the state set.
1728 // RETURNS: %TRUE if @type was the state type is in @set.
1729 // <type>: an #AtkType
1730 int remove_state(StateType type) {
1731 return atk_state_set_remove_state(&this, type);
1734 // Constructs the exclusive-or of the two sets, returning %NULL is empty.
1735 // The set returned by this operation contains the states in exactly
1736 // one of the two sets.
1737 // which are in exactly one of the two sets.
1738 // RETURNS: a new #AtkStateSet which contains the states
1739 // <compare_set>: another #AtkStateSet
1740 StateSet* /*new*/ xor_sets(StateSet* compare_set) {
1741 return atk_state_set_xor_sets(&this, compare_set);
1745 struct StateSetClass {
1746 GObject2.ObjectClass parent;
1749 enum StateType {
1750 INVALID = 0,
1751 ACTIVE = 1,
1752 ARMED = 2,
1753 BUSY = 3,
1754 CHECKED = 4,
1755 DEFUNCT = 5,
1756 EDITABLE = 6,
1757 ENABLED = 7,
1758 EXPANDABLE = 8,
1759 EXPANDED = 9,
1760 FOCUSABLE = 10,
1761 FOCUSED = 11,
1762 HORIZONTAL = 12,
1763 ICONIFIED = 13,
1764 MODAL = 14,
1765 MULTI_LINE = 15,
1766 MULTISELECTABLE = 16,
1767 OPAQUE = 17,
1768 PRESSED = 18,
1769 RESIZABLE = 19,
1770 SELECTABLE = 20,
1771 SELECTED = 21,
1772 SENSITIVE = 22,
1773 SHOWING = 23,
1774 SINGLE_LINE = 24,
1775 STALE = 25,
1776 TRANSIENT = 26,
1777 VERTICAL = 27,
1778 VISIBLE = 28,
1779 MANAGES_DESCENDANTS = 29,
1780 INDETERMINATE = 30,
1781 TRUNCATED = 31,
1782 REQUIRED = 32,
1783 INVALID_ENTRY = 33,
1784 SUPPORTS_AUTOCOMPLETION = 34,
1785 SELECTABLE_TEXT = 35,
1786 DEFAULT = 36,
1787 ANIMATED = 37,
1788 VISITED = 38,
1789 LAST_DEFINED = 39
1791 struct StreamableContent {
1793 // Gets the character string of the specified mime type. The first mime
1794 // type is at position 0, the second at position 1, and so on.
1795 // should not free the character string.
1796 // <i>: a gint representing the position of the mime type starting from 0
1797 char* get_mime_type(int i) {
1798 return atk_streamable_content_get_mime_type(&this, i);
1801 // Gets the number of mime types supported by this object.
1802 // RETURNS: a gint which is the number of mime types supported by the object.
1803 int get_n_mime_types() {
1804 return atk_streamable_content_get_n_mime_types(&this);
1807 // Unintrospectable method: get_stream() / atk_streamable_content_get_stream()
1808 // Gets the content in the specified mime type.
1809 // specified mime type.
1810 // RETURNS: A #GIOChannel which contains the content in the
1811 // <mime_type>: a gchar* representing the mime type
1812 GLib2.IOChannel* /*new*/ get_stream(char* mime_type) {
1813 return atk_streamable_content_get_stream(&this, mime_type);
1816 // Get a string representing a URI in IETF standard format
1817 // (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content
1818 // may be streamed in the specified mime-type, if one is available.
1819 // If mime_type is NULL, the URI for the default (and possibly only) mime-type is
1820 // returned.
1821 // Note that it is possible for get_uri to return NULL but for
1822 // get_stream to work nonetheless, since not all GIOChannels connect to URIs.
1823 // can be constructed.
1824 // RETURNS: Returns a string representing a URI, or NULL if no corresponding URI
1825 // <mime_type>: a gchar* representing the mime type, or NULL to request a URI for the default mime type.
1826 char* get_uri(char* mime_type) {
1827 return atk_streamable_content_get_uri(&this, mime_type);
1831 struct StreamableContentIface {
1832 GObject2.TypeInterface parent;
1833 // RETURNS: a gint which is the number of mime types supported by the object.
1834 extern (C) int function (StreamableContent* streamable) get_n_mime_types;
1835 // <i>: a gint representing the position of the mime type starting from 0
1836 extern (C) char* function (StreamableContent* streamable, int i) get_mime_type;
1838 // Unintrospectable functionp: get_stream() / ()
1840 // RETURNS: A #GIOChannel which contains the content in the
1841 // <mime_type>: a gchar* representing the mime type
1842 extern (C) GLib2.IOChannel* /*new*/ function (StreamableContent* streamable, char* mime_type) get_stream;
1844 // RETURNS: Returns a string representing a URI, or NULL if no corresponding URI
1845 // <mime_type>: a gchar* representing the mime type, or NULL to request a URI for the default mime type.
1846 extern (C) char* function (StreamableContent* streamable, char* mime_type) get_uri;
1847 Function pad1, pad2, pad3;
1850 struct Table {
1852 // Adds the specified @column to the selection.
1853 // the selection, or 0 if value does not implement this interface.
1854 // RETURNS: a gboolean representing if the column was successfully added to
1855 // <column>: a #gint representing a column in @table
1856 int add_column_selection(int column) {
1857 return atk_table_add_column_selection(&this, column);
1860 // Adds the specified @row to the selection.
1861 // or 0 if value does not implement this interface.
1862 // RETURNS: a gboolean representing if row was successfully added to selection,
1863 // <row>: a #gint representing a row in @table
1864 int add_row_selection(int row) {
1865 return atk_table_add_row_selection(&this, row);
1868 // Gets the caption for the @table.
1869 // %NULL if value does not implement this interface.
1870 // RETURNS: a AtkObject* representing the table caption, or
1871 Object* get_caption() {
1872 return atk_table_get_caption(&this);
1875 // Gets a #gint representing the column at the specified @index_.
1876 // or -1 if the table does not implement this interface
1877 // RETURNS: a gint representing the column at the specified index,
1878 // <index_>: a #gint representing an index in @table
1879 int get_column_at_index(int index_) {
1880 return atk_table_get_column_at_index(&this, index_);
1883 // Gets the description text of the specified @column in the table
1884 // if value does not implement this interface.
1885 // RETURNS: a gchar* representing the column description, or %NULL
1886 // <column>: a #gint representing a column in @table
1887 char* get_column_description(int column) {
1888 return atk_table_get_column_description(&this, column);
1891 // Gets the number of columns occupied by the accessible object
1892 // at the specified @row and @column in the @table.
1893 // if value does not implement this interface.
1894 // RETURNS: a gint representing the column extent at specified position, or 0
1895 // <row>: a #gint representing a row in @table
1896 // <column>: a #gint representing a column in @table
1897 int get_column_extent_at(int row, int column) {
1898 return atk_table_get_column_extent_at(&this, row, column);
1901 // Gets the column header of a specified column in an accessible table.
1902 // header, or %NULL if value does not implement this interface.
1903 // RETURNS: a AtkObject* representing the specified column
1904 // <column>: a #gint representing a column in the table
1905 Object* get_column_header(int column) {
1906 return atk_table_get_column_header(&this, column);
1909 // Gets a #gint representing the index at the specified @row and @column.
1910 // The value -1 is returned if the object at row,column is not a child
1911 // of table or table does not implement this interface.
1912 // RETURNS: a #gint representing the index at specified position.
1913 // <row>: a #gint representing a row in @table
1914 // <column>: a #gint representing a column in @table
1915 int get_index_at(int row, int column) {
1916 return atk_table_get_index_at(&this, row, column);
1919 // Gets the number of columns in the table.
1920 // if value does not implement this interface.
1921 // RETURNS: a gint representing the number of columns, or 0
1922 int get_n_columns() {
1923 return atk_table_get_n_columns(&this);
1926 // Gets the number of rows in the table.
1927 // if value does not implement this interface.
1928 // RETURNS: a gint representing the number of rows, or 0
1929 int get_n_rows() {
1930 return atk_table_get_n_rows(&this);
1933 // Gets a #gint representing the row at the specified @index_.
1934 // or -1 if the table does not implement this interface
1935 // RETURNS: a gint representing the row at the specified index,
1936 // <index_>: a #gint representing an index in @table
1937 int get_row_at_index(int index_) {
1938 return atk_table_get_row_at_index(&this, index_);
1941 // Gets the description text of the specified row in the table
1942 // if value does not implement this interface.
1943 // RETURNS: a gchar* representing the row description, or %NULL
1944 // <row>: a #gint representing a row in @table
1945 char* get_row_description(int row) {
1946 return atk_table_get_row_description(&this, row);
1949 // Gets the number of rows occupied by the accessible object
1950 // at a specified @row and @column in the @table.
1951 // if value does not implement this interface.
1952 // RETURNS: a gint representing the row extent at specified position, or 0
1953 // <row>: a #gint representing a row in @table
1954 // <column>: a #gint representing a column in @table
1955 int get_row_extent_at(int row, int column) {
1956 return atk_table_get_row_extent_at(&this, row, column);
1959 // Gets the row header of a specified row in an accessible table.
1960 // header, or %NULL if value does not implement this interface.
1961 // RETURNS: a AtkObject* representing the specified row
1962 // <row>: a #gint representing a row in the table
1963 Object* get_row_header(int row) {
1964 return atk_table_get_row_header(&this, row);
1967 // Gets the selected columns of the table by initializing **selected with
1968 // the selected column numbers. This array should be freed by the caller.
1969 // or %0 if value does not implement this interface.
1970 // RETURNS: a gint representing the number of selected columns,
1971 // <selected>: a #gint** that is to contain the selected columns numbers
1972 int get_selected_columns(int** selected) {
1973 return atk_table_get_selected_columns(&this, selected);
1976 // Gets the selected rows of the table by initializing **selected with
1977 // the selected row numbers. This array should be freed by the caller.
1978 // or zero if value does not implement this interface.
1979 // RETURNS: a gint representing the number of selected rows,
1980 // <selected>: a #gint** that is to contain the selected row numbers
1981 int get_selected_rows(int** selected) {
1982 return atk_table_get_selected_rows(&this, selected);
1985 // Gets the summary description of the table.
1986 // of the table, or zero if value does not implement this interface.
1987 // RETURNS: a AtkObject* representing a summary description
1988 Object* /*new*/ get_summary() {
1989 return atk_table_get_summary(&this);
1992 // Gets a boolean value indicating whether the specified @column
1993 // is selected
1994 // if value does not implement this interface.
1995 // RETURNS: a gboolean representing if the column is selected, or 0
1996 // <column>: a #gint representing a column in @table
1997 int is_column_selected(int column) {
1998 return atk_table_is_column_selected(&this, column);
2001 // Gets a boolean value indicating whether the specified @row
2002 // is selected
2003 // if value does not implement this interface.
2004 // RETURNS: a gboolean representing if the row is selected, or 0
2005 // <row>: a #gint representing a row in @table
2006 int is_row_selected(int row) {
2007 return atk_table_is_row_selected(&this, row);
2010 // Gets a boolean value indicating whether the accessible object
2011 // at the specified @row and @column is selected
2012 // if value does not implement this interface.
2013 // RETURNS: a gboolean representing if the cell is selected, or 0
2014 // <row>: a #gint representing a row in @table
2015 // <column>: a #gint representing a column in @table
2016 int is_selected(int row, int column) {
2017 return atk_table_is_selected(&this, row, column);
2020 // Get a reference to the table cell at @row, @column.
2021 // accessible
2022 // RETURNS: a AtkObject* representing the referred to
2023 // <row>: a #gint representing a row in @table
2024 // <column>: a #gint representing a column in @table
2025 Object* /*new*/ ref_at(int row, int column) {
2026 return atk_table_ref_at(&this, row, column);
2029 // Adds the specified @column to the selection.
2030 // the selection, or 0 if value does not implement this interface.
2031 // RETURNS: a gboolean representing if the column was successfully removed from
2032 // <column>: a #gint representing a column in @table
2033 int remove_column_selection(int column) {
2034 return atk_table_remove_column_selection(&this, column);
2037 // Removes the specified @row from the selection.
2038 // the selection, or 0 if value does not implement this interface.
2039 // RETURNS: a gboolean representing if the row was successfully removed from
2040 // <row>: a #gint representing a row in @table
2041 int remove_row_selection(int row) {
2042 return atk_table_remove_row_selection(&this, row);
2045 // Sets the caption for the table.
2046 // <caption>: a #AtkObject representing the caption to set for @table
2047 void set_caption(Object* caption) {
2048 atk_table_set_caption(&this, caption);
2051 // Sets the description text for the specified @column of the @table.
2052 // <column>: a #gint representing a column in @table
2053 // <description>: a #gchar representing the description text to set for the specified @column of the @table
2054 void set_column_description(int column, char* description) {
2055 atk_table_set_column_description(&this, column, description);
2058 // Sets the specified column header to @header.
2059 // <column>: a #gint representing a column in @table
2060 // <header>: an #AtkTable
2061 void set_column_header(int column, Object* header) {
2062 atk_table_set_column_header(&this, column, header);
2065 // Sets the description text for the specified @row of @table.
2066 // <row>: a #gint representing a row in @table
2067 // <description>: a #gchar representing the description text to set for the specified @row of @table
2068 void set_row_description(int row, char* description) {
2069 atk_table_set_row_description(&this, row, description);
2072 // Sets the specified row header to @header.
2073 // <row>: a #gint representing a row in @table
2074 // <header>: an #AtkTable
2075 void set_row_header(int row, Object* header) {
2076 atk_table_set_row_header(&this, row, header);
2079 // Sets the summary description of the table.
2080 // <accessible>: an #AtkObject representing the summary description to set for @table
2081 void set_summary(Object* accessible) {
2082 atk_table_set_summary(&this, accessible);
2084 extern (C) alias static void function (Table* this_, int object, int p0, void* user_data=null) signal_column_deleted;
2086 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2087 return super_.signal_connect!name(cb, data, cf);
2090 ulong signal_connect(string name:"column-deleted", CB:signal_column_deleted)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2091 return signal_connect_data(&this, cast(char*)"column-deleted",
2092 cast(GObject2.Callback)cb, data, null, cf);
2094 extern (C) alias static void function (Table* this_, int object, int p0, void* user_data=null) signal_column_inserted;
2095 ulong signal_connect(string name:"column-inserted", CB:signal_column_inserted)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2096 return signal_connect_data(&this, cast(char*)"column-inserted",
2097 cast(GObject2.Callback)cb, data, null, cf);
2099 extern (C) alias static void function (Table* this_, void* user_data=null) signal_column_reordered;
2100 ulong signal_connect(string name:"column-reordered", CB:signal_column_reordered)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2101 return signal_connect_data(&this, cast(char*)"column-reordered",
2102 cast(GObject2.Callback)cb, data, null, cf);
2104 extern (C) alias static void function (Table* this_, void* user_data=null) signal_model_changed;
2105 ulong signal_connect(string name:"model-changed", CB:signal_model_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2106 return signal_connect_data(&this, cast(char*)"model-changed",
2107 cast(GObject2.Callback)cb, data, null, cf);
2109 extern (C) alias static void function (Table* this_, int object, int p0, void* user_data=null) signal_row_deleted;
2110 ulong signal_connect(string name:"row-deleted", CB:signal_row_deleted)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2111 return signal_connect_data(&this, cast(char*)"row-deleted",
2112 cast(GObject2.Callback)cb, data, null, cf);
2114 extern (C) alias static void function (Table* this_, int object, int p0, void* user_data=null) signal_row_inserted;
2115 ulong signal_connect(string name:"row-inserted", CB:signal_row_inserted)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2116 return signal_connect_data(&this, cast(char*)"row-inserted",
2117 cast(GObject2.Callback)cb, data, null, cf);
2119 extern (C) alias static void function (Table* this_, void* user_data=null) signal_row_reordered;
2120 ulong signal_connect(string name:"row-reordered", CB:signal_row_reordered)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2121 return signal_connect_data(&this, cast(char*)"row-reordered",
2122 cast(GObject2.Callback)cb, data, null, cf);
2126 struct TableIface {
2127 GObject2.TypeInterface parent;
2129 // RETURNS: a AtkObject* representing the referred to
2130 // <row>: a #gint representing a row in @table
2131 // <column>: a #gint representing a column in @table
2132 extern (C) Object* /*new*/ function (Table* table, int row, int column) ref_at;
2134 // RETURNS: a #gint representing the index at specified position.
2135 // <row>: a #gint representing a row in @table
2136 // <column>: a #gint representing a column in @table
2137 extern (C) int function (Table* table, int row, int column) get_index_at;
2139 // RETURNS: a gint representing the column at the specified index,
2140 // <index_>: a #gint representing an index in @table
2141 extern (C) int function (Table* table, int index_) get_column_at_index;
2143 // RETURNS: a gint representing the row at the specified index,
2144 // <index_>: a #gint representing an index in @table
2145 extern (C) int function (Table* table, int index_) get_row_at_index;
2146 // RETURNS: a gint representing the number of columns, or 0
2147 extern (C) int function (Table* table) get_n_columns;
2148 // RETURNS: a gint representing the number of rows, or 0
2149 extern (C) int function (Table* table) get_n_rows;
2151 // RETURNS: a gint representing the column extent at specified position, or 0
2152 // <row>: a #gint representing a row in @table
2153 // <column>: a #gint representing a column in @table
2154 extern (C) int function (Table* table, int row, int column) get_column_extent_at;
2156 // RETURNS: a gint representing the row extent at specified position, or 0
2157 // <row>: a #gint representing a row in @table
2158 // <column>: a #gint representing a column in @table
2159 extern (C) int function (Table* table, int row, int column) get_row_extent_at;
2160 // RETURNS: a AtkObject* representing the table caption, or
2161 extern (C) Object* function (Table* table) get_caption;
2163 // RETURNS: a gchar* representing the column description, or %NULL
2164 // <column>: a #gint representing a column in @table
2165 extern (C) char* function (Table* table, int column) get_column_description;
2167 // RETURNS: a AtkObject* representing the specified column
2168 // <column>: a #gint representing a column in the table
2169 extern (C) Object* function (Table* table, int column) get_column_header;
2171 // RETURNS: a gchar* representing the row description, or %NULL
2172 // <row>: a #gint representing a row in @table
2173 extern (C) char* function (Table* table, int row) get_row_description;
2175 // RETURNS: a AtkObject* representing the specified row
2176 // <row>: a #gint representing a row in the table
2177 extern (C) Object* function (Table* table, int row) get_row_header;
2178 // RETURNS: a AtkObject* representing a summary description
2179 extern (C) Object* /*new*/ function (Table* table) get_summary;
2180 // <caption>: a #AtkObject representing the caption to set for @table
2181 extern (C) void function (Table* table, Object* caption) set_caption;
2183 // <column>: a #gint representing a column in @table
2184 // <description>: a #gchar representing the description text to set for the specified @column of the @table
2185 extern (C) void function (Table* table, int column, char* description) set_column_description;
2187 // <column>: a #gint representing a column in @table
2188 // <header>: an #AtkTable
2189 extern (C) void function (Table* table, int column, Object* header) set_column_header;
2191 // <row>: a #gint representing a row in @table
2192 // <description>: a #gchar representing the description text to set for the specified @row of @table
2193 extern (C) void function (Table* table, int row, char* description) set_row_description;
2195 // <row>: a #gint representing a row in @table
2196 // <header>: an #AtkTable
2197 extern (C) void function (Table* table, int row, Object* header) set_row_header;
2198 // <accessible>: an #AtkObject representing the summary description to set for @table
2199 extern (C) void function (Table* table, Object* accessible) set_summary;
2201 // RETURNS: a gint representing the number of selected columns,
2202 // <selected>: a #gint** that is to contain the selected columns numbers
2203 extern (C) int function (Table* table, int** selected) get_selected_columns;
2205 // RETURNS: a gint representing the number of selected rows,
2206 // <selected>: a #gint** that is to contain the selected row numbers
2207 extern (C) int function (Table* table, int** selected) get_selected_rows;
2209 // RETURNS: a gboolean representing if the column is selected, or 0
2210 // <column>: a #gint representing a column in @table
2211 extern (C) int function (Table* table, int column) is_column_selected;
2213 // RETURNS: a gboolean representing if the row is selected, or 0
2214 // <row>: a #gint representing a row in @table
2215 extern (C) int function (Table* table, int row) is_row_selected;
2217 // RETURNS: a gboolean representing if the cell is selected, or 0
2218 // <row>: a #gint representing a row in @table
2219 // <column>: a #gint representing a column in @table
2220 extern (C) int function (Table* table, int row, int column) is_selected;
2222 // RETURNS: a gboolean representing if row was successfully added to selection,
2223 // <row>: a #gint representing a row in @table
2224 extern (C) int function (Table* table, int row) add_row_selection;
2226 // RETURNS: a gboolean representing if the row was successfully removed from
2227 // <row>: a #gint representing a row in @table
2228 extern (C) int function (Table* table, int row) remove_row_selection;
2230 // RETURNS: a gboolean representing if the column was successfully added to
2231 // <column>: a #gint representing a column in @table
2232 extern (C) int function (Table* table, int column) add_column_selection;
2234 // RETURNS: a gboolean representing if the column was successfully removed from
2235 // <column>: a #gint representing a column in @table
2236 extern (C) int function (Table* table, int column) remove_column_selection;
2237 extern (C) void function (Table* table, int row, int num_inserted) row_inserted;
2238 extern (C) void function (Table* table, int column, int num_inserted) column_inserted;
2239 extern (C) void function (Table* table, int row, int num_deleted) row_deleted;
2240 extern (C) void function (Table* table, int column, int num_deleted) column_deleted;
2241 extern (C) void function (Table* table) row_reordered;
2242 extern (C) void function (Table* table) column_reordered;
2243 extern (C) void function (Table* table) model_changed;
2244 Function pad1, pad2, pad3, pad4;
2247 struct Text {
2249 // Adds a selection bounded by the specified offsets.
2250 // RETURNS: %TRUE if success, %FALSE otherwise
2251 // <start_offset>: the start position of the selected region
2252 // <end_offset>: the offset of the first character after the selected region.
2253 int add_selection(int start_offset, int end_offset) {
2254 return atk_text_add_selection(&this, start_offset, end_offset);
2257 // Get the ranges of text in the specified bounding box.
2258 // element of the array returned by this function will be NULL.
2259 // RETURNS: Array of AtkTextRange. The last
2260 // <rect>: An AtkTextRectangle giving the dimensions of the bounding box.
2261 // <coord_type>: Specify whether coordinates are relative to the screen or widget window.
2262 // <x_clip_type>: Specify the horizontal clip type.
2263 // <y_clip_type>: Specify the vertical clip type.
2264 TextRange** /*new*/ get_bounded_ranges(TextRectangle* rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type) {
2265 return atk_text_get_bounded_ranges(&this, rect, coord_type, x_clip_type, y_clip_type);
2268 // Gets the offset position of the caret (cursor).
2269 // RETURNS: the offset position of the caret (cursor).
2270 int get_caret_offset() {
2271 return atk_text_get_caret_offset(&this);
2274 // Gets the specified text.
2275 // RETURNS: the character at @offset.
2276 // <offset>: position
2277 dchar get_character_at_offset(int offset) {
2278 return atk_text_get_character_at_offset(&this, offset);
2281 // Gets the character count.
2282 // RETURNS: the number of characters.
2283 int get_character_count() {
2284 return atk_text_get_character_count(&this);
2287 // Get the bounding box containing the glyph representing the character at
2288 // a particular text offset.
2289 // <offset>: The offset of the text character for which bounding information is required.
2290 // <x>: Pointer for the x cordinate of the bounding box
2291 // <y>: Pointer for the y cordinate of the bounding box
2292 // <width>: Pointer for the width of the bounding box
2293 // <height>: Pointer for the height of the bounding box
2294 // <coords>: specify whether coordinates are relative to the screen or widget window
2295 void get_character_extents(int offset, int* x, int* y, int* width, int* height, CoordType coords) {
2296 atk_text_get_character_extents(&this, offset, x, y, width, height, coords);
2299 // Creates an #AtkAttributeSet which consists of the default values of
2300 // attributes for the text. See the enum AtkTextAttribute for types of text
2301 // attributes that can be returned. Note that other attributes may also be
2302 // returned.
2303 // values of attributes. at @offset. this #atkattributeset should be freed by
2304 // a call to atk_attribute_set_free().
2305 // RETURNS: an #AtkAttributeSet which contains the default
2306 AttributeSet* /*new*/ get_default_attributes() {
2307 return atk_text_get_default_attributes(&this);
2310 // Gets the number of selected regions.
2311 // occurred.
2312 // RETURNS: The number of selected regions, or -1 if a failure
2313 int get_n_selections() {
2314 return atk_text_get_n_selections(&this);
2317 // Gets the offset of the character located at coordinates @x and @y. @x and @y
2318 // are interpreted as being relative to the screen or this widget's window
2319 // depending on @coords.
2320 // the specified @x and @y coordinates.
2321 // RETURNS: the offset to the character which is located at
2322 // <x>: screen x-position of character
2323 // <y>: screen y-position of character
2324 // <coords>: specify whether coordinates are relative to the screen or widget window
2325 int get_offset_at_point(int x, int y, CoordType coords) {
2326 return atk_text_get_offset_at_point(&this, x, y, coords);
2329 // Get the bounding box for text within the specified range.
2330 // <start_offset>: The offset of the first text character for which boundary information is required.
2331 // <end_offset>: The offset of the text character after the last character for which boundary information is required.
2332 // <coord_type>: Specify whether coordinates are relative to the screen or widget window.
2333 // <rect>: A pointer to a AtkTextRectangle which is filled in by this function.
2334 void get_range_extents(int start_offset, int end_offset, CoordType coord_type, TextRectangle* rect) {
2335 atk_text_get_range_extents(&this, start_offset, end_offset, coord_type, rect);
2338 // Creates an #AtkAttributeSet which consists of the attributes explicitly
2339 // set at the position @offset in the text. @start_offset and @end_offset are
2340 // set to the start and end of the range around @offset where the attributes are
2341 // invariant. Note that @end_offset is the offset of the first character
2342 // after the range. See the enum AtkTextAttribute for types of text
2343 // attributes that can be returned. Note that other attributes may also be
2344 // returned.
2345 // explicitly set at @offset. This #AtkAttributeSet should be freed by a call
2346 // to atk_attribute_set_free().
2347 // RETURNS: an #AtkAttributeSet which contains the attributes
2348 // <offset>: the offset at which to get the attributes, -1 means the offset of the character to be inserted at the caret location.
2349 // <start_offset>: the address to put the start offset of the range
2350 // <end_offset>: the address to put the end offset of the range
2351 AttributeSet* /*new*/ get_run_attributes(int offset, int* start_offset, int* end_offset) {
2352 return atk_text_get_run_attributes(&this, offset, start_offset, end_offset);
2355 // Gets the text from the specified selection.
2356 // to free the returned string.
2357 // RETURNS: a newly allocated string containing the selected text. Use g_free()
2358 // <selection_num>: The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2359 // <start_offset>: passes back the start position of the selected region
2360 // <end_offset>: passes back the end position of (e.g. offset immediately past) the selected region
2361 char* /*new*/ get_selection(int selection_num, int* start_offset, int* end_offset) {
2362 return atk_text_get_selection(&this, selection_num, start_offset, end_offset);
2365 // Gets the specified text.
2366 // to, but not including @end_offset. Use g_free() to free the returned string.
2367 // RETURNS: a newly allocated string containing the text from @start_offset up
2368 // <start_offset>: start position
2369 // <end_offset>: end position
2370 char* /*new*/ get_text(int start_offset, int end_offset) {
2371 return atk_text_get_text(&this, start_offset, end_offset);
2374 // Gets the specified text.
2375 // If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character after the
2376 // offset is returned.
2377 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2378 // is from the word start after the offset to the next word start.
2379 // The returned string will contain the word after the offset if the offset
2380 // is inside a word or if the offset is not inside a word.
2381 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
2382 // is from the word end at or after the offset to the next work end.
2383 // The returned string will contain the word after the offset if the offset
2384 // is inside a word and will contain the word after the word after the offset
2385 // if the offset is not inside a word.
2386 // If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2387 // string is from the sentence start after the offset to the next sentence
2388 // start.
2389 // The returned string will contain the sentence after the offset if the offset
2390 // is inside a sentence or if the offset is not inside a sentence.
2391 // If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
2392 // is from the sentence end at or after the offset to the next sentence end.
2393 // The returned string will contain the sentence after the offset if the offset
2394 // is inside a sentence and will contain the sentence after the sentence
2395 // after the offset if the offset is not inside a sentence.
2396 // If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2397 // string is from the line start after the offset to the next line start.
2398 // If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
2399 // is from the line end at or after the offset to the next line end.
2400 // by the specified @boundary_type. Use g_free() to free the returned string.
2401 // RETURNS: a newly allocated string containing the text after @offset bounded
2402 // <offset>: position
2403 // <boundary_type>: An #AtkTextBoundary
2404 // <start_offset>: the start offset of the returned string
2405 // <end_offset>: the offset of the first character after the returned substring
2406 char* /*new*/ get_text_after_offset(int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) {
2407 return atk_text_get_text_after_offset(&this, offset, boundary_type, start_offset, end_offset);
2410 // Gets the specified text.
2411 // If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the
2412 // offset is returned.
2413 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2414 // is from the word start at or before the offset to the word start after
2415 // the offset.
2416 // The returned string will contain the word at the offset if the offset
2417 // is inside a word and will contain the word before the offset if the
2418 // offset is not inside a word.
2419 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
2420 // is from the word end before the offset to the word end at or after the
2421 // offset.
2422 // The returned string will contain the word at the offset if the offset
2423 // is inside a word and will contain the word after to the offset if the
2424 // offset is not inside a word.
2425 // If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2426 // string is from the sentence start at or before the offset to the sentence
2427 // start after the offset.
2428 // The returned string will contain the sentence at the offset if the offset
2429 // is inside a sentence and will contain the sentence before the offset
2430 // if the offset is not inside a sentence.
2431 // If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
2432 // is from the sentence end before the offset to the sentence end at or
2433 // after the offset.
2434 // The returned string will contain the sentence at the offset if the offset
2435 // is inside a sentence and will contain the sentence after the offset
2436 // if the offset is not inside a sentence.
2437 // If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2438 // string is from the line start at or before the offset to the line
2439 // start after the offset.
2440 // If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
2441 // is from the line end before the offset to the line end at or after
2442 // the offset.
2443 // the specified @boundary_type. Use g_free() to free the returned string.
2444 // RETURNS: a newly allocated string containing the text at @offset bounded by
2445 // <offset>: position
2446 // <boundary_type>: An #AtkTextBoundary
2447 // <start_offset>: the start offset of the returned string
2448 // <end_offset>: the offset of the first character after the returned substring
2449 char* /*new*/ get_text_at_offset(int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) {
2450 return atk_text_get_text_at_offset(&this, offset, boundary_type, start_offset, end_offset);
2453 // Gets the specified text.
2454 // If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character before the
2455 // offset is returned.
2456 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2457 // is from the word start before the word start before or at the offset to
2458 // the word start before or at the offset.
2459 // The returned string will contain the word before the offset if the offset
2460 // is inside a word and will contain the word before the word before the
2461 // offset if the offset is not inside a word.
2462 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
2463 // is from the word end before the word end before the offset to the word
2464 // end before the offset.
2465 // The returned string will contain the word before the offset if the offset
2466 // is inside a word or if the offset is not inside a word.
2467 // If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2468 // string is from the sentence start before the sentence start before
2469 // the offset to the sentence start before the offset.
2470 // The returned string will contain the sentence before the offset if the
2471 // offset is inside a sentence and will contain the sentence before the
2472 // sentence before the offset if the offset is not inside a sentence.
2473 // If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
2474 // is from the sentence end before the sentence end at or before the offset to
2475 // the sentence end at or before the offset.
2476 // The returned string will contain the sentence before the offset if the
2477 // offset is inside a sentence or if the offset is not inside a sentence.
2478 // If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2479 // string is from the line start before the line start ar or before the offset
2480 // to the line start ar or before the offset.
2481 // If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
2482 // is from the line end before the line end before the offset to the
2483 // line end before the offset.
2484 // by the specified @boundary_type. Use g_free() to free the returned string.
2485 // RETURNS: a newly allocated string containing the text before @offset bounded
2486 // <offset>: position
2487 // <boundary_type>: An #AtkTextBoundary
2488 // <start_offset>: the start offset of the returned string
2489 // <end_offset>: the offset of the first character after the returned substring
2490 char* /*new*/ get_text_before_offset(int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) {
2491 return atk_text_get_text_before_offset(&this, offset, boundary_type, start_offset, end_offset);
2494 // Removes the specified selection.
2495 // RETURNS: %TRUE if success, %FALSE otherwise
2496 // <selection_num>: The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2497 int remove_selection(int selection_num) {
2498 return atk_text_remove_selection(&this, selection_num);
2501 // Sets the caret (cursor) position to the specified @offset.
2502 // RETURNS: %TRUE if success, %FALSE otherwise.
2503 // <offset>: position
2504 int set_caret_offset(int offset) {
2505 return atk_text_set_caret_offset(&this, offset);
2508 // Changes the start and end offset of the specified selection.
2509 // RETURNS: %TRUE if success, %FALSE otherwise
2510 // <selection_num>: The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2511 // <start_offset>: the new start position of the selection
2512 // <end_offset>: the new end position of (e.g. offset immediately past) the selection
2513 int set_selection(int selection_num, int start_offset, int end_offset) {
2514 return atk_text_set_selection(&this, selection_num, start_offset, end_offset);
2516 extern (C) alias static void function (Text* this_, void* user_data=null) signal_text_attributes_changed;
2518 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2519 return super_.signal_connect!name(cb, data, cf);
2522 ulong signal_connect(string name:"text-attributes-changed", CB:signal_text_attributes_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2523 return signal_connect_data(&this, cast(char*)"text-attributes-changed",
2524 cast(GObject2.Callback)cb, data, null, cf);
2526 extern (C) alias static void function (Text* this_, int object, void* user_data=null) signal_text_caret_moved;
2527 ulong signal_connect(string name:"text-caret-moved", CB:signal_text_caret_moved)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2528 return signal_connect_data(&this, cast(char*)"text-caret-moved",
2529 cast(GObject2.Callback)cb, data, null, cf);
2531 extern (C) alias static void function (Text* this_, int object, int p0, void* user_data=null) signal_text_changed;
2532 ulong signal_connect(string name:"text-changed", CB:signal_text_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2533 return signal_connect_data(&this, cast(char*)"text-changed",
2534 cast(GObject2.Callback)cb, data, null, cf);
2536 extern (C) alias static void function (Text* this_, int object, int p0, char* p1, void* user_data=null) signal_text_insert;
2537 ulong signal_connect(string name:"text-insert", CB:signal_text_insert)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2538 return signal_connect_data(&this, cast(char*)"text-insert",
2539 cast(GObject2.Callback)cb, data, null, cf);
2541 extern (C) alias static void function (Text* this_, int object, int p0, char* p1, void* user_data=null) signal_text_remove;
2542 ulong signal_connect(string name:"text-remove", CB:signal_text_remove)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2543 return signal_connect_data(&this, cast(char*)"text-remove",
2544 cast(GObject2.Callback)cb, data, null, cf);
2546 extern (C) alias static void function (Text* this_, void* user_data=null) signal_text_selection_changed;
2547 ulong signal_connect(string name:"text-selection-changed", CB:signal_text_selection_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2548 return signal_connect_data(&this, cast(char*)"text-selection-changed",
2549 cast(GObject2.Callback)cb, data, null, cf);
2551 extern (C) alias static void function (Text* this_, int object, int p0, int p1, char* p2, void* user_data=null) signal_text_update;
2552 ulong signal_connect(string name:"text-update", CB:signal_text_update)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2553 return signal_connect_data(&this, cast(char*)"text-update",
2554 cast(GObject2.Callback)cb, data, null, cf);
2558 enum TextAttribute {
2559 INVALID = 0,
2560 LEFT_MARGIN = 1,
2561 RIGHT_MARGIN = 2,
2562 INDENT = 3,
2563 INVISIBLE = 4,
2564 EDITABLE = 5,
2565 PIXELS_ABOVE_LINES = 6,
2566 PIXELS_BELOW_LINES = 7,
2567 PIXELS_INSIDE_WRAP = 8,
2568 BG_FULL_HEIGHT = 9,
2569 RISE = 10,
2570 UNDERLINE = 11,
2571 STRIKETHROUGH = 12,
2572 SIZE = 13,
2573 SCALE = 14,
2574 WEIGHT = 15,
2575 LANGUAGE = 16,
2576 FAMILY_NAME = 17,
2577 BG_COLOR = 18,
2578 FG_COLOR = 19,
2579 BG_STIPPLE = 20,
2580 FG_STIPPLE = 21,
2581 WRAP_MODE = 22,
2582 DIRECTION = 23,
2583 JUSTIFICATION = 24,
2584 STRETCH = 25,
2585 VARIANT = 26,
2586 STYLE = 27,
2587 LAST_DEFINED = 28
2589 enum TextBoundary {
2590 CHAR = 0,
2591 WORD_START = 1,
2592 WORD_END = 2,
2593 SENTENCE_START = 3,
2594 SENTENCE_END = 4,
2595 LINE_START = 5,
2596 LINE_END = 6
2598 enum TextClipType {
2599 NONE = 0,
2600 MIN = 1,
2601 MAX = 2,
2602 BOTH = 3
2604 struct TextIface {
2605 GObject2.TypeInterface parent;
2607 // RETURNS: a newly allocated string containing the text from @start_offset up
2608 // <start_offset>: start position
2609 // <end_offset>: end position
2610 extern (C) char* /*new*/ function (Text* text, int start_offset, int end_offset) get_text;
2612 // RETURNS: a newly allocated string containing the text after @offset bounded
2613 // <offset>: position
2614 // <boundary_type>: An #AtkTextBoundary
2615 // <start_offset>: the start offset of the returned string
2616 // <end_offset>: the offset of the first character after the returned substring
2617 extern (C) char* /*new*/ function (Text* text, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) get_text_after_offset;
2619 // RETURNS: a newly allocated string containing the text at @offset bounded by
2620 // <offset>: position
2621 // <boundary_type>: An #AtkTextBoundary
2622 // <start_offset>: the start offset of the returned string
2623 // <end_offset>: the offset of the first character after the returned substring
2624 extern (C) char* /*new*/ function (Text* text, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) get_text_at_offset;
2626 // RETURNS: the character at @offset.
2627 // <offset>: position
2628 extern (C) dchar function (Text* text, int offset) get_character_at_offset;
2630 // RETURNS: a newly allocated string containing the text before @offset bounded
2631 // <offset>: position
2632 // <boundary_type>: An #AtkTextBoundary
2633 // <start_offset>: the start offset of the returned string
2634 // <end_offset>: the offset of the first character after the returned substring
2635 extern (C) char* /*new*/ function (Text* text, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) get_text_before_offset;
2636 // RETURNS: the offset position of the caret (cursor).
2637 extern (C) int function (Text* text) get_caret_offset;
2639 // RETURNS: an #AtkAttributeSet which contains the attributes
2640 // <offset>: the offset at which to get the attributes, -1 means the offset of the character to be inserted at the caret location.
2641 // <start_offset>: the address to put the start offset of the range
2642 // <end_offset>: the address to put the end offset of the range
2643 extern (C) AttributeSet* /*new*/ function (Text* text, int offset, int* start_offset, int* end_offset) get_run_attributes;
2644 // RETURNS: an #AtkAttributeSet which contains the default
2645 extern (C) AttributeSet* /*new*/ function (Text* text) get_default_attributes;
2647 // <offset>: The offset of the text character for which bounding information is required.
2648 // <x>: Pointer for the x cordinate of the bounding box
2649 // <y>: Pointer for the y cordinate of the bounding box
2650 // <width>: Pointer for the width of the bounding box
2651 // <height>: Pointer for the height of the bounding box
2652 // <coords>: specify whether coordinates are relative to the screen or widget window
2653 extern (C) void function (Text* text, int offset, int* x, int* y, int* width, int* height, CoordType coords) get_character_extents;
2654 // RETURNS: the number of characters.
2655 extern (C) int function (Text* text) get_character_count;
2657 // RETURNS: the offset to the character which is located at
2658 // <x>: screen x-position of character
2659 // <y>: screen y-position of character
2660 // <coords>: specify whether coordinates are relative to the screen or widget window
2661 extern (C) int function (Text* text, int x, int y, CoordType coords) get_offset_at_point;
2662 // RETURNS: The number of selected regions, or -1 if a failure
2663 extern (C) int function (Text* text) get_n_selections;
2665 // RETURNS: a newly allocated string containing the selected text. Use g_free()
2666 // <selection_num>: The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2667 // <start_offset>: passes back the start position of the selected region
2668 // <end_offset>: passes back the end position of (e.g. offset immediately past) the selected region
2669 extern (C) char* /*new*/ function (Text* text, int selection_num, int* start_offset, int* end_offset) get_selection;
2671 // RETURNS: %TRUE if success, %FALSE otherwise
2672 // <start_offset>: the start position of the selected region
2673 // <end_offset>: the offset of the first character after the selected region.
2674 extern (C) int function (Text* text, int start_offset, int end_offset) add_selection;
2676 // RETURNS: %TRUE if success, %FALSE otherwise
2677 // <selection_num>: The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2678 extern (C) int function (Text* text, int selection_num) remove_selection;
2680 // RETURNS: %TRUE if success, %FALSE otherwise
2681 // <selection_num>: The selection number. The selected regions are assigned numbers that correspond to how far the region is from the start of the text. The selected region closest to the beginning of the text region is assigned the number 0, etc. Note that adding, moving or deleting a selected region can change the numbering.
2682 // <start_offset>: the new start position of the selection
2683 // <end_offset>: the new end position of (e.g. offset immediately past) the selection
2684 extern (C) int function (Text* text, int selection_num, int start_offset, int end_offset) set_selection;
2686 // RETURNS: %TRUE if success, %FALSE otherwise.
2687 // <offset>: position
2688 extern (C) int function (Text* text, int offset) set_caret_offset;
2689 extern (C) void function (Text* text, int position, int length) text_changed;
2690 extern (C) void function (Text* text, int location) text_caret_moved;
2691 extern (C) void function (Text* text) text_selection_changed;
2692 extern (C) void function (Text* text) text_attributes_changed;
2694 // <start_offset>: The offset of the first text character for which boundary information is required.
2695 // <end_offset>: The offset of the text character after the last character for which boundary information is required.
2696 // <coord_type>: Specify whether coordinates are relative to the screen or widget window.
2697 // <rect>: A pointer to a AtkTextRectangle which is filled in by this function.
2698 extern (C) void function (Text* text, int start_offset, int end_offset, CoordType coord_type, TextRectangle* rect) get_range_extents;
2699 extern (C) TextRange** /*new*/ function (Text* text, TextRectangle* rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type) get_bounded_ranges;
2700 Function pad4;
2703 // A structure used to describe a text range.
2704 struct TextRange {
2705 TextRectangle bounds;
2706 int start_offset, end_offset;
2707 char* content;
2710 // A structure used to store a rectangle used by AtkText.
2711 struct TextRectangle {
2712 int x, y, width, height;
2715 struct Util /* : GObject.Object */ {
2716 alias parent this;
2717 alias parent super_;
2718 alias parent object;
2719 GObject2.Object parent;
2722 struct UtilClass {
2723 GObject2.ObjectClass parent;
2724 // Unintrospectable functionp: add_global_event_listener() / ()
2725 extern (C) uint function (GObject2.SignalEmissionHook listener, char* event_type) add_global_event_listener;
2726 extern (C) void function (uint listener_id) remove_global_event_listener;
2727 // Unintrospectable functionp: add_key_event_listener() / ()
2728 extern (C) uint function (KeySnoopFunc listener, void* data) add_key_event_listener;
2729 extern (C) void function (uint listener_id) remove_key_event_listener;
2730 // Unintrospectable functionp: get_root() / ()
2731 extern (C) Object* function () get_root;
2732 extern (C) char* function () get_toolkit_name;
2733 extern (C) char* function () get_toolkit_version;
2736 struct Value {
2738 // Gets the value of this object.
2739 // <value>: a #GValue representing the current accessible value
2740 void get_current_value(GObject2.Value* value) {
2741 atk_value_get_current_value(&this, value);
2744 // Gets the maximum value of this object.
2745 // <value>: a #GValue representing the maximum accessible value
2746 void get_maximum_value(GObject2.Value* value) {
2747 atk_value_get_maximum_value(&this, value);
2750 // Gets the minimum increment by which the value of this object may be changed. If zero,
2751 // the minimum increment is undefined, which may mean that it is limited only by the
2752 // floating point precision of the platform.
2753 // <value>: a #GValue representing the minimum increment by which the accessible value may be changed
2754 void get_minimum_increment(GObject2.Value* value) {
2755 atk_value_get_minimum_increment(&this, value);
2758 // Gets the minimum value of this object.
2759 // <value>: a #GValue representing the minimum accessible value
2760 void get_minimum_value(GObject2.Value* value) {
2761 atk_value_get_minimum_value(&this, value);
2764 // Sets the value of this object.
2765 // RETURNS: %TRUE if new value is successfully set, %FALSE otherwise.
2766 // <value>: a #GValue which is the desired new accessible value.
2767 int set_current_value(GObject2.Value* value) {
2768 return atk_value_set_current_value(&this, value);
2772 struct ValueIface {
2773 GObject2.TypeInterface parent;
2774 // <value>: a #GValue representing the current accessible value
2775 extern (C) void function (Value* obj, GObject2.Value* value) get_current_value;
2776 // <value>: a #GValue representing the maximum accessible value
2777 extern (C) void function (Value* obj, GObject2.Value* value) get_maximum_value;
2778 // <value>: a #GValue representing the minimum accessible value
2779 extern (C) void function (Value* obj, GObject2.Value* value) get_minimum_value;
2781 // RETURNS: %TRUE if new value is successfully set, %FALSE otherwise.
2782 // <value>: a #GValue which is the desired new accessible value.
2783 extern (C) int function (Value* obj, GObject2.Value* value) set_current_value;
2784 // <value>: a #GValue representing the minimum increment by which the accessible value may be changed
2785 extern (C) void function (Value* obj, GObject2.Value* value) get_minimum_increment;
2786 Function pad1;
2789 struct Window {
2790 extern (C) alias static void function (Window* this_, void* user_data=null) signal_activate;
2792 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2793 return super_.signal_connect!name(cb, data, cf);
2796 ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2797 return signal_connect_data(&this, cast(char*)"activate",
2798 cast(GObject2.Callback)cb, data, null, cf);
2800 extern (C) alias static void function (Window* this_, void* user_data=null) signal_create;
2801 ulong signal_connect(string name:"create", CB:signal_create)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2802 return signal_connect_data(&this, cast(char*)"create",
2803 cast(GObject2.Callback)cb, data, null, cf);
2805 extern (C) alias static void function (Window* this_, void* user_data=null) signal_deactivate;
2806 ulong signal_connect(string name:"deactivate", CB:signal_deactivate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2807 return signal_connect_data(&this, cast(char*)"deactivate",
2808 cast(GObject2.Callback)cb, data, null, cf);
2810 extern (C) alias static void function (Window* this_, void* user_data=null) signal_destroy;
2811 ulong signal_connect(string name:"destroy", CB:signal_destroy)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2812 return signal_connect_data(&this, cast(char*)"destroy",
2813 cast(GObject2.Callback)cb, data, null, cf);
2815 extern (C) alias static void function (Window* this_, void* user_data=null) signal_maximize;
2816 ulong signal_connect(string name:"maximize", CB:signal_maximize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2817 return signal_connect_data(&this, cast(char*)"maximize",
2818 cast(GObject2.Callback)cb, data, null, cf);
2820 extern (C) alias static void function (Window* this_, void* user_data=null) signal_minimize;
2821 ulong signal_connect(string name:"minimize", CB:signal_minimize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2822 return signal_connect_data(&this, cast(char*)"minimize",
2823 cast(GObject2.Callback)cb, data, null, cf);
2825 extern (C) alias static void function (Window* this_, void* user_data=null) signal_move;
2826 ulong signal_connect(string name:"move", CB:signal_move)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2827 return signal_connect_data(&this, cast(char*)"move",
2828 cast(GObject2.Callback)cb, data, null, cf);
2830 extern (C) alias static void function (Window* this_, void* user_data=null) signal_resize;
2831 ulong signal_connect(string name:"resize", CB:signal_resize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2832 return signal_connect_data(&this, cast(char*)"resize",
2833 cast(GObject2.Callback)cb, data, null, cf);
2835 extern (C) alias static void function (Window* this_, void* user_data=null) signal_restore;
2836 ulong signal_connect(string name:"restore", CB:signal_restore)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2837 return signal_connect_data(&this, cast(char*)"restore",
2838 cast(GObject2.Callback)cb, data, null, cf);
2842 struct WindowIface {
2843 GObject2.TypeInterface parent;
2844 void*[16] _padding_dummy;
2847 struct _PropertyValues {
2848 char* property_name;
2849 GObject2.Value old_value, new_value;
2852 struct _Registry {
2853 GObject2.Object parent;
2854 GLib2.HashTable* factory_type_registry, factory_singleton_cache;
2857 struct _RegistryClass {
2858 GObject2.ObjectClass parent_class;
2862 // Unintrospectable function: add_focus_tracker() / atk_add_focus_tracker()
2863 // Adds the specified function to the list of functions to be called
2864 // when an object receives focus.
2865 // RETURNS: added focus tracker id, or 0 on failure.
2866 // <focus_tracker>: Function to be added to the list of functions to be called when an object receives focus.
2867 static uint add_focus_tracker(EventListener focus_tracker) {
2868 return atk_add_focus_tracker(focus_tracker);
2872 // Unintrospectable function: add_global_event_listener() / atk_add_global_event_listener()
2873 // Adds the specified function to the list of functions to be called
2874 // when an ATK event of type event_type occurs.
2875 // The format of event_type is the following:
2876 // "ATK:<atk_type>:<atk_event>
2877 // Where "ATK" works as the namespace, <atk_interface> is the name of
2878 // the ATK type (interface or object) and <atk_event> is the name of
2879 // the signal defined on that interface.
2880 // For example:
2881 // ATK:AtkObject:state-change
2882 // ATK:AtkText:text-selection-changed
2883 // RETURNS: added event listener id, or 0 on failure.
2884 // <listener>: the listener to notify
2885 // <event_type>: the type of event for which notification is requested
2886 static uint add_global_event_listener(GObject2.SignalEmissionHook listener, char* event_type) {
2887 return atk_add_global_event_listener(listener, event_type);
2891 // Unintrospectable function: add_key_event_listener() / atk_add_key_event_listener()
2892 // Adds the specified function to the list of functions to be called
2893 // when a key event occurs. The @data element will be passed to the
2894 // #AtkKeySnoopFunc (@listener) as the @func_data param, on notification.
2895 // RETURNS: added event listener id, or 0 on failure.
2896 // <listener>: the listener to notify
2897 // <data>: a #gpointer that points to a block of data that should be sent to the registered listeners, along with the event notification, when it occurs.
2898 static uint add_key_event_listener(KeySnoopFunc listener, void* data) {
2899 return atk_add_key_event_listener(listener, data);
2903 // Frees the memory used by an #AtkAttributeSet, including all its
2904 // #AtkAttributes.
2905 // <attrib_set>: The #AtkAttributeSet to free
2906 static void attribute_set_free(AttributeSet* attrib_set) {
2907 atk_attribute_set_free(attrib_set);
2911 // Unintrospectable function: focus_tracker_init() / atk_focus_tracker_init()
2912 // Specifies the function to be called for focus tracker initialization.
2913 // This function should be called by an implementation of the
2914 // ATK interface if any specific work needs to be done to enable
2915 // focus tracking.
2916 // <init>: Function to be called for focus tracker initialization
2917 static void focus_tracker_init(EventListenerInit init) {
2918 atk_focus_tracker_init(init);
2922 // Cause the focus tracker functions which have been specified to be
2923 // executed for the object.
2924 // <object>: an #AtkObject
2925 static void focus_tracker_notify(Object* object) {
2926 atk_focus_tracker_notify(object);
2930 // Gets a default implementation of the #AtkObjectFactory/type
2931 // registry.
2932 // registry for registering new #AtkObject factories. Following
2933 // a call to this function, maintainers may call atk_registry_set_factory_type()
2934 // to associate an #AtkObjectFactory subclass with the GType of objects
2935 // for whom accessibility information will be provided.
2936 // #AtkObjectFactory/type registry
2937 // RETURNS: a default implementation of the
2938 static Registry* /*new*/ get_default_registry() {
2939 return atk_get_default_registry();
2943 // Gets the currently focused object.
2944 // application
2945 // RETURNS: the currently focused object for the current
2946 static Object* get_focus_object() {
2947 return atk_get_focus_object();
2951 // Gets the root accessible container for the current application.
2952 // application
2953 // RETURNS: the root accessible container for the current
2954 static Object* get_root() {
2955 return atk_get_root();
2959 // Gets name string for the GUI toolkit implementing ATK for this application.
2960 // RETURNS: name string for the GUI toolkit implementing ATK for this application
2961 static char* get_toolkit_name() {
2962 return atk_get_toolkit_name();
2966 // Gets version string for the GUI toolkit implementing ATK for this application.
2967 // RETURNS: version string for the GUI toolkit implementing ATK for this application
2968 static char* get_toolkit_version() {
2969 return atk_get_toolkit_version();
2973 // Gets the current version for ATK.
2974 // RETURNS: version string for ATK
2975 static char* get_version() {
2976 return atk_get_version();
2980 // Get the #AtkRelationType type corresponding to a relation name.
2981 // or #ATK_RELATION_NULL if no matching relation type is found.
2982 // RETURNS: the #AtkRelationType enumerated type corresponding to the specified name,
2983 // <name>: a string which is the (non-localized) name of an ATK relation type.
2984 static RelationType relation_type_for_name(char* name) {
2985 return atk_relation_type_for_name(name);
2989 // Gets the description string describing the #AtkRelationType @type.
2990 // RETURNS: the string describing the AtkRelationType
2991 // <type>: The #AtkRelationType whose name is required
2992 static char* relation_type_get_name(RelationType type) {
2993 return atk_relation_type_get_name(type);
2997 // Associate @name with a new #AtkRelationType
2998 // RETURNS: an #AtkRelationType associated with @name
2999 // <name>: a name string
3000 static RelationType relation_type_register(char* name) {
3001 return atk_relation_type_register(name);
3005 // Removes the specified focus tracker from the list of functions
3006 // to be called when any object receives focus.
3007 // <tracker_id>: the id of the focus tracker to remove
3008 static void remove_focus_tracker(uint tracker_id) {
3009 atk_remove_focus_tracker(tracker_id);
3013 // Removes the specified event listener
3014 // <listener_id>: the id of the event listener to remove
3015 static void remove_global_event_listener(uint listener_id) {
3016 atk_remove_global_event_listener(listener_id);
3020 // Removes the specified event listener
3021 // <listener_id>: the id of the event listener to remove
3022 static void remove_key_event_listener(uint listener_id) {
3023 atk_remove_key_event_listener(listener_id);
3027 // Get the #AtkRole type corresponding to a rolew name.
3028 // or #ATK_ROLE_INVALID if no matching role is found.
3029 // RETURNS: the #AtkRole enumerated type corresponding to the specified
3030 // <name>: a string which is the (non-localized) name of an ATK role.
3031 static Role role_for_name(char* name) {
3032 return atk_role_for_name(name);
3036 // Gets the localized description string describing the #AtkRole @role.
3037 // RETURNS: the localized string describing the AtkRole
3038 // <role>: The #AtkRole whose localized name is required
3039 static char* role_get_localized_name(Role role) {
3040 return atk_role_get_localized_name(role);
3044 // Gets the description string describing the #AtkRole @role.
3045 // RETURNS: the string describing the AtkRole
3046 // <role>: The #AtkRole whose name is required
3047 static char* role_get_name(Role role) {
3048 return atk_role_get_name(role);
3052 // Registers the role specified by @name.
3053 // RETURNS: an #AtkRole for the new role.
3054 // <name>: a character string describing the new role.
3055 static Role role_register(char* name) {
3056 return atk_role_register(name);
3060 // Gets the #AtkStateType corresponding to the description string @name.
3061 // RETURNS: an #AtkStateType corresponding to @name
3062 // <name>: a character string state name
3063 static StateType state_type_for_name(char* name) {
3064 return atk_state_type_for_name(name);
3068 // Gets the description string describing the #AtkStateType @type.
3069 // RETURNS: the string describing the AtkStateType
3070 // <type>: The #AtkStateType whose name is required
3071 static char* state_type_get_name(StateType type) {
3072 return atk_state_type_get_name(type);
3076 // Register a new object state.
3077 // RETURNS: an #AtkState value for the new state.
3078 // <name>: a character string describing the new state.
3079 static StateType state_type_register(char* name) {
3080 return atk_state_type_register(name);
3084 // Get the #AtkTextAttribute type corresponding to a text attribute name.
3085 // or #ATK_TEXT_ATTRIBUTE_INVALID if no matching text attribute is found.
3086 // RETURNS: the #AtkTextAttribute enumerated type corresponding to the specified
3087 // <name>: a string which is the (non-localized) name of an ATK text attribute.
3088 static TextAttribute text_attribute_for_name(char* name) {
3089 return atk_text_attribute_for_name(name);
3093 // Gets the name corresponding to the #AtkTextAttribute
3094 // RETURNS: a string containing the name; this string should not be freed
3095 // <attr>: The #AtkTextAttribute whose name is required
3096 static char* text_attribute_get_name(TextAttribute attr) {
3097 return atk_text_attribute_get_name(attr);
3101 // Gets the value for the index of the #AtkTextAttribute
3102 // NULL is returned if there are no values maintained for the attr value.
3103 // RETURNS: a string containing the value; this string should not be freed;
3104 // <attr>: The #AtkTextAttribute for which a value is required
3105 // <index_>: The index of the required value
3106 static char* text_attribute_get_value(TextAttribute attr, int index_) {
3107 return atk_text_attribute_get_value(attr, index_);
3111 // Associate @name with a new #AtkTextAttribute
3112 // RETURNS: an #AtkTextAttribute associated with @name
3113 // <name>: a name string
3114 static TextAttribute text_attribute_register(char* name) {
3115 return atk_text_attribute_register(name);
3119 // Frees the memory associated with an array of AtkTextRange. It is assumed
3120 // that the array was returned by the function atk_text_get_bounded_ranges
3121 // and is NULL terminated.
3122 // <ranges>: A pointer to an array of #AtkTextRange which is to be freed.
3123 static void text_free_ranges(TextRange** ranges) {
3124 atk_text_free_ranges(ranges);
3128 // C prototypes:
3130 extern (C) {
3131 int atk_action_do_action(Action* this_, int i);
3132 char* atk_action_get_description(Action* this_, int i);
3133 char* atk_action_get_keybinding(Action* this_, int i);
3134 char* atk_action_get_localized_name(Action* this_, int i);
3135 int atk_action_get_n_actions(Action* this_);
3136 char* atk_action_get_name(Action* this_, int i);
3137 int atk_action_set_description(Action* this_, int i, char* desc);
3138 uint atk_component_add_focus_handler(Component* this_, FocusHandler handler);
3139 int atk_component_contains(Component* this_, int x, int y, CoordType coord_type);
3140 double atk_component_get_alpha(Component* this_);
3141 void atk_component_get_extents(Component* this_, int* x, int* y, int* width, int* height, CoordType coord_type);
3142 Layer atk_component_get_layer(Component* this_);
3143 int atk_component_get_mdi_zorder(Component* this_);
3144 void atk_component_get_position(Component* this_, int* x, int* y, CoordType coord_type);
3145 void atk_component_get_size(Component* this_, int* width, int* height);
3146 int atk_component_grab_focus(Component* this_);
3147 Object* /*new*/ atk_component_ref_accessible_at_point(Component* this_, int x, int y, CoordType coord_type);
3148 void atk_component_remove_focus_handler(Component* this_, uint handler_id);
3149 int atk_component_set_extents(Component* this_, int x, int y, int width, int height, CoordType coord_type);
3150 int atk_component_set_position(Component* this_, int x, int y, CoordType coord_type);
3151 int atk_component_set_size(Component* this_, int width, int height);
3152 char* atk_document_get_attribute_value(Document* this_, char* attribute_name);
3153 AttributeSet* atk_document_get_attributes(Document* this_);
3154 void* atk_document_get_document(Document* this_);
3155 char* atk_document_get_document_type(Document* this_);
3156 char* atk_document_get_locale(Document* this_);
3157 int atk_document_set_attribute_value(Document* this_, char* attribute_name, char* attribute_value);
3158 void atk_editable_text_copy_text(EditableText* this_, int start_pos, int end_pos);
3159 void atk_editable_text_cut_text(EditableText* this_, int start_pos, int end_pos);
3160 void atk_editable_text_delete_text(EditableText* this_, int start_pos, int end_pos);
3161 void atk_editable_text_insert_text(EditableText* this_, char* string_, int length, int* position);
3162 void atk_editable_text_paste_text(EditableText* this_, int position);
3163 int atk_editable_text_set_run_attributes(EditableText* this_, AttributeSet* attrib_set, int start_offset, int end_offset);
3164 void atk_editable_text_set_text_contents(EditableText* this_, char* string_);
3165 Object* atk_gobject_accessible_for_object(GObject2.Object* obj);
3166 GObject2.Object* atk_gobject_accessible_get_object(GObjectAccessible* this_);
3167 int atk_hyperlink_get_end_index(Hyperlink* this_);
3168 int atk_hyperlink_get_n_anchors(Hyperlink* this_);
3169 Object* atk_hyperlink_get_object(Hyperlink* this_, int i);
3170 int atk_hyperlink_get_start_index(Hyperlink* this_);
3171 char* /*new*/ atk_hyperlink_get_uri(Hyperlink* this_, int i);
3172 int atk_hyperlink_is_inline(Hyperlink* this_);
3173 int atk_hyperlink_is_valid(Hyperlink* this_);
3174 Hyperlink* /*new*/ atk_hyperlink_impl_get_hyperlink(HyperlinkImpl* this_);
3175 Hyperlink* atk_hypertext_get_link(Hypertext* this_, int link_index);
3176 int atk_hypertext_get_link_index(Hypertext* this_, int char_index);
3177 int atk_hypertext_get_n_links(Hypertext* this_);
3178 char* atk_image_get_image_description(Image* this_);
3179 char* atk_image_get_image_locale(Image* this_);
3180 void atk_image_get_image_position(Image* this_, int* x, int* y, CoordType coord_type);
3181 void atk_image_get_image_size(Image* this_, int* width, int* height);
3182 int atk_image_set_image_description(Image* this_, char* description);
3183 Object* /*new*/ atk_implementor_ref_accessible(Implementor* this_);
3184 Misc* atk_misc_get_instance();
3185 void atk_misc_threads_enter(Misc* this_);
3186 void atk_misc_threads_leave(Misc* this_);
3187 NoOpObject* /*new*/ atk_no_op_object_new(GObject2.Object* obj);
3188 NoOpObjectFactory* /*new*/ atk_no_op_object_factory_new();
3189 int atk_object_add_relationship(Object* this_, RelationType relationship, Object* target);
3190 uint atk_object_connect_property_change_handler(Object* this_, PropertyChangeHandler* handler);
3191 AttributeSet* atk_object_get_attributes(Object* this_);
3192 char* atk_object_get_description(Object* this_);
3193 int atk_object_get_index_in_parent(Object* this_);
3194 int atk_object_get_n_accessible_children(Object* this_);
3195 char* atk_object_get_name(Object* this_);
3196 Object* atk_object_get_parent(Object* this_);
3197 Role atk_object_get_role(Object* this_);
3198 void atk_object_initialize(Object* this_, void* data);
3199 void atk_object_notify_state_change(Object* this_, State state, int value);
3200 Object* /*new*/ atk_object_ref_accessible_child(Object* this_, int i);
3201 RelationSet* /*new*/ atk_object_ref_relation_set(Object* this_);
3202 StateSet* /*new*/ atk_object_ref_state_set(Object* this_);
3203 void atk_object_remove_property_change_handler(Object* this_, uint handler_id);
3204 int atk_object_remove_relationship(Object* this_, RelationType relationship, Object* target);
3205 void atk_object_set_description(Object* this_, char* description);
3206 void atk_object_set_name(Object* this_, char* name);
3207 void atk_object_set_parent(Object* this_, Object* parent);
3208 void atk_object_set_role(Object* this_, Role role);
3209 Object* /*new*/ atk_object_factory_create_accessible(ObjectFactory* this_, GObject2.Object* obj);
3210 Type atk_object_factory_get_accessible_type(ObjectFactory* this_);
3211 void atk_object_factory_invalidate(ObjectFactory* this_);
3212 Plug* /*new*/ atk_plug_new();
3213 char* /*new*/ atk_plug_get_id(Plug* this_);
3214 ObjectFactory* atk_registry_get_factory(Registry* this_, Type type);
3215 Type atk_registry_get_factory_type(Registry* this_, Type type);
3216 void atk_registry_set_factory_type(Registry* this_, Type type, Type factory_type);
3217 Relation* /*new*/ atk_relation_new(Object** targets, int n_targets, RelationType relationship);
3218 void atk_relation_add_target(Relation* this_, Object* target);
3219 RelationType atk_relation_get_relation_type(Relation* this_);
3220 PtrArray* atk_relation_get_target(Relation* this_);
3221 int atk_relation_remove_target(Relation* this_, Object* target);
3222 RelationSet* /*new*/ atk_relation_set_new();
3223 void atk_relation_set_add(RelationSet* this_, Relation* relation);
3224 void atk_relation_set_add_relation_by_type(RelationSet* this_, RelationType relationship, Object* target);
3225 int atk_relation_set_contains(RelationSet* this_, RelationType relationship);
3226 int atk_relation_set_get_n_relations(RelationSet* this_);
3227 Relation* atk_relation_set_get_relation(RelationSet* this_, int i);
3228 Relation* atk_relation_set_get_relation_by_type(RelationSet* this_, RelationType relationship);
3229 void atk_relation_set_remove(RelationSet* this_, Relation* relation);
3230 int atk_selection_add_selection(Selection* this_, int i);
3231 int atk_selection_clear_selection(Selection* this_);
3232 int atk_selection_get_selection_count(Selection* this_);
3233 int atk_selection_is_child_selected(Selection* this_, int i);
3234 Object* /*new*/ atk_selection_ref_selection(Selection* this_, int i);
3235 int atk_selection_remove_selection(Selection* this_, int i);
3236 int atk_selection_select_all_selection(Selection* this_);
3237 Socket* /*new*/ atk_socket_new();
3238 void atk_socket_embed(Socket* this_, char* plug_id);
3239 int atk_socket_is_occupied(Socket* this_);
3240 StateSet* /*new*/ atk_state_set_new();
3241 int atk_state_set_add_state(StateSet* this_, StateType type);
3242 void atk_state_set_add_states(StateSet* this_, StateType* types, int n_types);
3243 StateSet* /*new*/ atk_state_set_and_sets(StateSet* this_, StateSet* compare_set);
3244 void atk_state_set_clear_states(StateSet* this_);
3245 int atk_state_set_contains_state(StateSet* this_, StateType type);
3246 int atk_state_set_contains_states(StateSet* this_, StateType* types, int n_types);
3247 int atk_state_set_is_empty(StateSet* this_);
3248 StateSet* /*new*/ atk_state_set_or_sets(StateSet* this_, StateSet* compare_set);
3249 int atk_state_set_remove_state(StateSet* this_, StateType type);
3250 StateSet* /*new*/ atk_state_set_xor_sets(StateSet* this_, StateSet* compare_set);
3251 char* atk_streamable_content_get_mime_type(StreamableContent* this_, int i);
3252 int atk_streamable_content_get_n_mime_types(StreamableContent* this_);
3253 GLib2.IOChannel* /*new*/ atk_streamable_content_get_stream(StreamableContent* this_, char* mime_type);
3254 char* atk_streamable_content_get_uri(StreamableContent* this_, char* mime_type);
3255 int atk_table_add_column_selection(Table* this_, int column);
3256 int atk_table_add_row_selection(Table* this_, int row);
3257 Object* atk_table_get_caption(Table* this_);
3258 int atk_table_get_column_at_index(Table* this_, int index_);
3259 char* atk_table_get_column_description(Table* this_, int column);
3260 int atk_table_get_column_extent_at(Table* this_, int row, int column);
3261 Object* atk_table_get_column_header(Table* this_, int column);
3262 int atk_table_get_index_at(Table* this_, int row, int column);
3263 int atk_table_get_n_columns(Table* this_);
3264 int atk_table_get_n_rows(Table* this_);
3265 int atk_table_get_row_at_index(Table* this_, int index_);
3266 char* atk_table_get_row_description(Table* this_, int row);
3267 int atk_table_get_row_extent_at(Table* this_, int row, int column);
3268 Object* atk_table_get_row_header(Table* this_, int row);
3269 int atk_table_get_selected_columns(Table* this_, int** selected);
3270 int atk_table_get_selected_rows(Table* this_, int** selected);
3271 Object* /*new*/ atk_table_get_summary(Table* this_);
3272 int atk_table_is_column_selected(Table* this_, int column);
3273 int atk_table_is_row_selected(Table* this_, int row);
3274 int atk_table_is_selected(Table* this_, int row, int column);
3275 Object* /*new*/ atk_table_ref_at(Table* this_, int row, int column);
3276 int atk_table_remove_column_selection(Table* this_, int column);
3277 int atk_table_remove_row_selection(Table* this_, int row);
3278 void atk_table_set_caption(Table* this_, Object* caption);
3279 void atk_table_set_column_description(Table* this_, int column, char* description);
3280 void atk_table_set_column_header(Table* this_, int column, Object* header);
3281 void atk_table_set_row_description(Table* this_, int row, char* description);
3282 void atk_table_set_row_header(Table* this_, int row, Object* header);
3283 void atk_table_set_summary(Table* this_, Object* accessible);
3284 int atk_text_add_selection(Text* this_, int start_offset, int end_offset);
3285 TextRange** /*new*/ atk_text_get_bounded_ranges(Text* this_, TextRectangle* rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type);
3286 int atk_text_get_caret_offset(Text* this_);
3287 dchar atk_text_get_character_at_offset(Text* this_, int offset);
3288 int atk_text_get_character_count(Text* this_);
3289 void atk_text_get_character_extents(Text* this_, int offset, int* x, int* y, int* width, int* height, CoordType coords);
3290 AttributeSet* /*new*/ atk_text_get_default_attributes(Text* this_);
3291 int atk_text_get_n_selections(Text* this_);
3292 int atk_text_get_offset_at_point(Text* this_, int x, int y, CoordType coords);
3293 void atk_text_get_range_extents(Text* this_, int start_offset, int end_offset, CoordType coord_type, TextRectangle* rect);
3294 AttributeSet* /*new*/ atk_text_get_run_attributes(Text* this_, int offset, int* start_offset, int* end_offset);
3295 char* /*new*/ atk_text_get_selection(Text* this_, int selection_num, int* start_offset, int* end_offset);
3296 char* /*new*/ atk_text_get_text(Text* this_, int start_offset, int end_offset);
3297 char* /*new*/ atk_text_get_text_after_offset(Text* this_, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset);
3298 char* /*new*/ atk_text_get_text_at_offset(Text* this_, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset);
3299 char* /*new*/ atk_text_get_text_before_offset(Text* this_, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset);
3300 int atk_text_remove_selection(Text* this_, int selection_num);
3301 int atk_text_set_caret_offset(Text* this_, int offset);
3302 int atk_text_set_selection(Text* this_, int selection_num, int start_offset, int end_offset);
3303 void atk_value_get_current_value(Value* this_, GObject2.Value* value);
3304 void atk_value_get_maximum_value(Value* this_, GObject2.Value* value);
3305 void atk_value_get_minimum_increment(Value* this_, GObject2.Value* value);
3306 void atk_value_get_minimum_value(Value* this_, GObject2.Value* value);
3307 int atk_value_set_current_value(Value* this_, GObject2.Value* value);
3308 uint atk_add_focus_tracker(EventListener focus_tracker);
3309 uint atk_add_global_event_listener(GObject2.SignalEmissionHook listener, char* event_type);
3310 uint atk_add_key_event_listener(KeySnoopFunc listener, void* data);
3311 void atk_attribute_set_free(AttributeSet* attrib_set);
3312 void atk_focus_tracker_init(EventListenerInit init);
3313 void atk_focus_tracker_notify(Object* object);
3314 Registry* /*new*/ atk_get_default_registry();
3315 Object* atk_get_focus_object();
3316 Object* atk_get_root();
3317 char* atk_get_toolkit_name();
3318 char* atk_get_toolkit_version();
3319 char* atk_get_version();
3320 RelationType atk_relation_type_for_name(char* name);
3321 char* atk_relation_type_get_name(RelationType type);
3322 RelationType atk_relation_type_register(char* name);
3323 void atk_remove_focus_tracker(uint tracker_id);
3324 void atk_remove_global_event_listener(uint listener_id);
3325 void atk_remove_key_event_listener(uint listener_id);
3326 Role atk_role_for_name(char* name);
3327 char* atk_role_get_localized_name(Role role);
3328 char* atk_role_get_name(Role role);
3329 Role atk_role_register(char* name);
3330 StateType atk_state_type_for_name(char* name);
3331 char* atk_state_type_get_name(StateType type);
3332 StateType atk_state_type_register(char* name);
3333 TextAttribute atk_text_attribute_for_name(char* name);
3334 char* atk_text_attribute_get_name(TextAttribute attr);
3335 char* atk_text_attribute_get_value(TextAttribute attr, int index_);
3336 TextAttribute atk_text_attribute_register(char* name);
3337 void atk_text_free_ranges(TextRange** ranges);