summaryrefslogtreecommitdiff
path: root/atspi/atspi-collection.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2022-12-06 20:44:48 -0600
committerFederico Mena Quintero <federico@gnome.org>2022-12-06 20:50:13 -0600
commitb10fcf21b1ef49dd3d6297ac657434ece3b23578 (patch)
treed560f8449f3ae75fea343887dcb6d5f4df7b434c /atspi/atspi-collection.c
parentbf4d71a38b970699f63ce7b701e9bf4c9d31f717 (diff)
downloadat-spi2-core-b10fcf21b1ef49dd3d6297ac657434ece3b23578.tar.gz
Reformat all the *.[ch] files with clang-format
I ran this on each directory with C files: clang-format -i *.[ch] "-i" is the in-place option. I also adjusted the order of #includes for some files which failed to build after that: Clang-format reorders blocks of #include directives alphabetically, but they can be grouped and separated by blank lines. If there is a blank line between blocks, like #include "zork.h" #include "bar.h" #include "foo.h" then it will not put zork.h after the other two. The last two header files will be sorted alphabetically. We can adjust the formatting of chunks of code by hand with comments like these: /* clang-format off */ this code { is, formatted, by, hand; } /* clang-format on */ See https://clang.llvm.org/docs/ClangFormat.html for the general manual and https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the style options and the comments described above.
Diffstat (limited to 'atspi/atspi-collection.c')
-rw-r--r--atspi/atspi-collection.c79
1 files changed, 39 insertions, 40 deletions
diff --git a/atspi/atspi-collection.c b/atspi/atspi-collection.c
index caf335be..a21810b7 100644
--- a/atspi/atspi-collection.c
+++ b/atspi/atspi-collection.c
@@ -85,7 +85,7 @@ append_accessible (DBusMessage *message, AtspiAccessible *accessible)
dbus_message_iter_init_append (message, &iter);
dbus_message_iter_append_basic (&iter, DBUS_TYPE_OBJECT_PATH,
&accessible->parent.path);
- return TRUE; /* TODO: Check for out-of-memory */
+ return TRUE; /* TODO: Check for out-of-memory */
}
static GArray *
@@ -100,12 +100,12 @@ return_accessibles (DBusMessage *message)
dbus_message_iter_recurse (&iter, &iter_array);
while (dbus_message_iter_get_arg_type (&iter_array) != DBUS_TYPE_INVALID)
- {
- AtspiAccessible *accessible;
- accessible = _atspi_dbus_consume_accessible (&iter_array);
- ret = g_array_append_val (ret, accessible);
- /* Iter was moved already, so no need to call dbus_message_iter_next */
- }
+ {
+ AtspiAccessible *accessible;
+ accessible = _atspi_dbus_consume_accessible (&iter_array);
+ ret = g_array_append_val (ret, accessible);
+ /* Iter was moved already, so no need to call dbus_message_iter_next */
+ }
dbus_message_unref (message);
return ret;
}
@@ -120,9 +120,9 @@ return_accessibles (DBusMessage *message)
* @traverse: Not supported.
*
* Gets all #AtspiAccessible objects from the @collection matching a given
- * @rule.
+ * @rule.
*
- * Returns: (element-type AtspiAccessible*) (transfer full): All
+ * Returns: (element-type AtspiAccessible*) (transfer full): All
* #AtspiAccessible objects matching the given match rule.
**/
GArray *
@@ -170,8 +170,8 @@ atspi_collection_get_matches (AtspiCollection *collection,
* @count: The maximum number of results to return, or 0 for no limit.
* @traverse: Not supported.
*
- * Gets all #AtspiAccessible objects from the @collection, after
- * @current_object, matching a given @rule.
+ * Gets all #AtspiAccessible objects from the @collection, after
+ * @current_object, matching a given @rule.
*
* Returns: (element-type AtspiAccessible*) (transfer full): All
* #AtspiAccessible objects matching the given match rule after
@@ -179,14 +179,14 @@ atspi_collection_get_matches (AtspiCollection *collection,
**/
GArray *
atspi_collection_get_matches_to (AtspiCollection *collection,
- AtspiAccessible *current_object,
- AtspiMatchRule *rule,
- AtspiCollectionSortOrder sortby,
- AtspiCollectionTreeTraversalType tree,
- gboolean limit_scope,
- gint count,
- gboolean traverse,
- GError **error)
+ AtspiAccessible *current_object,
+ AtspiMatchRule *rule,
+ AtspiCollectionSortOrder sortby,
+ AtspiCollectionTreeTraversalType tree,
+ gboolean limit_scope,
+ gint count,
+ gboolean traverse,
+ GError **error)
{
DBusMessage *message = new_message (collection, "GetMatchesTo");
DBusMessage *reply;
@@ -204,7 +204,7 @@ atspi_collection_get_matches_to (AtspiCollection *collection,
if (!append_match_rule (message, rule))
return NULL;
dbus_message_append_args (message, DBUS_TYPE_UINT32, &d_sortby,
- DBUS_TYPE_UINT32, &d_tree,
+ DBUS_TYPE_UINT32, &d_tree,
DBUS_TYPE_BOOLEAN, &d_limit_scope,
DBUS_TYPE_INT32, &d_count,
DBUS_TYPE_BOOLEAN, &d_traverse,
@@ -227,22 +227,22 @@ atspi_collection_get_matches_to (AtspiCollection *collection,
* @count: The maximum number of results to return, or 0 for no limit.
* @traverse: Not supported.
*
- * Gets all #AtspiAccessible objects from the @collection, before
- * @current_object, matching a given @rule.
+ * Gets all #AtspiAccessible objects from the @collection, before
+ * @current_object, matching a given @rule.
*
- * Returns: (element-type AtspiAccessible*) (transfer full): All
+ * Returns: (element-type AtspiAccessible*) (transfer full): All
* #AtspiAccessible objects matching the given match rule that preceed
* @current_object.
**/
GArray *
atspi_collection_get_matches_from (AtspiCollection *collection,
- AtspiAccessible *current_object,
- AtspiMatchRule *rule,
- AtspiCollectionSortOrder sortby,
- AtspiCollectionTreeTraversalType tree,
- gint count,
- gboolean traverse,
- GError **error)
+ AtspiAccessible *current_object,
+ AtspiMatchRule *rule,
+ AtspiCollectionSortOrder sortby,
+ AtspiCollectionTreeTraversalType tree,
+ gint count,
+ gboolean traverse,
+ GError **error)
{
DBusMessage *message = new_message (collection, "GetMatchesFrom");
DBusMessage *reply;
@@ -272,7 +272,7 @@ atspi_collection_get_matches_from (AtspiCollection *collection,
/**
* atspi_collection_get_active_descendant:
*
-* Returns: (transfer full): The active descendant of the given object.
+ * Returns: (transfer full): The active descendant of the given object.
* Not yet implemented.
**/
AtspiAccessible *
@@ -292,16 +292,15 @@ atspi_collection_get_type (void)
{
static GType type = 0;
- if (!type) {
- static const GTypeInfo tinfo =
+ if (!type)
{
- sizeof (AtspiCollection),
- (GBaseInitFunc) atspi_collection_base_init,
- (GBaseFinalizeFunc) NULL,
- };
-
- type = g_type_register_static (G_TYPE_INTERFACE, "AtspiCollection", &tinfo, 0);
+ static const GTypeInfo tinfo = {
+ sizeof (AtspiCollection),
+ (GBaseInitFunc) atspi_collection_base_init,
+ (GBaseFinalizeFunc) NULL,
+ };
- }
+ type = g_type_register_static (G_TYPE_INTERFACE, "AtspiCollection", &tinfo, 0);
+ }
return type;
}