1 #ifndef ACCESSIBLE_UTILS_H
2 #define ACCESSIBLE_UTILS_H
4 #include <atspi/atspi.h>
17 void operator()(gpointer ptr)
const
19 if (ptr) g_object_unref(ptr);
28 void operator()(GArray *ptr)
const
30 if (ptr) g_array_free(ptr, 1);
39 using unique_ptr_gobj = std::unique_ptr<T, GobjDeletor>;
46 using unique_ptr_garray = std::unique_ptr<T, GarrayDeletor>;
53 unique_ptr_gobj<T> make_gobj_unique(T *ptr)
55 return unique_ptr_gobj<T>(ptr);
63 unique_ptr_garray<T> make_garray_unique(T *ptr)
65 return unique_ptr_garray<T>(ptr);
73 unique_ptr_gobj<T> make_gobj_ref_unique(T *ptr)
76 return unique_ptr_gobj<T>(ptr);
83 char *state_to_char(AtspiStateType state);