/* * Copyright 2012 Samsung Electronics Co., Ltd * * Licensed under the Flora License, Version 1.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.tizenopensource.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 "image_res.edc" #include "vp_font.edc" #define CONTROL_BUTTON_PRESS_PART(_name_ , _w_ , _h_ , _align_x_ , _align_y_ , _rel_x1_ , _rel_x2_ , _rel_y1_, _rel_y2_ , _img_def_ , _img_press_ ) \ part { \ name: _name_; \ type: IMAGE; \ scale: 1; \ mouse_events: 1; \ description { \ state: "default" 0.0; \ min: _w_ _h_; \ fixed: 1 1; \ visible: 0; \ align: _align_x_ _align_y_; \ rel1 { relative: _rel_x1_ _rel_y1_; } \ rel2 { relative: _rel_x2_ _rel_y2_; } \ image { normal: _img_def_; border: 4 4 0 0;} \ color: 255 255 255 255; \ } \ description { \ state: "pressed" 0.0; \ visible: 1; \ min: _w_ _h_; \ fixed: 1 1; \ align: _align_x_ _align_y_; \ rel1 { relative: _rel_x1_ _rel_y1_; } \ rel2 { relative: _rel_x2_ _rel_y2_; } \ image { normal: _img_press_; border: 4 4 0 0;} \ color: 255 255 255 255; \ } \ description { \ state: "hide" 0.0; \ inherit: "default" 0.0; \ visible: 0; \ } \ } /* CONTROL_BUTTON_PRESS_PART */ #define CONTROL_BUTTON_PROG(_item_name_) \ program { \ name: _item_name_".pressed"; \ source: _item_name_; \ signal: "mouse,down,1"; \ action: STATE_SET "pressed" 0.0; \ target: _item_name_; \ after: "send."_item_name_".down.signal"; \ } \ program { \ name: _item_name_".clicked"; \ source: _item_name_; \ signal: "mouse,up,1"; \ action: STATE_SET "default" 0.0; \ target: _item_name_; \ after: "send."_item_name_".up.signal"; \ } \ program { \ name: "send."_item_name_".down.signal"; \ action: SIGNAL_EMIT "signal."_item_name_".down" _item_name_; \ } \ program { \ name: "send."_item_name_".up.signal"; \ action: SIGNAL_EMIT "signal."_item_name_".up" _item_name_; \ } /* CONTROL_BUTTON_PROG */ collections { group { name: "option"; script { public val_screensize_check = 0; /* 0: reduce, 1: full */ public change_screensize() { if(get_int(val_screensize_check) == 0) { set_int(val_screensize_check, 1); set_state(PART:"option.screensize", "reduce", 0.0); run_program(PROGRAM:"send.screensize.expand"); } else { set_int(val_screensize_check, 0); set_state(PART:"option.screensize", "default", 0.0); run_program(PROGRAM:"send.screensize.normal"); } } } parts { part { name: "option.rect"; type: RECT; mouse_events: 0; scale: 1; description { state: "default" 0.0; rel1 { relative: 0.0 0.0;} rel2 { relative: 1.0 1.0;} color: 255 255 255 0; } } CONTROL_BUTTON_PRESS_PART("option.screensize.button.bg", 74 ,74, 0.0, 0.0, 0.05, 0.05, 0.114, 0.114, "T01_controller_btn.png" , "T01_controller_btn_press.png"); part { name: "option.screensize"; type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; visible: 1; min: 74 74; fixed: 1 1; align: 0.0 0.0; rel1 { relative: 0.05 0.114; } rel2 { relative: 0.05 0.114; } image { normal: "T01_control_icon_fullscreen.png"; } color: 255 255 255 255; } description { state: "reduce" 0.0; inherit: "default" 0.0; visible: 1; image { normal: "T01_control_icon_reduce.png"; } } description { state: "hide" 0.0; inherit: "default" 0.0; visible: 0; } } CONTROL_BUTTON_PRESS_PART("option.detail.button.bg", 74 ,74, 1.0, 0.0, 0.95, 0.95, 0.114, 0.114, "T01_controller_btn.png" , "T01_controller_btn_press.png"); part { name: "option.detail"; type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; visible: 1; min: 74 74; fixed: 1 1; align: 1.0 0.0; rel1 { relative: 0.95 0.114; } rel2 { relative: 0.95 0.114; } image { normal: "T01_control_icon_detail.png"; } color: 255 255 255 255; } description { state: "hide" 0.0; inherit: "default" 0.0; visible: 0; } } programs { CONTROL_BUTTON_PROG("option.screensize"); CONTROL_BUTTON_PROG("option.detail"); program { signal: "signal.option.screensize.down"; source: "*"; action: STATE_SET "pressed" 0.0; target: "option.screensize.button.bg"; } program { signal: "signal.option.screensize.up"; source: "*"; action: STATE_SET "hide" 0.0; target: "option.screensize.button.bg"; after: "option.screensize.change"; } program { name: "option.screensize.change"; script: { change_screensize(); } } program { name: "send.screensize.normal"; action: SIGNAL_EMIT "signal.option.screensize.normal" "option.screensize"; } program { name: "send.screensize.expand"; action: SIGNAL_EMIT "signal.option.screensize.expand" "option.screensize"; } program { signal: "signal.option.detail.down"; source: "*"; action: STATE_SET "pressed" 0.0; target: "option.detail.button.bg"; } program { signal: "signal.option.detail.up"; source: "*"; action: STATE_SET "hide" 0.0; target: "option.detail.button.bg"; } program { signal: "signal.option.mode.streaming"; source: "*"; action: STATE_SET "hide" 0.0; target: "option.detail"; target: "option.detail.button.bg"; } } //programs } //parts } //group } //collections