⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atkobject.c

📁 The ATK library provides a set of interfaces for accessibility.By supporting the ATK interfaces, an
💻 C
📖 第 1 页 / 共 4 页
字号:
      bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");#endif    }#endif}GTypeatk_object_get_type (void){  static GType type = 0;  if (!type)    {      static const GTypeInfo typeInfo =      {        sizeof (AtkObjectClass),        (GBaseInitFunc) NULL,        (GBaseFinalizeFunc) NULL,        (GClassInitFunc) atk_object_class_init,        (GClassFinalizeFunc) NULL,        NULL,        sizeof (AtkObject),        0,        (GInstanceInitFunc) atk_object_init,      } ;      type = g_type_register_static (G_TYPE_OBJECT, "AtkObject", &typeInfo, 0) ;    }  return type;}static voidatk_object_class_init (AtkObjectClass *klass){  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);  parent_class = g_type_class_peek_parent (klass);  gobject_class->set_property = atk_object_real_set_property;  gobject_class->get_property = atk_object_real_get_property;  gobject_class->finalize = atk_object_finalize;  gobject_class->notify = atk_object_notify;  klass->get_name = atk_object_real_get_name;  klass->get_description = atk_object_real_get_description;  klass->get_parent = atk_object_real_get_parent;  klass->get_n_children = NULL;  klass->ref_child = NULL;  klass->get_index_in_parent = NULL;  klass->ref_relation_set = atk_object_real_ref_relation_set;  klass->get_role = atk_object_real_get_role;  klass->get_layer = atk_object_real_get_layer;  klass->get_mdi_zorder = NULL;  klass->initialize = atk_object_real_initialize;  klass->ref_state_set = atk_object_real_ref_state_set;  klass->set_name = atk_object_real_set_name;  klass->set_description = atk_object_real_set_description;  klass->set_parent = atk_object_real_set_parent;  klass->set_role = atk_object_real_set_role;  klass->connect_property_change_handler =          atk_object_real_connect_property_change_handler;  klass->remove_property_change_handler =          atk_object_real_remove_property_change_handler;  /*   * We do not define default signal handlers here   */  klass->children_changed = NULL;  klass->focus_event = NULL;  klass->property_change = NULL;  klass->visible_data_changed = NULL;  klass->active_descendant_changed = NULL;  gettext_initialization ();  g_object_class_install_property (gobject_class,                                   PROP_NAME,                                   g_param_spec_string (atk_object_name_property_name,                                                        _("Accessible Name"),                                                        _("Object instance\'s name formatted for assistive technology access"),                                                        NULL,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_DESCRIPTION,                                   g_param_spec_string (atk_object_name_property_description,                                                        _("Accessible Description"),                                                        _("Description of an object, formatted for assistive technology access"),                                                        NULL,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_PARENT,                                   g_param_spec_object (atk_object_name_property_parent,                                                        _("Accessible Parent"),                                                        _("Is used to notify that the parent has changed"),                                                        ATK_TYPE_OBJECT,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_VALUE,                                   g_param_spec_double (atk_object_name_property_value,                                                        _("Accessible Value"),                                                        _("Is used to notify that the value has changed"),                                                        0.0,                                                        G_MAXDOUBLE,                                                        0.0,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_ROLE,                                   g_param_spec_int    (atk_object_name_property_role,                                                        _("Accessible Role"),                                                        _("The accessible role of this object"),                                                        0,                                                        G_MAXINT,                                                        0,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_LAYER,                                   g_param_spec_int    (atk_object_name_property_component_layer,                                                        _("Accessible Layer"),                                                        _("The accessible layer of this object"),                                                        0,                                                        G_MAXINT,                                                        0,                                                        G_PARAM_READABLE));  g_object_class_install_property (gobject_class,                                   PROP_MDI_ZORDER,                                   g_param_spec_int    (atk_object_name_property_component_mdi_zorder,                                                        _("Accessible MDI Value"),                                                        _("The accessible MDI value of this object"),                                                        G_MININT,                                                        G_MAXINT,                                                        G_MININT,                                                        G_PARAM_READABLE));  g_object_class_install_property (gobject_class,                                   PROP_TABLE_CAPTION,                                   g_param_spec_string (atk_object_name_property_table_caption,                                                        _("Accessible Table Caption"),                                                        _("Is used to notify that the table caption has changed; this property should not be used. accessible-table-caption-object should be used instead"),                                                        NULL,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_TABLE_COLUMN_HEADER,                                   g_param_spec_object (atk_object_name_property_table_column_header,                                                        _("Accessible Table Column Header"),                                                        _("Is used to notify that the table column header has changed"),                                                        ATK_TYPE_OBJECT,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_TABLE_COLUMN_DESCRIPTION,                                   g_param_spec_string (atk_object_name_property_table_column_description,                                                        _("Accessible Table Column Description"),                                                        _("Is used to notify that the table column description has changed"),                                                        NULL,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_TABLE_ROW_HEADER,                                   g_param_spec_object (atk_object_name_property_table_row_header,                                                        _("Accessible Table Row Header"),                                                        _("Is used to notify that the table row header has changed"),                                                        ATK_TYPE_OBJECT,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_TABLE_ROW_DESCRIPTION,                                   g_param_spec_string (atk_object_name_property_table_row_description,                                                        _("Accessible Table Row Description"),                                                        _("Is used to notify that the table row description has changed"),                                                        NULL,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_TABLE_SUMMARY,                                   g_param_spec_object (atk_object_name_property_table_summary,                                                        _("Accessible Table Summary"),                                                        _("Is used to notify that the table summary has changed"),                                                        ATK_TYPE_OBJECT,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_TABLE_CAPTION_OBJECT,                                   g_param_spec_object (atk_object_name_property_table_caption_object,                                                        _("Accessible Table Caption Object"),                                                        _("Is used to notify that the table caption has changed"),                                                        ATK_TYPE_OBJECT,                                                        G_PARAM_READWRITE));  g_object_class_install_property (gobject_class,                                   PROP_HYPERTEXT_NUM_LINKS,                                   g_param_spec_int    (atk_object_name_property_hypertext_num_links,                                                        _("Number of Accessible Hypertext Links"),                                                        _("The number of links which the current AtkHypertext has"),                                                        0,                                                        G_MAXINT,                                                        0,                                                        G_PARAM_READABLE));  atk_object_signals[CHILDREN_CHANGED] =    g_signal_new ("children_changed",		  G_TYPE_FROM_CLASS (klass),		  G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,		  G_STRUCT_OFFSET (AtkObjectClass, children_changed),		  NULL, NULL,		  g_cclosure_marshal_VOID__UINT_POINTER,		  G_TYPE_NONE,		  2, G_TYPE_UINT, G_TYPE_POINTER);  atk_object_signals[FOCUS_EVENT] =    g_signal_new ("focus_event",		  G_TYPE_FROM_CLASS (klass),		  G_SIGNAL_RUN_LAST,		  G_STRUCT_OFFSET (AtkObjectClass, focus_event), 		  NULL, NULL,		  g_cclosure_marshal_VOID__BOOLEAN,		  G_TYPE_NONE,		  1, G_TYPE_BOOLEAN);  atk_object_signals[PROPERTY_CHANGE] =    g_signal_new ("property_change",                  G_TYPE_FROM_CLASS (klass),                  G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,                  G_STRUCT_OFFSET (AtkObjectClass, property_change),                  (GSignalAccumulator) NULL, NULL,                  g_cclosure_marshal_VOID__POINTER,                  G_TYPE_NONE, 1,                  G_TYPE_POINTER);  atk_object_signals[STATE_CHANGE] =    g_signal_new ("state_change",                  G_TYPE_FROM_CLASS (klass),                  G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,                  G_STRUCT_OFFSET (AtkObjectClass, state_change),                  (GSignalAccumulator) NULL, NULL,                  atk_marshal_VOID__STRING_BOOLEAN,                  G_TYPE_NONE, 2,                  G_TYPE_STRING,                  G_TYPE_BOOLEAN);  atk_object_signals[VISIBLE_DATA_CHANGED] =    g_signal_new ("visible_data_changed",                  G_TYPE_FROM_CLASS (klass),                  G_SIGNAL_RUN_LAST,                  G_STRUCT_OFFSET (AtkObjectClass, visible_data_changed),                  (GSignalAccumulator) NULL, NULL,                  g_cclosure_marshal_VOID__VOID,                  G_TYPE_NONE, 0);  atk_object_signals[ACTIVE_DESCENDANT_CHANGED] =    g_signal_new ("active_descendant_changed",		  G_TYPE_FROM_CLASS (klass),		  G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,		  G_STRUCT_OFFSET (AtkObjectClass, active_descendant_changed),		  NULL, NULL,		  g_cclosure_marshal_VOID__POINTER,		  G_TYPE_NONE,		  1, G_TYPE_POINTER);}static voidatk_object_init  (AtkObject        *accessible,                  AtkObjectClass   *klass){  accessible->name = NULL;  accessible->description = NULL;  accessible->accessible_parent = NULL;  accessible->relation_set = atk_relation_set_new();  accessible->role = ATK_ROLE_UNKNOWN;}GTypeatk_implementor_get_type (void){  static GType type = 0;  if (!type)    {      static const GTypeInfo typeInfo =      {        sizeof (AtkImplementorIface),        (GBaseInitFunc) NULL,        (GBaseFinalizeFunc) NULL,      } ;      type = g_type_register_static (G_TYPE_INTERFACE, "AtkImplementorIface", &typeInfo, 0) ;    }  return type;}/** * atk_object_get_name: * @accessible: an #AtkObject * * Gets the accessible name of the accessible. * * Returns: a character string representing the accessible name of the object. **/G_CONST_RETURN gchar*atk_object_get_name (AtkObject *accessible){  AtkObjectClass *klass;  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);  klass = ATK_OBJECT_GET_CLASS (accessible);  if (klass->get_name)    return (klass->get_name) (accessible);  else    return NULL;}/** * atk_object_get_description: * @accessible: an #AtkObject * * Gets the accessible description of the accessible. * * Returns: a character string representing the accessible description * of the accessible. * **/G_CONST_RETURN gchar*atk_object_get_description (AtkObject *accessible){  AtkObjectClass *klass;  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);  klass = ATK_OBJECT_GET_CLASS (accessible);  if (klass->get_description)    return (klass->get_description) (accessible);  else    return NULL;}/** * atk_object_get_parent: * @accessible: an #AtkObject * * Gets the accessible parent of the accessible. * * Returns: a #AtkObject representing the accessible parent of the accessible **/AtkObject*atk_object_get_parent (AtkObject *accessible){  AtkObjectClass *klass;  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);  klass = ATK_OBJECT_GET_CLASS (accessible);  if (klass->get_parent)    return (klass->get_parent) (accessible);  else    return NULL;}/** * atk_object_get_n_accessible_children: * @accessible: an #AtkObject * * Gets the number of accessible children of the accessible. * * Returns: an integer representing the number of accessible children * of the accessible. **/gintatk_object_get_n_accessible_children (AtkObject *accessible){  AtkObjectClass *klass;  g_return_val_if_fail (ATK_IS_OBJECT (accessible), 0);  klass = ATK_OBJECT_GET_CLASS (accessible);  if (klass->get_n_children)    return (klass->get_n_children) (accessible);  else    return 0;}/** * atk_object_ref_accessible_child: * @accessible: an #AtkObject * @i: a gint representing the position of the child, starting from 0 * * Gets a reference to the specified accessible child of the object. * The accessible children are 0-based so the first accessible child is * at index 0, the second at index 1 and so on. * * Returns: an #AtkObject representing the specified accessible child * of the accessible. **/AtkObject*atk_object_ref_accessible_child (AtkObject   *accessible,                                 gint        i){  AtkObjectClass *klass;  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);  klass = ATK_OBJECT_GET_CLASS (accessible);  if (klass->ref_child)    return (klass->ref_child) (accessible, i);  else    return NULL;}/** * atk_object_ref_relation_set: * @accessible: an #AtkObject * * Gets the #AtkRelationSet associated with the object. * * Returns: an #AtkRelationSet representing the relation set of the object. **/AtkRelationSet*atk_object_ref_relation_set (AtkObject *accessible){  AtkObjectClass *klass;  g_return_val_if_fail (ATK_IS_OBJECT (accessible), NULL);  klass = ATK_OBJECT_GET_CLASS (accessible);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -