void
_do_test(AtkObject *obj)
{
   const char *type_name = g_type_name(G_TYPE_FROM_INSTANCE(obj));

   g_assert(ATK_IS_OBJECT(obj));
   g_assert_cmpstr(type_name, ==, "EailFlipselector");

   g_assert(atk_object_get_n_accessible_children(obj) == ITEMS_COUNT);

   /*
    * AtkSelection tests
    */
   g_assert(ATK_IS_SELECTION(obj));

   /* atk_selection_add_selection test */
   g_assert(atk_selection_add_selection(ATK_SELECTION(obj), ITEM_SEL_EINA));
   g_assert(atk_selection_is_child_selected(ATK_SELECTION(obj), ITEM_SEL_EINA));

   /* atk_selection_clear_selection test */
   g_assert(atk_selection_clear_selection(ATK_SELECTION(obj)) == FALSE);

   /* eail_flipselector_ref_selection test */
   g_assert(atk_selection_is_child_selected(ATK_SELECTION(obj), ITEM_SEL_EINA));

   /* atk_selection_get_selection_count test */
   g_assert(atk_selection_get_selection_count(ATK_SELECTION(obj)) == MAX_SELECTIONS);

   /* atk_selection_is_child_selected test */
   g_assert(atk_selection_is_child_selected(ATK_SELECTION(obj), ITEM_SEL_EINA));

   /* atk_selection_remove_selection test */
   g_assert(atk_selection_remove_selection(ATK_SELECTION(obj), ITEM_SEL_EINA));
   g_assert(atk_selection_is_child_selected(ATK_SELECTION(obj), ITEM_SEL_ELM));

   /* atk_selection_select_all_selection test */
   g_assert(atk_selection_select_all_selection(ATK_SELECTION(obj)) == FALSE);

   /*
    * AtkAction tests
    */
   g_assert(ATK_IS_ACTION(obj));

   /* atk_action_get_n_actions test */
   g_assert(atk_action_get_n_actions(ATK_ACTION(obj)) == ACTIONS_COUNT);

   /* test existing actions */
   g_assert(atk_selection_add_selection(ATK_SELECTION(obj), ITEM_SEL_EINA));
   eailu_test_action_activate(ATK_ACTION(obj), "next");
   g_assert(atk_selection_is_child_selected(ATK_SELECTION(obj), ITEM_SEL_EDJE));

   eailu_test_action_activate(ATK_ACTION(obj), "prev");
   g_assert(atk_selection_is_child_selected(ATK_SELECTION(obj), ITEM_SEL_EINA));

   /* test for non-existing action */
   g_assert((eailu_get_action_number(ATK_ACTION(obj), "typo")) == -1);

   /* test set/get action description */
   eailu_test_action_description_all(ATK_ACTION(obj));
}
示例#2
0
JNIEXPORT jboolean JNICALL
Java_org_gnome_atk_AtkSelection_atk_1selection_1remove_1selection
(
	JNIEnv* env,
	jclass cls,
	jlong _self,
	jint _i
)
{
	gboolean result;
	jboolean _result;
	AtkSelection* self;
	gint i;

	// convert parameter self
	self = (AtkSelection*) _self;

	// convert parameter i
	i = (gint) _i;

	// call function
	result = atk_selection_remove_selection(self, i);

	// cleanup parameter self

	// cleanup parameter i

	// translate return value to JNI type
	_result = (jboolean) result;

	// and finally
	return _result;
}