{
Evas_Object *lb = elm_label_add(win);
elm_object_text_set(lb,
- "<b>Use Tab and Shift+Tab</b>"
+ "<b>Use Tab, Shift+Tab, and<br>"
+ "Arrow Keys</b>"
);
evas_object_size_hint_weight_set(lb, 0.0, 0.0);
evas_object_size_hint_align_set(lb, EVAS_HINT_FILL,
"}\n";
static const char fragment_shader[] =
+ "#ifdef GL_ES\n"
"precision mediump float;\n"
+ "#endif\n"
"uniform vec4 color;\n"
"uniform vec3 light;\n"
"varying vec3 rotated_normal;\n"
elm_glview_init_func_set(gl, _init_gl);
elm_glview_del_func_set(gl, _del_gl);
elm_glview_resize_func_set(gl, _resize_gl);
- elm_glview_render_func_set(gl, (Elm_GLView_Func)_draw_gl);
+ elm_glview_render_func_set(gl, (Elm_GLView_Func_Cb)_draw_gl);
elm_box_pack_end(bx, gl);
evas_object_show(gl);
char* info_log = malloc(sizeof(char) * info_len);
gl->glGetShaderInfoLog(shader, info_len, NULL, info_log);
- printf("Error compiling shader:\n%s\n", info_log );
+ printf("Error compiling shader:\n%s\n======\n%s\n======\n", info_log, shader_src );
free(info_log);
}
gl->glDeleteShader(shader);
"} \n";
GLbyte fShaderStr[] =
- "precision mediump float;\n"\
+ "#ifdef GL_ES \n"
+ "precision mediump float; \n"
+ "#endif \n"
"void main() \n"
"{ \n"
" gl_FragColor = vec4 ( 1.0, 0.0, 0.0, 1.0 );\n"
evas_object_size_hint_min_set(bg, 160, 160);
evas_object_size_hint_max_set(bg, 640, 640);
- evas_object_resize(win, 320, 320);
+ evas_object_resize(win, 440, 440);
evas_object_show(win);
}
evas_object_size_hint_min_set(bg, 160, 160);
evas_object_size_hint_max_set(bg, 640, 640);
- evas_object_resize(win, 320, 320);
+ evas_object_resize(win, 440, 440);
evas_object_show(win);
}
#endif
evas_object_show(bx);
bt = elm_hoversel_add(win);
+// FIXME: need to add horizontal hoversel theme to default some day
+// elm_hoversel_horizontal_set(bt, 1);
elm_hoversel_hover_parent_set(bt, win);
elm_object_text_set(bt, "Labels");
elm_hoversel_item_add(bt, "Item 1", NULL, ELM_ICON_NONE, NULL, NULL);
elm_box_pack_end(bx, lb);
evas_object_show(lb);
- elm_win_resize_object_add(win, bx);
- evas_object_show(bx);
-
evas_object_resize(win, 320, 300);
+ evas_object_show(bx);
evas_object_show(win);
+ elm_win_resize_object_add(win, bx);
}
#endif
map_track_add(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *fs, *bg, *vbox, *hbox, *sep;
- const char *path = NULL;
fs_win = elm_win_add(NULL, "fileselector", ELM_WIN_BASIC);
elm_win_title_set(fs_win, "File Selector");
fs = elm_fileselector_add(fs_win);
elm_fileselector_is_save_set(fs, EINA_TRUE);
elm_fileselector_expandable_set(fs, EINA_FALSE);
- path = getenv("HOME");
- if (!path) path = "./";
- elm_fileselector_path_set(fs, path);
+ elm_fileselector_path_set(fs, getenv("HOME"));
evas_object_size_hint_weight_set(fs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(fs, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(vbox, fs);
static void
_populate_1(Evas_Object *win, Elm_Menu_Item *item)
{
- Elm_Menu_Item *item2, *item3;
+ Elm_Menu_Item *item2;
Evas_Object *radio;
radio = elm_radio_add(win);
elm_radio_value_set(radio, 0);
elm_object_text_set(radio, "radio in menu");
item2 = elm_menu_item_add(menu, item, "object-rotate-left", "menu 1", NULL, NULL);
- item3 = elm_menu_item_add_object(menu, item, radio, NULL, NULL);
+ elm_menu_item_add_object(menu, item, radio, NULL, NULL);
_populate_2(item2);
}
lb = elm_label_add(win);
elm_object_text_set(lb,
- "This is page 1 in a pager stack.<br>"
- "<br>"
- "So what is a pager stack? It is a stack<br>"
- "of pages that hold widgets in it. The<br>"
- "pages can be pushed and popped on and<br>"
- "off the stack, activated and otherwise<br>"
- "activated if already in the stack<br>"
- "(activated means promoted to the top of<br>"
- "the stack).<br>"
- "<br>"
- "The theme may define the animation how<br>"
- "show and hide of pages. Select one theme style:");
+ "This is page 1 in a pager stack.<br>"
+ "<br>"
+ "So what is a pager stack? It is a stack<br>"
+ "of pages that hold widgets in it. The<br>"
+ "pages can be pushed and popped on and<br>"
+ "off the stack, activated and otherwise<br>"
+ "activated if already in the stack<br>"
+ "(activated means promoted to the top of<br>"
+ "the stack).<br>"
+ "<br>"
+ "The theme may define the animation how<br>"
+ "show and hide of pages. Select one theme style:");
elm_box_pack_end(bx, lb);
evas_object_show(lb);
lb = elm_label_add(win);
elm_object_text_set(lb,
- "This is page 2 in a pager stack.<br>"
- "<br>"
- "This is just like the previous page in<br>"
- "the pager stack."
- );
+ "This is page 2 in a pager stack.<br>"
+ "<br>"
+ "This is just like the previous page in<br>"
+ "the pager stack."
+ );
elm_box_pack_end(bx, lb);
evas_object_show(lb);
lb = elm_label_add(win);
elm_object_text_set(lb,
- "This is page 3 in a pager stack.<br>"
- "<br>"
- "This is just like the previous page in<br>"
- "the pager stack.");
+ "This is page 3 in a pager stack.<br>"
+ "<br>"
+ "This is just like the previous page in<br>"
+ "the pager stack.");
elm_box_pack_end(bx, lb);
evas_object_show(lb);
//elm_win_resize_object_add(win, ly2);
evas_object_show(ly2);
-
-
-
bt = elm_button_add(win);
elm_object_text_set(bt, "Flip to 1");
evas_object_smart_callback_add(bt, "clicked", my_pager_4, &info);
}
void
+_hide_finished(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ //To prevent the window size become zero.
+ Pginfo *info = data;
+ if (elm_pager_content_top_get(info->pager)) return;
+ elm_win_resize_object_del(info->win, info->pager);
+}
+
+void
test_pager_slide(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *pg, *bx, *lb, *bt;
pg = elm_pager_add(win);
elm_win_resize_object_add(win, pg);
+ evas_object_smart_callback_add(pg, "hide,finished",
+ _hide_finished, &info);
elm_object_style_set(pg, "slide");
evas_object_show(pg);
info.pager = pg;
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bx);
lb = elm_label_add(win);
elm_object_text_set(lb,
- "This is page 1 in a slide pager.<br>"
- "<br>"
- "The slide pager style is useful for browsing<br>"
- "a hierarchy of objects, as it makes clear<br>"
- "the direction of the browse.<br>"
- "This is the 'slide' style, also available<br>"
- "a fully transparent style named 'slide_invisble'.<br>"
- "<br>");
+ "This is page 1 in a slide pager.<br>"
+ "<br>"
+ "The slide pager style is useful for browsing<br>"
+ "a hierarchy of objects, as it makes clear<br>"
+ "the direction of the browse.<br>"
+ "This is the 'slide' style, also available<br>"
+ "a fully transparent style named 'slide_invisble'.<br>"
+ "<br>");
elm_box_pack_end(bx, lb);
evas_object_show(lb);