notification
pmapi
sysman
+ efl-assist
)
FOREACH(flag ${pkgs_CFLAGS})
static Eina_Bool _simple_exit(void *data)
{
PTS_TRACE_BEGIN;
- pts_appdata_t *ad = (pts_appdata_t *) data;
- PTS_IF_FREE_MEM(ad);
elm_exit();
PTS_TRACE_END;
return ECORE_CALLBACK_CANCEL;
#include <vconf.h>
#include <vconf-keys.h>
#include <sysman.h>
+#include <efl_assist.h>
#include <syspopup_caller.h>
#include "mobileprint.h"
#include "image_editor_conn.h"
conform = elm_conformant_add(parent);
evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ // Add
+ evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
elm_win_resize_object_add(parent, conform);
- evas_object_show(conform);
base = elm_layout_add(conform);
- //base = elm_layout_add(parent);
if (base) {
r = elm_layout_file_set(base, edj_file, group);
if (!r) {
return NULL;
}
elm_object_content_set(conform, base);
- //evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
}
+ evas_object_show(conform);
PTS_TRACE_END;
return base;
PTS_TRACE_END;
}
+static void _pts_scaling_cancel_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ PTS_TRACE_BEGIN;
+ pts_appdata_t *ad = (pts_appdata_t *)data;
+ PTS_RET_IF(NULL == ad, "ad is NULL");
+
+ PTS_IF_DEL_OBJ(scaling_radio_main);
+ PTS_IF_DEL_OBJ(obj);
+ PTS_IF_DEL_OBJ(ad->scaling_popup_info.scaling_popup);
+ PTS_TRACE_END;
+}
+
Evas_Object *pts_create_scaling_popup(Evas_Object *parent, pts_appdata_t *ad)
{
PTS_TRACE_BEGIN;
int index;
popup = elm_popup_add(parent);
- elm_object_style_set(popup,"min_menustyle");
+ elm_object_style_set(popup,"content_no_vhpad");
elm_object_part_text_set(popup, "title,text", _("IDS_PRT_BODY_SCALING_ABB"));
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ Evas_Object *layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "content", "min_menustyle");
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
btn1 = elm_button_add(popup);
elm_object_style_set(btn1,"popup_button/default");
elm_object_text_set(btn1, _("IDS_PRT_BODY_SCALING_ABB"));
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_scaling_cancel_cb, ad);
+
+
if (!scaling_radio_main) {
scaling_radio_main = elm_radio_add(genlist);
elm_radio_state_value_set(scaling_radio_main, scaling_index);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(box, genlist);
+ evas_object_show(genlist);
evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), elm_genlist_items_count(genlist) * 114 * elm_config_scale_get());
+ evas_object_show(box);
+ elm_object_part_content_set(layout, "elm.swallow.content" , box);
elm_object_content_set(popup, box);
+ elm_object_focus_set(popup, EINA_TRUE);
- evas_object_show(genlist);
evas_object_show(popup);
ad->scaling_popup_info.scaling_popup = popup;
int index;
popup = elm_popup_add(parent);
- elm_object_style_set(popup,"min_menustyle");
+ elm_object_style_set(popup,"content_no_vhpad");
elm_object_part_text_set(popup, "title,text", _("IDS_IMGE_BODY_SIZE"));
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ Evas_Object *layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "content", "min_menustyle");
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
btn1 = elm_button_add(popup);
elm_object_style_set(btn1, "popup_button/default");
elm_object_text_set(btn1, _("IDS_COM_SK_CANCEL"));
elm_object_part_content_set(popup, "button1", btn1);
evas_object_smart_callback_add(btn1, "clicked", _pts_size_cancel_cb, ad);
+ // Add cancel event
+ ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_size_cancel_cb, ad);
genlist = elm_genlist_add(popup);
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), ad->size_popup_info.size_popup_landscape_height);
}
+ evas_object_show(box);
+ elm_object_part_content_set(layout, "elm.swallow.content" , box);
elm_object_content_set(popup, box);
ad->size_popup_info.size_popup_box = box;
-
+ elm_object_focus_set(popup, EINA_TRUE);
evas_object_show(genlist);
evas_object_show(popup);
Evas_Object *genlist;
Evas_Object *btn1;
Evas_Object *btn2;
- Evas_Object *layout = NULL;
int index = -1;
popup = elm_popup_add(parent);
- elm_object_style_set(popup,"min_menustyle");
+ elm_object_style_set(popup,"content_no_vhpad");
elm_object_part_text_set(popup, "title,text", _("IDS_COM_SK_CUSTOM"));
-
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ Evas_Object *layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "content", "min_menustyle");
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
btn1 = elm_button_add(popup);
elm_object_style_set(btn1,"popup_button/default");
elm_object_text_set(btn1, _("IDS_COM_SK_OK"));
evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), ad->size_popup_info.custom_popup_landscape_height);
}
+ elm_object_part_content_set(layout, "elm.swallow.content" , box);
+ //evas_object_event_callback_add(popup, EVAS_CALLBACK_MOUSE_UP, _pts_mouse_cb, ad);
+ ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_custom_cancel_cb, ad);
+ elm_object_focus_set(popup, EINA_TRUE);
+
elm_object_content_set(popup, box);
ad->size_popup_info.custom_popup_box = box;
#include <notification.h>
#include <vconf.h>
#include <vconf-keys.h>
+#include <efl_assist.h>
#include <page_preview.h>
#include <paper_size.h>
static void _move_ctxpopup_more(Evas_Object *ctxpopup, Evas_Object *btn)
{
- Evas_Coord x, y, w , h;
- evas_object_geometry_get(btn, &x, &y, &w, &h);
- evas_object_move(ctxpopup, x + (w / 2), y);
+ pts_appdata_t *ad = pts_get_appdata();
+ Evas_Coord w , h;
+ elm_win_screen_size_get(ad->win, NULL, NULL, &w, &h);
+
+ int rot = elm_win_rotation_get(ad->win);
+ if (rot == APP_DEVICE_ORIENTATION_0 || rot == APP_DEVICE_ORIENTATION_180) {
+ evas_object_move(ctxpopup, 0, h);
+ } else if (rot == APP_DEVICE_ORIENTATION_90) {
+ evas_object_move(ctxpopup, 0, w);
+ } else {
+ evas_object_move(ctxpopup, h, w);
+ }
}
static void _more_btn_cb(void *data, Evas_Object *obj, void *event_info)
PTS_IF_DEL_OBJ(ad->setting_info.ctxpopup);
ad->setting_info.ctxpopup = elm_ctxpopup_add(ad->main_info.navi);
- elm_object_style_set(ad->setting_info.ctxpopup, "more_button");
+ elm_object_style_set(ad->setting_info.ctxpopup, "more/default");
evas_object_smart_callback_add(ad->setting_info.ctxpopup, "dismissed", _dismissed_cb, ad->setting_info.ctxpopup);
icon = elm_icon_add(ad->setting_info.ctxpopup);
_move_ctxpopup_more(ad->setting_info.ctxpopup, obj);
+ ea_object_event_callback_add(ad->setting_info.ctxpopup, EA_CALLBACK_BACK, ea_ctxpopup_back_cb, NULL);
+ ea_object_event_callback_add(ad->setting_info.ctxpopup, EA_CALLBACK_MORE, ea_ctxpopup_back_cb, NULL);
+ elm_object_focus_set(ad->setting_info.ctxpopup, EINA_TRUE);
+
evas_object_show(ad->setting_info.ctxpopup);
PTS_TRACE_END;
Evas_Object *main_layout = NULL;
Evas_Object *back_btn = NULL;
+ Evas_Object *toolbar;
+ Elm_Object_Item *toolbar_it;
ad->main_info.main_layout = pts_create_base_layout_with_conform(ad->main_info.root_win, "navi");
if (NULL == ad->main_info.main_layout) {
ad->main_info.navi = elm_naviframe_add(ad->main_info.main_layout);
elm_object_part_content_set(ad->main_info.main_layout, "navigation_bar", ad->main_info.navi);
+ /* add navigation frame toolbar */
+ toolbar = elm_toolbar_add(ad->main_info.navi);
+ PTS_RETV_IF(NULL == toolbar, NULL, "Toolbar adding error");
+ elm_object_style_set(toolbar, "default");
+ elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
+ elm_toolbar_transverse_expanded_set(toolbar, EINA_TRUE);
+ elm_toolbar_select_mode_set(toolbar, ELM_OBJECT_SELECT_MODE_NONE);
+
main_layout = __pts_main_view_create_content(ad);
back_btn = pts_create_label_btn(ad->main_info.navi, _("IDS_COM_SK_BACK"));
elm_object_style_set(back_btn, "naviframe/back_btn/default");
evas_object_smart_callback_add(back_btn, "clicked", __pts_main_view_btn_back_cb, ad);
-
evas_object_event_callback_add(ad->main_info.navi, EVAS_CALLBACK_DEL, __pts_main_view_navi_delete_cb, ad);
ad->main_info.navi_it = elm_naviframe_item_push(ad->main_info.navi, _("IDS_PRT_SK_PRINT_PREVIEW"), back_btn, NULL, main_layout, NULL);
-
- ad->main_info.print_btn = create_toolbar_btn(ad->main_info.navi, _("IDS_SMPOS_SK3_PRINT"), __pts_main_view_btn_print_cb, ad);
- elm_access_info_set(ad->main_info.print_btn, ELM_ACCESS_INFO, _("IDS_SMPOS_SK3_PRINT"));
- elm_access_info_set(ad->main_info.print_btn, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_PRINT_CONTEXT);
- elm_object_item_part_content_set(ad->main_info.navi_it, "toolbar_button1", ad->main_info.print_btn);
+ elm_naviframe_prev_btn_auto_pushed_set(ad->main_info.navi, EINA_FALSE);
+ elm_naviframe_item_pop_cb_set(ad->main_info.navi_it, __pts_main_view_btn_back_cb, ad);
+ ea_object_event_callback_add(ad->main_info.navi, EA_CALLBACK_BACK, ea_naviframe_back_cb, NULL);
+ ea_object_event_callback_add(ad->main_info.navi, EA_CALLBACK_MORE, ea_naviframe_more_cb, NULL);
+
+ /* insert printing button */
+ toolbar_it = elm_toolbar_item_append(toolbar, NULL,
+ _("IDS_SMPOS_SK3_PRINT"),
+ __pts_main_view_btn_print_cb, ad);
+ elm_object_item_part_content_set(ad->main_info.navi_it, "toolbar", toolbar);
+
+ /* we have only one item in toolbar, so we could set
+ accessibility on all toolbar */
+ elm_access_info_set(toolbar, ELM_ACCESS_INFO, _("IDS_SMPOS_SK3_PRINT"));
+ elm_access_info_set(toolbar, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_PRINT_CONTEXT);
ad->main_info.more_btn = create_toolbar_more_btn(ad->main_info.navi, _more_btn_cb, ad->main_info.navi_it);
elm_object_item_part_content_set(ad->main_info.navi_it, "toolbar_more_btn", ad->main_info.more_btn);
-
evas_object_event_callback_add(main_layout, EVAS_CALLBACK_DEL, __pts_main_view_delete_cb, ad);
-
int tmp_width = 0;
int tmp_height = 0;
#include <notification.h>
#include <vconf.h>
#include <vconf-keys.h>
+#include <efl_assist.h>
#include <paper_size.h>
#include <previewgen.h>
} radio_print_list_data_t;
static Elm_Genlist_Item_Class list_itc;
-//static Elm_Genlist_Item_Class refresh_itc;
static Elm_Genlist_Item_Class wifi_list_itc;
static Evas_Object *printer_list_radio_main = NULL;
pts_appdata_t *ad = (pts_appdata_t *)priv;
PTS_RET_IF(ug == NULL || ad == NULL, "Invalid argument");
+ if (ug) {
+ ug_destroy(ug);
+ }
pts_search_printer(ad);
PTS_TRACE_END;
pts_appdata_t *ad = pts_get_appdata();
PTS_RET_IF(ad == NULL, "ad is NULL");
+ PTS_IF_DEL_OBJ(obj);
+ PTS_IF_DEL_OBJ(ad->search_info.popup);
+ PTS_IF_DEL_OBJ(ad->list_info.no_found_popup);
+ PTS_IF_DEL_OBJ(ad->select_info.wifi_type_popup);
+ PTS_IF_DEL_OBJ(ad->list_info.printer_list_popup);
+
if (ad->search_info.print_search_mode == PTS_SEARCH_INITIAL) {
PTS_IF_DEL_OBJ(ad->list_info.printer_list_popup);
PTS_IF_DEL_OBJ(obj);
pt_deinit();
elm_exit();
} else {
- PTS_IF_DEL_OBJ(ad->list_info.no_found_popup);
- PTS_IF_DEL_OBJ(ad->select_info.wifi_type_popup);
- PTS_IF_DEL_OBJ(obj);
-
if (ad->list_info.active_printer == NULL) {
PTS_DEBUG("No active printer. So remove all option");
elm_genlist_item_update(ad->setting_info.printer_item);
memset(ad->list_info.active_printer, 0, sizeof(pt_printer_mgr_t));
memcpy(ad->list_info.active_printer, pt, sizeof(pt_printer_mgr_t));
- ad->setting_info.paper_size = (Elm_Object_Item *)realloc(ad->setting_info.paper_size, pt_get_print_option_papersize_num() * sizeof(Elm_Object_Item *));
+ ad->setting_info.paper_size = (Elm_Object_Item **)realloc(ad->setting_info.paper_size, pt_get_print_option_papersize_num() * sizeof(Elm_Object_Item *));
memset(ad->setting_info.paper_size, 0, pt_get_print_option_papersize_num() * sizeof(Elm_Object_Item *));
return PT_ERR_NONE;
struct appdata *ad = pts_get_appdata();
PTS_IF_DEL_OBJ(data);
+ PTS_IF_DEL_OBJ(ad->list_info.no_found_popup);
+ PTS_IF_DEL_OBJ(ad->list_info.printer_list_popup);
if (ad->search_info.print_search_mode == PTS_SEARCH_INITIAL) {
PTS_TRACE_END;
} else {
//Don't terminate mobileprint. Previous screen is setting view.
}
-
PTS_TRACE_END;
}
return NULL;
}
-#if 0
-static Evas_Object *__pts_refresh_icon_get(void *data, Evas_Object *obj, const char *part)
-{
- PTS_TRACE_BEGIN;
-
- Evas_Object *btn1;
- pts_appdata_t *ad = (pts_appdata_t *)data;
- PTS_RETV_IF(ad == NULL, NULL, "Invalid argument");
-
- if (!strcmp(part, "elm.icon")) {
- btn1 = elm_button_add(obj);
- elm_object_text_set(btn1, _("IDS_COM_SK_REFRESH"));
- //elm_object_part_content_set(obj, "button1", btn1);
- evas_object_smart_callback_add(btn1, "clicked", _pts_refresh_cb, ad);
- PTS_TRACE_END;
- return btn1;
- } else {
- PTS_DEBUG("Unknwon part : %s", part);
- }
-
- PTS_TRACE_END;
- return NULL;
-}
-#endif
-
/*
* popup when machine is unsupported
*/
Evas_Object *pts_create_wifi_type_selector_popup(Evas_Object *parent)
{
PTS_TRACE_BEGIN;
-
Evas_Object *popup = elm_popup_add(parent);
- elm_object_style_set(popup,"min_menustyle");
+ elm_object_style_set(popup,"content_no_vhpad");
elm_object_part_text_set(popup, "title,text", _("IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT"));
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ Evas_Object *layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "content", "min_menustyle");
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
/* accessability - screen reader support */
- Evas_Object *po, *eo, *ao;
- eo = elm_layout_edje_get(popup);
- po = edje_object_part_object_get(eo, "access.title");
- ao = elm_access_object_get(po);
+
+ Evas_Object *eo = elm_layout_edje_get(popup);
+ const Evas_Object *po = edje_object_part_object_get(eo, "access.title");;
+ Evas_Object *ao = elm_access_object_get(po);
elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, _("IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT"));
Evas_Object *cancel_button = elm_button_add(popup);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(box, genlist);
- evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), elm_genlist_items_count(genlist) * 114 * elm_config_scale_get());
+ elm_object_part_content_set(layout, "elm.swallow.content" , box);
+
elm_object_content_set(popup, box);
+ evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), elm_genlist_items_count(genlist) * 112 * elm_config_scale_get());
+ ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_cancel_cb, NULL);
+
+ elm_object_focus_set(popup, EINA_TRUE);
+ evas_object_show(box);
evas_object_show(genlist);
evas_object_show(popup);
evas_object_show(parent);
//elm_object_style_set(popup,"menustyle");
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(popup, _("IDS_PRT_BODY_NO_PRINTERS_AVAILABLE"));
-// evas_object_smart_callback_add(popup, "block,clicked", _block_clicked_cb,
-// NULL);
Evas_Object *refresh_button = elm_button_add(popup);
//elm_object_style_set(refresh_button,"popup_button/default");
elm_object_text_set(cancel_button, _("IDS_COM_SK_CANCEL"));
elm_object_part_content_set(popup, "button2", cancel_button);
evas_object_smart_callback_add(cancel_button, "clicked", cancel_cb, NULL);
+ ea_object_event_callback_add(popup, EA_CALLBACK_BACK, cancel_cb, NULL);
+ elm_object_focus_set(popup, EINA_TRUE);
evas_object_show(popup);
evas_object_show(parent);
list_itc.func.state_get = NULL;
list_itc.func.del = NULL;
-#if 0
- refresh_itc.item_style = "1icon"; // Text Button
- refresh_itc.func.text_get = NULL;
- refresh_itc.func.content_get = __pts_refresh_icon_get;
- refresh_itc.func.state_get = NULL;
- refresh_itc.func.del = NULL;
-#endif
-
pt_printer_mgr_t *it = NULL;
Eina_List *cursor = NULL;
core->radio_index = radio_index;
core->pt = it;
core->radio_group = printer_list_radio_main;
- //core->ugd = ld->ugd;
git = elm_genlist_item_append(
genlist,
Evas_Object *pts_create_printer_list_popup(Evas_Object *parent, pts_appdata_t *ad)
{
PTS_TRACE_BEGIN;
- Evas_Object *popup;
- Evas_Object *genlist;
- Evas_Object *ok_button;
- Evas_Object *refresh_button;
- Evas_Object *cancel_button;
- int printer_num = 0;
// XXX
// Currently min_menustyle does not support "2text.1icon.4" genlist.
// When min_menustyle supports it, change this.
// To avoid this limitation, applied box object.
- popup = elm_popup_add(parent);
- //elm_object_style_set(popup,"menustyle");
- elm_object_style_set(popup,"min_menustyle");
+ Evas_Object *popup = elm_popup_add(parent);
+ elm_object_style_set(popup,"content_no_vhpad");
elm_object_part_text_set(popup, "title,text", _("IDS_PRT_BODY_SELECT_PRINTER"));
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_access_info_set(popup, ELM_ACCESS_CONTEXT_INFO, _("IDS_PRT_BODY_SELECT_PRINTER")); //FIXME: should be set to title, not popup itself
+ Evas_Object *layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "content", "min_menustyle");
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
/* accessability - screen reader support */
- Evas_Object *po, *eo, *ao;
- eo = elm_layout_edje_get(popup);
- po = edje_object_part_object_get(eo, "access.title");
- ao = elm_access_object_get(po);
+ Evas_Object *eo = elm_layout_edje_get(popup);
+ const Evas_Object *po = (Evas_Object *)edje_object_part_object_get(eo, "access.title");
+ Evas_Object *ao = elm_access_object_get(po);
elm_access_info_set(ao, ELM_ACCESS_INFO, _("IDS_PRT_BODY_SELECT_PRINTER"));
elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_PRINTERS_LIST_IS_BELOW);
- ok_button = elm_button_add(popup);
+ Evas_Object *ok_button = elm_button_add(popup);
elm_object_style_set(ok_button,"popup_button/default");
elm_object_text_set(ok_button, _("IDS_COM_SK_OK"));
elm_access_info_set(ok_button, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CONFIRM_SELECTED_PRINTER);
elm_object_part_content_set(popup, "button1", ok_button);
evas_object_smart_callback_add(ok_button, "clicked", _pts_printer_list_ok_cb, ad);
- refresh_button = elm_button_add(popup);
+ Evas_Object *refresh_button = elm_button_add(popup);
elm_object_style_set(refresh_button,"popup_button/default");
elm_object_text_set(refresh_button, _("IDS_COM_SK_REFRESH"));
elm_access_info_set(ok_button, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_REFRESH_SEARCHING_PRINTERS);
elm_object_part_content_set(popup, "button2", refresh_button);
evas_object_smart_callback_add(refresh_button, "clicked", _pts_refresh_cb, ad);
- cancel_button = elm_button_add(popup);
+ Evas_Object *cancel_button = elm_button_add(popup);
elm_object_style_set(cancel_button,"popup_button/default");
elm_object_text_set(cancel_button, _("IDS_COM_SK_CANCEL"));
elm_access_info_set(cancel_button, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CANCEL_PRINTING);
elm_object_part_content_set(popup, "button3", cancel_button);
evas_object_smart_callback_add(cancel_button, "clicked", _pts_printer_list_cancel_cb, popup);
- genlist = pts_create_content_printer_list(parent, ad, &printer_num);
+ int printer_num = 0;
+ Evas_Object *genlist = pts_create_content_printer_list(parent, ad, &printer_num);
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
ad->list_info.printer_list_popup_box = box;
ad->list_info.printer_list_popup = popup;
+ ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_printer_list_cancel_cb, NULL);
+ elm_object_part_content_set(layout, "elm.swallow.content" , box);
elm_object_content_set(popup, box);
+ elm_object_focus_set(popup, EINA_TRUE);
+
evas_object_show(genlist);
evas_object_show(box);
evas_object_show(popup);
PTS_TRACE_BEGIN;
PTS_RETV_IF(parent == NULL, NULL, "parent is NULL");
- int ret = 0;
- Evas_Object *layout = NULL;
- Evas_Object *progressbar = NULL;
- Evas_Object *btn = NULL;
- Evas_Object *popup = NULL;
-
- popup = elm_popup_add(parent);
- layout = pts_create_base_layout(popup, "popup_search");
- progressbar = elm_progressbar_add(popup);
+ Evas_Object *popup = elm_popup_add(parent);
+ Evas_Object *layout = pts_create_base_layout(popup, "popup_search");
+ Evas_Object *progressbar = elm_progressbar_add(popup);
elm_object_style_set(progressbar, "list_process");
elm_progressbar_horizontal_set(progressbar, EINA_TRUE);
evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_part_text_set(layout, "elm.text", _("IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING"));
/* accessability - screen reader support */
- Evas_Object *po, *ao;
- po = edje_object_part_object_get(layout, "elm.swallow.content");
- ao = elm_access_object_get(po);
+ const Evas_Object *po = edje_object_part_object_get(layout, "elm.swallow.content");
+ Evas_Object *ao = elm_access_object_get(po);
elm_access_info_set(ao, ELM_ACCESS_INFO, _("IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING"));
elm_object_content_set(popup, layout);
- btn = elm_button_add(popup);
+ Evas_Object *btn = elm_button_add(popup);
elm_object_text_set(btn, _("IDS_COM_SK_CANCEL"));
elm_access_info_set(btn, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CANCEL_SEARCHING_PRINTERS);
elm_object_part_content_set(popup, "button1", btn);
evas_object_smart_callback_add(btn, "clicked", _pts_cancel_cb, NULL);
+ ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_cancel_cb, NULL);
+ elm_object_focus_set(popup, EINA_TRUE);
evas_object_show(layout);
evas_object_show(popup);
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
+#include <efl_assist.h>
#include "pt_api.h"
#include "mobileprint.h"
#include "pts_common.h"
/*
* the response callback when click back button
*/
-static void __pts_setting_view_btn_back_cb(void *data, Evas_Object *obj, void *event_info)
+static Eina_Bool __pts_setting_view_btn_back_cb(void *data, Elm_Object_Item *it)
{
PTS_TRACE_BEGIN;
pts_appdata_t *ad = (pts_appdata_t *)data;
- PTS_RET_IF(ad == NULL, "ad is NULL");
+ PTS_RETV_IF(ad == NULL, EINA_TRUE, "ad is NULL");
__pts_setting_view_leave_view(ad);
pt_deinit();
elm_exit();
PTS_TRACE_END;
- return;
+ return EINA_TRUE;
}
pts_main_view_update_printer_label(ad);
pts_main_view_rotate_image(ad, app_get_device_orientation());
PTS_TRACE_END;
-}
-
-static void _back_cb(void *data, Evas_Object *obj, void *event_info)
-{
- ecore_event_handler_del(data);
+ return EINA_TRUE;
}
static void _dismissed_cb(void *data, Evas_Object *obj, void *event_info)
evas_object_move(copies_popup, x+(w*0.06), touch_y);
}
-static Eina_Bool _mousedown_cb(void *data, int type, void *event)
-{
- Ecore_Event_Mouse_Button *ev = event;
- touch_x = ev->x;
- touch_y = ev->y;
- return ECORE_CALLBACK_CANCEL;
-}
-
static void __on_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
PTS_DEBUG("copies popup show\n");
elm_genlist_item_selected_set(event_info, EINA_FALSE);
}
+ if (ad->search_info.popup != NULL
+ || ad->list_info.no_found_popup != NULL
+ || ad->list_info.printer_list_popup != NULL) {
+ PTS_WARN("event was called duplicated, it is ignored");
+ return;
+ }
+
// Launch Print searching module
ad->search_info.print_search_mode = PTS_SEARCH_IN_SETTING;
ad->search_info.selection_done_cb = pts_setting_view_printer_select_done_cb;
evas_object_smart_callback_add(genlist, "realized", __pts_setting_view_gl_realized, ad);
/* Add touch coordinates handler */
- Ecore_Event_Handler *event;
- event = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _mousedown_cb, NULL);
- evas_object_smart_callback_add(genlist, "clicked", _back_cb, event);
+ //Ecore_Event_Handler *event;
+ //event = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _mousedown_cb, NULL);
+ //evas_object_smart_callback_add(genlist, "clicked", _back_cb, event);
PTS_TRACE_END;
return genlist;
}
-#if 0
-Evas_Object *pt_util_add_bg(Evas_Object *obj, Eina_Bool is_window)
-{
- PTS_TRACE_BEGIN;
-
- Evas_Object *bg;
- bg = elm_bg_add(obj);
- PTS_RETV_IF(bg == NULL, NULL, "bg is NULL");
-
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- if (is_window) {
- elm_win_resize_object_add(obj, bg);
- } else {
- elm_object_style_set(bg, "group_list");
- }
-
- evas_object_show(bg);
-
- PTS_TRACE_END;
- return bg;
-}
-#endif
-
/**
* This function let the app create setting view
* @return void
Evas_Object *back_btn = NULL;
//Evas_Object *layout = NULL;
Evas_Object *genlist = NULL;
- //Elm_Object_Item *navi_item = NULL;
+ Elm_Object_Item *navi_item = NULL;
//layout = pts_utils_create_layout(ugd->navi);
//evas_object_show(layout);
- //Evas_Object *conform = elm_object_part_content_get(layout, "elm.swallow.content");
genlist = __pts_setting_view_create_content(ad->main_info.navi, ad);
//elm_object_content_set(layout, genlist);
+ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
back_btn = elm_button_add(ad->main_info.navi);
elm_object_style_set(back_btn, "naviframe/end_btn/default");
- evas_object_smart_callback_add(back_btn, "clicked", __pts_setting_view_btn_back_cb, ad);
- elm_naviframe_item_push(ad->main_info.navi, _("IDS_SMPOS_HEADER_PRINTER_SETTINGS"), back_btn, NULL, genlist, NULL);
- //navi_item = elm_naviframe_item_push(ugd->navi, _("IDS_SMPOS_HEADER_PRINTER_SETTINGS"), back_btn, NULL, genlist, NULL);
+ navi_item = elm_naviframe_item_push(ad->main_info.navi, _("IDS_SMPOS_HEADER_PRINTER_SETTINGS"), back_btn, NULL, genlist, NULL);
+ elm_naviframe_item_pop_cb_set(navi_item, __pts_setting_view_btn_back_cb, ad);
+ ea_object_event_callback_add(navi_item, EA_CALLBACK_BACK, ea_naviframe_back_cb, NULL);
PTS_TRACE_END;
}
#define GENLIST_HEIGHT_73_INC 73
-#define LAYOUT_GROUP_LIST_BG_COLOR_INC 248 246 239 255 // white theme
+//#define LAYOUT_GROUP_LIST_BG_COLOR_INC 248 246 239 255 // white theme
+#define LAYOUT_GROUP_LIST_BG_COLOR_INC 0 0 0 255 // black theme
#define GENLIST_PART_DISCLIP_COLOR_INC 255 255 255 110 // alpha was 64
#define GENLIST_PART_DIALOGUE_BASE( param_item_height ) \
-#define LAYOUT_INDICATOR_HEIGHT_INC 0
-
collections
{
- group {
- name: "navi";
+ group {
+ name: "navi";
parts {
part {
name, "background";
type, RECT;
description {
state: "default" 0.0;
- #color: 0 0 0 255;
- color: 255 255 255 255;
+ color: 0 0 0 255;
+ #color: 255 255 255 255;
rel1 { relative: 0.0 0.0; offset: 0 0;}
rel2 { relative: 1.0 1.0; offset: 0 0;}
}
}
- part { name: "indicator";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 LAYOUT_INDICATOR_HEIGHT_INC;
- max: 999999 LAYOUT_INDICATOR_HEIGHT_INC;
- fixed: 0 1;
- align: 0.5 0;
- visible: 0;
- }
- }
- part { name, "navigation_bar";
+ part {
+ name, "navigation_bar";
type: SWALLOW;
description {
state: "default" 0.0;
- rel1 { relative: 0.0 1.0; to_x: background; to_y: "indicator";}
- rel2 { relative: 1.0 1.0; to: background;}
}
}
}
}
-
- group
- {
- name: "printer";
- parts
- {
- part {
- name, "printer_name_bg";
- type: RECT;
- description {
- color: 242 238 233 255;
- rel1.to: "printer_name";
- rel2.to: "printer_name";
+
+ group
+ {
+ name: "printer";
+ parts
+ {
+ part {
+ name, "printer_name_bg";
+ type: RECT;
+ description {
+ #color: 242 238 233 255;
+ color: 34 44 71 255;
+ rel1.to: "printer_name";
+ rel2.to: "printer_name";
+ }
}
- }
- part { name, "printer_name";
- type: SWALLOW;
- scale: 1;
- description {
- min: 0 50;
- align: 0.0 0.0;
- fixed: 0 1;
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 0.0; }
+ part {
+ name, "printer_name";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ min: 0 60;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 0.0; }
+ }
+ }
+ part {
+ name: "bg";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ ##color: 242 238 233 255;
+ #color: 255 255 255 255;
+ rel1 { relative: 0.0 1.0; to:"printer_name"; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "image";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ rel1 { relative: 0.0 0.0;to:"bg";}
+ rel2 { relative: 1.0 1.0;to:"bg";}
+ }
+ }
+ part{
+ name:"bar";
+ type: SWALLOW;
+ scale:1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 1.0;
+ min: 0 104;
+ fixed: 0 1;
+ rel1 { relative: 0.0 1.0;}
+ rel2 { relative: 1.0 1.0;}
+ }
+ }
}
- }
- part {
- name: "bg";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- #color: 242 238 233 255;
- color: 255 255 255 255;
- rel1 { relative: 0.0 1.0; to:"printer_name"; }
- rel2 { relative: 1.0 1.0; }
- }
- }
- part {
- name: "image";
- type: SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.5 0.5;
- rel1 { relative: 0.0 0.0;to:"bg";}
- rel2 { relative: 1.0 1.0;to:"bg";}
- }
- }
-
- part{
- name:"bar";
- type: SWALLOW;
- scale:1;
- description {
- state: "default" 0.0;
- align: 0.5 1.0;
- min: 0 104;
- fixed: 0 1;
- rel1 { relative: 0.0 1.0;}
- rel2 { relative: 1.0 1.0;}
- }
- }
- }
- }
- group
- {
- name: "image_view";
- parts
- {
- part {
- name: "bg";
- type: RECT;
- description {
- state: "default" 0.0;
- #color: 242 238 233 255;
- color: 255 255 255 255;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- }
- }
-
- part {
- name: "content";
- type: SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.5 0.5;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 0.95; to: "bg";}
- }
- description {
- state: "multi" 0.1;
- align: 0.5 0.5;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- }
- }
- part {
- name: "process_animation";
- type: SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.5 0.5;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- }
}
- part {
- name: "pagenumber";
- type: TEXT;
- scale: 1;
- description {
- state: "default" 0.0;
- max: -1 0;
- text {
- size: 30;
- align: 0.5 0.5;
- }
- color: 108 108 108 255;
- align: 0.5 0.5;
- rel1 { relative: 0.0 0.95; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- }
- description {
- state: "multi" 0.1;
- visible: 0;
- max: -1 0;
- text {
- size: 30;
- align: 0.5 0.5;
- }
- color: 108 108 108 255;
- align: 0.5 0.5;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- }
- }
- }
- }
-
group
{
- name: "popup_search";
- parts{
- part{
- name:"elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
-# min: 0 70;
- align: 0.5 0.0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
+ name: "image_view";
+ parts
+ {
+ part {
+ name: "bg";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ ##color: 242 238 233 255;
+ #color: 255 255 255 255;
+ color: 0 0 0 255;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
}
- rel2 {
- relative: 1.0 0.6;
+ }
+ part {
+ name: "content";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ rel1 { relative: 0.0 0.0; to: "bg";}
+ rel2 { relative: 1.0 0.95; to: "bg";}
}
- }
- }
- part{
- name: "elm.text";
- type: TEXT;
- scale: 1;
- description {
- state: "default" 0.0;
-# min: 0 30;
- text {
- size: 30;
- align: 0.5 0.5;
- min: 0 0;
+ description {
+ state: "multi" 0.1;
+ align: 0.5 0.5;
+ rel1 { relative: 0.0 0.0; to: "bg";}
+ rel2 { relative: 1.0 1.0; to: "bg";}
}
- color: 108 108 108 255;
- align: 0.5 0.5;
- rel1 {
- relative: 0.0 0.7;
+ }
+ part {
+ name: "process_animation";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ rel1 { relative: 0.0 0.0; to: "bg";}
+ rel2 { relative: 1.0 1.0; to: "bg";}
}
- rel2 {
- relative: 1.0 1.0;
+ }
+ part {
+ name: "pagenumber";
+ type: TEXT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ max: -1 0;
+ text {
+ size: 30;
+ align: 0.5 0.5;
+ text_class: "tizen";
+ }
+ color: 108 108 108 255;
+ align: 0.5 0.5;
+ rel1 { relative: 0.0 0.95; to: "bg";}
+ rel2 { relative: 1.0 1.0; to: "bg";}
+ }
+ description {
+ state: "multi" 0.1;
+ visible: 0;
+ max: -1 0;
+ text {
+ size: 30;
+ align: 0.5 0.5;
+ }
+ color: 108 108 108 255;
+ align: 0.5 0.5;
+ rel1 { relative: 0.0 0.0; to: "bg";}
+ rel2 { relative: 1.0 1.0; to: "bg";}
}
- }
- }
- }
+ }
+ }
+ }
+
+ group
+ {
+ name: "popup_search";
+ parts
+ {
+ part
+ {
+ name:"elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ #min: 0 70;
+ align: 0.5 0.0;
+ fixed: 1 0;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 0.6;}
+ }
+ }
+ part
+ {
+ name: "elm.text";
+ type: TEXT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ #min: 0 30;
+ text {
+ size: 30;
+ align: 0.5 0.5;
+ min: 0 0;
+ text_class: "tizen";
+ }
+ color: 108 108 108 255;
+ align: 0.5 0.5;
+ rel1 {relative: 0.0 0.7;}
+ rel2 {relative: 1.0 1.0;}
+ }
+ }
+ }
}
group
}
}
- group { name: "popup_progress";
- parts{
- part { name: "pad_t";
- scale : 1;
- mouse_events: 0;
- repeat_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.0;
- min: 0 0;
- fixed: 0 1;
- rel1 {
- relative: 1.0 0.0;
- to_x: "pad_l";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "pad_r";
- }
- }
- }
- part { name: "pad_l";
- scale: 1;
- description { state: "default" 0.0;
- min : 0 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part { name: "pad_r";
- scale: 1;
- description { state: "default" 0.0;
- min : 0 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part{ name:"elm.swallow.content";
- type: SWALLOW;
- scale : 1;
- description { state: "default" 0.0;
- min: 604 0;
- align: 0.5 0.5;
- fixed: 1 0;
- rel1 {
- relative: 0.5 1.0;
- to: "pad_t";
- }
- rel2 {
- relative: 0.5 0.0;
- to: "pad_b";
- }
- }
- }
- part{ name:"elm.swallow.content.1";
- type: SWALLOW;
- scale : 1;
- description { state: "default" 0.0;
- min: 604 0;
- align: 0.5 0.5;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- to: "elm.swallow.content";
- }
- rel2 {
- relative: 1.0 0.3;
- to: "elm.swallow.content";
- }
- }
- }
- part{ name:"elm.swallow.content.2";
- type: SWALLOW;
- scale : 1;
- description { state: "default" 0.0;
- min: 604 0;
- align: 0.5 0.5;
- fixed: 1 0;
- rel1 {
- relative: 0.0 1.0;
- to: "elm.swallow.content.1";
- }
- rel2 {
- relative: 1.0 2.0;
- to: "elm.swallow.content.1";
- }
- }
- }
- part{ name:"elm.swallow.content.3";
- type: SWALLOW;
- scale : 1;
- description { state: "default" 0.0;
- min: 604 0;
- align: 0.5 0.5;
- fixed: 1 0;
- rel1 {
- relative: 0.0 1.0;
- to: "elm.swallow.content.2";
- }
- rel2 {
- relative: 1.0 2.0;
- to: "elm.swallow.content.2";
+ group
+ {
+ name: "popup_progress";
+ parts{
+ part{
+ name: "pad_t";
+ type: RECT;
+ scale : 1;
+ mouse_events: 0;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.0;
+ min: 0 0;
+ fixed: 0 1;
+ rel1 {relative: 1.0 0.0; to_x: "pad_l";}
+ rel2 {relative: 0.0 0.0; to_x: "pad_r";}
}
- }
- }
- part { name: "pad_b";
- scale : 1;
- mouse_events: 0;
- repeat_events: 1;
- description { state: "default" 0.0;
- align: 0.5 1.0;
- min: 0 54;
- fixed: 0 1;
- rel1 {
- relative: 1.0 0.0;
- to_x: "pad_l";
- to_y: "pad_bm";
+ }
+ part {
+ name: "pad_l";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min : 0 0;
+ fixed: 1 0;
+ rel1 {relative: 0.0 0.0;}
+ rel2 {relative: 0.0 1.0;}
+ align: 0.0 0.0;
}
- rel2 {
- relative: 0.0 0.0;
- to_x: "pad_r";
- to_y: "pad_bm";
+ }
+ part {
+ name: "pad_r";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min : 0 0;
+ fixed: 1 0;
+ rel1 {relative: 1.0 0.0;}
+ rel2 {relative: 1.0 1.0;}
+ align: 1.0 0.0;
}
- }
- }
- part { name: "elm.swallow.end";
- type: SWALLOW;
- scale : 1;
- mouse_events: 1;
- repeat_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- min: 604 54;
- fixed: 1 1;
- rel1 {
- relative: 0.0 0.0;
- to: "pad_b";
+ }
+ part{
+ name:"elm.swallow.content";
+ type: SWALLOW;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: 604 0;
+ align: 0.5 0.5;
+ fixed: 1 0;
+ rel1 {relative: 0.5 1.0; to: "pad_t";}
+ rel2 {relative: 0.5 0.0; to: "pad_b";}
}
- rel2 {
- relative: 1.0 1.0;
- to: "pad_b";
+ }
+ part{ name:"elm.swallow.content.1";
+ type: SWALLOW;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 604 0;
+ align: 0.5 0.5;
+ fixed: 1 0;
+ rel1 {relative: 0.0 0.0; to: "elm.swallow.content";}
+ rel2 {relative: 1.0 0.3; to: "elm.swallow.content";}
+ }
+ }
+ part{
+ name:"elm.swallow.content.2";
+ type: SWALLOW;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ min: 604 0;
+ align: 0.5 0.5;
+ fixed: 1 0;
+ rel1 {relative: 0.0 1.0; to: "elm.swallow.content.1";}
+ rel2 {relative: 1.0 2.0; to: "elm.swallow.content.1";}
}
- }
- }
- part { name: "pad_bm";
- scale : 1;
- mouse_events: 0;
- repeat_events: 1;
- description { state: "default" 0.0;
- align: 0.5 1.0;
- min: 604 54;
- fixed: 1 1;
- rel1 {
- relative: 0.0 1.0;
- to: "pad_l";
+ }
+ part{
+ name:"elm.swallow.content.3";
+ type: SWALLOW;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 604 0;
+ align: 0.5 0.5;
+ fixed: 1 0;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "elm.swallow.content.2";
+ }
+ rel2 {
+ relative: 1.0 2.0;
+ to: "elm.swallow.content.2";
+ }
}
- rel2 {
- relative: 1.0 1.0;
- to: "pad_r";
+ }
+ part {
+ name: "pad_b";
+ type: RECT;
+ scale : 1;
+ mouse_events: 0;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 1.0;
+ min: 0 54;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "pad_l";
+ to_y: "pad_bm";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "pad_r";
+ to_y: "pad_bm";
+ }
}
- }
- }
- part { name: "elm.text.subtext1";
- type: TEXT;
- scale : 1;
- description { state: "default" 0.0;
- text {
- font: "Tizen:style=Medium";
- size: 36;
- min: 0 0;
- align: 0.0 0.5;
- text_class: "tizen";
- }
- color: 128 128 128 255;
- align: 0.0 0.5;
- rel1 {
- relative: 0.0 0.0;
- to: "pad_bm";
+ }
+ part {
+ name: "elm.swallow.end";
+ type: SWALLOW;
+ scale : 1;
+ mouse_events: 1;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ min: 604 54;
+ fixed: 1 1;
+ rel1 {
+ relative: 0.0 0.0;
+ to: "pad_b";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "pad_b";
+ }
}
- rel2 {
- relative: 1.0 1.0;
- to: "pad_bm";
+ }
+ part {
+ name: "pad_bm";
+ type: RECT;
+ scale : 1;
+ mouse_events: 0;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 1.0;
+ min: 604 54;
+ fixed: 1 1;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "pad_l";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "pad_r";
+ }
}
- }
- }
- part { name: "elm.text.subtext2";
- type: TEXT;
- scale : 1;
- description { state: "default" 0.0;
- text {
- font: "Tizen:style=Medium";
- size: 36;
- min: 0 0;
- align: 1.0 0.5;
- text_class: "tizen";
- }
- color: 128 128 128 255;
- align: 1.0 0.5;
- rel1 {
- relative: 0.0 0.0;
- to: "pad_bm";
+ }
+ part {
+ name: "elm.text.subtext1";
+ type: TEXT;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ text {
+ font: "Tizen:style=Medium";
+ size: 36;
+ min: 0 0;
+ align: 0.0 0.5;
+ text_class: "tizen";
+ }
+ color: 128 128 128 255;
+ align: 0.0 0.5;
+ rel1 {
+ relative: 0.0 0.0;
+ to: "pad_bm";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "pad_bm";
+ }
}
- rel2 {
- relative: 1.0 1.0;
- to: "pad_bm";
+ }
+ part { name: "elm.text.subtext2";
+ type: TEXT;
+ scale : 1;
+ description {
+ state: "default" 0.0;
+ text {
+ font: "Tizen:style=Medium";
+ size: 36;
+ min: 0 0;
+ align: 1.0 0.5;
+ text_class: "tizen";
+ }
+ color: 128 128 128 255;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 0.0;
+ to: "pad_bm";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "pad_bm";
+ }
}
- }
- }
- }
+ }
+ }
}
}
#undef MIN
#define MIN(a,b) ((((a)-(b))&0x80000000) >> 31)? (a) : (b)
-#define PRINTER_LIST_POPUP_W 656
-#define PRINTER_LIST_POPUP_H 880
-#define PRINTER_LIST_POPUP_LN_W 720
-#define PRINTER_LIST_POPUP_LN_H 480
+#define PRINTER_LIST_POPUP_W 400
+#define PRINTER_LIST_POPUP_H 114
+#define PRINTER_LIST_POPUP_LN_W 400
+#define PRINTER_LIST_POPUP_LN_H 114
#ifndef API
#define API __attribute__ ((visibility("default")))
#include <Evas.h>
/*#include <Evas_Engine_Buffer.h>*/
-#include "evas_render.h"
-#include "image_scaler.h"
-#include "paper_size.h"
-#include "pgen_debug.h"
-#include "preview_util.h"
+#include <evas_render.h>
+#include <image_scaler.h>
+#include <paper_size.h>
+#include <pgen_debug.h>
+#include <preview_util.h>
-#include "page_preview.h"
+#include <page_preview.h>
const int gl_is_image_downscale = 1;
const int gl_is_half_pdf_raster = 1;
/* background */
bg = evas_object_rectangle_add(canvas);
//evas_object_color_set(bg, 242, 238, 233, 255);
- evas_object_color_set(bg, 255,255, 255, 255);
+ //evas_object_color_set(bg, 255, 255, 255, 255);
+ evas_object_color_set(bg, 0, 0, 0, 255);
evas_object_move(bg, 0, 0);
evas_object_resize(bg, full_size->x, full_size->y);
evas_object_show(bg);
}
/**
- *
- *
+ * @brief Set blank preview page image on provided canvas
+ * @param[in-out] canvas Canvas to draw page image
+ * @param[in] b_s Full page image size (with shadow,
+ * border)
+ * @param[in] p_s Page size (to put page image)
+ * @param[in] border_size Page border size
+ * @param[in] off Page image offset on canvas
+ * @result Error code, 0 is OK, <0 - error
*/
int set_preview_page(Evas *canvas,
const struct size_px *b_s, const struct size_px *p_s,
shadow_offset_x = (b_s->x - p_s->x);
shadow_offset_y = (b_s->y - p_s->y);
- /* background */
bg = evas_object_rectangle_add(canvas);
- //evas_object_color_set(bg, 242, 238, 233, 255);
- evas_object_color_set(bg, 255, 255, 255, 255);
- evas_object_move(bg, off->x, off->y);
- evas_object_resize(bg, b_s->x, b_s->y);
- evas_object_show(bg);
-
- bg = evas_object_rectangle_add(canvas);
- evas_object_color_set(bg, 100, 100, 100, 255); /* shadow color */
+ evas_object_color_set(bg, 50, 50, 50, 255); /* shadow color */
evas_object_move(bg, shadow_offset_x + off->x - border_size->x * 2,
shadow_offset_y + off->y - border_size->y * 2);
evas_object_resize(bg, p_s->x + border_size->x,
return 0;
}
-/**
- *
- *
- *
- */
-int set_pdf_preview_page_image_w_np(Evas *canvas,
- void *img_buf, int img_size,
- int page_num, int pages_count,
- const struct preview_settings_px *settings_px)
-{
- struct size_px border_size = {1, 1};
- struct size_px center_off = {0, 0};
- struct size_px left_off = {0, 0};
- struct size_px right_off = {0, 0};
-
- PGEN_TRACE_BEGIN;
- PGEN_RETV_IF(canvas == NULL || img_buf == NULL || img_size <=0 || page_num <=0
- || pages_count <=0 || settings_px == NULL, -1, "Invalid argument");
-
- center_off.x = settings_px->center_off;
- left_off.x = settings_px->left_off;
- right_off.x = settings_px->right_off;
-
- if (set_pdf_preview_page_image(canvas, img_buf, img_size,
- ¢er_off, &(settings_px->page_px)) < 0) {
- PGEN_DEBUG("ERROR in set_pdf_preview_page_image()");
- PGEN_TRACE_END;
- return -1;
- }
-
- /* put side (previous and next) pages images */
- /* TODO: check for pages availability */
- if (pages_count > 1) {
- if (page_num > 1 &&
- set_preview_page(canvas,
- &(settings_px->page_px.full_size),
- &(settings_px->page_px.paper_size),
- &border_size, &left_off) < 0) {
- PGEN_DEBUG("ERROR in set_preview_page()");
- PGEN_TRACE_END;
- return -1;
- }
-
- if (page_num < pages_count &&
- set_preview_page(canvas,
- &(settings_px->page_px.full_size),
- &(settings_px->page_px.paper_size),
- &border_size, &right_off) < 0) {
- PGEN_DEBUG("ERROR in set_preview_page()");
- PGEN_TRACE_END;
- return -1;
- }
- }
-
- PGEN_TRACE_END;
-
- return 0;
-}
/**
* @brief Writes preview page images to file
if (load_pdf_page_img(pdf_fname, page_num, &settings_px,
&img_buf, &img_size) < 0) {
+ destroy_canvas(canvas);
+ PGEN_TRACE_END;
+ return -1;
+ }
+
+ /* till we save page images in PPM this is required */
+ if (set_canvas_background(canvas, &(settings_px.full_size)) < 0) {
+ PGEN_DEBUG("ERROR in set_canvas_background()");
+ destroy_canvas(canvas);
PGEN_TRACE_END;
return -1;
}
canvas = create_canvas(&(settings_px.full_size));
PGEN_RETV_IF(canvas == NULL, -1, "canvas is NULL");
- if (set_preview_page(canvas, &(settings_px.full_size),
- &(settings_px.paper_size), &border_size, &off) < 0) {
- PGEN_DEBUG("ERROR in set_preview_page()");
- destroy_canvas(canvas);
- PGEN_TRACE_END;
- return -1;
- }
-
- draw_scene(canvas);
- save_scene(canvas, out_pic_fname);
- destroy_canvas(canvas);
-
- PGEN_TRACE_END;
-
- return 0;
-}
-
-
-int save_pdf_preview_page_image_w_np(
- void *img_buf, int img_size,
- int page_num, int pages_count,
- const struct preview_settings_px *settings_px,
- const char *out_pic_fname)
-{
- PGEN_TRACE_BEGIN;
- Evas *canvas;
- canvas = create_canvas(&(settings_px->full_size));
- PGEN_RETV_IF(canvas == NULL, -1, "canvas is NULL");
-
/* till we save page images in PPM this is required */
- if (set_canvas_background(canvas, &(settings_px->full_size)) < 0) {
+ if (set_canvas_background(canvas, &(settings_px.full_size)) < 0) {
PGEN_DEBUG("ERROR in set_canvas_background()");
destroy_canvas(canvas);
PGEN_TRACE_END;
return -1;
}
- if (set_pdf_preview_page_image_w_np(canvas, img_buf, img_size,
- page_num, pages_count, settings_px) < 0) {
- PGEN_DEBUG("ERROR in set_pdf_preview_page_image_w_np()");
+ if (set_preview_page(canvas, &(settings_px.full_size),
+ &(settings_px.paper_size), &border_size, &off) < 0) {
+ PGEN_DEBUG("ERROR in set_preview_page()");
destroy_canvas(canvas);
PGEN_TRACE_END;
return -1;
save_scene(canvas, out_pic_fname);
destroy_canvas(canvas);
-
PGEN_TRACE_END;
return 0;
}
-int save_pdf_preview_page_image_w_np_fname(const char *pdf_fname,
- int page_num, int pages_count,
- const struct preview_settings_px *settings_px,
- const char *out_pic_fname)
-{
- int res;
- void *img_buf;
- int img_size;
- if (load_pdf_page_img(pdf_fname, page_num, &(settings_px->page_px),
- &img_buf, &img_size) < 0) {
- PGEN_TRACE_END;
- return -1;
- }
-
- /* called function is responsible for img_buf allocation */
- res = save_pdf_preview_page_image_w_np(img_buf, img_size,
- page_num, pages_count, settings_px, out_pic_fname);
- return res;
-}
-
-
/* fix pdftopdf page rotation problem by manual scaling option */
int fix_pdf_page_scale(const char *fname,
const struct size_pts *req_size,
"\toutfname_ppm paper_s_x paper_s_y av_s_x av_s_y\n"
"\tshadow_x shadow_y is_rotate90\n"
"\n"
- "gen - generate page image for PDF\n"
- "Arguments:\n"
- "\tfname page pages_count outfname_ppm\n"
- "\tpaper_s_x paper_s_y av_s_x av_s_y\n"
- "\tshadow_x shadow_y is_rotate90 is_grayscale\n"
- "\n"
"pagegen - generate single page image for PDF\n"
"\tfname page outfname_ppm\n"
"\tpaper_s_x paper_s_y av_s_x av_s_y\n"
}
-int process_gen(int argc, char *argv[])
-{
- char *fname;
- int page;
- int pages_count;
- char *outfname_ppm;
- struct size_pts paper_size;
- struct size_px av_size;
- struct size_px shadow_size;
- int is_rotate90;
- int is_grayscale;
-
- struct preview_page_req settings_req;
- struct preview_settings_px settings_px;
-
- int res;
-
-
- if (argc < 12) {
- printf("ERROR in gen arguments count\n");
- return -1;
- }
-
- fname = argv[0];
- page = atoi(argv[1]);
- pages_count = atoi(argv[2]);
- outfname_ppm = argv[3];
-
- paper_size.x = atof(argv[4]);
- paper_size.y = atof(argv[5]);
-
- av_size.x = atoi(argv[6]);
- av_size.y = atoi(argv[7]);
-
- shadow_size.x = atoi(argv[8]);
- shadow_size.y = atoi(argv[9]);
-
- is_rotate90 = atoi(argv[10]);
- is_grayscale = atoi(argv[11]);
-
-
- settings_req.paper_size = paper_size;
- settings_req.available_size_px = av_size;
- settings_req.shadow_offset = shadow_size;
- settings_req.is_rotate90 = is_rotate90;
- settings_req.is_grayscale = is_grayscale;
-
- if (get_preview_settings(&settings_req, &settings_px) < 0) {
- printf("ERROR in settings\n");
- return -1;
- }
-
- res = save_pdf_preview_page_image_w_np_fname(fname, page, pages_count,
- &settings_px, outfname_ppm);
- if (res <= 0) {
- printf("ERROR in preview image generation\n");
- return -1;
- }
- printf("OK\n");
- return 0;
-}
-
-
int process_pagegen(int argc, char *argv[])
{
char *pdf_fname;
return -1;
}
- if (strcasecmp("gen", argv[1]) == 0)
- return process_gen(argc - 1, &(argv[2]));
-
if (strcasecmp("pagegen", argv[1]) == 0)
return process_pagegen(argc - 1, &(argv[2]));
BuildRequires: pkgconfig(syspopup-caller)
BuildRequires: pkgconfig(notification)
BuildRequires: pkgconfig(pmapi)
+BuildRequires: efl-assist-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Group: Development/Libraries
Requires: sys-assert
Requires: print-service
+Requires: efl-assist
%description -n org.tizen.mobileprint
Mobile Print application