2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _ATKMM_OBJECT_H
4 #define _ATKMM_OBJECT_H
11 /* Copyright (C) 1998-2002 The gtkmm Development Team
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #include <atkmm/component.h>
30 #include <atkmm/relation.h>
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 extern "C" { typedef struct _AtkPropertyValues AtkPropertyValues; }
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _AtkObject AtkObject;
39 typedef struct _AtkObjectClass AtkObjectClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 { class Object_Class; } // namespace Atk
49 /** @addtogroup atkmmEnums Enums and Flags */
100 ROLE_RADIO_MENU_ITEM,
112 ROLE_TABLE_COLUMN_HEADER,
113 ROLE_TABLE_ROW_HEADER,
114 ROLE_TEAR_OFF_MENU_ITEM,
139 #ifndef DOXYGEN_SHOULD_SKIP_THIS
144 class Value<Atk::Role> : public Glib::Value_Enum<Atk::Role>
147 static GType value_type() G_GNUC_CONST;
151 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
162 typedef guint64 State;
164 /** The base object class for the Accessibility Toolkit API.
165 * This class is the primary class for accessibility support via the Accessibility ToolKit (ATK). Objects which are
166 * instances of Atk::Object (or instances of Atk::Object-derived types) are queried for properties which relate basic
167 * (and generic) properties of a UI component such as name and description. Instances of Atk::Object may also be queried
168 * as to whether they implement other ATK interfaces (e.g. Atk::Action, Atk::Component, etc.), as appropriate to the role
169 * which a given UI component plays in a user interface.
171 * All UI components in an application which provide useful information or services to the user must provide corresponding
172 * Atk::Object instances on request (in GTK+, for instance, usually on a call to Gtk::Widget::get_accessible()), either via
173 * ATK support built into the toolkit for the widget class or ancestor class, or in the case of custom widgets, if the
174 * inherited Atk::Object implementation is insufficient, via instances of a new Atk::Object subclass.
177 class Object : public Glib::Object
180 #ifndef DOXYGEN_SHOULD_SKIP_THIS
183 typedef Object CppObjectType;
184 typedef Object_Class CppClassType;
185 typedef AtkObject BaseObjectType;
186 typedef AtkObjectClass BaseClassType;
188 private: friend class Object_Class;
189 static CppClassType object_class_;
193 Object(const Object&);
194 Object& operator=(const Object&);
197 explicit Object(const Glib::ConstructParams& construct_params);
198 explicit Object(AtkObject* castitem);
200 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
205 #ifndef DOXYGEN_SHOULD_SKIP_THIS
206 static GType get_type() G_GNUC_CONST;
207 static GType get_base_type() G_GNUC_CONST;
210 ///Provides access to the underlying C GObject.
211 AtkObject* gobj() { return reinterpret_cast<AtkObject*>(gobject_); }
213 ///Provides access to the underlying C GObject.
214 const AtkObject* gobj() const { return reinterpret_cast<AtkObject*>(gobject_); }
216 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
217 AtkObject* gobj_copy();
221 // see wrap_new() implementation in object.ccg
226 /** Gets the accessible name of the accessible.
227 * @return A character string representing the accessible name of the object.
229 Glib::ustring get_name() const;
231 /** Gets the accessible description of the accessible.
232 * @return A character string representing the accessible description
235 Glib::ustring get_description() const;
237 /** Gets the accessible parent of the accessible.
238 * @return A Atk::Object representing the accessible parent of the accessible.
240 Glib::RefPtr<Atk::Object> get_parent();
242 /** Gets the number of accessible children of the accessible.
243 * @return An integer representing the number of accessible children
246 int get_n_accessible_children() const;
248 /** Gets a reference to the specified accessible child of the object.
249 * The accessible children are 0-based so the first accessible child is
250 * at index 0, the second at index 1 and so on.
251 * @param i A <tt>int</tt> representing the position of the child, starting from 0.
252 * @return An Atk::Object representing the specified accessible child
255 Glib::RefPtr<Atk::Object> get_accessible_child(int i);
257 /** Gets the Atk::RelationSet associated with the object.
258 * @return An Atk::RelationSet representing the relation set of the object.
260 Glib::RefPtr<RelationSet> get_relation_set();
262 /** Gets the role of the accessible.
263 * @return An Atk::Role which is the role of the accessible.
265 Role get_role() const;
267 /** Gets a reference to the state set of the accessible; the caller must
268 * unreference it when it is no longer needed.
269 * @return A reference to an Atk::StateSet which is the state
270 * set of the accessible.
272 Glib::RefPtr<StateSet> get_state_set();
274 /** Gets the 0-based index of this accessible in its parent; returns -1 if the
275 * accessible does not have an accessible parent.
276 * @return An integer which is the index of the accessible in its parent.
278 int get_index_in_parent();
280 /** Sets the accessible name of the accessible.
281 * @param name A character string to be set as the accessible name.
283 void set_name(const Glib::ustring& name);
285 /** Sets the accessible description of the accessible.
286 * @param description A character string to be set as the accessible description.
288 void set_description(const Glib::ustring& description);
290 /** Sets the accessible parent of the accessible.
291 * @param parent An Atk::Object to be set as the accessible parent.
293 void set_parent(const Glib::RefPtr<Atk::Object>& parent);
295 /** Sets the role of the accessible.
296 * @param role An Atk::Role to be set as the role.
298 void set_role(Role role);
299 //_WRAP_METHOD(guint connect_property_change_handler(AtkPropertyChangeHandler* handler), atk_object_connect_property_change_handler)
300 //_WRAP_METHOD(void remove_property_change_handler(guint handler_id), atk_object_remove_property_change_handler)
302 /** Emits a state-change signal for the specified state.
303 * @param state An Atk::State whose state is changed.
304 * @param value A <tt>bool</tt> which indicates whether the state is being set on or off.
306 void notify_state_change(State state, bool value);
309 /** Adds a relationship of the specified type with the specified target.
310 * @param relationship The Atk::RelationType of the relation.
311 * @param target The Atk::Object which is to be the target of the relation.
312 * @return <tt>true</tt> if the relationship is added.
314 bool add_relationship(RelationType relationship, const Glib::RefPtr<Object>& target);
316 /** Removes a relationship of the specified type with the specified target.
317 * @param relationship The Atk::RelationType of the relation.
318 * @param target The Atk::Object which is the target of the relation to be removed.
319 * @return <tt>true</tt> if the relationship is removed.
321 bool remove_relationship(RelationType relationship, const Glib::RefPtr<Object>& target);
326 * <tt>void on_my_%children_changed(guint change_index, gpointer changed_child)</tt>
329 Glib::SignalProxy2< void,guint,gpointer > signal_children_changed();
334 * <tt>void on_my_%focus_event(bool focus_in)</tt>
337 Glib::SignalProxy1< void,bool > signal_focus_event();
342 * <tt>void on_my_%property_change(AtkPropertyValues* values)</tt>
345 Glib::SignalProxy1< void,AtkPropertyValues* > signal_property_change();
350 * <tt>void on_my_%state_change(const Glib::ustring& name, bool state_set)</tt>
353 Glib::SignalProxy2< void,const Glib::ustring&,bool > signal_state_change();
358 * <tt>void on_my_%visible_data_changed()</tt>
361 Glib::SignalProxy0< void > signal_visible_data_changed();
366 * <tt>void on_my_%active_descendant_changed(void** child)</tt>
369 Glib::SignalProxy1< void,void** > signal_active_descendant_changed();
372 #ifdef GLIBMM_PROPERTIES_ENABLED
373 /** Object instance's name formatted for assistive technology access.
375 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
376 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
377 * the value of the property changes.
379 Glib::PropertyProxy<Glib::ustring> property_accessible_name() ;
380 #endif //#GLIBMM_PROPERTIES_ENABLED
382 #ifdef GLIBMM_PROPERTIES_ENABLED
383 /** Object instance's name formatted for assistive technology access.
385 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
386 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
387 * the value of the property changes.
389 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_name() const;
390 #endif //#GLIBMM_PROPERTIES_ENABLED
392 #ifdef GLIBMM_PROPERTIES_ENABLED
393 /** Description of an object
395 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
396 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
397 * the value of the property changes.
399 Glib::PropertyProxy<Glib::ustring> property_accessible_description() ;
400 #endif //#GLIBMM_PROPERTIES_ENABLED
402 #ifdef GLIBMM_PROPERTIES_ENABLED
403 /** Description of an object
405 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
406 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
407 * the value of the property changes.
409 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_description() const;
410 #endif //#GLIBMM_PROPERTIES_ENABLED
412 #ifdef GLIBMM_PROPERTIES_ENABLED
413 /** Is used to notify that the parent has changed.
415 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
416 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
417 * the value of the property changes.
419 Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > property_accessible_parent() ;
420 #endif //#GLIBMM_PROPERTIES_ENABLED
422 #ifdef GLIBMM_PROPERTIES_ENABLED
423 /** Is used to notify that the parent has changed.
425 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
426 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
427 * the value of the property changes.
429 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > property_accessible_parent() const;
430 #endif //#GLIBMM_PROPERTIES_ENABLED
432 #ifdef GLIBMM_PROPERTIES_ENABLED
433 /** Is used to notify that the value has changed.
435 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
436 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
437 * the value of the property changes.
439 Glib::PropertyProxy<double> property_accessible_value() ;
440 #endif //#GLIBMM_PROPERTIES_ENABLED
442 #ifdef GLIBMM_PROPERTIES_ENABLED
443 /** Is used to notify that the value has changed.
445 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
446 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
447 * the value of the property changes.
449 Glib::PropertyProxy_ReadOnly<double> property_accessible_value() const;
450 #endif //#GLIBMM_PROPERTIES_ENABLED
452 #ifdef GLIBMM_PROPERTIES_ENABLED
453 /** The accessible role of this object.
455 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
456 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
457 * the value of the property changes.
459 Glib::PropertyProxy<int> property_accessible_role() ;
460 #endif //#GLIBMM_PROPERTIES_ENABLED
462 #ifdef GLIBMM_PROPERTIES_ENABLED
463 /** The accessible role of this object.
465 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
466 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
467 * the value of the property changes.
469 Glib::PropertyProxy_ReadOnly<int> property_accessible_role() const;
470 #endif //#GLIBMM_PROPERTIES_ENABLED
472 #ifdef GLIBMM_PROPERTIES_ENABLED
473 /** The accessible layer of this object.
475 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
476 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
477 * the value of the property changes.
479 Glib::PropertyProxy_ReadOnly<int> property_accessible_component_layer() const;
480 #endif //#GLIBMM_PROPERTIES_ENABLED
483 #ifdef GLIBMM_PROPERTIES_ENABLED
484 /** The accessible MDI value of this object.
486 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
487 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
488 * the value of the property changes.
490 Glib::PropertyProxy_ReadOnly<int> property_accessible_component_mdi_zorder() const;
491 #endif //#GLIBMM_PROPERTIES_ENABLED
494 #ifdef GLIBMM_PROPERTIES_ENABLED
495 /** Is used to notify that the table caption has changed; this property should not be used. accessible-table-caption-object should be used instead.
497 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
498 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
499 * the value of the property changes.
501 Glib::PropertyProxy<Glib::ustring> property_accessible_table_caption() ;
502 #endif //#GLIBMM_PROPERTIES_ENABLED
504 #ifdef GLIBMM_PROPERTIES_ENABLED
505 /** Is used to notify that the table caption has changed; this property should not be used. accessible-table-caption-object should be used instead.
507 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
508 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
509 * the value of the property changes.
511 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_table_caption() const;
512 #endif //#GLIBMM_PROPERTIES_ENABLED
514 #ifdef GLIBMM_PROPERTIES_ENABLED
515 /** Is used to notify that the table column description has changed.
517 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
518 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
519 * the value of the property changes.
521 Glib::PropertyProxy<Glib::ustring> property_accessible_table_column_description() ;
522 #endif //#GLIBMM_PROPERTIES_ENABLED
524 #ifdef GLIBMM_PROPERTIES_ENABLED
525 /** Is used to notify that the table column description has changed.
527 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
528 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
529 * the value of the property changes.
531 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_table_column_description() const;
532 #endif //#GLIBMM_PROPERTIES_ENABLED
534 #ifdef GLIBMM_PROPERTIES_ENABLED
535 /** Is used to notify that the table column header has changed.
537 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
538 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
539 * the value of the property changes.
541 Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > property_accessible_table_column_header() ;
542 #endif //#GLIBMM_PROPERTIES_ENABLED
544 #ifdef GLIBMM_PROPERTIES_ENABLED
545 /** Is used to notify that the table column header has changed.
547 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
548 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
549 * the value of the property changes.
551 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > property_accessible_table_column_header() const;
552 #endif //#GLIBMM_PROPERTIES_ENABLED
554 #ifdef GLIBMM_PROPERTIES_ENABLED
555 /** Is used to notify that the table row description has changed.
557 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
558 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
559 * the value of the property changes.
561 Glib::PropertyProxy<Glib::ustring> property_accessible_table_row_description() ;
562 #endif //#GLIBMM_PROPERTIES_ENABLED
564 #ifdef GLIBMM_PROPERTIES_ENABLED
565 /** Is used to notify that the table row description has changed.
567 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
568 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
569 * the value of the property changes.
571 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_table_row_description() const;
572 #endif //#GLIBMM_PROPERTIES_ENABLED
574 #ifdef GLIBMM_PROPERTIES_ENABLED
575 /** Is used to notify that the table row header has changed.
577 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
578 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
579 * the value of the property changes.
581 Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > property_accessible_table_row_header() ;
582 #endif //#GLIBMM_PROPERTIES_ENABLED
584 #ifdef GLIBMM_PROPERTIES_ENABLED
585 /** Is used to notify that the table row header has changed.
587 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
588 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
589 * the value of the property changes.
591 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > property_accessible_table_row_header() const;
592 #endif //#GLIBMM_PROPERTIES_ENABLED
594 #ifdef GLIBMM_PROPERTIES_ENABLED
595 /** Is used to notify that the table summary has changed.
597 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
598 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
599 * the value of the property changes.
601 Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > property_accessible_table_summary() ;
602 #endif //#GLIBMM_PROPERTIES_ENABLED
604 #ifdef GLIBMM_PROPERTIES_ENABLED
605 /** Is used to notify that the table summary has changed.
607 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
608 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
609 * the value of the property changes.
611 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > property_accessible_table_summary() const;
612 #endif //#GLIBMM_PROPERTIES_ENABLED
618 //C++ methods used to invoke GTK+ virtual functions:
619 #ifdef GLIBMM_VFUNCS_ENABLED
620 #endif //GLIBMM_VFUNCS_ENABLED
623 //GTK+ Virtual Functions (override these to change behaviour):
624 #ifdef GLIBMM_VFUNCS_ENABLED
625 #endif //GLIBMM_VFUNCS_ENABLED
627 //Default Signal Handlers::
628 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
629 virtual void on_children_changed(guint change_index, gpointer changed_child);
630 virtual void on_focus_event(bool focus_in);
631 virtual void on_property_change(AtkPropertyValues* values);
632 virtual void on_state_change(const Glib::ustring& name, bool state_set);
633 virtual void on_visible_data_changed();
634 virtual void on_active_descendant_changed(void** child);
635 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
645 /** A Glib::wrap() method for this object.
647 * @param object The C instance.
648 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
649 * @result A C++ instance that wraps this C instance.
651 * @relates Atk::Object
653 Glib::RefPtr<Atk::Object> wrap(AtkObject* object, bool take_copy = false);
657 #endif /* _ATKMM_OBJECT_H */