mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
gail/tests: Use const instead G_CONST_RETURN
This commit is contained in:
parent
5e2b5680a4
commit
15a914202d
@ -618,14 +618,14 @@ static gint
|
||||
_print_object (AtkObject *aobject)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
G_CONST_RETURN gchar * parent_name = NULL;
|
||||
G_CONST_RETURN gchar * name = NULL;
|
||||
G_CONST_RETURN gchar * description = NULL;
|
||||
G_CONST_RETURN gchar * typename = NULL;
|
||||
G_CONST_RETURN gchar * parent_typename = NULL;
|
||||
G_CONST_RETURN gchar * role_name = NULL;
|
||||
G_CONST_RETURN gchar * accel_name = NULL;
|
||||
G_CONST_RETURN gchar * text = NULL;
|
||||
const gchar * parent_name = NULL;
|
||||
const gchar * name = NULL;
|
||||
const gchar * description = NULL;
|
||||
const gchar * typename = NULL;
|
||||
const gchar * parent_typename = NULL;
|
||||
const gchar * role_name = NULL;
|
||||
const gchar * accel_name = NULL;
|
||||
const gchar * text = NULL;
|
||||
AtkRole role;
|
||||
AtkObject *parent = NULL;
|
||||
static AtkObject *prev_aobject = NULL;
|
||||
@ -815,8 +815,8 @@ _print_relation (AtkObject *aobject)
|
||||
if (relation_set)
|
||||
{
|
||||
AtkRelation * relation;
|
||||
G_CONST_RETURN gchar * relation_name = NULL;
|
||||
G_CONST_RETURN gchar * relation_obj_name = NULL;
|
||||
const gchar * relation_name = NULL;
|
||||
const gchar * relation_obj_name = NULL;
|
||||
AtkRelationType relation_type;
|
||||
AtkObject *relation_obj;
|
||||
GPtrArray * relation_arry;
|
||||
@ -905,7 +905,7 @@ _print_state (AtkObject *aobject)
|
||||
{
|
||||
gboolean boolean_value;
|
||||
AtkStateType one_state;
|
||||
G_CONST_RETURN gchar *name;
|
||||
const gchar *name;
|
||||
gint i;
|
||||
|
||||
for (i=0; i < sizeof(states_to_track)/sizeof(AtkStateType); i++)
|
||||
@ -930,9 +930,9 @@ _print_state (AtkObject *aobject)
|
||||
static gint
|
||||
_print_action (AtkAction *aobject)
|
||||
{
|
||||
G_CONST_RETURN gchar *action_name;
|
||||
G_CONST_RETURN gchar *action_description;
|
||||
G_CONST_RETURN gchar *action_keybinding;
|
||||
const gchar *action_name;
|
||||
const gchar *action_description;
|
||||
const gchar *action_keybinding;
|
||||
gchar *label_str, *output_str;
|
||||
gint group_num;
|
||||
gint num_actions, j;
|
||||
@ -1029,7 +1029,7 @@ _print_component (AtkComponent *aobject)
|
||||
static gint
|
||||
_print_image (AtkImage *aobject)
|
||||
{
|
||||
G_CONST_RETURN gchar *image_desc;
|
||||
const gchar *image_desc;
|
||||
gchar *output_str;
|
||||
gint x = 0;
|
||||
gint y = 0;
|
||||
@ -1107,7 +1107,7 @@ _print_selection (AtkSelection *aobject)
|
||||
|
||||
for (j = 0; j < n_selected; j++)
|
||||
{
|
||||
G_CONST_RETURN gchar *selected_name;
|
||||
const gchar *selected_name;
|
||||
AtkObject *selected_object;
|
||||
|
||||
selected_object = atk_selection_ref_selection (aobject, j);
|
||||
@ -1129,7 +1129,7 @@ static gint
|
||||
_print_table (AtkTable *aobject)
|
||||
{
|
||||
gchar *label_str, *output_str;
|
||||
G_CONST_RETURN gchar *col_desc;
|
||||
const gchar *col_desc;
|
||||
AtkObject *caption;
|
||||
gint n_cols, n_rows;
|
||||
gint i;
|
||||
@ -1154,7 +1154,7 @@ _print_table (AtkTable *aobject)
|
||||
caption = atk_table_get_caption(aobject);
|
||||
if (caption)
|
||||
{
|
||||
G_CONST_RETURN gchar* caption_name;
|
||||
const gchar* caption_name;
|
||||
|
||||
caption_name = atk_object_get_name (caption);
|
||||
if (caption_name)
|
||||
|
@ -14,8 +14,8 @@ static void _check_object (AtkObject *obj);
|
||||
static void
|
||||
_check_object (AtkObject *obj)
|
||||
{
|
||||
G_CONST_RETURN char *accessible_name;
|
||||
G_CONST_RETURN gchar * typename = NULL;
|
||||
const char *accessible_name;
|
||||
const gchar * typename = NULL;
|
||||
|
||||
if (GTK_IS_ACCESSIBLE (obj))
|
||||
{
|
||||
@ -35,9 +35,9 @@ _check_object (AtkObject *obj)
|
||||
{
|
||||
AtkAction *action = ATK_ACTION (obj);
|
||||
gint n_actions, i;
|
||||
G_CONST_RETURN gchar *action_name;
|
||||
G_CONST_RETURN gchar *action_desc;
|
||||
G_CONST_RETURN gchar *action_binding;
|
||||
const gchar *action_name;
|
||||
const gchar *action_desc;
|
||||
const gchar *action_binding;
|
||||
const gchar *desc = "Test description";
|
||||
|
||||
n_actions = atk_action_get_n_actions (action);
|
||||
|
@ -42,7 +42,7 @@ _check_object (AtkObject *obj)
|
||||
*/
|
||||
{
|
||||
AtkRole valid_roles[NUM_VALID_ROLES];
|
||||
G_CONST_RETURN char *name;
|
||||
const char *name;
|
||||
AtkObject *atk_button;
|
||||
GtkWidget *widget;
|
||||
|
||||
@ -148,7 +148,7 @@ _print_states (AtkObject *obj)
|
||||
for (i = 0; i < 64; i++)
|
||||
{
|
||||
AtkStateType one_state;
|
||||
G_CONST_RETURN gchar *name;
|
||||
const gchar *name;
|
||||
|
||||
if (atk_state_set_contains_state (state_set, i))
|
||||
{
|
||||
@ -168,7 +168,7 @@ static void
|
||||
_print_button_image_info(AtkObject *obj) {
|
||||
|
||||
gint height, width;
|
||||
G_CONST_RETURN gchar *desc;
|
||||
const gchar *desc;
|
||||
|
||||
height = width = 0;
|
||||
|
||||
|
@ -44,7 +44,7 @@ static void _check_children (AtkObject *obj)
|
||||
n_children = atk_object_get_n_accessible_children (child);
|
||||
for (i = 0; i < n_children; i++)
|
||||
{
|
||||
G_CONST_RETURN gchar *name;
|
||||
const gchar *name;
|
||||
|
||||
grand_child = atk_object_ref_accessible_child (child, i);
|
||||
name = atk_object_get_name (grand_child);
|
||||
|
@ -75,9 +75,9 @@ static void
|
||||
_print_image_info(AtkObject *obj) {
|
||||
|
||||
gint height, width;
|
||||
G_CONST_RETURN gchar *desc;
|
||||
G_CONST_RETURN gchar *name = atk_object_get_name (obj);
|
||||
G_CONST_RETURN gchar *type_name = g_type_name(G_TYPE_FROM_INSTANCE (obj));
|
||||
const gchar *desc;
|
||||
const gchar *name = atk_object_get_name (obj);
|
||||
const gchar *type_name = g_type_name(G_TYPE_FROM_INSTANCE (obj));
|
||||
|
||||
height = width = 0;
|
||||
|
||||
|
@ -176,7 +176,7 @@ find_object_by_accessible_name_and_role (AtkObject *obj,
|
||||
AtkObject *child;
|
||||
gint i, j;
|
||||
gint n_children;
|
||||
G_CONST_RETURN gchar *accessible_name;
|
||||
const gchar *accessible_name;
|
||||
|
||||
if (obj == NULL)
|
||||
return NULL;
|
||||
@ -244,7 +244,7 @@ find_object_by_type (AtkObject *obj,
|
||||
gint i;
|
||||
gint n_children;
|
||||
AtkObject *child;
|
||||
G_CONST_RETURN gchar * typename = NULL;
|
||||
const gchar * typename = NULL;
|
||||
|
||||
if (obj == NULL)
|
||||
return NULL;
|
||||
@ -772,7 +772,7 @@ _get_position_in_parameters(gint window,
|
||||
gint position)
|
||||
{
|
||||
gint i;
|
||||
G_CONST_RETURN gchar *label_string;
|
||||
const gchar *label_string;
|
||||
|
||||
for (i = 0; i < MAX_PARAMS; i++)
|
||||
{
|
||||
@ -831,7 +831,7 @@ get_arg_of_func (gint window,
|
||||
gchar *function_name,
|
||||
gchar *arg_label)
|
||||
{
|
||||
G_CONST_RETURN gchar *argString;
|
||||
const gchar *argString;
|
||||
gchar *retString;
|
||||
gint position, paramPosition;
|
||||
|
||||
|
@ -21,7 +21,7 @@ static void
|
||||
_check_object (AtkObject *obj)
|
||||
{
|
||||
AtkRole role;
|
||||
static G_CONST_RETURN char *name = NULL;
|
||||
static const char *name = NULL;
|
||||
static gboolean first_time = TRUE;
|
||||
|
||||
role = atk_object_get_role (obj);
|
||||
@ -71,8 +71,8 @@ _check_object (AtkObject *obj)
|
||||
(role == ATK_ROLE_RADIO_MENU_ITEM) ||
|
||||
(role == ATK_ROLE_TEAR_OFF_MENU_ITEM))
|
||||
{
|
||||
G_CONST_RETURN char *keybinding;
|
||||
G_CONST_RETURN char *accessible_name;
|
||||
const char *keybinding;
|
||||
const char *accessible_name;
|
||||
|
||||
accessible_name = atk_object_get_name (obj);
|
||||
if (accessible_name)
|
||||
@ -99,7 +99,7 @@ _check_object (AtkObject *obj)
|
||||
}
|
||||
else
|
||||
{
|
||||
G_CONST_RETURN char *accessible_name;
|
||||
const char *accessible_name;
|
||||
|
||||
accessible_name = atk_object_get_name (obj);
|
||||
if (accessible_name)
|
||||
|
@ -14,9 +14,9 @@ static gint _remove_page (gpointer data);
|
||||
|
||||
static void _print_type (AtkObject *obj)
|
||||
{
|
||||
G_CONST_RETURN gchar *typename = NULL;
|
||||
G_CONST_RETURN gchar *name = NULL;
|
||||
G_CONST_RETURN gchar *description = NULL;
|
||||
const gchar *typename = NULL;
|
||||
const gchar *name = NULL;
|
||||
const gchar *description = NULL;
|
||||
AtkRole role;
|
||||
|
||||
if (GTK_IS_ACCESSIBLE (obj))
|
||||
|
@ -26,7 +26,7 @@ static void _print_states (AtkObject *obj)
|
||||
for (i = 0; i < 64; i++)
|
||||
{
|
||||
AtkStateType one_state;
|
||||
G_CONST_RETURN gchar *name;
|
||||
const gchar *name;
|
||||
|
||||
if (atk_state_set_contains_state (state_set, i))
|
||||
{
|
||||
@ -44,8 +44,8 @@ static void _print_states (AtkObject *obj)
|
||||
|
||||
static void _print_type (AtkObject *obj)
|
||||
{
|
||||
G_CONST_RETURN gchar * typename = NULL;
|
||||
G_CONST_RETURN gchar * name = NULL;
|
||||
const gchar * typename = NULL;
|
||||
const gchar * name = NULL;
|
||||
AtkRole role;
|
||||
static gboolean in_print_type = FALSE;
|
||||
|
||||
@ -276,7 +276,7 @@ _children_changed (GSignalInvocationHint *ihint,
|
||||
GObject *object;
|
||||
guint index;
|
||||
gpointer target;
|
||||
G_CONST_RETURN gchar *target_name = "NotAtkObject";
|
||||
const gchar *target_name = "NotAtkObject";
|
||||
|
||||
object = g_value_get_object (param_values + 0);
|
||||
index = g_value_get_uint (param_values + 1);
|
||||
|
@ -15,8 +15,8 @@ static gint last_position;
|
||||
static void _property_change_handler (AtkObject *obj,
|
||||
AtkPropertyValues *values)
|
||||
{
|
||||
G_CONST_RETURN gchar *type_name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
|
||||
G_CONST_RETURN gchar *name = atk_object_get_name (obj);
|
||||
const gchar *type_name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
|
||||
const gchar *name = atk_object_get_name (obj);
|
||||
|
||||
g_print ("_property_change_handler: Accessible Type: %s\n",
|
||||
type_name ? type_name : "NULL");
|
||||
|
@ -66,8 +66,8 @@ static void
|
||||
_property_change_handler (AtkObject *obj,
|
||||
AtkPropertyValues *values)
|
||||
{
|
||||
G_CONST_RETURN gchar *type_name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
|
||||
G_CONST_RETURN gchar *name = atk_object_get_name (obj);
|
||||
const gchar *type_name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
|
||||
const gchar *name = atk_object_get_name (obj);
|
||||
|
||||
g_print ("_property_change_handler: Accessible Type: %s\n",
|
||||
type_name ? type_name : "NULL");
|
||||
|
@ -49,8 +49,8 @@ _find_object (AtkObject *obj,
|
||||
|
||||
static void _print_type (AtkObject *obj)
|
||||
{
|
||||
G_CONST_RETURN gchar * typename = NULL;
|
||||
G_CONST_RETURN gchar * name = NULL;
|
||||
const gchar * typename = NULL;
|
||||
const gchar * name = NULL;
|
||||
AtkRole role;
|
||||
|
||||
if (GTK_IS_ACCESSIBLE (obj))
|
||||
|
@ -51,8 +51,8 @@ _find_object (AtkObject *obj,
|
||||
static void _property_change_handler (AtkObject *obj,
|
||||
AtkPropertyValues *values)
|
||||
{
|
||||
G_CONST_RETURN gchar *type_name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
|
||||
G_CONST_RETURN gchar *name = atk_object_get_name (obj);
|
||||
const gchar *type_name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
|
||||
const gchar *name = atk_object_get_name (obj);
|
||||
|
||||
g_print ("_property_change_handler: Accessible Type: %s\n",
|
||||
type_name ? type_name : "NULL");
|
||||
@ -100,7 +100,7 @@ static void
|
||||
_notify_handler (GObject *obj, GParamSpec *pspec)
|
||||
{
|
||||
AtkObject *atk_obj = ATK_OBJECT (obj);
|
||||
G_CONST_RETURN gchar *name;
|
||||
const gchar *name;
|
||||
|
||||
g_print ("_notify_handler: property: %s\n", pspec->name);
|
||||
if (strcmp (pspec->name, "accessible-name") == 0)
|
||||
|
@ -113,8 +113,8 @@ static void choicecb (GtkWidget *widget, gpointer data)
|
||||
static void _check_table (AtkObject *in_obj)
|
||||
{
|
||||
AtkObject *obj = NULL;
|
||||
G_CONST_RETURN char *no_properties;
|
||||
G_CONST_RETURN char *no_gui;
|
||||
const char *no_properties;
|
||||
const char *no_gui;
|
||||
|
||||
no_properties = g_getenv ("TEST_ACCESSIBLE_NO_PROPERTIES");
|
||||
no_gui = g_getenv ("TEST_ACCESSIBLE_NO_GUI");
|
||||
@ -214,7 +214,7 @@ void other_runtest(AtkObject *obj)
|
||||
{
|
||||
AtkObject *header_obj;
|
||||
AtkObject *out_obj;
|
||||
G_CONST_RETURN gchar *out_string;
|
||||
const gchar *out_string;
|
||||
GString *out_desc;
|
||||
gint n_cols, n_rows;
|
||||
gint rows_to_loop = NUM_ROWS_TO_LOOP;
|
||||
@ -918,7 +918,7 @@ nogui_process_child (AtkObject *obj)
|
||||
{
|
||||
AtkAction *action = ATK_ACTION(obj);
|
||||
gint n_actions, i;
|
||||
G_CONST_RETURN gchar *name, *description;
|
||||
const gchar *name, *description;
|
||||
|
||||
n_actions = atk_action_get_n_actions (action);
|
||||
g_print ("Child supports %d actions.\n", n_actions);
|
||||
|
@ -71,7 +71,7 @@ static void _check_text (AtkObject *in_obj)
|
||||
*/
|
||||
else
|
||||
{
|
||||
G_CONST_RETURN gchar *test_accessible_name = g_getenv ("TEST_ACCESSIBLE_NAME");
|
||||
const gchar *test_accessible_name = g_getenv ("TEST_ACCESSIBLE_NAME");
|
||||
|
||||
if (test_accessible_name != NULL)
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ state_change_watch (GSignalInvocationHint *ihint,
|
||||
{
|
||||
GObject *object;
|
||||
gboolean state_set;
|
||||
G_CONST_RETURN gchar *state_name;
|
||||
const gchar *state_name;
|
||||
AtkStateType state_type;
|
||||
|
||||
object = g_value_get_object (param_values + 0);
|
||||
@ -247,7 +247,7 @@ _check_cell_actions (AtkObject *in_obj)
|
||||
|
||||
for (i = 0; i < n_actions; i++)
|
||||
{
|
||||
G_CONST_RETURN gchar* name;
|
||||
const gchar* name;
|
||||
|
||||
name = atk_action_get_name (action, i);
|
||||
g_print ("Action %d is %s\n", i, name);
|
||||
|
@ -13,7 +13,7 @@ static guint id;
|
||||
static void _value_change_handler (AtkObject *obj,
|
||||
AtkPropertyValues *values)
|
||||
{
|
||||
G_CONST_RETURN gchar *type_name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
|
||||
const gchar *type_name = g_type_name (G_TYPE_FROM_INSTANCE (obj));
|
||||
GValue *value_back, val;
|
||||
|
||||
value_back = &val;
|
||||
|
Loading…
Reference in New Issue
Block a user