aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/extantz
diff options
context:
space:
mode:
Diffstat (limited to 'ClientHamr/extantz')
-rw-r--r--ClientHamr/extantz/extantz.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/ClientHamr/extantz/extantz.c b/ClientHamr/extantz/extantz.c
index f05441b..13cb1d8 100644
--- a/ClientHamr/extantz/extantz.c
+++ b/ClientHamr/extantz/extantz.c
@@ -4,6 +4,8 @@
4#define DO_GEARS 0 4#define DO_GEARS 0
5#define USE_EO 0 5#define USE_EO 0
6 6
7int _log_domain = -1;
8
7Eina_Hash *grids; 9Eina_Hash *grids;
8Eina_Hash *viewers; 10Eina_Hash *viewers;
9 11
@@ -955,13 +957,16 @@ static void fill(Evas_Object *win)
955 tb = elm_toolbar_add(win); 957 tb = elm_toolbar_add(win);
956 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0); 958 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0);
957 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL); 959 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
958 evas_object_show(tb); 960 elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_SCROLL);
959 elm_box_pack_end(bx, tb);
960 961
961 // Menu. 962 // Menu.
962 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0); 963 tb_it = elm_toolbar_item_append(tb, NULL, "Menu", NULL, NULL);
963 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL); 964 elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
964 tb_it = elm_toolbar_item_append(tb, NULL, "Menu", NULL, NULL); elm_toolbar_item_menu_set(tb_it, EINA_TRUE); menu = elm_toolbar_item_menu_get(tb_it); 965 // Priority is for when toolbar items are set to hide or menu when there are too many of them. They get hidden or put on the menu based on priority.
966 elm_toolbar_item_priority_set(tb_it, 9999);
967 elm_toolbar_menu_parent_set(tb, win);
968 menu = elm_toolbar_item_menu_get(tb_it);
969
965 elm_menu_item_add(menu, NULL, NULL, "preferences", NULL, NULL); 970 elm_menu_item_add(menu, NULL, NULL, "preferences", NULL, NULL);
966 menu_it = elm_menu_item_add(menu, NULL, NULL, "advanced", NULL, NULL); 971 menu_it = elm_menu_item_add(menu, NULL, NULL, "advanced", NULL, NULL);
967 elm_menu_item_add(menu, menu_it, NULL, "debug settings", NULL, NULL); 972 elm_menu_item_add(menu, menu_it, NULL, "debug settings", NULL, NULL);
@@ -975,7 +980,10 @@ static void fill(Evas_Object *win)
975 elm_menu_item_add(menu, menu_it, NULL, "about extantz", NULL, NULL); 980 elm_menu_item_add(menu, menu_it, NULL, "about extantz", NULL, NULL);
976 elm_menu_item_separator_add(menu, menu_it); 981 elm_menu_item_separator_add(menu, menu_it);
977 elm_menu_item_add(menu, NULL, NULL, "quit", _on_done, win); 982 elm_menu_item_add(menu, NULL, NULL, "quit", _on_done, win);
978 elm_toolbar_menu_parent_set(tb, win); 983
984 // The toolbar needs to be packed into the box AFTER the menus are added.
985 elm_box_pack_end(bx, tb);
986 evas_object_show(tb);
979 987
980 gridList = elm_genlist_add(win); 988 gridList = elm_genlist_add(win);
981 grids = eina_hash_stringshared_new(free); 989 grids = eina_hash_stringshared_new(free);
@@ -1153,7 +1161,9 @@ EAPI_MAIN int elm_main(int argc, char **argv)
1153 GLData *gld = NULL; 1161 GLData *gld = NULL;
1154 char buf[PATH_MAX]; 1162 char buf[PATH_MAX];
1155 int i; 1163 int i;
1156 Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. 1164// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't.
1165
1166 _log_domain = eina_log_domain_register("extantz", NULL);
1157 1167
1158 // If you want efl to handle finding your bin/lib/data dirs, you must do this below. 1168 // If you want efl to handle finding your bin/lib/data dirs, you must do this below.
1159 elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR); 1169 elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
@@ -1175,9 +1185,9 @@ EAPI_MAIN int elm_main(int argc, char **argv)
1175 // Set the engine to opengl_x11 1185 // Set the engine to opengl_x11
1176 if (gld->useEGL) 1186 if (gld->useEGL)
1177 elm_config_preferred_engine_set("opengl_x11"); 1187 elm_config_preferred_engine_set("opengl_x11");
1178 else 1188// else
1179 elm_config_preferred_engine_set("software_x11"); 1189// elm_config_preferred_engine_set("software_x11");
1180 gld->win = elm_win_util_standard_add("extantz", "GLView"); 1190 gld->win = elm_win_add(NULL, "extantz", ELM_WIN_BASIC);
1181 // Set preferred engine back to default from config 1191 // Set preferred engine back to default from config
1182 elm_config_preferred_engine_set(NULL); 1192 elm_config_preferred_engine_set(NULL);
1183 1193
@@ -1207,12 +1217,13 @@ EAPI_MAIN int elm_main(int argc, char **argv)
1207 evas_object_show(gld->bx); 1217 evas_object_show(gld->bx);
1208 1218
1209 win3 = elm_win_add(gld->win, "inlined", ELM_WIN_INLINED_IMAGE); 1219 win3 = elm_win_add(gld->win, "inlined", ELM_WIN_INLINED_IMAGE);
1210 elm_win_title_set(win3, "world manager");
1211 evas_object_event_callback_add(elm_win_inlined_image_object_get(win3), EVAS_CALLBACK_MOUSE_DOWN, _cb_mouse_down_elm, gld); 1220 evas_object_event_callback_add(elm_win_inlined_image_object_get(win3), EVAS_CALLBACK_MOUSE_DOWN, _cb_mouse_down_elm, gld);
1212 elm_win_alpha_set(win3, EINA_TRUE); 1221 elm_win_alpha_set(win3, EINA_TRUE);
1213 fill(win3); 1222 fill(win3);
1214 // Odd, it needs to be resized twice? 1223 // Odd, it needs to be resized twice?
1215 evas_object_resize(win3, w / 3, h / 4); 1224 evas_object_resize(win3, w / 3, h / 4);
1225 // image object for win3 is unlinked to its pos/size - so manual control
1226 // this allows also for using map and other things with it.
1216 evas_object_move(elm_win_inlined_image_object_get(win3), 13, 13); 1227 evas_object_move(elm_win_inlined_image_object_get(win3), 13, 13);
1217 evas_object_resize(elm_win_inlined_image_object_get(win3), w / 3, h / 4); 1228 evas_object_resize(elm_win_inlined_image_object_get(win3), w / 3, h / 4);
1218 evas_object_show(win3); 1229 evas_object_show(win3);