summaryrefslogtreecommitdiff
path: root/home/res/edje/circle/apps_page.edc
blob: a8c4566205970e878f7c72194eb546a651e7b982 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*
 * Samsung API
 * Copyright (c) 2013 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 "apps_conf.edc"
#include "../color_classes.edc"



#define ITEM_CENTER_PART(part_name, rel_x, rel_y, off_x, off_y, align_x, align_y) \
	part { \
		name: "item_center_"part_name; \
		type: SWALLOW; \
		mouse_events: 1; \
		description { \
			state: "default" 0.0; \
			rel1 { relative: (rel_x) (rel_y); offset: off_x off_y; to: "bg"; } \
			rel2 { relative: (rel_x) (rel_y); offset: off_x off_y; to: "bg"; } \
			align: align_x align_y; \
			min: ITEM_WIDTH ITEM_HEIGHT; \
			fixed: 1 1; \
		} \
		description { \
			state: "edit" 0.0; \
			inherit: "default" 0.0; \
			min: ITEM_EDIT_WIDTH ITEM_EDIT_HEIGHT; \
		} \
	}

#define ITEM_CENTER_PROGRAM(part_name)  \
	program { \
		signal: "unedit"; \
		source: "item_center_"part_name; \
		action: STATE_SET "default" 0.0; \
		target: "item_center_"part_name; \
		transition: DECELERATE 0.1; \
	} \
	program { \
		signal: "edit"; \
		source: "item_center_"part_name; \
		action: STATE_SET "edit" 0.0; \
		target: "item_center_"part_name; \
		transition: DECELERATE 0.1; \
	}

#define ITEM_PART(part_name, pre_center, next_center) \
	part { \
		name: "item_"part_name; \
		type: SWALLOW; \
		scale: 1; \
		mouse_events: 1; \
		repeat_events: 1; \
		description { \
			state: "default" 0.0;	\
			visible: 1; \
			rel1 { relative: 0.5 0.5; to: "item_center_"part_name; } \
			rel2 { relative: 0.5 0.5; to: "item_center_"part_name; } \
			align: 0.5 0.5; \
			fixed: 1 1; \
		} \
		description { \
			state: "prev" 0.0;	\
			inherit: "default" 0.0;	\
			rel1 { relative: 0.5 0.5; to: "item_center_"pre_center; } \
			rel2 { relative: 0.5 0.5; to: "item_center_"pre_center; } \
		} \
		description { \
			state: "next" 0.0;	\
			inherit: "default" 0.0;	\
			rel1 { relative: 0.5 0.5; to: "item_center_"next_center; } \
			rel2 { relative: 0.5 0.5; to: "item_center_"next_center; } \
		} \
	}

#define ITEM_PROGRAM(part_name)  \
	program { \
		signal: "prev"; \
		source: "item_"part_name; \
		action: STATE_SET "prev" 0.0; \
		target: "item_"part_name; \
	} \
	program { \
		signal: "next"; \
		source: "item_"part_name; \
		action: STATE_SET "next" 0.0; \
		target: "item_"part_name; \
	} \
	program { \
		signal: "return"; \
		source: "item_"part_name; \
		action: STATE_SET "default" 0.0; \
		target: "item_"part_name; \
		transition: LINEAR 0.2; \
	}

collections {
	group {
		name: "page";
		parts {
			part {
				name: "bg";
				type: SWALLOW;
				scale: 1;
				description {
					state: "default" 0.0;
					rel1 { relative: 0.0 0.0; }
					rel2 { relative: 1.0 1.0; }
					visible: 0;
				}
			}

			ITEM_CENTER_PART("-1", -0.5, -0.5, 1, 0, 1.0, 0.5)
			ITEM_CENTER_PART("0", 0.5, 0.5, 0, 0, 0.5, 0.5)
			ITEM_CENTER_PART("1", 1.5, 1.5, 0, 0, 0.0, 0.5)

			ITEM_PART("0", "-1", "1")
		}
		programs {
			ITEM_CENTER_PROGRAM("-1");
			ITEM_CENTER_PROGRAM("0");
			ITEM_CENTER_PROGRAM("1");

			ITEM_PROGRAM("0")
		}
	} // group
} // collections