{
g_return_if_fail (accessible != NULL);
g_return_if_fail (accessible->parent.app != NULL);
- g_return_if_fail (atspi_accessible_is_equal (accessible, accessible->parent.app->root));
- g_return_if_fail (accessible == accessible->parent.app->root || accessible->role == ATSPI_ROLE_APPLICATION);
++ g_return_if_fail (atspi_accessible_is_equal (accessible, accessible->parent.app->root) || accessible->role == ATSPI_ROLE_APPLICATION);
accessible->parent.app->cache = mask;
enable_caching = TRUE;
}
AtspiObjectClass parent_class;
void (*region_changed) (AtspiAccessible *accessible, gint current_offset, gint last_offset);
+ void (*mode_changed) (AtspiAccessible *accessible, gboolean enabled);
};
-GType atspi_accessible_get_type (void);
+GType atspi_accessible_get_type (void);
AtspiAccessible *
_atspi_accessible_new (AtspiApplication *app, const gchar *path);
*
* One higher than the highest valid value of #AtspiRole.
*/
- #define ATSPI_ROLE_COUNT (127+1)
+ #define ATSPI_ROLE_COUNT (129+1)
+/**
+ * AtspiMoveOutedType: The type of signal that occurs when an object outted the screen.
+ * @ATSPI_MOVE_OUTED_TOP_LEFT: Object has outted top or left of the screen.
+ * @ATSPI_MOVE_OUTED_BOTTOM_RIGHT: Object has outted bottom or right of the screen.
+ **/
+
+typedef enum {
+ ATSPI_MOVE_OUTED_NULL,
+ ATSPI_MOVE_OUTED_TOP_LEFT,
+ ATSPI_MOVE_OUTED_BOTTOM_RIGHT,
+ ATSPI_MOVE_OUTED_LAST_DEFINDED
+} AtspiMoveOutedType;
+
+/**
+ * ATSPI_MOVE_OUTED_COUNT:
+ *
+ * One higher than the highest valid value of #AtspiScreenOuttedType.
+ **/
+#define ATSPI_MOVE_OUTED_COUNT (3+1)
+
typedef enum
{
ATSPI_CACHE_NONE = 0,
accessible = _atspi_dbus_return_accessible_from_iter (&iter_variant);
if (!strcmp (category, "ScreenReader"))
{
- g_object_unref(e.source);
+ g_object_unref (e.source);
e.source = accessible;
+ if (e.source == NULL)
+ {
+ g_warning ("Got no valid source accessible for signal %s from interface %s\n", member, category);
+ g_free (converted_type);
+ g_free (name);
+ g_free (detail);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
}
else
{
#include "atspi-gmain.h"
#include <stdio.h>
#include <string.h>
+ #include <ctype.h>
+/* This value is not fixed, could be changed. */
+#define HASH_TABLE_SIZE_MAX 1000
+
static void handle_get_items (DBusPendingCall *pending, void *user_data);
static DBusConnection *bus = NULL;
<servicedir>@DATADIR@/dbus-1/accessibility-services</servicedir>
<auth>EXTERNAL</auth>
- <listen>unix:tmpdir=/tmp</listen>
+ <listen>unix:dir=/tmp</listen>
- <policy context="default">
- <!-- Allow root to connect -->
- <allow user="root"/>
+ <policy user="owner">
<!-- Allow everything to be sent -->
<allow send_destination="*" eavesdrop="true"/>
<!-- Allow everything to be received -->
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#endif
+ #ifdef DBUS_BROKER
+ #include <systemd/sd-login.h>
+ #endif
+//TODO: move to vconf/vconf-internal-setting-keys.h?
+#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_CONFIGURATION_SERVICE "db/setting/accessibility/universal-switch/configuration-service"
+#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE "db/setting/accessibility/universal-switch/interaction-service"
+
+#define MAX_NUMBER_OF_KEYS_PER_CLIENT 2
+
+#define APP_CONTROL_OPERATION_SCREEN_READ "http://tizen.org/appcontrol/operation/read_screen"
+#define APP_CONTROL_OPERATION_UNIVERSAL_SWITCH "http://tizen.org/appcontrol/operation/universal_switch"
+#include <appsvc.h>
+#include <vconf.h>
+
+//uncomment if you want debug
+//#ifndef TIZEN_ENGINEER_MODE
+//#define TIZEN_ENGINEER_MODE
+//#endif
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "ATSPI_BUS_LAUNCHER"
+
+#include <dlog.h>
+#include <aul.h>
+
+//uncomment this if you want log suring startup
+//seems like dlog is not working at startup time
+#define ATSPI_BUS_LAUNCHER_LOG_TO_FILE
+
+#ifdef ATSPI_BUS_LAUNCHER_LOG_TO_FILE
+FILE *log_file;
+#ifdef LOGD
+#undef LOGD
+#endif
+#define LOGD(arg...) do {if (log_file) {fprintf(log_file, ##arg);fprintf(log_file, "\n"); fflush(log_file);}} while(0)
+#endif
+
+static gboolean _launch_process_repeat_until_success(gpointer user_data);
+
typedef enum {
A11Y_BUS_STATE_IDLE = 0,
A11Y_BUS_STATE_READING_ADDRESS,
GPid pid;
GError *error = NULL;
+ /* This detects whether we are running under systemd. We only try to
+ * use dbus-broker if we are running under systemd because D-Bus
+ * service activation won't work otherwise.
+ */
+ if (sd_pid_get_user_unit (getpid (), &unit) >= 0)
+ {
+ free (unit);
+ }
+ else
+ {
+ app->state = A11Y_BUS_STATE_ERROR;
+ return FALSE;
+ }
+
if ((app->listenfd = socket (PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0)) < 0)
- g_error ("Failed to create listening socket: %s", strerror (errno));
+ {
+ char buf[4096] = { 0 };
+ strerror_r (errno, buf, sizeof(buf));
+ g_error ("Failed to create listening socket: %s", buf);
+ }
if (bind (app->listenfd, (struct sockaddr *)&addr, sizeof(sa_family_t)) < 0)
- g_error ("Failed to bind listening socket: %s", strerror (errno));
+ {
+ char buf[4096] = { 0 };
+ strerror_r (errno, buf, sizeof(buf));
+ g_error ("Failed to bind listening socket: %s", buf);
+ }
if (getsockname (app->listenfd, (struct sockaddr *)&addr, &addr_len) < 0)
- g_error ("Failed to get socket name for listening socket: %s", strerror(errno));
+ {
+ char buf[4096] = { 0 };
+ strerror_r (errno, buf, sizeof(buf));
+ g_error ("Failed to get socket name for listening socket: %s", buf);
+ }
if (listen (app->listenfd, 1024) < 0)
- g_error ("Failed to listen on socket: %s", strerror(errno));
+ {
+ char buf[4096] = { 0 };
+ strerror_r (errno, buf, sizeof(buf));
+ g_error ("Failed to listen on socket: %s", buf);
+ }
g_clear_pointer (&app->a11y_launch_error_message, g_free);
launcher_args += '-DWANT_DBUS_BROKER'
endif
+ if needs_systemd
+ systemd_dep = dependency('libsystemd')
+ else
+ systemd_dep = dependency('', required: false)
+ endif
+
executable('at-spi-bus-launcher', 'at-spi-bus-launcher.c',
include_directories: [ root_inc, include_directories('.') ],
- dependencies: [ gio_dep, x11_deps, app_svc_dep ],
- dependencies: [ gio_dep, systemd_dep, x11_deps ],
++ dependencies: [ gio_dep, systemd_dep, x11_deps, app_svc_dep ],
c_args: launcher_args,
+ link_args: '-pie',
install: true,
install_dir: atspi_libexecdir)
# Dependencies
libdbus_req_version = '>= 1.5'
- glib_req_version = '>= 2.32.0'
+ glib_req_version = '>= 2.62.0'
gobject_req_version = '>= 2.0.0'
gio_req_version = '>= 2.28.0'
+app_svc_req_version = '>= 0.0.0'
libdbus_dep = dependency('dbus-1', version: libdbus_req_version)
glib_dep = dependency('glib-2.0', version: glib_req_version)
* This software is in the public domain. Share and enjoy!
*
*/
-
+#ifdef HAVE_X11
#include <X11/X.h>
+#endif
#include "deviceeventcontroller.h" /* for prototype */
+ /* DO NOT UPATE BY HAND!
+ * This table can be regenerated from Xorg's keysymdef.h with the ucs2keysym.sh
+ * script. */
struct codepair {
unsigned short keysym;
unsigned short ucs;
- test('memory',
- executable('memory', 'memory.c',
- include_directories: root_inc,
- dependencies: [ atspi_dep ]))
-
+at_spi2_tool_sources = [
+ 'at_spi2_tool.c'
+]
+
+executable('at_spi2_tool', at_spi2_tool_sources,
+ dependencies: [ atspi_dep, gio_dep ],
+ c_args: '-fPIE',
+ link_args: '-pie',
+ install: true,
+ install_dir: atspi_bindir)
+
+ testapp = executable('test-application',
+ 'test-application.c',
+ include_directories: root_inc,
+ dependencies: [ atspi_dep ],
+ )
+
+ memory = executable('memory',
+ 'memory.c',
+ include_directories: root_inc,
+ dependencies: [ atspi_dep ],
+ )
+
+ test('memory', memory, depends: testapp)