Regenerate, restoring full UpCast functionality.
[girtod.git] / gtk2 / atk.d
blob2e484643414ce2660e52efb9558038efe1ab659d
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 /* Interface */ {
24 mixin template __interface__() {
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) nothrow {
29 return atk_action_do_action(cast(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) nothrow {
37 return atk_action_get_description(cast(Action*)&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) nothrow {
55 return atk_action_get_keybinding(cast(Action*)&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) nothrow {
63 return atk_action_get_localized_name(cast(Action*)&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()() nothrow {
72 return atk_action_get_n_actions(cast(Action*)&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) nothrow {
91 return atk_action_get_name(cast(Action*)&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(AT0)(int i, AT0 /*char*/ desc) nothrow {
99 return atk_action_set_description(cast(Action*)&this, i, toCString!(char*)(desc));
102 mixin __interface__;
105 struct ActionIface {
106 GObject2.TypeInterface parent;
108 // RETURNS: %TRUE if success, %FALSE otherwise
109 // <i>: the action index corresponding to the action to be performed
110 extern (C) int function (Action* action, int i) nothrow do_action;
111 // RETURNS: a the number of actions, or 0 if @action does not
112 extern (C) int function (Action* action) nothrow get_n_actions;
113 // <i>: the action index corresponding to the action to be performed
114 extern (C) char* function (Action* action, int i) nothrow get_description;
115 // <i>: the action index corresponding to the action to be performed
116 extern (C) char* function (Action* action, int i) nothrow get_name;
117 // <i>: the action index corresponding to the action to be performed
118 extern (C) char* function (Action* action, int i) nothrow get_keybinding;
120 // RETURNS: a gboolean representing if the description was successfully set;
121 // <i>: the action index corresponding to the action to be performed
122 // <desc>: the description to be assigned to this action
123 extern (C) int function (Action* action, int i, char* desc) nothrow set_description;
124 // <i>: the action index corresponding to the action to be performed
125 extern (C) char* function (Action* action, int i) nothrow get_localized_name;
126 Function pad2;
129 // A string name/value pair representing a text attribute.
130 struct Attribute {
131 char* name, value;
134 struct Component /* Interface */ {
135 mixin template __interface__() {
136 // Unintrospectable method: add_focus_handler() / atk_component_add_focus_handler()
137 // Add the specified handler to the set of functions to be called
138 // when this object receives focus events (in or out). If the handler is
139 // already added it is not added again
140 // or zero if the handler was already added.
141 // RETURNS: a handler id which can be used in atk_component_remove_focus_handler
142 // <handler>: The #AtkFocusHandler to be attached to @component
143 uint add_focus_handler()(FocusHandler handler) nothrow {
144 return atk_component_add_focus_handler(cast(Component*)&this, handler);
147 // Checks whether the specified point is within the extent of the @component.
148 // the extent of the @component or not
149 // RETURNS: %TRUE or %FALSE indicating whether the specified point is within
150 // <x>: x coordinate
151 // <y>: y coordinate
152 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
153 int contains()(int x, int y, CoordType coord_type) nothrow {
154 return atk_component_contains(cast(Component*)&this, x, y, coord_type);
157 // VERSION: 1.12
158 // Returns the alpha value (i.e. the opacity) for this
159 // (fully opaque).
160 // RETURNS: An alpha value from 0 to 1.0, inclusive.
161 double get_alpha()() nothrow {
162 return atk_component_get_alpha(cast(Component*)&this);
165 // Gets the rectangle which gives the extent of the @component.
166 // <x>: address of #gint to put x coordinate
167 // <y>: address of #gint to put y coordinate
168 // <width>: address of #gint to put width
169 // <height>: address of #gint to put height
170 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
171 void get_extents()(int* x, int* y, int* width, int* height, CoordType coord_type) nothrow {
172 atk_component_get_extents(cast(Component*)&this, x, y, width, height, coord_type);
175 // Gets the layer of the component.
176 // RETURNS: an #AtkLayer which is the layer of the component
177 Layer get_layer()() nothrow {
178 return atk_component_get_layer(cast(Component*)&this);
181 // Gets the zorder of the component. The value G_MININT will be returned
182 // if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
183 // which the component is shown in relation to other components in the same
184 // container.
185 // RETURNS: a gint which is the zorder of the component, i.e. the depth at
186 int get_mdi_zorder()() nothrow {
187 return atk_component_get_mdi_zorder(cast(Component*)&this);
190 // Gets the position of @component in the form of
191 // a point specifying @component's top-left corner.
192 // <x>: address of #gint to put x coordinate position
193 // <y>: address of #gint to put y coordinate position
194 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
195 void get_position()(int* x, int* y, CoordType coord_type) nothrow {
196 atk_component_get_position(cast(Component*)&this, x, y, coord_type);
199 // Gets the size of the @component in terms of width and height.
200 // <width>: address of #gint to put width of @component
201 // <height>: address of #gint to put height of @component
202 void get_size()(int* width, int* height) nothrow {
203 atk_component_get_size(cast(Component*)&this, width, height);
206 // Grabs focus for this @component.
207 // RETURNS: %TRUE if successful, %FALSE otherwise.
208 int grab_focus()() nothrow {
209 return atk_component_grab_focus(cast(Component*)&this);
212 // Gets a reference to the accessible child, if one exists, at the
213 // coordinate point specified by @x and @y.
214 // RETURNS: a reference to the accessible child, if one exists
215 // <x>: x coordinate
216 // <y>: y coordinate
217 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
218 Object* /*new*/ ref_accessible_at_point()(int x, int y, CoordType coord_type) nothrow {
219 return atk_component_ref_accessible_at_point(cast(Component*)&this, x, y, coord_type);
222 // Remove the handler specified by @handler_id from the list of
223 // functions to be executed when this object receives focus events
224 // (in or out).
225 // <handler_id>: the handler id of the focus handler to be removed from @component
226 void remove_focus_handler()(uint handler_id) nothrow {
227 atk_component_remove_focus_handler(cast(Component*)&this, handler_id);
230 // Sets the extents of @component.
231 // RETURNS: %TRUE or %FALSE whether the extents were set or not
232 // <x>: x coordinate
233 // <y>: y coordinate
234 // <width>: width to set for @component
235 // <height>: height to set for @component
236 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
237 int set_extents()(int x, int y, int width, int height, CoordType coord_type) nothrow {
238 return atk_component_set_extents(cast(Component*)&this, x, y, width, height, coord_type);
241 // Sets the postition of @component.
242 // RETURNS: %TRUE or %FALSE whether or not the position was set or not
243 // <x>: x coordinate
244 // <y>: y coordinate
245 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
246 int set_position()(int x, int y, CoordType coord_type) nothrow {
247 return atk_component_set_position(cast(Component*)&this, x, y, coord_type);
250 // Set the size of the @component in terms of width and height.
251 // RETURNS: %TRUE or %FALSE whether the size was set or not
252 // <width>: width to set for @component
253 // <height>: height to set for @component
254 int set_size()(int width, int height) nothrow {
255 return atk_component_set_size(cast(Component*)&this, width, height);
257 extern (C) alias static void function (Component* this_, Rectangle* object, void* user_data=null) nothrow signal_bounds_changed;
259 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
260 return super_.signal_connect!name(cb, data, cf);
263 ulong signal_connect(string name:"bounds-changed", CB/*:signal_bounds_changed*/)
264 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
265 if (is(typeof(cb)==signal_bounds_changed)||_ttmm!(CB, signal_bounds_changed)()) {
266 return signal_connect_data!()(&this, cast(char*)"bounds-changed",
267 cast(GObject2.Callback)cb, data, null, cf);
270 mixin __interface__;
273 struct ComponentIface {
274 GObject2.TypeInterface parent;
276 // Unintrospectable functionp: add_focus_handler() / ()
278 // RETURNS: a handler id which can be used in atk_component_remove_focus_handler
279 // <handler>: The #AtkFocusHandler to be attached to @component
280 extern (C) uint function (Component* component, FocusHandler handler) nothrow add_focus_handler;
282 // RETURNS: %TRUE or %FALSE indicating whether the specified point is within
283 // <x>: x coordinate
284 // <y>: y coordinate
285 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
286 extern (C) int function (Component* component, int x, int y, CoordType coord_type) nothrow contains;
288 // RETURNS: a reference to the accessible child, if one exists
289 // <x>: x coordinate
290 // <y>: y coordinate
291 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
292 extern (C) Object* /*new*/ function (Component* component, int x, int y, CoordType coord_type) nothrow ref_accessible_at_point;
294 // <x>: address of #gint to put x coordinate
295 // <y>: address of #gint to put y coordinate
296 // <width>: address of #gint to put width
297 // <height>: address of #gint to put height
298 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
299 extern (C) void function (Component* component, int* x, int* y, int* width, int* height, CoordType coord_type) nothrow get_extents;
301 // <x>: address of #gint to put x coordinate position
302 // <y>: address of #gint to put y coordinate position
303 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
304 extern (C) void function (Component* component, int* x, int* y, CoordType coord_type) nothrow get_position;
306 // <width>: address of #gint to put width of @component
307 // <height>: address of #gint to put height of @component
308 extern (C) void function (Component* component, int* width, int* height) nothrow get_size;
309 // RETURNS: %TRUE if successful, %FALSE otherwise.
310 extern (C) int function (Component* component) nothrow grab_focus;
311 // <handler_id>: the handler id of the focus handler to be removed from @component
312 extern (C) void function (Component* component, uint handler_id) nothrow remove_focus_handler;
314 // RETURNS: %TRUE or %FALSE whether the extents were set or not
315 // <x>: x coordinate
316 // <y>: y coordinate
317 // <width>: width to set for @component
318 // <height>: height to set for @component
319 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
320 extern (C) int function (Component* component, int x, int y, int width, int height, CoordType coord_type) nothrow set_extents;
322 // RETURNS: %TRUE or %FALSE whether or not the position was set or not
323 // <x>: x coordinate
324 // <y>: y coordinate
325 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
326 extern (C) int function (Component* component, int x, int y, CoordType coord_type) nothrow set_position;
328 // RETURNS: %TRUE or %FALSE whether the size was set or not
329 // <width>: width to set for @component
330 // <height>: height to set for @component
331 extern (C) int function (Component* component, int width, int height) nothrow set_size;
332 // RETURNS: an #AtkLayer which is the layer of the component
333 extern (C) Layer function (Component* component) nothrow get_layer;
334 // RETURNS: a gint which is the zorder of the component, i.e. the depth at
335 extern (C) int function (Component* component) nothrow get_mdi_zorder;
336 extern (C) void function (Component* component, Rectangle* bounds) nothrow bounds_changed;
337 // RETURNS: An alpha value from 0 to 1.0, inclusive.
338 extern (C) double function (Component* component) nothrow get_alpha;
341 enum CoordType {
342 SCREEN = 0,
343 WINDOW = 1
345 struct Document /* Interface */ {
346 mixin template __interface__() {
347 // VERSION: 1.12
348 // document, or NULL if a value for #attribute_name has not been specified
349 // for this document.
350 // RETURNS: a string value associated with the named attribute for this
351 // <attribute_name>: a character string representing the name of the attribute whose value is being queried.
352 char* get_attribute_value(AT0)(AT0 /*char*/ attribute_name) nothrow {
353 return atk_document_get_attribute_value(cast(Document*)&this, toCString!(char*)(attribute_name));
356 // VERSION: 1.12
357 // Gets an AtkAttributeSet which describes document-wide
358 // attributes as name-value pairs.
359 // set name-value-pair attributes associated with this document
360 // as a whole.
361 // RETURNS: An AtkAttributeSet containing the explicitly
362 AttributeSet* get_attributes()() nothrow {
363 return atk_document_get_attributes(cast(Document*)&this);
366 // Gets a %gpointer that points to an instance of the DOM. It is
367 // up to the caller to check atk_document_get_type to determine
368 // how to cast this pointer.
369 // RETURNS: a %gpointer that points to an instance of the DOM.
370 void* get_document()() nothrow {
371 return atk_document_get_document(cast(Document*)&this);
374 // Gets a string indicating the document type.
375 // RETURNS: a string indicating the document type
376 char* get_document_type()() nothrow {
377 return atk_document_get_document_type(cast(Document*)&this);
380 // Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale
381 // of the content of this document instance. Individual
382 // text substrings or images within this document may have
383 // a different locale, see atk_text_get_attributes and
384 // atk_image_get_image_locale.
385 // locale of the document content as a whole, or NULL if
386 // the document content does not specify a locale.
387 // RETURNS: a UTF-8 string indicating the POSIX-style LC_MESSAGES
388 char* get_locale()() nothrow {
389 return atk_document_get_locale(cast(Document*)&this);
392 // VERSION: 1.12
393 // for this document, FALSE otherwise (e.g. if the document does not
394 // allow the attribute to be modified).
395 // RETURNS: TRUE if #value is successfully associated with #attribute_name
396 // <attribute_name>: a character string representing the name of the attribute whose value is being set.
397 // <attribute_value>: a string value to be associated with #attribute_name.
398 int set_attribute_value(AT0, AT1)(AT0 /*char*/ attribute_name, AT1 /*char*/ attribute_value) nothrow {
399 return atk_document_set_attribute_value(cast(Document*)&this, toCString!(char*)(attribute_name), toCString!(char*)(attribute_value));
401 extern (C) alias static void function (Document* this_, void* user_data=null) nothrow signal_load_complete;
403 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
404 return super_.signal_connect!name(cb, data, cf);
407 ulong signal_connect(string name:"load-complete", CB/*:signal_load_complete*/)
408 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
409 if (is(typeof(cb)==signal_load_complete)||_ttmm!(CB, signal_load_complete)()) {
410 return signal_connect_data!()(&this, cast(char*)"load-complete",
411 cast(GObject2.Callback)cb, data, null, cf);
413 extern (C) alias static void function (Document* this_, void* user_data=null) nothrow signal_load_stopped;
414 ulong signal_connect(string name:"load-stopped", CB/*:signal_load_stopped*/)
415 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
416 if (is(typeof(cb)==signal_load_stopped)||_ttmm!(CB, signal_load_stopped)()) {
417 return signal_connect_data!()(&this, cast(char*)"load-stopped",
418 cast(GObject2.Callback)cb, data, null, cf);
420 extern (C) alias static void function (Document* this_, void* user_data=null) nothrow signal_reload;
421 ulong signal_connect(string name:"reload", CB/*:signal_reload*/)
422 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
423 if (is(typeof(cb)==signal_reload)||_ttmm!(CB, signal_reload)()) {
424 return signal_connect_data!()(&this, cast(char*)"reload",
425 cast(GObject2.Callback)cb, data, null, cf);
428 mixin __interface__;
431 struct DocumentIface {
432 GObject2.TypeInterface parent;
433 // RETURNS: a string indicating the document type
434 extern (C) char* function (Document* document) nothrow get_document_type;
435 // RETURNS: a %gpointer that points to an instance of the DOM.
436 extern (C) void* function (Document* document) nothrow get_document;
437 extern (C) char* function (Document* document) nothrow get_document_locale;
438 // Unintrospectable functionp: get_document_attributes() / ()
439 extern (C) AttributeSet* function (Document* document) nothrow get_document_attributes;
440 extern (C) char* function (Document* document, char* attribute_name) nothrow get_document_attribute_value;
441 extern (C) int function (Document* document, char* attribute_name, char* attribute_value) nothrow set_document_attribute;
442 Function pad1, pad2, pad3, pad4;
445 struct EditableText /* Interface */ {
446 mixin template __interface__() {
447 // Copy text from @start_pos up to, but not including @end_pos
448 // to the clipboard.
449 // <start_pos>: start position
450 // <end_pos>: end position
451 void copy_text()(int start_pos, int end_pos) nothrow {
452 atk_editable_text_copy_text(cast(EditableText*)&this, start_pos, end_pos);
455 // Copy text from @start_pos up to, but not including @end_pos
456 // to the clipboard and then delete from the widget.
457 // <start_pos>: start position
458 // <end_pos>: end position
459 void cut_text()(int start_pos, int end_pos) nothrow {
460 atk_editable_text_cut_text(cast(EditableText*)&this, start_pos, end_pos);
463 // Delete text @start_pos up to, but not including @end_pos.
464 // <start_pos>: start position
465 // <end_pos>: end position
466 void delete_text()(int start_pos, int end_pos) nothrow {
467 atk_editable_text_delete_text(cast(EditableText*)&this, start_pos, end_pos);
470 // Insert text at a given position.
471 // <string>: the text to insert
472 // <length>: the length of text to insert, in bytes
473 // <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.
474 void insert_text(AT0)(AT0 /*char*/ string_, int length, int* position) nothrow {
475 atk_editable_text_insert_text(cast(EditableText*)&this, toCString!(char*)(string_), length, position);
478 // Paste text from clipboard to specified @position.
479 // <position>: position to paste
480 void paste_text()(int position) nothrow {
481 atk_editable_text_paste_text(cast(EditableText*)&this, position);
483 int set_run_attributes(AT0)(AT0 /*AttributeSet*/ attrib_set, int start_offset, int end_offset) nothrow {
484 return atk_editable_text_set_run_attributes(cast(EditableText*)&this, UpCast!(AttributeSet*)(attrib_set), start_offset, end_offset);
487 // Set text contents of @text.
488 // <string>: string to set for text contents of @text
489 void set_text_contents(AT0)(AT0 /*char*/ string_) nothrow {
490 atk_editable_text_set_text_contents(cast(EditableText*)&this, toCString!(char*)(string_));
493 mixin __interface__;
496 struct EditableTextIface {
497 GObject2.TypeInterface parent_interface;
498 extern (C) int function (EditableText* text, AttributeSet* attrib_set, int start_offset, int end_offset) nothrow set_run_attributes;
499 // <string>: string to set for text contents of @text
500 extern (C) void function (EditableText* text, char* string_) nothrow set_text_contents;
502 // <string>: the text to insert
503 // <length>: the length of text to insert, in bytes
504 // <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.
505 extern (C) void function (EditableText* text, char* string_, int length, int* position) nothrow insert_text;
507 // <start_pos>: start position
508 // <end_pos>: end position
509 extern (C) void function (EditableText* text, int start_pos, int end_pos) nothrow copy_text;
511 // <start_pos>: start position
512 // <end_pos>: end position
513 extern (C) void function (EditableText* text, int start_pos, int end_pos) nothrow cut_text;
515 // <start_pos>: start position
516 // <end_pos>: end position
517 extern (C) void function (EditableText* text, int start_pos, int end_pos) nothrow delete_text;
518 // <position>: position to paste
519 extern (C) void function (EditableText* text, int position) nothrow paste_text;
520 Function pad1, pad2;
524 // A function which is called when an object emits a matching event,
525 // as used in #atk_add_focus_tracker.
526 // Currently the only events for which object-specific handlers are
527 // supported are events of type "focus:". Most clients of ATK will prefer to
528 // attach signal handlers for the various ATK signals instead.
529 // see atk_add_focus_tracker.
530 // <obj>: An #AtkObject instance for whom the callback will be called when the specified event (e.g. 'focus:') takes place.
531 extern (C) alias void function (Object* obj) nothrow EventListener;
534 // An #AtkEventListenerInit function is a special function that is
535 // called in order to initialize the per-object event registration system
536 // used by #AtkEventListener, if any preparation is required.
537 // see atk_focus_tracker_init.
538 extern (C) alias void function () nothrow EventListenerInit;
540 extern (C) alias void function (Object* arg_a, int arg_b) nothrow FocusHandler;
542 extern (C) alias int function (void* data) nothrow Function;
544 struct GObjectAccessible /* : Object */ {
545 alias parent this;
546 alias parent super_;
547 alias parent object;
548 Object parent;
551 // Gets the accessible object for the specified @obj.
552 // the @obj
553 // RETURNS: a #AtkObject which is the accessible object for
554 // <obj>: a #GObject
555 static Object* for_object(AT0)(AT0 /*GObject2.Object*/ obj) nothrow {
556 return atk_gobject_accessible_for_object(UpCast!(GObject2.Object*)(obj));
559 // Gets the GObject for which @obj is the accessible object.
560 // the accessible object
561 // RETURNS: a #GObject which is the object for which @obj is
562 GObject2.Object* get_object()() nothrow {
563 return atk_gobject_accessible_get_object(&this);
567 struct GObjectAccessibleClass {
568 ObjectClass parent_class;
569 Function pad1, pad2;
572 struct Hyperlink /* : GObject.Object */ {
573 mixin Action.__interface__;
574 alias parent this;
575 alias parent super_;
576 alias parent object;
577 GObject2.Object parent;
580 // Gets the index with the hypertext document at which this link ends.
581 // RETURNS: the index with the hypertext document at which this link ends
582 int get_end_index()() nothrow {
583 return atk_hyperlink_get_end_index(&this);
586 // Gets the number of anchors associated with this hyperlink.
587 // RETURNS: the number of anchors associated with this hyperlink
588 int get_n_anchors()() nothrow {
589 return atk_hyperlink_get_n_anchors(&this);
592 // Returns the item associated with this hyperlinks nth anchor.
593 // For instance, the returned #AtkObject will implement #AtkText
594 // if @link_ is a text hyperlink, #AtkImage if @link_ is an image
595 // hyperlink etc.
596 // Multiple anchors are primarily used by client-side image maps.
597 // i-th anchor
598 // RETURNS: an #AtkObject associated with this hyperlinks
599 // <i>: a (zero-index) integer specifying the desired anchor
600 Object* get_object()(int i) nothrow {
601 return atk_hyperlink_get_object(&this, i);
604 // Gets the index with the hypertext document at which this link begins.
605 // RETURNS: the index with the hypertext document at which this link begins
606 int get_start_index()() nothrow {
607 return atk_hyperlink_get_start_index(&this);
610 // Get a the URI associated with the anchor specified
611 // by @i of @link_.
612 // Multiple anchors are primarily used by client-side image maps.
613 // RETURNS: a string specifying the URI
614 // <i>: a (zero-index) integer specifying the desired anchor
615 char* /*new*/ get_uri()(int i) nothrow {
616 return atk_hyperlink_get_uri(&this, i);
619 // Indicates whether the link currently displays some or all of its
620 // content inline. Ordinary HTML links will usually return
621 // %FALSE, but an inline &lt;src&gt; HTML element will return
622 // %TRUE.
623 // RETURNS: whether or not this link displays its content inline.
624 int is_inline()() nothrow {
625 return atk_hyperlink_is_inline(&this);
628 // Since the document that a link is associated with may have changed
629 // this method returns %TRUE if the link is still valid (with
630 // respect to the document it references) and %FALSE otherwise.
631 // RETURNS: whether or not this link is still valid
632 int is_valid()() nothrow {
633 return atk_hyperlink_is_valid(&this);
635 extern (C) alias static void function (Hyperlink* this_, void* user_data=null) nothrow signal_link_activated;
637 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
638 return super_.signal_connect!name(cb, data, cf);
641 ulong signal_connect(string name:"link-activated", CB/*:signal_link_activated*/)
642 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
643 if (is(typeof(cb)==signal_link_activated)||_ttmm!(CB, signal_link_activated)()) {
644 return signal_connect_data!()(&this, cast(char*)"link-activated",
645 cast(GObject2.Callback)cb, data, null, cf);
649 struct HyperlinkClass {
650 GObject2.ObjectClass parent;
652 // RETURNS: a string specifying the URI
653 // <i>: a (zero-index) integer specifying the desired anchor
654 extern (C) char* /*new*/ function (Hyperlink* link_, int i) nothrow get_uri;
656 // RETURNS: an #AtkObject associated with this hyperlinks
657 // <i>: a (zero-index) integer specifying the desired anchor
658 extern (C) Object* function (Hyperlink* link_, int i) nothrow get_object;
659 // RETURNS: the index with the hypertext document at which this link ends
660 extern (C) int function (Hyperlink* link_) nothrow get_end_index;
661 // RETURNS: the index with the hypertext document at which this link begins
662 extern (C) int function (Hyperlink* link_) nothrow get_start_index;
663 // RETURNS: whether or not this link is still valid
664 extern (C) int function (Hyperlink* link_) nothrow is_valid;
665 // RETURNS: the number of anchors associated with this hyperlink
666 extern (C) int function (Hyperlink* link_) nothrow get_n_anchors;
667 extern (C) uint function (Hyperlink* link_) nothrow link_state;
668 extern (C) int function (Hyperlink* link_) nothrow is_selected_link;
669 extern (C) void function (Hyperlink* link_) nothrow link_activated;
670 Function pad1;
673 struct HyperlinkImpl /* Interface */ {
674 mixin template __interface__() {
675 // VERSION: 1.12
676 // Gets the hyperlink associated with this object.
677 // implementing AtkObject.
678 // RETURNS: an AtkHyperlink object which points to this
679 Hyperlink* /*new*/ get_hyperlink()() nothrow {
680 return atk_hyperlink_impl_get_hyperlink(cast(HyperlinkImpl*)&this);
683 mixin __interface__;
686 struct HyperlinkImplIface {
687 GObject2.TypeInterface parent;
688 // RETURNS: an AtkHyperlink object which points to this
689 extern (C) Hyperlink* /*new*/ function (HyperlinkImpl* impl) nothrow get_hyperlink;
690 Function pad1;
693 enum HyperlinkStateFlags {
694 INLINE = 1
696 struct Hypertext /* Interface */ {
697 mixin template __interface__() {
698 // Gets the link in this hypertext document at index
699 // index @link_index
700 // RETURNS: the link in this hypertext document at
701 // <link_index>: an integer specifying the desired link
702 Hyperlink* get_link()(int link_index) nothrow {
703 return atk_hypertext_get_link(cast(Hypertext*)&this, link_index);
706 // Gets the index into the array of hyperlinks that is associated with
707 // the character specified by @char_index.
708 // or -1 if there is no hyperlink associated with this character.
709 // RETURNS: an index into the array of hyperlinks in @hypertext,
710 // <char_index>: a character index
711 int get_link_index()(int char_index) nothrow {
712 return atk_hypertext_get_link_index(cast(Hypertext*)&this, char_index);
715 // Gets the number of links within this hypertext document.
716 // RETURNS: the number of links within this hypertext document
717 int get_n_links()() nothrow {
718 return atk_hypertext_get_n_links(cast(Hypertext*)&this);
720 extern (C) alias static void function (Hypertext* this_, int object, void* user_data=null) nothrow signal_link_selected;
722 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
723 return super_.signal_connect!name(cb, data, cf);
726 ulong signal_connect(string name:"link-selected", CB/*:signal_link_selected*/)
727 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
728 if (is(typeof(cb)==signal_link_selected)||_ttmm!(CB, signal_link_selected)()) {
729 return signal_connect_data!()(&this, cast(char*)"link-selected",
730 cast(GObject2.Callback)cb, data, null, cf);
733 mixin __interface__;
736 struct HypertextIface {
737 GObject2.TypeInterface parent;
739 // RETURNS: the link in this hypertext document at
740 // <link_index>: an integer specifying the desired link
741 extern (C) Hyperlink* function (Hypertext* hypertext, int link_index) nothrow get_link;
742 // RETURNS: the number of links within this hypertext document
743 extern (C) int function (Hypertext* hypertext) nothrow get_n_links;
745 // RETURNS: an index into the array of hyperlinks in @hypertext,
746 // <char_index>: a character index
747 extern (C) int function (Hypertext* hypertext, int char_index) nothrow get_link_index;
748 extern (C) void function (Hypertext* hypertext, int link_index) nothrow link_selected;
749 Function pad1, pad2, pad3;
752 struct Image /* Interface */ {
753 mixin template __interface__() {
754 // Get a textual description of this image.
755 // RETURNS: a string representing the image description
756 char* get_image_description()() nothrow {
757 return atk_image_get_image_description(cast(Image*)&this);
760 // Since ATK 1.12
761 // 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.
762 char* get_image_locale()() nothrow {
763 return atk_image_get_image_locale(cast(Image*)&this);
766 // Gets the position of the image in the form of a point specifying the
767 // images top-left corner.
768 // <x>: address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
769 // <y>: address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
770 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
771 void get_image_position()(int* x, int* y, CoordType coord_type) nothrow {
772 atk_image_get_image_position(cast(Image*)&this, x, y, coord_type);
775 // Get the width and height in pixels for the specified image.
776 // The values of @width and @height are returned as -1 if the
777 // values cannot be obtained (for instance, if the object is not onscreen).
778 // <width>: filled with the image width, or -1 if the value cannot be obtained.
779 // <height>: filled with the image height, or -1 if the value cannot be obtained.
780 void get_image_size()(int* width, int* height) nothrow {
781 atk_image_get_image_size(cast(Image*)&this, width, height);
784 // Sets the textual description for this image.
785 // not be completed.
786 // RETURNS: boolean TRUE, or FALSE if operation could
787 // <description>: a string description to set for @image
788 int set_image_description(AT0)(AT0 /*char*/ description) nothrow {
789 return atk_image_set_image_description(cast(Image*)&this, toCString!(char*)(description));
792 mixin __interface__;
795 struct ImageIface {
796 GObject2.TypeInterface parent;
798 // <x>: address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained.
799 // <y>: address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained.
800 // <coord_type>: specifies whether the coordinates are relative to the screen or to the components top level window
801 extern (C) void function (Image* image, int* x, int* y, CoordType coord_type) nothrow get_image_position;
802 // RETURNS: a string representing the image description
803 extern (C) char* function (Image* image) nothrow get_image_description;
805 // <width>: filled with the image width, or -1 if the value cannot be obtained.
806 // <height>: filled with the image height, or -1 if the value cannot be obtained.
807 extern (C) void function (Image* image, int* width, int* height) nothrow get_image_size;
809 // RETURNS: boolean TRUE, or FALSE if operation could
810 // <description>: a string description to set for @image
811 extern (C) int function (Image* image, char* description) nothrow set_image_description;
812 extern (C) char* function (Image* image) nothrow get_image_locale;
813 Function pad1;
816 struct Implementor {
818 // Gets a reference to an object's #AtkObject implementation, if
819 // the object implements #AtkObjectIface
820 // implementation
821 // RETURNS: a reference to an object's #AtkObject
822 Object* /*new*/ ref_accessible()() nothrow {
823 return atk_implementor_ref_accessible(&this);
827 struct ImplementorIface /* Interface */ {
828 mixin template __interface__() { }
829 mixin __interface__;
832 // Encapsulates information about a key event.
833 struct KeyEventStruct {
834 int type;
835 uint state, keyval;
836 int length;
837 char* string_;
838 ushort keycode;
839 uint timestamp;
842 enum KeyEventType {
843 PRESS = 0,
844 RELEASE = 1,
845 LAST_DEFINED = 2
848 // An #AtkKeySnoopFunc is a type of callback which is called whenever a key event occurs,
849 // if registered via atk_add_key_event_listener. It allows for pre-emptive
850 // interception of key events via the return code as described below.
851 // discarded without being passed to the normal GUI recipient; FALSE (zero) if the
852 // event dispatch to the client application should proceed as normal.
853 // see atk_add_key_event_listener.
854 // RETURNS: TRUE (nonzero) if the event emission should be stopped and the event
855 // <event>: an AtkKeyEventStruct containing information about the key event for which notification is being given.
856 // <func_data>: a block of data which will be passed to the event listener, on notification.
857 extern (C) alias int function (KeyEventStruct* event, void* func_data) nothrow KeySnoopFunc;
859 enum Layer {
860 INVALID = 0,
861 BACKGROUND = 1,
862 CANVAS = 2,
863 WIDGET = 3,
864 MDI = 4,
865 POPUP = 5,
866 OVERLAY = 6,
867 WINDOW = 7
869 struct Misc /* : GObject.Object */ {
870 alias parent this;
871 alias parent super_;
872 alias parent object;
873 GObject2.Object parent;
876 // VERSION: 1.13
877 // Obtain the singleton instance of AtkMisc for this application.
878 // RETURNS: The singleton instance of AtkMisc for this application.
879 static Misc* get_instance()() nothrow {
880 return atk_misc_get_instance();
883 // VERSION: 1.13
884 // Take the thread mutex for the GUI toolkit,
885 // if one exists.
886 // (This method is implemented by the toolkit ATK implementation layer;
887 // for instance, for GTK+, GAIL implements this via GDK_THREADS_ENTER).
888 void threads_enter()() nothrow {
889 atk_misc_threads_enter(&this);
892 // VERSION: 1.13
893 // Release the thread mutex for the GUI toolkit,
894 // if one exists. This method, and atk_misc_threads_enter,
895 // are needed in some situations by threaded application code which
896 // services ATK requests, since fulfilling ATK requests often
897 // requires calling into the GUI toolkit. If a long-running or
898 // potentially blocking call takes place inside such a block, it should
899 // be bracketed by atk_misc_threads_leave/atk_misc_threads_enter calls.
900 // (This method is implemented by the toolkit ATK implementation layer;
901 // for instance, for GTK+, GAIL implements this via GDK_THREADS_LEAVE).
902 void threads_leave()() nothrow {
903 atk_misc_threads_leave(&this);
907 struct MiscClass {
908 GObject2.ObjectClass parent;
909 extern (C) void function (Misc* misc) nothrow threads_enter;
910 extern (C) void function (Misc* misc) nothrow threads_leave;
911 void*[32] vfuncs;
914 struct NoOpObject /* : Object */ {
915 mixin Action.__interface__;
916 mixin Component.__interface__;
917 mixin Document.__interface__;
918 mixin EditableText.__interface__;
919 mixin Hypertext.__interface__;
920 mixin Image.__interface__;
921 mixin Selection.__interface__;
922 mixin Table.__interface__;
923 mixin Text.__interface__;
924 mixin Value.__interface__;
925 mixin Window.__interface__;
926 alias parent this;
927 alias parent super_;
928 alias parent object;
929 Object parent;
932 // Provides a default (non-functioning stub) #AtkObject.
933 // Application maintainers should not use this method.
934 // RETURNS: a default (non-functioning stub) #AtkObject
935 // <obj>: a #GObject
936 static NoOpObject* /*new*/ new_(AT0)(AT0 /*GObject2.Object*/ obj) nothrow {
937 return atk_no_op_object_new(UpCast!(GObject2.Object*)(obj));
939 static auto opCall(AT0)(AT0 /*GObject2.Object*/ obj) {
940 return atk_no_op_object_new(UpCast!(GObject2.Object*)(obj));
944 struct NoOpObjectClass {
945 ObjectClass parent_class;
948 struct NoOpObjectFactory /* : ObjectFactory */ {
949 alias parent this;
950 alias parent super_;
951 alias parent objectfactory;
952 ObjectFactory parent;
955 // Creates an instance of an #AtkObjectFactory which generates primitive
956 // (non-functioning) #AtkObjects.
957 // RETURNS: an instance of an #AtkObjectFactory
958 static NoOpObjectFactory* /*new*/ new_()() nothrow {
959 return atk_no_op_object_factory_new();
961 static auto opCall()() {
962 return atk_no_op_object_factory_new();
966 struct NoOpObjectFactoryClass {
967 ObjectFactoryClass parent_class;
970 struct Object /* : GObject.Object */ {
971 alias parent this;
972 alias parent super_;
973 alias parent object;
974 GObject2.Object parent;
975 char* description, name;
976 Object* accessible_parent;
977 Role role;
978 RelationSet* relation_set;
979 Layer layer;
982 // Adds a relationship of the specified type with the specified target.
983 // Returns TRUE if the relationship is added.
984 // <relationship>: The #AtkRelationType of the relation
985 // <target>: The #AtkObject which is to be the target of the relation.
986 int add_relationship(AT0)(RelationType relationship, AT0 /*Object*/ target) nothrow {
987 return atk_object_add_relationship(&this, relationship, UpCast!(Object*)(target));
990 // Unintrospectable method: connect_property_change_handler() / atk_object_connect_property_change_handler()
991 // Specifies a function to be called when a property changes value.
992 // atk_object_remove_property_change_handler()
993 // RETURNS: a #guint which is the handler id used in
994 // <handler>: a function to be called when a property changes its value
995 uint connect_property_change_handler(AT0)(AT0 /*PropertyChangeHandler*/ handler) nothrow {
996 return atk_object_connect_property_change_handler(&this, UpCast!(PropertyChangeHandler*)(handler));
999 // VERSION: 1.12
1000 // Get a list of properties applied to this object as a whole, as an #AtkAttributeSet consisting of
1001 // name-value pairs. As such these attributes may be considered weakly-typed properties or annotations,
1002 // as distinct from strongly-typed object data available via other get/set methods.
1003 // Not all objects have explicit "name-value pair" #AtkAttributeSet properties.
1004 // properties/annotations applied to the object, or an empty set if the object
1005 // has no name-value pair attributes assigned to it.
1006 // RETURNS: an #AtkAttributeSet consisting of all explicit
1007 AttributeSet* get_attributes()() nothrow {
1008 return atk_object_get_attributes(&this);
1011 // Gets the accessible description of the accessible.
1012 // of the accessible.
1013 // RETURNS: a character string representing the accessible description
1014 char* get_description()() nothrow {
1015 return atk_object_get_description(&this);
1018 // Gets the 0-based index of this accessible in its parent; returns -1 if the
1019 // accessible does not have an accessible parent.
1020 // RETURNS: an integer which is the index of the accessible in its parent
1021 int get_index_in_parent()() nothrow {
1022 return atk_object_get_index_in_parent(&this);
1025 // Gets the number of accessible children of the accessible.
1026 // of the accessible.
1027 // RETURNS: an integer representing the number of accessible children
1028 int get_n_accessible_children()() nothrow {
1029 return atk_object_get_n_accessible_children(&this);
1032 // Gets the accessible name of the accessible.
1033 // RETURNS: a character string representing the accessible name of the object.
1034 char* get_name()() nothrow {
1035 return atk_object_get_name(&this);
1038 // Gets the accessible parent of the accessible.
1039 // of the accessible
1040 // RETURNS: a #AtkObject representing the accessible parent
1041 Object* get_parent()() nothrow {
1042 return atk_object_get_parent(&this);
1045 // Gets the role of the accessible.
1046 // RETURNS: an #AtkRole which is the role of the accessible
1047 Role get_role()() nothrow {
1048 return atk_object_get_role(&this);
1051 // This function is called when implementing subclasses of #AtkObject.
1052 // It does initialization required for the new object. It is intended
1053 // that this function should called only in the ..._new() functions used
1054 // to create an instance of a subclass of #AtkObject
1055 // <data>: a #gpointer which identifies the object for which the AtkObject was created.
1056 void initialize(AT0)(AT0 /*void*/ data) nothrow {
1057 atk_object_initialize(&this, UpCast!(void*)(data));
1060 // Emits a state-change signal for the specified state.
1061 // <state>: an #AtkState whose state is changed
1062 // <value>: a gboolean which indicates whether the state is being set on or off
1063 void notify_state_change()(State state, int value) nothrow {
1064 atk_object_notify_state_change(&this, state, value);
1067 // Gets a reference to the specified accessible child of the object.
1068 // The accessible children are 0-based so the first accessible child is
1069 // at index 0, the second at index 1 and so on.
1070 // accessible child of the accessible.
1071 // RETURNS: an #AtkObject representing the specified
1072 // <i>: a gint representing the position of the child, starting from 0
1073 Object* /*new*/ ref_accessible_child()(int i) nothrow {
1074 return atk_object_ref_accessible_child(&this, i);
1077 // Gets the #AtkRelationSet associated with the object.
1078 // of the object.
1079 // RETURNS: an #AtkRelationSet representing the relation set
1080 RelationSet* /*new*/ ref_relation_set()() nothrow {
1081 return atk_object_ref_relation_set(&this);
1084 // Gets a reference to the state set of the accessible; the caller must
1085 // unreference it when it is no longer needed.
1086 // set of the accessible
1087 // RETURNS: a reference to an #AtkStateSet which is the state
1088 StateSet* /*new*/ ref_state_set()() nothrow {
1089 return atk_object_ref_state_set(&this);
1092 // Removes a property change handler.
1093 // <handler_id>: a guint which identifies the handler to be removed.
1094 void remove_property_change_handler()(uint handler_id) nothrow {
1095 atk_object_remove_property_change_handler(&this, handler_id);
1098 // Removes a relationship of the specified type with the specified target.
1099 // Returns TRUE if the relationship is removed.
1100 // <relationship>: The #AtkRelationType of the relation
1101 // <target>: The #AtkObject which is the target of the relation to be removed.
1102 int remove_relationship(AT0)(RelationType relationship, AT0 /*Object*/ target) nothrow {
1103 return atk_object_remove_relationship(&this, relationship, UpCast!(Object*)(target));
1106 // Sets the accessible description of the accessible.
1107 // <description>: a character string to be set as the accessible description
1108 void set_description(AT0)(AT0 /*char*/ description) nothrow {
1109 atk_object_set_description(&this, toCString!(char*)(description));
1112 // Sets the accessible name of the accessible.
1113 // <name>: a character string to be set as the accessible name
1114 void set_name(AT0)(AT0 /*char*/ name) nothrow {
1115 atk_object_set_name(&this, toCString!(char*)(name));
1118 // Sets the accessible parent of the accessible.
1119 // <parent>: an #AtkObject to be set as the accessible parent
1120 void set_parent(AT0)(AT0 /*Object*/ parent) nothrow {
1121 atk_object_set_parent(&this, UpCast!(Object*)(parent));
1124 // Sets the role of the accessible.
1125 // <role>: an #AtkRole to be set as the role
1126 void set_role()(Role role) nothrow {
1127 atk_object_set_role(&this, role);
1129 extern (C) alias static void function (Object* this_, void* object, void* user_data=null) nothrow signal_active_descendant_changed;
1131 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1132 return super_.signal_connect!name(cb, data, cf);
1135 ulong signal_connect(string name:"active-descendant-changed", CB/*:signal_active_descendant_changed*/)
1136 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1137 if (is(typeof(cb)==signal_active_descendant_changed)||_ttmm!(CB, signal_active_descendant_changed)()) {
1138 return signal_connect_data!()(&this, cast(char*)"active-descendant-changed",
1139 cast(GObject2.Callback)cb, data, null, cf);
1141 extern (C) alias static void function (Object* this_, c_uint object, void* p0, void* user_data=null) nothrow signal_children_changed;
1142 ulong signal_connect(string name:"children-changed", CB/*:signal_children_changed*/)
1143 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1144 if (is(typeof(cb)==signal_children_changed)||_ttmm!(CB, signal_children_changed)()) {
1145 return signal_connect_data!()(&this, cast(char*)"children-changed",
1146 cast(GObject2.Callback)cb, data, null, cf);
1148 extern (C) alias static void function (Object* this_, c_int object, void* user_data=null) nothrow signal_focus_event;
1149 ulong signal_connect(string name:"focus-event", CB/*:signal_focus_event*/)
1150 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1151 if (is(typeof(cb)==signal_focus_event)||_ttmm!(CB, signal_focus_event)()) {
1152 return signal_connect_data!()(&this, cast(char*)"focus-event",
1153 cast(GObject2.Callback)cb, data, null, cf);
1155 extern (C) alias static void function (Object* this_, void* object, void* user_data=null) nothrow signal_property_change;
1156 ulong signal_connect(string name:"property-change", CB/*:signal_property_change*/)
1157 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1158 if (is(typeof(cb)==signal_property_change)||_ttmm!(CB, signal_property_change)()) {
1159 return signal_connect_data!()(&this, cast(char*)"property-change",
1160 cast(GObject2.Callback)cb, data, null, cf);
1162 extern (C) alias static void function (Object* this_, char* object, c_int p0, void* user_data=null) nothrow signal_state_change;
1163 ulong signal_connect(string name:"state-change", CB/*:signal_state_change*/)
1164 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1165 if (is(typeof(cb)==signal_state_change)||_ttmm!(CB, signal_state_change)()) {
1166 return signal_connect_data!()(&this, cast(char*)"state-change",
1167 cast(GObject2.Callback)cb, data, null, cf);
1169 extern (C) alias static void function (Object* this_, void* user_data=null) nothrow signal_visible_data_changed;
1170 ulong signal_connect(string name:"visible-data-changed", CB/*:signal_visible_data_changed*/)
1171 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1172 if (is(typeof(cb)==signal_visible_data_changed)||_ttmm!(CB, signal_visible_data_changed)()) {
1173 return signal_connect_data!()(&this, cast(char*)"visible-data-changed",
1174 cast(GObject2.Callback)cb, data, null, cf);
1178 struct ObjectClass {
1179 GObject2.ObjectClass parent;
1180 // RETURNS: a character string representing the accessible name of the object.
1181 extern (C) char* function (Object* accessible) nothrow get_name;
1182 // RETURNS: a character string representing the accessible description
1183 extern (C) char* function (Object* accessible) nothrow get_description;
1184 // RETURNS: a #AtkObject representing the accessible parent
1185 extern (C) Object* function (Object* accessible) nothrow get_parent;
1186 extern (C) int function (Object* accessible) nothrow get_n_children;
1187 // Unintrospectable functionp: ref_child() / ()
1188 extern (C) Object* function (Object* accessible, int i) nothrow ref_child;
1189 // RETURNS: an integer which is the index of the accessible in its parent
1190 extern (C) int function (Object* accessible) nothrow get_index_in_parent;
1191 // RETURNS: an #AtkRelationSet representing the relation set
1192 extern (C) RelationSet* /*new*/ function (Object* accessible) nothrow ref_relation_set;
1193 // RETURNS: an #AtkRole which is the role of the accessible
1194 extern (C) Role function (Object* accessible) nothrow get_role;
1195 extern (C) Layer function (Object* accessible) nothrow get_layer;
1196 extern (C) int function (Object* accessible) nothrow get_mdi_zorder;
1197 // RETURNS: a reference to an #AtkStateSet which is the state
1198 extern (C) StateSet* /*new*/ function (Object* accessible) nothrow ref_state_set;
1199 // <name>: a character string to be set as the accessible name
1200 extern (C) void function (Object* accessible, char* name) nothrow set_name;
1201 // <description>: a character string to be set as the accessible description
1202 extern (C) void function (Object* accessible, char* description) nothrow set_description;
1203 // <parent>: an #AtkObject to be set as the accessible parent
1204 extern (C) void function (Object* accessible, Object* parent) nothrow set_parent;
1205 // <role>: an #AtkRole to be set as the role
1206 extern (C) void function (Object* accessible, Role role) nothrow set_role;
1208 // Unintrospectable functionp: connect_property_change_handler() / ()
1210 // RETURNS: a #guint which is the handler id used in
1211 // <handler>: a function to be called when a property changes its value
1212 extern (C) uint function (Object* accessible, PropertyChangeHandler* handler) nothrow connect_property_change_handler;
1213 // <handler_id>: a guint which identifies the handler to be removed.
1214 extern (C) void function (Object* accessible, uint handler_id) nothrow remove_property_change_handler;
1215 // <data>: a #gpointer which identifies the object for which the AtkObject was created.
1216 extern (C) void function (Object* accessible, void* data) nothrow initialize;
1217 extern (C) void function (Object* accessible, uint change_index, void* changed_child) nothrow children_changed;
1218 extern (C) void function (Object* accessible, int focus_in) nothrow focus_event;
1219 // Unintrospectable functionp: property_change() / ()
1220 extern (C) void function (Object* accessible, _PropertyValues* values) nothrow property_change;
1221 extern (C) void function (Object* accessible, char* name, int state_set) nothrow state_change;
1222 extern (C) void function (Object* accessible) nothrow visible_data_changed;
1223 extern (C) void function (Object* accessible, void** child) nothrow active_descendant_changed;
1224 // RETURNS: an #AtkAttributeSet consisting of all explicit
1225 extern (C) AttributeSet* function (Object* accessible) nothrow get_attributes;
1226 Function pad1, pad2;
1229 struct ObjectFactory /* : GObject.Object */ {
1230 alias parent this;
1231 alias parent super_;
1232 alias parent object;
1233 GObject2.Object parent;
1236 // Provides an #AtkObject that implements an accessibility interface
1237 // on behalf of @obj
1238 // interface on behalf of @obj
1239 // RETURNS: an #AtkObject that implements an accessibility
1240 // <obj>: a #GObject
1241 Object* /*new*/ create_accessible(AT0)(AT0 /*GObject2.Object*/ obj) nothrow {
1242 return atk_object_factory_create_accessible(&this, UpCast!(GObject2.Object*)(obj));
1245 // Gets the GType of the accessible which is created by the factory.
1246 // The value G_TYPE_INVALID is returned if no type if found.
1247 // RETURNS: the type of the accessible which is created by the @factory.
1248 Type get_accessible_type()() nothrow {
1249 return atk_object_factory_get_accessible_type(&this);
1252 // Inform @factory that it is no longer being used to create
1253 // accessibles. When called, @factory may need to inform
1254 // #AtkObjects which it has created that they need to be re-instantiated.
1255 // in object registries.
1256 void invalidate()() nothrow {
1257 atk_object_factory_invalidate(&this);
1261 struct ObjectFactoryClass {
1262 GObject2.ObjectClass parent_class;
1263 // Unintrospectable functionp: create_accessible() / ()
1264 extern (C) Object* function (GObject2.Object* obj) nothrow create_accessible;
1265 extern (C) void function (ObjectFactory* factory) nothrow invalidate;
1266 extern (C) Type function () nothrow get_accessible_type;
1267 Function pad1, pad2;
1270 struct Plug /* : Object */ {
1271 mixin Component.__interface__;
1272 alias parent this;
1273 alias parent super_;
1274 alias parent object;
1275 Object parent;
1277 static Plug* /*new*/ new_()() nothrow {
1278 return atk_plug_new();
1280 static auto opCall()() {
1281 return atk_plug_new();
1283 char* /*new*/ get_id()() nothrow {
1284 return atk_plug_get_id(&this);
1288 struct PlugClass {
1289 ObjectClass parent_class;
1290 extern (C) char* /*new*/ function (Plug* obj) nothrow get_object_id;
1293 // Unintrospectable callback: PropertyChangeHandler() / ()
1294 extern (C) alias void function (Object* arg_a, _PropertyValues* arg_b) nothrow PropertyChangeHandler;
1296 struct Rectangle {
1297 int x, y, width, height;
1300 struct Registry /* : GObject.Object */ {
1301 alias method_parent this;
1302 alias method_parent super_;
1303 alias method_parent object;
1304 GObject2.Object method_parent;
1307 // Gets an #AtkObjectFactory appropriate for creating #AtkObjects
1308 // appropriate for @type.
1309 // #AtkObjects appropriate for @type.
1310 // RETURNS: an #AtkObjectFactory appropriate for creating
1311 // <type>: a #GType with which to look up the associated #AtkObjectFactory
1312 ObjectFactory* get_factory()(Type type) nothrow {
1313 return atk_registry_get_factory(&this, type);
1316 // Provides a #GType indicating the #AtkObjectFactory subclass
1317 // associated with @type.
1318 // RETURNS: a #GType associated with type @type
1319 // <type>: a #GType with which to look up the associated #AtkObjectFactory subclass
1320 Type get_factory_type()(Type type) nothrow {
1321 return atk_registry_get_factory_type(&this, type);
1324 // Associate an #AtkObjectFactory subclass with a #GType. Note:
1325 // The associated @factory_type will thereafter be responsible for
1326 // the creation of new #AtkObject implementations for instances
1327 // appropriate for @type.
1328 // <type>: an #AtkObject type
1329 // <factory_type>: an #AtkObjectFactory type to associate with @type. Must implement AtkObject appropriate for @type.
1330 void set_factory_type()(Type type, Type factory_type) nothrow {
1331 atk_registry_set_factory_type(&this, type, factory_type);
1335 struct Relation /* : GObject.Object */ {
1336 alias parent this;
1337 alias parent super_;
1338 alias parent object;
1339 GObject2.Object parent;
1340 void*[666] target;
1341 RelationType relationship;
1344 // Create a new relation for the specified key and the specified list
1345 // of targets. See also atk_object_add_relationship().
1346 // RETURNS: a pointer to a new #AtkRelation
1347 // <targets>: an array of pointers to #AtkObjects
1348 // <n_targets>: number of #AtkObjects pointed to by @targets
1349 // <relationship>: an #AtkRelationType with which to create the new #AtkRelation
1350 static Relation* /*new*/ new_(AT0)(AT0 /*Object**/ targets, int n_targets, RelationType relationship) nothrow {
1351 return atk_relation_new(UpCast!(Object**)(targets), n_targets, relationship);
1353 static auto opCall(AT0)(AT0 /*Object**/ targets, int n_targets, RelationType relationship) {
1354 return atk_relation_new(UpCast!(Object**)(targets), n_targets, relationship);
1357 // VERSION: 1.9
1358 // Adds the specified AtkObject to the target for the relation, if it is
1359 // not already present. See also atk_object_add_relationship().
1360 // <target>: an #AtkObject
1361 void add_target(AT0)(AT0 /*Object*/ target) nothrow {
1362 atk_relation_add_target(&this, UpCast!(Object*)(target));
1365 // Gets the type of @relation
1366 // RETURNS: the type of @relation
1367 RelationType get_relation_type()() nothrow {
1368 return atk_relation_get_relation_type(&this);
1371 // Gets the target list of @relation
1372 // RETURNS: the target list of @relation
1373 PtrArray* get_target()() nothrow {
1374 return atk_relation_get_target(&this);
1377 // Remove the specified AtkObject from the target for the relation.
1378 // Returns TRUE if the removal is successful.
1379 // <target>: an #AtkObject
1380 int remove_target(AT0)(AT0 /*Object*/ target) nothrow {
1381 return atk_relation_remove_target(&this, UpCast!(Object*)(target));
1385 struct RelationClass {
1386 GObject2.ObjectClass parent;
1389 struct RelationSet /* : GObject.Object */ {
1390 alias parent this;
1391 alias parent super_;
1392 alias parent object;
1393 GObject2.Object parent;
1394 void*[666] relations;
1397 // Creates a new empty relation set.
1398 // RETURNS: a new #AtkRelationSet
1399 static RelationSet* /*new*/ new_()() nothrow {
1400 return atk_relation_set_new();
1402 static auto opCall()() {
1403 return atk_relation_set_new();
1406 // Add a new relation to the current relation set if it is not already
1407 // present.
1408 // This function ref's the AtkRelation so the caller of this function
1409 // should unref it to ensure that it will be destroyed when the AtkRelationSet
1410 // is destroyed.
1411 // <relation>: an #AtkRelation
1412 void add(AT0)(AT0 /*Relation*/ relation) nothrow {
1413 atk_relation_set_add(&this, UpCast!(Relation*)(relation));
1416 // VERSION: 1.9
1417 // Add a new relation of the specified type with the specified target to
1418 // the current relation set if the relation set does not contain a relation
1419 // of that type. If it is does contain a relation of that typea the target
1420 // is added to the relation.
1421 // <relationship>: an #AtkRelationType
1422 // <target>: an #AtkObject
1423 void add_relation_by_type(AT0)(RelationType relationship, AT0 /*Object*/ target) nothrow {
1424 atk_relation_set_add_relation_by_type(&this, relationship, UpCast!(Object*)(target));
1427 // Determines whether the relation set contains a relation that matches the
1428 // specified type.
1429 // in @set, %FALSE otherwise
1430 // RETURNS: %TRUE if @relationship is the relationship type of a relation
1431 // <relationship>: an #AtkRelationType
1432 int contains()(RelationType relationship) nothrow {
1433 return atk_relation_set_contains(&this, relationship);
1436 // Determines the number of relations in a relation set.
1437 // RETURNS: an integer representing the number of relations in the set.
1438 int get_n_relations()() nothrow {
1439 return atk_relation_set_get_n_relations(&this);
1442 // Determines the relation at the specified position in the relation set.
1443 // position i in the set.
1444 // RETURNS: a #AtkRelation, which is the relation at
1445 // <i>: a gint representing a position in the set, starting from 0.
1446 Relation* get_relation()(int i) nothrow {
1447 return atk_relation_set_get_relation(&this, i);
1450 // Finds a relation that matches the specified type.
1451 // specified type.
1452 // RETURNS: an #AtkRelation, which is a relation matching the
1453 // <relationship>: an #AtkRelationType
1454 Relation* get_relation_by_type()(RelationType relationship) nothrow {
1455 return atk_relation_set_get_relation_by_type(&this, relationship);
1458 // Removes a relation from the relation set.
1459 // This function unref's the #AtkRelation so it will be deleted unless there
1460 // is another reference to it.
1461 // <relation>: an #AtkRelation
1462 void remove(AT0)(AT0 /*Relation*/ relation) nothrow {
1463 atk_relation_set_remove(&this, UpCast!(Relation*)(relation));
1467 struct RelationSetClass {
1468 GObject2.ObjectClass parent;
1469 Function pad1, pad2;
1472 enum RelationType {
1473 NULL = 0,
1474 CONTROLLED_BY = 1,
1475 CONTROLLER_FOR = 2,
1476 LABEL_FOR = 3,
1477 LABELLED_BY = 4,
1478 MEMBER_OF = 5,
1479 NODE_CHILD_OF = 6,
1480 FLOWS_TO = 7,
1481 FLOWS_FROM = 8,
1482 SUBWINDOW_OF = 9,
1483 EMBEDS = 10,
1484 EMBEDDED_BY = 11,
1485 POPUP_FOR = 12,
1486 PARENT_WINDOW_OF = 13,
1487 DESCRIBED_BY = 14,
1488 DESCRIPTION_FOR = 15,
1489 NODE_PARENT_OF = 16,
1490 LAST_DEFINED = 17
1492 enum Role {
1493 INVALID = 0,
1494 ACCEL_LABEL = 1,
1495 ALERT = 2,
1496 ANIMATION = 3,
1497 ARROW = 4,
1498 CALENDAR = 5,
1499 CANVAS = 6,
1500 CHECK_BOX = 7,
1501 CHECK_MENU_ITEM = 8,
1502 COLOR_CHOOSER = 9,
1503 COLUMN_HEADER = 10,
1504 COMBO_BOX = 11,
1505 DATE_EDITOR = 12,
1506 DESKTOP_ICON = 13,
1507 DESKTOP_FRAME = 14,
1508 DIAL = 15,
1509 DIALOG = 16,
1510 DIRECTORY_PANE = 17,
1511 DRAWING_AREA = 18,
1512 FILE_CHOOSER = 19,
1513 FILLER = 20,
1514 FONT_CHOOSER = 21,
1515 FRAME = 22,
1516 GLASS_PANE = 23,
1517 HTML_CONTAINER = 24,
1518 ICON = 25,
1519 IMAGE = 26,
1520 INTERNAL_FRAME = 27,
1521 LABEL = 28,
1522 LAYERED_PANE = 29,
1523 LIST = 30,
1524 LIST_ITEM = 31,
1525 MENU = 32,
1526 MENU_BAR = 33,
1527 MENU_ITEM = 34,
1528 OPTION_PANE = 35,
1529 PAGE_TAB = 36,
1530 PAGE_TAB_LIST = 37,
1531 PANEL = 38,
1532 PASSWORD_TEXT = 39,
1533 POPUP_MENU = 40,
1534 PROGRESS_BAR = 41,
1535 PUSH_BUTTON = 42,
1536 RADIO_BUTTON = 43,
1537 RADIO_MENU_ITEM = 44,
1538 ROOT_PANE = 45,
1539 ROW_HEADER = 46,
1540 SCROLL_BAR = 47,
1541 SCROLL_PANE = 48,
1542 SEPARATOR = 49,
1543 SLIDER = 50,
1544 SPLIT_PANE = 51,
1545 SPIN_BUTTON = 52,
1546 STATUSBAR = 53,
1547 TABLE = 54,
1548 TABLE_CELL = 55,
1549 TABLE_COLUMN_HEADER = 56,
1550 TABLE_ROW_HEADER = 57,
1551 TEAR_OFF_MENU_ITEM = 58,
1552 TERMINAL = 59,
1553 TEXT = 60,
1554 TOGGLE_BUTTON = 61,
1555 TOOL_BAR = 62,
1556 TOOL_TIP = 63,
1557 TREE = 64,
1558 TREE_TABLE = 65,
1559 UNKNOWN = 66,
1560 VIEWPORT = 67,
1561 WINDOW = 68,
1562 HEADER = 69,
1563 FOOTER = 70,
1564 PARAGRAPH = 71,
1565 RULER = 72,
1566 APPLICATION = 73,
1567 AUTOCOMPLETE = 74,
1568 EDITBAR = 75,
1569 EMBEDDED = 76,
1570 ENTRY = 77,
1571 CHART = 78,
1572 CAPTION = 79,
1573 DOCUMENT_FRAME = 80,
1574 HEADING = 81,
1575 PAGE = 82,
1576 SECTION = 83,
1577 REDUNDANT_OBJECT = 84,
1578 FORM = 85,
1579 LINK = 86,
1580 INPUT_METHOD_WINDOW = 87,
1581 TABLE_ROW = 88,
1582 TREE_ITEM = 89,
1583 DOCUMENT_SPREADSHEET = 90,
1584 DOCUMENT_PRESENTATION = 91,
1585 DOCUMENT_TEXT = 92,
1586 DOCUMENT_WEB = 93,
1587 DOCUMENT_EMAIL = 94,
1588 COMMENT = 95,
1589 LIST_BOX = 96,
1590 GROUPING = 97,
1591 IMAGE_MAP = 98,
1592 NOTIFICATION = 99,
1593 INFO_BAR = 100,
1594 LAST_DEFINED = 101
1596 struct Selection /* Interface */ {
1597 mixin template __interface__() {
1598 // Adds the specified accessible child of the object to the
1599 // object's selection.
1600 // RETURNS: TRUE if success, FALSE otherwise.
1601 // <i>: a #gint specifying the child index.
1602 int add_selection()(int i) nothrow {
1603 return atk_selection_add_selection(cast(Selection*)&this, i);
1606 // Clears the selection in the object so that no children in the object
1607 // are selected.
1608 // RETURNS: TRUE if success, FALSE otherwise.
1609 int clear_selection()() nothrow {
1610 return atk_selection_clear_selection(cast(Selection*)&this);
1613 // Gets the number of accessible children currently selected.
1614 // indication of whether AtkSelectionIface is implemented, they should
1615 // use type checking/interface checking macros or the
1616 // atk_get_accessible_value() convenience method.
1617 // if @selection does not implement this interface.
1618 // RETURNS: a gint representing the number of items selected, or 0
1619 int get_selection_count()() nothrow {
1620 return atk_selection_get_selection_count(cast(Selection*)&this);
1623 // Determines if the current child of this object is selected
1624 // indication of whether AtkSelectionIface is implemented, they should
1625 // use type checking/interface checking macros or the
1626 // atk_get_accessible_value() convenience method.
1627 // if @selection does not implement this interface.
1628 // RETURNS: a gboolean representing the specified child is selected, or 0
1629 // <i>: a #gint specifying the child index.
1630 int is_child_selected()(int i) nothrow {
1631 return atk_selection_is_child_selected(cast(Selection*)&this, i);
1634 // Gets a reference to the accessible object representing the specified
1635 // selected child of the object.
1636 // indication of whether AtkSelectionIface is implemented, they should
1637 // use type checking/interface checking macros or the
1638 // atk_get_accessible_value() convenience method.
1639 // accessible , or %NULL if @selection does not implement this interface.
1640 // RETURNS: an #AtkObject representing the selected
1641 // <i>: a #gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
1642 Object* /*new*/ ref_selection()(int i) nothrow {
1643 return atk_selection_ref_selection(cast(Selection*)&this, i);
1646 // Removes the specified child of the object from the object's selection.
1647 // RETURNS: TRUE if success, FALSE otherwise.
1648 // <i>: a #gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
1649 int remove_selection()(int i) nothrow {
1650 return atk_selection_remove_selection(cast(Selection*)&this, i);
1653 // Causes every child of the object to be selected if the object
1654 // supports multiple selections.
1655 // RETURNS: TRUE if success, FALSE otherwise.
1656 int select_all_selection()() nothrow {
1657 return atk_selection_select_all_selection(cast(Selection*)&this);
1659 extern (C) alias static void function (Selection* this_, void* user_data=null) nothrow signal_selection_changed;
1661 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1662 return super_.signal_connect!name(cb, data, cf);
1665 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)
1666 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1667 if (is(typeof(cb)==signal_selection_changed)||_ttmm!(CB, signal_selection_changed)()) {
1668 return signal_connect_data!()(&this, cast(char*)"selection-changed",
1669 cast(GObject2.Callback)cb, data, null, cf);
1672 mixin __interface__;
1675 struct SelectionIface {
1676 GObject2.TypeInterface parent;
1678 // RETURNS: TRUE if success, FALSE otherwise.
1679 // <i>: a #gint specifying the child index.
1680 extern (C) int function (Selection* selection, int i) nothrow add_selection;
1681 // RETURNS: TRUE if success, FALSE otherwise.
1682 extern (C) int function (Selection* selection) nothrow clear_selection;
1684 // RETURNS: an #AtkObject representing the selected
1685 // <i>: a #gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
1686 extern (C) Object* /*new*/ function (Selection* selection, int i) nothrow ref_selection;
1687 // RETURNS: a gint representing the number of items selected, or 0
1688 extern (C) int function (Selection* selection) nothrow get_selection_count;
1690 // RETURNS: a gboolean representing the specified child is selected, or 0
1691 // <i>: a #gint specifying the child index.
1692 extern (C) int function (Selection* selection, int i) nothrow is_child_selected;
1694 // RETURNS: TRUE if success, FALSE otherwise.
1695 // <i>: a #gint specifying the index in the selection set. (e.g. the ith selection as opposed to the ith child).
1696 extern (C) int function (Selection* selection, int i) nothrow remove_selection;
1697 // RETURNS: TRUE if success, FALSE otherwise.
1698 extern (C) int function (Selection* selection) nothrow select_all_selection;
1699 extern (C) void function (Selection* selection) nothrow selection_changed;
1700 Function pad1, pad2;
1703 struct Socket /* : Object */ {
1704 mixin Component.__interface__;
1705 alias parent this;
1706 alias parent super_;
1707 alias parent object;
1708 Object parent;
1709 private char* embedded_plug_id;
1711 static Socket* /*new*/ new_()() nothrow {
1712 return atk_socket_new();
1714 static auto opCall()() {
1715 return atk_socket_new();
1718 // VERSION: 1.30
1719 // Embeds the children of an #AtkPlug as the children of the #AtkSocket. The
1720 // plug may be in the same process or in a different process.
1721 // THe class item used by this function should be filled in by the IPC layer
1722 // (ie, at-spi2-atk). The implementor of the AtkSocket should call this
1723 // function and pass the id for the plug as returned by atk_plug_get_id.
1724 // It is the responsibility of the application to pass the plug id on to
1725 // the process implementing the AtkSocket as needed.
1726 // <plug_id>: the ID of an #AtkPlug
1727 void embed(AT0)(AT0 /*char*/ plug_id) nothrow {
1728 atk_socket_embed(&this, toCString!(char*)(plug_id));
1731 // VERSION: 1.30
1732 // Determines whether or not the socket has an embedded plug.
1733 // RETURNS: TRUE if a plug is embedded in the socket
1734 int is_occupied()() nothrow {
1735 return atk_socket_is_occupied(&this);
1739 struct SocketClass {
1740 ObjectClass parent_class;
1741 // <plug_id>: the ID of an #AtkPlug
1742 extern (C) void function (Socket* obj, char* plug_id) nothrow embed;
1745 struct StateSet /* : GObject.Object */ {
1746 alias parent this;
1747 alias parent super_;
1748 alias parent object;
1749 GObject2.Object parent;
1752 // Creates a new empty state set.
1753 // RETURNS: a new #AtkStateSet
1754 static StateSet* /*new*/ new_()() nothrow {
1755 return atk_state_set_new();
1757 static auto opCall()() {
1758 return atk_state_set_new();
1761 // Add a new state for the specified type to the current state set if
1762 // it is not already present.
1763 // RETURNS: %TRUE if the state for @type is not already in @set.
1764 // <type>: an #AtkStateType
1765 int add_state()(StateType type) nothrow {
1766 return atk_state_set_add_state(&this, type);
1769 // Add the states for the specified types to the current state set.
1770 // <types>: an array of #AtkStateType
1771 // <n_types>: The number of elements in the array
1772 void add_states(AT0)(AT0 /*StateType*/ types, int n_types) nothrow {
1773 atk_state_set_add_states(&this, UpCast!(StateType*)(types), n_types);
1776 // Constructs the intersection of the two sets, returning %NULL if the
1777 // intersection is empty.
1778 // the two sets.
1779 // RETURNS: a new #AtkStateSet which is the intersection of
1780 // <compare_set>: another #AtkStateSet
1781 StateSet* /*new*/ and_sets(AT0)(AT0 /*StateSet*/ compare_set) nothrow {
1782 return atk_state_set_and_sets(&this, UpCast!(StateSet*)(compare_set));
1784 // Removes all states from the state set.
1785 void clear_states()() nothrow {
1786 atk_state_set_clear_states(&this);
1789 // Checks whether the state for the specified type is in the specified set.
1790 // RETURNS: %TRUE if @type is the state type is in @set.
1791 // <type>: an #AtkStateType
1792 int contains_state()(StateType type) nothrow {
1793 return atk_state_set_contains_state(&this, type);
1796 // Checks whether the states for all the specified types are in the
1797 // specified set.
1798 // RETURNS: %TRUE if all the states for @type are in @set.
1799 // <types>: an array of #AtkStateType
1800 // <n_types>: The number of elements in the array
1801 int contains_states(AT0)(AT0 /*StateType*/ types, int n_types) nothrow {
1802 return atk_state_set_contains_states(&this, UpCast!(StateType*)(types), n_types);
1805 // Checks whether the state set is empty, i.e. has no states set.
1806 // RETURNS: %TRUE if @set has no states set, otherwise %FALSE
1807 int is_empty()() nothrow {
1808 return atk_state_set_is_empty(&this);
1811 // Constructs the union of the two sets.
1812 // sets, returning %NULL is empty.
1813 // RETURNS: a new #AtkStateSet which is the union of the two
1814 // <compare_set>: another #AtkStateSet
1815 StateSet* /*new*/ or_sets(AT0)(AT0 /*StateSet*/ compare_set) nothrow {
1816 return atk_state_set_or_sets(&this, UpCast!(StateSet*)(compare_set));
1819 // Removes the state for the specified type from the state set.
1820 // RETURNS: %TRUE if @type was the state type is in @set.
1821 // <type>: an #AtkType
1822 int remove_state()(StateType type) nothrow {
1823 return atk_state_set_remove_state(&this, type);
1826 // Constructs the exclusive-or of the two sets, returning %NULL is empty.
1827 // The set returned by this operation contains the states in exactly
1828 // one of the two sets.
1829 // which are in exactly one of the two sets.
1830 // RETURNS: a new #AtkStateSet which contains the states
1831 // <compare_set>: another #AtkStateSet
1832 StateSet* /*new*/ xor_sets(AT0)(AT0 /*StateSet*/ compare_set) nothrow {
1833 return atk_state_set_xor_sets(&this, UpCast!(StateSet*)(compare_set));
1837 struct StateSetClass {
1838 GObject2.ObjectClass parent;
1841 enum StateType {
1842 INVALID = 0,
1843 ACTIVE = 1,
1844 ARMED = 2,
1845 BUSY = 3,
1846 CHECKED = 4,
1847 DEFUNCT = 5,
1848 EDITABLE = 6,
1849 ENABLED = 7,
1850 EXPANDABLE = 8,
1851 EXPANDED = 9,
1852 FOCUSABLE = 10,
1853 FOCUSED = 11,
1854 HORIZONTAL = 12,
1855 ICONIFIED = 13,
1856 MODAL = 14,
1857 MULTI_LINE = 15,
1858 MULTISELECTABLE = 16,
1859 OPAQUE = 17,
1860 PRESSED = 18,
1861 RESIZABLE = 19,
1862 SELECTABLE = 20,
1863 SELECTED = 21,
1864 SENSITIVE = 22,
1865 SHOWING = 23,
1866 SINGLE_LINE = 24,
1867 STALE = 25,
1868 TRANSIENT = 26,
1869 VERTICAL = 27,
1870 VISIBLE = 28,
1871 MANAGES_DESCENDANTS = 29,
1872 INDETERMINATE = 30,
1873 TRUNCATED = 31,
1874 REQUIRED = 32,
1875 INVALID_ENTRY = 33,
1876 SUPPORTS_AUTOCOMPLETION = 34,
1877 SELECTABLE_TEXT = 35,
1878 DEFAULT = 36,
1879 ANIMATED = 37,
1880 VISITED = 38,
1881 LAST_DEFINED = 39
1883 struct StreamableContent /* Interface */ {
1884 mixin template __interface__() {
1885 // Gets the character string of the specified mime type. The first mime
1886 // type is at position 0, the second at position 1, and so on.
1887 // should not free the character string.
1888 // <i>: a gint representing the position of the mime type starting from 0
1889 char* get_mime_type()(int i) nothrow {
1890 return atk_streamable_content_get_mime_type(cast(StreamableContent*)&this, i);
1893 // Gets the number of mime types supported by this object.
1894 // RETURNS: a gint which is the number of mime types supported by the object.
1895 int get_n_mime_types()() nothrow {
1896 return atk_streamable_content_get_n_mime_types(cast(StreamableContent*)&this);
1899 // Unintrospectable method: get_stream() / atk_streamable_content_get_stream()
1900 // Gets the content in the specified mime type.
1901 // specified mime type.
1902 // RETURNS: A #GIOChannel which contains the content in the
1903 // <mime_type>: a gchar* representing the mime type
1904 GLib2.IOChannel* /*new*/ get_stream(AT0)(AT0 /*char*/ mime_type) nothrow {
1905 return atk_streamable_content_get_stream(cast(StreamableContent*)&this, toCString!(char*)(mime_type));
1908 // VERSION: 1.12
1909 // Get a string representing a URI in IETF standard format
1910 // (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content
1911 // may be streamed in the specified mime-type, if one is available.
1912 // If mime_type is NULL, the URI for the default (and possibly only) mime-type is
1913 // returned.
1914 // Note that it is possible for get_uri to return NULL but for
1915 // get_stream to work nonetheless, since not all GIOChannels connect to URIs.
1916 // can be constructed.
1917 // RETURNS: Returns a string representing a URI, or NULL if no corresponding URI
1918 // <mime_type>: a gchar* representing the mime type, or NULL to request a URI for the default mime type.
1919 char* get_uri(AT0)(AT0 /*char*/ mime_type) nothrow {
1920 return atk_streamable_content_get_uri(cast(StreamableContent*)&this, toCString!(char*)(mime_type));
1923 mixin __interface__;
1926 struct StreamableContentIface {
1927 GObject2.TypeInterface parent;
1928 // RETURNS: a gint which is the number of mime types supported by the object.
1929 extern (C) int function (StreamableContent* streamable) nothrow get_n_mime_types;
1930 // <i>: a gint representing the position of the mime type starting from 0
1931 extern (C) char* function (StreamableContent* streamable, int i) nothrow get_mime_type;
1933 // Unintrospectable functionp: get_stream() / ()
1935 // RETURNS: A #GIOChannel which contains the content in the
1936 // <mime_type>: a gchar* representing the mime type
1937 extern (C) GLib2.IOChannel* /*new*/ function (StreamableContent* streamable, char* mime_type) nothrow get_stream;
1939 // RETURNS: Returns a string representing a URI, or NULL if no corresponding URI
1940 // <mime_type>: a gchar* representing the mime type, or NULL to request a URI for the default mime type.
1941 extern (C) char* function (StreamableContent* streamable, char* mime_type) nothrow get_uri;
1942 Function pad1, pad2, pad3;
1945 struct Table /* Interface */ {
1946 mixin template __interface__() {
1947 // Adds the specified @column to the selection.
1948 // the selection, or 0 if value does not implement this interface.
1949 // RETURNS: a gboolean representing if the column was successfully added to
1950 // <column>: a #gint representing a column in @table
1951 int add_column_selection()(int column) nothrow {
1952 return atk_table_add_column_selection(cast(Table*)&this, column);
1955 // Adds the specified @row to the selection.
1956 // or 0 if value does not implement this interface.
1957 // RETURNS: a gboolean representing if row was successfully added to selection,
1958 // <row>: a #gint representing a row in @table
1959 int add_row_selection()(int row) nothrow {
1960 return atk_table_add_row_selection(cast(Table*)&this, row);
1963 // Gets the caption for the @table.
1964 // %NULL if value does not implement this interface.
1965 // RETURNS: a AtkObject* representing the table caption, or
1966 Object* get_caption()() nothrow {
1967 return atk_table_get_caption(cast(Table*)&this);
1970 // Gets a #gint representing the column at the specified @index_.
1971 // or -1 if the table does not implement this interface
1972 // RETURNS: a gint representing the column at the specified index,
1973 // <index_>: a #gint representing an index in @table
1974 int get_column_at_index()(int index_) nothrow {
1975 return atk_table_get_column_at_index(cast(Table*)&this, index_);
1978 // Gets the description text of the specified @column in the table
1979 // if value does not implement this interface.
1980 // RETURNS: a gchar* representing the column description, or %NULL
1981 // <column>: a #gint representing a column in @table
1982 char* get_column_description()(int column) nothrow {
1983 return atk_table_get_column_description(cast(Table*)&this, column);
1986 // Gets the number of columns occupied by the accessible object
1987 // at the specified @row and @column in the @table.
1988 // if value does not implement this interface.
1989 // RETURNS: a gint representing the column extent at specified position, or 0
1990 // <row>: a #gint representing a row in @table
1991 // <column>: a #gint representing a column in @table
1992 int get_column_extent_at()(int row, int column) nothrow {
1993 return atk_table_get_column_extent_at(cast(Table*)&this, row, column);
1996 // Gets the column header of a specified column in an accessible table.
1997 // header, or %NULL if value does not implement this interface.
1998 // RETURNS: a AtkObject* representing the specified column
1999 // <column>: a #gint representing a column in the table
2000 Object* get_column_header()(int column) nothrow {
2001 return atk_table_get_column_header(cast(Table*)&this, column);
2004 // Gets a #gint representing the index at the specified @row and @column.
2005 // The value -1 is returned if the object at row,column is not a child
2006 // of table or table does not implement this interface.
2007 // RETURNS: a #gint representing the index at specified position.
2008 // <row>: a #gint representing a row in @table
2009 // <column>: a #gint representing a column in @table
2010 int get_index_at()(int row, int column) nothrow {
2011 return atk_table_get_index_at(cast(Table*)&this, row, column);
2014 // Gets the number of columns in the table.
2015 // if value does not implement this interface.
2016 // RETURNS: a gint representing the number of columns, or 0
2017 int get_n_columns()() nothrow {
2018 return atk_table_get_n_columns(cast(Table*)&this);
2021 // Gets the number of rows in the table.
2022 // if value does not implement this interface.
2023 // RETURNS: a gint representing the number of rows, or 0
2024 int get_n_rows()() nothrow {
2025 return atk_table_get_n_rows(cast(Table*)&this);
2028 // Gets a #gint representing the row at the specified @index_.
2029 // or -1 if the table does not implement this interface
2030 // RETURNS: a gint representing the row at the specified index,
2031 // <index_>: a #gint representing an index in @table
2032 int get_row_at_index()(int index_) nothrow {
2033 return atk_table_get_row_at_index(cast(Table*)&this, index_);
2036 // Gets the description text of the specified row in the table
2037 // if value does not implement this interface.
2038 // RETURNS: a gchar* representing the row description, or %NULL
2039 // <row>: a #gint representing a row in @table
2040 char* get_row_description()(int row) nothrow {
2041 return atk_table_get_row_description(cast(Table*)&this, row);
2044 // Gets the number of rows occupied by the accessible object
2045 // at a specified @row and @column in the @table.
2046 // if value does not implement this interface.
2047 // RETURNS: a gint representing the row extent at specified position, or 0
2048 // <row>: a #gint representing a row in @table
2049 // <column>: a #gint representing a column in @table
2050 int get_row_extent_at()(int row, int column) nothrow {
2051 return atk_table_get_row_extent_at(cast(Table*)&this, row, column);
2054 // Gets the row header of a specified row in an accessible table.
2055 // header, or %NULL if value does not implement this interface.
2056 // RETURNS: a AtkObject* representing the specified row
2057 // <row>: a #gint representing a row in the table
2058 Object* get_row_header()(int row) nothrow {
2059 return atk_table_get_row_header(cast(Table*)&this, row);
2062 // Gets the selected columns of the table by initializing **selected with
2063 // the selected column numbers. This array should be freed by the caller.
2064 // or %0 if value does not implement this interface.
2065 // RETURNS: a gint representing the number of selected columns,
2066 // <selected>: a #gint** that is to contain the selected columns numbers
2067 int get_selected_columns()(int** selected) nothrow {
2068 return atk_table_get_selected_columns(cast(Table*)&this, selected);
2071 // Gets the selected rows of the table by initializing **selected with
2072 // the selected row numbers. This array should be freed by the caller.
2073 // or zero if value does not implement this interface.
2074 // RETURNS: a gint representing the number of selected rows,
2075 // <selected>: a #gint** that is to contain the selected row numbers
2076 int get_selected_rows()(int** selected) nothrow {
2077 return atk_table_get_selected_rows(cast(Table*)&this, selected);
2080 // Gets the summary description of the table.
2081 // of the table, or zero if value does not implement this interface.
2082 // RETURNS: a AtkObject* representing a summary description
2083 Object* /*new*/ get_summary()() nothrow {
2084 return atk_table_get_summary(cast(Table*)&this);
2087 // Gets a boolean value indicating whether the specified @column
2088 // is selected
2089 // if value does not implement this interface.
2090 // RETURNS: a gboolean representing if the column is selected, or 0
2091 // <column>: a #gint representing a column in @table
2092 int is_column_selected()(int column) nothrow {
2093 return atk_table_is_column_selected(cast(Table*)&this, column);
2096 // Gets a boolean value indicating whether the specified @row
2097 // is selected
2098 // if value does not implement this interface.
2099 // RETURNS: a gboolean representing if the row is selected, or 0
2100 // <row>: a #gint representing a row in @table
2101 int is_row_selected()(int row) nothrow {
2102 return atk_table_is_row_selected(cast(Table*)&this, row);
2105 // Gets a boolean value indicating whether the accessible object
2106 // at the specified @row and @column is selected
2107 // if value does not implement this interface.
2108 // RETURNS: a gboolean representing if the cell is selected, or 0
2109 // <row>: a #gint representing a row in @table
2110 // <column>: a #gint representing a column in @table
2111 int is_selected()(int row, int column) nothrow {
2112 return atk_table_is_selected(cast(Table*)&this, row, column);
2115 // Get a reference to the table cell at @row, @column.
2116 // accessible
2117 // RETURNS: a AtkObject* representing the referred to
2118 // <row>: a #gint representing a row in @table
2119 // <column>: a #gint representing a column in @table
2120 Object* /*new*/ ref_at()(int row, int column) nothrow {
2121 return atk_table_ref_at(cast(Table*)&this, row, column);
2124 // Adds the specified @column to the selection.
2125 // the selection, or 0 if value does not implement this interface.
2126 // RETURNS: a gboolean representing if the column was successfully removed from
2127 // <column>: a #gint representing a column in @table
2128 int remove_column_selection()(int column) nothrow {
2129 return atk_table_remove_column_selection(cast(Table*)&this, column);
2132 // Removes the specified @row from the selection.
2133 // the selection, or 0 if value does not implement this interface.
2134 // RETURNS: a gboolean representing if the row was successfully removed from
2135 // <row>: a #gint representing a row in @table
2136 int remove_row_selection()(int row) nothrow {
2137 return atk_table_remove_row_selection(cast(Table*)&this, row);
2140 // Sets the caption for the table.
2141 // <caption>: a #AtkObject representing the caption to set for @table
2142 void set_caption(AT0)(AT0 /*Object*/ caption) nothrow {
2143 atk_table_set_caption(cast(Table*)&this, UpCast!(Object*)(caption));
2146 // Sets the description text for the specified @column of the @table.
2147 // <column>: a #gint representing a column in @table
2148 // <description>: a #gchar representing the description text to set for the specified @column of the @table
2149 void set_column_description(AT0)(int column, AT0 /*char*/ description) nothrow {
2150 atk_table_set_column_description(cast(Table*)&this, column, toCString!(char*)(description));
2153 // Sets the specified column header to @header.
2154 // <column>: a #gint representing a column in @table
2155 // <header>: an #AtkTable
2156 void set_column_header(AT0)(int column, AT0 /*Object*/ header) nothrow {
2157 atk_table_set_column_header(cast(Table*)&this, column, UpCast!(Object*)(header));
2160 // Sets the description text for the specified @row of @table.
2161 // <row>: a #gint representing a row in @table
2162 // <description>: a #gchar representing the description text to set for the specified @row of @table
2163 void set_row_description(AT0)(int row, AT0 /*char*/ description) nothrow {
2164 atk_table_set_row_description(cast(Table*)&this, row, toCString!(char*)(description));
2167 // Sets the specified row header to @header.
2168 // <row>: a #gint representing a row in @table
2169 // <header>: an #AtkTable
2170 void set_row_header(AT0)(int row, AT0 /*Object*/ header) nothrow {
2171 atk_table_set_row_header(cast(Table*)&this, row, UpCast!(Object*)(header));
2174 // Sets the summary description of the table.
2175 // <accessible>: an #AtkObject representing the summary description to set for @table
2176 void set_summary(AT0)(AT0 /*Object*/ accessible) nothrow {
2177 atk_table_set_summary(cast(Table*)&this, UpCast!(Object*)(accessible));
2179 extern (C) alias static void function (Table* this_, int object, int p0, void* user_data=null) nothrow signal_column_deleted;
2181 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2182 return super_.signal_connect!name(cb, data, cf);
2185 ulong signal_connect(string name:"column-deleted", CB/*:signal_column_deleted*/)
2186 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2187 if (is(typeof(cb)==signal_column_deleted)||_ttmm!(CB, signal_column_deleted)()) {
2188 return signal_connect_data!()(&this, cast(char*)"column-deleted",
2189 cast(GObject2.Callback)cb, data, null, cf);
2191 extern (C) alias static void function (Table* this_, int object, int p0, void* user_data=null) nothrow signal_column_inserted;
2192 ulong signal_connect(string name:"column-inserted", CB/*:signal_column_inserted*/)
2193 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2194 if (is(typeof(cb)==signal_column_inserted)||_ttmm!(CB, signal_column_inserted)()) {
2195 return signal_connect_data!()(&this, cast(char*)"column-inserted",
2196 cast(GObject2.Callback)cb, data, null, cf);
2198 extern (C) alias static void function (Table* this_, void* user_data=null) nothrow signal_column_reordered;
2199 ulong signal_connect(string name:"column-reordered", CB/*:signal_column_reordered*/)
2200 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2201 if (is(typeof(cb)==signal_column_reordered)||_ttmm!(CB, signal_column_reordered)()) {
2202 return signal_connect_data!()(&this, cast(char*)"column-reordered",
2203 cast(GObject2.Callback)cb, data, null, cf);
2205 extern (C) alias static void function (Table* this_, void* user_data=null) nothrow signal_model_changed;
2206 ulong signal_connect(string name:"model-changed", CB/*:signal_model_changed*/)
2207 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2208 if (is(typeof(cb)==signal_model_changed)||_ttmm!(CB, signal_model_changed)()) {
2209 return signal_connect_data!()(&this, cast(char*)"model-changed",
2210 cast(GObject2.Callback)cb, data, null, cf);
2212 extern (C) alias static void function (Table* this_, int object, int p0, void* user_data=null) nothrow signal_row_deleted;
2213 ulong signal_connect(string name:"row-deleted", CB/*:signal_row_deleted*/)
2214 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2215 if (is(typeof(cb)==signal_row_deleted)||_ttmm!(CB, signal_row_deleted)()) {
2216 return signal_connect_data!()(&this, cast(char*)"row-deleted",
2217 cast(GObject2.Callback)cb, data, null, cf);
2219 extern (C) alias static void function (Table* this_, int object, int p0, void* user_data=null) nothrow signal_row_inserted;
2220 ulong signal_connect(string name:"row-inserted", CB/*:signal_row_inserted*/)
2221 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2222 if (is(typeof(cb)==signal_row_inserted)||_ttmm!(CB, signal_row_inserted)()) {
2223 return signal_connect_data!()(&this, cast(char*)"row-inserted",
2224 cast(GObject2.Callback)cb, data, null, cf);
2226 extern (C) alias static void function (Table* this_, void* user_data=null) nothrow signal_row_reordered;
2227 ulong signal_connect(string name:"row-reordered", CB/*:signal_row_reordered*/)
2228 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2229 if (is(typeof(cb)==signal_row_reordered)||_ttmm!(CB, signal_row_reordered)()) {
2230 return signal_connect_data!()(&this, cast(char*)"row-reordered",
2231 cast(GObject2.Callback)cb, data, null, cf);
2234 mixin __interface__;
2237 struct TableIface {
2238 GObject2.TypeInterface parent;
2240 // RETURNS: a AtkObject* representing the referred to
2241 // <row>: a #gint representing a row in @table
2242 // <column>: a #gint representing a column in @table
2243 extern (C) Object* /*new*/ function (Table* table, int row, int column) nothrow ref_at;
2245 // RETURNS: a #gint representing the index at specified position.
2246 // <row>: a #gint representing a row in @table
2247 // <column>: a #gint representing a column in @table
2248 extern (C) int function (Table* table, int row, int column) nothrow get_index_at;
2250 // RETURNS: a gint representing the column at the specified index,
2251 // <index_>: a #gint representing an index in @table
2252 extern (C) int function (Table* table, int index_) nothrow get_column_at_index;
2254 // RETURNS: a gint representing the row at the specified index,
2255 // <index_>: a #gint representing an index in @table
2256 extern (C) int function (Table* table, int index_) nothrow get_row_at_index;
2257 // RETURNS: a gint representing the number of columns, or 0
2258 extern (C) int function (Table* table) nothrow get_n_columns;
2259 // RETURNS: a gint representing the number of rows, or 0
2260 extern (C) int function (Table* table) nothrow get_n_rows;
2262 // RETURNS: a gint representing the column extent at specified position, or 0
2263 // <row>: a #gint representing a row in @table
2264 // <column>: a #gint representing a column in @table
2265 extern (C) int function (Table* table, int row, int column) nothrow get_column_extent_at;
2267 // RETURNS: a gint representing the row extent at specified position, or 0
2268 // <row>: a #gint representing a row in @table
2269 // <column>: a #gint representing a column in @table
2270 extern (C) int function (Table* table, int row, int column) nothrow get_row_extent_at;
2271 // RETURNS: a AtkObject* representing the table caption, or
2272 extern (C) Object* function (Table* table) nothrow get_caption;
2274 // RETURNS: a gchar* representing the column description, or %NULL
2275 // <column>: a #gint representing a column in @table
2276 extern (C) char* function (Table* table, int column) nothrow get_column_description;
2278 // RETURNS: a AtkObject* representing the specified column
2279 // <column>: a #gint representing a column in the table
2280 extern (C) Object* function (Table* table, int column) nothrow get_column_header;
2282 // RETURNS: a gchar* representing the row description, or %NULL
2283 // <row>: a #gint representing a row in @table
2284 extern (C) char* function (Table* table, int row) nothrow get_row_description;
2286 // RETURNS: a AtkObject* representing the specified row
2287 // <row>: a #gint representing a row in the table
2288 extern (C) Object* function (Table* table, int row) nothrow get_row_header;
2289 // RETURNS: a AtkObject* representing a summary description
2290 extern (C) Object* /*new*/ function (Table* table) nothrow get_summary;
2291 // <caption>: a #AtkObject representing the caption to set for @table
2292 extern (C) void function (Table* table, Object* caption) nothrow set_caption;
2294 // <column>: a #gint representing a column in @table
2295 // <description>: a #gchar representing the description text to set for the specified @column of the @table
2296 extern (C) void function (Table* table, int column, char* description) nothrow set_column_description;
2298 // <column>: a #gint representing a column in @table
2299 // <header>: an #AtkTable
2300 extern (C) void function (Table* table, int column, Object* header) nothrow set_column_header;
2302 // <row>: a #gint representing a row in @table
2303 // <description>: a #gchar representing the description text to set for the specified @row of @table
2304 extern (C) void function (Table* table, int row, char* description) nothrow set_row_description;
2306 // <row>: a #gint representing a row in @table
2307 // <header>: an #AtkTable
2308 extern (C) void function (Table* table, int row, Object* header) nothrow set_row_header;
2309 // <accessible>: an #AtkObject representing the summary description to set for @table
2310 extern (C) void function (Table* table, Object* accessible) nothrow set_summary;
2312 // RETURNS: a gint representing the number of selected columns,
2313 // <selected>: a #gint** that is to contain the selected columns numbers
2314 extern (C) int function (Table* table, int** selected) nothrow get_selected_columns;
2316 // RETURNS: a gint representing the number of selected rows,
2317 // <selected>: a #gint** that is to contain the selected row numbers
2318 extern (C) int function (Table* table, int** selected) nothrow get_selected_rows;
2320 // RETURNS: a gboolean representing if the column is selected, or 0
2321 // <column>: a #gint representing a column in @table
2322 extern (C) int function (Table* table, int column) nothrow is_column_selected;
2324 // RETURNS: a gboolean representing if the row is selected, or 0
2325 // <row>: a #gint representing a row in @table
2326 extern (C) int function (Table* table, int row) nothrow is_row_selected;
2328 // RETURNS: a gboolean representing if the cell is selected, or 0
2329 // <row>: a #gint representing a row in @table
2330 // <column>: a #gint representing a column in @table
2331 extern (C) int function (Table* table, int row, int column) nothrow is_selected;
2333 // RETURNS: a gboolean representing if row was successfully added to selection,
2334 // <row>: a #gint representing a row in @table
2335 extern (C) int function (Table* table, int row) nothrow add_row_selection;
2337 // RETURNS: a gboolean representing if the row was successfully removed from
2338 // <row>: a #gint representing a row in @table
2339 extern (C) int function (Table* table, int row) nothrow remove_row_selection;
2341 // RETURNS: a gboolean representing if the column was successfully added to
2342 // <column>: a #gint representing a column in @table
2343 extern (C) int function (Table* table, int column) nothrow add_column_selection;
2345 // RETURNS: a gboolean representing if the column was successfully removed from
2346 // <column>: a #gint representing a column in @table
2347 extern (C) int function (Table* table, int column) nothrow remove_column_selection;
2348 extern (C) void function (Table* table, int row, int num_inserted) nothrow row_inserted;
2349 extern (C) void function (Table* table, int column, int num_inserted) nothrow column_inserted;
2350 extern (C) void function (Table* table, int row, int num_deleted) nothrow row_deleted;
2351 extern (C) void function (Table* table, int column, int num_deleted) nothrow column_deleted;
2352 extern (C) void function (Table* table) nothrow row_reordered;
2353 extern (C) void function (Table* table) nothrow column_reordered;
2354 extern (C) void function (Table* table) nothrow model_changed;
2355 Function pad1, pad2, pad3, pad4;
2358 struct Text /* Interface */ {
2359 mixin template __interface__() {
2360 // Adds a selection bounded by the specified offsets.
2361 // RETURNS: %TRUE if success, %FALSE otherwise
2362 // <start_offset>: the start position of the selected region
2363 // <end_offset>: the offset of the first character after the selected region.
2364 int add_selection()(int start_offset, int end_offset) nothrow {
2365 return atk_text_add_selection(cast(Text*)&this, start_offset, end_offset);
2368 // VERSION: 1.3
2369 // Get the ranges of text in the specified bounding box.
2370 // element of the array returned by this function will be NULL.
2371 // RETURNS: Array of AtkTextRange. The last
2372 // <rect>: An AtkTextRectangle giving the dimensions of the bounding box.
2373 // <coord_type>: Specify whether coordinates are relative to the screen or widget window.
2374 // <x_clip_type>: Specify the horizontal clip type.
2375 // <y_clip_type>: Specify the vertical clip type.
2376 TextRange** /*new*/ get_bounded_ranges(AT0)(AT0 /*TextRectangle*/ rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type) nothrow {
2377 return atk_text_get_bounded_ranges(cast(Text*)&this, UpCast!(TextRectangle*)(rect), coord_type, x_clip_type, y_clip_type);
2380 // Gets the offset position of the caret (cursor).
2381 // RETURNS: the offset position of the caret (cursor).
2382 int get_caret_offset()() nothrow {
2383 return atk_text_get_caret_offset(cast(Text*)&this);
2386 // Gets the specified text.
2387 // RETURNS: the character at @offset.
2388 // <offset>: position
2389 dchar get_character_at_offset()(int offset) nothrow {
2390 return atk_text_get_character_at_offset(cast(Text*)&this, offset);
2393 // Gets the character count.
2394 // RETURNS: the number of characters.
2395 int get_character_count()() nothrow {
2396 return atk_text_get_character_count(cast(Text*)&this);
2399 // Get the bounding box containing the glyph representing the character at
2400 // a particular text offset.
2401 // <offset>: The offset of the text character for which bounding information is required.
2402 // <x>: Pointer for the x cordinate of the bounding box
2403 // <y>: Pointer for the y cordinate of the bounding box
2404 // <width>: Pointer for the width of the bounding box
2405 // <height>: Pointer for the height of the bounding box
2406 // <coords>: specify whether coordinates are relative to the screen or widget window
2407 void get_character_extents()(int offset, int* x, int* y, int* width, int* height, CoordType coords) nothrow {
2408 atk_text_get_character_extents(cast(Text*)&this, offset, x, y, width, height, coords);
2411 // Creates an #AtkAttributeSet which consists of the default values of
2412 // attributes for the text. See the enum AtkTextAttribute for types of text
2413 // attributes that can be returned. Note that other attributes may also be
2414 // returned.
2415 // values of attributes. at @offset. this #atkattributeset should be freed by
2416 // a call to atk_attribute_set_free().
2417 // RETURNS: an #AtkAttributeSet which contains the default
2418 AttributeSet* /*new*/ get_default_attributes()() nothrow {
2419 return atk_text_get_default_attributes(cast(Text*)&this);
2422 // Gets the number of selected regions.
2423 // occurred.
2424 // RETURNS: The number of selected regions, or -1 if a failure
2425 int get_n_selections()() nothrow {
2426 return atk_text_get_n_selections(cast(Text*)&this);
2429 // Gets the offset of the character located at coordinates @x and @y. @x and @y
2430 // are interpreted as being relative to the screen or this widget's window
2431 // depending on @coords.
2432 // the specified @x and @y coordinates.
2433 // RETURNS: the offset to the character which is located at
2434 // <x>: screen x-position of character
2435 // <y>: screen y-position of character
2436 // <coords>: specify whether coordinates are relative to the screen or widget window
2437 int get_offset_at_point()(int x, int y, CoordType coords) nothrow {
2438 return atk_text_get_offset_at_point(cast(Text*)&this, x, y, coords);
2441 // VERSION: 1.3
2442 // Get the bounding box for text within the specified range.
2443 // <start_offset>: The offset of the first text character for which boundary information is required.
2444 // <end_offset>: The offset of the text character after the last character for which boundary information is required.
2445 // <coord_type>: Specify whether coordinates are relative to the screen or widget window.
2446 // <rect>: A pointer to a AtkTextRectangle which is filled in by this function.
2447 void get_range_extents(AT0)(int start_offset, int end_offset, CoordType coord_type, AT0 /*TextRectangle*/ rect) nothrow {
2448 atk_text_get_range_extents(cast(Text*)&this, start_offset, end_offset, coord_type, UpCast!(TextRectangle*)(rect));
2451 // Creates an #AtkAttributeSet which consists of the attributes explicitly
2452 // set at the position @offset in the text. @start_offset and @end_offset are
2453 // set to the start and end of the range around @offset where the attributes are
2454 // invariant. Note that @end_offset is the offset of the first character
2455 // after the range. See the enum AtkTextAttribute for types of text
2456 // attributes that can be returned. Note that other attributes may also be
2457 // returned.
2458 // explicitly set at @offset. This #AtkAttributeSet should be freed by a call
2459 // to atk_attribute_set_free().
2460 // RETURNS: an #AtkAttributeSet which contains the attributes
2461 // <offset>: the offset at which to get the attributes, -1 means the offset of the character to be inserted at the caret location.
2462 // <start_offset>: the address to put the start offset of the range
2463 // <end_offset>: the address to put the end offset of the range
2464 AttributeSet* /*new*/ get_run_attributes()(int offset, int* start_offset, int* end_offset) nothrow {
2465 return atk_text_get_run_attributes(cast(Text*)&this, offset, start_offset, end_offset);
2468 // Gets the text from the specified selection.
2469 // to free the returned string.
2470 // RETURNS: a newly allocated string containing the selected text. Use g_free()
2471 // <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.
2472 // <start_offset>: passes back the start position of the selected region
2473 // <end_offset>: passes back the end position of (e.g. offset immediately past) the selected region
2474 char* /*new*/ get_selection()(int selection_num, int* start_offset, int* end_offset) nothrow {
2475 return atk_text_get_selection(cast(Text*)&this, selection_num, start_offset, end_offset);
2478 // Gets the specified text.
2479 // to, but not including @end_offset. Use g_free() to free the returned string.
2480 // RETURNS: a newly allocated string containing the text from @start_offset up
2481 // <start_offset>: start position
2482 // <end_offset>: end position
2483 char* /*new*/ get_text()(int start_offset, int end_offset) nothrow {
2484 return atk_text_get_text(cast(Text*)&this, start_offset, end_offset);
2487 // Gets the specified text.
2488 // If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character after the
2489 // offset is returned.
2490 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2491 // is from the word start after the offset to the next word start.
2492 // The returned string will contain the word after the offset if the offset
2493 // is inside a word or if the offset is not inside a word.
2494 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
2495 // is from the word end at or after the offset to the next work end.
2496 // The returned string will contain the word after the offset if the offset
2497 // is inside a word and will contain the word after the word after the offset
2498 // if the offset is not inside a word.
2499 // If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2500 // string is from the sentence start after the offset to the next sentence
2501 // start.
2502 // The returned string will contain the sentence after the offset if the offset
2503 // is inside a sentence or if the offset is not inside a sentence.
2504 // If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
2505 // is from the sentence end at or after the offset to the next sentence end.
2506 // The returned string will contain the sentence after the offset if the offset
2507 // is inside a sentence and will contain the sentence after the sentence
2508 // after the offset if the offset is not inside a sentence.
2509 // If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2510 // string is from the line start after the offset to the next line start.
2511 // If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
2512 // is from the line end at or after the offset to the next line end.
2513 // by the specified @boundary_type. Use g_free() to free the returned string.
2514 // RETURNS: a newly allocated string containing the text after @offset bounded
2515 // <offset>: position
2516 // <boundary_type>: An #AtkTextBoundary
2517 // <start_offset>: the start offset of the returned string
2518 // <end_offset>: the offset of the first character after the returned substring
2519 char* /*new*/ get_text_after_offset()(int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow {
2520 return atk_text_get_text_after_offset(cast(Text*)&this, offset, boundary_type, start_offset, end_offset);
2523 // Gets the specified text.
2524 // If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the
2525 // offset is returned.
2526 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2527 // is from the word start at or before the offset to the word start after
2528 // the offset.
2529 // The returned string will contain the word at the offset if the offset
2530 // is inside a word and will contain the word before the offset if the
2531 // offset is not inside a word.
2532 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
2533 // is from the word end before the offset to the word end at or after the
2534 // offset.
2535 // The returned string will contain the word at the offset if the offset
2536 // is inside a word and will contain the word after to the offset if the
2537 // offset is not inside a word.
2538 // If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2539 // string is from the sentence start at or before the offset to the sentence
2540 // start after the offset.
2541 // The returned string will contain the sentence at the offset if the offset
2542 // is inside a sentence and will contain the sentence before the offset
2543 // if the offset is not inside a sentence.
2544 // If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
2545 // is from the sentence end before the offset to the sentence end at or
2546 // after the offset.
2547 // The returned string will contain the sentence at the offset if the offset
2548 // is inside a sentence and will contain the sentence after the offset
2549 // if the offset is not inside a sentence.
2550 // If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2551 // string is from the line start at or before the offset to the line
2552 // start after the offset.
2553 // If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
2554 // is from the line end before the offset to the line end at or after
2555 // the offset.
2556 // the specified @boundary_type. Use g_free() to free the returned string.
2557 // RETURNS: a newly allocated string containing the text at @offset bounded by
2558 // <offset>: position
2559 // <boundary_type>: An #AtkTextBoundary
2560 // <start_offset>: the start offset of the returned string
2561 // <end_offset>: the offset of the first character after the returned substring
2562 char* /*new*/ get_text_at_offset()(int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow {
2563 return atk_text_get_text_at_offset(cast(Text*)&this, offset, boundary_type, start_offset, end_offset);
2566 // Gets the specified text.
2567 // If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character before the
2568 // offset is returned.
2569 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
2570 // is from the word start before the word start before or at the offset to
2571 // the word start before or at the offset.
2572 // The returned string will contain the word before the offset if the offset
2573 // is inside a word and will contain the word before the word before the
2574 // offset if the offset is not inside a word.
2575 // If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
2576 // is from the word end before the word end before the offset to the word
2577 // end before the offset.
2578 // The returned string will contain the word before the offset if the offset
2579 // is inside a word or if the offset is not inside a word.
2580 // If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
2581 // string is from the sentence start before the sentence start before
2582 // the offset to the sentence start before the offset.
2583 // The returned string will contain the sentence before the offset if the
2584 // offset is inside a sentence and will contain the sentence before the
2585 // sentence before the offset if the offset is not inside a sentence.
2586 // If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
2587 // is from the sentence end before the sentence end at or before the offset to
2588 // the sentence end at or before the offset.
2589 // The returned string will contain the sentence before the offset if the
2590 // offset is inside a sentence or if the offset is not inside a sentence.
2591 // If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
2592 // string is from the line start before the line start ar or before the offset
2593 // to the line start ar or before the offset.
2594 // If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
2595 // is from the line end before the line end before the offset to the
2596 // line end before the offset.
2597 // by the specified @boundary_type. Use g_free() to free the returned string.
2598 // RETURNS: a newly allocated string containing the text before @offset bounded
2599 // <offset>: position
2600 // <boundary_type>: An #AtkTextBoundary
2601 // <start_offset>: the start offset of the returned string
2602 // <end_offset>: the offset of the first character after the returned substring
2603 char* /*new*/ get_text_before_offset()(int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow {
2604 return atk_text_get_text_before_offset(cast(Text*)&this, offset, boundary_type, start_offset, end_offset);
2607 // Removes the specified selection.
2608 // RETURNS: %TRUE if success, %FALSE otherwise
2609 // <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.
2610 int remove_selection()(int selection_num) nothrow {
2611 return atk_text_remove_selection(cast(Text*)&this, selection_num);
2614 // Sets the caret (cursor) position to the specified @offset.
2615 // RETURNS: %TRUE if success, %FALSE otherwise.
2616 // <offset>: position
2617 int set_caret_offset()(int offset) nothrow {
2618 return atk_text_set_caret_offset(cast(Text*)&this, offset);
2621 // Changes the start and end offset of the specified selection.
2622 // RETURNS: %TRUE if success, %FALSE otherwise
2623 // <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.
2624 // <start_offset>: the new start position of the selection
2625 // <end_offset>: the new end position of (e.g. offset immediately past) the selection
2626 int set_selection()(int selection_num, int start_offset, int end_offset) nothrow {
2627 return atk_text_set_selection(cast(Text*)&this, selection_num, start_offset, end_offset);
2629 extern (C) alias static void function (Text* this_, void* user_data=null) nothrow signal_text_attributes_changed;
2631 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2632 return super_.signal_connect!name(cb, data, cf);
2635 ulong signal_connect(string name:"text-attributes-changed", CB/*:signal_text_attributes_changed*/)
2636 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2637 if (is(typeof(cb)==signal_text_attributes_changed)||_ttmm!(CB, signal_text_attributes_changed)()) {
2638 return signal_connect_data!()(&this, cast(char*)"text-attributes-changed",
2639 cast(GObject2.Callback)cb, data, null, cf);
2641 extern (C) alias static void function (Text* this_, int object, void* user_data=null) nothrow signal_text_caret_moved;
2642 ulong signal_connect(string name:"text-caret-moved", CB/*:signal_text_caret_moved*/)
2643 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2644 if (is(typeof(cb)==signal_text_caret_moved)||_ttmm!(CB, signal_text_caret_moved)()) {
2645 return signal_connect_data!()(&this, cast(char*)"text-caret-moved",
2646 cast(GObject2.Callback)cb, data, null, cf);
2648 extern (C) alias static void function (Text* this_, int object, int p0, void* user_data=null) nothrow signal_text_changed;
2649 ulong signal_connect(string name:"text-changed", CB/*:signal_text_changed*/)
2650 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2651 if (is(typeof(cb)==signal_text_changed)||_ttmm!(CB, signal_text_changed)()) {
2652 return signal_connect_data!()(&this, cast(char*)"text-changed",
2653 cast(GObject2.Callback)cb, data, null, cf);
2655 extern (C) alias static void function (Text* this_, int object, int p0, char* p1, void* user_data=null) nothrow signal_text_insert;
2656 ulong signal_connect(string name:"text-insert", CB/*:signal_text_insert*/)
2657 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2658 if (is(typeof(cb)==signal_text_insert)||_ttmm!(CB, signal_text_insert)()) {
2659 return signal_connect_data!()(&this, cast(char*)"text-insert",
2660 cast(GObject2.Callback)cb, data, null, cf);
2662 extern (C) alias static void function (Text* this_, int object, int p0, char* p1, void* user_data=null) nothrow signal_text_remove;
2663 ulong signal_connect(string name:"text-remove", CB/*:signal_text_remove*/)
2664 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2665 if (is(typeof(cb)==signal_text_remove)||_ttmm!(CB, signal_text_remove)()) {
2666 return signal_connect_data!()(&this, cast(char*)"text-remove",
2667 cast(GObject2.Callback)cb, data, null, cf);
2669 extern (C) alias static void function (Text* this_, void* user_data=null) nothrow signal_text_selection_changed;
2670 ulong signal_connect(string name:"text-selection-changed", CB/*:signal_text_selection_changed*/)
2671 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2672 if (is(typeof(cb)==signal_text_selection_changed)||_ttmm!(CB, signal_text_selection_changed)()) {
2673 return signal_connect_data!()(&this, cast(char*)"text-selection-changed",
2674 cast(GObject2.Callback)cb, data, null, cf);
2676 extern (C) alias static void function (Text* this_, int object, int p0, int p1, char* p2, void* user_data=null) nothrow signal_text_update;
2677 ulong signal_connect(string name:"text-update", CB/*:signal_text_update*/)
2678 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2679 if (is(typeof(cb)==signal_text_update)||_ttmm!(CB, signal_text_update)()) {
2680 return signal_connect_data!()(&this, cast(char*)"text-update",
2681 cast(GObject2.Callback)cb, data, null, cf);
2684 mixin __interface__;
2687 enum TextAttribute {
2688 INVALID = 0,
2689 LEFT_MARGIN = 1,
2690 RIGHT_MARGIN = 2,
2691 INDENT = 3,
2692 INVISIBLE = 4,
2693 EDITABLE = 5,
2694 PIXELS_ABOVE_LINES = 6,
2695 PIXELS_BELOW_LINES = 7,
2696 PIXELS_INSIDE_WRAP = 8,
2697 BG_FULL_HEIGHT = 9,
2698 RISE = 10,
2699 UNDERLINE = 11,
2700 STRIKETHROUGH = 12,
2701 SIZE = 13,
2702 SCALE = 14,
2703 WEIGHT = 15,
2704 LANGUAGE = 16,
2705 FAMILY_NAME = 17,
2706 BG_COLOR = 18,
2707 FG_COLOR = 19,
2708 BG_STIPPLE = 20,
2709 FG_STIPPLE = 21,
2710 WRAP_MODE = 22,
2711 DIRECTION = 23,
2712 JUSTIFICATION = 24,
2713 STRETCH = 25,
2714 VARIANT = 26,
2715 STYLE = 27,
2716 LAST_DEFINED = 28
2718 enum TextBoundary {
2719 CHAR = 0,
2720 WORD_START = 1,
2721 WORD_END = 2,
2722 SENTENCE_START = 3,
2723 SENTENCE_END = 4,
2724 LINE_START = 5,
2725 LINE_END = 6
2727 enum TextClipType {
2728 NONE = 0,
2729 MIN = 1,
2730 MAX = 2,
2731 BOTH = 3
2733 struct TextIface {
2734 GObject2.TypeInterface parent;
2736 // RETURNS: a newly allocated string containing the text from @start_offset up
2737 // <start_offset>: start position
2738 // <end_offset>: end position
2739 extern (C) char* /*new*/ function (Text* text, int start_offset, int end_offset) nothrow get_text;
2741 // RETURNS: a newly allocated string containing the text after @offset bounded
2742 // <offset>: position
2743 // <boundary_type>: An #AtkTextBoundary
2744 // <start_offset>: the start offset of the returned string
2745 // <end_offset>: the offset of the first character after the returned substring
2746 extern (C) char* /*new*/ function (Text* text, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow get_text_after_offset;
2748 // RETURNS: a newly allocated string containing the text at @offset bounded by
2749 // <offset>: position
2750 // <boundary_type>: An #AtkTextBoundary
2751 // <start_offset>: the start offset of the returned string
2752 // <end_offset>: the offset of the first character after the returned substring
2753 extern (C) char* /*new*/ function (Text* text, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow get_text_at_offset;
2755 // RETURNS: the character at @offset.
2756 // <offset>: position
2757 extern (C) dchar function (Text* text, int offset) nothrow get_character_at_offset;
2759 // RETURNS: a newly allocated string containing the text before @offset bounded
2760 // <offset>: position
2761 // <boundary_type>: An #AtkTextBoundary
2762 // <start_offset>: the start offset of the returned string
2763 // <end_offset>: the offset of the first character after the returned substring
2764 extern (C) char* /*new*/ function (Text* text, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow get_text_before_offset;
2765 // RETURNS: the offset position of the caret (cursor).
2766 extern (C) int function (Text* text) nothrow get_caret_offset;
2768 // RETURNS: an #AtkAttributeSet which contains the attributes
2769 // <offset>: the offset at which to get the attributes, -1 means the offset of the character to be inserted at the caret location.
2770 // <start_offset>: the address to put the start offset of the range
2771 // <end_offset>: the address to put the end offset of the range
2772 extern (C) AttributeSet* /*new*/ function (Text* text, int offset, int* start_offset, int* end_offset) nothrow get_run_attributes;
2773 // RETURNS: an #AtkAttributeSet which contains the default
2774 extern (C) AttributeSet* /*new*/ function (Text* text) nothrow get_default_attributes;
2776 // <offset>: The offset of the text character for which bounding information is required.
2777 // <x>: Pointer for the x cordinate of the bounding box
2778 // <y>: Pointer for the y cordinate of the bounding box
2779 // <width>: Pointer for the width of the bounding box
2780 // <height>: Pointer for the height of the bounding box
2781 // <coords>: specify whether coordinates are relative to the screen or widget window
2782 extern (C) void function (Text* text, int offset, int* x, int* y, int* width, int* height, CoordType coords) nothrow get_character_extents;
2783 // RETURNS: the number of characters.
2784 extern (C) int function (Text* text) nothrow get_character_count;
2786 // RETURNS: the offset to the character which is located at
2787 // <x>: screen x-position of character
2788 // <y>: screen y-position of character
2789 // <coords>: specify whether coordinates are relative to the screen or widget window
2790 extern (C) int function (Text* text, int x, int y, CoordType coords) nothrow get_offset_at_point;
2791 // RETURNS: The number of selected regions, or -1 if a failure
2792 extern (C) int function (Text* text) nothrow get_n_selections;
2794 // RETURNS: a newly allocated string containing the selected text. Use g_free()
2795 // <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.
2796 // <start_offset>: passes back the start position of the selected region
2797 // <end_offset>: passes back the end position of (e.g. offset immediately past) the selected region
2798 extern (C) char* /*new*/ function (Text* text, int selection_num, int* start_offset, int* end_offset) nothrow get_selection;
2800 // RETURNS: %TRUE if success, %FALSE otherwise
2801 // <start_offset>: the start position of the selected region
2802 // <end_offset>: the offset of the first character after the selected region.
2803 extern (C) int function (Text* text, int start_offset, int end_offset) nothrow add_selection;
2805 // RETURNS: %TRUE if success, %FALSE otherwise
2806 // <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.
2807 extern (C) int function (Text* text, int selection_num) nothrow remove_selection;
2809 // RETURNS: %TRUE if success, %FALSE otherwise
2810 // <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.
2811 // <start_offset>: the new start position of the selection
2812 // <end_offset>: the new end position of (e.g. offset immediately past) the selection
2813 extern (C) int function (Text* text, int selection_num, int start_offset, int end_offset) nothrow set_selection;
2815 // RETURNS: %TRUE if success, %FALSE otherwise.
2816 // <offset>: position
2817 extern (C) int function (Text* text, int offset) nothrow set_caret_offset;
2818 extern (C) void function (Text* text, int position, int length) nothrow text_changed;
2819 extern (C) void function (Text* text, int location) nothrow text_caret_moved;
2820 extern (C) void function (Text* text) nothrow text_selection_changed;
2821 extern (C) void function (Text* text) nothrow text_attributes_changed;
2823 // <start_offset>: The offset of the first text character for which boundary information is required.
2824 // <end_offset>: The offset of the text character after the last character for which boundary information is required.
2825 // <coord_type>: Specify whether coordinates are relative to the screen or widget window.
2826 // <rect>: A pointer to a AtkTextRectangle which is filled in by this function.
2827 extern (C) void function (Text* text, int start_offset, int end_offset, CoordType coord_type, TextRectangle* rect) nothrow get_range_extents;
2828 extern (C) TextRange** /*new*/ function (Text* text, TextRectangle* rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type) nothrow get_bounded_ranges;
2829 Function pad4;
2832 // A structure used to describe a text range.
2833 struct TextRange {
2834 TextRectangle bounds;
2835 int start_offset, end_offset;
2836 char* content;
2839 // A structure used to store a rectangle used by AtkText.
2840 struct TextRectangle {
2841 int x, y, width, height;
2844 struct Util /* : GObject.Object */ {
2845 alias parent this;
2846 alias parent super_;
2847 alias parent object;
2848 GObject2.Object parent;
2851 struct UtilClass {
2852 GObject2.ObjectClass parent;
2853 // Unintrospectable functionp: add_global_event_listener() / ()
2854 extern (C) uint function (GObject2.SignalEmissionHook listener, char* event_type) nothrow add_global_event_listener;
2855 extern (C) void function (uint listener_id) nothrow remove_global_event_listener;
2856 // Unintrospectable functionp: add_key_event_listener() / ()
2857 extern (C) uint function (KeySnoopFunc listener, void* data) nothrow add_key_event_listener;
2858 extern (C) void function (uint listener_id) nothrow remove_key_event_listener;
2859 // Unintrospectable functionp: get_root() / ()
2860 extern (C) Object* function () nothrow get_root;
2861 extern (C) char* function () nothrow get_toolkit_name;
2862 extern (C) char* function () nothrow get_toolkit_version;
2865 struct Value /* Interface */ {
2866 mixin template __interface__() {
2867 // Gets the value of this object.
2868 // <value>: a #GValue representing the current accessible value
2869 void get_current_value(AT0)(AT0 /*GObject2.Value*/ value) nothrow {
2870 atk_value_get_current_value(cast(Value*)&this, UpCast!(GObject2.Value*)(value));
2873 // Gets the maximum value of this object.
2874 // <value>: a #GValue representing the maximum accessible value
2875 void get_maximum_value(AT0)(AT0 /*GObject2.Value*/ value) nothrow {
2876 atk_value_get_maximum_value(cast(Value*)&this, UpCast!(GObject2.Value*)(value));
2879 // VERSION: 1.12
2880 // Gets the minimum increment by which the value of this object may be changed. If zero,
2881 // the minimum increment is undefined, which may mean that it is limited only by the
2882 // floating point precision of the platform.
2883 // <value>: a #GValue representing the minimum increment by which the accessible value may be changed
2884 void get_minimum_increment(AT0)(AT0 /*GObject2.Value*/ value) nothrow {
2885 atk_value_get_minimum_increment(cast(Value*)&this, UpCast!(GObject2.Value*)(value));
2888 // Gets the minimum value of this object.
2889 // <value>: a #GValue representing the minimum accessible value
2890 void get_minimum_value(AT0)(AT0 /*GObject2.Value*/ value) nothrow {
2891 atk_value_get_minimum_value(cast(Value*)&this, UpCast!(GObject2.Value*)(value));
2894 // Sets the value of this object.
2895 // RETURNS: %TRUE if new value is successfully set, %FALSE otherwise.
2896 // <value>: a #GValue which is the desired new accessible value.
2897 int set_current_value(AT0)(AT0 /*GObject2.Value*/ value) nothrow {
2898 return atk_value_set_current_value(cast(Value*)&this, UpCast!(GObject2.Value*)(value));
2901 mixin __interface__;
2904 struct ValueIface {
2905 GObject2.TypeInterface parent;
2906 // <value>: a #GValue representing the current accessible value
2907 extern (C) void function (Value* obj, GObject2.Value* value) nothrow get_current_value;
2908 // <value>: a #GValue representing the maximum accessible value
2909 extern (C) void function (Value* obj, GObject2.Value* value) nothrow get_maximum_value;
2910 // <value>: a #GValue representing the minimum accessible value
2911 extern (C) void function (Value* obj, GObject2.Value* value) nothrow get_minimum_value;
2913 // RETURNS: %TRUE if new value is successfully set, %FALSE otherwise.
2914 // <value>: a #GValue which is the desired new accessible value.
2915 extern (C) int function (Value* obj, GObject2.Value* value) nothrow set_current_value;
2916 // <value>: a #GValue representing the minimum increment by which the accessible value may be changed
2917 extern (C) void function (Value* obj, GObject2.Value* value) nothrow get_minimum_increment;
2918 Function pad1;
2921 struct Window /* Interface */ {
2922 mixin template __interface__() { extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_activate;
2924 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2925 return super_.signal_connect!name(cb, data, cf);
2928 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)
2929 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2930 if (is(typeof(cb)==signal_activate)||_ttmm!(CB, signal_activate)()) {
2931 return signal_connect_data!()(&this, cast(char*)"activate",
2932 cast(GObject2.Callback)cb, data, null, cf);
2934 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_create;
2935 ulong signal_connect(string name:"create", CB/*:signal_create*/)
2936 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2937 if (is(typeof(cb)==signal_create)||_ttmm!(CB, signal_create)()) {
2938 return signal_connect_data!()(&this, cast(char*)"create",
2939 cast(GObject2.Callback)cb, data, null, cf);
2941 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_deactivate;
2942 ulong signal_connect(string name:"deactivate", CB/*:signal_deactivate*/)
2943 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2944 if (is(typeof(cb)==signal_deactivate)||_ttmm!(CB, signal_deactivate)()) {
2945 return signal_connect_data!()(&this, cast(char*)"deactivate",
2946 cast(GObject2.Callback)cb, data, null, cf);
2948 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_destroy;
2949 ulong signal_connect(string name:"destroy", CB/*:signal_destroy*/)
2950 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2951 if (is(typeof(cb)==signal_destroy)||_ttmm!(CB, signal_destroy)()) {
2952 return signal_connect_data!()(&this, cast(char*)"destroy",
2953 cast(GObject2.Callback)cb, data, null, cf);
2955 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_maximize;
2956 ulong signal_connect(string name:"maximize", CB/*:signal_maximize*/)
2957 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2958 if (is(typeof(cb)==signal_maximize)||_ttmm!(CB, signal_maximize)()) {
2959 return signal_connect_data!()(&this, cast(char*)"maximize",
2960 cast(GObject2.Callback)cb, data, null, cf);
2962 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_minimize;
2963 ulong signal_connect(string name:"minimize", CB/*:signal_minimize*/)
2964 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2965 if (is(typeof(cb)==signal_minimize)||_ttmm!(CB, signal_minimize)()) {
2966 return signal_connect_data!()(&this, cast(char*)"minimize",
2967 cast(GObject2.Callback)cb, data, null, cf);
2969 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_move;
2970 ulong signal_connect(string name:"move", CB/*:signal_move*/)
2971 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2972 if (is(typeof(cb)==signal_move)||_ttmm!(CB, signal_move)()) {
2973 return signal_connect_data!()(&this, cast(char*)"move",
2974 cast(GObject2.Callback)cb, data, null, cf);
2976 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_resize;
2977 ulong signal_connect(string name:"resize", CB/*:signal_resize*/)
2978 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2979 if (is(typeof(cb)==signal_resize)||_ttmm!(CB, signal_resize)()) {
2980 return signal_connect_data!()(&this, cast(char*)"resize",
2981 cast(GObject2.Callback)cb, data, null, cf);
2983 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_restore;
2984 ulong signal_connect(string name:"restore", CB/*:signal_restore*/)
2985 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2986 if (is(typeof(cb)==signal_restore)||_ttmm!(CB, signal_restore)()) {
2987 return signal_connect_data!()(&this, cast(char*)"restore",
2988 cast(GObject2.Callback)cb, data, null, cf);
2991 mixin __interface__;
2994 struct WindowIface {
2995 GObject2.TypeInterface parent;
2996 void*[16] _padding_dummy;
2999 struct _PropertyValues {
3000 char* property_name;
3001 GObject2.Value old_value, new_value;
3004 struct _Registry {
3005 GObject2.Object parent;
3006 GLib2.HashTable* factory_type_registry, factory_singleton_cache;
3009 struct _RegistryClass {
3010 GObject2.ObjectClass parent_class;
3014 // Unintrospectable function: add_focus_tracker() / atk_add_focus_tracker()
3015 // Adds the specified function to the list of functions to be called
3016 // when an object receives focus.
3017 // RETURNS: added focus tracker id, or 0 on failure.
3018 // <focus_tracker>: Function to be added to the list of functions to be called when an object receives focus.
3019 static uint add_focus_tracker()(EventListener focus_tracker) nothrow {
3020 return atk_add_focus_tracker(focus_tracker);
3024 // Unintrospectable function: add_global_event_listener() / atk_add_global_event_listener()
3025 // Adds the specified function to the list of functions to be called
3026 // when an ATK event of type event_type occurs.
3027 // The format of event_type is the following:
3028 // "ATK:<atk_type>:<atk_event>
3029 // Where "ATK" works as the namespace, <atk_interface> is the name of
3030 // the ATK type (interface or object) and <atk_event> is the name of
3031 // the signal defined on that interface.
3032 // For example:
3033 // ATK:AtkObject:state-change
3034 // ATK:AtkText:text-selection-changed
3035 // RETURNS: added event listener id, or 0 on failure.
3036 // <listener>: the listener to notify
3037 // <event_type>: the type of event for which notification is requested
3038 static uint add_global_event_listener(AT0)(GObject2.SignalEmissionHook listener, AT0 /*char*/ event_type) nothrow {
3039 return atk_add_global_event_listener(listener, toCString!(char*)(event_type));
3043 // Unintrospectable function: add_key_event_listener() / atk_add_key_event_listener()
3044 // Adds the specified function to the list of functions to be called
3045 // when a key event occurs. The @data element will be passed to the
3046 // #AtkKeySnoopFunc (@listener) as the @func_data param, on notification.
3047 // RETURNS: added event listener id, or 0 on failure.
3048 // <listener>: the listener to notify
3049 // <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.
3050 static uint add_key_event_listener(AT0)(KeySnoopFunc listener, AT0 /*void*/ data) nothrow {
3051 return atk_add_key_event_listener(listener, UpCast!(void*)(data));
3055 // Frees the memory used by an #AtkAttributeSet, including all its
3056 // #AtkAttributes.
3057 // <attrib_set>: The #AtkAttributeSet to free
3058 static void attribute_set_free(AT0)(AT0 /*AttributeSet*/ attrib_set) nothrow {
3059 atk_attribute_set_free(UpCast!(AttributeSet*)(attrib_set));
3063 // Unintrospectable function: focus_tracker_init() / atk_focus_tracker_init()
3064 // Specifies the function to be called for focus tracker initialization.
3065 // This function should be called by an implementation of the
3066 // ATK interface if any specific work needs to be done to enable
3067 // focus tracking.
3068 // <init>: Function to be called for focus tracker initialization
3069 static void focus_tracker_init()(EventListenerInit init) nothrow {
3070 atk_focus_tracker_init(init);
3074 // Cause the focus tracker functions which have been specified to be
3075 // executed for the object.
3076 // <object>: an #AtkObject
3077 static void focus_tracker_notify(AT0)(AT0 /*Object*/ object) nothrow {
3078 atk_focus_tracker_notify(UpCast!(Object*)(object));
3082 // Gets a default implementation of the #AtkObjectFactory/type
3083 // registry.
3084 // registry for registering new #AtkObject factories. Following
3085 // a call to this function, maintainers may call atk_registry_set_factory_type()
3086 // to associate an #AtkObjectFactory subclass with the GType of objects
3087 // for whom accessibility information will be provided.
3088 // #AtkObjectFactory/type registry
3089 // RETURNS: a default implementation of the
3090 static Registry* /*new*/ get_default_registry()() nothrow {
3091 return atk_get_default_registry();
3095 // VERSION: 1.6
3096 // Gets the currently focused object.
3097 // application
3098 // RETURNS: the currently focused object for the current
3099 static Object* get_focus_object()() nothrow {
3100 return atk_get_focus_object();
3104 // Gets the root accessible container for the current application.
3105 // application
3106 // RETURNS: the root accessible container for the current
3107 static Object* get_root()() nothrow {
3108 return atk_get_root();
3112 // Gets name string for the GUI toolkit implementing ATK for this application.
3113 // RETURNS: name string for the GUI toolkit implementing ATK for this application
3114 static char* get_toolkit_name()() nothrow {
3115 return atk_get_toolkit_name();
3119 // Gets version string for the GUI toolkit implementing ATK for this application.
3120 // RETURNS: version string for the GUI toolkit implementing ATK for this application
3121 static char* get_toolkit_version()() nothrow {
3122 return atk_get_toolkit_version();
3126 // VERSION: 1.20
3127 // Gets the current version for ATK.
3128 // RETURNS: version string for ATK
3129 static char* get_version()() nothrow {
3130 return atk_get_version();
3134 // Get the #AtkRelationType type corresponding to a relation name.
3135 // or #ATK_RELATION_NULL if no matching relation type is found.
3136 // RETURNS: the #AtkRelationType enumerated type corresponding to the specified name,
3137 // <name>: a string which is the (non-localized) name of an ATK relation type.
3138 static RelationType relation_type_for_name(AT0)(AT0 /*char*/ name) nothrow {
3139 return atk_relation_type_for_name(toCString!(char*)(name));
3143 // Gets the description string describing the #AtkRelationType @type.
3144 // RETURNS: the string describing the AtkRelationType
3145 // <type>: The #AtkRelationType whose name is required
3146 static char* relation_type_get_name()(RelationType type) nothrow {
3147 return atk_relation_type_get_name(type);
3151 // Associate @name with a new #AtkRelationType
3152 // RETURNS: an #AtkRelationType associated with @name
3153 // <name>: a name string
3154 static RelationType relation_type_register(AT0)(AT0 /*char*/ name) nothrow {
3155 return atk_relation_type_register(toCString!(char*)(name));
3159 // Removes the specified focus tracker from the list of functions
3160 // to be called when any object receives focus.
3161 // <tracker_id>: the id of the focus tracker to remove
3162 static void remove_focus_tracker()(uint tracker_id) nothrow {
3163 atk_remove_focus_tracker(tracker_id);
3167 // Removes the specified event listener
3168 // <listener_id>: the id of the event listener to remove
3169 static void remove_global_event_listener()(uint listener_id) nothrow {
3170 atk_remove_global_event_listener(listener_id);
3174 // Removes the specified event listener
3175 // <listener_id>: the id of the event listener to remove
3176 static void remove_key_event_listener()(uint listener_id) nothrow {
3177 atk_remove_key_event_listener(listener_id);
3181 // Get the #AtkRole type corresponding to a rolew name.
3182 // or #ATK_ROLE_INVALID if no matching role is found.
3183 // RETURNS: the #AtkRole enumerated type corresponding to the specified
3184 // <name>: a string which is the (non-localized) name of an ATK role.
3185 static Role role_for_name(AT0)(AT0 /*char*/ name) nothrow {
3186 return atk_role_for_name(toCString!(char*)(name));
3190 // Gets the localized description string describing the #AtkRole @role.
3191 // RETURNS: the localized string describing the AtkRole
3192 // <role>: The #AtkRole whose localized name is required
3193 static char* role_get_localized_name()(Role role) nothrow {
3194 return atk_role_get_localized_name(role);
3198 // Gets the description string describing the #AtkRole @role.
3199 // RETURNS: the string describing the AtkRole
3200 // <role>: The #AtkRole whose name is required
3201 static char* role_get_name()(Role role) nothrow {
3202 return atk_role_get_name(role);
3206 // Registers the role specified by @name.
3207 // RETURNS: an #AtkRole for the new role.
3208 // <name>: a character string describing the new role.
3209 static Role role_register(AT0)(AT0 /*char*/ name) nothrow {
3210 return atk_role_register(toCString!(char*)(name));
3214 // Gets the #AtkStateType corresponding to the description string @name.
3215 // RETURNS: an #AtkStateType corresponding to @name
3216 // <name>: a character string state name
3217 static StateType state_type_for_name(AT0)(AT0 /*char*/ name) nothrow {
3218 return atk_state_type_for_name(toCString!(char*)(name));
3222 // Gets the description string describing the #AtkStateType @type.
3223 // RETURNS: the string describing the AtkStateType
3224 // <type>: The #AtkStateType whose name is required
3225 static char* state_type_get_name()(StateType type) nothrow {
3226 return atk_state_type_get_name(type);
3230 // Register a new object state.
3231 // RETURNS: an #AtkState value for the new state.
3232 // <name>: a character string describing the new state.
3233 static StateType state_type_register(AT0)(AT0 /*char*/ name) nothrow {
3234 return atk_state_type_register(toCString!(char*)(name));
3238 // Get the #AtkTextAttribute type corresponding to a text attribute name.
3239 // or #ATK_TEXT_ATTRIBUTE_INVALID if no matching text attribute is found.
3240 // RETURNS: the #AtkTextAttribute enumerated type corresponding to the specified
3241 // <name>: a string which is the (non-localized) name of an ATK text attribute.
3242 static TextAttribute text_attribute_for_name(AT0)(AT0 /*char*/ name) nothrow {
3243 return atk_text_attribute_for_name(toCString!(char*)(name));
3247 // Gets the name corresponding to the #AtkTextAttribute
3248 // RETURNS: a string containing the name; this string should not be freed
3249 // <attr>: The #AtkTextAttribute whose name is required
3250 static char* text_attribute_get_name()(TextAttribute attr) nothrow {
3251 return atk_text_attribute_get_name(attr);
3255 // Gets the value for the index of the #AtkTextAttribute
3256 // NULL is returned if there are no values maintained for the attr value.
3257 // RETURNS: a string containing the value; this string should not be freed;
3258 // <attr>: The #AtkTextAttribute for which a value is required
3259 // <index_>: The index of the required value
3260 static char* text_attribute_get_value()(TextAttribute attr, int index_) nothrow {
3261 return atk_text_attribute_get_value(attr, index_);
3265 // Associate @name with a new #AtkTextAttribute
3266 // RETURNS: an #AtkTextAttribute associated with @name
3267 // <name>: a name string
3268 static TextAttribute text_attribute_register(AT0)(AT0 /*char*/ name) nothrow {
3269 return atk_text_attribute_register(toCString!(char*)(name));
3273 // VERSION: 1.3
3274 // Frees the memory associated with an array of AtkTextRange. It is assumed
3275 // that the array was returned by the function atk_text_get_bounded_ranges
3276 // and is NULL terminated.
3277 // <ranges>: A pointer to an array of #AtkTextRange which is to be freed.
3278 static void text_free_ranges(AT0)(AT0 /*TextRange**/ ranges) nothrow {
3279 atk_text_free_ranges(UpCast!(TextRange**)(ranges));
3283 // C prototypes:
3285 extern (C) {
3286 int atk_action_do_action(Action* this_, int i) nothrow;
3287 char* atk_action_get_description(Action* this_, int i) nothrow;
3288 char* atk_action_get_keybinding(Action* this_, int i) nothrow;
3289 char* atk_action_get_localized_name(Action* this_, int i) nothrow;
3290 int atk_action_get_n_actions(Action* this_) nothrow;
3291 char* atk_action_get_name(Action* this_, int i) nothrow;
3292 int atk_action_set_description(Action* this_, int i, char* desc) nothrow;
3293 uint atk_component_add_focus_handler(Component* this_, FocusHandler handler) nothrow;
3294 int atk_component_contains(Component* this_, int x, int y, CoordType coord_type) nothrow;
3295 double atk_component_get_alpha(Component* this_) nothrow;
3296 void atk_component_get_extents(Component* this_, int* x, int* y, int* width, int* height, CoordType coord_type) nothrow;
3297 Layer atk_component_get_layer(Component* this_) nothrow;
3298 int atk_component_get_mdi_zorder(Component* this_) nothrow;
3299 void atk_component_get_position(Component* this_, int* x, int* y, CoordType coord_type) nothrow;
3300 void atk_component_get_size(Component* this_, int* width, int* height) nothrow;
3301 int atk_component_grab_focus(Component* this_) nothrow;
3302 Object* /*new*/ atk_component_ref_accessible_at_point(Component* this_, int x, int y, CoordType coord_type) nothrow;
3303 void atk_component_remove_focus_handler(Component* this_, uint handler_id) nothrow;
3304 int atk_component_set_extents(Component* this_, int x, int y, int width, int height, CoordType coord_type) nothrow;
3305 int atk_component_set_position(Component* this_, int x, int y, CoordType coord_type) nothrow;
3306 int atk_component_set_size(Component* this_, int width, int height) nothrow;
3307 char* atk_document_get_attribute_value(Document* this_, char* attribute_name) nothrow;
3308 AttributeSet* atk_document_get_attributes(Document* this_) nothrow;
3309 void* atk_document_get_document(Document* this_) nothrow;
3310 char* atk_document_get_document_type(Document* this_) nothrow;
3311 char* atk_document_get_locale(Document* this_) nothrow;
3312 int atk_document_set_attribute_value(Document* this_, char* attribute_name, char* attribute_value) nothrow;
3313 void atk_editable_text_copy_text(EditableText* this_, int start_pos, int end_pos) nothrow;
3314 void atk_editable_text_cut_text(EditableText* this_, int start_pos, int end_pos) nothrow;
3315 void atk_editable_text_delete_text(EditableText* this_, int start_pos, int end_pos) nothrow;
3316 void atk_editable_text_insert_text(EditableText* this_, char* string_, int length, int* position) nothrow;
3317 void atk_editable_text_paste_text(EditableText* this_, int position) nothrow;
3318 int atk_editable_text_set_run_attributes(EditableText* this_, AttributeSet* attrib_set, int start_offset, int end_offset) nothrow;
3319 void atk_editable_text_set_text_contents(EditableText* this_, char* string_) nothrow;
3320 Object* atk_gobject_accessible_for_object(GObject2.Object* obj) nothrow;
3321 GObject2.Object* atk_gobject_accessible_get_object(GObjectAccessible* this_) nothrow;
3322 int atk_hyperlink_get_end_index(Hyperlink* this_) nothrow;
3323 int atk_hyperlink_get_n_anchors(Hyperlink* this_) nothrow;
3324 Object* atk_hyperlink_get_object(Hyperlink* this_, int i) nothrow;
3325 int atk_hyperlink_get_start_index(Hyperlink* this_) nothrow;
3326 char* /*new*/ atk_hyperlink_get_uri(Hyperlink* this_, int i) nothrow;
3327 int atk_hyperlink_is_inline(Hyperlink* this_) nothrow;
3328 int atk_hyperlink_is_valid(Hyperlink* this_) nothrow;
3329 Hyperlink* /*new*/ atk_hyperlink_impl_get_hyperlink(HyperlinkImpl* this_) nothrow;
3330 Hyperlink* atk_hypertext_get_link(Hypertext* this_, int link_index) nothrow;
3331 int atk_hypertext_get_link_index(Hypertext* this_, int char_index) nothrow;
3332 int atk_hypertext_get_n_links(Hypertext* this_) nothrow;
3333 char* atk_image_get_image_description(Image* this_) nothrow;
3334 char* atk_image_get_image_locale(Image* this_) nothrow;
3335 void atk_image_get_image_position(Image* this_, int* x, int* y, CoordType coord_type) nothrow;
3336 void atk_image_get_image_size(Image* this_, int* width, int* height) nothrow;
3337 int atk_image_set_image_description(Image* this_, char* description) nothrow;
3338 Object* /*new*/ atk_implementor_ref_accessible(Implementor* this_) nothrow;
3339 Misc* atk_misc_get_instance() nothrow;
3340 void atk_misc_threads_enter(Misc* this_) nothrow;
3341 void atk_misc_threads_leave(Misc* this_) nothrow;
3342 NoOpObject* /*new*/ atk_no_op_object_new(GObject2.Object* obj) nothrow;
3343 NoOpObjectFactory* /*new*/ atk_no_op_object_factory_new() nothrow;
3344 int atk_object_add_relationship(Object* this_, RelationType relationship, Object* target) nothrow;
3345 uint atk_object_connect_property_change_handler(Object* this_, PropertyChangeHandler* handler) nothrow;
3346 AttributeSet* atk_object_get_attributes(Object* this_) nothrow;
3347 char* atk_object_get_description(Object* this_) nothrow;
3348 int atk_object_get_index_in_parent(Object* this_) nothrow;
3349 int atk_object_get_n_accessible_children(Object* this_) nothrow;
3350 char* atk_object_get_name(Object* this_) nothrow;
3351 Object* atk_object_get_parent(Object* this_) nothrow;
3352 Role atk_object_get_role(Object* this_) nothrow;
3353 void atk_object_initialize(Object* this_, void* data) nothrow;
3354 void atk_object_notify_state_change(Object* this_, State state, int value) nothrow;
3355 Object* /*new*/ atk_object_ref_accessible_child(Object* this_, int i) nothrow;
3356 RelationSet* /*new*/ atk_object_ref_relation_set(Object* this_) nothrow;
3357 StateSet* /*new*/ atk_object_ref_state_set(Object* this_) nothrow;
3358 void atk_object_remove_property_change_handler(Object* this_, uint handler_id) nothrow;
3359 int atk_object_remove_relationship(Object* this_, RelationType relationship, Object* target) nothrow;
3360 void atk_object_set_description(Object* this_, char* description) nothrow;
3361 void atk_object_set_name(Object* this_, char* name) nothrow;
3362 void atk_object_set_parent(Object* this_, Object* parent) nothrow;
3363 void atk_object_set_role(Object* this_, Role role) nothrow;
3364 Object* /*new*/ atk_object_factory_create_accessible(ObjectFactory* this_, GObject2.Object* obj) nothrow;
3365 Type atk_object_factory_get_accessible_type(ObjectFactory* this_) nothrow;
3366 void atk_object_factory_invalidate(ObjectFactory* this_) nothrow;
3367 Plug* /*new*/ atk_plug_new() nothrow;
3368 char* /*new*/ atk_plug_get_id(Plug* this_) nothrow;
3369 ObjectFactory* atk_registry_get_factory(Registry* this_, Type type) nothrow;
3370 Type atk_registry_get_factory_type(Registry* this_, Type type) nothrow;
3371 void atk_registry_set_factory_type(Registry* this_, Type type, Type factory_type) nothrow;
3372 Relation* /*new*/ atk_relation_new(Object** targets, int n_targets, RelationType relationship) nothrow;
3373 void atk_relation_add_target(Relation* this_, Object* target) nothrow;
3374 RelationType atk_relation_get_relation_type(Relation* this_) nothrow;
3375 PtrArray* atk_relation_get_target(Relation* this_) nothrow;
3376 int atk_relation_remove_target(Relation* this_, Object* target) nothrow;
3377 RelationSet* /*new*/ atk_relation_set_new() nothrow;
3378 void atk_relation_set_add(RelationSet* this_, Relation* relation) nothrow;
3379 void atk_relation_set_add_relation_by_type(RelationSet* this_, RelationType relationship, Object* target) nothrow;
3380 int atk_relation_set_contains(RelationSet* this_, RelationType relationship) nothrow;
3381 int atk_relation_set_get_n_relations(RelationSet* this_) nothrow;
3382 Relation* atk_relation_set_get_relation(RelationSet* this_, int i) nothrow;
3383 Relation* atk_relation_set_get_relation_by_type(RelationSet* this_, RelationType relationship) nothrow;
3384 void atk_relation_set_remove(RelationSet* this_, Relation* relation) nothrow;
3385 int atk_selection_add_selection(Selection* this_, int i) nothrow;
3386 int atk_selection_clear_selection(Selection* this_) nothrow;
3387 int atk_selection_get_selection_count(Selection* this_) nothrow;
3388 int atk_selection_is_child_selected(Selection* this_, int i) nothrow;
3389 Object* /*new*/ atk_selection_ref_selection(Selection* this_, int i) nothrow;
3390 int atk_selection_remove_selection(Selection* this_, int i) nothrow;
3391 int atk_selection_select_all_selection(Selection* this_) nothrow;
3392 Socket* /*new*/ atk_socket_new() nothrow;
3393 void atk_socket_embed(Socket* this_, char* plug_id) nothrow;
3394 int atk_socket_is_occupied(Socket* this_) nothrow;
3395 StateSet* /*new*/ atk_state_set_new() nothrow;
3396 int atk_state_set_add_state(StateSet* this_, StateType type) nothrow;
3397 void atk_state_set_add_states(StateSet* this_, StateType* types, int n_types) nothrow;
3398 StateSet* /*new*/ atk_state_set_and_sets(StateSet* this_, StateSet* compare_set) nothrow;
3399 void atk_state_set_clear_states(StateSet* this_) nothrow;
3400 int atk_state_set_contains_state(StateSet* this_, StateType type) nothrow;
3401 int atk_state_set_contains_states(StateSet* this_, StateType* types, int n_types) nothrow;
3402 int atk_state_set_is_empty(StateSet* this_) nothrow;
3403 StateSet* /*new*/ atk_state_set_or_sets(StateSet* this_, StateSet* compare_set) nothrow;
3404 int atk_state_set_remove_state(StateSet* this_, StateType type) nothrow;
3405 StateSet* /*new*/ atk_state_set_xor_sets(StateSet* this_, StateSet* compare_set) nothrow;
3406 char* atk_streamable_content_get_mime_type(StreamableContent* this_, int i) nothrow;
3407 int atk_streamable_content_get_n_mime_types(StreamableContent* this_) nothrow;
3408 GLib2.IOChannel* /*new*/ atk_streamable_content_get_stream(StreamableContent* this_, char* mime_type) nothrow;
3409 char* atk_streamable_content_get_uri(StreamableContent* this_, char* mime_type) nothrow;
3410 int atk_table_add_column_selection(Table* this_, int column) nothrow;
3411 int atk_table_add_row_selection(Table* this_, int row) nothrow;
3412 Object* atk_table_get_caption(Table* this_) nothrow;
3413 int atk_table_get_column_at_index(Table* this_, int index_) nothrow;
3414 char* atk_table_get_column_description(Table* this_, int column) nothrow;
3415 int atk_table_get_column_extent_at(Table* this_, int row, int column) nothrow;
3416 Object* atk_table_get_column_header(Table* this_, int column) nothrow;
3417 int atk_table_get_index_at(Table* this_, int row, int column) nothrow;
3418 int atk_table_get_n_columns(Table* this_) nothrow;
3419 int atk_table_get_n_rows(Table* this_) nothrow;
3420 int atk_table_get_row_at_index(Table* this_, int index_) nothrow;
3421 char* atk_table_get_row_description(Table* this_, int row) nothrow;
3422 int atk_table_get_row_extent_at(Table* this_, int row, int column) nothrow;
3423 Object* atk_table_get_row_header(Table* this_, int row) nothrow;
3424 int atk_table_get_selected_columns(Table* this_, int** selected) nothrow;
3425 int atk_table_get_selected_rows(Table* this_, int** selected) nothrow;
3426 Object* /*new*/ atk_table_get_summary(Table* this_) nothrow;
3427 int atk_table_is_column_selected(Table* this_, int column) nothrow;
3428 int atk_table_is_row_selected(Table* this_, int row) nothrow;
3429 int atk_table_is_selected(Table* this_, int row, int column) nothrow;
3430 Object* /*new*/ atk_table_ref_at(Table* this_, int row, int column) nothrow;
3431 int atk_table_remove_column_selection(Table* this_, int column) nothrow;
3432 int atk_table_remove_row_selection(Table* this_, int row) nothrow;
3433 void atk_table_set_caption(Table* this_, Object* caption) nothrow;
3434 void atk_table_set_column_description(Table* this_, int column, char* description) nothrow;
3435 void atk_table_set_column_header(Table* this_, int column, Object* header) nothrow;
3436 void atk_table_set_row_description(Table* this_, int row, char* description) nothrow;
3437 void atk_table_set_row_header(Table* this_, int row, Object* header) nothrow;
3438 void atk_table_set_summary(Table* this_, Object* accessible) nothrow;
3439 int atk_text_add_selection(Text* this_, int start_offset, int end_offset) nothrow;
3440 TextRange** /*new*/ atk_text_get_bounded_ranges(Text* this_, TextRectangle* rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type) nothrow;
3441 int atk_text_get_caret_offset(Text* this_) nothrow;
3442 dchar atk_text_get_character_at_offset(Text* this_, int offset) nothrow;
3443 int atk_text_get_character_count(Text* this_) nothrow;
3444 void atk_text_get_character_extents(Text* this_, int offset, int* x, int* y, int* width, int* height, CoordType coords) nothrow;
3445 AttributeSet* /*new*/ atk_text_get_default_attributes(Text* this_) nothrow;
3446 int atk_text_get_n_selections(Text* this_) nothrow;
3447 int atk_text_get_offset_at_point(Text* this_, int x, int y, CoordType coords) nothrow;
3448 void atk_text_get_range_extents(Text* this_, int start_offset, int end_offset, CoordType coord_type, TextRectangle* rect) nothrow;
3449 AttributeSet* /*new*/ atk_text_get_run_attributes(Text* this_, int offset, int* start_offset, int* end_offset) nothrow;
3450 char* /*new*/ atk_text_get_selection(Text* this_, int selection_num, int* start_offset, int* end_offset) nothrow;
3451 char* /*new*/ atk_text_get_text(Text* this_, int start_offset, int end_offset) nothrow;
3452 char* /*new*/ atk_text_get_text_after_offset(Text* this_, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow;
3453 char* /*new*/ atk_text_get_text_at_offset(Text* this_, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow;
3454 char* /*new*/ atk_text_get_text_before_offset(Text* this_, int offset, TextBoundary boundary_type, int* start_offset, int* end_offset) nothrow;
3455 int atk_text_remove_selection(Text* this_, int selection_num) nothrow;
3456 int atk_text_set_caret_offset(Text* this_, int offset) nothrow;
3457 int atk_text_set_selection(Text* this_, int selection_num, int start_offset, int end_offset) nothrow;
3458 void atk_value_get_current_value(Value* this_, GObject2.Value* value) nothrow;
3459 void atk_value_get_maximum_value(Value* this_, GObject2.Value* value) nothrow;
3460 void atk_value_get_minimum_increment(Value* this_, GObject2.Value* value) nothrow;
3461 void atk_value_get_minimum_value(Value* this_, GObject2.Value* value) nothrow;
3462 int atk_value_set_current_value(Value* this_, GObject2.Value* value) nothrow;
3463 uint atk_add_focus_tracker(EventListener focus_tracker) nothrow;
3464 uint atk_add_global_event_listener(GObject2.SignalEmissionHook listener, char* event_type) nothrow;
3465 uint atk_add_key_event_listener(KeySnoopFunc listener, void* data) nothrow;
3466 void atk_attribute_set_free(AttributeSet* attrib_set) nothrow;
3467 void atk_focus_tracker_init(EventListenerInit init) nothrow;
3468 void atk_focus_tracker_notify(Object* object) nothrow;
3469 Registry* /*new*/ atk_get_default_registry() nothrow;
3470 Object* atk_get_focus_object() nothrow;
3471 Object* atk_get_root() nothrow;
3472 char* atk_get_toolkit_name() nothrow;
3473 char* atk_get_toolkit_version() nothrow;
3474 char* atk_get_version() nothrow;
3475 RelationType atk_relation_type_for_name(char* name) nothrow;
3476 char* atk_relation_type_get_name(RelationType type) nothrow;
3477 RelationType atk_relation_type_register(char* name) nothrow;
3478 void atk_remove_focus_tracker(uint tracker_id) nothrow;
3479 void atk_remove_global_event_listener(uint listener_id) nothrow;
3480 void atk_remove_key_event_listener(uint listener_id) nothrow;
3481 Role atk_role_for_name(char* name) nothrow;
3482 char* atk_role_get_localized_name(Role role) nothrow;
3483 char* atk_role_get_name(Role role) nothrow;
3484 Role atk_role_register(char* name) nothrow;
3485 StateType atk_state_type_for_name(char* name) nothrow;
3486 char* atk_state_type_get_name(StateType type) nothrow;
3487 StateType atk_state_type_register(char* name) nothrow;
3488 TextAttribute atk_text_attribute_for_name(char* name) nothrow;
3489 char* atk_text_attribute_get_name(TextAttribute attr) nothrow;
3490 char* atk_text_attribute_get_value(TextAttribute attr, int index_) nothrow;
3491 TextAttribute atk_text_attribute_register(char* name) nothrow;
3492 void atk_text_free_ranges(TextRange** ranges) nothrow;