Does anybody know why the (Circle) UI Components / src / index.c works at all?

Does anybody know why the (Circle) UI Components / src / index.c works at all?

BY 09 Mar 2017 Native Application Development

File in question is https://developer.tizen.org/development/sample/native/UI/%28Circle%29_UI_Components/src/index.c. This file is part of the Circle UI component from here: https://developer.tizen.org/development/sample/native/UI/%28Circle%29_UI_Components.

I’m especially interested in the

_create_view_layout

function, especially this part:

    /* Create Pages */
	if (even_num)
		max_items = NUM_INDEX_CIRCLE_EVEN;
	else
		max_items = NUM_ITEMS;
	for (i = 0; i < max_items; ++i)
	{
		page_layout = elm_layout_add(box);
		pd->page_layout[i] = page_layout;
		evas_object_size_hint_weight_set(page_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
		evas_object_size_hint_align_set(page_layout, 0, EVAS_HINT_FILL);
		elm_layout_theme_set(page_layout, "layout", "body_thumbnail", "default");
		evas_object_show(page_layout);
 
		img = elm_image_add(page_layout);
		snprintf(img_path, sizeof(img_path), "%s/100_%d.jpg", ICON_DIR, (i % 6) + 1);
		elm_image_file_set(img, img_path, NULL);
		elm_object_part_content_set(page_layout, "elm.icon", img);
 
		/* Make unselect state all of the pages except first one */
		if (i)
			elm_object_signal_emit(page_layout, "elm,state,thumbnail,unselect", "elm");
 
		elm_box_pack_end(box, page_layout);
	}

How does it work? Why does it work?

The documentation has nothing on “body_thumbnail/default” theme.

The documentation also has nothing on “elm,state,thumbnail,unselect” signal.

The entire sample project does not have anything that handles this signal, so it must be done internally. But by who? And what is that signal supposed to do? Why does this code work at all? (I tried the code – it indeed works).

 

I mean this is an example project, so it is meant to teach us. Why does an example uses an undocumented code which we can’t even learn from ???
 

Written by