/* * Copyright 2012 Samsung Electronics Co., Ltd * * Licensed under the Flora License, Version 1.1 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://floralicense.org/license/ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "cam_funcs.edc" #include "../include/edc_image_name.h" #include "cam_toolbar_layout_inc.edc" #include "cam_setting_popup_layout_inc.edc" collections { group { name: "toolbar"; min: MAIN_W MAIN_H; parts { part { name: "bg"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; visible: 0; min: MAIN_W MAIN_H; max: MAIN_W MAIN_H; fixed: 1 1; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} } } TOOLBAR_BACKGROUND_IMAGE("left_bg", 0, 0, TOOLBAR_W, MAIN_H, LEFT_TOOLBAR_BG_IMAGE) TOOLBAR_BACKGROUND_IMAGE("right_bg", MAIN_W-TOOLBAR_W, 0, TOOLBAR_W, MAIN_H, RIGHT_TOOLBAR_BG_IMAGE) part { name: "popup_area"; type: SWALLOW; mouse_events: 0; scale: 1; description{ state:"default" 0.0; rel1{ relative: TOOLBAR_W/MAIN_W 0.0; to: "bg";} rel2{ relative: (MAIN_W-TOOLBAR_W)/MAIN_W 1.0; to: "bg";} } } part { name: "setting_popup"; type: SWALLOW; scale: 1; description{ state:"default" 0.0; rel1{ relative: TOOLBAR_W/MAIN_W 0.0; to: "bg";} rel2{ relative: (MAIN_W-TOOLBAR_W)/MAIN_W 1.0; to: "bg";} } } part { name: "shortcuts_popup"; type: SWALLOW; scale: 1; description{ state:"default" 0.0; rel1{ relative: TOOLBAR_W/MAIN_W 0.0; to: "bg";} rel2{ relative: (TOOLBAR_W+720)/MAIN_W (MAIN_H-120)/MAIN_H; to: "bg";} } } part { name: "shortcuts_popup_description"; type: SWALLOW; scale: 1; description{ state:"default" 0.0; rel1{ relative: TOOLBAR_W/MAIN_W (MAIN_H-120)/MAIN_H; to: "bg";} rel2{ relative: (TOOLBAR_W+720)/MAIN_W 1.0; to: "bg";} } } TOOLBAR_ITEM_BUTTON("toolbar_0_button", TOOLBAR_0_X, TOOLBAR_0_Y) TOOLBAR_ITEM_BUTTON("toolbar_1_button", TOOLBAR_1_X, TOOLBAR_1_Y) TOOLBAR_ITEM_BUTTON("toolbar_2_button", TOOLBAR_2_X, TOOLBAR_2_Y) TOOLBAR_ITEM_BUTTON("toolbar_3_button", TOOLBAR_3_X, TOOLBAR_3_Y) TOOLBAR_ITEM_BUTTON("toolbar_4_button", TOOLBAR_4_X, TOOLBAR_4_Y) TOOLBAR_ITEM_SWALLOW_ICON("toolbar_0_icon", TOOLBAR_0_X, TOOLBAR_0_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H) TOOLBAR_ITEM_SWALLOW_ICON("toolbar_1_icon", TOOLBAR_1_X, TOOLBAR_1_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H) TOOLBAR_ITEM_SWALLOW_ICON("toolbar_2_icon", TOOLBAR_2_X, TOOLBAR_2_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H) TOOLBAR_ITEM_SWALLOW_ICON("toolbar_3_icon", TOOLBAR_3_X, TOOLBAR_3_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H) TOOLBAR_ITEM_SWALLOW_ICON("toolbar_4_icon", TOOLBAR_4_X, TOOLBAR_4_Y, TOOLBAR_ITEM_W, TOOLBAR_ITEM_H) TOOLBAR_ITEM_SWALLOW_BUTTON("shutter_button", SHUTTER_X, SHUTTER_Y, SHUTTER_W, SHUTTER_H) TOOLBAR_ITEM_SWALLOW_BUTTON("recording_button", RECORDINGBTN_X, RECORDINGBTN_Y, RECORDINGBTN_W, RECORDINGBTN_H) TOOLBAR_ITEM_SWALLOW_BUTTON("recording_stop_button",REC_STOP_BTN_X, REC_STOP_BTN_Y, REC_STOP_BTN_W, REC_STOP_BTN_H) TOOLBAR_ITEM_SWALLOW_BUTTON("quickview_item", QUICKVIEW_X, QUICKVIEW_Y, QUICKVIEW_W, QUICKVIEW_H) TOOLBAR_ITEM_SWALLOW_BUTTON("backbutton_item", BACKBTN_X, BACKBTN_Y, BACKBTN_W, BACKBTN_H) TOOLBAR_ITEM_SWALLOW_BUTTON("cafbutton_item", CAF_BUTTON_X, CAF_BUTTON_Y, CAF_BUTTON_W, CAF_BUTTON_H) }/*end parts*/ programs { program { name: "toolbar_bg,show"; source: "prog"; signal: "toolbar_bg,show"; script: { set_state(PART:"left_bg", "default", 0.0); set_state(PART:"right_bg", "default", 0.0); } } program { name: "toolbar_bg,hide"; source: "prog"; signal: "toolbar_bg,hide"; script: { set_state(PART:"left_bg", "hide", 0.0); set_state(PART:"right_bg", "hide", 0.0); } } TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_0_button", "toolbar_0_icon", "toolbar_0_press_sig", "toolbar_0_release_sig", "toolbar_0_click_sig") TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_1_button", "toolbar_1_icon", "toolbar_1_press_sig", "toolbar_1_release_sig", "toolbar_1_click_sig") TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_2_button", "toolbar_2_icon", "toolbar_2_press_sig", "toolbar_2_release_sig", "toolbar_2_click_sig") TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_3_button", "toolbar_3_icon", "toolbar_3_press_sig", "toolbar_3_release_sig", "toolbar_3_click_sig") TOOLBAR_LEFT_ITEM_PROGRAM("toolbar_4_button", "toolbar_4_icon", "toolbar_4_press_sig", "toolbar_4_release_sig", "toolbar_4_click_sig") }/*end programs*/ }/*end group :toolbar*/ group { name: "shutter_button"; images { image: SHUTTER_NORMAL_IMAGE COMP; image: SHUTTER_PRESS_IMAGE COMP; image: SHUTTER_DIM_IMAGE COMP; } parts { part { name: "capture_button"; type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; align: 0.5 0.5; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} visible: 0; } description { state: "normal" 0.0; inherit: "default" 0.0; visible: 1; image { normal: SHUTTER_NORMAL_IMAGE; } } description { state: "press" 0.0; inherit: "default" 0.0; visible: 1; image { normal: SHUTTER_PRESS_IMAGE; } } description { state: "dim" 0.0; inherit: "default" 0.0; visible: 1; image { normal: SHUTTER_DIM_IMAGE; } } } part { name: "camera_icon"; type: SWALLOW; scale: 1; mouse_events: 0; description { state: "default" 0.0; aspect: 1.0 1.0; align: 0.5 0.5; max: 60 60; min: 60 60; fixed:1 1; rel1 { relative: 0.0 0.0; to: "capture_button";} rel2 { relative: 1.0 1.0; to: "capture_button";} visible: 1; } description { state: "normal" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "dim" 0.0; inherit: "default" 0.0; visible: 1; } } }/*end parts*/ programs { TOOLBAR_RIGHT_ITEM_PROGRAM("capture_button", "press_shutter_sig", "release_shutter_sig", "click_shutter_sig") program { name: "camera_icon,normal"; source: "prog"; signal: "camera_icon,normal"; script: { set_state(PART:"camera_icon", "normal", 0.0); } } program { name: "camera_icon,invisible"; source: "prog"; signal: "camera_icon,invisible"; script: { set_state(PART:"camera_icon", "dim", 0.0); } } }/*end programs*/ }/*end group*/ group { name: "recording_button"; images { image: CAMCORDER_SHUTTER_ICON_IMAGE COMP; image: CAMCORDER_SHUTTER_ICON_PRESS_IMAGE COMP; image: CAMCORDER_SHUTTER_ICON_DIM_IMAGE COMP; image: CAMCORDER_PAUSE_ICON_IMAGE COMP; image: CAMCORDER_PAUSE_ICON_PRESS_IMAGE COMP; } parts { part { name: "recording_button"; type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; align: 0.5 0.5; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} visible: 0; } description { state: "normal" 0.0; inherit: "default" 0.0; visible: 1; image { normal: CAMCORDER_SHUTTER_ICON_IMAGE; } } description { state: "press" 0.0; inherit: "default" 0.0; visible: 1; image { normal: CAMCORDER_SHUTTER_ICON_PRESS_IMAGE; } } description { state: "dim" 0.0; inherit: "default" 0.0; visible: 1; image { normal: CAMCORDER_SHUTTER_ICON_DIM_IMAGE; } } } part { name: "recording_pause_button"; type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; align: 0.5 0.5; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} visible: 0; } description { state: "normal" 0.0; inherit: "default" 0.0; visible: 1; image { normal: CAMCORDER_PAUSE_ICON_IMAGE; } } description { state: "press" 0.0; inherit: "default" 0.0; visible: 1; image { normal: CAMCORDER_PAUSE_ICON_PRESS_IMAGE; } } } }/*end parts*/ programs { TOOLBAR_RIGHT_ITEM_PROGRAM("recording_button", "press_shutter_sig", "release_shutter_sig", "click_shutter_sig") TOOLBAR_RIGHT_ITEM_PROGRAM("recording_pause_button", "press_shutter_sig", "release_shutter_sig", "click_shutter_sig") }/*end programs*/ }/*end group*/ group { name: "recording_stop_button"; images { image: CAMCORDER_STOP_ICON_IMAGE COMP; image: CAMCORDER_STOP_ICON_PRESS_IMAGE COMP; } parts { part { name: "recording_stop_button"; type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; align: 0.5 0.5; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} visible: 0; } description { state: "normal" 0.0; inherit: "default" 0.0; visible: 1; image { normal: CAMCORDER_STOP_ICON_IMAGE; } } description { state: "press" 0.0; inherit: "default" 0.0; visible: 1; image { normal: CAMCORDER_STOP_ICON_PRESS_IMAGE; } } } }/*end parts*/ programs { TOOLBAR_RIGHT_ITEM_PROGRAM("recording_stop_button", "press_shutter_sig", "release_shutter_sig", "click_shutter_sig") }/*end programs*/ }/*end group*/ group { name: "toolbar_quickview_item"; images { image: THUMBNAIL_BG_NORMAL_IMAGE COMP; } parts { part { name: "bg"; type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; align: 0.5 0.5; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} image { normal: THUMBNAIL_BG_NORMAL_IMAGE ; } } description { state: "invisible" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "thumbnail"; type: SWALLOW; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1 { relative: 1/9 1/9; to: "bg"; } rel2 { relative: 8/9 8/9; to: "bg"; } } description { state: "invisible" 0.0; inherit: "default" 0.0; visible: 0; } } part { name: "thumbnail_area"; /*note: just for c codes get thumbnail x,y,w,h*/ type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1 { relative: 0.0 0.0; to: "thumbnail"; } rel2 { relative: 1.0 1.0; to: "thumbnail"; } color: 0 0 0 0; } } }/*end parts*/ programs { program { name: "quickview_bg,mouse,down,1"; signal: "mouse,down,1"; source: "bg"; action: SIGNAL_EMIT "landscape,quickview,press" "toolbar_signal"; } program { name: "quickview_bg,mouse,up,1"; signal: "mouse,up,1"; source: "bg"; action: SIGNAL_EMIT "landscape,quickview,release" "toolbar_signal"; } program { name: "prog_set_default"; source: "prog"; signal: "SET_DEFAULT"; script: { set_state(PART:"bg", "default", 0.0); set_state(PART:"thumbnail", "default", 0.0); } } program { name: "prog_set_invisible"; source: "prog"; signal: "SET_INVISIBLE"; script: { set_state(PART:"bg", "invisible", 0.0); set_state(PART:"thumbnail", "invisible", 0.0); } } }/*end programs*/ }/*end toolbar_quickview_item*/ group{ name: "toolbar_backbutton_item"; images{ image: BACK_BUTTON_NORMAL_IMAGE COMP; image: BACK_BUTTON_PRESS_IMAGE COMP; } parts{ part{ name: "back_button"; type: IMAGE; mouse_events: 1; scale: 1; description{ state: "default" 0.0; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} image { normal : BACK_BUTTON_NORMAL_IMAGE; } } description{ state: "press" 0.0; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} image { normal : BACK_BUTTON_PRESS_IMAGE; } } } }/*end parts*/ programs { program { name: "back_button_press"; signal: "mouse,down,1"; source: "back_button"; action: STATE_SET "press" 0.0; target: "back_button"; } program { name: "back_button_release"; signal: "mouse,up,1"; source: "back_button"; action: STATE_SET "default" 0.0; target: "back_button"; } program { name: "back_button_clicked"; signal: "mouse,clicked,1"; source: "back_button"; action: SIGNAL_EMIT "landscape,backbutton,clicked" "toolbar_signal"; } }/*end programs*/ }/*end toolbar_backbutton_item*/ group{ name: "toolbar_cafbutton_item"; parts{ part{ name: "caf_button"; type: IMAGE; scale: 1; mouse_events: 1; description{ state: "default" 0.0; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} visible: 0; } description{ state: "normal" 0.0; inherit: "default" 0.0; visible: 1; image { normal : CAF_BUTTON_NORMAL_IMAGE; } } description{ state: "press" 0.0; inherit: "default" 0.0; visible: 1; image { normal : CAF_BUTTON_PRESS_IMAGE; } } } }/*end parts*/ programs { program { name: "caf_button_press"; signal: "mouse,down,1"; source: "caf_button"; action: STATE_SET "press" 0.0; target: "caf_button"; } program { name: "caf_button_release"; signal: "mouse,up,1"; source: "caf_button"; action: STATE_SET "normal" 0.0; target: "caf_button"; } program { name: "caf_button_clicked"; signal: "mouse,clicked,1"; source: "caf_button"; action: SIGNAL_EMIT "caf_button,clicked" "toolbar_signal"; } program { name: "caf_button_normal"; source: "prog"; signal: "caf_button,normal"; script: { set_state(PART:"caf_button", "normal", 0.0); } } program { name: "caf_button_default"; source: "prog"; signal: "caf_button,invisible"; script: { set_state(PART:"caf_button", "default", 0.0); } } }/*end programs*/ }/*end toolbar_cafbutton_item*/ group{ name: "toolbar_capture_button_item"; images{ image: SNAPSHOT_PRESS_IMAGE COMP; image: SNAPSHOT_NORMAL_IMAGE COMP; } parts{ part{ name: "capture_button"; type: IMAGE; mouse_events: 1; scale: 1; description{ state: "default" 0.0; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} image { normal : SNAPSHOT_NORMAL_IMAGE; } } description{ state: "press" 0.0; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} image { normal : SNAPSHOT_PRESS_IMAGE; } } } }/*end parts*/ programs { program { name: "capture_button_press"; signal: "mouse,down,1"; source: "capture_button"; action: STATE_SET "press" 0.0; target: "capture_button"; } program { name: "capture_button_release"; signal: "mouse,up,1"; source: "capture_button"; action: STATE_SET "default" 0.0; target: "capture_button"; } program { name: "capture_button_clicked"; signal: "mouse,clicked,1"; source: "capture_button"; action: SIGNAL_EMIT "capture_button_click" "capture_button_click"; } }/*end programs*/ } }/*end collections*/ //end file