Removes signals code.
Removes introspection code.
Removes string properties code.
return droute_return_v_string (iter, atk_object_get_name (object));
}
-static char *
-impl_get_name_str (void *datum)
-{
- g_assert (ATK_IS_OBJECT (datum));
- return g_strdup (atk_object_get_name ((AtkObject *) datum));
-}
-
static dbus_bool_t
impl_set_name (const char *path, DBusMessageIter * iter, void *user_data)
{
return droute_return_v_string (iter, atk_object_get_description (object));
}
-static char *
-impl_get_description_str (void *datum)
-{
- g_assert (ATK_IS_OBJECT (datum));
- return g_strdup (atk_object_get_description ((AtkObject *) datum));
-}
-
static dbus_bool_t
impl_set_description (const char *path, DBusMessageIter * iter,
void *user_data)
FALSE);
}
-static char *
-impl_get_parent_str (void *datum)
-{
- g_assert (ATK_IS_OBJECT (datum));
- return spi_dbus_get_path (atk_object_get_parent ((AtkObject *) datum));
-}
-
static dbus_bool_t
impl_get_childCount (const char *path, DBusMessageIter * iter,
void *user_data)
(object));
}
-static char *
-impl_get_childCount_str (void *datum)
-{
- int count;
- g_assert (ATK_IS_OBJECT (datum));
- count = atk_object_get_n_accessible_children ((AtkObject *) datum);
- return g_strdup_printf ("%d", count);
-}
-
static DBusMessage *
impl_getChildren (DBusConnection * bus, DBusMessage * message,
void *user_data)
}
static DRouteMethod methods[] = {
- //{ DROUTE_METHOD, impl_isEqual, "isEqual", "o,obj,i:b,,o" },
- {DROUTE_METHOD, impl_getChildren, "getChildren", "ao,,o"},
- {DROUTE_METHOD, impl_getIndexInParent, "getIndexInParent", "i,,o"},
- //{ DROUTE_METHOD, impl_getRelationSet, "getRelationSet", "a{uao},,o" },
- {DROUTE_METHOD, impl_getRole, "getRole", "u,,o"},
- {DROUTE_METHOD, impl_getRoleName, "getRoleName", "s,,o"},
- {DROUTE_METHOD, impl_getLocalizedRoleName, "getLocalizedRoleName", "s,,o"},
- {DROUTE_METHOD, impl_getState, "getState", "o,,au"},
- {DROUTE_METHOD, impl_getAttributes, "getAttributes", "as,,o"},
- {DROUTE_METHOD, impl_getApplication, "getApplication", "o,,o"},
- {0, NULL, NULL, NULL}
+ //{impl_isEqual, "isEqual"},
+ {impl_getChildren, "getChildren"},
+ {impl_getIndexInParent, "getIndexInParent"},
+ //{impl_getRelationSet, "getRelationSet"},,o" },
+ {impl_getRole, "getRole"},
+ {impl_getRoleName, "getRoleName"},
+ {impl_getLocalizedRoleName, "getLocalizedRoleName"},
+ {impl_getState, "getState"},
+ {impl_getAttributes, "getAttributes"},
+ {impl_getApplication, "getApplication"},
+ {NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_name, impl_get_name_str, impl_set_name, NULL, "name", "s"},
- {impl_get_description, impl_get_description_str, impl_set_description, NULL,
- "description", "s"},
- {impl_get_parent, impl_get_parent_str, NULL, NULL, "parent", "o"},
- //{ impl_get_childCount, impl_get_childCount_str, NULL, NULL, "childCount", "n" },
- {NULL, impl_get_role_str, NULL, NULL, "role", "u"},
- {NULL, NULL, NULL, NULL, NULL, NULL}
+ {impl_get_name, impl_set_name, "name"},
+ {impl_get_description, impl_set_description, "description"},
+ {impl_get_parent, NULL, "parent"},
+ //{impl_get_childCount, NULL, "childCount"},
+ //{NULL, NULL, NULL, "role"},
+ {NULL, NULL, NULL}
};
void
DRouteMethod methods[] =
{
- { DROUTE_METHOD, impl_getActions, "getActions", "a(sss),,o" },
- { DROUTE_METHOD, impl_doAction, "doAction", "i,index,i:b,,o" },
- { 0, NULL, NULL, NULL }
+ {impl_getActions, "getActions"},
+ {impl_doAction, "doAction"},
+ {NULL, NULL }
};
void
return droute_return_v_string (iter, atk_get_toolkit_name ());
}
-static char *
-impl_get_toolkitName_str (void *datum)
-{
- return g_strdup (atk_get_toolkit_name ());
-}
-
static dbus_bool_t
impl_get_version (const char *path, DBusMessageIter * iter, void *user_data)
{
return droute_return_v_string (iter, atk_get_toolkit_version ());
}
-static char *
-impl_get_version_str (void *datum)
-{
- return g_strdup (atk_get_toolkit_version ());
-}
-
static dbus_int32_t id;
static dbus_bool_t
return droute_return_v_int32 (iter, id);
}
-static char *
-impl_get_id_str (void *datum)
-{
- return g_strdup_printf ("%d", id);
-}
-
static dbus_bool_t
impl_set_id (const char *path, DBusMessageIter * iter, void *user_data)
{
impl_registerToolkitEventListener (DBusConnection * bus,
DBusMessage * message, void *user_data)
{
+ return NULL;
}
static DBusMessage *
impl_registerObjectEventListener (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
+ return NULL;
}
static DBusMessage *
impl_pause (DBusConnection * bus, DBusMessage * message, void *user_data)
{
+ return NULL;
}
static DBusMessage *
impl_resume (DBusConnection * bus, DBusMessage * message, void *user_data)
{
+ return NULL;
}
static DBusMessage *
impl_getLocale (DBusConnection * bus, DBusMessage * message, void *user_data)
{
+ return NULL;
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_registerToolkitEventListener,
- "registerToolkitEventListener", "o,listener,i:s,eventName,i"},
- {DROUTE_METHOD, impl_registerObjectEventListener,
- "registerObjectEventListener", "o,listener,i:s,eventName,i"},
- {DROUTE_METHOD, impl_pause, "pause", "b,,o"},
- {DROUTE_METHOD, impl_resume, "resume", "b,,o"},
- {DROUTE_METHOD, impl_getLocale, "getLocale", "u,lctype,i:s,,o"},
- {0, NULL, NULL, NULL}
+ {impl_registerToolkitEventListener, "registerToolkitEventListener"},
+ {impl_registerObjectEventListener, "registerObjectEventListener"},
+ {impl_pause, "pause"},
+ {impl_resume, "resume"},
+ {impl_getLocale, "getLocale"},
+ {NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_toolkitName, impl_get_toolkitName_str, NULL, NULL, "toolkitName",
- "s"},
- {impl_get_version, impl_get_version_str, NULL, NULL, "version", "s"},
- {impl_get_id, impl_get_id_str, impl_set_id, NULL, "id", "i"},
- {NULL, NULL, NULL, NULL, NULL, NULL}
+ {impl_get_toolkitName, NULL, "toolkitName"},
+ {impl_get_version, NULL, "version"},
+ {impl_get_id, impl_set_id, "id"},
+ {NULL, NULL, NULL}
};
static long
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_contains, "contains",
- "i,x,i:i,y,i:u,coord_type,i:b,,o"},
- {DROUTE_METHOD, impl_getAccessibleAtPoint, "getAccessibleAtPoint",
- "i,x,i:i,y,i:u,coord_type,i:o,,o"},
- {DROUTE_METHOD, impl_getExtents, "getExtents", "u,coord_type,i:(uuuu),,o"},
- {DROUTE_METHOD, impl_getPosition, "getPosition",
- "i,x,o:i,y,o:u,coord_type,i"},
- {DROUTE_METHOD, impl_getSize, "getSize", "i,width,o:i,height,o"},
- {DROUTE_METHOD, impl_getLayer, "getLayer", "g,,o"},
- {DROUTE_METHOD, impl_getMDIZOrder, "getMDIZOrder", "n,,o"},
- {DROUTE_METHOD, impl_grabFocus, "grabFocus", "b,,o"},
- //{ DROUTE_METHOD, impl_registerFocusHandler, "registerFocusHandler", "o,handler,i" },
- //{ DROUTE_METHOD, impl_deregisterFocusHandler, "deregisterFocusHandler", "o,handler,i" },
- {DROUTE_METHOD, impl_getAlpha, "getAlpha", "d,,o"},
- {0, NULL, NULL, NULL}
+ {impl_contains, "contains"},
+ {impl_getAccessibleAtPoint, "getAccessibleAtPoint"},
+ {impl_getExtents, "getExtents"},
+ {impl_getPosition, "getPosition"},
+ {impl_getSize, "getSize"},
+ {impl_getLayer, "getLayer"},
+ {impl_getMDIZOrder, "getMDIZOrder"},
+ {impl_grabFocus, "grabFocus"},
+ //{impl_registerFocusHandler, "registerFocusHandler"},
+ //{impl_deregisterFocusHandler, "deregisterFocusHandler"},
+ {impl_getAlpha, "getAlpha"},
+ {NULL, NULL}
};
void
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getLocale, "getLocale", "s,,o"},
- {DROUTE_METHOD, impl_getAttributeValue, "getAttributeValue",
- "s,attributename,i:s,,o"},
- {DROUTE_METHOD, impl_getAttributes, "getAttributes", "as,,o"},
- {0, NULL, NULL, NULL}
+ {impl_getLocale, "getLocale"},
+ {impl_getAttributeValue, "getAttributeValue"},
+ {impl_getAttributes, "getAttributes"},
+ {NULL, NULL}
};
void
return DBUS_HANDLER_RESULT_HANDLED;
}
-static DBusHandlerResult
-introspect (DBusConnection * bus, DBusMessage * message, DRouteData * data)
-{
- const char *path = dbus_message_get_path (message);
- GString *xml;
- DRouteInterface *iface_def;
- DRouteMethod *method;
- DRouteProperty *property;
- char *str;
- DBusMessage *reply;
- GSList *l;
- void *datum;
-
- if (strcmp (dbus_message_get_member (message), "Introspect"))
- {
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- }
- xml = g_string_new (NULL);
- /* below code stolen from dbus-glib */
- g_string_append (xml, DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE);
- g_string_append_printf (xml, "<node name=\"%s\">\n", path);
-
- /* We are introspectable, though I guess that was pretty obvious */
- g_string_append_printf (xml, " <interface name=\"%s\">\n",
- DBUS_INTERFACE_INTROSPECTABLE);
- g_string_append (xml, " <method name=\"Introspect\">\n");
- g_string_append_printf (xml,
- " <arg name=\"data\" direction=\"out\" type=\"%s\"/>\n",
- DBUS_TYPE_STRING_AS_STRING);
- g_string_append (xml, " </method>\n");
- g_string_append (xml, " </interface>\n");
-
- /* We support get/set/getall properties */
- g_string_append_printf (xml, " <interface name=\"%s\">\n",
- DBUS_INTERFACE_PROPERTIES);
- g_string_append (xml, " <method name=\"Get\">\n");
- g_string_append_printf (xml,
- " <arg name=\"interface\" direction=\"in\" type=\"%s\"/>\n",
- DBUS_TYPE_STRING_AS_STRING);
- g_string_append_printf (xml,
- " <arg name=\"propname\" direction=\"in\" type=\"%s\"/>\n",
- DBUS_TYPE_STRING_AS_STRING);
- g_string_append_printf (xml,
- " <arg name=\"value\" direction=\"out\" type=\"%s\"/>\n",
- DBUS_TYPE_VARIANT_AS_STRING);
- g_string_append (xml, " </method>\n");
- g_string_append (xml, " <method name=\"Set\">\n");
- g_string_append_printf (xml,
- " <arg name=\"interface\" direction=\"in\" type=\"%s\"/>\n",
- DBUS_TYPE_STRING_AS_STRING);
- g_string_append_printf (xml,
- " <arg name=\"propname\" direction=\"in\" type=\"%s\"/>\n",
- DBUS_TYPE_STRING_AS_STRING);
- g_string_append_printf (xml,
- " <arg name=\"value\" direction=\"in\" type=\"%s\"/>\n",
- DBUS_TYPE_VARIANT_AS_STRING);
- g_string_append (xml, " </method>\n");
- g_string_append (xml, " <method name=\"GetAll\">\n");
- g_string_append_printf (xml,
- " <arg name=\"interface\" direction=\"in\" type=\"%s\"/>\n",
- DBUS_TYPE_STRING_AS_STRING);
- g_string_append_printf (xml,
- " <arg name=\"props\" direction=\"out\" type=\"%s\"/>\n",
- DBUS_TYPE_ARRAY_AS_STRING
- DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
- DBUS_TYPE_STRING_AS_STRING
- DBUS_TYPE_VARIANT_AS_STRING
- DBUS_DICT_ENTRY_END_CHAR_AS_STRING);
-
- g_string_append (xml, " </method>\n");
- g_string_append (xml, " </interface>\n");
- /* end of stolen code */
-
- for (l = data->interfaces; l; l = g_slist_next (l))
- {
- iface_def = (DRouteInterface *) l->data;
- if (iface_def->get_datum)
- {
- datum = (*iface_def->get_datum) (path, data->user_data);
- if (!datum)
- continue;
- }
- g_string_append_printf (xml, "<interface name=\"%s\">\n",
- iface_def->name);
- if (iface_def->methods)
- for (method = iface_def->methods; method->name; method++)
- {
- const char *p = method->arg_desc;
- g_string_append_printf (xml, "<%s name=\"%s\">\n",
- (method->type ==
- DROUTE_METHOD ? "method" : "signal"),
- method->name);
- while (*p)
- {
- g_string_append (xml, "<arg type=\"");
- g_string_append_len (xml, p, strcspn (p, ",:"));
- p += strcspn (p, ",");
- if (*p == ',')
- p++;
- if (strcspn (p, ",:") > 0)
- {
- g_string_append (xml, "\" name=\"");
- g_string_append_len (xml, p, strcspn (p, ",:"));
- p += strcspn (p, ",");
- }
- if (*p == ',')
- p++;
- g_string_append_printf (xml, "\" direction=\"%s\"/>\n",
- (*p == 'o' ? "out" : "in"));
- p += strcspn (p, ":");
- if (*p == ':')
- p++;
- }
- g_string_append_printf (xml, "</%s>\n",
- (method->type ==
- DROUTE_METHOD ? "method" : "signal"));
- }
- if (iface_def->properties)
- for (property = iface_def->properties; property->name; property++)
- {
- if (!property->get && !property->set)
- continue;
- g_string_append_printf (xml,
- "<property name=\"%s\" type=\"%s\" access=\"%s%s\"/>\n",
- property->name, property->type,
- (property->get ? "read" : ""),
- (property->set ? "write" : ""));
- }
- if (iface_def->free_datum)
- (*iface_def->free_datum) (datum);
- g_string_append (xml, "</interface>\n");
- }
- if (data->introspect_children)
- {
- (*data->introspect_children) (path, xml, data->user_data);
- }
- g_string_append (xml, "</node>\n");
- str = g_string_free (xml, FALSE);
- reply = dbus_message_new_method_return (message);
- if (reply)
- {
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &str,
- DBUS_TYPE_INVALID);
- }
- g_free (str);
- dbus_connection_send (bus, reply, NULL);
- dbus_message_unref (reply);
- return DBUS_HANDLER_RESULT_HANDLED;
-}
-
DBusHandlerResult
droute_message (DBusConnection * bus, DBusMessage * message, void *user_data)
{
return prop_get_all (bus, message, data);
return prop (bus, message, data);
}
- else if (iface && !strcmp (iface, "org.freedesktop.DBus.Introspectable"))
- {
- return introspect (bus, message, data);
- }
- else
- {
- int message_type = dbus_message_get_type (message);
- switch (message_type)
- {
- case DBUS_MESSAGE_TYPE_METHOD_CALL:
- type = DROUTE_METHOD;
- break;
- case DBUS_MESSAGE_TYPE_SIGNAL:
- type = DROUTE_SIGNAL;
- break;
- default:
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- }
- }
if (iface)
{
iface_def = find_iface (data, iface);
if (iface_def->methods)
for (method = iface_def->methods; method->func; method++)
{
- if (method->type == type && !strcmp (method->name, member))
+ if (!strcmp (method->name, member))
{
reply =
(*method->func) (bus, message,
if (iface_def->methods)
for (method = iface_def->methods; method->func; method++)
{
- if (method->type == type && !strcmp (method->name, member))
+ if (!strcmp (method->name, member))
{
reply = (*method->func) (bus, message, data->user_data);
if (reply)
typedef DBusMessage *(*DRouteFunction)(DBusConnection *, DBusMessage *, void *);
typedef dbus_bool_t (*DRoutePropertyFunction)(const char *, DBusMessageIter *, void *);
-typedef char *(*DRoutePropertyStrFunction)(void *);
typedef struct _DRouteMethod DRouteMethod;
struct _DRouteMethod
{
- /* DROUTE_(METHOD|SIGNAL) */
- int type;
DRouteFunction func;
const char *name;
- /* arg_desc contains argument information used for introspection.
- * It is a colon-delimited string of type,name,dir values */
- const char *arg_desc;
dbus_bool_t wants_droute_data;
};
struct _DRouteProperty
{
DRoutePropertyFunction get;
- DRoutePropertyStrFunction get_str;
DRoutePropertyFunction set;
- DRoutePropertyStrFunction set_str;
const char *name;
- const char *type;
};
typedef void *(*DRouteGetDatumFunction)(const char *, void *);
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_setTextContents, "setTextContents",
- "s,newContents,i:b,,o"},
- {DROUTE_METHOD, impl_insertText, "insertText",
- "i,position,i:s,text,i:i,length,i:b,,o"},
- {DROUTE_METHOD, impl_setAttributes, "setAttributes",
- "s,attributes,i:i,startPos,i:i,endPos,i:b,,o"},
- {DROUTE_METHOD, impl_copyText, "copyText", "i,startPos,i:i,endPos,i"},
- {DROUTE_METHOD, impl_cutText, "cutText", "i,startPos,i:i,endPos,i:b,,o"},
- {DROUTE_METHOD, impl_deleteText, "deleteText",
- "i,startPos,i:i,endPos,i:b,,o"},
- {DROUTE_METHOD, impl_pasteText, "pasteText", "i,position,i:b,,o"},
- {0, NULL, NULL, NULL}
+ {impl_setTextContents, "setTextContents"},
+ {impl_insertText, "insertText"},
+ {impl_setAttributes, "setAttributes"},
+ {impl_copyText, "copyText"},
+ {impl_cutText, "cutText"},
+ {impl_deleteText, "deleteText"},
+ {impl_pasteText, "pasteText"},
+ {NULL, NULL}
};
void
return droute_return_v_int32 (iter, atk_hyperlink_get_n_anchors (link));
}
-static char *
-impl_get_nAnchors_str (void *datum)
-{
- g_assert (ATK_IS_HYPERLINK (datum));
- return g_strdup_printf ("%d",
- atk_hyperlink_get_n_anchors ((AtkHyperlink *)
- datum));
-}
static dbus_bool_t
impl_get_startIndex (const char *path, DBusMessageIter * iter,
return droute_return_v_int32 (iter, atk_hyperlink_get_start_index (link));
}
-static char *
-impl_get_startIndex_str (void *datum)
-{
- g_assert (ATK_IS_HYPERLINK (datum));
- return g_strdup_printf ("%d",
- atk_hyperlink_get_start_index ((AtkHyperlink *)
- datum));
-}
-
static dbus_bool_t
impl_get_endIndex (const char *path, DBusMessageIter * iter, void *user_data)
{
return droute_return_v_int32 (iter, atk_hyperlink_get_end_index (link));
}
-static char *
-impl_get_endIndex_str (void *datum)
-{
- g_assert (ATK_IS_HYPERLINK (datum));
- return g_strdup_printf ("%d",
- atk_hyperlink_get_end_index ((AtkHyperlink *)
- datum));
-}
-
static DBusMessage *
impl_getObject (DBusConnection * bus, DBusMessage * message, void *user_data)
{
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getObject, "getObject", "i,i,i:o,,o"},
- {DROUTE_METHOD, impl_getURI, "getURI", "i,i,i:s,,o"},
- {DROUTE_METHOD, impl_isValid, "isValid", "b,,o"},
- {0, NULL, NULL, NULL}
+ {impl_getObject, "getObject"},
+ {impl_getURI, "getURI"},
+ {impl_isValid, "isValid"},
+ {NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_nAnchors, impl_get_nAnchors_str, NULL, NULL, "nAnchors"},
- {impl_get_startIndex, impl_get_startIndex_str, NULL, NULL, "startIndex"},
- {impl_get_endIndex, impl_get_endIndex_str, NULL, NULL, "endIndex"},
- {NULL, NULL, NULL, NULL, NULL}
+ {impl_get_nAnchors, NULL, "nAnchors"},
+ {impl_get_startIndex, NULL, "startIndex"},
+ {impl_get_endIndex, NULL, "endIndex"},
+ {NULL, NULL, NULL}
};
void
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getNLinks, "getNLinks", "i,,o"},
- {DROUTE_METHOD, impl_getLink, "getLink", "i,linkIndex,i:o,,o"},
- {DROUTE_METHOD, impl_getLinkIndex, "getLinkIndex",
- "i,characterIndex,i:i,,o"},
- {0, NULL, NULL, NULL}
+ {impl_getNLinks, "getNLinks"},
+ {impl_getLink, "getLink"},
+ {impl_getLinkIndex, "getLinkIndex"},
+ {NULL, NULL}
};
void
atk_image_get_image_description (image));
}
-static char *
-impl_get_imageDescription_str (void *datum)
-{
- AtkImage *image = (AtkImage *) datum;
- g_assert (ATK_IS_IMAGE (datum));
- return g_strdup (atk_image_get_image_description (image));
-}
-
static dbus_bool_t
impl_get_imageLocale (const char *path, DBusMessageIter * iter,
void *user_data)
return droute_return_v_string (iter, atk_image_get_image_locale (image));
}
-static char *
-impl_get_imageLocale_str (void *datum)
-{
- AtkImage *image = (AtkImage *) datum;
- g_assert (ATK_IS_IMAGE (datum));
- return g_strdup (atk_image_get_image_locale (image));
-}
-
static DBusMessage *
impl_getImageExtents (DBusConnection * bus, DBusMessage * message,
void *user_data)
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getImageExtents, "getImageExtents",
- "n,coordType,i:(uuuu),,o"},
- {DROUTE_METHOD, impl_getImagePosition, "getImagePosition",
- "i,x,o:i,y,o:n,coordType,i"},
- {DROUTE_METHOD, impl_getImageSize, "getImageSize", "i,width,o:i,height,o"},
- {0, NULL, NULL, NULL}
+ {impl_getImageExtents, "getImageExtents"},
+ {impl_getImagePosition, "getImagePosition"},
+ {impl_getImageSize, "getImageSize"},
+ {NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_imageDescription, impl_get_imageDescription_str, NULL, NULL,
- "imageDescription", "s"},
- {impl_get_imageLocale, impl_get_imageLocale_str, NULL, NULL, "imageLocale",
- "s"},
- {NULL, NULL, NULL, NULL, NULL, NULL}
+ {impl_get_imageDescription, NULL, "imageDescription"},
+ {impl_get_imageLocale, NULL, "imageLocale"},
+ {NULL, NULL, NULL}
};
void
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getSelectedChild, "getSelectedChild",
- "i,selectedChildIndex,i:o,,o"},
- {DROUTE_METHOD, impl_selectChild, "selectChild", "i,childIndex,i:b,,o"},
- {DROUTE_METHOD, impl_deselectSelectedChild, "deselectSelectedChild",
- "i,selectedChildIndex,i:b,,o"},
- {DROUTE_METHOD, impl_isChildSelected, "isChildSelected",
- "i,childIndex,i:b,,o"},
- {DROUTE_METHOD, impl_selectAll, "selectAll", "b,,o"},
- {DROUTE_METHOD, impl_clearSelection, "clearSelection", "b,,o"},
- {DROUTE_METHOD, impl_deselectChild, "deselectChild", "i,childIndex,i:b,,o"},
- {0, NULL, NULL, NULL}
+ {impl_getSelectedChild, "getSelectedChild"},
+ {impl_selectChild, "selectChild"},
+ {impl_deselectSelectedChild, "deselectSelectedChild"},
+ {impl_isChildSelected, "isChildSelected"},
+ {impl_selectAll, "selectAll"},
+ {impl_clearSelection, "clearSelection"},
+ {impl_deselectChild, "deselectChild"},
+ {NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_nSelectedChildren, impl_get_nSelectedChildren_str, NULL, NULL,
- "nSelectedChildren"},
- {NULL, NULL, NULL, NULL, NULL}
+ {impl_get_nSelectedChildren, NULL, "nSelectedChildren"},
+ {NULL, NULL, NULL}
};
void
return droute_return_v_int32 (iter, atk_table_get_n_rows (table));
}
-static char *
-impl_get_nRows_str (void *datum)
-{
- g_assert (ATK_IS_TABLE (datum));
- return g_strdup_printf ("%d", atk_table_get_n_rows ((AtkTable *) datum));
-}
-
static dbus_bool_t
impl_get_nColumns (const char *path, DBusMessageIter * iter, void *user_data)
{
return droute_return_v_int32 (iter, atk_table_get_n_columns (table));
}
-static char *
-impl_get_nColumns_str (void *datum)
-{
- g_assert (ATK_IS_TABLE (datum));
- return g_strdup_printf ("%d", atk_table_get_n_columns ((AtkTable *) datum));
-}
-
static dbus_bool_t
impl_get_caption (const char *path, DBusMessageIter * iter, void *user_data)
{
FALSE);
}
-static char *
-impl_get_caption_str (void *datum)
-{
- AtkTable *table = (AtkTable *) datum;
- g_assert (ATK_IS_TABLE (datum));
- return spi_dbus_get_path (atk_table_get_caption (table));
-}
-
static dbus_bool_t
impl_get_summary (const char *path, DBusMessageIter * iter, void *user_data)
{
FALSE);
}
-static char *
-impl_get_summary_str (void *datum)
-{
- AtkTable *table = (AtkTable *) datum;
- g_assert (ATK_IS_TABLE (datum));
- return spi_dbus_get_path (atk_table_get_summary (table));
-}
-
static dbus_bool_t
impl_get_nSelectedRows (const char *path, DBusMessageIter * iter,
void *user_data)
return droute_return_v_int32 (iter, count);
}
-static char *
-impl_get_nSelectedRows_str (void *datum)
-{
- gint count;
- gint *selected_rows = NULL;
- g_assert (ATK_IS_TABLE (datum));
- count = atk_table_get_selected_rows ((AtkTable *) datum, &selected_rows);
- if (selected_rows)
- g_free (selected_rows);
- return g_strdup_printf ("%d", count);
-}
-
static dbus_bool_t
impl_get_nSelectedColumns (const char *path, DBusMessageIter * iter,
void *user_data)
return droute_return_v_int32 (iter, count);
}
-static char *
-impl_get_nSelectedColumns_str (void *datum)
-{
- gint count;
- gint *selected_columns = NULL;
- g_assert (ATK_IS_TABLE (datum));
- count =
- atk_table_get_selected_columns ((AtkTable *) datum, &selected_columns);
- if (selected_columns)
- g_free (selected_columns);
- return g_strdup_printf ("%d", count);
-}
-
-
static DBusMessage *
impl_getAccessibleAt (DBusConnection * bus, DBusMessage * message,
void *user_data)
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getAccessibleAt, "getAccessibleAt",
- "i,row,i:i,column,i:o,,o"},
- {DROUTE_METHOD, impl_getIndexAt, "getIndexAt", "i,row,i:i,column,i:i,,o"},
- {DROUTE_METHOD, impl_getRowAtIndex, "getRowAtIndex", "i,index,i:i,,o"},
- {DROUTE_METHOD, impl_getColumnAtIndex, "getColumnAtIndex",
- "i,index,i:i,,o"},
- {DROUTE_METHOD, impl_getRowDescription, "getRowDescription",
- "i,row,i:s,,o"},
- {DROUTE_METHOD, impl_getColumnDescription, "getColumnDescription",
- "i,column,i:s,,o"},
- {DROUTE_METHOD, impl_getRowExtentAt, "getRowExtentAt",
- "i,row,i:i,column,i:i,,o"},
- {DROUTE_METHOD, impl_getColumnExtentAt, "getColumnExtentAt",
- "i,row,i:i,column,i:i,,o"},
- {DROUTE_METHOD, impl_getRowHeader, "getRowHeader", "i,row,i:o,,o"},
- {DROUTE_METHOD, impl_getColumnHeader, "getColumnHeader", "i,column,i:o,,o"},
- {DROUTE_METHOD, impl_getSelectedRows, "getSelectedRows", "ai,,o"},
- {DROUTE_METHOD, impl_getSelectedColumns, "getSelectedColumns", "ai,,o"},
- {DROUTE_METHOD, impl_isRowSelected, "isRowSelected", "i,row,i:b,,o"},
- {DROUTE_METHOD, impl_isColumnSelected, "isColumnSelected",
- "i,column,i:b,,o"},
- {DROUTE_METHOD, impl_isSelected, "isSelected", "i,row,i:i,column,i:b,,o"},
- {DROUTE_METHOD, impl_addRowSelection, "addRowSelection", "i,row,i:b,,o"},
- {DROUTE_METHOD, impl_addColumnSelection, "addColumnSelection",
- "i,column,i:b,,o"},
- {DROUTE_METHOD, impl_removeRowSelection, "removeRowSelection",
- "i,row,i:b,,o"},
- {DROUTE_METHOD, impl_removeColumnSelection, "removeColumnSelection",
- "i,column,i:b,,o"},
- {DROUTE_METHOD, impl_getRowColumnExtentsAtIndex,
- "getRowColumnExtentsAtIndex",
- "i,index,i:i,row,o:i,col,o:i,row_extents,o:i,col_extents,o:b,is_selected,o:b,,o"},
- {0, NULL, NULL, NULL}
+ {impl_getAccessibleAt, "getAccessibleAt"},
+ {impl_getIndexAt, "getIndexAt"},
+ {impl_getRowAtIndex, "getRowAtIndex"},
+ {impl_getColumnAtIndex, "getColumnAtIndex"},
+ {impl_getRowDescription, "getRowDescription"},
+ {impl_getColumnDescription, "getColumnDescription"},
+ {impl_getRowExtentAt, "getRowExtentAt"},
+ {impl_getColumnExtentAt, "getColumnExtentAt"},
+ {impl_getRowHeader, "getRowHeader"},
+ {impl_getColumnHeader, "getColumnHeader"},
+ {impl_getSelectedRows, "getSelectedRows"},
+ {impl_getSelectedColumns, "getSelectedColumns"},
+ {impl_isRowSelected, "isRowSelected"},
+ {impl_isColumnSelected, "isColumnSelected"},
+ {impl_isSelected, "isSelected"},
+ {impl_addRowSelection, "addRowSelection"},
+ {impl_addColumnSelection, "addColumnSelection"},
+ {impl_removeRowSelection, "removeRowSelection"},
+ {impl_removeColumnSelection, "removeColumnSelection"},
+ {impl_getRowColumnExtentsAtIndex, "getRowColumnExtentsAtIndex"},
+ {NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_nRows, impl_get_nRows_str, NULL, NULL, "nRows", "i"},
- {impl_get_nColumns, impl_get_nColumns_str, NULL, NULL, "nColumns", "i"},
- {impl_get_caption, impl_get_caption_str, NULL, NULL, "caption", "o"},
- {impl_get_summary, impl_get_summary_str, NULL, NULL, "summary", "o"},
- {impl_get_nSelectedRows, impl_get_nSelectedRows_str, NULL, NULL,
- "nSelectedRows", "i"},
- {impl_get_nSelectedColumns, impl_get_nSelectedColumns_str, NULL, NULL,
- "nSelectedColumns", "i"},
- {NULL, NULL, NULL, NULL, NULL, NULL}
+ {impl_get_nRows, NULL, "nRows"},
+ {impl_get_nColumns, NULL, "nColumns"},
+ {impl_get_caption, NULL, "caption"},
+ {impl_get_summary, NULL, "summary"},
+ {impl_get_nSelectedRows, NULL, "nSelectedRows"},
+ {impl_get_nSelectedColumns, NULL, "nSelectedColumns"},
+ {NULL, NULL, NULL}
};
void
return droute_return_v_int32 (iter, atk_text_get_character_count (text));
}
-static char *
-impl_get_characterCount_str (void *datum)
-{
- g_assert (ATK_IS_TEXT (datum));
-
- return g_strdup_printf ("%d",
- atk_text_get_character_count ((AtkText *) datum));
-}
-
static dbus_bool_t
impl_get_caretOffset (const char *path, DBusMessageIter * iter,
void *user_data)
return droute_return_v_int32 (iter, atk_text_get_caret_offset (text));
}
-static char *
-impl_get_caretOffset_str (void *datum)
-{
- g_assert (ATK_IS_TEXT (datum));
-
- return g_strdup_printf ("%d",
- atk_text_get_caret_offset ((AtkText *) datum));
-}
-
static DBusMessage *
impl_getText (DBusConnection * bus, DBusMessage * message, void *user_data)
{
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getText, "getText",
- "i,startOffset,i:i,endOffset,i:s,,o"},
- {DROUTE_METHOD, impl_setCaretOffset, "setCaretOffset", "i,offset,i:b,,o"},
- {DROUTE_METHOD, impl_getTextBeforeOffset, "getTextBeforeOffset",
- "i,offset,i:u,type,i:i,startOffset,o:i,endOffset,o:s,,o"},
- {DROUTE_METHOD, impl_getTextAtOffset, "getTextAtOffset",
- "i,offset,i:u,type,i:i,startOffset,o:i,endOffset,o:s,,o"},
- {DROUTE_METHOD, impl_getTextAfterOffset, "getTextAfterOffset",
- "i,offset,i:u,type,i:i,startOffset,o:i,endOffset,o:s,,o"},
- {DROUTE_METHOD, impl_getAttributeValue, "getAttributeValue",
- "i,offset,i:s,attributeName,i:i,startOffset,o:i,endOffset,o:b,defined,o:s,,o"},
- {DROUTE_METHOD, impl_getAttributes, "getAttributes",
- "i,offset,i:i,startOffset,o:i,endOffset,o:s,,o"},
- {DROUTE_METHOD, impl_getDefaultAttributes, "getDefaultAttributes", "s,,o"},
- {DROUTE_METHOD, impl_getCharacterExtents, "getCharacterExtents",
- "i,offset,i:i,x,o:i,y,o:i,width,o:i,height,o:u,coordType,i"},
- {DROUTE_METHOD, impl_getOffsetAtPoint, "getOffsetAtPoint",
- "i,x,i:i,y,i:u,coordType,i:i,,o"},
- {DROUTE_METHOD, impl_getNSelections, "getNSelections", "i,,o"},
- {DROUTE_METHOD, impl_getSelection, "getSelection",
- "i,selectionNum,i:i,startOffset,o:i,endOffset,o"},
- {DROUTE_METHOD, impl_addSelection, "addSelection",
- "i,startOffset,i:i,endOffset,i:b,,o"},
- {DROUTE_METHOD, impl_removeSelection, "removeSelection",
- "i,selectionNum,i:b,,o"},
- {DROUTE_METHOD, impl_setSelection, "setSelection",
- "i,selectionNum,i:i,startOffset,i:i,endOffset,i:b,,o"},
- {DROUTE_METHOD, impl_getRangeExtents, "getRangeExtents",
- "i,startOffset,i:i,endOffset,i:i,x,o:i,y,o:i,width,o:i,height,o:u,coordType,i"},
- {DROUTE_METHOD, impl_getBoundedRanges, "getBoundedRanges",
- "i,x,i:i,y,i:i,width,i:i,height,i:u,coordType,i:u,xClipType,i:u,yClipType,i:a(iisv),,o"},
- {DROUTE_METHOD, impl_getAttributeRun, "getAttributeRun",
- "i,offset,i:i,startOffset,o:i,endOffset,o:b,includeDefaults,i:as,,o"},
- {DROUTE_METHOD, impl_getDefaultAttributeSet, "getDefaultAttributeSet",
- "as,,o"},
- {0, NULL, NULL, NULL}
+ {impl_getText, "getText"},
+ {impl_setCaretOffset, "setCaretOffset"},
+ {impl_getTextBeforeOffset, "getTextBeforeOffset"},
+ {impl_getTextAtOffset, "getTextAtOffset"},
+ {impl_getTextAfterOffset, "getTextAfterOffset"},
+ {impl_getAttributeValue, "getAttributeValue"},
+ {impl_getAttributes, "getAttributes"},
+ {impl_getDefaultAttributes, "getDefaultAttributes"},
+ {impl_getCharacterExtents, "getCharacterExtents"},
+ {impl_getOffsetAtPoint, "getOffsetAtPoint"},
+ {impl_getNSelections, "getNSelections"},
+ {impl_getSelection, "getSelection"},
+ {impl_addSelection, "addSelection"},
+ {impl_removeSelection, "removeSelection"},
+ {impl_setSelection, "setSelection"},
+ {impl_getRangeExtents, "getRangeExtents"},
+ {impl_getBoundedRanges, "getBoundedRanges"},
+ {impl_getAttributeRun, "getAttributeRun"},
+ {impl_getDefaultAttributeSet, "getDefaultAttributeSet"},
+ {NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_characterCount, impl_get_characterCount_str, NULL, NULL,
- "characterCount", "i"},
- {impl_get_caretOffset, impl_get_caretOffset_str, NULL, NULL, "caretOffset",
- "i"},
- {NULL, NULL, NULL, NULL, NULL, NULL}
+ {impl_get_characterCount, NULL, "characterCount"},
+ {impl_get_caretOffset, NULL, "caretOffset"},
+ {NULL, NULL, NULL}
};
void
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getRoot, "getRoot", "o,root,o" },
- {DROUTE_METHOD, impl_getTree, "getTree", "a(ooaoassus),tree,o", TRUE},
- {0, NULL, NULL, NULL}
+ {impl_getRoot, "getRoot"},
+ {impl_getTree, "getTree", TRUE},
+ {NULL, NULL}
};
void
return droute_return_v_double (iter, get_double_from_gvalue (&gvalue));
}
-static char *
-impl_get_minimumValue_str (void *datum)
-{
- AtkValue *value = (AtkValue *) datum;
- GValue gvalue = { 0, };
- if (!value)
- return FALSE;
- atk_value_get_minimum_value (value, &gvalue);
- return g_strdup_printf ("%lf", get_double_from_gvalue (&gvalue));
-}
-
static dbus_bool_t
impl_get_maximumValue (const char *path, DBusMessageIter * iter,
void *user_data)
return droute_return_v_double (iter, get_double_from_gvalue (&gvalue));
}
-static char *
-impl_get_maximumValue_str (void *datum)
-{
- AtkValue *value = (AtkValue *) datum;
- GValue gvalue = { 0, };
- if (!value)
- return FALSE;
- atk_value_get_maximum_value (value, &gvalue);
- return g_strdup_printf ("%lf", get_double_from_gvalue (&gvalue));
-}
-
static dbus_bool_t
impl_get_minimumIncrement (const char *path, DBusMessageIter * iter,
void *user_data)
return droute_return_v_double (iter, get_double_from_gvalue (&gvalue));
}
-static char *
-impl_get_minimumIncrement_str (void *datum)
-{
- AtkValue *value = (AtkValue *) datum;
- GValue gvalue = { 0, };
- if (!value)
- return FALSE;
- atk_value_get_minimum_value (value, &gvalue);
- return g_strdup_printf ("%lf", get_double_from_gvalue (&gvalue));
-}
-
static dbus_bool_t
impl_get_currentValue (const char *path, DBusMessageIter * iter,
void *user_data)
return droute_return_v_double (iter, get_double_from_gvalue (&gvalue));
}
-static char *
-impl_get_currentValue_str (void *datum)
-{
- AtkValue *value = (AtkValue *) datum;
- GValue gvalue = { 0, };
- if (!value)
- return FALSE;
- atk_value_get_current_value (value, &gvalue);
- return g_strdup_printf ("%lf", get_double_from_gvalue (&gvalue));
-}
-
static dbus_bool_t
impl_set_currentValue (const char *path, DBusMessageIter * iter,
void *user_data)
}
static DRouteProperty properties[] = {
- {impl_get_minimumValue, impl_get_minimumValue_str, NULL, NULL,
- "minimumValue", "d"},
- {impl_get_maximumValue, impl_get_maximumValue_str, NULL, NULL,
- "maximumValue", "d"},
- {impl_get_minimumIncrement, impl_get_minimumIncrement_str, NULL, NULL,
- "minimumIncrement", "d"},
- {impl_get_currentValue, impl_get_currentValue_str, impl_set_currentValue,
- NULL, "currentValue", "d"},
- {NULL, NULL, NULL, NULL, NULL, NULL}
+ {impl_get_minimumValue, NULL, "minimumValue"},
+ {impl_get_maximumValue, NULL, "maximumValue"},
+ {impl_get_minimumIncrement, NULL, "minimumIncrement"},
+ {impl_get_currentValue, impl_set_currentValue, "currentValue"},
+ {NULL, NULL, NULL}
};
void