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

📄 atkobject.c

📁 The ATK library provides a set of interfaces for accessibility.By supporting the ATK interfaces, an
💻 C
📖 第 1 页 / 共 4 页
字号:
/* ATK -  Accessibility Toolkit * Copyright 2001 Sun Microsystems Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */#include <string.h>#include <glib-object.h>#ifdef G_OS_WIN32#define STRICT#include <windows.h>#undef STRICT#undef FOCUS_EVENT		/* <windows.h> pollutes the namespace				 * like a six hundred pound gorilla */#endif#include "atk.h"#include "atkmarshal.h"#include "atk-enum-types.h"#include "atkintl.h"static GPtrArray *extra_roles = NULL;enum{  PROP_0,  /* gobject convention */  PROP_NAME,  PROP_DESCRIPTION,  PROP_PARENT,      /* ancestry has changed */  PROP_VALUE,  PROP_ROLE,  PROP_LAYER,  PROP_MDI_ZORDER,  PROP_TABLE_CAPTION,  PROP_TABLE_COLUMN_DESCRIPTION,  PROP_TABLE_COLUMN_HEADER,  PROP_TABLE_ROW_DESCRIPTION,  PROP_TABLE_ROW_HEADER,  PROP_TABLE_SUMMARY,  PROP_TABLE_CAPTION_OBJECT,  PROP_HYPERTEXT_NUM_LINKS,  PROP_LAST         /* gobject convention */};enum {  CHILDREN_CHANGED,  FOCUS_EVENT,  PROPERTY_CHANGE,  STATE_CHANGE,  VISIBLE_DATA_CHANGED,  ACTIVE_DESCENDANT_CHANGED,    LAST_SIGNAL};/* These are listed here for extraction by intltool */#if 0  N_("invalid")  N_("accelerator label")  N_("alert")  N_("animation")  N_("arrow")  N_("calendar")  N_("canvas")  N_("check box")  N_("check menu item")  N_("color chooser")  N_("column header")  N_("combo box")  N_("dateeditor")  N_("desktop icon")  N_("desktop frame")  N_("dial")  N_("dialog")  N_("directory pane")  N_("drawing area")  N_("file chooser")  N_("filler")  /* I know it looks wrong but that is what Java returns */  N_("fontchooser")  N_("frame")  N_("glass pane")  N_("html container")  N_("icon")  N_("image")  N_("internal frame")  N_("label")  N_("layered pane")  N_("list")  N_("list item")  N_("menu")  N_("menu bar")  N_("menu item")  N_("option pane")  N_("page tab")  N_("page tab list")  N_("panel")  N_("password text")  N_("popup menu")  N_("progress bar")  N_("push button")  N_("radio button")  N_("radio menu item")  N_("root pane")  N_("row header")  N_("scroll bar")  N_("scroll pane")  N_("separator")  N_("slider")  N_("split pane")  N_("spin button")  N_("statusbar")  N_("table")  N_("table cell")  N_("table column header")  N_("table row header")  N_("tear off menu item")  N_("terminal")  N_("text")  N_("toggle button")  N_("tool bar")  N_("tool tip")  N_("tree")  N_("tree table")  N_("unknown")  N_("viewport")  N_("window")  N_("header")  N_("footer")  N_("paragraph")  N_("ruler")  N_("application")  N_("autocomplete")  N_("edit bar")  N_("embedded component")  N_("entry")  N_("chart")  N_("caption")  N_("document frame")  N_("heading")  N_("page")  N_("section")  N_("redundant object")  N_("form")  N_("link")  N_("input method window")#endif /* 0 */static const char roles[] =  "invalid\0"  "accelerator label\0"  "alert\0"  "animation\0"  "arrow\0"  "calendar\0"  "canvas\0"  "check box\0"  "check menu item\0"  "color chooser\0"  "column header\0"  "combo box\0"  "dateeditor\0"  "desktop icon\0"  "desktop frame\0"  "dial\0"  "dialog\0"  "directory pane\0"  "drawing area\0"  "file chooser\0"  "filler\0"  "fontchooser\0"  "frame\0"  "glass pane\0"  "html container\0"  "icon\0"  "image\0"  "internal frame\0"  "label\0"  "layered pane\0"  "list\0"  "list item\0"  "menu\0"  "menu bar\0"  "menu item\0"  "option pane\0"  "page tab\0"  "page tab list\0"  "panel\0"  "password text\0"  "popup menu\0"  "progress bar\0"  "push button\0"  "radio button\0"  "radio menu item\0"  "root pane\0"  "row header\0"  "scroll bar\0"  "scroll pane\0"  "separator\0"  "slider\0"  "split pane\0"  "spin button\0"  "statusbar\0"  "table\0"  "table cell\0"  "table column header\0"  "table row header\0"  "tear off menu item\0"  "terminal\0"  "text\0"  "toggle button\0"  "tool bar\0"  "tool tip\0"  "tree\0"  "tree table\0"  "unknown\0"  "viewport\0"  "window\0"  "header\0"  "footer\0"  "paragraph\0"  "ruler\0"  "application\0"  "autocomplete\0"  "edit bar\0"  "embedded component\0"  "entry\0"  "chart\0"  "caption\0"  "document frame\0"  "heading\0"  "page\0"  "section\0"  "redundant object\0"  "form\0"  "link\0"  "input method window";static const guint16 roles_offsets[] = {  0, 8, 26, 32, 42, 48, 57, 64,   74, 90, 104, 118, 128, 139, 152, 166,   171, 178, 193, 206, 219, 226, 238, 244,   255, 270, 275, 281, 296, 302, 315, 320,   330, 335, 344, 354, 366, 375, 389, 395,   409, 420, 433, 445, 458, 474, 484, 495,   506, 518, 528, 535, 546, 558, 568, 574,   585, 605, 622, 641, 650, 655, 669, 678,   687, 692, 703, 711, 720, 727, 734, 741,   751, 757, 769, 782, 791, 810, 816, 822,   830, 845, 853, 858, 866, 883, 888, 893};/* This is a static assertion */typedef int _assert_roles_num[(G_N_ELEMENTS (roles_offsets) == ATK_ROLE_LAST_DEFINED) ? 1 : -1];static void            atk_object_class_init        (AtkObjectClass  *klass);static void            atk_object_init              (AtkObject       *accessible,                                                     AtkObjectClass  *klass);static AtkRelationSet* atk_object_real_ref_relation_set                                                     (AtkObject       *accessible);static void            atk_object_real_initialize   (AtkObject       *accessible,                                                     gpointer        data);static void            atk_object_real_set_property (GObject         *object,                                                     guint            prop_id,                                                     const GValue    *value,                                                     GParamSpec      *pspec);static void            atk_object_real_get_property (GObject         *object,                                                     guint            prop_id,                                                     GValue          *value,                                                     GParamSpec      *pspec);static void            atk_object_finalize          (GObject         *object);static G_CONST_RETURN gchar*                       atk_object_real_get_name     (AtkObject       *object);static G_CONST_RETURN gchar*                       atk_object_real_get_description                                                       (AtkObject       *object);static AtkObject*      atk_object_real_get_parent  (AtkObject       *object);static AtkRole         atk_object_real_get_role    (AtkObject       *object);static AtkLayer        atk_object_real_get_layer   (AtkObject       *object);static AtkStateSet*    atk_object_real_ref_state_set                                                   (AtkObject       *object);static void            atk_object_real_set_name    (AtkObject       *object,                                                    const gchar     *name);static void            atk_object_real_set_description                                                   (AtkObject       *object,                                                    const gchar     *description);static void            atk_object_real_set_parent  (AtkObject       *object,                                                    AtkObject       *parent);static void            atk_object_real_set_role    (AtkObject       *object,                                                    AtkRole         role);static guint           atk_object_real_connect_property_change_handler                                                   (AtkObject       *obj,                                                    AtkPropertyChangeHandler                                                                    *handler);static void            atk_object_real_remove_property_change_handler                                                   (AtkObject       *obj,                                                    guint           handler_id);static void            atk_object_notify           (GObject         *obj,                                                    GParamSpec      *pspec);static guint atk_object_signals[LAST_SIGNAL] = { 0, };static gpointer parent_class = NULL;static const gchar* const atk_object_name_property_name = "accessible-name";static const gchar* const atk_object_name_property_description = "accessible-description";static const gchar* const atk_object_name_property_parent = "accessible-parent";static const gchar* const atk_object_name_property_value = "accessible-value";static const gchar* const atk_object_name_property_role = "accessible-role";static const gchar* const atk_object_name_property_component_layer = "accessible-component-layer";static const gchar* const atk_object_name_property_component_mdi_zorder = "accessible-component-mdi-zorder";static const gchar* const atk_object_name_property_table_caption = "accessible-table-caption";static const gchar* const atk_object_name_property_table_column_description = "accessible-table-column-description";static const gchar* const atk_object_name_property_table_column_header = "accessible-table-column-header";static const gchar* const atk_object_name_property_table_row_description = "accessible-table-row-description";static const gchar* const atk_object_name_property_table_row_header = "accessible-table-row-header";static const gchar* const atk_object_name_property_table_summary = "accessible-table-summary";static const gchar* const atk_object_name_property_table_caption_object = "accessible-table-caption-object";static const gchar* const atk_object_name_property_hypertext_num_links = "accessible-hypertext-nlinks";#ifdef G_OS_WIN32static HMODULE atk_dll;BOOL WINAPIDllMain (HINSTANCE hinstDLL,	 DWORD     fdwReason,	 LPVOID    lpvReserved){  switch (fdwReason)    {    case DLL_PROCESS_ATTACH:      atk_dll = (HMODULE) hinstDLL;      break;    }  return TRUE;}static const char *get_atk_locale_dir (void){  static gchar *atk_localedir = NULL;  if (!atk_localedir)    {      const gchar *p;      gchar *root, *temp;            /* ATK_LOCALEDIR might end in either /lib/locale or       * /share/locale. Scan for that slash.       */      p = ATK_LOCALEDIR + strlen (ATK_LOCALEDIR);      while (*--p != '/')	;      while (*--p != '/')	;      root = g_win32_get_package_installation_directory_of_module (atk_dll);      temp = g_build_filename (root, p, NULL);      g_free (root);      /* atk_localedir is passed to bindtextdomain() which isn't       * UTF-8-aware.       */      atk_localedir = g_win32_locale_filename_from_utf8 (temp);      g_free (temp);    }  return atk_localedir;}#undef ATK_LOCALEDIR#define ATK_LOCALEDIR get_atk_locale_dir()#endifstatic voidgettext_initialization (void){#ifdef ENABLE_NLS  static gboolean gettext_initialized = FALSE;  if (!gettext_initialized)    {      const char *dir = g_getenv ("ATK_ALT_LOCALEDIR");      gettext_initialized = TRUE;      if (dir == NULL)        dir = ATK_LOCALEDIR;      bindtextdomain (GETTEXT_PACKAGE, dir);#ifdef HAVE_BIND_TEXTDOMAIN_CODESET

⌨️ 快捷键说明

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