diff options
Diffstat (limited to '')
98 files changed, 0 insertions, 16009 deletions
diff --git a/libraries/elementary/src/examples/Makefile.am b/libraries/elementary/src/examples/Makefile.am deleted file mode 100644 index 966d64a..0000000 --- a/libraries/elementary/src/examples/Makefile.am +++ /dev/null | |||
@@ -1,361 +0,0 @@ | |||
1 | MAINTAINERCLEANFILES = Makefile.in | ||
2 | |||
3 | .PHONY: screenshots | ||
4 | |||
5 | examplesdir = $(pkgdatadir)/examples | ||
6 | filesdir = $(pkgdatadir)/examples | ||
7 | files_DATA = | ||
8 | |||
9 | AM_CPPFLAGS = \ | ||
10 | -Wno-unused-parameter \ | ||
11 | -I. \ | ||
12 | -I$(top_srcdir)/src/lib \ | ||
13 | -I$(top_builddir)/src/lib \ | ||
14 | -DPACKAGE_DATA_DIR="\"$(pkgdatadir)\"" \ | ||
15 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | ||
16 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | ||
17 | @ELEMENTARY_EDBUS_CFLAGS@ \ | ||
18 | @ELEMENTARY_EFREET_CFLAGS@ \ | ||
19 | @ELEMENTARY_ETHUMB_CFLAGS@ \ | ||
20 | @ELEMENTARY_EMAP_CFLAGS@ \ | ||
21 | @ELEMENTARY_X_CFLAGS@ \ | ||
22 | @ELEMENTARY_CFLAGS@ | ||
23 | |||
24 | LDADD = \ | ||
25 | @ELEMENTARY_LIBS@ \ | ||
26 | @ELEMENTARY_ETHUMB_LIBS@ \ | ||
27 | @ELEMENTARY_X_LIBS@ \ | ||
28 | $(top_builddir)/src/lib/libelementary.la | ||
29 | |||
30 | EDJE_CC = @edje_cc@ | ||
31 | EDJE_FLAGS_VERBOSE_ = | ||
32 | EDJE_FLAGS_VERBOSE_0 = | ||
33 | EDJE_FLAGS_VERBOSE_1 = -v | ||
34 | EDJE_FLAGS = $(EDJE_FLAGS_$(V)) | ||
35 | |||
36 | SRCS = \ | ||
37 | actionslider_example_01.c \ | ||
38 | bg_example_01.c \ | ||
39 | bg_example_02.c \ | ||
40 | bg_example_03.c \ | ||
41 | box_example_02.c \ | ||
42 | bubble_example_01.c \ | ||
43 | button_example_00.c \ | ||
44 | button_example_01.c \ | ||
45 | calendar_example_01.c \ | ||
46 | calendar_example_02.c \ | ||
47 | calendar_example_03.c \ | ||
48 | calendar_example_04.c \ | ||
49 | calendar_example_05.c \ | ||
50 | calendar_example_06.c \ | ||
51 | check_example_01.c \ | ||
52 | clock_example.c \ | ||
53 | colorselector_example_01.c \ | ||
54 | conformant_example_01.c \ | ||
55 | conformant_example_02.c \ | ||
56 | ctxpopup_example_01.c \ | ||
57 | datetime_example.c \ | ||
58 | dayselector_example.c \ | ||
59 | diskselector_example_01.c \ | ||
60 | diskselector_example_02.c \ | ||
61 | efl_thread_1.c \ | ||
62 | efl_thread_2.c \ | ||
63 | efl_thread_3.c \ | ||
64 | efl_thread_4.c \ | ||
65 | efl_thread_5.c \ | ||
66 | efl_thread_6.c \ | ||
67 | efl_thread_win32_1.c \ | ||
68 | efl_thread_win32_2.c \ | ||
69 | efl_thread_win32_3.c \ | ||
70 | efl_thread_win32_4.c \ | ||
71 | entry_example.c \ | ||
72 | fileselector_button_example.c \ | ||
73 | fileselector_entry_example.c \ | ||
74 | fileselector_example.c \ | ||
75 | flip_example_01.c \ | ||
76 | flipselector_example.c \ | ||
77 | frame_example_01.c \ | ||
78 | general_funcs_example.c \ | ||
79 | gengrid_example.c \ | ||
80 | genlist_example_01.c \ | ||
81 | genlist_example_02.c \ | ||
82 | genlist_example_03.c \ | ||
83 | genlist_example_04.c \ | ||
84 | genlist_example_05.c \ | ||
85 | hover_example_01.c \ | ||
86 | hoversel_example_01.c \ | ||
87 | icon_example_01.c \ | ||
88 | image_example_01.c \ | ||
89 | index_example_01.c \ | ||
90 | index_example_02.c \ | ||
91 | inwin_example.c \ | ||
92 | label_example_01.c \ | ||
93 | layout_example.edc \ | ||
94 | layout_example_01.c \ | ||
95 | layout_example_02.c \ | ||
96 | layout_example_03.c \ | ||
97 | list_example_01.c \ | ||
98 | list_example_02.c \ | ||
99 | list_example_03.c \ | ||
100 | map_example_01.c \ | ||
101 | map_example_02.c \ | ||
102 | map_example_03.c \ | ||
103 | mapbuf_example.c \ | ||
104 | menu_example_01.c \ | ||
105 | notify_example_01.c \ | ||
106 | panes_example.c \ | ||
107 | panel_example_01.c \ | ||
108 | photocam_example_01.c \ | ||
109 | popup_example_01.c \ | ||
110 | popup_example_02.c \ | ||
111 | popup_example_03.c \ | ||
112 | progressbar_example.c \ | ||
113 | radio_example_01.c \ | ||
114 | segment_control_example.c \ | ||
115 | separator_example_01.c \ | ||
116 | slider_example.c \ | ||
117 | slideshow_example.c \ | ||
118 | spinner_example.c \ | ||
119 | scroller_example_01.c \ | ||
120 | table_example_01.c \ | ||
121 | table_example_02.c \ | ||
122 | theme_example.edc \ | ||
123 | theme_example_01.c \ | ||
124 | theme_example_02.c \ | ||
125 | thumb_example_01.c \ | ||
126 | toolbar_example_01.c \ | ||
127 | toolbar_example_02.c \ | ||
128 | toolbar_example_03.c \ | ||
129 | transit_example_01.c \ | ||
130 | transit_example_02.c \ | ||
131 | transit_example_03.c \ | ||
132 | transit_example_04.c \ | ||
133 | web_example.c \ | ||
134 | win_example.c | ||
135 | |||
136 | .edc.edj: | ||
137 | $(EDJE_CC) $(EDJE_FLAGS) $< $@ | ||
138 | |||
139 | if EFL_INSTALL_EXAMPLES | ||
140 | files_DATA += $(SRCS) \ | ||
141 | dict.txt | ||
142 | endif | ||
143 | |||
144 | if EFL_BUILD_EXAMPLES | ||
145 | files_DATA += \ | ||
146 | theme_example.edj \ | ||
147 | layout_example.edj | ||
148 | |||
149 | clean-local: | ||
150 | rm -f *.edj | ||
151 | |||
152 | examples_PROGRAMS = \ | ||
153 | actionslider_example_01 \ | ||
154 | bg_example_01 \ | ||
155 | bg_example_02 \ | ||
156 | bg_example_03 \ | ||
157 | box_example_02 \ | ||
158 | bubble_example_01 \ | ||
159 | button_example_00 \ | ||
160 | button_example_01 \ | ||
161 | calendar_example_01 \ | ||
162 | calendar_example_02 \ | ||
163 | calendar_example_03 \ | ||
164 | calendar_example_04 \ | ||
165 | calendar_example_05 \ | ||
166 | calendar_example_06 \ | ||
167 | check_example_01 \ | ||
168 | clock_example \ | ||
169 | colorselector_example_01 \ | ||
170 | conformant_example_01 \ | ||
171 | conformant_example_02 \ | ||
172 | ctxpopup_example_01 \ | ||
173 | datetime_example \ | ||
174 | dayselector_example \ | ||
175 | diskselector_example_01 \ | ||
176 | diskselector_example_02 \ | ||
177 | efl_thread_1 \ | ||
178 | efl_thread_2 \ | ||
179 | efl_thread_3 \ | ||
180 | efl_thread_4 \ | ||
181 | efl_thread_5 \ | ||
182 | efl_thread_6 \ | ||
183 | entry_example \ | ||
184 | fileselector_button_example \ | ||
185 | fileselector_entry_example \ | ||
186 | fileselector_example \ | ||
187 | flip_example_01 \ | ||
188 | flipselector_example \ | ||
189 | frame_example_01 \ | ||
190 | general_funcs_example \ | ||
191 | gengrid_example \ | ||
192 | genlist_example_01 \ | ||
193 | genlist_example_02 \ | ||
194 | genlist_example_03 \ | ||
195 | genlist_example_04 \ | ||
196 | genlist_example_05 \ | ||
197 | hover_example_01 \ | ||
198 | hoversel_example_01 \ | ||
199 | icon_example_01 \ | ||
200 | image_example_01 \ | ||
201 | index_example_01 \ | ||
202 | index_example_02 \ | ||
203 | inwin_example \ | ||
204 | label_example_01 \ | ||
205 | layout_example_01 \ | ||
206 | layout_example_02 \ | ||
207 | layout_example_03 \ | ||
208 | list_example_01 \ | ||
209 | list_example_02 \ | ||
210 | list_example_03 \ | ||
211 | map_example_01 \ | ||
212 | map_example_02 \ | ||
213 | map_example_03 \ | ||
214 | mapbuf_example \ | ||
215 | menu_example_01 \ | ||
216 | notify_example_01 \ | ||
217 | panes_example \ | ||
218 | panel_example_01 \ | ||
219 | photocam_example_01 \ | ||
220 | popup_example_01 \ | ||
221 | popup_example_02 \ | ||
222 | popup_example_03 \ | ||
223 | progressbar_example \ | ||
224 | radio_example_01 \ | ||
225 | segment_control_example \ | ||
226 | separator_example_01 \ | ||
227 | slider_example \ | ||
228 | slideshow_example \ | ||
229 | spinner_example \ | ||
230 | scroller_example_01 \ | ||
231 | table_example_01 \ | ||
232 | table_example_02 \ | ||
233 | theme_example_01 \ | ||
234 | theme_example_02 \ | ||
235 | thumb_example_01 \ | ||
236 | toolbar_example_01 \ | ||
237 | toolbar_example_02 \ | ||
238 | toolbar_example_03 \ | ||
239 | transit_example_01 \ | ||
240 | transit_example_02 \ | ||
241 | transit_example_03 \ | ||
242 | transit_example_04 \ | ||
243 | web_example \ | ||
244 | win_example | ||
245 | |||
246 | if ELEMENTARY_WINDOWS_BUILD | ||
247 | efl_thread_1_SOURCES = efl_thread_win32_1.c | ||
248 | efl_thread_2_SOURCES = efl_thread_win32_2.c | ||
249 | efl_thread_3_SOURCES = efl_thread_win32_3.c | ||
250 | efl_thread_4_SOURCES = efl_thread_win32_4.c | ||
251 | else | ||
252 | efl_thread_1_SOURCES = efl_thread_1.c | ||
253 | efl_thread_2_SOURCES = efl_thread_2.c | ||
254 | efl_thread_3_SOURCES = efl_thread_3.c | ||
255 | efl_thread_4_SOURCES = efl_thread_4.c | ||
256 | endif | ||
257 | |||
258 | # This variable will hold the list of screenshots that will be made | ||
259 | # by "make screenshots". Each item in the list is of the form: | ||
260 | # <example executable>:<screenshot filename>:<delay in seconds> | ||
261 | SCREENSHOTS = \ | ||
262 | actionslider_example_01:actionslider_01.png:0.0 \ | ||
263 | bg_example_02:bg_01.png:0.0 \ | ||
264 | box_example_02:box_example_02.png:1.3 \ | ||
265 | bubble_example_01:bubble_example_01.png:0.0 \ | ||
266 | button_example_00:button_00.png:0.0 \ | ||
267 | button_example_01:button_01.png:0.0 \ | ||
268 | check_example_01:check_example_01.png:0.0 \ | ||
269 | colorselector_example_01:colorselector_example_01.png:0.0 \ | ||
270 | animator_example_01:animator_example_01.png:0.2 \ | ||
271 | animator_example_01:animator_example_02.png:0.5 \ | ||
272 | animator_example_01:animator_example_03.png:0.9 \ | ||
273 | flip_example_01:flip_example_01.png:0.0 \ | ||
274 | frame_example_01:frame_example_01.png:0.0 \ | ||
275 | hover_example_01:hover_example_01.png:0.0 \ | ||
276 | hoversel_example_01:hoversel_example_01.png:0.0 \ | ||
277 | label_example_01:label_example_01.png:0.0 \ | ||
278 | theme_example_01:theme_example_01.png:0.0 \ | ||
279 | conformant_example_01:conformant_example_01.png:0.0 \ | ||
280 | conformant_example_02:conformant_example_02.png:0.0 \ | ||
281 | calendar_example_01:calendar_example_01.png:0.0 \ | ||
282 | calendar_example_02:calendar_example_02.png:0.0 \ | ||
283 | calendar_example_03:calendar_example_03.png:0.0 \ | ||
284 | calendar_example_04:calendar_example_04.png:0.0 \ | ||
285 | calendar_example_05:calendar_example_05.png:0.0 \ | ||
286 | calendar_example_06:calendar_example_06.png:0.0 \ | ||
287 | datetime_example:datetime_example.png:0.0 \ | ||
288 | map_example_01:map_example_01.png:2 \ | ||
289 | map_example_02:map_example_02.png:2.5 \ | ||
290 | map_example_03:map_example_03.png:2 \ | ||
291 | toolbar_example_01:toolbar_example_01.png:0.0 \ | ||
292 | toolbar_example_02:toolbar_example_02.png:1 \ | ||
293 | toolbar_example_03:toolbar_example_03.png:1 \ | ||
294 | spinner_example:spinner_example.png:0.0 \ | ||
295 | clock_example:clock_example.png:0.5 \ | ||
296 | dayselector_example:dayselector_example.png:0.0 \ | ||
297 | mapbuf_example:mapbuf_example.png:0.0 \ | ||
298 | image_example_01:image_example_01.png:0.0 \ | ||
299 | diskselector_example_01:diskselector_example_01.png:0.2 \ | ||
300 | diskselector_example_02:diskselector_example_02.png:0.2 \ | ||
301 | icon_example_01:icon_example_01.png:0.0 \ | ||
302 | layout_example_01:layout_example_01.png:0.0 \ | ||
303 | layout_example_02:layout_example_02.png:0.0 \ | ||
304 | layout_example_03:layout_example_03.png:0.0 \ | ||
305 | list_example_01:list_example_01.png:0.0 \ | ||
306 | list_example_02:list_example_02.png:0.0 \ | ||
307 | list_example_03:list_example_03.png:0.0 \ | ||
308 | segment_control_example:segment_control_example.png:0.0 \ | ||
309 | flipselector_example:flipselector_example.png:0.0 \ | ||
310 | fileselector_example:fileselector_example.png:0.0 \ | ||
311 | index_example_02:index_example_03.png:0.3 \ | ||
312 | slider_example:slider_example.png:0.0 \ | ||
313 | panes_example:panes_example.png:0.0 \ | ||
314 | ctxpopup_example_01:ctxpopup_example_01.png:0.0 \ | ||
315 | separator_example_01:separator_example_01.png:0.0 \ | ||
316 | radio_example_01:radio_example_01.png:0.0 \ | ||
317 | panel_example_01:panel_example_01.png:0.0 \ | ||
318 | gengrid_example:gengrid_example.png:0.0 \ | ||
319 | genlist_example_01:genlist_example_01.png:0.1 \ | ||
320 | genlist_example_02:genlist_example_02.png:0.1 \ | ||
321 | genlist_example_03:genlist_example_03.png:0.1 \ | ||
322 | genlist_example_04:genlist_example_04.png:0.1 \ | ||
323 | genlist_example_05:genlist_example_05.png:0.1 \ | ||
324 | thumb_example_01:thumb_example_01.png:0.5 \ | ||
325 | entry_example:entry_example.png:0.0 \ | ||
326 | progressbar_example:progressbar_example.png:0.0 \ | ||
327 | notify_example_01:notify_example_01.png:0.0 \ | ||
328 | notify_example_01:notify_example_01_a.png:6.0 \ | ||
329 | popup_example_01:popup_example_01.png:1.0 \ | ||
330 | popup_example_01:popup_example_01_a.png:6.0 \ | ||
331 | popup_example_02:popup_example_02.png:0.2 \ | ||
332 | popup_example_03:popup_example_03.png:0.2 \ | ||
333 | slideshow_example:slideshow_example.png:1.0 \ | ||
334 | photocam_example_01:photocam_example_01.png:3 \ | ||
335 | scroller_example_01:scroller_example_01.png:0.0 \ | ||
336 | inwin_example:inwin_example.png:0.0 \ | ||
337 | inwin_example:inwin_example_a.png:0.2 \ | ||
338 | table_example_01:table_example_01.png:0.0 \ | ||
339 | table_example_02:table_example_02.png:0.0 \ | ||
340 | menu_example_01:menu_example_01.png:0.5 | ||
341 | |||
342 | HTML_SS_DIR=$(top_builddir)/doc/html/screenshots | ||
343 | LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots | ||
344 | screenshots: all | ||
345 | @mkdir -p $(HTML_SS_DIR) | ||
346 | @mkdir -p $(LATEX_SS_DIR) | ||
347 | @for ss in $(SCREENSHOTS); do \ | ||
348 | SS_ENTRY=($${ss//:/ }) ; \ | ||
349 | EXAMPLE=$${SS_ENTRY[0]} ; \ | ||
350 | SS_FILE=$${SS_ENTRY[1]} ; \ | ||
351 | SS_DELAY=$${SS_ENTRY[2]} ; \ | ||
352 | ILLUME_KBD=0,0,240,123 ILLUME_IND=0,0,240,32 ILLUME_STK=0,288,240,32 ELM_ENGINE="shot:delay=$${SS_DELAY}:file=$(HTML_SS_DIR)/$${SS_FILE}" ./$${EXAMPLE} ; \ | ||
353 | convert $(HTML_SS_DIR)/$${SS_FILE} $(LATEX_SS_DIR)/$${SS_FILE/.png/.eps} ; \ | ||
354 | done | ||
355 | |||
356 | else | ||
357 | |||
358 | screenshots: | ||
359 | @echo "Examples are not built. Run \"./configure --enable-build-examples\" first." | ||
360 | |||
361 | endif | ||
diff --git a/libraries/elementary/src/examples/Makefile.in b/libraries/elementary/src/examples/Makefile.in deleted file mode 100644 index d75244c..0000000 --- a/libraries/elementary/src/examples/Makefile.in +++ /dev/null | |||
@@ -1,1909 +0,0 @@ | |||
1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | ||
6 | # Inc. | ||
7 | # This Makefile.in is free software; the Free Software Foundation | ||
8 | # gives unlimited permission to copy and/or distribute it, | ||
9 | # with or without modifications, as long as this notice is preserved. | ||
10 | |||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
14 | # PARTICULAR PURPOSE. | ||
15 | |||
16 | @SET_MAKE@ | ||
17 | |||
18 | |||
19 | VPATH = @srcdir@ | ||
20 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
21 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
22 | pkglibdir = $(libdir)/@PACKAGE@ | ||
23 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
24 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
25 | install_sh_DATA = $(install_sh) -c -m 644 | ||
26 | install_sh_PROGRAM = $(install_sh) -c | ||
27 | install_sh_SCRIPT = $(install_sh) -c | ||
28 | INSTALL_HEADER = $(INSTALL_DATA) | ||
29 | transform = $(program_transform_name) | ||
30 | NORMAL_INSTALL = : | ||
31 | PRE_INSTALL = : | ||
32 | POST_INSTALL = : | ||
33 | NORMAL_UNINSTALL = : | ||
34 | PRE_UNINSTALL = : | ||
35 | POST_UNINSTALL = : | ||
36 | build_triplet = @build@ | ||
37 | host_triplet = @host@ | ||
38 | @EFL_INSTALL_EXAMPLES_TRUE@am__append_1 = $(SRCS) \ | ||
39 | @EFL_INSTALL_EXAMPLES_TRUE@ dict.txt | ||
40 | |||
41 | @EFL_BUILD_EXAMPLES_TRUE@am__append_2 = \ | ||
42 | @EFL_BUILD_EXAMPLES_TRUE@ theme_example.edj \ | ||
43 | @EFL_BUILD_EXAMPLES_TRUE@ layout_example.edj | ||
44 | |||
45 | @EFL_BUILD_EXAMPLES_TRUE@examples_PROGRAMS = \ | ||
46 | @EFL_BUILD_EXAMPLES_TRUE@ actionslider_example_01$(EXEEXT) \ | ||
47 | @EFL_BUILD_EXAMPLES_TRUE@ bg_example_01$(EXEEXT) \ | ||
48 | @EFL_BUILD_EXAMPLES_TRUE@ bg_example_02$(EXEEXT) \ | ||
49 | @EFL_BUILD_EXAMPLES_TRUE@ bg_example_03$(EXEEXT) \ | ||
50 | @EFL_BUILD_EXAMPLES_TRUE@ box_example_02$(EXEEXT) \ | ||
51 | @EFL_BUILD_EXAMPLES_TRUE@ bubble_example_01$(EXEEXT) \ | ||
52 | @EFL_BUILD_EXAMPLES_TRUE@ button_example_00$(EXEEXT) \ | ||
53 | @EFL_BUILD_EXAMPLES_TRUE@ button_example_01$(EXEEXT) \ | ||
54 | @EFL_BUILD_EXAMPLES_TRUE@ calendar_example_01$(EXEEXT) \ | ||
55 | @EFL_BUILD_EXAMPLES_TRUE@ calendar_example_02$(EXEEXT) \ | ||
56 | @EFL_BUILD_EXAMPLES_TRUE@ calendar_example_03$(EXEEXT) \ | ||
57 | @EFL_BUILD_EXAMPLES_TRUE@ calendar_example_04$(EXEEXT) \ | ||
58 | @EFL_BUILD_EXAMPLES_TRUE@ calendar_example_05$(EXEEXT) \ | ||
59 | @EFL_BUILD_EXAMPLES_TRUE@ calendar_example_06$(EXEEXT) \ | ||
60 | @EFL_BUILD_EXAMPLES_TRUE@ check_example_01$(EXEEXT) \ | ||
61 | @EFL_BUILD_EXAMPLES_TRUE@ clock_example$(EXEEXT) \ | ||
62 | @EFL_BUILD_EXAMPLES_TRUE@ colorselector_example_01$(EXEEXT) \ | ||
63 | @EFL_BUILD_EXAMPLES_TRUE@ conformant_example_01$(EXEEXT) \ | ||
64 | @EFL_BUILD_EXAMPLES_TRUE@ conformant_example_02$(EXEEXT) \ | ||
65 | @EFL_BUILD_EXAMPLES_TRUE@ ctxpopup_example_01$(EXEEXT) \ | ||
66 | @EFL_BUILD_EXAMPLES_TRUE@ datetime_example$(EXEEXT) \ | ||
67 | @EFL_BUILD_EXAMPLES_TRUE@ dayselector_example$(EXEEXT) \ | ||
68 | @EFL_BUILD_EXAMPLES_TRUE@ diskselector_example_01$(EXEEXT) \ | ||
69 | @EFL_BUILD_EXAMPLES_TRUE@ diskselector_example_02$(EXEEXT) \ | ||
70 | @EFL_BUILD_EXAMPLES_TRUE@ efl_thread_1$(EXEEXT) \ | ||
71 | @EFL_BUILD_EXAMPLES_TRUE@ efl_thread_2$(EXEEXT) \ | ||
72 | @EFL_BUILD_EXAMPLES_TRUE@ efl_thread_3$(EXEEXT) \ | ||
73 | @EFL_BUILD_EXAMPLES_TRUE@ efl_thread_4$(EXEEXT) \ | ||
74 | @EFL_BUILD_EXAMPLES_TRUE@ efl_thread_5$(EXEEXT) \ | ||
75 | @EFL_BUILD_EXAMPLES_TRUE@ efl_thread_6$(EXEEXT) \ | ||
76 | @EFL_BUILD_EXAMPLES_TRUE@ entry_example$(EXEEXT) \ | ||
77 | @EFL_BUILD_EXAMPLES_TRUE@ fileselector_button_example$(EXEEXT) \ | ||
78 | @EFL_BUILD_EXAMPLES_TRUE@ fileselector_entry_example$(EXEEXT) \ | ||
79 | @EFL_BUILD_EXAMPLES_TRUE@ fileselector_example$(EXEEXT) \ | ||
80 | @EFL_BUILD_EXAMPLES_TRUE@ flip_example_01$(EXEEXT) \ | ||
81 | @EFL_BUILD_EXAMPLES_TRUE@ flipselector_example$(EXEEXT) \ | ||
82 | @EFL_BUILD_EXAMPLES_TRUE@ frame_example_01$(EXEEXT) \ | ||
83 | @EFL_BUILD_EXAMPLES_TRUE@ general_funcs_example$(EXEEXT) \ | ||
84 | @EFL_BUILD_EXAMPLES_TRUE@ gengrid_example$(EXEEXT) \ | ||
85 | @EFL_BUILD_EXAMPLES_TRUE@ genlist_example_01$(EXEEXT) \ | ||
86 | @EFL_BUILD_EXAMPLES_TRUE@ genlist_example_02$(EXEEXT) \ | ||
87 | @EFL_BUILD_EXAMPLES_TRUE@ genlist_example_03$(EXEEXT) \ | ||
88 | @EFL_BUILD_EXAMPLES_TRUE@ genlist_example_04$(EXEEXT) \ | ||
89 | @EFL_BUILD_EXAMPLES_TRUE@ genlist_example_05$(EXEEXT) \ | ||
90 | @EFL_BUILD_EXAMPLES_TRUE@ hover_example_01$(EXEEXT) \ | ||
91 | @EFL_BUILD_EXAMPLES_TRUE@ hoversel_example_01$(EXEEXT) \ | ||
92 | @EFL_BUILD_EXAMPLES_TRUE@ icon_example_01$(EXEEXT) \ | ||
93 | @EFL_BUILD_EXAMPLES_TRUE@ image_example_01$(EXEEXT) \ | ||
94 | @EFL_BUILD_EXAMPLES_TRUE@ index_example_01$(EXEEXT) \ | ||
95 | @EFL_BUILD_EXAMPLES_TRUE@ index_example_02$(EXEEXT) \ | ||
96 | @EFL_BUILD_EXAMPLES_TRUE@ inwin_example$(EXEEXT) \ | ||
97 | @EFL_BUILD_EXAMPLES_TRUE@ label_example_01$(EXEEXT) \ | ||
98 | @EFL_BUILD_EXAMPLES_TRUE@ layout_example_01$(EXEEXT) \ | ||
99 | @EFL_BUILD_EXAMPLES_TRUE@ layout_example_02$(EXEEXT) \ | ||
100 | @EFL_BUILD_EXAMPLES_TRUE@ layout_example_03$(EXEEXT) \ | ||
101 | @EFL_BUILD_EXAMPLES_TRUE@ list_example_01$(EXEEXT) \ | ||
102 | @EFL_BUILD_EXAMPLES_TRUE@ list_example_02$(EXEEXT) \ | ||
103 | @EFL_BUILD_EXAMPLES_TRUE@ list_example_03$(EXEEXT) \ | ||
104 | @EFL_BUILD_EXAMPLES_TRUE@ map_example_01$(EXEEXT) \ | ||
105 | @EFL_BUILD_EXAMPLES_TRUE@ map_example_02$(EXEEXT) \ | ||
106 | @EFL_BUILD_EXAMPLES_TRUE@ map_example_03$(EXEEXT) \ | ||
107 | @EFL_BUILD_EXAMPLES_TRUE@ mapbuf_example$(EXEEXT) \ | ||
108 | @EFL_BUILD_EXAMPLES_TRUE@ menu_example_01$(EXEEXT) \ | ||
109 | @EFL_BUILD_EXAMPLES_TRUE@ notify_example_01$(EXEEXT) \ | ||
110 | @EFL_BUILD_EXAMPLES_TRUE@ panes_example$(EXEEXT) \ | ||
111 | @EFL_BUILD_EXAMPLES_TRUE@ panel_example_01$(EXEEXT) \ | ||
112 | @EFL_BUILD_EXAMPLES_TRUE@ photocam_example_01$(EXEEXT) \ | ||
113 | @EFL_BUILD_EXAMPLES_TRUE@ popup_example_01$(EXEEXT) \ | ||
114 | @EFL_BUILD_EXAMPLES_TRUE@ popup_example_02$(EXEEXT) \ | ||
115 | @EFL_BUILD_EXAMPLES_TRUE@ popup_example_03$(EXEEXT) \ | ||
116 | @EFL_BUILD_EXAMPLES_TRUE@ progressbar_example$(EXEEXT) \ | ||
117 | @EFL_BUILD_EXAMPLES_TRUE@ radio_example_01$(EXEEXT) \ | ||
118 | @EFL_BUILD_EXAMPLES_TRUE@ segment_control_example$(EXEEXT) \ | ||
119 | @EFL_BUILD_EXAMPLES_TRUE@ separator_example_01$(EXEEXT) \ | ||
120 | @EFL_BUILD_EXAMPLES_TRUE@ slider_example$(EXEEXT) \ | ||
121 | @EFL_BUILD_EXAMPLES_TRUE@ slideshow_example$(EXEEXT) \ | ||
122 | @EFL_BUILD_EXAMPLES_TRUE@ spinner_example$(EXEEXT) \ | ||
123 | @EFL_BUILD_EXAMPLES_TRUE@ scroller_example_01$(EXEEXT) \ | ||
124 | @EFL_BUILD_EXAMPLES_TRUE@ table_example_01$(EXEEXT) \ | ||
125 | @EFL_BUILD_EXAMPLES_TRUE@ table_example_02$(EXEEXT) \ | ||
126 | @EFL_BUILD_EXAMPLES_TRUE@ theme_example_01$(EXEEXT) \ | ||
127 | @EFL_BUILD_EXAMPLES_TRUE@ theme_example_02$(EXEEXT) \ | ||
128 | @EFL_BUILD_EXAMPLES_TRUE@ thumb_example_01$(EXEEXT) \ | ||
129 | @EFL_BUILD_EXAMPLES_TRUE@ toolbar_example_01$(EXEEXT) \ | ||
130 | @EFL_BUILD_EXAMPLES_TRUE@ toolbar_example_02$(EXEEXT) \ | ||
131 | @EFL_BUILD_EXAMPLES_TRUE@ toolbar_example_03$(EXEEXT) \ | ||
132 | @EFL_BUILD_EXAMPLES_TRUE@ transit_example_01$(EXEEXT) \ | ||
133 | @EFL_BUILD_EXAMPLES_TRUE@ transit_example_02$(EXEEXT) \ | ||
134 | @EFL_BUILD_EXAMPLES_TRUE@ transit_example_03$(EXEEXT) \ | ||
135 | @EFL_BUILD_EXAMPLES_TRUE@ transit_example_04$(EXEEXT) \ | ||
136 | @EFL_BUILD_EXAMPLES_TRUE@ web_example$(EXEEXT) \ | ||
137 | @EFL_BUILD_EXAMPLES_TRUE@ win_example$(EXEEXT) | ||
138 | subdir = src/examples | ||
139 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
140 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
141 | am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | ||
142 | $(top_srcdir)/m4/efl_binary.m4 \ | ||
143 | $(top_srcdir)/m4/efl_compiler_flag.m4 \ | ||
144 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
145 | $(top_srcdir)/m4/efl_examples.m4 \ | ||
146 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/gettext.m4 \ | ||
147 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ | ||
148 | $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ | ||
149 | $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
150 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ | ||
151 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ | ||
152 | $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ | ||
153 | $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac | ||
154 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
155 | $(ACLOCAL_M4) | ||
156 | mkinstalldirs = $(install_sh) -d | ||
157 | CONFIG_HEADER = $(top_builddir)/elementary_config.h | ||
158 | CONFIG_CLEAN_FILES = | ||
159 | CONFIG_CLEAN_VPATH_FILES = | ||
160 | am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" | ||
161 | PROGRAMS = $(examples_PROGRAMS) | ||
162 | actionslider_example_01_SOURCES = actionslider_example_01.c | ||
163 | actionslider_example_01_OBJECTS = actionslider_example_01.$(OBJEXT) | ||
164 | actionslider_example_01_LDADD = $(LDADD) | ||
165 | actionslider_example_01_DEPENDENCIES = \ | ||
166 | $(top_builddir)/src/lib/libelementary.la | ||
167 | AM_V_lt = $(am__v_lt_$(V)) | ||
168 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
169 | am__v_lt_0 = --silent | ||
170 | bg_example_01_SOURCES = bg_example_01.c | ||
171 | bg_example_01_OBJECTS = bg_example_01.$(OBJEXT) | ||
172 | bg_example_01_LDADD = $(LDADD) | ||
173 | bg_example_01_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
174 | bg_example_02_SOURCES = bg_example_02.c | ||
175 | bg_example_02_OBJECTS = bg_example_02.$(OBJEXT) | ||
176 | bg_example_02_LDADD = $(LDADD) | ||
177 | bg_example_02_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
178 | bg_example_03_SOURCES = bg_example_03.c | ||
179 | bg_example_03_OBJECTS = bg_example_03.$(OBJEXT) | ||
180 | bg_example_03_LDADD = $(LDADD) | ||
181 | bg_example_03_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
182 | box_example_02_SOURCES = box_example_02.c | ||
183 | box_example_02_OBJECTS = box_example_02.$(OBJEXT) | ||
184 | box_example_02_LDADD = $(LDADD) | ||
185 | box_example_02_DEPENDENCIES = \ | ||
186 | $(top_builddir)/src/lib/libelementary.la | ||
187 | bubble_example_01_SOURCES = bubble_example_01.c | ||
188 | bubble_example_01_OBJECTS = bubble_example_01.$(OBJEXT) | ||
189 | bubble_example_01_LDADD = $(LDADD) | ||
190 | bubble_example_01_DEPENDENCIES = \ | ||
191 | $(top_builddir)/src/lib/libelementary.la | ||
192 | button_example_00_SOURCES = button_example_00.c | ||
193 | button_example_00_OBJECTS = button_example_00.$(OBJEXT) | ||
194 | button_example_00_LDADD = $(LDADD) | ||
195 | button_example_00_DEPENDENCIES = \ | ||
196 | $(top_builddir)/src/lib/libelementary.la | ||
197 | button_example_01_SOURCES = button_example_01.c | ||
198 | button_example_01_OBJECTS = button_example_01.$(OBJEXT) | ||
199 | button_example_01_LDADD = $(LDADD) | ||
200 | button_example_01_DEPENDENCIES = \ | ||
201 | $(top_builddir)/src/lib/libelementary.la | ||
202 | calendar_example_01_SOURCES = calendar_example_01.c | ||
203 | calendar_example_01_OBJECTS = calendar_example_01.$(OBJEXT) | ||
204 | calendar_example_01_LDADD = $(LDADD) | ||
205 | calendar_example_01_DEPENDENCIES = \ | ||
206 | $(top_builddir)/src/lib/libelementary.la | ||
207 | calendar_example_02_SOURCES = calendar_example_02.c | ||
208 | calendar_example_02_OBJECTS = calendar_example_02.$(OBJEXT) | ||
209 | calendar_example_02_LDADD = $(LDADD) | ||
210 | calendar_example_02_DEPENDENCIES = \ | ||
211 | $(top_builddir)/src/lib/libelementary.la | ||
212 | calendar_example_03_SOURCES = calendar_example_03.c | ||
213 | calendar_example_03_OBJECTS = calendar_example_03.$(OBJEXT) | ||
214 | calendar_example_03_LDADD = $(LDADD) | ||
215 | calendar_example_03_DEPENDENCIES = \ | ||
216 | $(top_builddir)/src/lib/libelementary.la | ||
217 | calendar_example_04_SOURCES = calendar_example_04.c | ||
218 | calendar_example_04_OBJECTS = calendar_example_04.$(OBJEXT) | ||
219 | calendar_example_04_LDADD = $(LDADD) | ||
220 | calendar_example_04_DEPENDENCIES = \ | ||
221 | $(top_builddir)/src/lib/libelementary.la | ||
222 | calendar_example_05_SOURCES = calendar_example_05.c | ||
223 | calendar_example_05_OBJECTS = calendar_example_05.$(OBJEXT) | ||
224 | calendar_example_05_LDADD = $(LDADD) | ||
225 | calendar_example_05_DEPENDENCIES = \ | ||
226 | $(top_builddir)/src/lib/libelementary.la | ||
227 | calendar_example_06_SOURCES = calendar_example_06.c | ||
228 | calendar_example_06_OBJECTS = calendar_example_06.$(OBJEXT) | ||
229 | calendar_example_06_LDADD = $(LDADD) | ||
230 | calendar_example_06_DEPENDENCIES = \ | ||
231 | $(top_builddir)/src/lib/libelementary.la | ||
232 | check_example_01_SOURCES = check_example_01.c | ||
233 | check_example_01_OBJECTS = check_example_01.$(OBJEXT) | ||
234 | check_example_01_LDADD = $(LDADD) | ||
235 | check_example_01_DEPENDENCIES = \ | ||
236 | $(top_builddir)/src/lib/libelementary.la | ||
237 | clock_example_SOURCES = clock_example.c | ||
238 | clock_example_OBJECTS = clock_example.$(OBJEXT) | ||
239 | clock_example_LDADD = $(LDADD) | ||
240 | clock_example_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
241 | colorselector_example_01_SOURCES = colorselector_example_01.c | ||
242 | colorselector_example_01_OBJECTS = colorselector_example_01.$(OBJEXT) | ||
243 | colorselector_example_01_LDADD = $(LDADD) | ||
244 | colorselector_example_01_DEPENDENCIES = \ | ||
245 | $(top_builddir)/src/lib/libelementary.la | ||
246 | conformant_example_01_SOURCES = conformant_example_01.c | ||
247 | conformant_example_01_OBJECTS = conformant_example_01.$(OBJEXT) | ||
248 | conformant_example_01_LDADD = $(LDADD) | ||
249 | conformant_example_01_DEPENDENCIES = \ | ||
250 | $(top_builddir)/src/lib/libelementary.la | ||
251 | conformant_example_02_SOURCES = conformant_example_02.c | ||
252 | conformant_example_02_OBJECTS = conformant_example_02.$(OBJEXT) | ||
253 | conformant_example_02_LDADD = $(LDADD) | ||
254 | conformant_example_02_DEPENDENCIES = \ | ||
255 | $(top_builddir)/src/lib/libelementary.la | ||
256 | ctxpopup_example_01_SOURCES = ctxpopup_example_01.c | ||
257 | ctxpopup_example_01_OBJECTS = ctxpopup_example_01.$(OBJEXT) | ||
258 | ctxpopup_example_01_LDADD = $(LDADD) | ||
259 | ctxpopup_example_01_DEPENDENCIES = \ | ||
260 | $(top_builddir)/src/lib/libelementary.la | ||
261 | datetime_example_SOURCES = datetime_example.c | ||
262 | datetime_example_OBJECTS = datetime_example.$(OBJEXT) | ||
263 | datetime_example_LDADD = $(LDADD) | ||
264 | datetime_example_DEPENDENCIES = \ | ||
265 | $(top_builddir)/src/lib/libelementary.la | ||
266 | dayselector_example_SOURCES = dayselector_example.c | ||
267 | dayselector_example_OBJECTS = dayselector_example.$(OBJEXT) | ||
268 | dayselector_example_LDADD = $(LDADD) | ||
269 | dayselector_example_DEPENDENCIES = \ | ||
270 | $(top_builddir)/src/lib/libelementary.la | ||
271 | diskselector_example_01_SOURCES = diskselector_example_01.c | ||
272 | diskselector_example_01_OBJECTS = diskselector_example_01.$(OBJEXT) | ||
273 | diskselector_example_01_LDADD = $(LDADD) | ||
274 | diskselector_example_01_DEPENDENCIES = \ | ||
275 | $(top_builddir)/src/lib/libelementary.la | ||
276 | diskselector_example_02_SOURCES = diskselector_example_02.c | ||
277 | diskselector_example_02_OBJECTS = diskselector_example_02.$(OBJEXT) | ||
278 | diskselector_example_02_LDADD = $(LDADD) | ||
279 | diskselector_example_02_DEPENDENCIES = \ | ||
280 | $(top_builddir)/src/lib/libelementary.la | ||
281 | am__efl_thread_1_SOURCES_DIST = efl_thread_1.c efl_thread_win32_1.c | ||
282 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_FALSE@am_efl_thread_1_OBJECTS = efl_thread_1.$(OBJEXT) | ||
283 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_TRUE@am_efl_thread_1_OBJECTS = efl_thread_win32_1.$(OBJEXT) | ||
284 | efl_thread_1_OBJECTS = $(am_efl_thread_1_OBJECTS) | ||
285 | efl_thread_1_LDADD = $(LDADD) | ||
286 | efl_thread_1_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
287 | am__efl_thread_2_SOURCES_DIST = efl_thread_2.c efl_thread_win32_2.c | ||
288 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_FALSE@am_efl_thread_2_OBJECTS = efl_thread_2.$(OBJEXT) | ||
289 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_TRUE@am_efl_thread_2_OBJECTS = efl_thread_win32_2.$(OBJEXT) | ||
290 | efl_thread_2_OBJECTS = $(am_efl_thread_2_OBJECTS) | ||
291 | efl_thread_2_LDADD = $(LDADD) | ||
292 | efl_thread_2_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
293 | am__efl_thread_3_SOURCES_DIST = efl_thread_3.c efl_thread_win32_3.c | ||
294 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_FALSE@am_efl_thread_3_OBJECTS = efl_thread_3.$(OBJEXT) | ||
295 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_TRUE@am_efl_thread_3_OBJECTS = efl_thread_win32_3.$(OBJEXT) | ||
296 | efl_thread_3_OBJECTS = $(am_efl_thread_3_OBJECTS) | ||
297 | efl_thread_3_LDADD = $(LDADD) | ||
298 | efl_thread_3_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
299 | am__efl_thread_4_SOURCES_DIST = efl_thread_4.c efl_thread_win32_4.c | ||
300 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_FALSE@am_efl_thread_4_OBJECTS = efl_thread_4.$(OBJEXT) | ||
301 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_TRUE@am_efl_thread_4_OBJECTS = efl_thread_win32_4.$(OBJEXT) | ||
302 | efl_thread_4_OBJECTS = $(am_efl_thread_4_OBJECTS) | ||
303 | efl_thread_4_LDADD = $(LDADD) | ||
304 | efl_thread_4_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
305 | efl_thread_5_SOURCES = efl_thread_5.c | ||
306 | efl_thread_5_OBJECTS = efl_thread_5.$(OBJEXT) | ||
307 | efl_thread_5_LDADD = $(LDADD) | ||
308 | efl_thread_5_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
309 | efl_thread_6_SOURCES = efl_thread_6.c | ||
310 | efl_thread_6_OBJECTS = efl_thread_6.$(OBJEXT) | ||
311 | efl_thread_6_LDADD = $(LDADD) | ||
312 | efl_thread_6_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
313 | entry_example_SOURCES = entry_example.c | ||
314 | entry_example_OBJECTS = entry_example.$(OBJEXT) | ||
315 | entry_example_LDADD = $(LDADD) | ||
316 | entry_example_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
317 | fileselector_button_example_SOURCES = fileselector_button_example.c | ||
318 | fileselector_button_example_OBJECTS = \ | ||
319 | fileselector_button_example.$(OBJEXT) | ||
320 | fileselector_button_example_LDADD = $(LDADD) | ||
321 | fileselector_button_example_DEPENDENCIES = \ | ||
322 | $(top_builddir)/src/lib/libelementary.la | ||
323 | fileselector_entry_example_SOURCES = fileselector_entry_example.c | ||
324 | fileselector_entry_example_OBJECTS = \ | ||
325 | fileselector_entry_example.$(OBJEXT) | ||
326 | fileselector_entry_example_LDADD = $(LDADD) | ||
327 | fileselector_entry_example_DEPENDENCIES = \ | ||
328 | $(top_builddir)/src/lib/libelementary.la | ||
329 | fileselector_example_SOURCES = fileselector_example.c | ||
330 | fileselector_example_OBJECTS = fileselector_example.$(OBJEXT) | ||
331 | fileselector_example_LDADD = $(LDADD) | ||
332 | fileselector_example_DEPENDENCIES = \ | ||
333 | $(top_builddir)/src/lib/libelementary.la | ||
334 | flip_example_01_SOURCES = flip_example_01.c | ||
335 | flip_example_01_OBJECTS = flip_example_01.$(OBJEXT) | ||
336 | flip_example_01_LDADD = $(LDADD) | ||
337 | flip_example_01_DEPENDENCIES = \ | ||
338 | $(top_builddir)/src/lib/libelementary.la | ||
339 | flipselector_example_SOURCES = flipselector_example.c | ||
340 | flipselector_example_OBJECTS = flipselector_example.$(OBJEXT) | ||
341 | flipselector_example_LDADD = $(LDADD) | ||
342 | flipselector_example_DEPENDENCIES = \ | ||
343 | $(top_builddir)/src/lib/libelementary.la | ||
344 | frame_example_01_SOURCES = frame_example_01.c | ||
345 | frame_example_01_OBJECTS = frame_example_01.$(OBJEXT) | ||
346 | frame_example_01_LDADD = $(LDADD) | ||
347 | frame_example_01_DEPENDENCIES = \ | ||
348 | $(top_builddir)/src/lib/libelementary.la | ||
349 | general_funcs_example_SOURCES = general_funcs_example.c | ||
350 | general_funcs_example_OBJECTS = general_funcs_example.$(OBJEXT) | ||
351 | general_funcs_example_LDADD = $(LDADD) | ||
352 | general_funcs_example_DEPENDENCIES = \ | ||
353 | $(top_builddir)/src/lib/libelementary.la | ||
354 | gengrid_example_SOURCES = gengrid_example.c | ||
355 | gengrid_example_OBJECTS = gengrid_example.$(OBJEXT) | ||
356 | gengrid_example_LDADD = $(LDADD) | ||
357 | gengrid_example_DEPENDENCIES = \ | ||
358 | $(top_builddir)/src/lib/libelementary.la | ||
359 | genlist_example_01_SOURCES = genlist_example_01.c | ||
360 | genlist_example_01_OBJECTS = genlist_example_01.$(OBJEXT) | ||
361 | genlist_example_01_LDADD = $(LDADD) | ||
362 | genlist_example_01_DEPENDENCIES = \ | ||
363 | $(top_builddir)/src/lib/libelementary.la | ||
364 | genlist_example_02_SOURCES = genlist_example_02.c | ||
365 | genlist_example_02_OBJECTS = genlist_example_02.$(OBJEXT) | ||
366 | genlist_example_02_LDADD = $(LDADD) | ||
367 | genlist_example_02_DEPENDENCIES = \ | ||
368 | $(top_builddir)/src/lib/libelementary.la | ||
369 | genlist_example_03_SOURCES = genlist_example_03.c | ||
370 | genlist_example_03_OBJECTS = genlist_example_03.$(OBJEXT) | ||
371 | genlist_example_03_LDADD = $(LDADD) | ||
372 | genlist_example_03_DEPENDENCIES = \ | ||
373 | $(top_builddir)/src/lib/libelementary.la | ||
374 | genlist_example_04_SOURCES = genlist_example_04.c | ||
375 | genlist_example_04_OBJECTS = genlist_example_04.$(OBJEXT) | ||
376 | genlist_example_04_LDADD = $(LDADD) | ||
377 | genlist_example_04_DEPENDENCIES = \ | ||
378 | $(top_builddir)/src/lib/libelementary.la | ||
379 | genlist_example_05_SOURCES = genlist_example_05.c | ||
380 | genlist_example_05_OBJECTS = genlist_example_05.$(OBJEXT) | ||
381 | genlist_example_05_LDADD = $(LDADD) | ||
382 | genlist_example_05_DEPENDENCIES = \ | ||
383 | $(top_builddir)/src/lib/libelementary.la | ||
384 | hover_example_01_SOURCES = hover_example_01.c | ||
385 | hover_example_01_OBJECTS = hover_example_01.$(OBJEXT) | ||
386 | hover_example_01_LDADD = $(LDADD) | ||
387 | hover_example_01_DEPENDENCIES = \ | ||
388 | $(top_builddir)/src/lib/libelementary.la | ||
389 | hoversel_example_01_SOURCES = hoversel_example_01.c | ||
390 | hoversel_example_01_OBJECTS = hoversel_example_01.$(OBJEXT) | ||
391 | hoversel_example_01_LDADD = $(LDADD) | ||
392 | hoversel_example_01_DEPENDENCIES = \ | ||
393 | $(top_builddir)/src/lib/libelementary.la | ||
394 | icon_example_01_SOURCES = icon_example_01.c | ||
395 | icon_example_01_OBJECTS = icon_example_01.$(OBJEXT) | ||
396 | icon_example_01_LDADD = $(LDADD) | ||
397 | icon_example_01_DEPENDENCIES = \ | ||
398 | $(top_builddir)/src/lib/libelementary.la | ||
399 | image_example_01_SOURCES = image_example_01.c | ||
400 | image_example_01_OBJECTS = image_example_01.$(OBJEXT) | ||
401 | image_example_01_LDADD = $(LDADD) | ||
402 | image_example_01_DEPENDENCIES = \ | ||
403 | $(top_builddir)/src/lib/libelementary.la | ||
404 | index_example_01_SOURCES = index_example_01.c | ||
405 | index_example_01_OBJECTS = index_example_01.$(OBJEXT) | ||
406 | index_example_01_LDADD = $(LDADD) | ||
407 | index_example_01_DEPENDENCIES = \ | ||
408 | $(top_builddir)/src/lib/libelementary.la | ||
409 | index_example_02_SOURCES = index_example_02.c | ||
410 | index_example_02_OBJECTS = index_example_02.$(OBJEXT) | ||
411 | index_example_02_LDADD = $(LDADD) | ||
412 | index_example_02_DEPENDENCIES = \ | ||
413 | $(top_builddir)/src/lib/libelementary.la | ||
414 | inwin_example_SOURCES = inwin_example.c | ||
415 | inwin_example_OBJECTS = inwin_example.$(OBJEXT) | ||
416 | inwin_example_LDADD = $(LDADD) | ||
417 | inwin_example_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
418 | label_example_01_SOURCES = label_example_01.c | ||
419 | label_example_01_OBJECTS = label_example_01.$(OBJEXT) | ||
420 | label_example_01_LDADD = $(LDADD) | ||
421 | label_example_01_DEPENDENCIES = \ | ||
422 | $(top_builddir)/src/lib/libelementary.la | ||
423 | layout_example_01_SOURCES = layout_example_01.c | ||
424 | layout_example_01_OBJECTS = layout_example_01.$(OBJEXT) | ||
425 | layout_example_01_LDADD = $(LDADD) | ||
426 | layout_example_01_DEPENDENCIES = \ | ||
427 | $(top_builddir)/src/lib/libelementary.la | ||
428 | layout_example_02_SOURCES = layout_example_02.c | ||
429 | layout_example_02_OBJECTS = layout_example_02.$(OBJEXT) | ||
430 | layout_example_02_LDADD = $(LDADD) | ||
431 | layout_example_02_DEPENDENCIES = \ | ||
432 | $(top_builddir)/src/lib/libelementary.la | ||
433 | layout_example_03_SOURCES = layout_example_03.c | ||
434 | layout_example_03_OBJECTS = layout_example_03.$(OBJEXT) | ||
435 | layout_example_03_LDADD = $(LDADD) | ||
436 | layout_example_03_DEPENDENCIES = \ | ||
437 | $(top_builddir)/src/lib/libelementary.la | ||
438 | list_example_01_SOURCES = list_example_01.c | ||
439 | list_example_01_OBJECTS = list_example_01.$(OBJEXT) | ||
440 | list_example_01_LDADD = $(LDADD) | ||
441 | list_example_01_DEPENDENCIES = \ | ||
442 | $(top_builddir)/src/lib/libelementary.la | ||
443 | list_example_02_SOURCES = list_example_02.c | ||
444 | list_example_02_OBJECTS = list_example_02.$(OBJEXT) | ||
445 | list_example_02_LDADD = $(LDADD) | ||
446 | list_example_02_DEPENDENCIES = \ | ||
447 | $(top_builddir)/src/lib/libelementary.la | ||
448 | list_example_03_SOURCES = list_example_03.c | ||
449 | list_example_03_OBJECTS = list_example_03.$(OBJEXT) | ||
450 | list_example_03_LDADD = $(LDADD) | ||
451 | list_example_03_DEPENDENCIES = \ | ||
452 | $(top_builddir)/src/lib/libelementary.la | ||
453 | map_example_01_SOURCES = map_example_01.c | ||
454 | map_example_01_OBJECTS = map_example_01.$(OBJEXT) | ||
455 | map_example_01_LDADD = $(LDADD) | ||
456 | map_example_01_DEPENDENCIES = \ | ||
457 | $(top_builddir)/src/lib/libelementary.la | ||
458 | map_example_02_SOURCES = map_example_02.c | ||
459 | map_example_02_OBJECTS = map_example_02.$(OBJEXT) | ||
460 | map_example_02_LDADD = $(LDADD) | ||
461 | map_example_02_DEPENDENCIES = \ | ||
462 | $(top_builddir)/src/lib/libelementary.la | ||
463 | map_example_03_SOURCES = map_example_03.c | ||
464 | map_example_03_OBJECTS = map_example_03.$(OBJEXT) | ||
465 | map_example_03_LDADD = $(LDADD) | ||
466 | map_example_03_DEPENDENCIES = \ | ||
467 | $(top_builddir)/src/lib/libelementary.la | ||
468 | mapbuf_example_SOURCES = mapbuf_example.c | ||
469 | mapbuf_example_OBJECTS = mapbuf_example.$(OBJEXT) | ||
470 | mapbuf_example_LDADD = $(LDADD) | ||
471 | mapbuf_example_DEPENDENCIES = \ | ||
472 | $(top_builddir)/src/lib/libelementary.la | ||
473 | menu_example_01_SOURCES = menu_example_01.c | ||
474 | menu_example_01_OBJECTS = menu_example_01.$(OBJEXT) | ||
475 | menu_example_01_LDADD = $(LDADD) | ||
476 | menu_example_01_DEPENDENCIES = \ | ||
477 | $(top_builddir)/src/lib/libelementary.la | ||
478 | notify_example_01_SOURCES = notify_example_01.c | ||
479 | notify_example_01_OBJECTS = notify_example_01.$(OBJEXT) | ||
480 | notify_example_01_LDADD = $(LDADD) | ||
481 | notify_example_01_DEPENDENCIES = \ | ||
482 | $(top_builddir)/src/lib/libelementary.la | ||
483 | panel_example_01_SOURCES = panel_example_01.c | ||
484 | panel_example_01_OBJECTS = panel_example_01.$(OBJEXT) | ||
485 | panel_example_01_LDADD = $(LDADD) | ||
486 | panel_example_01_DEPENDENCIES = \ | ||
487 | $(top_builddir)/src/lib/libelementary.la | ||
488 | panes_example_SOURCES = panes_example.c | ||
489 | panes_example_OBJECTS = panes_example.$(OBJEXT) | ||
490 | panes_example_LDADD = $(LDADD) | ||
491 | panes_example_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
492 | photocam_example_01_SOURCES = photocam_example_01.c | ||
493 | photocam_example_01_OBJECTS = photocam_example_01.$(OBJEXT) | ||
494 | photocam_example_01_LDADD = $(LDADD) | ||
495 | photocam_example_01_DEPENDENCIES = \ | ||
496 | $(top_builddir)/src/lib/libelementary.la | ||
497 | popup_example_01_SOURCES = popup_example_01.c | ||
498 | popup_example_01_OBJECTS = popup_example_01.$(OBJEXT) | ||
499 | popup_example_01_LDADD = $(LDADD) | ||
500 | popup_example_01_DEPENDENCIES = \ | ||
501 | $(top_builddir)/src/lib/libelementary.la | ||
502 | popup_example_02_SOURCES = popup_example_02.c | ||
503 | popup_example_02_OBJECTS = popup_example_02.$(OBJEXT) | ||
504 | popup_example_02_LDADD = $(LDADD) | ||
505 | popup_example_02_DEPENDENCIES = \ | ||
506 | $(top_builddir)/src/lib/libelementary.la | ||
507 | popup_example_03_SOURCES = popup_example_03.c | ||
508 | popup_example_03_OBJECTS = popup_example_03.$(OBJEXT) | ||
509 | popup_example_03_LDADD = $(LDADD) | ||
510 | popup_example_03_DEPENDENCIES = \ | ||
511 | $(top_builddir)/src/lib/libelementary.la | ||
512 | progressbar_example_SOURCES = progressbar_example.c | ||
513 | progressbar_example_OBJECTS = progressbar_example.$(OBJEXT) | ||
514 | progressbar_example_LDADD = $(LDADD) | ||
515 | progressbar_example_DEPENDENCIES = \ | ||
516 | $(top_builddir)/src/lib/libelementary.la | ||
517 | radio_example_01_SOURCES = radio_example_01.c | ||
518 | radio_example_01_OBJECTS = radio_example_01.$(OBJEXT) | ||
519 | radio_example_01_LDADD = $(LDADD) | ||
520 | radio_example_01_DEPENDENCIES = \ | ||
521 | $(top_builddir)/src/lib/libelementary.la | ||
522 | scroller_example_01_SOURCES = scroller_example_01.c | ||
523 | scroller_example_01_OBJECTS = scroller_example_01.$(OBJEXT) | ||
524 | scroller_example_01_LDADD = $(LDADD) | ||
525 | scroller_example_01_DEPENDENCIES = \ | ||
526 | $(top_builddir)/src/lib/libelementary.la | ||
527 | segment_control_example_SOURCES = segment_control_example.c | ||
528 | segment_control_example_OBJECTS = segment_control_example.$(OBJEXT) | ||
529 | segment_control_example_LDADD = $(LDADD) | ||
530 | segment_control_example_DEPENDENCIES = \ | ||
531 | $(top_builddir)/src/lib/libelementary.la | ||
532 | separator_example_01_SOURCES = separator_example_01.c | ||
533 | separator_example_01_OBJECTS = separator_example_01.$(OBJEXT) | ||
534 | separator_example_01_LDADD = $(LDADD) | ||
535 | separator_example_01_DEPENDENCIES = \ | ||
536 | $(top_builddir)/src/lib/libelementary.la | ||
537 | slider_example_SOURCES = slider_example.c | ||
538 | slider_example_OBJECTS = slider_example.$(OBJEXT) | ||
539 | slider_example_LDADD = $(LDADD) | ||
540 | slider_example_DEPENDENCIES = \ | ||
541 | $(top_builddir)/src/lib/libelementary.la | ||
542 | slideshow_example_SOURCES = slideshow_example.c | ||
543 | slideshow_example_OBJECTS = slideshow_example.$(OBJEXT) | ||
544 | slideshow_example_LDADD = $(LDADD) | ||
545 | slideshow_example_DEPENDENCIES = \ | ||
546 | $(top_builddir)/src/lib/libelementary.la | ||
547 | spinner_example_SOURCES = spinner_example.c | ||
548 | spinner_example_OBJECTS = spinner_example.$(OBJEXT) | ||
549 | spinner_example_LDADD = $(LDADD) | ||
550 | spinner_example_DEPENDENCIES = \ | ||
551 | $(top_builddir)/src/lib/libelementary.la | ||
552 | table_example_01_SOURCES = table_example_01.c | ||
553 | table_example_01_OBJECTS = table_example_01.$(OBJEXT) | ||
554 | table_example_01_LDADD = $(LDADD) | ||
555 | table_example_01_DEPENDENCIES = \ | ||
556 | $(top_builddir)/src/lib/libelementary.la | ||
557 | table_example_02_SOURCES = table_example_02.c | ||
558 | table_example_02_OBJECTS = table_example_02.$(OBJEXT) | ||
559 | table_example_02_LDADD = $(LDADD) | ||
560 | table_example_02_DEPENDENCIES = \ | ||
561 | $(top_builddir)/src/lib/libelementary.la | ||
562 | theme_example_01_SOURCES = theme_example_01.c | ||
563 | theme_example_01_OBJECTS = theme_example_01.$(OBJEXT) | ||
564 | theme_example_01_LDADD = $(LDADD) | ||
565 | theme_example_01_DEPENDENCIES = \ | ||
566 | $(top_builddir)/src/lib/libelementary.la | ||
567 | theme_example_02_SOURCES = theme_example_02.c | ||
568 | theme_example_02_OBJECTS = theme_example_02.$(OBJEXT) | ||
569 | theme_example_02_LDADD = $(LDADD) | ||
570 | theme_example_02_DEPENDENCIES = \ | ||
571 | $(top_builddir)/src/lib/libelementary.la | ||
572 | thumb_example_01_SOURCES = thumb_example_01.c | ||
573 | thumb_example_01_OBJECTS = thumb_example_01.$(OBJEXT) | ||
574 | thumb_example_01_LDADD = $(LDADD) | ||
575 | thumb_example_01_DEPENDENCIES = \ | ||
576 | $(top_builddir)/src/lib/libelementary.la | ||
577 | toolbar_example_01_SOURCES = toolbar_example_01.c | ||
578 | toolbar_example_01_OBJECTS = toolbar_example_01.$(OBJEXT) | ||
579 | toolbar_example_01_LDADD = $(LDADD) | ||
580 | toolbar_example_01_DEPENDENCIES = \ | ||
581 | $(top_builddir)/src/lib/libelementary.la | ||
582 | toolbar_example_02_SOURCES = toolbar_example_02.c | ||
583 | toolbar_example_02_OBJECTS = toolbar_example_02.$(OBJEXT) | ||
584 | toolbar_example_02_LDADD = $(LDADD) | ||
585 | toolbar_example_02_DEPENDENCIES = \ | ||
586 | $(top_builddir)/src/lib/libelementary.la | ||
587 | toolbar_example_03_SOURCES = toolbar_example_03.c | ||
588 | toolbar_example_03_OBJECTS = toolbar_example_03.$(OBJEXT) | ||
589 | toolbar_example_03_LDADD = $(LDADD) | ||
590 | toolbar_example_03_DEPENDENCIES = \ | ||
591 | $(top_builddir)/src/lib/libelementary.la | ||
592 | transit_example_01_SOURCES = transit_example_01.c | ||
593 | transit_example_01_OBJECTS = transit_example_01.$(OBJEXT) | ||
594 | transit_example_01_LDADD = $(LDADD) | ||
595 | transit_example_01_DEPENDENCIES = \ | ||
596 | $(top_builddir)/src/lib/libelementary.la | ||
597 | transit_example_02_SOURCES = transit_example_02.c | ||
598 | transit_example_02_OBJECTS = transit_example_02.$(OBJEXT) | ||
599 | transit_example_02_LDADD = $(LDADD) | ||
600 | transit_example_02_DEPENDENCIES = \ | ||
601 | $(top_builddir)/src/lib/libelementary.la | ||
602 | transit_example_03_SOURCES = transit_example_03.c | ||
603 | transit_example_03_OBJECTS = transit_example_03.$(OBJEXT) | ||
604 | transit_example_03_LDADD = $(LDADD) | ||
605 | transit_example_03_DEPENDENCIES = \ | ||
606 | $(top_builddir)/src/lib/libelementary.la | ||
607 | transit_example_04_SOURCES = transit_example_04.c | ||
608 | transit_example_04_OBJECTS = transit_example_04.$(OBJEXT) | ||
609 | transit_example_04_LDADD = $(LDADD) | ||
610 | transit_example_04_DEPENDENCIES = \ | ||
611 | $(top_builddir)/src/lib/libelementary.la | ||
612 | web_example_SOURCES = web_example.c | ||
613 | web_example_OBJECTS = web_example.$(OBJEXT) | ||
614 | web_example_LDADD = $(LDADD) | ||
615 | web_example_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
616 | win_example_SOURCES = win_example.c | ||
617 | win_example_OBJECTS = win_example.$(OBJEXT) | ||
618 | win_example_LDADD = $(LDADD) | ||
619 | win_example_DEPENDENCIES = $(top_builddir)/src/lib/libelementary.la | ||
620 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
621 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
622 | am__depfiles_maybe = depfiles | ||
623 | am__mv = mv -f | ||
624 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
625 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
626 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
627 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
628 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
629 | $(AM_CFLAGS) $(CFLAGS) | ||
630 | AM_V_CC = $(am__v_CC_$(V)) | ||
631 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
632 | am__v_CC_0 = @echo " CC " $@; | ||
633 | AM_V_at = $(am__v_at_$(V)) | ||
634 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
635 | am__v_at_0 = @ | ||
636 | CCLD = $(CC) | ||
637 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
638 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
639 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
640 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
641 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
642 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
643 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
644 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
645 | am__v_GEN_0 = @echo " GEN " $@; | ||
646 | SOURCES = actionslider_example_01.c bg_example_01.c bg_example_02.c \ | ||
647 | bg_example_03.c box_example_02.c bubble_example_01.c \ | ||
648 | button_example_00.c button_example_01.c calendar_example_01.c \ | ||
649 | calendar_example_02.c calendar_example_03.c \ | ||
650 | calendar_example_04.c calendar_example_05.c \ | ||
651 | calendar_example_06.c check_example_01.c clock_example.c \ | ||
652 | colorselector_example_01.c conformant_example_01.c \ | ||
653 | conformant_example_02.c ctxpopup_example_01.c \ | ||
654 | datetime_example.c dayselector_example.c \ | ||
655 | diskselector_example_01.c diskselector_example_02.c \ | ||
656 | $(efl_thread_1_SOURCES) $(efl_thread_2_SOURCES) \ | ||
657 | $(efl_thread_3_SOURCES) $(efl_thread_4_SOURCES) efl_thread_5.c \ | ||
658 | efl_thread_6.c entry_example.c fileselector_button_example.c \ | ||
659 | fileselector_entry_example.c fileselector_example.c \ | ||
660 | flip_example_01.c flipselector_example.c frame_example_01.c \ | ||
661 | general_funcs_example.c gengrid_example.c genlist_example_01.c \ | ||
662 | genlist_example_02.c genlist_example_03.c genlist_example_04.c \ | ||
663 | genlist_example_05.c hover_example_01.c hoversel_example_01.c \ | ||
664 | icon_example_01.c image_example_01.c index_example_01.c \ | ||
665 | index_example_02.c inwin_example.c label_example_01.c \ | ||
666 | layout_example_01.c layout_example_02.c layout_example_03.c \ | ||
667 | list_example_01.c list_example_02.c list_example_03.c \ | ||
668 | map_example_01.c map_example_02.c map_example_03.c \ | ||
669 | mapbuf_example.c menu_example_01.c notify_example_01.c \ | ||
670 | panel_example_01.c panes_example.c photocam_example_01.c \ | ||
671 | popup_example_01.c popup_example_02.c popup_example_03.c \ | ||
672 | progressbar_example.c radio_example_01.c scroller_example_01.c \ | ||
673 | segment_control_example.c separator_example_01.c \ | ||
674 | slider_example.c slideshow_example.c spinner_example.c \ | ||
675 | table_example_01.c table_example_02.c theme_example_01.c \ | ||
676 | theme_example_02.c thumb_example_01.c toolbar_example_01.c \ | ||
677 | toolbar_example_02.c toolbar_example_03.c transit_example_01.c \ | ||
678 | transit_example_02.c transit_example_03.c transit_example_04.c \ | ||
679 | web_example.c win_example.c | ||
680 | DIST_SOURCES = actionslider_example_01.c bg_example_01.c \ | ||
681 | bg_example_02.c bg_example_03.c box_example_02.c \ | ||
682 | bubble_example_01.c button_example_00.c button_example_01.c \ | ||
683 | calendar_example_01.c calendar_example_02.c \ | ||
684 | calendar_example_03.c calendar_example_04.c \ | ||
685 | calendar_example_05.c calendar_example_06.c check_example_01.c \ | ||
686 | clock_example.c colorselector_example_01.c \ | ||
687 | conformant_example_01.c conformant_example_02.c \ | ||
688 | ctxpopup_example_01.c datetime_example.c dayselector_example.c \ | ||
689 | diskselector_example_01.c diskselector_example_02.c \ | ||
690 | $(am__efl_thread_1_SOURCES_DIST) \ | ||
691 | $(am__efl_thread_2_SOURCES_DIST) \ | ||
692 | $(am__efl_thread_3_SOURCES_DIST) \ | ||
693 | $(am__efl_thread_4_SOURCES_DIST) efl_thread_5.c efl_thread_6.c \ | ||
694 | entry_example.c fileselector_button_example.c \ | ||
695 | fileselector_entry_example.c fileselector_example.c \ | ||
696 | flip_example_01.c flipselector_example.c frame_example_01.c \ | ||
697 | general_funcs_example.c gengrid_example.c genlist_example_01.c \ | ||
698 | genlist_example_02.c genlist_example_03.c genlist_example_04.c \ | ||
699 | genlist_example_05.c hover_example_01.c hoversel_example_01.c \ | ||
700 | icon_example_01.c image_example_01.c index_example_01.c \ | ||
701 | index_example_02.c inwin_example.c label_example_01.c \ | ||
702 | layout_example_01.c layout_example_02.c layout_example_03.c \ | ||
703 | list_example_01.c list_example_02.c list_example_03.c \ | ||
704 | map_example_01.c map_example_02.c map_example_03.c \ | ||
705 | mapbuf_example.c menu_example_01.c notify_example_01.c \ | ||
706 | panel_example_01.c panes_example.c photocam_example_01.c \ | ||
707 | popup_example_01.c popup_example_02.c popup_example_03.c \ | ||
708 | progressbar_example.c radio_example_01.c scroller_example_01.c \ | ||
709 | segment_control_example.c separator_example_01.c \ | ||
710 | slider_example.c slideshow_example.c spinner_example.c \ | ||
711 | table_example_01.c table_example_02.c theme_example_01.c \ | ||
712 | theme_example_02.c thumb_example_01.c toolbar_example_01.c \ | ||
713 | toolbar_example_02.c toolbar_example_03.c transit_example_01.c \ | ||
714 | transit_example_02.c transit_example_03.c transit_example_04.c \ | ||
715 | web_example.c win_example.c | ||
716 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
717 | am__vpath_adj = case $$p in \ | ||
718 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
719 | *) f=$$p;; \ | ||
720 | esac; | ||
721 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | ||
722 | am__install_max = 40 | ||
723 | am__nobase_strip_setup = \ | ||
724 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | ||
725 | am__nobase_strip = \ | ||
726 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | ||
727 | am__nobase_list = $(am__nobase_strip_setup); \ | ||
728 | for p in $$list; do echo "$$p $$p"; done | \ | ||
729 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | ||
730 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | ||
731 | if (++n[$$2] == $(am__install_max)) \ | ||
732 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | ||
733 | END { for (dir in files) print dir, files[dir] }' | ||
734 | am__base_list = \ | ||
735 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | ||
736 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | ||
737 | DATA = $(files_DATA) | ||
738 | ETAGS = etags | ||
739 | CTAGS = ctags | ||
740 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
741 | ACLOCAL = @ACLOCAL@ | ||
742 | ALLOCA = @ALLOCA@ | ||
743 | AMTAR = @AMTAR@ | ||
744 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
745 | AR = @AR@ | ||
746 | AS = @AS@ | ||
747 | AUTOCONF = @AUTOCONF@ | ||
748 | AUTOHEADER = @AUTOHEADER@ | ||
749 | AUTOMAKE = @AUTOMAKE@ | ||
750 | AWK = @AWK@ | ||
751 | CC = @CC@ | ||
752 | CCDEPMODE = @CCDEPMODE@ | ||
753 | CFLAGS = @CFLAGS@ | ||
754 | CPP = @CPP@ | ||
755 | CPPFLAGS = @CPPFLAGS@ | ||
756 | CYGPATH_W = @CYGPATH_W@ | ||
757 | DEFS = @DEFS@ | ||
758 | DEPDIR = @DEPDIR@ | ||
759 | DLLTOOL = @DLLTOOL@ | ||
760 | DSYMUTIL = @DSYMUTIL@ | ||
761 | DUMPBIN = @DUMPBIN@ | ||
762 | ECHO_C = @ECHO_C@ | ||
763 | ECHO_N = @ECHO_N@ | ||
764 | ECHO_T = @ECHO_T@ | ||
765 | EGREP = @EGREP@ | ||
766 | EIO_CFLAGS = @EIO_CFLAGS@ | ||
767 | EIO_LIBS = @EIO_LIBS@ | ||
768 | ELEMENTARY_CFLAGS = @ELEMENTARY_CFLAGS@ | ||
769 | ELEMENTARY_COCOA_CFLAGS = @ELEMENTARY_COCOA_CFLAGS@ | ||
770 | ELEMENTARY_COCOA_LIBS = @ELEMENTARY_COCOA_LIBS@ | ||
771 | ELEMENTARY_CONFIG_PRG = @ELEMENTARY_CONFIG_PRG@ | ||
772 | ELEMENTARY_ECORE_CON_CFLAGS = @ELEMENTARY_ECORE_CON_CFLAGS@ | ||
773 | ELEMENTARY_ECORE_CON_INC = @ELEMENTARY_ECORE_CON_INC@ | ||
774 | ELEMENTARY_ECORE_CON_LIBS = @ELEMENTARY_ECORE_CON_LIBS@ | ||
775 | ELEMENTARY_ECORE_IMF_CFLAGS = @ELEMENTARY_ECORE_IMF_CFLAGS@ | ||
776 | ELEMENTARY_ECORE_IMF_INC = @ELEMENTARY_ECORE_IMF_INC@ | ||
777 | ELEMENTARY_ECORE_IMF_LIBS = @ELEMENTARY_ECORE_IMF_LIBS@ | ||
778 | ELEMENTARY_EDBUS_CFLAGS = @ELEMENTARY_EDBUS_CFLAGS@ | ||
779 | ELEMENTARY_EDBUS_LIBS = @ELEMENTARY_EDBUS_LIBS@ | ||
780 | ELEMENTARY_EFREET_CFLAGS = @ELEMENTARY_EFREET_CFLAGS@ | ||
781 | ELEMENTARY_EFREET_LIBS = @ELEMENTARY_EFREET_LIBS@ | ||
782 | ELEMENTARY_EMAP_CFLAGS = @ELEMENTARY_EMAP_CFLAGS@ | ||
783 | ELEMENTARY_EMAP_LIBS = @ELEMENTARY_EMAP_LIBS@ | ||
784 | ELEMENTARY_ETHUMB_CFLAGS = @ELEMENTARY_ETHUMB_CFLAGS@ | ||
785 | ELEMENTARY_ETHUMB_LIBS = @ELEMENTARY_ETHUMB_LIBS@ | ||
786 | ELEMENTARY_EWEATHER_CFLAGS = @ELEMENTARY_EWEATHER_CFLAGS@ | ||
787 | ELEMENTARY_EWEATHER_LIBS = @ELEMENTARY_EWEATHER_LIBS@ | ||
788 | ELEMENTARY_FB_CFLAGS = @ELEMENTARY_FB_CFLAGS@ | ||
789 | ELEMENTARY_FB_LIBS = @ELEMENTARY_FB_LIBS@ | ||
790 | ELEMENTARY_LIBS = @ELEMENTARY_LIBS@ | ||
791 | ELEMENTARY_PSL1GHT_CFLAGS = @ELEMENTARY_PSL1GHT_CFLAGS@ | ||
792 | ELEMENTARY_PSL1GHT_LIBS = @ELEMENTARY_PSL1GHT_LIBS@ | ||
793 | ELEMENTARY_SDL_CFLAGS = @ELEMENTARY_SDL_CFLAGS@ | ||
794 | ELEMENTARY_SDL_LIBS = @ELEMENTARY_SDL_LIBS@ | ||
795 | ELEMENTARY_TEST_PRG = @ELEMENTARY_TEST_PRG@ | ||
796 | ELEMENTARY_WEB_CFLAGS = @ELEMENTARY_WEB_CFLAGS@ | ||
797 | ELEMENTARY_WEB_LIBS = @ELEMENTARY_WEB_LIBS@ | ||
798 | ELEMENTARY_WIN32_CFLAGS = @ELEMENTARY_WIN32_CFLAGS@ | ||
799 | ELEMENTARY_WIN32_LIBS = @ELEMENTARY_WIN32_LIBS@ | ||
800 | ELEMENTARY_WINCE_CFLAGS = @ELEMENTARY_WINCE_CFLAGS@ | ||
801 | ELEMENTARY_WINCE_LIBS = @ELEMENTARY_WINCE_LIBS@ | ||
802 | ELEMENTARY_X_CFLAGS = @ELEMENTARY_X_CFLAGS@ | ||
803 | ELEMENTARY_X_LIBS = @ELEMENTARY_X_LIBS@ | ||
804 | ELM_ALLOCA_H_DEF = @ELM_ALLOCA_H_DEF@ | ||
805 | ELM_DEBUG_DEF = @ELM_DEBUG_DEF@ | ||
806 | ELM_DIRENT_H_DEF = @ELM_DIRENT_H_DEF@ | ||
807 | ELM_EDBUS_DEF = @ELM_EDBUS_DEF@ | ||
808 | ELM_EFREET_DEF = @ELM_EFREET_DEF@ | ||
809 | ELM_EMAP_DEF = @ELM_EMAP_DEF@ | ||
810 | ELM_ETHUMB_DEF = @ELM_ETHUMB_DEF@ | ||
811 | ELM_EWEATHER_DEF = @ELM_EWEATHER_DEF@ | ||
812 | ELM_LIBINTL_H_DEF = @ELM_LIBINTL_H_DEF@ | ||
813 | ELM_UNIX_DEF = @ELM_UNIX_DEF@ | ||
814 | ELM_WEB_DEF = @ELM_WEB_DEF@ | ||
815 | ELM_WIN32_DEF = @ELM_WIN32_DEF@ | ||
816 | ELM_WINCE_DEF = @ELM_WINCE_DEF@ | ||
817 | EMOTION_CFLAGS = @EMOTION_CFLAGS@ | ||
818 | EMOTION_LIBS = @EMOTION_LIBS@ | ||
819 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
820 | EVIL_LIBS = @EVIL_LIBS@ | ||
821 | EXEEXT = @EXEEXT@ | ||
822 | FGREP = @FGREP@ | ||
823 | GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ | ||
824 | GMSGFMT = @GMSGFMT@ | ||
825 | GMSGFMT_015 = @GMSGFMT_015@ | ||
826 | GREP = @GREP@ | ||
827 | INSTALL = @INSTALL@ | ||
828 | INSTALL_DATA = @INSTALL_DATA@ | ||
829 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
830 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
831 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
832 | INTLLIBS = @INTLLIBS@ | ||
833 | INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ | ||
834 | LD = @LD@ | ||
835 | LDFLAGS = @LDFLAGS@ | ||
836 | LIBICONV = @LIBICONV@ | ||
837 | LIBINTL = @LIBINTL@ | ||
838 | LIBOBJS = @LIBOBJS@ | ||
839 | LIBS = @LIBS@ | ||
840 | LIBTOOL = @LIBTOOL@ | ||
841 | LIPO = @LIPO@ | ||
842 | LN_S = @LN_S@ | ||
843 | LOCALE_DIR = @LOCALE_DIR@ | ||
844 | LTLIBICONV = @LTLIBICONV@ | ||
845 | LTLIBINTL = @LTLIBINTL@ | ||
846 | LTLIBOBJS = @LTLIBOBJS@ | ||
847 | MAKEINFO = @MAKEINFO@ | ||
848 | MKDIR_P = @MKDIR_P@ | ||
849 | MODULE_ARCH = @MODULE_ARCH@ | ||
850 | MODULE_EDJE = @MODULE_EDJE@ | ||
851 | MSGFMT = @MSGFMT@ | ||
852 | MSGFMT_015 = @MSGFMT_015@ | ||
853 | MSGMERGE = @MSGMERGE@ | ||
854 | NM = @NM@ | ||
855 | NMEDIT = @NMEDIT@ | ||
856 | OBJDUMP = @OBJDUMP@ | ||
857 | OBJEXT = @OBJEXT@ | ||
858 | OTOOL = @OTOOL@ | ||
859 | OTOOL64 = @OTOOL64@ | ||
860 | PACKAGE = @PACKAGE@ | ||
861 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
862 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
863 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
864 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
865 | PACKAGE_URL = @PACKAGE_URL@ | ||
866 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
867 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
868 | PKG_CONFIG = @PKG_CONFIG@ | ||
869 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
870 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
871 | POSUB = @POSUB@ | ||
872 | RANLIB = @RANLIB@ | ||
873 | SED = @SED@ | ||
874 | SET_MAKE = @SET_MAKE@ | ||
875 | SHELL = @SHELL@ | ||
876 | STRIP = @STRIP@ | ||
877 | USE_NLS = @USE_NLS@ | ||
878 | VERSION = @VERSION@ | ||
879 | VMAJ = @VMAJ@ | ||
880 | VMIN = @VMIN@ | ||
881 | XGETTEXT = @XGETTEXT@ | ||
882 | XGETTEXT_015 = @XGETTEXT_015@ | ||
883 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
884 | abs_builddir = @abs_builddir@ | ||
885 | abs_srcdir = @abs_srcdir@ | ||
886 | abs_top_builddir = @abs_top_builddir@ | ||
887 | abs_top_srcdir = @abs_top_srcdir@ | ||
888 | ac_ct_CC = @ac_ct_CC@ | ||
889 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
890 | am__include = @am__include@ | ||
891 | am__leading_dot = @am__leading_dot@ | ||
892 | am__quote = @am__quote@ | ||
893 | am__tar = @am__tar@ | ||
894 | am__untar = @am__untar@ | ||
895 | bindir = @bindir@ | ||
896 | build = @build@ | ||
897 | build_alias = @build_alias@ | ||
898 | build_cpu = @build_cpu@ | ||
899 | build_os = @build_os@ | ||
900 | build_vendor = @build_vendor@ | ||
901 | builddir = @builddir@ | ||
902 | datadir = @datadir@ | ||
903 | datarootdir = @datarootdir@ | ||
904 | dlopen_libs = @dlopen_libs@ | ||
905 | docdir = @docdir@ | ||
906 | dvidir = @dvidir@ | ||
907 | edje_cc = @edje_cc@ | ||
908 | eet_eet = @eet_eet@ | ||
909 | efl_doxygen = @efl_doxygen@ | ||
910 | efl_have_doxygen = @efl_have_doxygen@ | ||
911 | exec_prefix = @exec_prefix@ | ||
912 | host = @host@ | ||
913 | host_alias = @host_alias@ | ||
914 | host_cpu = @host_cpu@ | ||
915 | host_os = @host_os@ | ||
916 | host_vendor = @host_vendor@ | ||
917 | htmldir = @htmldir@ | ||
918 | includedir = @includedir@ | ||
919 | infodir = @infodir@ | ||
920 | install_sh = @install_sh@ | ||
921 | libdir = @libdir@ | ||
922 | libexecdir = @libexecdir@ | ||
923 | localedir = @localedir@ | ||
924 | localstatedir = @localstatedir@ | ||
925 | lt_ECHO = @lt_ECHO@ | ||
926 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
927 | mandir = @mandir@ | ||
928 | mkdir_p = @mkdir_p@ | ||
929 | my_libs = @my_libs@ | ||
930 | oldincludedir = @oldincludedir@ | ||
931 | pdfdir = @pdfdir@ | ||
932 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
933 | prefix = @prefix@ | ||
934 | program_transform_name = @program_transform_name@ | ||
935 | psdir = @psdir@ | ||
936 | release_info = @release_info@ | ||
937 | requirement_elm = @requirement_elm@ | ||
938 | sbindir = @sbindir@ | ||
939 | sharedstatedir = @sharedstatedir@ | ||
940 | srcdir = @srcdir@ | ||
941 | sysconfdir = @sysconfdir@ | ||
942 | target_alias = @target_alias@ | ||
943 | top_build_prefix = @top_build_prefix@ | ||
944 | top_builddir = @top_builddir@ | ||
945 | top_srcdir = @top_srcdir@ | ||
946 | version_info = @version_info@ | ||
947 | MAINTAINERCLEANFILES = Makefile.in | ||
948 | examplesdir = $(pkgdatadir)/examples | ||
949 | filesdir = $(pkgdatadir)/examples | ||
950 | files_DATA = $(am__append_1) $(am__append_2) | ||
951 | AM_CPPFLAGS = \ | ||
952 | -Wno-unused-parameter \ | ||
953 | -I. \ | ||
954 | -I$(top_srcdir)/src/lib \ | ||
955 | -I$(top_builddir)/src/lib \ | ||
956 | -DPACKAGE_DATA_DIR="\"$(pkgdatadir)\"" \ | ||
957 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | ||
958 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | ||
959 | @ELEMENTARY_EDBUS_CFLAGS@ \ | ||
960 | @ELEMENTARY_EFREET_CFLAGS@ \ | ||
961 | @ELEMENTARY_ETHUMB_CFLAGS@ \ | ||
962 | @ELEMENTARY_EMAP_CFLAGS@ \ | ||
963 | @ELEMENTARY_X_CFLAGS@ \ | ||
964 | @ELEMENTARY_CFLAGS@ | ||
965 | |||
966 | LDADD = \ | ||
967 | @ELEMENTARY_LIBS@ \ | ||
968 | @ELEMENTARY_ETHUMB_LIBS@ \ | ||
969 | @ELEMENTARY_X_LIBS@ \ | ||
970 | $(top_builddir)/src/lib/libelementary.la | ||
971 | |||
972 | EDJE_CC = @edje_cc@ | ||
973 | EDJE_FLAGS_VERBOSE_ = | ||
974 | EDJE_FLAGS_VERBOSE_0 = | ||
975 | EDJE_FLAGS_VERBOSE_1 = -v | ||
976 | EDJE_FLAGS = $(EDJE_FLAGS_$(V)) | ||
977 | SRCS = \ | ||
978 | actionslider_example_01.c \ | ||
979 | bg_example_01.c \ | ||
980 | bg_example_02.c \ | ||
981 | bg_example_03.c \ | ||
982 | box_example_02.c \ | ||
983 | bubble_example_01.c \ | ||
984 | button_example_00.c \ | ||
985 | button_example_01.c \ | ||
986 | calendar_example_01.c \ | ||
987 | calendar_example_02.c \ | ||
988 | calendar_example_03.c \ | ||
989 | calendar_example_04.c \ | ||
990 | calendar_example_05.c \ | ||
991 | calendar_example_06.c \ | ||
992 | check_example_01.c \ | ||
993 | clock_example.c \ | ||
994 | colorselector_example_01.c \ | ||
995 | conformant_example_01.c \ | ||
996 | conformant_example_02.c \ | ||
997 | ctxpopup_example_01.c \ | ||
998 | datetime_example.c \ | ||
999 | dayselector_example.c \ | ||
1000 | diskselector_example_01.c \ | ||
1001 | diskselector_example_02.c \ | ||
1002 | efl_thread_1.c \ | ||
1003 | efl_thread_2.c \ | ||
1004 | efl_thread_3.c \ | ||
1005 | efl_thread_4.c \ | ||
1006 | efl_thread_5.c \ | ||
1007 | efl_thread_6.c \ | ||
1008 | efl_thread_win32_1.c \ | ||
1009 | efl_thread_win32_2.c \ | ||
1010 | efl_thread_win32_3.c \ | ||
1011 | efl_thread_win32_4.c \ | ||
1012 | entry_example.c \ | ||
1013 | fileselector_button_example.c \ | ||
1014 | fileselector_entry_example.c \ | ||
1015 | fileselector_example.c \ | ||
1016 | flip_example_01.c \ | ||
1017 | flipselector_example.c \ | ||
1018 | frame_example_01.c \ | ||
1019 | general_funcs_example.c \ | ||
1020 | gengrid_example.c \ | ||
1021 | genlist_example_01.c \ | ||
1022 | genlist_example_02.c \ | ||
1023 | genlist_example_03.c \ | ||
1024 | genlist_example_04.c \ | ||
1025 | genlist_example_05.c \ | ||
1026 | hover_example_01.c \ | ||
1027 | hoversel_example_01.c \ | ||
1028 | icon_example_01.c \ | ||
1029 | image_example_01.c \ | ||
1030 | index_example_01.c \ | ||
1031 | index_example_02.c \ | ||
1032 | inwin_example.c \ | ||
1033 | label_example_01.c \ | ||
1034 | layout_example.edc \ | ||
1035 | layout_example_01.c \ | ||
1036 | layout_example_02.c \ | ||
1037 | layout_example_03.c \ | ||
1038 | list_example_01.c \ | ||
1039 | list_example_02.c \ | ||
1040 | list_example_03.c \ | ||
1041 | map_example_01.c \ | ||
1042 | map_example_02.c \ | ||
1043 | map_example_03.c \ | ||
1044 | mapbuf_example.c \ | ||
1045 | menu_example_01.c \ | ||
1046 | notify_example_01.c \ | ||
1047 | panes_example.c \ | ||
1048 | panel_example_01.c \ | ||
1049 | photocam_example_01.c \ | ||
1050 | popup_example_01.c \ | ||
1051 | popup_example_02.c \ | ||
1052 | popup_example_03.c \ | ||
1053 | progressbar_example.c \ | ||
1054 | radio_example_01.c \ | ||
1055 | segment_control_example.c \ | ||
1056 | separator_example_01.c \ | ||
1057 | slider_example.c \ | ||
1058 | slideshow_example.c \ | ||
1059 | spinner_example.c \ | ||
1060 | scroller_example_01.c \ | ||
1061 | table_example_01.c \ | ||
1062 | table_example_02.c \ | ||
1063 | theme_example.edc \ | ||
1064 | theme_example_01.c \ | ||
1065 | theme_example_02.c \ | ||
1066 | thumb_example_01.c \ | ||
1067 | toolbar_example_01.c \ | ||
1068 | toolbar_example_02.c \ | ||
1069 | toolbar_example_03.c \ | ||
1070 | transit_example_01.c \ | ||
1071 | transit_example_02.c \ | ||
1072 | transit_example_03.c \ | ||
1073 | transit_example_04.c \ | ||
1074 | web_example.c \ | ||
1075 | win_example.c | ||
1076 | |||
1077 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_FALSE@efl_thread_1_SOURCES = efl_thread_1.c | ||
1078 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_TRUE@efl_thread_1_SOURCES = efl_thread_win32_1.c | ||
1079 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_FALSE@efl_thread_2_SOURCES = efl_thread_2.c | ||
1080 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_TRUE@efl_thread_2_SOURCES = efl_thread_win32_2.c | ||
1081 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_FALSE@efl_thread_3_SOURCES = efl_thread_3.c | ||
1082 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_TRUE@efl_thread_3_SOURCES = efl_thread_win32_3.c | ||
1083 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_FALSE@efl_thread_4_SOURCES = efl_thread_4.c | ||
1084 | @EFL_BUILD_EXAMPLES_TRUE@@ELEMENTARY_WINDOWS_BUILD_TRUE@efl_thread_4_SOURCES = efl_thread_win32_4.c | ||
1085 | |||
1086 | # This variable will hold the list of screenshots that will be made | ||
1087 | # by "make screenshots". Each item in the list is of the form: | ||
1088 | # <example executable>:<screenshot filename>:<delay in seconds> | ||
1089 | @EFL_BUILD_EXAMPLES_TRUE@SCREENSHOTS = \ | ||
1090 | @EFL_BUILD_EXAMPLES_TRUE@actionslider_example_01:actionslider_01.png:0.0 \ | ||
1091 | @EFL_BUILD_EXAMPLES_TRUE@bg_example_02:bg_01.png:0.0 \ | ||
1092 | @EFL_BUILD_EXAMPLES_TRUE@box_example_02:box_example_02.png:1.3 \ | ||
1093 | @EFL_BUILD_EXAMPLES_TRUE@bubble_example_01:bubble_example_01.png:0.0 \ | ||
1094 | @EFL_BUILD_EXAMPLES_TRUE@button_example_00:button_00.png:0.0 \ | ||
1095 | @EFL_BUILD_EXAMPLES_TRUE@button_example_01:button_01.png:0.0 \ | ||
1096 | @EFL_BUILD_EXAMPLES_TRUE@check_example_01:check_example_01.png:0.0 \ | ||
1097 | @EFL_BUILD_EXAMPLES_TRUE@colorselector_example_01:colorselector_example_01.png:0.0 \ | ||
1098 | @EFL_BUILD_EXAMPLES_TRUE@animator_example_01:animator_example_01.png:0.2 \ | ||
1099 | @EFL_BUILD_EXAMPLES_TRUE@animator_example_01:animator_example_02.png:0.5 \ | ||
1100 | @EFL_BUILD_EXAMPLES_TRUE@animator_example_01:animator_example_03.png:0.9 \ | ||
1101 | @EFL_BUILD_EXAMPLES_TRUE@flip_example_01:flip_example_01.png:0.0 \ | ||
1102 | @EFL_BUILD_EXAMPLES_TRUE@frame_example_01:frame_example_01.png:0.0 \ | ||
1103 | @EFL_BUILD_EXAMPLES_TRUE@hover_example_01:hover_example_01.png:0.0 \ | ||
1104 | @EFL_BUILD_EXAMPLES_TRUE@hoversel_example_01:hoversel_example_01.png:0.0 \ | ||
1105 | @EFL_BUILD_EXAMPLES_TRUE@label_example_01:label_example_01.png:0.0 \ | ||
1106 | @EFL_BUILD_EXAMPLES_TRUE@theme_example_01:theme_example_01.png:0.0 \ | ||
1107 | @EFL_BUILD_EXAMPLES_TRUE@conformant_example_01:conformant_example_01.png:0.0 \ | ||
1108 | @EFL_BUILD_EXAMPLES_TRUE@conformant_example_02:conformant_example_02.png:0.0 \ | ||
1109 | @EFL_BUILD_EXAMPLES_TRUE@calendar_example_01:calendar_example_01.png:0.0 \ | ||
1110 | @EFL_BUILD_EXAMPLES_TRUE@calendar_example_02:calendar_example_02.png:0.0 \ | ||
1111 | @EFL_BUILD_EXAMPLES_TRUE@calendar_example_03:calendar_example_03.png:0.0 \ | ||
1112 | @EFL_BUILD_EXAMPLES_TRUE@calendar_example_04:calendar_example_04.png:0.0 \ | ||
1113 | @EFL_BUILD_EXAMPLES_TRUE@calendar_example_05:calendar_example_05.png:0.0 \ | ||
1114 | @EFL_BUILD_EXAMPLES_TRUE@calendar_example_06:calendar_example_06.png:0.0 \ | ||
1115 | @EFL_BUILD_EXAMPLES_TRUE@datetime_example:datetime_example.png:0.0 \ | ||
1116 | @EFL_BUILD_EXAMPLES_TRUE@map_example_01:map_example_01.png:2 \ | ||
1117 | @EFL_BUILD_EXAMPLES_TRUE@map_example_02:map_example_02.png:2.5 \ | ||
1118 | @EFL_BUILD_EXAMPLES_TRUE@map_example_03:map_example_03.png:2 \ | ||
1119 | @EFL_BUILD_EXAMPLES_TRUE@toolbar_example_01:toolbar_example_01.png:0.0 \ | ||
1120 | @EFL_BUILD_EXAMPLES_TRUE@toolbar_example_02:toolbar_example_02.png:1 \ | ||
1121 | @EFL_BUILD_EXAMPLES_TRUE@toolbar_example_03:toolbar_example_03.png:1 \ | ||
1122 | @EFL_BUILD_EXAMPLES_TRUE@spinner_example:spinner_example.png:0.0 \ | ||
1123 | @EFL_BUILD_EXAMPLES_TRUE@clock_example:clock_example.png:0.5 \ | ||
1124 | @EFL_BUILD_EXAMPLES_TRUE@dayselector_example:dayselector_example.png:0.0 \ | ||
1125 | @EFL_BUILD_EXAMPLES_TRUE@mapbuf_example:mapbuf_example.png:0.0 \ | ||
1126 | @EFL_BUILD_EXAMPLES_TRUE@image_example_01:image_example_01.png:0.0 \ | ||
1127 | @EFL_BUILD_EXAMPLES_TRUE@diskselector_example_01:diskselector_example_01.png:0.2 \ | ||
1128 | @EFL_BUILD_EXAMPLES_TRUE@diskselector_example_02:diskselector_example_02.png:0.2 \ | ||
1129 | @EFL_BUILD_EXAMPLES_TRUE@icon_example_01:icon_example_01.png:0.0 \ | ||
1130 | @EFL_BUILD_EXAMPLES_TRUE@layout_example_01:layout_example_01.png:0.0 \ | ||
1131 | @EFL_BUILD_EXAMPLES_TRUE@layout_example_02:layout_example_02.png:0.0 \ | ||
1132 | @EFL_BUILD_EXAMPLES_TRUE@layout_example_03:layout_example_03.png:0.0 \ | ||
1133 | @EFL_BUILD_EXAMPLES_TRUE@list_example_01:list_example_01.png:0.0 \ | ||
1134 | @EFL_BUILD_EXAMPLES_TRUE@list_example_02:list_example_02.png:0.0 \ | ||
1135 | @EFL_BUILD_EXAMPLES_TRUE@list_example_03:list_example_03.png:0.0 \ | ||
1136 | @EFL_BUILD_EXAMPLES_TRUE@segment_control_example:segment_control_example.png:0.0 \ | ||
1137 | @EFL_BUILD_EXAMPLES_TRUE@flipselector_example:flipselector_example.png:0.0 \ | ||
1138 | @EFL_BUILD_EXAMPLES_TRUE@fileselector_example:fileselector_example.png:0.0 \ | ||
1139 | @EFL_BUILD_EXAMPLES_TRUE@index_example_02:index_example_03.png:0.3 \ | ||
1140 | @EFL_BUILD_EXAMPLES_TRUE@slider_example:slider_example.png:0.0 \ | ||
1141 | @EFL_BUILD_EXAMPLES_TRUE@panes_example:panes_example.png:0.0 \ | ||
1142 | @EFL_BUILD_EXAMPLES_TRUE@ctxpopup_example_01:ctxpopup_example_01.png:0.0 \ | ||
1143 | @EFL_BUILD_EXAMPLES_TRUE@separator_example_01:separator_example_01.png:0.0 \ | ||
1144 | @EFL_BUILD_EXAMPLES_TRUE@radio_example_01:radio_example_01.png:0.0 \ | ||
1145 | @EFL_BUILD_EXAMPLES_TRUE@panel_example_01:panel_example_01.png:0.0 \ | ||
1146 | @EFL_BUILD_EXAMPLES_TRUE@gengrid_example:gengrid_example.png:0.0 \ | ||
1147 | @EFL_BUILD_EXAMPLES_TRUE@genlist_example_01:genlist_example_01.png:0.1 \ | ||
1148 | @EFL_BUILD_EXAMPLES_TRUE@genlist_example_02:genlist_example_02.png:0.1 \ | ||
1149 | @EFL_BUILD_EXAMPLES_TRUE@genlist_example_03:genlist_example_03.png:0.1 \ | ||
1150 | @EFL_BUILD_EXAMPLES_TRUE@genlist_example_04:genlist_example_04.png:0.1 \ | ||
1151 | @EFL_BUILD_EXAMPLES_TRUE@genlist_example_05:genlist_example_05.png:0.1 \ | ||
1152 | @EFL_BUILD_EXAMPLES_TRUE@thumb_example_01:thumb_example_01.png:0.5 \ | ||
1153 | @EFL_BUILD_EXAMPLES_TRUE@entry_example:entry_example.png:0.0 \ | ||
1154 | @EFL_BUILD_EXAMPLES_TRUE@progressbar_example:progressbar_example.png:0.0 \ | ||
1155 | @EFL_BUILD_EXAMPLES_TRUE@notify_example_01:notify_example_01.png:0.0 \ | ||
1156 | @EFL_BUILD_EXAMPLES_TRUE@notify_example_01:notify_example_01_a.png:6.0 \ | ||
1157 | @EFL_BUILD_EXAMPLES_TRUE@popup_example_01:popup_example_01.png:1.0 \ | ||
1158 | @EFL_BUILD_EXAMPLES_TRUE@popup_example_01:popup_example_01_a.png:6.0 \ | ||
1159 | @EFL_BUILD_EXAMPLES_TRUE@popup_example_02:popup_example_02.png:0.2 \ | ||
1160 | @EFL_BUILD_EXAMPLES_TRUE@popup_example_03:popup_example_03.png:0.2 \ | ||
1161 | @EFL_BUILD_EXAMPLES_TRUE@slideshow_example:slideshow_example.png:1.0 \ | ||
1162 | @EFL_BUILD_EXAMPLES_TRUE@photocam_example_01:photocam_example_01.png:3 \ | ||
1163 | @EFL_BUILD_EXAMPLES_TRUE@scroller_example_01:scroller_example_01.png:0.0 \ | ||
1164 | @EFL_BUILD_EXAMPLES_TRUE@inwin_example:inwin_example.png:0.0 \ | ||
1165 | @EFL_BUILD_EXAMPLES_TRUE@inwin_example:inwin_example_a.png:0.2 \ | ||
1166 | @EFL_BUILD_EXAMPLES_TRUE@table_example_01:table_example_01.png:0.0 \ | ||
1167 | @EFL_BUILD_EXAMPLES_TRUE@table_example_02:table_example_02.png:0.0 \ | ||
1168 | @EFL_BUILD_EXAMPLES_TRUE@menu_example_01:menu_example_01.png:0.5 | ||
1169 | |||
1170 | @EFL_BUILD_EXAMPLES_TRUE@HTML_SS_DIR = $(top_builddir)/doc/html/screenshots | ||
1171 | @EFL_BUILD_EXAMPLES_TRUE@LATEX_SS_DIR = $(top_builddir)/doc/latex/screenshots | ||
1172 | all: all-am | ||
1173 | |||
1174 | .SUFFIXES: | ||
1175 | .SUFFIXES: .c .edc .edj .lo .o .obj | ||
1176 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
1177 | @for dep in $?; do \ | ||
1178 | case '$(am__configure_deps)' in \ | ||
1179 | *$$dep*) \ | ||
1180 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
1181 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
1182 | exit 1;; \ | ||
1183 | esac; \ | ||
1184 | done; \ | ||
1185 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/examples/Makefile'; \ | ||
1186 | $(am__cd) $(top_srcdir) && \ | ||
1187 | $(AUTOMAKE) --gnu src/examples/Makefile | ||
1188 | .PRECIOUS: Makefile | ||
1189 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
1190 | @case '$?' in \ | ||
1191 | *config.status*) \ | ||
1192 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
1193 | *) \ | ||
1194 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
1195 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
1196 | esac; | ||
1197 | |||
1198 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
1199 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
1200 | |||
1201 | $(top_srcdir)/configure: $(am__configure_deps) | ||
1202 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
1203 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
1204 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
1205 | $(am__aclocal_m4_deps): | ||
1206 | install-examplesPROGRAMS: $(examples_PROGRAMS) | ||
1207 | @$(NORMAL_INSTALL) | ||
1208 | test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" | ||
1209 | @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ | ||
1210 | for p in $$list; do echo "$$p $$p"; done | \ | ||
1211 | sed 's/$(EXEEXT)$$//' | \ | ||
1212 | while read p p1; do if test -f $$p || test -f $$p1; \ | ||
1213 | then echo "$$p"; echo "$$p"; else :; fi; \ | ||
1214 | done | \ | ||
1215 | sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ | ||
1216 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ | ||
1217 | sed 'N;N;N;s,\n, ,g' | \ | ||
1218 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ | ||
1219 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ | ||
1220 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ | ||
1221 | else { print "f", $$3 "/" $$4, $$1; } } \ | ||
1222 | END { for (d in files) print "f", d, files[d] }' | \ | ||
1223 | while read type dir files; do \ | ||
1224 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ | ||
1225 | test -z "$$files" || { \ | ||
1226 | echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ | ||
1227 | $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ | ||
1228 | } \ | ||
1229 | ; done | ||
1230 | |||
1231 | uninstall-examplesPROGRAMS: | ||
1232 | @$(NORMAL_UNINSTALL) | ||
1233 | @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ | ||
1234 | files=`for p in $$list; do echo "$$p"; done | \ | ||
1235 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ | ||
1236 | -e 's/$$/$(EXEEXT)/' `; \ | ||
1237 | test -n "$$list" || exit 0; \ | ||
1238 | echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ | ||
1239 | cd "$(DESTDIR)$(examplesdir)" && rm -f $$files | ||
1240 | |||
1241 | clean-examplesPROGRAMS: | ||
1242 | @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ | ||
1243 | echo " rm -f" $$list; \ | ||
1244 | rm -f $$list || exit $$?; \ | ||
1245 | test -n "$(EXEEXT)" || exit 0; \ | ||
1246 | list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ | ||
1247 | echo " rm -f" $$list; \ | ||
1248 | rm -f $$list | ||
1249 | actionslider_example_01$(EXEEXT): $(actionslider_example_01_OBJECTS) $(actionslider_example_01_DEPENDENCIES) | ||
1250 | @rm -f actionslider_example_01$(EXEEXT) | ||
1251 | $(AM_V_CCLD)$(LINK) $(actionslider_example_01_OBJECTS) $(actionslider_example_01_LDADD) $(LIBS) | ||
1252 | bg_example_01$(EXEEXT): $(bg_example_01_OBJECTS) $(bg_example_01_DEPENDENCIES) | ||
1253 | @rm -f bg_example_01$(EXEEXT) | ||
1254 | $(AM_V_CCLD)$(LINK) $(bg_example_01_OBJECTS) $(bg_example_01_LDADD) $(LIBS) | ||
1255 | bg_example_02$(EXEEXT): $(bg_example_02_OBJECTS) $(bg_example_02_DEPENDENCIES) | ||
1256 | @rm -f bg_example_02$(EXEEXT) | ||
1257 | $(AM_V_CCLD)$(LINK) $(bg_example_02_OBJECTS) $(bg_example_02_LDADD) $(LIBS) | ||
1258 | bg_example_03$(EXEEXT): $(bg_example_03_OBJECTS) $(bg_example_03_DEPENDENCIES) | ||
1259 | @rm -f bg_example_03$(EXEEXT) | ||
1260 | $(AM_V_CCLD)$(LINK) $(bg_example_03_OBJECTS) $(bg_example_03_LDADD) $(LIBS) | ||
1261 | box_example_02$(EXEEXT): $(box_example_02_OBJECTS) $(box_example_02_DEPENDENCIES) | ||
1262 | @rm -f box_example_02$(EXEEXT) | ||
1263 | $(AM_V_CCLD)$(LINK) $(box_example_02_OBJECTS) $(box_example_02_LDADD) $(LIBS) | ||
1264 | bubble_example_01$(EXEEXT): $(bubble_example_01_OBJECTS) $(bubble_example_01_DEPENDENCIES) | ||
1265 | @rm -f bubble_example_01$(EXEEXT) | ||
1266 | $(AM_V_CCLD)$(LINK) $(bubble_example_01_OBJECTS) $(bubble_example_01_LDADD) $(LIBS) | ||
1267 | button_example_00$(EXEEXT): $(button_example_00_OBJECTS) $(button_example_00_DEPENDENCIES) | ||
1268 | @rm -f button_example_00$(EXEEXT) | ||
1269 | $(AM_V_CCLD)$(LINK) $(button_example_00_OBJECTS) $(button_example_00_LDADD) $(LIBS) | ||
1270 | button_example_01$(EXEEXT): $(button_example_01_OBJECTS) $(button_example_01_DEPENDENCIES) | ||
1271 | @rm -f button_example_01$(EXEEXT) | ||
1272 | $(AM_V_CCLD)$(LINK) $(button_example_01_OBJECTS) $(button_example_01_LDADD) $(LIBS) | ||
1273 | calendar_example_01$(EXEEXT): $(calendar_example_01_OBJECTS) $(calendar_example_01_DEPENDENCIES) | ||
1274 | @rm -f calendar_example_01$(EXEEXT) | ||
1275 | $(AM_V_CCLD)$(LINK) $(calendar_example_01_OBJECTS) $(calendar_example_01_LDADD) $(LIBS) | ||
1276 | calendar_example_02$(EXEEXT): $(calendar_example_02_OBJECTS) $(calendar_example_02_DEPENDENCIES) | ||
1277 | @rm -f calendar_example_02$(EXEEXT) | ||
1278 | $(AM_V_CCLD)$(LINK) $(calendar_example_02_OBJECTS) $(calendar_example_02_LDADD) $(LIBS) | ||
1279 | calendar_example_03$(EXEEXT): $(calendar_example_03_OBJECTS) $(calendar_example_03_DEPENDENCIES) | ||
1280 | @rm -f calendar_example_03$(EXEEXT) | ||
1281 | $(AM_V_CCLD)$(LINK) $(calendar_example_03_OBJECTS) $(calendar_example_03_LDADD) $(LIBS) | ||
1282 | calendar_example_04$(EXEEXT): $(calendar_example_04_OBJECTS) $(calendar_example_04_DEPENDENCIES) | ||
1283 | @rm -f calendar_example_04$(EXEEXT) | ||
1284 | $(AM_V_CCLD)$(LINK) $(calendar_example_04_OBJECTS) $(calendar_example_04_LDADD) $(LIBS) | ||
1285 | calendar_example_05$(EXEEXT): $(calendar_example_05_OBJECTS) $(calendar_example_05_DEPENDENCIES) | ||
1286 | @rm -f calendar_example_05$(EXEEXT) | ||
1287 | $(AM_V_CCLD)$(LINK) $(calendar_example_05_OBJECTS) $(calendar_example_05_LDADD) $(LIBS) | ||
1288 | calendar_example_06$(EXEEXT): $(calendar_example_06_OBJECTS) $(calendar_example_06_DEPENDENCIES) | ||
1289 | @rm -f calendar_example_06$(EXEEXT) | ||
1290 | $(AM_V_CCLD)$(LINK) $(calendar_example_06_OBJECTS) $(calendar_example_06_LDADD) $(LIBS) | ||
1291 | check_example_01$(EXEEXT): $(check_example_01_OBJECTS) $(check_example_01_DEPENDENCIES) | ||
1292 | @rm -f check_example_01$(EXEEXT) | ||
1293 | $(AM_V_CCLD)$(LINK) $(check_example_01_OBJECTS) $(check_example_01_LDADD) $(LIBS) | ||
1294 | clock_example$(EXEEXT): $(clock_example_OBJECTS) $(clock_example_DEPENDENCIES) | ||
1295 | @rm -f clock_example$(EXEEXT) | ||
1296 | $(AM_V_CCLD)$(LINK) $(clock_example_OBJECTS) $(clock_example_LDADD) $(LIBS) | ||
1297 | colorselector_example_01$(EXEEXT): $(colorselector_example_01_OBJECTS) $(colorselector_example_01_DEPENDENCIES) | ||
1298 | @rm -f colorselector_example_01$(EXEEXT) | ||
1299 | $(AM_V_CCLD)$(LINK) $(colorselector_example_01_OBJECTS) $(colorselector_example_01_LDADD) $(LIBS) | ||
1300 | conformant_example_01$(EXEEXT): $(conformant_example_01_OBJECTS) $(conformant_example_01_DEPENDENCIES) | ||
1301 | @rm -f conformant_example_01$(EXEEXT) | ||
1302 | $(AM_V_CCLD)$(LINK) $(conformant_example_01_OBJECTS) $(conformant_example_01_LDADD) $(LIBS) | ||
1303 | conformant_example_02$(EXEEXT): $(conformant_example_02_OBJECTS) $(conformant_example_02_DEPENDENCIES) | ||
1304 | @rm -f conformant_example_02$(EXEEXT) | ||
1305 | $(AM_V_CCLD)$(LINK) $(conformant_example_02_OBJECTS) $(conformant_example_02_LDADD) $(LIBS) | ||
1306 | ctxpopup_example_01$(EXEEXT): $(ctxpopup_example_01_OBJECTS) $(ctxpopup_example_01_DEPENDENCIES) | ||
1307 | @rm -f ctxpopup_example_01$(EXEEXT) | ||
1308 | $(AM_V_CCLD)$(LINK) $(ctxpopup_example_01_OBJECTS) $(ctxpopup_example_01_LDADD) $(LIBS) | ||
1309 | datetime_example$(EXEEXT): $(datetime_example_OBJECTS) $(datetime_example_DEPENDENCIES) | ||
1310 | @rm -f datetime_example$(EXEEXT) | ||
1311 | $(AM_V_CCLD)$(LINK) $(datetime_example_OBJECTS) $(datetime_example_LDADD) $(LIBS) | ||
1312 | dayselector_example$(EXEEXT): $(dayselector_example_OBJECTS) $(dayselector_example_DEPENDENCIES) | ||
1313 | @rm -f dayselector_example$(EXEEXT) | ||
1314 | $(AM_V_CCLD)$(LINK) $(dayselector_example_OBJECTS) $(dayselector_example_LDADD) $(LIBS) | ||
1315 | diskselector_example_01$(EXEEXT): $(diskselector_example_01_OBJECTS) $(diskselector_example_01_DEPENDENCIES) | ||
1316 | @rm -f diskselector_example_01$(EXEEXT) | ||
1317 | $(AM_V_CCLD)$(LINK) $(diskselector_example_01_OBJECTS) $(diskselector_example_01_LDADD) $(LIBS) | ||
1318 | diskselector_example_02$(EXEEXT): $(diskselector_example_02_OBJECTS) $(diskselector_example_02_DEPENDENCIES) | ||
1319 | @rm -f diskselector_example_02$(EXEEXT) | ||
1320 | $(AM_V_CCLD)$(LINK) $(diskselector_example_02_OBJECTS) $(diskselector_example_02_LDADD) $(LIBS) | ||
1321 | efl_thread_1$(EXEEXT): $(efl_thread_1_OBJECTS) $(efl_thread_1_DEPENDENCIES) | ||
1322 | @rm -f efl_thread_1$(EXEEXT) | ||
1323 | $(AM_V_CCLD)$(LINK) $(efl_thread_1_OBJECTS) $(efl_thread_1_LDADD) $(LIBS) | ||
1324 | efl_thread_2$(EXEEXT): $(efl_thread_2_OBJECTS) $(efl_thread_2_DEPENDENCIES) | ||
1325 | @rm -f efl_thread_2$(EXEEXT) | ||
1326 | $(AM_V_CCLD)$(LINK) $(efl_thread_2_OBJECTS) $(efl_thread_2_LDADD) $(LIBS) | ||
1327 | efl_thread_3$(EXEEXT): $(efl_thread_3_OBJECTS) $(efl_thread_3_DEPENDENCIES) | ||
1328 | @rm -f efl_thread_3$(EXEEXT) | ||
1329 | $(AM_V_CCLD)$(LINK) $(efl_thread_3_OBJECTS) $(efl_thread_3_LDADD) $(LIBS) | ||
1330 | efl_thread_4$(EXEEXT): $(efl_thread_4_OBJECTS) $(efl_thread_4_DEPENDENCIES) | ||
1331 | @rm -f efl_thread_4$(EXEEXT) | ||
1332 | $(AM_V_CCLD)$(LINK) $(efl_thread_4_OBJECTS) $(efl_thread_4_LDADD) $(LIBS) | ||
1333 | efl_thread_5$(EXEEXT): $(efl_thread_5_OBJECTS) $(efl_thread_5_DEPENDENCIES) | ||
1334 | @rm -f efl_thread_5$(EXEEXT) | ||
1335 | $(AM_V_CCLD)$(LINK) $(efl_thread_5_OBJECTS) $(efl_thread_5_LDADD) $(LIBS) | ||
1336 | efl_thread_6$(EXEEXT): $(efl_thread_6_OBJECTS) $(efl_thread_6_DEPENDENCIES) | ||
1337 | @rm -f efl_thread_6$(EXEEXT) | ||
1338 | $(AM_V_CCLD)$(LINK) $(efl_thread_6_OBJECTS) $(efl_thread_6_LDADD) $(LIBS) | ||
1339 | entry_example$(EXEEXT): $(entry_example_OBJECTS) $(entry_example_DEPENDENCIES) | ||
1340 | @rm -f entry_example$(EXEEXT) | ||
1341 | $(AM_V_CCLD)$(LINK) $(entry_example_OBJECTS) $(entry_example_LDADD) $(LIBS) | ||
1342 | fileselector_button_example$(EXEEXT): $(fileselector_button_example_OBJECTS) $(fileselector_button_example_DEPENDENCIES) | ||
1343 | @rm -f fileselector_button_example$(EXEEXT) | ||
1344 | $(AM_V_CCLD)$(LINK) $(fileselector_button_example_OBJECTS) $(fileselector_button_example_LDADD) $(LIBS) | ||
1345 | fileselector_entry_example$(EXEEXT): $(fileselector_entry_example_OBJECTS) $(fileselector_entry_example_DEPENDENCIES) | ||
1346 | @rm -f fileselector_entry_example$(EXEEXT) | ||
1347 | $(AM_V_CCLD)$(LINK) $(fileselector_entry_example_OBJECTS) $(fileselector_entry_example_LDADD) $(LIBS) | ||
1348 | fileselector_example$(EXEEXT): $(fileselector_example_OBJECTS) $(fileselector_example_DEPENDENCIES) | ||
1349 | @rm -f fileselector_example$(EXEEXT) | ||
1350 | $(AM_V_CCLD)$(LINK) $(fileselector_example_OBJECTS) $(fileselector_example_LDADD) $(LIBS) | ||
1351 | flip_example_01$(EXEEXT): $(flip_example_01_OBJECTS) $(flip_example_01_DEPENDENCIES) | ||
1352 | @rm -f flip_example_01$(EXEEXT) | ||
1353 | $(AM_V_CCLD)$(LINK) $(flip_example_01_OBJECTS) $(flip_example_01_LDADD) $(LIBS) | ||
1354 | flipselector_example$(EXEEXT): $(flipselector_example_OBJECTS) $(flipselector_example_DEPENDENCIES) | ||
1355 | @rm -f flipselector_example$(EXEEXT) | ||
1356 | $(AM_V_CCLD)$(LINK) $(flipselector_example_OBJECTS) $(flipselector_example_LDADD) $(LIBS) | ||
1357 | frame_example_01$(EXEEXT): $(frame_example_01_OBJECTS) $(frame_example_01_DEPENDENCIES) | ||
1358 | @rm -f frame_example_01$(EXEEXT) | ||
1359 | $(AM_V_CCLD)$(LINK) $(frame_example_01_OBJECTS) $(frame_example_01_LDADD) $(LIBS) | ||
1360 | general_funcs_example$(EXEEXT): $(general_funcs_example_OBJECTS) $(general_funcs_example_DEPENDENCIES) | ||
1361 | @rm -f general_funcs_example$(EXEEXT) | ||
1362 | $(AM_V_CCLD)$(LINK) $(general_funcs_example_OBJECTS) $(general_funcs_example_LDADD) $(LIBS) | ||
1363 | gengrid_example$(EXEEXT): $(gengrid_example_OBJECTS) $(gengrid_example_DEPENDENCIES) | ||
1364 | @rm -f gengrid_example$(EXEEXT) | ||
1365 | $(AM_V_CCLD)$(LINK) $(gengrid_example_OBJECTS) $(gengrid_example_LDADD) $(LIBS) | ||
1366 | genlist_example_01$(EXEEXT): $(genlist_example_01_OBJECTS) $(genlist_example_01_DEPENDENCIES) | ||
1367 | @rm -f genlist_example_01$(EXEEXT) | ||
1368 | $(AM_V_CCLD)$(LINK) $(genlist_example_01_OBJECTS) $(genlist_example_01_LDADD) $(LIBS) | ||
1369 | genlist_example_02$(EXEEXT): $(genlist_example_02_OBJECTS) $(genlist_example_02_DEPENDENCIES) | ||
1370 | @rm -f genlist_example_02$(EXEEXT) | ||
1371 | $(AM_V_CCLD)$(LINK) $(genlist_example_02_OBJECTS) $(genlist_example_02_LDADD) $(LIBS) | ||
1372 | genlist_example_03$(EXEEXT): $(genlist_example_03_OBJECTS) $(genlist_example_03_DEPENDENCIES) | ||
1373 | @rm -f genlist_example_03$(EXEEXT) | ||
1374 | $(AM_V_CCLD)$(LINK) $(genlist_example_03_OBJECTS) $(genlist_example_03_LDADD) $(LIBS) | ||
1375 | genlist_example_04$(EXEEXT): $(genlist_example_04_OBJECTS) $(genlist_example_04_DEPENDENCIES) | ||
1376 | @rm -f genlist_example_04$(EXEEXT) | ||
1377 | $(AM_V_CCLD)$(LINK) $(genlist_example_04_OBJECTS) $(genlist_example_04_LDADD) $(LIBS) | ||
1378 | genlist_example_05$(EXEEXT): $(genlist_example_05_OBJECTS) $(genlist_example_05_DEPENDENCIES) | ||
1379 | @rm -f genlist_example_05$(EXEEXT) | ||
1380 | $(AM_V_CCLD)$(LINK) $(genlist_example_05_OBJECTS) $(genlist_example_05_LDADD) $(LIBS) | ||
1381 | hover_example_01$(EXEEXT): $(hover_example_01_OBJECTS) $(hover_example_01_DEPENDENCIES) | ||
1382 | @rm -f hover_example_01$(EXEEXT) | ||
1383 | $(AM_V_CCLD)$(LINK) $(hover_example_01_OBJECTS) $(hover_example_01_LDADD) $(LIBS) | ||
1384 | hoversel_example_01$(EXEEXT): $(hoversel_example_01_OBJECTS) $(hoversel_example_01_DEPENDENCIES) | ||
1385 | @rm -f hoversel_example_01$(EXEEXT) | ||
1386 | $(AM_V_CCLD)$(LINK) $(hoversel_example_01_OBJECTS) $(hoversel_example_01_LDADD) $(LIBS) | ||
1387 | icon_example_01$(EXEEXT): $(icon_example_01_OBJECTS) $(icon_example_01_DEPENDENCIES) | ||
1388 | @rm -f icon_example_01$(EXEEXT) | ||
1389 | $(AM_V_CCLD)$(LINK) $(icon_example_01_OBJECTS) $(icon_example_01_LDADD) $(LIBS) | ||
1390 | image_example_01$(EXEEXT): $(image_example_01_OBJECTS) $(image_example_01_DEPENDENCIES) | ||
1391 | @rm -f image_example_01$(EXEEXT) | ||
1392 | $(AM_V_CCLD)$(LINK) $(image_example_01_OBJECTS) $(image_example_01_LDADD) $(LIBS) | ||
1393 | index_example_01$(EXEEXT): $(index_example_01_OBJECTS) $(index_example_01_DEPENDENCIES) | ||
1394 | @rm -f index_example_01$(EXEEXT) | ||
1395 | $(AM_V_CCLD)$(LINK) $(index_example_01_OBJECTS) $(index_example_01_LDADD) $(LIBS) | ||
1396 | index_example_02$(EXEEXT): $(index_example_02_OBJECTS) $(index_example_02_DEPENDENCIES) | ||
1397 | @rm -f index_example_02$(EXEEXT) | ||
1398 | $(AM_V_CCLD)$(LINK) $(index_example_02_OBJECTS) $(index_example_02_LDADD) $(LIBS) | ||
1399 | inwin_example$(EXEEXT): $(inwin_example_OBJECTS) $(inwin_example_DEPENDENCIES) | ||
1400 | @rm -f inwin_example$(EXEEXT) | ||
1401 | $(AM_V_CCLD)$(LINK) $(inwin_example_OBJECTS) $(inwin_example_LDADD) $(LIBS) | ||
1402 | label_example_01$(EXEEXT): $(label_example_01_OBJECTS) $(label_example_01_DEPENDENCIES) | ||
1403 | @rm -f label_example_01$(EXEEXT) | ||
1404 | $(AM_V_CCLD)$(LINK) $(label_example_01_OBJECTS) $(label_example_01_LDADD) $(LIBS) | ||
1405 | layout_example_01$(EXEEXT): $(layout_example_01_OBJECTS) $(layout_example_01_DEPENDENCIES) | ||
1406 | @rm -f layout_example_01$(EXEEXT) | ||
1407 | $(AM_V_CCLD)$(LINK) $(layout_example_01_OBJECTS) $(layout_example_01_LDADD) $(LIBS) | ||
1408 | layout_example_02$(EXEEXT): $(layout_example_02_OBJECTS) $(layout_example_02_DEPENDENCIES) | ||
1409 | @rm -f layout_example_02$(EXEEXT) | ||
1410 | $(AM_V_CCLD)$(LINK) $(layout_example_02_OBJECTS) $(layout_example_02_LDADD) $(LIBS) | ||
1411 | layout_example_03$(EXEEXT): $(layout_example_03_OBJECTS) $(layout_example_03_DEPENDENCIES) | ||
1412 | @rm -f layout_example_03$(EXEEXT) | ||
1413 | $(AM_V_CCLD)$(LINK) $(layout_example_03_OBJECTS) $(layout_example_03_LDADD) $(LIBS) | ||
1414 | list_example_01$(EXEEXT): $(list_example_01_OBJECTS) $(list_example_01_DEPENDENCIES) | ||
1415 | @rm -f list_example_01$(EXEEXT) | ||
1416 | $(AM_V_CCLD)$(LINK) $(list_example_01_OBJECTS) $(list_example_01_LDADD) $(LIBS) | ||
1417 | list_example_02$(EXEEXT): $(list_example_02_OBJECTS) $(list_example_02_DEPENDENCIES) | ||
1418 | @rm -f list_example_02$(EXEEXT) | ||
1419 | $(AM_V_CCLD)$(LINK) $(list_example_02_OBJECTS) $(list_example_02_LDADD) $(LIBS) | ||
1420 | list_example_03$(EXEEXT): $(list_example_03_OBJECTS) $(list_example_03_DEPENDENCIES) | ||
1421 | @rm -f list_example_03$(EXEEXT) | ||
1422 | $(AM_V_CCLD)$(LINK) $(list_example_03_OBJECTS) $(list_example_03_LDADD) $(LIBS) | ||
1423 | map_example_01$(EXEEXT): $(map_example_01_OBJECTS) $(map_example_01_DEPENDENCIES) | ||
1424 | @rm -f map_example_01$(EXEEXT) | ||
1425 | $(AM_V_CCLD)$(LINK) $(map_example_01_OBJECTS) $(map_example_01_LDADD) $(LIBS) | ||
1426 | map_example_02$(EXEEXT): $(map_example_02_OBJECTS) $(map_example_02_DEPENDENCIES) | ||
1427 | @rm -f map_example_02$(EXEEXT) | ||
1428 | $(AM_V_CCLD)$(LINK) $(map_example_02_OBJECTS) $(map_example_02_LDADD) $(LIBS) | ||
1429 | map_example_03$(EXEEXT): $(map_example_03_OBJECTS) $(map_example_03_DEPENDENCIES) | ||
1430 | @rm -f map_example_03$(EXEEXT) | ||
1431 | $(AM_V_CCLD)$(LINK) $(map_example_03_OBJECTS) $(map_example_03_LDADD) $(LIBS) | ||
1432 | mapbuf_example$(EXEEXT): $(mapbuf_example_OBJECTS) $(mapbuf_example_DEPENDENCIES) | ||
1433 | @rm -f mapbuf_example$(EXEEXT) | ||
1434 | $(AM_V_CCLD)$(LINK) $(mapbuf_example_OBJECTS) $(mapbuf_example_LDADD) $(LIBS) | ||
1435 | menu_example_01$(EXEEXT): $(menu_example_01_OBJECTS) $(menu_example_01_DEPENDENCIES) | ||
1436 | @rm -f menu_example_01$(EXEEXT) | ||
1437 | $(AM_V_CCLD)$(LINK) $(menu_example_01_OBJECTS) $(menu_example_01_LDADD) $(LIBS) | ||
1438 | notify_example_01$(EXEEXT): $(notify_example_01_OBJECTS) $(notify_example_01_DEPENDENCIES) | ||
1439 | @rm -f notify_example_01$(EXEEXT) | ||
1440 | $(AM_V_CCLD)$(LINK) $(notify_example_01_OBJECTS) $(notify_example_01_LDADD) $(LIBS) | ||
1441 | panel_example_01$(EXEEXT): $(panel_example_01_OBJECTS) $(panel_example_01_DEPENDENCIES) | ||
1442 | @rm -f panel_example_01$(EXEEXT) | ||
1443 | $(AM_V_CCLD)$(LINK) $(panel_example_01_OBJECTS) $(panel_example_01_LDADD) $(LIBS) | ||
1444 | panes_example$(EXEEXT): $(panes_example_OBJECTS) $(panes_example_DEPENDENCIES) | ||
1445 | @rm -f panes_example$(EXEEXT) | ||
1446 | $(AM_V_CCLD)$(LINK) $(panes_example_OBJECTS) $(panes_example_LDADD) $(LIBS) | ||
1447 | photocam_example_01$(EXEEXT): $(photocam_example_01_OBJECTS) $(photocam_example_01_DEPENDENCIES) | ||
1448 | @rm -f photocam_example_01$(EXEEXT) | ||
1449 | $(AM_V_CCLD)$(LINK) $(photocam_example_01_OBJECTS) $(photocam_example_01_LDADD) $(LIBS) | ||
1450 | popup_example_01$(EXEEXT): $(popup_example_01_OBJECTS) $(popup_example_01_DEPENDENCIES) | ||
1451 | @rm -f popup_example_01$(EXEEXT) | ||
1452 | $(AM_V_CCLD)$(LINK) $(popup_example_01_OBJECTS) $(popup_example_01_LDADD) $(LIBS) | ||
1453 | popup_example_02$(EXEEXT): $(popup_example_02_OBJECTS) $(popup_example_02_DEPENDENCIES) | ||
1454 | @rm -f popup_example_02$(EXEEXT) | ||
1455 | $(AM_V_CCLD)$(LINK) $(popup_example_02_OBJECTS) $(popup_example_02_LDADD) $(LIBS) | ||
1456 | popup_example_03$(EXEEXT): $(popup_example_03_OBJECTS) $(popup_example_03_DEPENDENCIES) | ||
1457 | @rm -f popup_example_03$(EXEEXT) | ||
1458 | $(AM_V_CCLD)$(LINK) $(popup_example_03_OBJECTS) $(popup_example_03_LDADD) $(LIBS) | ||
1459 | progressbar_example$(EXEEXT): $(progressbar_example_OBJECTS) $(progressbar_example_DEPENDENCIES) | ||
1460 | @rm -f progressbar_example$(EXEEXT) | ||
1461 | $(AM_V_CCLD)$(LINK) $(progressbar_example_OBJECTS) $(progressbar_example_LDADD) $(LIBS) | ||
1462 | radio_example_01$(EXEEXT): $(radio_example_01_OBJECTS) $(radio_example_01_DEPENDENCIES) | ||
1463 | @rm -f radio_example_01$(EXEEXT) | ||
1464 | $(AM_V_CCLD)$(LINK) $(radio_example_01_OBJECTS) $(radio_example_01_LDADD) $(LIBS) | ||
1465 | scroller_example_01$(EXEEXT): $(scroller_example_01_OBJECTS) $(scroller_example_01_DEPENDENCIES) | ||
1466 | @rm -f scroller_example_01$(EXEEXT) | ||
1467 | $(AM_V_CCLD)$(LINK) $(scroller_example_01_OBJECTS) $(scroller_example_01_LDADD) $(LIBS) | ||
1468 | segment_control_example$(EXEEXT): $(segment_control_example_OBJECTS) $(segment_control_example_DEPENDENCIES) | ||
1469 | @rm -f segment_control_example$(EXEEXT) | ||
1470 | $(AM_V_CCLD)$(LINK) $(segment_control_example_OBJECTS) $(segment_control_example_LDADD) $(LIBS) | ||
1471 | separator_example_01$(EXEEXT): $(separator_example_01_OBJECTS) $(separator_example_01_DEPENDENCIES) | ||
1472 | @rm -f separator_example_01$(EXEEXT) | ||
1473 | $(AM_V_CCLD)$(LINK) $(separator_example_01_OBJECTS) $(separator_example_01_LDADD) $(LIBS) | ||
1474 | slider_example$(EXEEXT): $(slider_example_OBJECTS) $(slider_example_DEPENDENCIES) | ||
1475 | @rm -f slider_example$(EXEEXT) | ||
1476 | $(AM_V_CCLD)$(LINK) $(slider_example_OBJECTS) $(slider_example_LDADD) $(LIBS) | ||
1477 | slideshow_example$(EXEEXT): $(slideshow_example_OBJECTS) $(slideshow_example_DEPENDENCIES) | ||
1478 | @rm -f slideshow_example$(EXEEXT) | ||
1479 | $(AM_V_CCLD)$(LINK) $(slideshow_example_OBJECTS) $(slideshow_example_LDADD) $(LIBS) | ||
1480 | spinner_example$(EXEEXT): $(spinner_example_OBJECTS) $(spinner_example_DEPENDENCIES) | ||
1481 | @rm -f spinner_example$(EXEEXT) | ||
1482 | $(AM_V_CCLD)$(LINK) $(spinner_example_OBJECTS) $(spinner_example_LDADD) $(LIBS) | ||
1483 | table_example_01$(EXEEXT): $(table_example_01_OBJECTS) $(table_example_01_DEPENDENCIES) | ||
1484 | @rm -f table_example_01$(EXEEXT) | ||
1485 | $(AM_V_CCLD)$(LINK) $(table_example_01_OBJECTS) $(table_example_01_LDADD) $(LIBS) | ||
1486 | table_example_02$(EXEEXT): $(table_example_02_OBJECTS) $(table_example_02_DEPENDENCIES) | ||
1487 | @rm -f table_example_02$(EXEEXT) | ||
1488 | $(AM_V_CCLD)$(LINK) $(table_example_02_OBJECTS) $(table_example_02_LDADD) $(LIBS) | ||
1489 | theme_example_01$(EXEEXT): $(theme_example_01_OBJECTS) $(theme_example_01_DEPENDENCIES) | ||
1490 | @rm -f theme_example_01$(EXEEXT) | ||
1491 | $(AM_V_CCLD)$(LINK) $(theme_example_01_OBJECTS) $(theme_example_01_LDADD) $(LIBS) | ||
1492 | theme_example_02$(EXEEXT): $(theme_example_02_OBJECTS) $(theme_example_02_DEPENDENCIES) | ||
1493 | @rm -f theme_example_02$(EXEEXT) | ||
1494 | $(AM_V_CCLD)$(LINK) $(theme_example_02_OBJECTS) $(theme_example_02_LDADD) $(LIBS) | ||
1495 | thumb_example_01$(EXEEXT): $(thumb_example_01_OBJECTS) $(thumb_example_01_DEPENDENCIES) | ||
1496 | @rm -f thumb_example_01$(EXEEXT) | ||
1497 | $(AM_V_CCLD)$(LINK) $(thumb_example_01_OBJECTS) $(thumb_example_01_LDADD) $(LIBS) | ||
1498 | toolbar_example_01$(EXEEXT): $(toolbar_example_01_OBJECTS) $(toolbar_example_01_DEPENDENCIES) | ||
1499 | @rm -f toolbar_example_01$(EXEEXT) | ||
1500 | $(AM_V_CCLD)$(LINK) $(toolbar_example_01_OBJECTS) $(toolbar_example_01_LDADD) $(LIBS) | ||
1501 | toolbar_example_02$(EXEEXT): $(toolbar_example_02_OBJECTS) $(toolbar_example_02_DEPENDENCIES) | ||
1502 | @rm -f toolbar_example_02$(EXEEXT) | ||
1503 | $(AM_V_CCLD)$(LINK) $(toolbar_example_02_OBJECTS) $(toolbar_example_02_LDADD) $(LIBS) | ||
1504 | toolbar_example_03$(EXEEXT): $(toolbar_example_03_OBJECTS) $(toolbar_example_03_DEPENDENCIES) | ||
1505 | @rm -f toolbar_example_03$(EXEEXT) | ||
1506 | $(AM_V_CCLD)$(LINK) $(toolbar_example_03_OBJECTS) $(toolbar_example_03_LDADD) $(LIBS) | ||
1507 | transit_example_01$(EXEEXT): $(transit_example_01_OBJECTS) $(transit_example_01_DEPENDENCIES) | ||
1508 | @rm -f transit_example_01$(EXEEXT) | ||
1509 | $(AM_V_CCLD)$(LINK) $(transit_example_01_OBJECTS) $(transit_example_01_LDADD) $(LIBS) | ||
1510 | transit_example_02$(EXEEXT): $(transit_example_02_OBJECTS) $(transit_example_02_DEPENDENCIES) | ||
1511 | @rm -f transit_example_02$(EXEEXT) | ||
1512 | $(AM_V_CCLD)$(LINK) $(transit_example_02_OBJECTS) $(transit_example_02_LDADD) $(LIBS) | ||
1513 | transit_example_03$(EXEEXT): $(transit_example_03_OBJECTS) $(transit_example_03_DEPENDENCIES) | ||
1514 | @rm -f transit_example_03$(EXEEXT) | ||
1515 | $(AM_V_CCLD)$(LINK) $(transit_example_03_OBJECTS) $(transit_example_03_LDADD) $(LIBS) | ||
1516 | transit_example_04$(EXEEXT): $(transit_example_04_OBJECTS) $(transit_example_04_DEPENDENCIES) | ||
1517 | @rm -f transit_example_04$(EXEEXT) | ||
1518 | $(AM_V_CCLD)$(LINK) $(transit_example_04_OBJECTS) $(transit_example_04_LDADD) $(LIBS) | ||
1519 | web_example$(EXEEXT): $(web_example_OBJECTS) $(web_example_DEPENDENCIES) | ||
1520 | @rm -f web_example$(EXEEXT) | ||
1521 | $(AM_V_CCLD)$(LINK) $(web_example_OBJECTS) $(web_example_LDADD) $(LIBS) | ||
1522 | win_example$(EXEEXT): $(win_example_OBJECTS) $(win_example_DEPENDENCIES) | ||
1523 | @rm -f win_example$(EXEEXT) | ||
1524 | $(AM_V_CCLD)$(LINK) $(win_example_OBJECTS) $(win_example_LDADD) $(LIBS) | ||
1525 | |||
1526 | mostlyclean-compile: | ||
1527 | -rm -f *.$(OBJEXT) | ||
1528 | |||
1529 | distclean-compile: | ||
1530 | -rm -f *.tab.c | ||
1531 | |||
1532 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/actionslider_example_01.Po@am__quote@ | ||
1533 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bg_example_01.Po@am__quote@ | ||
1534 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bg_example_02.Po@am__quote@ | ||
1535 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bg_example_03.Po@am__quote@ | ||
1536 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/box_example_02.Po@am__quote@ | ||
1537 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bubble_example_01.Po@am__quote@ | ||
1538 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/button_example_00.Po@am__quote@ | ||
1539 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/button_example_01.Po@am__quote@ | ||
1540 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar_example_01.Po@am__quote@ | ||
1541 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar_example_02.Po@am__quote@ | ||
1542 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar_example_03.Po@am__quote@ | ||
1543 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar_example_04.Po@am__quote@ | ||
1544 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar_example_05.Po@am__quote@ | ||
1545 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calendar_example_06.Po@am__quote@ | ||
1546 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_example_01.Po@am__quote@ | ||
1547 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_example.Po@am__quote@ | ||
1548 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colorselector_example_01.Po@am__quote@ | ||
1549 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformant_example_01.Po@am__quote@ | ||
1550 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conformant_example_02.Po@am__quote@ | ||
1551 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctxpopup_example_01.Po@am__quote@ | ||
1552 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datetime_example.Po@am__quote@ | ||
1553 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dayselector_example.Po@am__quote@ | ||
1554 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskselector_example_01.Po@am__quote@ | ||
1555 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskselector_example_02.Po@am__quote@ | ||
1556 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_1.Po@am__quote@ | ||
1557 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_2.Po@am__quote@ | ||
1558 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_3.Po@am__quote@ | ||
1559 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_4.Po@am__quote@ | ||
1560 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_5.Po@am__quote@ | ||
1561 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_6.Po@am__quote@ | ||
1562 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_win32_1.Po@am__quote@ | ||
1563 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_win32_2.Po@am__quote@ | ||
1564 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_win32_3.Po@am__quote@ | ||
1565 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/efl_thread_win32_4.Po@am__quote@ | ||
1566 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entry_example.Po@am__quote@ | ||
1567 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileselector_button_example.Po@am__quote@ | ||
1568 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileselector_entry_example.Po@am__quote@ | ||
1569 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileselector_example.Po@am__quote@ | ||
1570 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flip_example_01.Po@am__quote@ | ||
1571 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flipselector_example.Po@am__quote@ | ||
1572 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame_example_01.Po@am__quote@ | ||
1573 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general_funcs_example.Po@am__quote@ | ||
1574 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gengrid_example.Po@am__quote@ | ||
1575 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genlist_example_01.Po@am__quote@ | ||
1576 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genlist_example_02.Po@am__quote@ | ||
1577 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genlist_example_03.Po@am__quote@ | ||
1578 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genlist_example_04.Po@am__quote@ | ||
1579 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genlist_example_05.Po@am__quote@ | ||
1580 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hover_example_01.Po@am__quote@ | ||
1581 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hoversel_example_01.Po@am__quote@ | ||
1582 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icon_example_01.Po@am__quote@ | ||
1583 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_example_01.Po@am__quote@ | ||
1584 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/index_example_01.Po@am__quote@ | ||
1585 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/index_example_02.Po@am__quote@ | ||
1586 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inwin_example.Po@am__quote@ | ||
1587 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/label_example_01.Po@am__quote@ | ||
1588 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layout_example_01.Po@am__quote@ | ||
1589 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layout_example_02.Po@am__quote@ | ||
1590 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layout_example_03.Po@am__quote@ | ||
1591 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list_example_01.Po@am__quote@ | ||
1592 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list_example_02.Po@am__quote@ | ||
1593 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list_example_03.Po@am__quote@ | ||
1594 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_example_01.Po@am__quote@ | ||
1595 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_example_02.Po@am__quote@ | ||
1596 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_example_03.Po@am__quote@ | ||
1597 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapbuf_example.Po@am__quote@ | ||
1598 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu_example_01.Po@am__quote@ | ||
1599 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify_example_01.Po@am__quote@ | ||
1600 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panel_example_01.Po@am__quote@ | ||
1601 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panes_example.Po@am__quote@ | ||
1602 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/photocam_example_01.Po@am__quote@ | ||
1603 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popup_example_01.Po@am__quote@ | ||
1604 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popup_example_02.Po@am__quote@ | ||
1605 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popup_example_03.Po@am__quote@ | ||
1606 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progressbar_example.Po@am__quote@ | ||
1607 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radio_example_01.Po@am__quote@ | ||
1608 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scroller_example_01.Po@am__quote@ | ||
1609 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/segment_control_example.Po@am__quote@ | ||
1610 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/separator_example_01.Po@am__quote@ | ||
1611 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slider_example.Po@am__quote@ | ||
1612 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slideshow_example.Po@am__quote@ | ||
1613 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spinner_example.Po@am__quote@ | ||
1614 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/table_example_01.Po@am__quote@ | ||
1615 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/table_example_02.Po@am__quote@ | ||
1616 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theme_example_01.Po@am__quote@ | ||
1617 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theme_example_02.Po@am__quote@ | ||
1618 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thumb_example_01.Po@am__quote@ | ||
1619 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_example_01.Po@am__quote@ | ||
1620 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_example_02.Po@am__quote@ | ||
1621 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar_example_03.Po@am__quote@ | ||
1622 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transit_example_01.Po@am__quote@ | ||
1623 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transit_example_02.Po@am__quote@ | ||
1624 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transit_example_03.Po@am__quote@ | ||
1625 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transit_example_04.Po@am__quote@ | ||
1626 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/web_example.Po@am__quote@ | ||
1627 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win_example.Po@am__quote@ | ||
1628 | |||
1629 | .c.o: | ||
1630 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
1631 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
1632 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
1633 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
1634 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
1635 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
1636 | |||
1637 | .c.obj: | ||
1638 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
1639 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
1640 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
1641 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
1642 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
1643 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
1644 | |||
1645 | .c.lo: | ||
1646 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
1647 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
1648 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
1649 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
1650 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
1651 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
1652 | |||
1653 | mostlyclean-libtool: | ||
1654 | -rm -f *.lo | ||
1655 | |||
1656 | clean-libtool: | ||
1657 | -rm -rf .libs _libs | ||
1658 | install-filesDATA: $(files_DATA) | ||
1659 | @$(NORMAL_INSTALL) | ||
1660 | test -z "$(filesdir)" || $(MKDIR_P) "$(DESTDIR)$(filesdir)" | ||
1661 | @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \ | ||
1662 | for p in $$list; do \ | ||
1663 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
1664 | echo "$$d$$p"; \ | ||
1665 | done | $(am__base_list) | \ | ||
1666 | while read files; do \ | ||
1667 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filesdir)'"; \ | ||
1668 | $(INSTALL_DATA) $$files "$(DESTDIR)$(filesdir)" || exit $$?; \ | ||
1669 | done | ||
1670 | |||
1671 | uninstall-filesDATA: | ||
1672 | @$(NORMAL_UNINSTALL) | ||
1673 | @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \ | ||
1674 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | ||
1675 | test -n "$$files" || exit 0; \ | ||
1676 | echo " ( cd '$(DESTDIR)$(filesdir)' && rm -f" $$files ")"; \ | ||
1677 | cd "$(DESTDIR)$(filesdir)" && rm -f $$files | ||
1678 | |||
1679 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
1680 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
1681 | unique=`for i in $$list; do \ | ||
1682 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
1683 | done | \ | ||
1684 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
1685 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
1686 | mkid -fID $$unique | ||
1687 | tags: TAGS | ||
1688 | |||
1689 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
1690 | $(TAGS_FILES) $(LISP) | ||
1691 | set x; \ | ||
1692 | here=`pwd`; \ | ||
1693 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
1694 | unique=`for i in $$list; do \ | ||
1695 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
1696 | done | \ | ||
1697 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
1698 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
1699 | shift; \ | ||
1700 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
1701 | test -n "$$unique" || unique=$$empty_fix; \ | ||
1702 | if test $$# -gt 0; then \ | ||
1703 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
1704 | "$$@" $$unique; \ | ||
1705 | else \ | ||
1706 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
1707 | $$unique; \ | ||
1708 | fi; \ | ||
1709 | fi | ||
1710 | ctags: CTAGS | ||
1711 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
1712 | $(TAGS_FILES) $(LISP) | ||
1713 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
1714 | unique=`for i in $$list; do \ | ||
1715 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
1716 | done | \ | ||
1717 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
1718 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
1719 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
1720 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
1721 | $$unique | ||
1722 | |||
1723 | GTAGS: | ||
1724 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
1725 | && $(am__cd) $(top_srcdir) \ | ||
1726 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
1727 | |||
1728 | distclean-tags: | ||
1729 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
1730 | |||
1731 | distdir: $(DISTFILES) | ||
1732 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
1733 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
1734 | list='$(DISTFILES)'; \ | ||
1735 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
1736 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
1737 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
1738 | case $$dist_files in \ | ||
1739 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
1740 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
1741 | sort -u` ;; \ | ||
1742 | esac; \ | ||
1743 | for file in $$dist_files; do \ | ||
1744 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
1745 | if test -d $$d/$$file; then \ | ||
1746 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
1747 | if test -d "$(distdir)/$$file"; then \ | ||
1748 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
1749 | fi; \ | ||
1750 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
1751 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
1752 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
1753 | fi; \ | ||
1754 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
1755 | else \ | ||
1756 | test -f "$(distdir)/$$file" \ | ||
1757 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
1758 | || exit 1; \ | ||
1759 | fi; \ | ||
1760 | done | ||
1761 | check-am: all-am | ||
1762 | check: check-am | ||
1763 | all-am: Makefile $(PROGRAMS) $(DATA) | ||
1764 | installdirs: | ||
1765 | for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ | ||
1766 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
1767 | done | ||
1768 | install: install-am | ||
1769 | install-exec: install-exec-am | ||
1770 | install-data: install-data-am | ||
1771 | uninstall: uninstall-am | ||
1772 | |||
1773 | install-am: all-am | ||
1774 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
1775 | |||
1776 | installcheck: installcheck-am | ||
1777 | install-strip: | ||
1778 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
1779 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
1780 | `test -z '$(STRIP)' || \ | ||
1781 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
1782 | mostlyclean-generic: | ||
1783 | |||
1784 | clean-generic: | ||
1785 | |||
1786 | distclean-generic: | ||
1787 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
1788 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
1789 | |||
1790 | maintainer-clean-generic: | ||
1791 | @echo "This command is intended for maintainers to use" | ||
1792 | @echo "it deletes files that may require special tools to rebuild." | ||
1793 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
1794 | @EFL_BUILD_EXAMPLES_FALSE@clean-local: | ||
1795 | clean: clean-am | ||
1796 | |||
1797 | clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ | ||
1798 | clean-local mostlyclean-am | ||
1799 | |||
1800 | distclean: distclean-am | ||
1801 | -rm -rf ./$(DEPDIR) | ||
1802 | -rm -f Makefile | ||
1803 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
1804 | distclean-tags | ||
1805 | |||
1806 | dvi: dvi-am | ||
1807 | |||
1808 | dvi-am: | ||
1809 | |||
1810 | html: html-am | ||
1811 | |||
1812 | html-am: | ||
1813 | |||
1814 | info: info-am | ||
1815 | |||
1816 | info-am: | ||
1817 | |||
1818 | install-data-am: install-examplesPROGRAMS install-filesDATA | ||
1819 | |||
1820 | install-dvi: install-dvi-am | ||
1821 | |||
1822 | install-dvi-am: | ||
1823 | |||
1824 | install-exec-am: | ||
1825 | |||
1826 | install-html: install-html-am | ||
1827 | |||
1828 | install-html-am: | ||
1829 | |||
1830 | install-info: install-info-am | ||
1831 | |||
1832 | install-info-am: | ||
1833 | |||
1834 | install-man: | ||
1835 | |||
1836 | install-pdf: install-pdf-am | ||
1837 | |||
1838 | install-pdf-am: | ||
1839 | |||
1840 | install-ps: install-ps-am | ||
1841 | |||
1842 | install-ps-am: | ||
1843 | |||
1844 | installcheck-am: | ||
1845 | |||
1846 | maintainer-clean: maintainer-clean-am | ||
1847 | -rm -rf ./$(DEPDIR) | ||
1848 | -rm -f Makefile | ||
1849 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
1850 | |||
1851 | mostlyclean: mostlyclean-am | ||
1852 | |||
1853 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
1854 | mostlyclean-libtool | ||
1855 | |||
1856 | pdf: pdf-am | ||
1857 | |||
1858 | pdf-am: | ||
1859 | |||
1860 | ps: ps-am | ||
1861 | |||
1862 | ps-am: | ||
1863 | |||
1864 | uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA | ||
1865 | |||
1866 | .MAKE: install-am install-strip | ||
1867 | |||
1868 | .PHONY: CTAGS GTAGS all all-am check check-am clean \ | ||
1869 | clean-examplesPROGRAMS clean-generic clean-libtool clean-local \ | ||
1870 | ctags distclean distclean-compile distclean-generic \ | ||
1871 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | ||
1872 | html-am info info-am install install-am install-data \ | ||
1873 | install-data-am install-dvi install-dvi-am \ | ||
1874 | install-examplesPROGRAMS install-exec install-exec-am \ | ||
1875 | install-filesDATA install-html install-html-am install-info \ | ||
1876 | install-info-am install-man install-pdf install-pdf-am \ | ||
1877 | install-ps install-ps-am install-strip installcheck \ | ||
1878 | installcheck-am installdirs maintainer-clean \ | ||
1879 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
1880 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
1881 | tags uninstall uninstall-am uninstall-examplesPROGRAMS \ | ||
1882 | uninstall-filesDATA | ||
1883 | |||
1884 | |||
1885 | .PHONY: screenshots | ||
1886 | |||
1887 | .edc.edj: | ||
1888 | $(EDJE_CC) $(EDJE_FLAGS) $< $@ | ||
1889 | |||
1890 | @EFL_BUILD_EXAMPLES_TRUE@clean-local: | ||
1891 | @EFL_BUILD_EXAMPLES_TRUE@ rm -f *.edj | ||
1892 | @EFL_BUILD_EXAMPLES_TRUE@screenshots: all | ||
1893 | @EFL_BUILD_EXAMPLES_TRUE@ @mkdir -p $(HTML_SS_DIR) | ||
1894 | @EFL_BUILD_EXAMPLES_TRUE@ @mkdir -p $(LATEX_SS_DIR) | ||
1895 | @EFL_BUILD_EXAMPLES_TRUE@ @for ss in $(SCREENSHOTS); do \ | ||
1896 | @EFL_BUILD_EXAMPLES_TRUE@ SS_ENTRY=($${ss//:/ }) ; \ | ||
1897 | @EFL_BUILD_EXAMPLES_TRUE@ EXAMPLE=$${SS_ENTRY[0]} ; \ | ||
1898 | @EFL_BUILD_EXAMPLES_TRUE@ SS_FILE=$${SS_ENTRY[1]} ; \ | ||
1899 | @EFL_BUILD_EXAMPLES_TRUE@ SS_DELAY=$${SS_ENTRY[2]} ; \ | ||
1900 | @EFL_BUILD_EXAMPLES_TRUE@ ILLUME_KBD=0,0,240,123 ILLUME_IND=0,0,240,32 ILLUME_STK=0,288,240,32 ELM_ENGINE="shot:delay=$${SS_DELAY}:file=$(HTML_SS_DIR)/$${SS_FILE}" ./$${EXAMPLE} ; \ | ||
1901 | @EFL_BUILD_EXAMPLES_TRUE@ convert $(HTML_SS_DIR)/$${SS_FILE} $(LATEX_SS_DIR)/$${SS_FILE/.png/.eps} ; \ | ||
1902 | @EFL_BUILD_EXAMPLES_TRUE@ done | ||
1903 | |||
1904 | @EFL_BUILD_EXAMPLES_FALSE@screenshots: | ||
1905 | @EFL_BUILD_EXAMPLES_FALSE@ @echo "Examples are not built. Run \"./configure --enable-build-examples\" first." | ||
1906 | |||
1907 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
1908 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
1909 | .NOEXPORT: | ||
diff --git a/libraries/elementary/src/examples/actionslider_example_01.c b/libraries/elementary/src/examples/actionslider_example_01.c deleted file mode 100644 index 3e31347..0000000 --- a/libraries/elementary/src/examples/actionslider_example_01.c +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g actionslider_example_01.c -o actionslider_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _pos_selected_cb(void *data, Evas_Object *obj, void *event_info) | ||
7 | { | ||
8 | printf("Selection: %s\n", (char *)event_info); | ||
9 | printf("Label selected: %s\n", elm_actionslider_selected_label_get(obj)); | ||
10 | } | ||
11 | |||
12 | static void | ||
13 | _position_change_magnetic_cb(void *data, Evas_Object * obj, void *event_info) | ||
14 | { | ||
15 | if (!strcmp((char *)event_info, "left")) | ||
16 | elm_actionslider_magnet_pos_set(obj, ELM_ACTIONSLIDER_LEFT); | ||
17 | else if (!strcmp((char *)event_info, "right")) | ||
18 | elm_actionslider_magnet_pos_set(obj, ELM_ACTIONSLIDER_RIGHT); | ||
19 | } | ||
20 | |||
21 | static void | ||
22 | _magnet_enable_disable_cb(void *data, Evas_Object *obj, void *event_info) | ||
23 | { | ||
24 | if (!strcmp((char *)event_info, "left")) | ||
25 | elm_actionslider_magnet_pos_set(obj, ELM_ACTIONSLIDER_CENTER); | ||
26 | else if (!strcmp((char *)event_info, "right")) | ||
27 | elm_actionslider_magnet_pos_set(obj, ELM_ACTIONSLIDER_NONE); | ||
28 | } | ||
29 | |||
30 | static void | ||
31 | on_done(void *data, Evas_Object *obj, void *event_info) | ||
32 | { | ||
33 | elm_exit(); | ||
34 | } | ||
35 | |||
36 | EAPI_MAIN int | ||
37 | elm_main(int argc, char **argv) | ||
38 | { | ||
39 | Evas_Object *win, *bg, *bx, *as; | ||
40 | |||
41 | win = elm_win_add(NULL, "actionslider", ELM_WIN_BASIC); | ||
42 | elm_win_title_set(win, "Actionslider"); | ||
43 | evas_object_smart_callback_add(win, "delete,request", on_done, NULL); | ||
44 | |||
45 | bg = elm_bg_add(win); | ||
46 | elm_win_resize_object_add(win, bg); | ||
47 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, 0); | ||
48 | evas_object_show(bg); | ||
49 | |||
50 | bx = elm_box_add(win); | ||
51 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0); | ||
52 | elm_win_resize_object_add(win, bx); | ||
53 | evas_object_show(bx); | ||
54 | |||
55 | as = elm_actionslider_add(win); | ||
56 | evas_object_size_hint_weight_set(as, EVAS_HINT_EXPAND, 0); | ||
57 | evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); | ||
58 | elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_RIGHT); | ||
59 | elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_RIGHT); | ||
60 | elm_object_part_text_set(as, "left", "Snooze"); | ||
61 | elm_object_part_text_set(as, "right", "Stop"); | ||
62 | elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_LEFT | | ||
63 | ELM_ACTIONSLIDER_RIGHT); | ||
64 | evas_object_smart_callback_add(as, "pos_changed", | ||
65 | _position_change_magnetic_cb, NULL); | ||
66 | evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); | ||
67 | evas_object_show(as); | ||
68 | elm_box_pack_end(bx, as); | ||
69 | |||
70 | as = elm_actionslider_add(win); | ||
71 | evas_object_size_hint_weight_set(as, EVAS_HINT_EXPAND, 0); | ||
72 | evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); | ||
73 | elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_CENTER); | ||
74 | elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_CENTER); | ||
75 | elm_object_part_text_set(as, "left", "Snooze"); | ||
76 | elm_object_part_text_set(as, "right", "Stop"); | ||
77 | elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_LEFT | | ||
78 | ELM_ACTIONSLIDER_RIGHT); | ||
79 | evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); | ||
80 | evas_object_show(as); | ||
81 | elm_box_pack_end(bx, as); | ||
82 | |||
83 | as = elm_actionslider_add(win); | ||
84 | elm_object_style_set(as, "bar"); | ||
85 | evas_object_size_hint_weight_set(as, EVAS_HINT_EXPAND, 0); | ||
86 | evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); | ||
87 | elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_LEFT); | ||
88 | elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_CENTER| | ||
89 | ELM_ACTIONSLIDER_RIGHT); | ||
90 | elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_CENTER | | ||
91 | ELM_ACTIONSLIDER_RIGHT); | ||
92 | elm_object_part_text_set(as, "center", "Accept"); | ||
93 | elm_object_part_text_set(as, "right", "Reject"); | ||
94 | evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); | ||
95 | evas_object_show(as); | ||
96 | elm_box_pack_end(bx, as); | ||
97 | |||
98 | as = elm_actionslider_add(win); | ||
99 | elm_object_style_set(as, "bar"); | ||
100 | evas_object_size_hint_weight_set(as, EVAS_HINT_EXPAND, 0); | ||
101 | evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); | ||
102 | elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_LEFT); | ||
103 | elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_LEFT); | ||
104 | elm_object_part_text_set(as, "center", "Accept"); | ||
105 | elm_object_part_text_set(as, "right", "Reject"); | ||
106 | elm_object_text_set(as, "Go"); | ||
107 | evas_object_smart_callback_add(as, "pos_changed", | ||
108 | _position_change_magnetic_cb, NULL); | ||
109 | evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); | ||
110 | evas_object_show(as); | ||
111 | elm_box_pack_end(bx, as); | ||
112 | |||
113 | |||
114 | as = elm_actionslider_add(win); | ||
115 | evas_object_size_hint_weight_set(as, EVAS_HINT_EXPAND, 0); | ||
116 | evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); | ||
117 | elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_LEFT); | ||
118 | elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_ALL); | ||
119 | elm_object_part_text_set(as, "left", "Left"); | ||
120 | elm_object_part_text_set(as, "center", "Center"); | ||
121 | elm_object_part_text_set(as, "right", "Right"); | ||
122 | elm_object_text_set(as, "Go"); | ||
123 | evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); | ||
124 | evas_object_show(as); | ||
125 | elm_box_pack_end(bx, as); | ||
126 | |||
127 | as = elm_actionslider_add(win); | ||
128 | evas_object_size_hint_weight_set(as, EVAS_HINT_EXPAND, 0); | ||
129 | evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0); | ||
130 | elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_CENTER); | ||
131 | elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_CENTER); | ||
132 | elm_object_part_text_set(as, "left", "Enable"); | ||
133 | elm_object_part_text_set(as, "center", "Magnet"); | ||
134 | elm_object_part_text_set(as, "right", "Disable"); | ||
135 | evas_object_smart_callback_add(as, "pos_changed", | ||
136 | _magnet_enable_disable_cb, NULL); | ||
137 | evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL); | ||
138 | evas_object_show(as); | ||
139 | elm_box_pack_end(bx, as); | ||
140 | |||
141 | evas_object_resize(win, 320, 400); | ||
142 | evas_object_show(win); | ||
143 | |||
144 | elm_run(); | ||
145 | elm_shutdown(); | ||
146 | return 0; | ||
147 | } | ||
148 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/bg_example_01.c b/libraries/elementary/src/examples/bg_example_01.c deleted file mode 100644 index 307f11a..0000000 --- a/libraries/elementary/src/examples/bg_example_01.c +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o bg_example_01 bg_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | on_done(void *data, Evas_Object *obj, void *event_info) | ||
8 | { | ||
9 | /* quit the mainloop (elm_run) */ | ||
10 | elm_exit(); | ||
11 | } | ||
12 | |||
13 | EAPI_MAIN int | ||
14 | elm_main(int argc, char **argv) | ||
15 | { | ||
16 | Evas_Object *win, *bg; | ||
17 | |||
18 | win = elm_win_add(NULL, "bg-plain", ELM_WIN_BASIC); | ||
19 | elm_win_title_set(win, "Bg Plain"); | ||
20 | evas_object_smart_callback_add(win, "delete,request", on_done, NULL); | ||
21 | elm_win_autodel_set(win, EINA_TRUE); | ||
22 | |||
23 | bg = elm_bg_add(win); | ||
24 | /* allow bg to expand in x & y */ | ||
25 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
26 | elm_win_resize_object_add(win, bg); | ||
27 | evas_object_show(bg); | ||
28 | |||
29 | /* set size hints. a minimum size for the bg. this should propagate back | ||
30 | * to the window thus limiting its size based off the bg as the bg is one | ||
31 | * of the window's resize objects. */ | ||
32 | evas_object_size_hint_min_set(bg, 160, 160); | ||
33 | /* and set a maximum size. not needed very often. normally used together | ||
34 | * with evas_object_size_hint_min_set() at the same size to make a | ||
35 | * window not resizable */ | ||
36 | evas_object_size_hint_max_set(bg, 640, 640); | ||
37 | /* and now just resize the window to a size you want. normally widgets | ||
38 | * will determine the initial size though */ | ||
39 | evas_object_resize(win, 320, 320); | ||
40 | /* and show the window */ | ||
41 | evas_object_show(win); | ||
42 | |||
43 | elm_run(); /* and run the program now, starting to handle all | ||
44 | * events, etc. */ | ||
45 | elm_shutdown(); /* clean up and shut down */ | ||
46 | |||
47 | /* exit code */ | ||
48 | return 0; | ||
49 | } | ||
50 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/bg_example_02.c b/libraries/elementary/src/examples/bg_example_02.c deleted file mode 100644 index eec6101..0000000 --- a/libraries/elementary/src/examples/bg_example_02.c +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o bg_example_02 bg_example_02.c -g `pkg-config --cflags --libs elementary` | ||
3 | //where directory is the a path where images/plant_01.jpg can be found. | ||
4 | |||
5 | #include <Elementary.h> | ||
6 | |||
7 | static void | ||
8 | on_done(void *data, Evas_Object *obj, void *event_info) | ||
9 | { | ||
10 | /* quit the mainloop (elm_run) */ | ||
11 | elm_exit(); | ||
12 | } | ||
13 | |||
14 | EAPI_MAIN int | ||
15 | elm_main(int argc, char **argv) | ||
16 | { | ||
17 | Evas_Object *win, *bg; | ||
18 | char buf[PATH_MAX]; | ||
19 | |||
20 | elm_app_info_set(elm_main, "elementary", "images/plant_01.jpg"); | ||
21 | win = elm_win_add(NULL, "bg-image", ELM_WIN_BASIC); | ||
22 | elm_win_title_set(win, "Bg Image"); | ||
23 | evas_object_smart_callback_add(win, "delete,request", on_done, NULL); | ||
24 | elm_win_autodel_set(win, EINA_TRUE); | ||
25 | |||
26 | bg = elm_bg_add(win); | ||
27 | elm_bg_load_size_set(bg, 20, 20); | ||
28 | elm_bg_option_set(bg, ELM_BG_OPTION_CENTER); | ||
29 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); | ||
30 | elm_bg_file_set(bg, buf, NULL); | ||
31 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
32 | elm_win_resize_object_add(win, bg); | ||
33 | evas_object_show(bg); | ||
34 | |||
35 | evas_object_size_hint_min_set(bg, 160, 160); | ||
36 | evas_object_size_hint_max_set(bg, 640, 640); | ||
37 | evas_object_resize(win, 320, 320); | ||
38 | evas_object_show(win); | ||
39 | |||
40 | elm_run(); | ||
41 | elm_shutdown(); | ||
42 | |||
43 | return 0; | ||
44 | } | ||
45 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/bg_example_03.c b/libraries/elementary/src/examples/bg_example_03.c deleted file mode 100644 index 0ffe185..0000000 --- a/libraries/elementary/src/examples/bg_example_03.c +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o bg_example_03 bg_example_03.c -g `pkg-config --cflags --libs elementary` | ||
3 | //where directory is the a path where images/plant_01.jpg can be found. | ||
4 | |||
5 | #include <Elementary.h> | ||
6 | |||
7 | static void | ||
8 | on_done(void *data, Evas_Object *obj, void *event_info) | ||
9 | { | ||
10 | /* quit the mainloop (elm_run) */ | ||
11 | elm_exit(); | ||
12 | } | ||
13 | |||
14 | static void | ||
15 | _cb_radio_changed(void *data, Evas_Object *obj, void *event) | ||
16 | { | ||
17 | Evas_Object *o_bg = data; | ||
18 | |||
19 | elm_bg_option_set(o_bg, elm_radio_value_get((Evas_Object *)obj)); | ||
20 | } | ||
21 | |||
22 | static void | ||
23 | _cb_overlay_changed(void *data, Evas_Object *obj, void *event) | ||
24 | { | ||
25 | Evas_Object *o_bg = data; | ||
26 | |||
27 | if (elm_check_state_get(obj)) | ||
28 | { | ||
29 | Evas_Object *parent, *over; | ||
30 | char buff[PATH_MAX]; | ||
31 | |||
32 | snprintf(buff, sizeof(buff), "%s/objects/test.edj", elm_app_data_dir_get()); | ||
33 | parent = elm_object_parent_widget_get(o_bg); | ||
34 | over = edje_object_add(evas_object_evas_get(parent)); | ||
35 | edje_object_file_set(over, buff, "bg_overlay"); | ||
36 | elm_object_part_content_set(o_bg, "overlay", over); | ||
37 | } | ||
38 | else | ||
39 | elm_object_part_content_set(o_bg, "overlay", NULL); | ||
40 | } | ||
41 | |||
42 | static void | ||
43 | _cb_color_changed(void *data, Evas_Object *obj, void *event) | ||
44 | { | ||
45 | Evas_Object *o_bg = data; | ||
46 | double val = 0.0; | ||
47 | |||
48 | val = elm_spinner_value_get(obj); | ||
49 | if (val == 1.0) | ||
50 | elm_bg_color_set(o_bg, 255, 255, 255); | ||
51 | else if (val == 2.0) | ||
52 | elm_bg_color_set(o_bg, 255, 0, 0); | ||
53 | else if (val == 3.0) | ||
54 | elm_bg_color_set(o_bg, 0, 0, 255); | ||
55 | else if (val == 4.0) | ||
56 | elm_bg_color_set(o_bg, 0, 255, 0); | ||
57 | } | ||
58 | |||
59 | EAPI_MAIN int | ||
60 | elm_main(int argc, char **argv) | ||
61 | { | ||
62 | Evas_Object *win, *bg; | ||
63 | Evas_Object *box, *hbox, *o_bg; | ||
64 | Evas_Object *rd, *rdg; | ||
65 | char buf[PATH_MAX]; | ||
66 | |||
67 | elm_app_info_set(elm_main, "elementary", "objects/test.edj"); | ||
68 | win = elm_win_add(NULL, "bg-options", ELM_WIN_BASIC); | ||
69 | elm_win_title_set(win, "Bg Options"); | ||
70 | evas_object_smart_callback_add(win, "delete,request", on_done, NULL); | ||
71 | elm_win_autodel_set(win, EINA_TRUE); | ||
72 | |||
73 | bg = elm_bg_add(win); | ||
74 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
75 | elm_win_resize_object_add(win, bg); | ||
76 | evas_object_show(bg); | ||
77 | |||
78 | box = elm_box_add(win); | ||
79 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
80 | elm_win_resize_object_add(win, box); | ||
81 | evas_object_show(box); | ||
82 | |||
83 | o_bg = elm_bg_add(win); | ||
84 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); | ||
85 | elm_bg_file_set(o_bg, buf, NULL); | ||
86 | evas_object_size_hint_weight_set(o_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
87 | evas_object_size_hint_align_set(o_bg, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
88 | elm_box_pack_end(box, o_bg); | ||
89 | evas_object_show(o_bg); | ||
90 | |||
91 | hbox = elm_box_add(win); | ||
92 | elm_box_horizontal_set(hbox, EINA_TRUE); | ||
93 | evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
94 | evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
95 | |||
96 | rd = elm_radio_add(win); | ||
97 | elm_radio_state_value_set(rd, ELM_BG_OPTION_CENTER); | ||
98 | elm_object_text_set(rd, "Center"); | ||
99 | evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
100 | evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg); | ||
101 | elm_box_pack_end(hbox, rd); | ||
102 | evas_object_show(rd); | ||
103 | rdg = rd; | ||
104 | |||
105 | rd = elm_radio_add(win); | ||
106 | elm_radio_state_value_set(rd, ELM_BG_OPTION_SCALE); | ||
107 | elm_radio_group_add(rd, rdg); | ||
108 | elm_object_text_set(rd, "Scale"); | ||
109 | evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
110 | evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg); | ||
111 | elm_box_pack_end(hbox, rd); | ||
112 | evas_object_show(rd); | ||
113 | |||
114 | rd = elm_radio_add(win); | ||
115 | elm_radio_state_value_set(rd, ELM_BG_OPTION_STRETCH); | ||
116 | elm_radio_group_add(rd, rdg); | ||
117 | elm_object_text_set(rd, "Stretch"); | ||
118 | evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
119 | evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg); | ||
120 | elm_box_pack_end(hbox, rd); | ||
121 | evas_object_show(rd); | ||
122 | |||
123 | rd = elm_radio_add(win); | ||
124 | elm_radio_state_value_set(rd, ELM_BG_OPTION_TILE); | ||
125 | elm_radio_group_add(rd, rdg); | ||
126 | elm_object_text_set(rd, "Tile"); | ||
127 | evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
128 | evas_object_smart_callback_add(rd, "changed", _cb_radio_changed, o_bg); | ||
129 | elm_box_pack_end(hbox, rd); | ||
130 | evas_object_show(rd); | ||
131 | |||
132 | elm_radio_value_set(rdg, ELM_BG_OPTION_SCALE); | ||
133 | |||
134 | rd = elm_check_add(win); | ||
135 | elm_object_text_set(rd, "Show Overlay"); | ||
136 | evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
137 | evas_object_smart_callback_add(rd, "changed", _cb_overlay_changed, o_bg); | ||
138 | elm_box_pack_end(hbox, rd); | ||
139 | evas_object_show(rd); | ||
140 | |||
141 | /* color choices ... this is ghetto, but we don't have a 'colorpicker' | ||
142 | * widget yet :( */ | ||
143 | rd = elm_spinner_add(win); | ||
144 | elm_object_style_set(rd, "vertical"); | ||
145 | elm_spinner_min_max_set(rd, 1, 4); | ||
146 | elm_spinner_label_format_set(rd, "%.0f"); | ||
147 | elm_spinner_editable_set(rd, EINA_FALSE); | ||
148 | elm_spinner_special_value_add(rd, 1, "White"); | ||
149 | elm_spinner_special_value_add(rd, 2, "Red"); | ||
150 | elm_spinner_special_value_add(rd, 3, "Blue"); | ||
151 | elm_spinner_special_value_add(rd, 4, "Green"); | ||
152 | evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
153 | evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
154 | evas_object_smart_callback_add(rd, "changed", _cb_color_changed, o_bg); | ||
155 | elm_box_pack_end(hbox, rd); | ||
156 | evas_object_show(rd); | ||
157 | |||
158 | elm_box_pack_end(box, hbox); | ||
159 | evas_object_show(hbox); | ||
160 | |||
161 | evas_object_size_hint_min_set(bg, 160, 160); | ||
162 | evas_object_size_hint_max_set(bg, 640, 640); | ||
163 | evas_object_resize(win, 460, 320); | ||
164 | evas_object_show(win); | ||
165 | |||
166 | elm_run(); | ||
167 | elm_shutdown(); | ||
168 | |||
169 | return 0; | ||
170 | } | ||
171 | |||
172 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/box_example_02.c b/libraries/elementary/src/examples/box_example_02.c deleted file mode 100644 index 48e470b..0000000 --- a/libraries/elementary/src/examples/box_example_02.c +++ /dev/null | |||
@@ -1,169 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g box_example_02.c -o box_example_02 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | typedef struct | ||
7 | { | ||
8 | Eina_List *transitions; | ||
9 | Evas_Object *box; | ||
10 | Evas_Object_Box_Layout last_layout; | ||
11 | } Transitions_Data; | ||
12 | |||
13 | static void | ||
14 | _add_cb(void *data, Evas_Object *obj, void *ev) | ||
15 | { | ||
16 | Evas_Object *btn; | ||
17 | Eina_List *children; | ||
18 | Transitions_Data *tdata = data; | ||
19 | |||
20 | btn = elm_button_add(tdata->box); | ||
21 | elm_object_text_set(btn, "I do nothing"); | ||
22 | children = (Eina_List *)elm_box_children_get(tdata->box); | ||
23 | if (children) | ||
24 | { | ||
25 | elm_box_pack_after(tdata->box, btn, (Evas_Object *)children->data); | ||
26 | eina_list_free(children); | ||
27 | } | ||
28 | else | ||
29 | elm_box_pack_end(tdata->box, btn); | ||
30 | evas_object_show(btn); | ||
31 | } | ||
32 | |||
33 | static void | ||
34 | _clear_cb(void *data, Evas_Object *obj, void *ev) | ||
35 | { | ||
36 | Transitions_Data *tdata = data; | ||
37 | elm_box_clear(tdata->box); | ||
38 | } | ||
39 | |||
40 | static void | ||
41 | _unpack_cb(void *data, Evas_Object *obj, void *ev) | ||
42 | { | ||
43 | Transitions_Data *tdata = data; | ||
44 | elm_box_unpack(tdata->box, obj); | ||
45 | evas_object_move(obj, 0, 50); | ||
46 | evas_object_color_set(obj, 128, 64, 0, 128); | ||
47 | } | ||
48 | |||
49 | static void | ||
50 | _test_box_transition_change(void *data) | ||
51 | { | ||
52 | Transitions_Data *tdata = data; | ||
53 | Elm_Box_Transition *layout_data; | ||
54 | Evas_Object_Box_Layout next_layout; | ||
55 | |||
56 | if (!data) return; | ||
57 | next_layout = eina_list_data_get(tdata->transitions); | ||
58 | layout_data = elm_box_transition_new(2.0, tdata->last_layout, | ||
59 | NULL, NULL, next_layout, NULL, NULL, | ||
60 | _test_box_transition_change, tdata); | ||
61 | elm_box_layout_set(tdata->box, elm_box_layout_transition, layout_data, | ||
62 | elm_box_transition_free); | ||
63 | tdata->last_layout = next_layout; | ||
64 | |||
65 | tdata->transitions = eina_list_demote_list(tdata->transitions, | ||
66 | tdata->transitions); | ||
67 | } | ||
68 | |||
69 | EAPI_MAIN int | ||
70 | elm_main(int argc, char *argv[]) | ||
71 | { | ||
72 | Evas_Object *win, *bg, *bigbox, *bx, *bt; | ||
73 | static Transitions_Data tdata = { | ||
74 | .transitions = NULL, | ||
75 | .box = NULL, | ||
76 | .last_layout = NULL | ||
77 | }; | ||
78 | |||
79 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
80 | |||
81 | win = elm_win_add(NULL, "box-transition", ELM_WIN_BASIC); | ||
82 | elm_win_title_set(win, "Box Transition"); | ||
83 | elm_win_autodel_set(win, EINA_TRUE); | ||
84 | evas_object_resize(win, 300, 320); | ||
85 | evas_object_show(win); | ||
86 | |||
87 | bg = elm_bg_add(win); | ||
88 | elm_win_resize_object_add(win, bg); | ||
89 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
90 | evas_object_show(bg); | ||
91 | |||
92 | bigbox = elm_box_add(win); | ||
93 | evas_object_size_hint_weight_set(bigbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
94 | elm_win_resize_object_add(win, bigbox); | ||
95 | evas_object_show(bigbox); | ||
96 | |||
97 | bx = elm_box_add(win); | ||
98 | elm_box_horizontal_set(bx, EINA_TRUE); | ||
99 | elm_box_pack_end(bigbox, bx); | ||
100 | evas_object_show(bx); | ||
101 | |||
102 | bt = elm_button_add(win); | ||
103 | elm_object_text_set(bt, "Add"); | ||
104 | elm_box_pack_end(bx, bt); | ||
105 | evas_object_show(bt); | ||
106 | evas_object_smart_callback_add(bt, "clicked", _add_cb, &tdata); | ||
107 | |||
108 | bt = elm_button_add(win); | ||
109 | elm_object_text_set(bt, "Clear"); | ||
110 | elm_box_pack_end(bx, bt); | ||
111 | evas_object_show(bt); | ||
112 | evas_object_smart_callback_add(bt, "clicked", _clear_cb, &tdata); | ||
113 | |||
114 | bx = elm_box_add(win); | ||
115 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
116 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
117 | elm_box_pack_end(bigbox, bx); | ||
118 | evas_object_show(bx); | ||
119 | |||
120 | bt = elm_button_add(win); | ||
121 | elm_object_text_set(bt, "Button 1"); | ||
122 | evas_object_smart_callback_add(bt, "clicked", _unpack_cb, &tdata); | ||
123 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
124 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
125 | elm_box_pack_end(bx, bt); | ||
126 | evas_object_show(bt); | ||
127 | |||
128 | bt = elm_button_add(win); | ||
129 | elm_object_text_set(bt, "Button 2"); | ||
130 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0); | ||
131 | evas_object_size_hint_align_set(bt, 1.0, 0.5); | ||
132 | evas_object_smart_callback_add(bt, "clicked", _unpack_cb, &tdata); | ||
133 | elm_box_pack_end(bx, bt); | ||
134 | evas_object_show(bt); | ||
135 | |||
136 | bt = elm_button_add(win); | ||
137 | elm_object_text_set(bt, "Button 3"); | ||
138 | evas_object_smart_callback_add(bt, "clicked", _unpack_cb, &tdata); | ||
139 | elm_box_pack_end(bx, bt); | ||
140 | evas_object_show(bt); | ||
141 | |||
142 | tdata.box = bx; | ||
143 | tdata.last_layout = evas_object_box_layout_horizontal; | ||
144 | tdata.transitions = eina_list_append(tdata.transitions, | ||
145 | evas_object_box_layout_vertical); | ||
146 | tdata.transitions = eina_list_append(tdata.transitions, | ||
147 | evas_object_box_layout_horizontal); | ||
148 | tdata.transitions = eina_list_append(tdata.transitions, | ||
149 | evas_object_box_layout_stack); | ||
150 | tdata.transitions = eina_list_append(tdata.transitions, | ||
151 | evas_object_box_layout_homogeneous_vertical); | ||
152 | tdata.transitions = eina_list_append(tdata.transitions, | ||
153 | evas_object_box_layout_homogeneous_horizontal); | ||
154 | tdata.transitions = eina_list_append(tdata.transitions, | ||
155 | evas_object_box_layout_flow_vertical); | ||
156 | tdata.transitions = eina_list_append(tdata.transitions, | ||
157 | evas_object_box_layout_flow_horizontal); | ||
158 | tdata.transitions = eina_list_append(tdata.transitions, | ||
159 | evas_object_box_layout_stack); | ||
160 | |||
161 | elm_box_layout_set(bx, evas_object_box_layout_horizontal, NULL, NULL); | ||
162 | _test_box_transition_change(&tdata); | ||
163 | |||
164 | elm_run(); | ||
165 | elm_shutdown(); | ||
166 | |||
167 | return 0; | ||
168 | } | ||
169 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/bubble_example_01.c b/libraries/elementary/src/examples/bubble_example_01.c deleted file mode 100644 index c3e2cff..0000000 --- a/libraries/elementary/src/examples/bubble_example_01.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o bubble_example_01 bubble_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | void | ||
7 | _bla(void *data, Evas_Object *obj, void *event_info) | ||
8 | { | ||
9 | static unsigned char corner = 0; | ||
10 | ++corner; | ||
11 | if (corner > 3) | ||
12 | elm_bubble_pos_set(obj, ELM_BUBBLE_POS_TOP_LEFT); | ||
13 | else | ||
14 | elm_bubble_pos_set(obj, corner); | ||
15 | |||
16 | } | ||
17 | |||
18 | EAPI_MAIN int | ||
19 | elm_main(int argc, char **argv) | ||
20 | { | ||
21 | Evas_Object *win, *bg, *bubble, *label, *icon; | ||
22 | |||
23 | win = elm_win_add(NULL, "bubble", ELM_WIN_BASIC); | ||
24 | elm_win_title_set(win, "Bubble"); | ||
25 | elm_win_autodel_set(win, EINA_TRUE); | ||
26 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
27 | evas_object_resize(win, 300, 200); | ||
28 | evas_object_show(win); | ||
29 | |||
30 | bg = elm_bg_add(win); | ||
31 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
32 | elm_win_resize_object_add(win, bg); | ||
33 | evas_object_show(bg); | ||
34 | |||
35 | label = elm_label_add(win); | ||
36 | elm_object_text_set(label, "This is the CONTENT of our bubble"); | ||
37 | evas_object_show(label); | ||
38 | |||
39 | icon = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
40 | evas_object_color_set(icon, 0, 0, 255, 255); | ||
41 | evas_object_show(icon); | ||
42 | |||
43 | bubble = elm_bubble_add(win); | ||
44 | elm_object_part_content_set(bubble, "icon", icon); | ||
45 | elm_object_part_text_set(bubble, "info", "INFO"); | ||
46 | elm_object_text_set(bubble, "LABEL"); | ||
47 | elm_object_content_set(bubble, label); | ||
48 | evas_object_resize(bubble, 300, 100); | ||
49 | evas_object_show(bubble); | ||
50 | |||
51 | evas_object_smart_callback_add(bubble, "clicked", _bla, NULL); | ||
52 | |||
53 | label = elm_label_add(win); | ||
54 | elm_object_text_set(label, "Bubble with no icon, info or label"); | ||
55 | evas_object_show(label); | ||
56 | |||
57 | bubble = elm_bubble_add(win); | ||
58 | elm_object_content_set(bubble, label); | ||
59 | evas_object_resize(bubble, 200, 50); | ||
60 | evas_object_move(bubble, 0, 110); | ||
61 | evas_object_show(bubble); | ||
62 | |||
63 | elm_run(); | ||
64 | elm_shutdown(); | ||
65 | |||
66 | return 0; | ||
67 | } | ||
68 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/button_example_00.c b/libraries/elementary/src/examples/button_example_00.c deleted file mode 100644 index d9f37b1..0000000 --- a/libraries/elementary/src/examples/button_example_00.c +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * gcc -o button_example_00 button_example_00.c `pkg-config --cflags --libs elementary` | ||
3 | */ | ||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | on_click(void *data, Evas_Object *obj, void *event_info) | ||
8 | { | ||
9 | elm_exit(); | ||
10 | } | ||
11 | |||
12 | EAPI_MAIN int | ||
13 | elm_main(int argc, char **argv) | ||
14 | { | ||
15 | Evas_Object *win = NULL; | ||
16 | Evas_Object *bg = NULL; | ||
17 | Evas_Object *btn = NULL; | ||
18 | |||
19 | /* Create an win, associate it with a canvas and */ | ||
20 | /* turn it visible on WM (Window Manager). */ | ||
21 | win = elm_win_add(NULL, "Greetings", ELM_WIN_BASIC); | ||
22 | elm_win_title_set(win, "Hello, World!"); | ||
23 | elm_win_autodel_set(win, EINA_TRUE); | ||
24 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
25 | evas_object_resize(win, 240, 60); | ||
26 | evas_object_show(win); | ||
27 | |||
28 | /* Create a bg, associate it to an win */ | ||
29 | /* and turn it visible on WM. */ | ||
30 | bg = elm_bg_add(win); | ||
31 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
32 | elm_win_resize_object_add(win, bg); | ||
33 | evas_object_show(bg); | ||
34 | |||
35 | /* Create a btn, associate to a function, associate */ | ||
36 | /* to win, give a dimension and position. */ | ||
37 | btn = elm_button_add(win); | ||
38 | elm_object_text_set(btn, "Good-Bye, World!"); | ||
39 | evas_object_smart_callback_add(btn, "clicked", on_click, NULL); | ||
40 | evas_object_resize(btn, 120, 30); | ||
41 | evas_object_move(btn, 60, 15); | ||
42 | evas_object_show(btn); | ||
43 | |||
44 | elm_run(); | ||
45 | elm_shutdown(); | ||
46 | |||
47 | return 0; | ||
48 | } | ||
49 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/button_example_01.c b/libraries/elementary/src/examples/button_example_01.c deleted file mode 100644 index 4005662..0000000 --- a/libraries/elementary/src/examples/button_example_01.c +++ /dev/null | |||
@@ -1,265 +0,0 @@ | |||
1 | /* | ||
2 | * gcc -o button_example_01 button_example_01.c `pkg-config --cflags --libs elementary` | ||
3 | */ | ||
4 | #include <Elementary.h> | ||
5 | |||
6 | typedef struct | ||
7 | { | ||
8 | Evas_Object *mid; | ||
9 | Evas_Object *icon_still; | ||
10 | struct { | ||
11 | Evas_Object *up; | ||
12 | Evas_Object *down; | ||
13 | Evas_Object *left; | ||
14 | Evas_Object *right; | ||
15 | } cursors; | ||
16 | } App_Data; | ||
17 | |||
18 | static void | ||
19 | _btn_cursors_release_cb(void *data, Evas_Object *btn, void *ev) | ||
20 | { | ||
21 | App_Data *app = data; | ||
22 | elm_object_part_content_set(app->mid, "icon", app->icon_still); | ||
23 | app->icon_still = NULL; | ||
24 | } | ||
25 | |||
26 | static void | ||
27 | _btn_cursors_move_cb(void *data, Evas_Object *btn, void *ev) | ||
28 | { | ||
29 | App_Data *app = data; | ||
30 | double ax, ay; | ||
31 | |||
32 | if (!app->icon_still) | ||
33 | { | ||
34 | Evas_Object *icon; | ||
35 | app->icon_still = elm_object_content_unset(app->mid); | ||
36 | evas_object_hide(app->icon_still); | ||
37 | icon = elm_icon_add(app->mid); | ||
38 | elm_icon_standard_set(icon, "chat"); | ||
39 | elm_object_part_content_set(app->mid, "icon", icon); | ||
40 | } | ||
41 | |||
42 | evas_object_size_hint_align_get(app->mid, &ax, &ay); | ||
43 | if (btn == app->cursors.up) | ||
44 | { | ||
45 | ay -= 0.05; | ||
46 | if (ay < 0.0) | ||
47 | ay = 0.0; | ||
48 | } | ||
49 | else if (btn == app->cursors.down) | ||
50 | { | ||
51 | ay += 0.05; | ||
52 | if (ay > 1.0) | ||
53 | ay = 1.0; | ||
54 | } | ||
55 | else if (btn == app->cursors.left) | ||
56 | { | ||
57 | ax -= 0.05; | ||
58 | if (ax < 0.0) | ||
59 | ax = 0.0; | ||
60 | } | ||
61 | else if (btn == app->cursors.right) | ||
62 | { | ||
63 | ax += 0.05; | ||
64 | if (ax > 1.0) | ||
65 | ax = 1.0; | ||
66 | } | ||
67 | evas_object_size_hint_align_set(app->mid, ax, ay); | ||
68 | } | ||
69 | |||
70 | static void | ||
71 | _btn_options_cb(void *data, Evas_Object *btn, void *ev) | ||
72 | { | ||
73 | char *ptr; | ||
74 | double t; | ||
75 | App_Data *app = data; | ||
76 | const char *lbl = elm_object_text_get(btn); | ||
77 | |||
78 | ptr = strchr(lbl, ':'); | ||
79 | ptr += 2; | ||
80 | t = strtod(ptr, NULL); | ||
81 | |||
82 | if (!strncmp(lbl, "Initial", 7)) | ||
83 | { | ||
84 | elm_button_autorepeat_initial_timeout_set(app->cursors.up, t); | ||
85 | elm_button_autorepeat_initial_timeout_set(app->cursors.down, t); | ||
86 | elm_button_autorepeat_initial_timeout_set(app->cursors.left, t); | ||
87 | elm_button_autorepeat_initial_timeout_set(app->cursors.right, t); | ||
88 | } | ||
89 | else if (!strncmp(lbl, "Gap", 3)) | ||
90 | { | ||
91 | elm_button_autorepeat_gap_timeout_set(app->cursors.up, t); | ||
92 | elm_button_autorepeat_gap_timeout_set(app->cursors.down, t); | ||
93 | elm_button_autorepeat_gap_timeout_set(app->cursors.left, t); | ||
94 | elm_button_autorepeat_gap_timeout_set(app->cursors.right, t); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | EAPI_MAIN int | ||
99 | elm_main(int argc, char *argv[]) | ||
100 | { | ||
101 | Evas_Object *win, *bg, *box, *box2, *btn, *icon; | ||
102 | static App_Data data; | ||
103 | |||
104 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
105 | |||
106 | win = elm_win_add(NULL, "Button example", ELM_WIN_BASIC); | ||
107 | elm_win_title_set(win, "Button example"); | ||
108 | elm_win_autodel_set(win, EINA_TRUE); | ||
109 | evas_object_resize(win, 300, 320); | ||
110 | evas_object_show(win); | ||
111 | |||
112 | bg = elm_bg_add(win); | ||
113 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
114 | elm_win_resize_object_add(win, bg); | ||
115 | evas_object_show(bg); | ||
116 | |||
117 | box = elm_box_add(win); | ||
118 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
119 | elm_win_resize_object_add(win, box); | ||
120 | evas_object_show(box); | ||
121 | |||
122 | box2 = elm_box_add(win); | ||
123 | elm_box_horizontal_set(box2, EINA_TRUE); | ||
124 | evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, 0.0); | ||
125 | elm_box_pack_end(box, box2); | ||
126 | evas_object_show(box2); | ||
127 | |||
128 | btn = elm_button_add(win); | ||
129 | elm_object_text_set(btn, "Initial: 0.0"); | ||
130 | elm_box_pack_end(box2, btn); | ||
131 | evas_object_show(btn); | ||
132 | evas_object_smart_callback_add(btn, "clicked", _btn_options_cb, &data); | ||
133 | |||
134 | btn = elm_button_add(win); | ||
135 | elm_object_text_set(btn, "Initial: 1.0"); | ||
136 | elm_box_pack_end(box2, btn); | ||
137 | evas_object_show(btn); | ||
138 | evas_object_smart_callback_add(btn, "clicked", _btn_options_cb, &data); | ||
139 | |||
140 | btn = elm_button_add(win); | ||
141 | elm_object_text_set(btn, "Initial: 5.0"); | ||
142 | elm_box_pack_end(box2, btn); | ||
143 | evas_object_show(btn); | ||
144 | evas_object_smart_callback_add(btn, "clicked", _btn_options_cb, &data); | ||
145 | |||
146 | box2 = elm_box_add(win); | ||
147 | elm_box_horizontal_set(box2, EINA_TRUE); | ||
148 | evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, 0.0); | ||
149 | elm_box_pack_end(box, box2); | ||
150 | evas_object_show(box2); | ||
151 | |||
152 | btn = elm_button_add(win); | ||
153 | elm_object_text_set(btn, "Gap: 0.1"); | ||
154 | elm_box_pack_end(box2, btn); | ||
155 | evas_object_show(btn); | ||
156 | evas_object_smart_callback_add(btn, "clicked", _btn_options_cb, &data); | ||
157 | |||
158 | btn = elm_button_add(win); | ||
159 | elm_object_text_set(btn, "Gap: 0.5"); | ||
160 | elm_box_pack_end(box2, btn); | ||
161 | evas_object_show(btn); | ||
162 | evas_object_smart_callback_add(btn, "clicked", _btn_options_cb, &data); | ||
163 | |||
164 | btn = elm_button_add(win); | ||
165 | elm_object_text_set(btn, "Gap: 1.0"); | ||
166 | elm_box_pack_end(box2, btn); | ||
167 | evas_object_show(btn); | ||
168 | evas_object_smart_callback_add(btn, "clicked", _btn_options_cb, &data); | ||
169 | |||
170 | btn = elm_button_add(win); | ||
171 | elm_button_autorepeat_set(btn, EINA_TRUE); | ||
172 | elm_button_autorepeat_initial_timeout_set(btn, 1.0); | ||
173 | elm_button_autorepeat_gap_timeout_set(btn, 0.5); | ||
174 | evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0.0); | ||
175 | evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0.0); | ||
176 | elm_box_pack_end(box, btn); | ||
177 | evas_object_show(btn); | ||
178 | evas_object_smart_callback_add(btn, "repeated", _btn_cursors_move_cb, &data); | ||
179 | evas_object_smart_callback_add(btn, "unpressed", _btn_cursors_release_cb, | ||
180 | &data); | ||
181 | |||
182 | icon = elm_icon_add(win); | ||
183 | elm_icon_standard_set(icon, "arrow_up"); | ||
184 | elm_object_part_content_set(btn, "icon", icon); | ||
185 | |||
186 | data.cursors.up = btn; | ||
187 | |||
188 | box2 = elm_box_add(win); | ||
189 | elm_box_horizontal_set(box2, EINA_TRUE); | ||
190 | evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
191 | evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
192 | elm_box_pack_end(box, box2); | ||
193 | evas_object_show(box2); | ||
194 | |||
195 | btn = elm_button_add(win); | ||
196 | elm_button_autorepeat_set(btn, EINA_TRUE); | ||
197 | elm_button_autorepeat_initial_timeout_set(btn, 1.0); | ||
198 | elm_button_autorepeat_gap_timeout_set(btn, 0.5); | ||
199 | evas_object_size_hint_weight_set(btn, 0.0, EVAS_HINT_EXPAND); | ||
200 | evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL); | ||
201 | elm_box_pack_end(box2, btn); | ||
202 | evas_object_show(btn); | ||
203 | evas_object_smart_callback_add(btn, "repeated", _btn_cursors_move_cb, &data); | ||
204 | evas_object_smart_callback_add(btn, "unpressed", _btn_cursors_release_cb, | ||
205 | &data); | ||
206 | |||
207 | icon = elm_icon_add(win); | ||
208 | elm_icon_standard_set(icon, "arrow_left"); | ||
209 | elm_object_part_content_set(btn, "icon", icon); | ||
210 | |||
211 | data.cursors.left = btn; | ||
212 | |||
213 | btn = elm_button_add(win); | ||
214 | evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
215 | elm_box_pack_end(box2, btn); | ||
216 | evas_object_show(btn); | ||
217 | |||
218 | icon = elm_icon_add(win); | ||
219 | elm_icon_standard_set(icon, "close"); | ||
220 | elm_object_part_content_set(btn, "icon", icon); | ||
221 | |||
222 | data.mid = btn; | ||
223 | |||
224 | btn = elm_button_add(win); | ||
225 | elm_button_autorepeat_set(btn, EINA_TRUE); | ||
226 | elm_button_autorepeat_initial_timeout_set(btn, 1.0); | ||
227 | elm_button_autorepeat_gap_timeout_set(btn, 0.5); | ||
228 | evas_object_size_hint_weight_set(btn, 0.0, EVAS_HINT_EXPAND); | ||
229 | evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL); | ||
230 | elm_box_pack_end(box2, btn); | ||
231 | evas_object_show(btn); | ||
232 | evas_object_smart_callback_add(btn, "repeated", _btn_cursors_move_cb, &data); | ||
233 | evas_object_smart_callback_add(btn, "unpressed", _btn_cursors_release_cb, | ||
234 | &data); | ||
235 | |||
236 | icon = elm_icon_add(win); | ||
237 | elm_icon_standard_set(icon, "arrow_right"); | ||
238 | elm_object_part_content_set(btn, "icon", icon); | ||
239 | |||
240 | data.cursors.right = btn; | ||
241 | |||
242 | btn = elm_button_add(win); | ||
243 | elm_button_autorepeat_set(btn, EINA_TRUE); | ||
244 | elm_button_autorepeat_initial_timeout_set(btn, 1.0); | ||
245 | elm_button_autorepeat_gap_timeout_set(btn, 0.5); | ||
246 | evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0.0); | ||
247 | evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0.0); | ||
248 | elm_box_pack_end(box, btn); | ||
249 | evas_object_show(btn); | ||
250 | evas_object_smart_callback_add(btn, "repeated", _btn_cursors_move_cb, &data); | ||
251 | evas_object_smart_callback_add(btn, "unpressed", _btn_cursors_release_cb, | ||
252 | &data); | ||
253 | |||
254 | icon = elm_icon_add(win); | ||
255 | elm_icon_standard_set(icon, "arrow_down"); | ||
256 | elm_object_part_content_set(btn, "icon", icon); | ||
257 | |||
258 | data.cursors.down = btn; | ||
259 | |||
260 | elm_run(); | ||
261 | elm_shutdown(); | ||
262 | |||
263 | return 0; | ||
264 | } | ||
265 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/calendar_example_01.c b/libraries/elementary/src/examples/calendar_example_01.c deleted file mode 100644 index f00cfc4..0000000 --- a/libraries/elementary/src/examples/calendar_example_01.c +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>calendar widget</b> example, illustrating its | ||
3 | * creation. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -o calendar_example_01 calendar_example_01.c -g `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | EAPI_MAIN int | ||
15 | elm_main(int argc, char **argv) | ||
16 | { | ||
17 | Evas_Object *win, *bg, *cal; | ||
18 | |||
19 | win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); | ||
20 | elm_win_title_set(win, "Calendar Creation Example"); | ||
21 | elm_win_autodel_set(win, EINA_TRUE); | ||
22 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
23 | |||
24 | bg = elm_bg_add(win); | ||
25 | elm_win_resize_object_add(win, bg); | ||
26 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
27 | evas_object_show(bg); | ||
28 | |||
29 | cal = elm_calendar_add(win); | ||
30 | elm_win_resize_object_add(win, cal); | ||
31 | evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
32 | evas_object_show(cal); | ||
33 | |||
34 | evas_object_show(win); | ||
35 | |||
36 | elm_run(); | ||
37 | elm_shutdown(); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/calendar_example_02.c b/libraries/elementary/src/examples/calendar_example_02.c deleted file mode 100644 index 8978451..0000000 --- a/libraries/elementary/src/examples/calendar_example_02.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /** | ||
2 | * Elementary's <b>calendar widget</b> example, demonstrates how to modify | ||
3 | * layout strings, using functions to set weekdays names and to format | ||
4 | * month and year label. | ||
5 | * | ||
6 | * See stdout/stderr for output. Compile with: | ||
7 | * | ||
8 | * @verbatim | ||
9 | * gcc -o calendar_example_02 calendar_example_02.c -g `pkg-config --cflags --libs elementary` | ||
10 | * @endverbatim | ||
11 | */ | ||
12 | |||
13 | #include <Elementary.h> | ||
14 | |||
15 | static char * | ||
16 | _format_month_year(struct tm *format_time) | ||
17 | { | ||
18 | char buf[32]; | ||
19 | /* abbreviates month and year */ | ||
20 | if (!strftime(buf, sizeof(buf), "%b %y", format_time)) return NULL; | ||
21 | return strdup(buf); | ||
22 | } | ||
23 | |||
24 | EAPI_MAIN int | ||
25 | elm_main(int argc, char **argv) | ||
26 | { | ||
27 | Evas_Object *win, *bg, *cal; | ||
28 | const char *weekdays[] = | ||
29 | { | ||
30 | "S", "M", "T", "W", "T", "F", "S" | ||
31 | }; | ||
32 | |||
33 | win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); | ||
34 | elm_win_title_set(win, "Calendar Layout Formatting Example"); | ||
35 | elm_win_autodel_set(win, EINA_TRUE); | ||
36 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
37 | |||
38 | bg = elm_bg_add(win); | ||
39 | elm_win_resize_object_add(win, bg); | ||
40 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
41 | evas_object_show(bg); | ||
42 | |||
43 | cal = elm_calendar_add(win); | ||
44 | elm_win_resize_object_add(win, cal); | ||
45 | evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
46 | |||
47 | elm_calendar_format_function_set(cal, _format_month_year); | ||
48 | elm_calendar_weekdays_names_set(cal, weekdays); | ||
49 | |||
50 | evas_object_show(cal); | ||
51 | |||
52 | evas_object_show(win); | ||
53 | |||
54 | elm_run(); | ||
55 | elm_shutdown(); | ||
56 | |||
57 | return 0; | ||
58 | } | ||
59 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/calendar_example_03.c b/libraries/elementary/src/examples/calendar_example_03.c deleted file mode 100644 index 2e86be5..0000000 --- a/libraries/elementary/src/examples/calendar_example_03.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>calendar widget</b> example, illustrating minimum | ||
3 | * and maximum years restriction. User will see a calendar of years | ||
4 | * 2020, 2021 and 2022. | ||
5 | * | ||
6 | * See stdout/stderr for output. Compile with: | ||
7 | * | ||
8 | * @verbatim | ||
9 | * gcc -o calendar_example_03 calendar_example_03.c -g `pkg-config --cflags --libs elementary` | ||
10 | * @endverbatim | ||
11 | */ | ||
12 | |||
13 | #include <Elementary.h> | ||
14 | |||
15 | EAPI_MAIN int | ||
16 | elm_main(int argc, char **argv) | ||
17 | { | ||
18 | Evas_Object *win, *bg, *cal; | ||
19 | |||
20 | win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); | ||
21 | elm_win_title_set(win, "Calendar Min/Max Year Example"); | ||
22 | elm_win_autodel_set(win, EINA_TRUE); | ||
23 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
24 | |||
25 | bg = elm_bg_add(win); | ||
26 | elm_win_resize_object_add(win, bg); | ||
27 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
28 | evas_object_show(bg); | ||
29 | |||
30 | cal = elm_calendar_add(win); | ||
31 | elm_win_resize_object_add(win, cal); | ||
32 | evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
33 | elm_calendar_min_max_year_set(cal, 2020, 2022); | ||
34 | evas_object_show(cal); | ||
35 | |||
36 | evas_object_show(win); | ||
37 | |||
38 | elm_run(); | ||
39 | elm_shutdown(); | ||
40 | |||
41 | return 0; | ||
42 | } | ||
43 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/calendar_example_04.c b/libraries/elementary/src/examples/calendar_example_04.c deleted file mode 100644 index ff170ba..0000000 --- a/libraries/elementary/src/examples/calendar_example_04.c +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /** | ||
2 | * Elementary's <b>calendar widget</b> example, regarding date selection. | ||
3 | * Shows how to disable day selection by user and how to select a date. | ||
4 | * It selects two days from current day. | ||
5 | * | ||
6 | * See stdout/stderr for output. Compile with: | ||
7 | * | ||
8 | * @verbatim | ||
9 | * gcc -o calendar_example_04 calendar_example_04.c -g `pkg-config --cflags --libs elementary` | ||
10 | * @endverbatim | ||
11 | */ | ||
12 | |||
13 | #include <Elementary.h> | ||
14 | |||
15 | #define SECS_DAY 86400 | ||
16 | |||
17 | EAPI_MAIN int | ||
18 | elm_main(int argc, char **argv) | ||
19 | { | ||
20 | Evas_Object *win, *bg, *bx, *cal, *cal2; | ||
21 | struct tm selected_time; | ||
22 | time_t current_time; | ||
23 | |||
24 | win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); | ||
25 | elm_win_title_set(win, "Calendar Day Selection Example"); | ||
26 | elm_win_autodel_set(win, EINA_TRUE); | ||
27 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
28 | |||
29 | bg = elm_bg_add(win); | ||
30 | elm_win_resize_object_add(win, bg); | ||
31 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
32 | evas_object_show(bg); | ||
33 | |||
34 | bx = elm_box_add(win); | ||
35 | elm_win_resize_object_add(win, bx); | ||
36 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
37 | evas_object_show(bx); | ||
38 | |||
39 | cal = elm_calendar_add(win); | ||
40 | evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
41 | evas_object_size_hint_align_set(cal, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
42 | elm_calendar_day_selection_disabled_set(cal, EINA_TRUE); | ||
43 | evas_object_show(cal); | ||
44 | elm_box_pack_end(bx, cal); | ||
45 | |||
46 | cal2 = elm_calendar_add(win); | ||
47 | evas_object_size_hint_weight_set(cal2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
48 | evas_object_size_hint_align_set(cal2, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
49 | current_time = time(NULL) + 2 * SECS_DAY; | ||
50 | localtime_r(¤t_time, &selected_time); | ||
51 | elm_calendar_selected_time_set(cal2, &selected_time); | ||
52 | evas_object_show(cal2); | ||
53 | elm_box_pack_end(bx, cal2); | ||
54 | |||
55 | evas_object_show(win); | ||
56 | |||
57 | elm_run(); | ||
58 | elm_shutdown(); | ||
59 | |||
60 | return 0; | ||
61 | } | ||
62 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/calendar_example_05.c b/libraries/elementary/src/examples/calendar_example_05.c deleted file mode 100644 index 6f752b1..0000000 --- a/libraries/elementary/src/examples/calendar_example_05.c +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | /** | ||
2 | * Elementary's <b>calendar widget</b> example, illustrating smart callback | ||
3 | * registry and getters usage. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -o calendar_example_05 calendar_example_05.c -g `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _print_cal_info_cb(void *data, Evas_Object *obj, void *event_info) | ||
16 | { | ||
17 | int year_min, year_max; | ||
18 | Eina_Bool sel_enabled; | ||
19 | const char **wds; | ||
20 | struct tm sel_time; | ||
21 | double interval; | ||
22 | |||
23 | if (!elm_calendar_selected_time_get(obj, &sel_time)) | ||
24 | return; | ||
25 | |||
26 | interval = elm_calendar_interval_get(obj); | ||
27 | elm_calendar_min_max_year_get(obj, &year_min, &year_max); | ||
28 | sel_enabled = !elm_calendar_day_selection_disabled_get(obj); | ||
29 | wds = elm_calendar_weekdays_names_get(obj); | ||
30 | |||
31 | printf("Day: %i, Mon: %i, Year %i, WeekDay: %i<br>\n" | ||
32 | "Interval: %0.2f, Year_Min: %i, Year_Max %i, Sel Enabled : %i<br>\n" | ||
33 | "Weekdays: %s, %s, %s, %s, %s, %s, %s<br>\n\n", | ||
34 | sel_time.tm_mday, sel_time.tm_mon, sel_time.tm_year + 1900, sel_time.tm_wday, | ||
35 | interval, year_min, year_max, sel_enabled, | ||
36 | wds[0], wds[1], wds[2], wds[3], wds[4], wds[5], wds[6]); | ||
37 | } | ||
38 | |||
39 | EAPI_MAIN int | ||
40 | elm_main(int argc, char **argv) | ||
41 | { | ||
42 | Evas_Object *win, *bg, *cal; | ||
43 | |||
44 | win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); | ||
45 | elm_win_title_set(win, "Calendar Getters Example"); | ||
46 | elm_win_autodel_set(win, EINA_TRUE); | ||
47 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
48 | |||
49 | bg = elm_bg_add(win); | ||
50 | elm_win_resize_object_add(win, bg); | ||
51 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
52 | evas_object_show(bg); | ||
53 | |||
54 | cal = elm_calendar_add(win); | ||
55 | elm_win_resize_object_add(win, cal); | ||
56 | evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
57 | /* Add callback to display calendar information every time user | ||
58 | * selects a new date */ | ||
59 | evas_object_smart_callback_add(cal, "changed", _print_cal_info_cb, NULL); | ||
60 | evas_object_show(cal); | ||
61 | |||
62 | evas_object_show(win); | ||
63 | |||
64 | elm_run(); | ||
65 | elm_shutdown(); | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/calendar_example_06.c b/libraries/elementary/src/examples/calendar_example_06.c deleted file mode 100644 index 192aed3..0000000 --- a/libraries/elementary/src/examples/calendar_example_06.c +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /** | ||
2 | * Elementary's <b>calendar widget</b> example to add / del / clear marks. | ||
3 | * | ||
4 | * See stdout/stderr for output. Compile with: | ||
5 | * | ||
6 | * @verbatim | ||
7 | * gcc -o calendar_example_06 calendar_example_06.c -g `pkg-config --cflags --libs elementary` | ||
8 | * @endverbatim | ||
9 | */ | ||
10 | |||
11 | #include <Elementary.h> | ||
12 | |||
13 | #define SECS_DAY 86400 | ||
14 | |||
15 | static void | ||
16 | _btn_clear_cb(void *data, Evas_Object *btn, void *ev) | ||
17 | { | ||
18 | Evas_Object *cal = data; | ||
19 | elm_calendar_marks_clear(cal); | ||
20 | elm_calendar_marks_draw(cal); | ||
21 | } | ||
22 | |||
23 | EAPI_MAIN int | ||
24 | elm_main(int argc, char **argv) | ||
25 | { | ||
26 | Evas_Object *win, *bg, *bt, *bx, *cal; | ||
27 | Elm_Calendar_Mark *mark; | ||
28 | struct tm selected_time; | ||
29 | time_t current_time; | ||
30 | struct tm sunday = { 0, 0, 12, 7, 0, 0, 0, 0, -1, 0, NULL }; | ||
31 | /* tm {sec, min, hour, mday, mon, year, wday, yday, isdst } */ | ||
32 | /* weekdays since Sunday, range 0 to 6 */ | ||
33 | struct tm christmas; | ||
34 | christmas.tm_mday = 25; | ||
35 | /* months since Jan, in the range 0 to 11 */ | ||
36 | christmas.tm_mon = 11; | ||
37 | |||
38 | win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); | ||
39 | elm_win_title_set(win, "Calendar Marks Example"); | ||
40 | elm_win_autodel_set(win, EINA_TRUE); | ||
41 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
42 | |||
43 | bg = elm_bg_add(win); | ||
44 | elm_win_resize_object_add(win, bg); | ||
45 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
46 | evas_object_show(bg); | ||
47 | |||
48 | bx = elm_box_add(win); | ||
49 | elm_win_resize_object_add(win, bx); | ||
50 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
51 | evas_object_show(bx); | ||
52 | |||
53 | cal = elm_calendar_add(win); | ||
54 | evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
55 | evas_object_size_hint_align_set(cal, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
56 | elm_box_pack_end(bx, cal); | ||
57 | evas_object_show(cal); | ||
58 | |||
59 | /* check today - we'll remove it later */ | ||
60 | current_time = time(NULL); | ||
61 | localtime_r(¤t_time, &selected_time); | ||
62 | mark = elm_calendar_mark_add(cal, "checked", &selected_time, | ||
63 | ELM_CALENDAR_UNIQUE); | ||
64 | |||
65 | /* check tomorrow */ | ||
66 | current_time = time(NULL) + 1 * SECS_DAY; | ||
67 | localtime_r(¤t_time, &selected_time); | ||
68 | elm_calendar_mark_add(cal, "checked", &selected_time, ELM_CALENDAR_UNIQUE); | ||
69 | |||
70 | /* mark christmas as holiday */ | ||
71 | elm_calendar_mark_add(cal, "holiday", &christmas, ELM_CALENDAR_ANNUALLY); | ||
72 | |||
73 | /* mark Sundays as holidays */ | ||
74 | elm_calendar_mark_add(cal, "holiday", &sunday, ELM_CALENDAR_WEEKLY); | ||
75 | |||
76 | /* ok, let's remove today's check */ | ||
77 | elm_calendar_mark_del(mark); | ||
78 | |||
79 | elm_calendar_marks_draw(cal); | ||
80 | |||
81 | bt = elm_button_add(win); | ||
82 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
83 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
84 | elm_object_text_set(bt, "Clear marks"); | ||
85 | evas_object_smart_callback_add(bt, "clicked", _btn_clear_cb, cal); | ||
86 | elm_box_pack_end(bx, bt); | ||
87 | evas_object_show(bt); | ||
88 | |||
89 | evas_object_show(win); | ||
90 | |||
91 | elm_run(); | ||
92 | elm_shutdown(); | ||
93 | |||
94 | return 0; | ||
95 | } | ||
96 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/check_example_01.c b/libraries/elementary/src/examples/check_example_01.c deleted file mode 100644 index d8ae334..0000000 --- a/libraries/elementary/src/examples/check_example_01.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o check_example_01 check_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _print(void *data, Evas_Object *obj, void *event_info); | ||
7 | |||
8 | EAPI_MAIN int | ||
9 | elm_main(int argc, char **argv) | ||
10 | { | ||
11 | Evas_Object *win, *bg, *cb, *cb2, *icon; | ||
12 | Eina_Bool value; | ||
13 | |||
14 | win = elm_win_add(NULL, "check", ELM_WIN_BASIC); | ||
15 | elm_win_title_set(win, "Check"); | ||
16 | elm_win_autodel_set(win, EINA_TRUE); | ||
17 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
18 | |||
19 | bg = elm_bg_add(win); | ||
20 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
21 | elm_win_resize_object_add(win, bg); | ||
22 | evas_object_show(bg); | ||
23 | |||
24 | cb = elm_check_add(win); | ||
25 | elm_object_text_set(cb, "checkbox"); | ||
26 | elm_check_state_pointer_set(cb, &value); | ||
27 | evas_object_smart_callback_add(cb, "changed", _print, &value); | ||
28 | evas_object_move(cb, 10, 10); | ||
29 | evas_object_resize(cb, 200, 30); | ||
30 | evas_object_show(cb); | ||
31 | |||
32 | icon = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
33 | evas_object_color_set(icon, 0, 255, 0, 255); | ||
34 | evas_object_resize(icon, 20, 20); | ||
35 | evas_object_show(icon); | ||
36 | |||
37 | cb2 = elm_check_add(win); | ||
38 | elm_object_text_set(cb2, "another checkbox"); | ||
39 | elm_check_state_set(cb2, EINA_TRUE); | ||
40 | elm_object_part_content_set(cb2, "icon", icon); | ||
41 | evas_object_move(cb2, 10, 50); | ||
42 | evas_object_resize(cb2, 200, 30); | ||
43 | evas_object_show(cb2); | ||
44 | |||
45 | evas_object_resize(win, 200, 100); | ||
46 | evas_object_show(win); | ||
47 | |||
48 | elm_run(); | ||
49 | elm_shutdown(); | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | ELM_MAIN() | ||
54 | |||
55 | static void | ||
56 | _print(void *data, Evas_Object *obj, void *event_info) | ||
57 | { | ||
58 | printf("check %smarked\n", *((Eina_Bool*)data) ? "" : "un"); | ||
59 | } | ||
diff --git a/libraries/elementary/src/examples/clock_example.c b/libraries/elementary/src/examples/clock_example.c deleted file mode 100644 index 7f32cad..0000000 --- a/libraries/elementary/src/examples/clock_example.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>clock widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g clock_example.c -o clock_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | EAPI_MAIN int | ||
23 | elm_main(int argc, char **argv) | ||
24 | { | ||
25 | Evas_Object *win, *bg, *bx, *ck; | ||
26 | unsigned int digedit; | ||
27 | |||
28 | win = elm_win_add(NULL, "clock", ELM_WIN_BASIC); | ||
29 | elm_win_title_set(win, "Clock Example"); | ||
30 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
31 | |||
32 | bg = elm_bg_add(win); | ||
33 | elm_win_resize_object_add(win, bg); | ||
34 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
35 | evas_object_show(bg); | ||
36 | |||
37 | bx = elm_box_add(win); | ||
38 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
39 | elm_win_resize_object_add(win, bx); | ||
40 | evas_object_show(bx); | ||
41 | |||
42 | /* pristine (no seconds, military time) */ | ||
43 | ck = elm_clock_add(win); | ||
44 | elm_box_pack_end(bx, ck); | ||
45 | evas_object_show(ck); | ||
46 | |||
47 | /* am/pm */ | ||
48 | ck = elm_clock_add(win); | ||
49 | elm_clock_show_am_pm_set(ck, EINA_TRUE); | ||
50 | elm_box_pack_end(bx, ck); | ||
51 | evas_object_show(ck); | ||
52 | |||
53 | /* with seconds and custom time */ | ||
54 | ck = elm_clock_add(win); | ||
55 | elm_clock_show_seconds_set(ck, EINA_TRUE); | ||
56 | elm_clock_time_set(ck, 10, 11, 12); | ||
57 | elm_box_pack_end(bx, ck); | ||
58 | evas_object_show(ck); | ||
59 | |||
60 | /* in edition mode, with seconds, custom time and am/pm set */ | ||
61 | ck = elm_clock_add(win); | ||
62 | elm_clock_edit_set(ck, EINA_TRUE); | ||
63 | elm_clock_show_seconds_set(ck, EINA_TRUE); | ||
64 | elm_clock_show_am_pm_set(ck, EINA_TRUE); | ||
65 | elm_clock_time_set(ck, 10, 11, 12); | ||
66 | elm_box_pack_end(bx, ck); | ||
67 | evas_object_show(ck); | ||
68 | |||
69 | /* in edition mode, with seconds, but only some digits editable */ | ||
70 | ck = elm_clock_add(win); | ||
71 | elm_clock_show_seconds_set(ck, EINA_TRUE); | ||
72 | elm_clock_edit_set(ck, EINA_TRUE); | ||
73 | digedit = ELM_CLOCK_EDIT_HOUR_UNIT | ELM_CLOCK_EDIT_MIN_UNIT | ELM_CLOCK_EDIT_SEC_UNIT; | ||
74 | elm_clock_edit_mode_set(ck, digedit); | ||
75 | elm_box_pack_end(bx, ck); | ||
76 | evas_object_show(ck); | ||
77 | |||
78 | evas_object_show(win); | ||
79 | |||
80 | elm_run(); | ||
81 | elm_shutdown(); | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/colorselector_example_01.c b/libraries/elementary/src/examples/colorselector_example_01.c deleted file mode 100644 index 93ea32b..0000000 --- a/libraries/elementary/src/examples/colorselector_example_01.c +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g colorselector_example_01.c -o colorselector_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _change_color(void *data, Evas_Object *obj, void *event_info); | ||
7 | static void _colorpalette_clicked_cb(void *data, Evas_Object *obj, void *event_info); | ||
8 | static void _colorpalette_longpressed_cb(void *data, Evas_Object *obj, void *event_info); | ||
9 | |||
10 | EAPI_MAIN int | ||
11 | elm_main(int argc, char **argv) | ||
12 | { | ||
13 | Evas_Object *win, *bg, *cs, *rect, *bx, *fr; | ||
14 | |||
15 | win = elm_win_add(NULL, "color selector", ELM_WIN_BASIC); | ||
16 | elm_win_title_set(win, "Color selector"); | ||
17 | elm_win_autodel_set(win, EINA_TRUE); | ||
18 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
19 | |||
20 | bg = elm_bg_add(win); | ||
21 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
22 | elm_win_resize_object_add(win, bg); | ||
23 | evas_object_show(bg); | ||
24 | |||
25 | bx = elm_box_add(win); | ||
26 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
27 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
28 | elm_win_resize_object_add(win, bx); | ||
29 | evas_object_show(bx); | ||
30 | |||
31 | fr = elm_frame_add(win); | ||
32 | evas_object_size_hint_weight_set(fr, 1.0, 0.5); | ||
33 | evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
34 | elm_object_text_set(fr, "Color View"); | ||
35 | elm_box_pack_end(bx, fr); | ||
36 | evas_object_show(fr); | ||
37 | |||
38 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
39 | elm_object_content_set(fr, rect); | ||
40 | evas_object_color_set(rect, 255, 90, 18, 255); | ||
41 | evas_object_show(rect); | ||
42 | |||
43 | fr = elm_frame_add(win); | ||
44 | evas_object_size_hint_weight_set(fr, 1.0, 0.5); | ||
45 | evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
46 | elm_object_text_set(fr, "Color Selector"); | ||
47 | elm_box_pack_end(bx, fr); | ||
48 | evas_object_show(fr); | ||
49 | |||
50 | cs = elm_colorselector_add(win); | ||
51 | elm_colorselector_palette_name_set(cs, "painting"); | ||
52 | evas_object_size_hint_weight_set(cs, EVAS_HINT_EXPAND, 0.0); | ||
53 | evas_object_size_hint_align_set(cs, EVAS_HINT_FILL, 0.0); | ||
54 | elm_colorselector_color_set(cs, 255, 90, 18, 255); | ||
55 | evas_object_show(cs); | ||
56 | evas_object_smart_callback_add(cs, "changed", _change_color, rect); | ||
57 | evas_object_smart_callback_add(cs, "color,item,selected", _colorpalette_clicked_cb, rect); | ||
58 | evas_object_smart_callback_add(cs, "color,item,longpressed", _colorpalette_longpressed_cb, rect); | ||
59 | elm_object_content_set(fr, cs); | ||
60 | |||
61 | evas_object_resize(win, 320, 480); | ||
62 | evas_object_show(win); | ||
63 | |||
64 | elm_run(); | ||
65 | elm_shutdown(); | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | ELM_MAIN() | ||
70 | |||
71 | static void | ||
72 | _change_color(void *data, Evas_Object *obj, void *event_info) | ||
73 | { | ||
74 | int r, g, b, a; | ||
75 | elm_colorselector_color_get(obj, &r, &g, &b, &a); | ||
76 | evas_object_color_set(data, r, g, b, a); | ||
77 | } | ||
78 | |||
79 | static void | ||
80 | _colorpalette_clicked_cb(void *data, Evas_Object *obj, void *event_info) | ||
81 | { | ||
82 | int r = 0, g = 0, b = 0 ,a = 0; | ||
83 | Elm_Object_Item *color_it = (Elm_Object_Item *) event_info; | ||
84 | elm_colorselector_palette_item_color_get(color_it, &r, &g, &b, &a); | ||
85 | evas_object_color_set(data, r, g, b, a); | ||
86 | } | ||
87 | |||
88 | static void | ||
89 | _colorpalette_longpressed_cb(void *data, Evas_Object *obj, void *event_info) | ||
90 | { | ||
91 | int r = 0,g = 0,b = 0 ,a = 0; | ||
92 | Elm_Object_Item *color_it = (Elm_Object_Item *) event_info; | ||
93 | elm_colorselector_palette_item_color_get(color_it, &r, &g, &b, &a); | ||
94 | printf("\ncolor = %d-%d-%d-%d\n", r, g, b, a); | ||
95 | } | ||
diff --git a/libraries/elementary/src/examples/conformant_example_01.c b/libraries/elementary/src/examples/conformant_example_01.c deleted file mode 100644 index 426bea4..0000000 --- a/libraries/elementary/src/examples/conformant_example_01.c +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>conformant widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -o conformant_example_01 conformant_example_01.c -g `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | EAPI_MAIN int | ||
15 | elm_main(int argc, char **argv) | ||
16 | { | ||
17 | Evas_Object *win, *bg, *btn, *bx, *en; | ||
18 | |||
19 | win = elm_win_add(NULL, "conformant", ELM_WIN_BASIC); | ||
20 | elm_win_title_set(win, "Conformant Example"); | ||
21 | elm_win_autodel_set(win, EINA_TRUE); | ||
22 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
23 | |||
24 | bg = elm_bg_add(win); | ||
25 | elm_win_resize_object_add(win, bg); | ||
26 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
27 | evas_object_show(bg); | ||
28 | |||
29 | bx = elm_box_add(win); | ||
30 | elm_win_resize_object_add(win, bx); | ||
31 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
32 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
33 | |||
34 | btn = elm_button_add(win); | ||
35 | elm_object_text_set(btn, "Test Conformant"); | ||
36 | evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0); | ||
37 | evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0); | ||
38 | elm_box_pack_end(bx, btn); | ||
39 | evas_object_show(btn); | ||
40 | |||
41 | en = elm_entry_add(win); | ||
42 | elm_entry_scrollable_set(en, EINA_TRUE); | ||
43 | elm_object_text_set(en, | ||
44 | "This is a multi-line entry at the bottom<br>" | ||
45 | "This can contain more than 1 line of text and be " | ||
46 | "scrolled around to allow for entering of lots of " | ||
47 | "content. It is also to test to see that autoscroll " | ||
48 | "moves to the right part of a larger multi-line " | ||
49 | "text entry that is inside of a scroller than can be " | ||
50 | "scrolled around, thus changing the expected position " | ||
51 | "as well as cursor changes updating auto-scroll when " | ||
52 | "it is enabled."); | ||
53 | |||
54 | evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
55 | evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
56 | evas_object_show(en); | ||
57 | elm_box_pack_end(bx, en); | ||
58 | |||
59 | btn = elm_button_add(win); | ||
60 | elm_object_text_set(btn, "Test Conformant"); | ||
61 | evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0); | ||
62 | evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0); | ||
63 | elm_box_pack_end(bx, btn); | ||
64 | evas_object_show(btn); | ||
65 | |||
66 | evas_object_show(bx); | ||
67 | |||
68 | evas_object_resize(win, 240, 480); | ||
69 | evas_object_show(win); | ||
70 | |||
71 | elm_run(); | ||
72 | elm_shutdown(); | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/conformant_example_02.c b/libraries/elementary/src/examples/conformant_example_02.c deleted file mode 100644 index aba7c95..0000000 --- a/libraries/elementary/src/examples/conformant_example_02.c +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>conformant widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g conformant_example_02.c -o conformant_example_02 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | EAPI_MAIN int | ||
15 | elm_main(int argc, char **argv) | ||
16 | { | ||
17 | Evas_Object *win, *bg, *conform, *btn, *bx, *en; | ||
18 | |||
19 | win = elm_win_add(NULL, "conformant", ELM_WIN_BASIC); | ||
20 | elm_win_title_set(win, "Conformant Example"); | ||
21 | elm_win_autodel_set(win, EINA_TRUE); | ||
22 | |||
23 | elm_win_conformant_set(win, EINA_TRUE); | ||
24 | |||
25 | bg = elm_bg_add(win); | ||
26 | elm_win_resize_object_add(win, bg); | ||
27 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
28 | evas_object_show(bg); | ||
29 | |||
30 | conform = elm_conformant_add(win); | ||
31 | elm_win_resize_object_add(win, conform); | ||
32 | evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
33 | evas_object_show(conform); | ||
34 | |||
35 | bx = elm_box_add(win); | ||
36 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
37 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
38 | |||
39 | btn = elm_button_add(win); | ||
40 | elm_object_text_set(btn, "Test Conformant"); | ||
41 | evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0); | ||
42 | evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0); | ||
43 | elm_box_pack_end(bx, btn); | ||
44 | evas_object_show(btn); | ||
45 | |||
46 | en = elm_entry_add(win); | ||
47 | elm_entry_scrollable_set(en, EINA_TRUE); | ||
48 | elm_object_text_set(en, | ||
49 | "This is a multi-line entry at the bottom<br>" | ||
50 | "This can contain more than 1 line of text and be " | ||
51 | "scrolled around to allow for entering of lots of " | ||
52 | "content. It is also to test to see that autoscroll " | ||
53 | "moves to the right part of a larger multi-line " | ||
54 | "text entry that is inside of a scroller than can be " | ||
55 | "scrolled around, thus changing the expected position " | ||
56 | "as well as cursor changes updating auto-scroll when " | ||
57 | "it is enabled."); | ||
58 | |||
59 | evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
60 | evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
61 | evas_object_show(en); | ||
62 | elm_box_pack_end(bx, en); | ||
63 | |||
64 | btn = elm_button_add(win); | ||
65 | elm_object_text_set(btn, "Test Conformant"); | ||
66 | evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0); | ||
67 | evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0); | ||
68 | elm_box_pack_end(bx, btn); | ||
69 | evas_object_show(btn); | ||
70 | |||
71 | elm_object_content_set(conform, bx); | ||
72 | evas_object_show(bx); | ||
73 | |||
74 | evas_object_resize(win, 240, 480); | ||
75 | evas_object_show(win); | ||
76 | |||
77 | elm_run(); | ||
78 | elm_shutdown(); | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/ctxpopup_example_01.c b/libraries/elementary/src/examples/ctxpopup_example_01.c deleted file mode 100644 index 763d71d..0000000 --- a/libraries/elementary/src/examples/ctxpopup_example_01.c +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o ctxpopup_example_01 ctxpopup_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | _ctxpopup_item_cb(void *data, Evas_Object *obj, void *event_info) | ||
8 | { | ||
9 | printf("ctxpopup item selected: %s\n", elm_object_item_text_get(event_info)); | ||
10 | } | ||
11 | |||
12 | Elm_Object_Item *item_new(Evas_Object *ctxpopup, const char * label, const char *icon) | ||
13 | { | ||
14 | Evas_Object *ic = elm_icon_add(ctxpopup); | ||
15 | elm_icon_standard_set(ic, icon); | ||
16 | elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE); | ||
17 | return elm_ctxpopup_item_append(ctxpopup, label, ic, _ctxpopup_item_cb, NULL); | ||
18 | } | ||
19 | |||
20 | static void | ||
21 | _list_item_cb(void *data, Evas_Object *obj, void *event_info) | ||
22 | { | ||
23 | Evas_Object *ctxpopup; | ||
24 | Elm_Object_Item *it; | ||
25 | Evas_Coord x,y; | ||
26 | |||
27 | ctxpopup = elm_ctxpopup_add(obj); | ||
28 | |||
29 | item_new(ctxpopup, "Go to home folder", "home"); | ||
30 | item_new(ctxpopup, "Save file", "file"); | ||
31 | item_new(ctxpopup, "Delete file", "delete"); | ||
32 | it = item_new(ctxpopup, "Navigate to folder", "folder"); | ||
33 | elm_object_item_disabled_set(it, EINA_TRUE); | ||
34 | item_new(ctxpopup, "Edit entry", "edit"); | ||
35 | it = item_new(ctxpopup, "Set date and time", "clock"); | ||
36 | elm_object_item_disabled_set(it, EINA_TRUE); | ||
37 | |||
38 | evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y); | ||
39 | evas_object_size_hint_max_set(ctxpopup, 240, 240); | ||
40 | evas_object_move(ctxpopup, x, y); | ||
41 | evas_object_show(ctxpopup); | ||
42 | |||
43 | elm_list_item_selected_set(event_info, EINA_FALSE); | ||
44 | } | ||
45 | |||
46 | static void | ||
47 | _list_item_cb2(void *data, Evas_Object *obj, void *event_info) | ||
48 | { | ||
49 | Evas_Object *ctxpopup; | ||
50 | Elm_Object_Item *it; | ||
51 | Evas_Coord x,y; | ||
52 | |||
53 | ctxpopup = elm_ctxpopup_add(obj); | ||
54 | elm_ctxpopup_horizontal_set(ctxpopup, EINA_TRUE); | ||
55 | |||
56 | item_new(ctxpopup, NULL, "home"); | ||
57 | item_new(ctxpopup, NULL, "file"); | ||
58 | item_new(ctxpopup, NULL, "delete"); | ||
59 | item_new(ctxpopup, NULL, "folder"); | ||
60 | it = item_new(ctxpopup, NULL, "edit"); | ||
61 | elm_object_item_disabled_set(it, EINA_TRUE); | ||
62 | item_new(ctxpopup, NULL, "clock"); | ||
63 | |||
64 | evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y); | ||
65 | evas_object_size_hint_max_set(ctxpopup, 380, 40); | ||
66 | evas_object_move(ctxpopup, x, y); | ||
67 | evas_object_show(ctxpopup); | ||
68 | |||
69 | elm_list_item_selected_set(event_info, EINA_FALSE); | ||
70 | } | ||
71 | |||
72 | EAPI_MAIN int | ||
73 | elm_main(int argc, char **argv) | ||
74 | { | ||
75 | Evas_Object *win, *bg, *list; | ||
76 | |||
77 | win = elm_win_add(NULL, "Contextual Popup", ELM_WIN_BASIC); | ||
78 | elm_win_title_set(win, "Contextual Popup"); | ||
79 | elm_win_autodel_set(win, EINA_TRUE); | ||
80 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
81 | evas_object_resize(win, 400, 400); | ||
82 | evas_object_show(win); | ||
83 | |||
84 | bg = elm_bg_add(win); | ||
85 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
86 | elm_win_resize_object_add(win, bg); | ||
87 | evas_object_show(bg); | ||
88 | |||
89 | list = elm_list_add(win); | ||
90 | evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
91 | elm_win_resize_object_add(win, list); | ||
92 | elm_list_mode_set(list, ELM_LIST_COMPRESS); | ||
93 | |||
94 | elm_list_item_append(list, "Ctxpopup with icons and labels", NULL, NULL, | ||
95 | _list_item_cb, NULL); | ||
96 | elm_list_item_append(list, "Ctxpopup with icons only", NULL, NULL, | ||
97 | _list_item_cb2, NULL); | ||
98 | evas_object_show(list); | ||
99 | elm_list_go(list); | ||
100 | |||
101 | elm_run(); | ||
102 | elm_shutdown(); | ||
103 | |||
104 | return 0; | ||
105 | } | ||
106 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/datetime_example.c b/libraries/elementary/src/examples/datetime_example.c deleted file mode 100644 index 9b443fe..0000000 --- a/libraries/elementary/src/examples/datetime_example.c +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g datetime_example.c -o datetime_example `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | _on_done(void *data, | ||
8 | Evas_Object *obj, | ||
9 | void *event_info) | ||
10 | { | ||
11 | elm_exit(); | ||
12 | } | ||
13 | |||
14 | EAPI_MAIN int | ||
15 | elm_main(int argc, char *argv[]) | ||
16 | { | ||
17 | Evas_Object *win, *bg, *bx, *datetime; | ||
18 | |||
19 | win = elm_win_add(NULL, "Datetime", ELM_WIN_BASIC); | ||
20 | elm_win_title_set(win, "Datetime"); | ||
21 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
22 | |||
23 | bg = elm_bg_add(win); | ||
24 | elm_win_resize_object_add(win, bg); | ||
25 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
26 | evas_object_show(bg); | ||
27 | |||
28 | bx = elm_box_add(win); | ||
29 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
30 | elm_win_resize_object_add(win, bx); | ||
31 | elm_box_horizontal_set(bx, EINA_FALSE); | ||
32 | evas_object_show(bx); | ||
33 | evas_object_size_hint_min_set(bx, 360, 200); | ||
34 | |||
35 | //datetime showing only DATE | ||
36 | datetime = elm_datetime_add(bx); | ||
37 | evas_object_size_hint_weight_set(datetime, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
38 | evas_object_size_hint_align_set(datetime, EVAS_HINT_FILL, 0.5); | ||
39 | elm_datetime_field_visible_set(datetime, ELM_DATETIME_HOUR, EINA_FALSE); | ||
40 | elm_datetime_field_visible_set(datetime, ELM_DATETIME_MINUTE, EINA_FALSE); | ||
41 | elm_datetime_field_visible_set(datetime, ELM_DATETIME_AMPM, EINA_FALSE); | ||
42 | elm_box_pack_end(bx, datetime); | ||
43 | evas_object_show(datetime); | ||
44 | |||
45 | //datetime showing only TIME | ||
46 | datetime = elm_datetime_add(bx); | ||
47 | evas_object_size_hint_weight_set(datetime, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
48 | evas_object_size_hint_align_set(datetime, EVAS_HINT_FILL, 0.5); | ||
49 | elm_datetime_field_visible_set(datetime, ELM_DATETIME_YEAR, EINA_FALSE); | ||
50 | elm_datetime_field_visible_set(datetime, ELM_DATETIME_MONTH, EINA_FALSE); | ||
51 | elm_datetime_field_visible_set(datetime, ELM_DATETIME_DATE, EINA_FALSE); | ||
52 | elm_box_pack_end(bx, datetime); | ||
53 | evas_object_show(datetime); | ||
54 | |||
55 | //datetime showing both DATE and TIME | ||
56 | datetime = elm_datetime_add(bx); | ||
57 | evas_object_size_hint_weight_set(datetime, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
58 | evas_object_size_hint_align_set(datetime, EVAS_HINT_FILL, 0.5); | ||
59 | elm_box_pack_end(bx, datetime); | ||
60 | evas_object_show(datetime); | ||
61 | |||
62 | evas_object_show(win); | ||
63 | |||
64 | elm_run(); | ||
65 | elm_shutdown(); | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/dayselector_example.c b/libraries/elementary/src/examples/dayselector_example.c deleted file mode 100644 index 56fdea5..0000000 --- a/libraries/elementary/src/examples/dayselector_example.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>dayselector widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g dayselector_example.c -o dayselector_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | /* Callback function when a day is clicked. */ | ||
23 | static void _changed_cb(void* data, Evas_Object* obj, void* event_info) | ||
24 | { | ||
25 | char buf[256]; | ||
26 | Elm_Dayselector_Day day; | ||
27 | Eina_Bool selected; | ||
28 | |||
29 | /* get which day's state is changed */ | ||
30 | day = (Elm_Dayselector_Day) event_info; | ||
31 | /* get the state of corresponding day's check object */ | ||
32 | selected = elm_dayselector_day_selected_get(obj, day); | ||
33 | switch(day) | ||
34 | { | ||
35 | case ELM_DAYSELECTOR_SUN: snprintf(buf, sizeof(buf), "%s", "Sun"); break; | ||
36 | case ELM_DAYSELECTOR_MON: snprintf(buf, sizeof(buf), "%s", "Mon"); break; | ||
37 | case ELM_DAYSELECTOR_TUE: snprintf(buf, sizeof(buf), "%s", "Tue"); break; | ||
38 | case ELM_DAYSELECTOR_WED: snprintf(buf, sizeof(buf), "%s", "Wed"); break; | ||
39 | case ELM_DAYSELECTOR_THU: snprintf(buf, sizeof(buf), "%s", "Thu"); break; | ||
40 | case ELM_DAYSELECTOR_FRI: snprintf(buf, sizeof(buf), "%s", "Fri"); break; | ||
41 | case ELM_DAYSELECTOR_SAT: snprintf(buf, sizeof(buf), "%s", "Sat"); break; | ||
42 | default: snprintf(buf, sizeof(buf), "%s", "???"); break; | ||
43 | } | ||
44 | fprintf(stderr, "%s state is %d\n", buf, selected); | ||
45 | } | ||
46 | /* End of clicked callback */ | ||
47 | |||
48 | EAPI_MAIN int | ||
49 | elm_main(int argc, char **argv) | ||
50 | { | ||
51 | Evas_Object *win, *bg, *bx, *dayselector; | ||
52 | |||
53 | win = elm_win_add(NULL, "dayselector", ELM_WIN_BASIC); | ||
54 | elm_win_title_set(win, "Dayselector Example"); | ||
55 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
56 | |||
57 | bg = elm_bg_add(win); | ||
58 | elm_win_resize_object_add(win, bg); | ||
59 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
60 | evas_object_show(bg); | ||
61 | |||
62 | bx = elm_box_add(win); | ||
63 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
64 | elm_win_resize_object_add(win, bx); | ||
65 | evas_object_show(bx); | ||
66 | |||
67 | /* add a dayselector widget showing weekdays starting from Sunday */ | ||
68 | dayselector = elm_dayselector_add(win); | ||
69 | evas_object_size_hint_weight_set(dayselector, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
70 | evas_object_size_hint_align_set(dayselector, EVAS_HINT_FILL, 0.5); | ||
71 | evas_object_smart_callback_add(dayselector, "dayselector,changed", _changed_cb, NULL); | ||
72 | elm_box_pack_end(bx, dayselector); | ||
73 | evas_object_show(dayselector); | ||
74 | |||
75 | /* add a dayselector widget showing weekdays starting from Monday */ | ||
76 | dayselector = elm_dayselector_add(win); | ||
77 | evas_object_size_hint_weight_set(dayselector, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
78 | evas_object_size_hint_align_set(dayselector, EVAS_HINT_FILL, 0.5); | ||
79 | evas_object_smart_callback_add(dayselector, "dayselector,changed", _changed_cb, NULL); | ||
80 | elm_object_style_set(dayselector, "mon_first"); | ||
81 | elm_box_pack_end(bx, dayselector); | ||
82 | evas_object_show(dayselector); | ||
83 | |||
84 | evas_object_resize(win, 350, 120); | ||
85 | evas_object_show(win); | ||
86 | |||
87 | elm_run(); | ||
88 | elm_shutdown(); | ||
89 | |||
90 | return 0; | ||
91 | } | ||
92 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/diskselector_example_01.c b/libraries/elementary/src/examples/diskselector_example_01.c deleted file mode 100644 index c8ad75b..0000000 --- a/libraries/elementary/src/examples/diskselector_example_01.c +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>diskselector widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g diskselector_example_01.c -o diskselector_example_01 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | EAPI_MAIN int | ||
23 | elm_main(int argc, char **argv) | ||
24 | { | ||
25 | Evas_Object *win, *bg, *bx, *ds; | ||
26 | unsigned int i; | ||
27 | static const char *lbl[] = | ||
28 | { | ||
29 | "Sunday", | ||
30 | "Monday", | ||
31 | "Tuesday", | ||
32 | "Wednesday", | ||
33 | "Thursday", | ||
34 | "Friday", | ||
35 | "Saturday" | ||
36 | }; | ||
37 | |||
38 | win = elm_win_add(NULL, "diskselector", ELM_WIN_BASIC); | ||
39 | elm_win_title_set(win, "Diskselector Example"); | ||
40 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
41 | |||
42 | bg = elm_bg_add(win); | ||
43 | elm_win_resize_object_add(win, bg); | ||
44 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
45 | evas_object_show(bg); | ||
46 | |||
47 | bx = elm_box_add(win); | ||
48 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
49 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
50 | elm_win_resize_object_add(win, bx); | ||
51 | evas_object_show(bx); | ||
52 | |||
53 | /* default */ | ||
54 | ds = elm_diskselector_add(win); | ||
55 | evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
56 | evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
57 | elm_box_pack_end(bx, ds); | ||
58 | for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++) | ||
59 | elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL); | ||
60 | evas_object_show(ds); | ||
61 | |||
62 | /* set round mode and define side label length */ | ||
63 | ds = elm_diskselector_add(win); | ||
64 | evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
65 | evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
66 | elm_box_pack_end(bx, ds); | ||
67 | for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++) | ||
68 | elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL); | ||
69 | elm_diskselector_round_enabled_set(ds, EINA_TRUE); | ||
70 | elm_diskselector_side_text_max_length_set(ds, 2); | ||
71 | evas_object_show(ds); | ||
72 | |||
73 | /* display more than 3 items */ | ||
74 | ds = elm_diskselector_add(win); | ||
75 | evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
76 | evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
77 | elm_box_pack_end(bx, ds); | ||
78 | for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++) | ||
79 | elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL); | ||
80 | elm_diskselector_display_item_num_set(ds, 5); | ||
81 | printf("Number of Items in DiskSelector : %d\n", elm_diskselector_display_item_num_get(ds)); | ||
82 | evas_object_show(ds); | ||
83 | |||
84 | /* set bounce and scroller policy */ | ||
85 | ds = elm_diskselector_add(win); | ||
86 | evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
87 | evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
88 | elm_box_pack_end(bx, ds); | ||
89 | for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++) | ||
90 | elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL); | ||
91 | elm_diskselector_bounce_set(ds, EINA_TRUE, EINA_TRUE); | ||
92 | elm_diskselector_scroller_policy_set(ds, ELM_SCROLLER_POLICY_AUTO, | ||
93 | ELM_SCROLLER_POLICY_ON); | ||
94 | evas_object_show(ds); | ||
95 | |||
96 | evas_object_resize(win, 320, 480); | ||
97 | evas_object_show(win); | ||
98 | |||
99 | elm_run(); | ||
100 | elm_shutdown(); | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/diskselector_example_02.c b/libraries/elementary/src/examples/diskselector_example_02.c deleted file mode 100644 index 443a868..0000000 --- a/libraries/elementary/src/examples/diskselector_example_02.c +++ /dev/null | |||
@@ -1,349 +0,0 @@ | |||
1 | /** | ||
2 | * Elementary's <b>diskselector widget</b> example, illustrating its | ||
3 | * covering most of item functions. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g diskselector_example_02.c -o diskselector_example_02 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static int counter = 3; | ||
15 | |||
16 | static void | ||
17 | _on_done(void *data, | ||
18 | Evas_Object *obj, | ||
19 | void *event_info) | ||
20 | { | ||
21 | elm_exit(); | ||
22 | } | ||
23 | |||
24 | static void | ||
25 | _add_cb(void *data, Evas_Object *obj, void *event_info) | ||
26 | { | ||
27 | Elm_Object_Item *ds_it; | ||
28 | Evas_Object *ds = data; | ||
29 | char label[32]; | ||
30 | |||
31 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
32 | ds_it = elm_diskselector_item_append(ds, label, NULL, NULL, NULL); | ||
33 | if (!ds_it) printf("Error adding item\n"); | ||
34 | } | ||
35 | |||
36 | static void | ||
37 | _add_ic_cb(void *data, Evas_Object *obj, void *event_info) | ||
38 | { | ||
39 | Elm_Object_Item *ds_it; | ||
40 | Evas_Object *ic, *ds = data; | ||
41 | char label[32]; | ||
42 | |||
43 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
44 | ic = elm_icon_add(ds); | ||
45 | elm_icon_standard_set(ic, "home"); | ||
46 | |||
47 | ds_it = elm_diskselector_item_append(ds, label, ic, NULL, NULL); | ||
48 | if (!ds_it) printf("Error adding item with icon\n"); | ||
49 | } | ||
50 | |||
51 | static void | ||
52 | _sel_cb(void *data, Evas_Object *obj, void *event_info) | ||
53 | { | ||
54 | Elm_Object_Item *ds_it = event_info; | ||
55 | printf("Selected label: %s\n", elm_object_item_text_get(ds_it)); | ||
56 | } | ||
57 | |||
58 | static void | ||
59 | _add_func_cb(void *data, Evas_Object *obj, void *event_info) | ||
60 | { | ||
61 | Elm_Object_Item *ds_it; | ||
62 | Evas_Object *ds = data; | ||
63 | char label[32]; | ||
64 | |||
65 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
66 | ds_it = elm_diskselector_item_append(ds, label, NULL, _sel_cb, NULL); | ||
67 | if (!ds_it) printf("Error adding item\n"); | ||
68 | } | ||
69 | |||
70 | static void | ||
71 | _sel_data_cb(void *data, Evas_Object *obj, void *event_info) | ||
72 | { | ||
73 | char *content = data; | ||
74 | Elm_Object_Item *ds_it = event_info; | ||
75 | printf("Selected label: %s with data: %s\n", | ||
76 | elm_object_item_text_get(ds_it), content); | ||
77 | } | ||
78 | |||
79 | static void | ||
80 | _free_data(void *data, Evas_Object *obj, void *event_info) | ||
81 | { | ||
82 | free(data); | ||
83 | } | ||
84 | |||
85 | static void | ||
86 | _add_data_cb(void *data, Evas_Object *obj, void *event_info) | ||
87 | { | ||
88 | Elm_Object_Item *ds_it; | ||
89 | Evas_Object *ds = data; | ||
90 | char label[32]; | ||
91 | char *content = malloc(sizeof(char) * 32); | ||
92 | |||
93 | snprintf(content, 32, "Item content %i", counter); | ||
94 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
95 | ds_it = elm_diskselector_item_append(ds, label, NULL, _sel_data_cb, content); | ||
96 | if (!ds_it) { | ||
97 | printf("Error adding item\n"); | ||
98 | return; | ||
99 | } | ||
100 | elm_object_item_del_cb_set(ds_it, _free_data); | ||
101 | } | ||
102 | |||
103 | static void | ||
104 | _del_cb(void *data, Evas_Object *obj, void *event_info) | ||
105 | { | ||
106 | Elm_Object_Item *selected_ds_it; | ||
107 | Evas_Object *ds = data; | ||
108 | |||
109 | selected_ds_it = elm_diskselector_selected_item_get(ds); | ||
110 | elm_object_item_del(selected_ds_it); | ||
111 | } | ||
112 | |||
113 | static void | ||
114 | _unselect_cb(void *data, Evas_Object *obj, void *event_info) | ||
115 | { | ||
116 | Elm_Object_Item *selected_ds_it; | ||
117 | Evas_Object *ds = data; | ||
118 | |||
119 | selected_ds_it = elm_diskselector_selected_item_get(ds); | ||
120 | elm_diskselector_item_selected_set(selected_ds_it, EINA_FALSE); | ||
121 | } | ||
122 | |||
123 | static void | ||
124 | _print_cb(void *data, Evas_Object *obj, void *event_info) | ||
125 | { | ||
126 | const Eina_List *l, *items; | ||
127 | Elm_Object_Item *ds_it; | ||
128 | Evas_Object *ds = data; | ||
129 | |||
130 | items = elm_diskselector_items_get(ds); | ||
131 | EINA_LIST_FOREACH(items, l, ds_it) | ||
132 | printf("%s\n", elm_object_item_text_get(ds_it)); | ||
133 | } | ||
134 | |||
135 | static void | ||
136 | _clear_cb(void *data, Evas_Object *obj, void *event_info) | ||
137 | { | ||
138 | Evas_Object *ds = data; | ||
139 | elm_diskselector_clear(ds); | ||
140 | } | ||
141 | |||
142 | static void | ||
143 | _select_first_cb(void *data, Evas_Object *obj, void *event_info) | ||
144 | { | ||
145 | Elm_Object_Item *first_ds_it; | ||
146 | Evas_Object *ds = data; | ||
147 | |||
148 | first_ds_it = elm_diskselector_first_item_get(ds); | ||
149 | if (first_ds_it) | ||
150 | elm_diskselector_item_selected_set(first_ds_it, EINA_TRUE); | ||
151 | } | ||
152 | |||
153 | static void | ||
154 | _select_last_cb(void *data, Evas_Object *obj, void *event_info) | ||
155 | { | ||
156 | Elm_Object_Item *last_ds_it; | ||
157 | Evas_Object *ds = data; | ||
158 | |||
159 | last_ds_it = elm_diskselector_last_item_get(ds); | ||
160 | if (last_ds_it) | ||
161 | elm_diskselector_item_selected_set(last_ds_it, EINA_TRUE); | ||
162 | } | ||
163 | |||
164 | static void | ||
165 | _select_next_cb(void *data, Evas_Object *obj, void *event_info) | ||
166 | { | ||
167 | Elm_Object_Item *selected_ds_it, *next_ds_it; | ||
168 | Evas_Object *ds = data; | ||
169 | |||
170 | selected_ds_it = elm_diskselector_selected_item_get(ds); | ||
171 | if (!selected_ds_it) return; | ||
172 | |||
173 | next_ds_it = elm_diskselector_item_next_get(selected_ds_it); | ||
174 | if (next_ds_it) | ||
175 | elm_diskselector_item_selected_set(next_ds_it, EINA_TRUE); | ||
176 | } | ||
177 | |||
178 | static void | ||
179 | _select_prev_cb(void *data, Evas_Object *obj, void *event_info) | ||
180 | { | ||
181 | Elm_Object_Item *selected_ds_it, *prev_ds_it; | ||
182 | Evas_Object *ds = data; | ||
183 | |||
184 | selected_ds_it = elm_diskselector_selected_item_get(ds); | ||
185 | if (!selected_ds_it) return; | ||
186 | |||
187 | prev_ds_it = elm_diskselector_item_prev_get(selected_ds_it); | ||
188 | if (prev_ds_it) | ||
189 | elm_diskselector_item_selected_set(prev_ds_it, EINA_TRUE); | ||
190 | } | ||
191 | |||
192 | EAPI_MAIN int | ||
193 | elm_main(int argc, char **argv) | ||
194 | { | ||
195 | Evas_Object *win, *bg, *bx, *hbx, *ds, *bt; | ||
196 | |||
197 | win = elm_win_add(NULL, "diskselector", ELM_WIN_BASIC); | ||
198 | elm_win_title_set(win, "Diskselector Items Example"); | ||
199 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
200 | |||
201 | bg = elm_bg_add(win); | ||
202 | elm_win_resize_object_add(win, bg); | ||
203 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
204 | evas_object_show(bg); | ||
205 | |||
206 | bx = elm_box_add(win); | ||
207 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
208 | elm_win_resize_object_add(win, bx); | ||
209 | evas_object_show(bx); | ||
210 | |||
211 | ds = elm_diskselector_add(win); | ||
212 | evas_object_size_hint_weight_set(ds, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
213 | evas_object_size_hint_align_set(ds, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
214 | elm_box_pack_end(bx, ds); | ||
215 | evas_object_show(ds); | ||
216 | |||
217 | elm_diskselector_item_append(ds, "Item 0", NULL, NULL, NULL); | ||
218 | elm_diskselector_item_append(ds, "Item 1", NULL, NULL, NULL); | ||
219 | elm_diskselector_item_append(ds, "Item 2", NULL, NULL, NULL); | ||
220 | |||
221 | hbx = elm_box_add(win); | ||
222 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
223 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
224 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
225 | elm_box_pack_end(bx, hbx); | ||
226 | evas_object_show(hbx); | ||
227 | |||
228 | bt = elm_button_add(win); | ||
229 | elm_object_text_set(bt, "Append item"); | ||
230 | evas_object_smart_callback_add(bt, "clicked", _add_cb, ds); | ||
231 | elm_box_pack_end(hbx, bt); | ||
232 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
233 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
234 | evas_object_show(bt); | ||
235 | |||
236 | bt = elm_button_add(win); | ||
237 | elm_object_text_set(bt, "Append with icon"); | ||
238 | evas_object_smart_callback_add(bt, "clicked", _add_ic_cb, ds); | ||
239 | elm_box_pack_end(hbx, bt); | ||
240 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
241 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
242 | evas_object_show(bt); | ||
243 | |||
244 | bt = elm_button_add(win); | ||
245 | elm_object_text_set(bt, "Append with selected function"); | ||
246 | evas_object_smart_callback_add(bt, "clicked", _add_func_cb, ds); | ||
247 | elm_box_pack_end(hbx, bt); | ||
248 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
249 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
250 | evas_object_show(bt); | ||
251 | |||
252 | bt = elm_button_add(win); | ||
253 | elm_object_text_set(bt, "Append with data"); | ||
254 | evas_object_smart_callback_add(bt, "clicked", _add_data_cb, ds); | ||
255 | elm_box_pack_end(hbx, bt); | ||
256 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
257 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
258 | evas_object_show(bt); | ||
259 | |||
260 | hbx = elm_box_add(win); | ||
261 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
262 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
263 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
264 | elm_box_pack_end(bx, hbx); | ||
265 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
266 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
267 | evas_object_show(hbx); | ||
268 | |||
269 | bt = elm_button_add(win); | ||
270 | elm_object_text_set(bt, "Delete item"); | ||
271 | evas_object_smart_callback_add(bt, "clicked", _del_cb, ds); | ||
272 | elm_box_pack_end(hbx, bt); | ||
273 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
274 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
275 | evas_object_show(bt); | ||
276 | |||
277 | bt = elm_button_add(win); | ||
278 | elm_object_text_set(bt, "Unselect item"); | ||
279 | evas_object_smart_callback_add(bt, "clicked", _unselect_cb, ds); | ||
280 | elm_box_pack_end(hbx, bt); | ||
281 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
282 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
283 | evas_object_show(bt); | ||
284 | |||
285 | bt = elm_button_add(win); | ||
286 | elm_object_text_set(bt, "Print items"); | ||
287 | evas_object_smart_callback_add(bt, "clicked", _print_cb, ds); | ||
288 | elm_box_pack_end(hbx, bt); | ||
289 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
290 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
291 | evas_object_show(bt); | ||
292 | |||
293 | bt = elm_button_add(win); | ||
294 | elm_object_text_set(bt, "Clear"); | ||
295 | evas_object_smart_callback_add(bt, "clicked", _clear_cb, ds); | ||
296 | elm_box_pack_end(hbx, bt); | ||
297 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
298 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
299 | evas_object_show(bt); | ||
300 | |||
301 | hbx = elm_box_add(win); | ||
302 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
303 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
304 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
305 | elm_box_pack_end(bx, hbx); | ||
306 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
307 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
308 | evas_object_show(hbx); | ||
309 | |||
310 | bt = elm_button_add(win); | ||
311 | elm_object_text_set(bt, "Select first item"); | ||
312 | evas_object_smart_callback_add(bt, "clicked", _select_first_cb, ds); | ||
313 | elm_box_pack_end(hbx, bt); | ||
314 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
315 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
316 | evas_object_show(bt); | ||
317 | |||
318 | bt = elm_button_add(win); | ||
319 | elm_object_text_set(bt, "Select last item"); | ||
320 | evas_object_smart_callback_add(bt, "clicked", _select_last_cb, ds); | ||
321 | elm_box_pack_end(hbx, bt); | ||
322 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
323 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
324 | evas_object_show(bt); | ||
325 | |||
326 | bt = elm_button_add(win); | ||
327 | elm_object_text_set(bt, "Select next item"); | ||
328 | evas_object_smart_callback_add(bt, "clicked", _select_next_cb, ds); | ||
329 | elm_box_pack_end(hbx, bt); | ||
330 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
331 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
332 | evas_object_show(bt); | ||
333 | |||
334 | bt = elm_button_add(win); | ||
335 | elm_object_text_set(bt, "Select previous item"); | ||
336 | evas_object_smart_callback_add(bt, "clicked", _select_prev_cb, ds); | ||
337 | elm_box_pack_end(hbx, bt); | ||
338 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
339 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
340 | evas_object_show(bt); | ||
341 | |||
342 | evas_object_show(win); | ||
343 | |||
344 | elm_run(); | ||
345 | elm_shutdown(); | ||
346 | |||
347 | return 0; | ||
348 | } | ||
349 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_1.c b/libraries/elementary/src/examples/efl_thread_1.c deleted file mode 100644 index 0f18539..0000000 --- a/libraries/elementary/src/examples/efl_thread_1.c +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_1 efl_thread_1.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | #include <pthread.h> | ||
5 | |||
6 | static Evas_Object *win = NULL; | ||
7 | static Evas_Object *rect = NULL; | ||
8 | |||
9 | static pthread_t thread_id; | ||
10 | |||
11 | // BEGIN - code running in my custom pthread instance | ||
12 | // | ||
13 | static void * | ||
14 | my_thread_run(void *arg) | ||
15 | { | ||
16 | double t = 0.0; | ||
17 | |||
18 | for (;;) | ||
19 | { | ||
20 | ecore_thread_main_loop_begin(); // begin critical | ||
21 | { // indented for illustration of "critical" block | ||
22 | Evas_Coord x, y; | ||
23 | |||
24 | x = 200 + (200 * sin(t)); | ||
25 | y = 200 + (200 * cos(t)); | ||
26 | evas_object_move(rect, x - 50, y - 50); | ||
27 | } | ||
28 | ecore_thread_main_loop_end(); // end critical | ||
29 | usleep(1000); | ||
30 | t += 0.02; | ||
31 | } | ||
32 | return NULL; | ||
33 | } | ||
34 | // | ||
35 | // END - code running in my custom pthread instance | ||
36 | |||
37 | static void | ||
38 | my_thread_new(void) | ||
39 | { | ||
40 | pthread_attr_t attr; | ||
41 | |||
42 | if (pthread_attr_init(&attr) != 0) | ||
43 | perror("pthread_attr_init"); | ||
44 | if (pthread_create(&thread_id, &attr, my_thread_run, NULL) != 0) | ||
45 | perror("pthread_create"); | ||
46 | } | ||
47 | |||
48 | EAPI_MAIN int | ||
49 | elm_main(int argc, char **argv) | ||
50 | { | ||
51 | Evas_Object *o, *bg; | ||
52 | |||
53 | win = elm_win_add(NULL, "efl-thread-1", ELM_WIN_BASIC); | ||
54 | elm_win_title_set(win, "EFL Thread 1"); | ||
55 | elm_win_autodel_set(win, EINA_TRUE); | ||
56 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
57 | evas_object_resize(win, 400, 400); | ||
58 | evas_object_show(win); | ||
59 | |||
60 | bg = elm_bg_add(win); | ||
61 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
62 | elm_win_resize_object_add(win, bg); | ||
63 | evas_object_show(bg); | ||
64 | |||
65 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
66 | evas_object_color_set(o, 50, 80, 180, 255); | ||
67 | evas_object_resize(o, 100, 100); | ||
68 | evas_object_show(o); | ||
69 | rect = o; | ||
70 | |||
71 | // create custom thread to do some "work on the side" | ||
72 | my_thread_new(); | ||
73 | |||
74 | elm_run(); | ||
75 | elm_shutdown(); | ||
76 | |||
77 | return 0; | ||
78 | } | ||
79 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_2.c b/libraries/elementary/src/examples/efl_thread_2.c deleted file mode 100644 index ceedc75..0000000 --- a/libraries/elementary/src/examples/efl_thread_2.c +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_2 efl_thread_2.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | #include <pthread.h> | ||
5 | |||
6 | static Evas_Object *win = NULL; | ||
7 | static Evas_Object *rect = NULL; | ||
8 | |||
9 | struct info | ||
10 | { | ||
11 | double x, y; | ||
12 | }; | ||
13 | |||
14 | static void *my_thread_mainloop_code(void *data); | ||
15 | |||
16 | static pthread_t thread_id; | ||
17 | |||
18 | // BEGIN - code running in my custom pthread instance | ||
19 | // | ||
20 | static void * | ||
21 | my_thread_run(void *arg) | ||
22 | { | ||
23 | double t = 0.0; | ||
24 | |||
25 | for (;;) | ||
26 | { | ||
27 | struct info *inf = malloc(sizeof(struct info)); | ||
28 | |||
29 | if (inf) | ||
30 | { | ||
31 | inf->x = 200 + (200 * sin(t)); | ||
32 | inf->y = 200 + (200 * cos(t)); | ||
33 | ecore_main_loop_thread_safe_call_sync | ||
34 | (my_thread_mainloop_code, inf); | ||
35 | } | ||
36 | // and sleep and loop | ||
37 | usleep(1000); | ||
38 | t += 0.02; | ||
39 | } | ||
40 | return NULL; | ||
41 | } | ||
42 | // | ||
43 | // END - code running in my custom pthread instance | ||
44 | static void | ||
45 | my_thread_new(void) | ||
46 | { | ||
47 | pthread_attr_t attr; | ||
48 | |||
49 | if (pthread_attr_init(&attr) != 0) | ||
50 | perror("pthread_attr_init"); | ||
51 | if (pthread_create(&thread_id, &attr, my_thread_run, NULL) != 0) | ||
52 | perror("pthread_create"); | ||
53 | } | ||
54 | |||
55 | static void * | ||
56 | my_thread_mainloop_code(void *data) | ||
57 | { | ||
58 | struct info *inf = data; | ||
59 | evas_object_move(rect, inf->x - 50, inf->y - 50); | ||
60 | free(inf); | ||
61 | return NULL; | ||
62 | } | ||
63 | |||
64 | EAPI_MAIN int | ||
65 | elm_main(int argc, char **argv) | ||
66 | { | ||
67 | Evas_Object *o, *bg; | ||
68 | |||
69 | win = elm_win_add(NULL, "efl-thread-2", ELM_WIN_BASIC); | ||
70 | elm_win_title_set(win, "EFL Thread 2"); | ||
71 | elm_win_autodel_set(win, EINA_TRUE); | ||
72 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
73 | evas_object_resize(win, 400, 400); | ||
74 | evas_object_show(win); | ||
75 | |||
76 | bg = elm_bg_add(win); | ||
77 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
78 | elm_win_resize_object_add(win, bg); | ||
79 | evas_object_show(bg); | ||
80 | |||
81 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
82 | evas_object_color_set(o, 50, 80, 180, 255); | ||
83 | evas_object_resize(o, 100, 100); | ||
84 | evas_object_show(o); | ||
85 | rect = o; | ||
86 | |||
87 | // create custom thread to do some "work on the side" | ||
88 | my_thread_new(); | ||
89 | |||
90 | elm_run(); | ||
91 | elm_shutdown(); | ||
92 | |||
93 | return 0; | ||
94 | } | ||
95 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_3.c b/libraries/elementary/src/examples/efl_thread_3.c deleted file mode 100644 index cbc2c67..0000000 --- a/libraries/elementary/src/examples/efl_thread_3.c +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_3 efl_thread_3.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | #include <pthread.h> | ||
5 | |||
6 | static Evas_Object *win = NULL; | ||
7 | static Evas_Object *rect = NULL; | ||
8 | |||
9 | struct info | ||
10 | { | ||
11 | double x, y; | ||
12 | }; | ||
13 | |||
14 | static void my_thread_mainloop_code(void *data); | ||
15 | |||
16 | static pthread_t thread_id; | ||
17 | |||
18 | // BEGIN - code running in my custom pthread instance | ||
19 | // | ||
20 | static void * | ||
21 | my_thread_run(void *arg) | ||
22 | { | ||
23 | double t = 0.0; | ||
24 | |||
25 | // inside the pthread function lets loop forever incrimenting a time point | ||
26 | for (;;) | ||
27 | { | ||
28 | struct info *inf = malloc(sizeof(struct info)); | ||
29 | |||
30 | if (inf) | ||
31 | { | ||
32 | inf->x = 200 + (200 * sin(t)); | ||
33 | inf->y = 200 + (200 * cos(t)); | ||
34 | // now call a function in the mainloop and pass it our allocated | ||
35 | // data that it will free when it gets it | ||
36 | ecore_main_loop_thread_safe_call_async | ||
37 | (my_thread_mainloop_code, inf); | ||
38 | } | ||
39 | // and sleep and loop | ||
40 | usleep(1000); | ||
41 | t += 0.02; | ||
42 | } | ||
43 | return NULL; | ||
44 | } | ||
45 | // | ||
46 | // END - code running in my custom pthread instance | ||
47 | static void | ||
48 | my_thread_new(void) | ||
49 | { | ||
50 | pthread_attr_t attr; | ||
51 | |||
52 | if (pthread_attr_init(&attr) != 0) | ||
53 | perror("pthread_attr_init"); | ||
54 | if (pthread_create(&thread_id, &attr, my_thread_run, NULL) != 0) | ||
55 | perror("pthread_create"); | ||
56 | } | ||
57 | |||
58 | static void | ||
59 | my_thread_mainloop_code(void *data) | ||
60 | { | ||
61 | struct info *inf = data; | ||
62 | evas_object_move(rect, inf->x - 50, inf->y - 50); | ||
63 | free(inf); | ||
64 | } | ||
65 | |||
66 | EAPI_MAIN int | ||
67 | elm_main(int argc, char **argv) | ||
68 | { | ||
69 | Evas_Object *o, *bg; | ||
70 | |||
71 | win = elm_win_add(NULL, "efl-thread-3", ELM_WIN_BASIC); | ||
72 | elm_win_title_set(win, "EFL Thread 3"); | ||
73 | elm_win_autodel_set(win, EINA_TRUE); | ||
74 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
75 | evas_object_resize(win, 400, 400); | ||
76 | evas_object_show(win); | ||
77 | |||
78 | bg = elm_bg_add(win); | ||
79 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
80 | elm_win_resize_object_add(win, bg); | ||
81 | evas_object_show(bg); | ||
82 | |||
83 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
84 | evas_object_color_set(o, 50, 80, 180, 255); | ||
85 | evas_object_resize(o, 100, 100); | ||
86 | evas_object_show(o); | ||
87 | rect = o; | ||
88 | |||
89 | // create custom thread to do some "work on the side" | ||
90 | my_thread_new(); | ||
91 | |||
92 | elm_run(); | ||
93 | elm_shutdown(); | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_4.c b/libraries/elementary/src/examples/efl_thread_4.c deleted file mode 100644 index 2f565aa..0000000 --- a/libraries/elementary/src/examples/efl_thread_4.c +++ /dev/null | |||
@@ -1,120 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_4 efl_thread_4.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | #include <pthread.h> | ||
5 | |||
6 | static Evas_Object *win = NULL; | ||
7 | static Evas_Object *rect = NULL; | ||
8 | |||
9 | struct info | ||
10 | { | ||
11 | double x, y; | ||
12 | }; | ||
13 | |||
14 | static void my_thread_mainloop_code(void *data); | ||
15 | |||
16 | static pthread_t thread_id; | ||
17 | static pthread_mutex_t th_lock; | ||
18 | static int th_exit = 0; | ||
19 | |||
20 | // BEGIN - code running in my custom pthread instance | ||
21 | // | ||
22 | static void * | ||
23 | my_thread_run(void *arg) | ||
24 | { | ||
25 | double t = 0.0; | ||
26 | |||
27 | // inside the pthread function lets loop forever incrimenting a time point | ||
28 | for (;;) | ||
29 | { | ||
30 | struct info *inf = malloc(sizeof(struct info)); | ||
31 | int do_exit; | ||
32 | |||
33 | if (inf) | ||
34 | { | ||
35 | inf->x = 200 + (200 * sin(t)); | ||
36 | inf->y = 200 + (200 * cos(t)); | ||
37 | // now call a function in the mainloop and pass it our allocated | ||
38 | // data that it will free when it gets it | ||
39 | ecore_main_loop_thread_safe_call_async | ||
40 | (my_thread_mainloop_code, inf); | ||
41 | } | ||
42 | // and sleep and loop | ||
43 | usleep(1000); | ||
44 | t += 0.02; | ||
45 | // in case someone has asked us to cancel - then cancel this loop | ||
46 | // co-operatively (cancelling is co-operative) | ||
47 | pthread_mutex_lock(&th_lock); | ||
48 | do_exit = th_exit; | ||
49 | pthread_mutex_unlock(&th_lock); | ||
50 | if (do_exit) break; | ||
51 | } | ||
52 | return NULL; | ||
53 | } | ||
54 | // | ||
55 | // END - code running in my custom pthread instance | ||
56 | |||
57 | static void | ||
58 | my_thread_new(void) | ||
59 | { | ||
60 | pthread_attr_t attr; | ||
61 | |||
62 | pthread_mutex_init(&th_lock, NULL); | ||
63 | if (pthread_attr_init(&attr) != 0) | ||
64 | perror("pthread_attr_init"); | ||
65 | if (pthread_create(&thread_id, &attr, my_thread_run, NULL) != 0) | ||
66 | perror("pthread_create"); | ||
67 | } | ||
68 | |||
69 | static void | ||
70 | my_thread_mainloop_code(void *data) | ||
71 | { | ||
72 | struct info *inf = data; | ||
73 | evas_object_move(rect, inf->x - 50, inf->y - 50); | ||
74 | free(inf); | ||
75 | } | ||
76 | |||
77 | // just test cancelling the thread | ||
78 | static void | ||
79 | down(void *data, Evas *e, Evas_Object *obj, void *event_info) | ||
80 | { | ||
81 | pthread_mutex_lock(&th_lock); | ||
82 | th_exit = 1; | ||
83 | pthread_mutex_unlock(&th_lock); | ||
84 | } | ||
85 | |||
86 | EAPI_MAIN int | ||
87 | elm_main(int argc, char **argv) | ||
88 | { | ||
89 | Evas_Object *o, *bg; | ||
90 | |||
91 | win = elm_win_add(NULL, "efl-thread-4", ELM_WIN_BASIC); | ||
92 | elm_win_title_set(win, "EFL Thread 4"); | ||
93 | elm_win_autodel_set(win, EINA_TRUE); | ||
94 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
95 | evas_object_resize(win, 400, 400); | ||
96 | evas_object_show(win); | ||
97 | |||
98 | bg = elm_bg_add(win); | ||
99 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
100 | elm_win_resize_object_add(win, bg); | ||
101 | evas_object_show(bg); | ||
102 | |||
103 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
104 | evas_object_color_set(o, 50, 80, 180, 255); | ||
105 | evas_object_resize(o, 100, 100); | ||
106 | evas_object_show(o); | ||
107 | // new in the examples - we have a mouse down on the blue box cancel | ||
108 | // the thread | ||
109 | evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, down, NULL); | ||
110 | rect = o; | ||
111 | |||
112 | // create custom thread to do some "work on the side" | ||
113 | my_thread_new(); | ||
114 | |||
115 | elm_run(); | ||
116 | elm_shutdown(); | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_5.c b/libraries/elementary/src/examples/efl_thread_5.c deleted file mode 100644 index 4e53dd0..0000000 --- a/libraries/elementary/src/examples/efl_thread_5.c +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_5 efl_thread_5.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | |||
5 | static Ecore_Thread *thr = NULL; | ||
6 | |||
7 | static Evas_Object *win = NULL; | ||
8 | static Evas_Object *rect = NULL; | ||
9 | |||
10 | struct info | ||
11 | { | ||
12 | double x, y; | ||
13 | }; | ||
14 | |||
15 | // BEGIN - code running in my custom thread instance | ||
16 | // | ||
17 | static void | ||
18 | th_do(void *data, Ecore_Thread *th) | ||
19 | { | ||
20 | double t = 0.0; | ||
21 | |||
22 | // inside our "do" function for the ecore thread, lets do the real work | ||
23 | for (;;) | ||
24 | { | ||
25 | struct info *inf = malloc(sizeof(struct info)); | ||
26 | |||
27 | if (inf) | ||
28 | { | ||
29 | inf->x = 200 + (200 * sin(t)); | ||
30 | inf->y = 200 + (200 * cos(t)); | ||
31 | // now we have recorded the timepoint we pass it as feedback | ||
32 | // back to the mainloop. it will free it when done | ||
33 | ecore_thread_feedback(th, inf); | ||
34 | } | ||
35 | // and sleep and loop | ||
36 | usleep(1000); | ||
37 | t += 0.02; | ||
38 | // in case someone has asked us to cancel - then cancel this loop | ||
39 | // co-operatively (cancelling is co-operative) | ||
40 | if (ecore_thread_check(th)) break; | ||
41 | } | ||
42 | } | ||
43 | // | ||
44 | // END - code running in my custom thread instance | ||
45 | |||
46 | static void // when mainloop gets feedback from worker | ||
47 | th_feedback(void *data, Ecore_Thread *th, void *msg) | ||
48 | { | ||
49 | struct info *inf = msg; | ||
50 | evas_object_move(rect, inf->x - 50, inf->y - 50); | ||
51 | free(inf); | ||
52 | } | ||
53 | |||
54 | // BONUS (optional): called after th_do returns and has NOT been cancelled | ||
55 | static void th_end(void *data, Ecore_Thread *th) { printf("thread ended\n"); } | ||
56 | // BONUS (optional): called in mainloop AFTER thread has finished cancelling | ||
57 | static void th_cancel(void *data, Ecore_Thread *th) { printf("thread cancelled\n"); } | ||
58 | |||
59 | // just test cancelling the thread worker | ||
60 | static void | ||
61 | down(void *data, Evas *e, Evas_Object *obj, void *event_info) | ||
62 | { | ||
63 | ecore_thread_cancel(thr); | ||
64 | } | ||
65 | |||
66 | EAPI_MAIN int | ||
67 | elm_main(int argc, char **argv) | ||
68 | { | ||
69 | Evas_Object *o, *bg; | ||
70 | |||
71 | win = elm_win_add(NULL, "efl-thread-5", ELM_WIN_BASIC); | ||
72 | elm_win_title_set(win, "EFL Thread 5"); | ||
73 | elm_win_autodel_set(win, EINA_TRUE); | ||
74 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
75 | evas_object_resize(win, 400, 400); | ||
76 | evas_object_show(win); | ||
77 | |||
78 | bg = elm_bg_add(win); | ||
79 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
80 | elm_win_resize_object_add(win, bg); | ||
81 | evas_object_show(bg); | ||
82 | |||
83 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
84 | evas_object_color_set(o, 50, 80, 180, 255); | ||
85 | evas_object_resize(o, 100, 100); | ||
86 | evas_object_show(o); | ||
87 | evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, down, NULL); | ||
88 | rect = o; | ||
89 | |||
90 | // explicitly create ecore thread to do some "work on the side" and pass | ||
91 | // in NULL as data ptr to callbacks and true at the end means to actually | ||
92 | // make a new thread and not use the thread pool (there is a thread pool | ||
93 | // with as many thread workers as there are cpu's so this means you do not | ||
94 | // overload the cpu's with more work than you actually have processing | ||
95 | // units *IF* your threads do actually spend their time doing actual | ||
96 | // heavy computation) | ||
97 | thr = ecore_thread_feedback_run(th_do, th_feedback, th_end, th_cancel, | ||
98 | NULL, EINA_TRUE); | ||
99 | elm_run(); | ||
100 | elm_shutdown(); | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_6.c b/libraries/elementary/src/examples/efl_thread_6.c deleted file mode 100644 index df355d6..0000000 --- a/libraries/elementary/src/examples/efl_thread_6.c +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_6 efl_thread_6.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | |||
5 | static Evas_Object *win = NULL; | ||
6 | |||
7 | struct info | ||
8 | { | ||
9 | Evas_Object *obj; | ||
10 | int *pix; | ||
11 | }; | ||
12 | |||
13 | // BEGIN - code running in my custom thread instance | ||
14 | // | ||
15 | static void | ||
16 | mandel(int *pix, int w, int h) | ||
17 | { | ||
18 | double x, xx, y, cx, cy, cox, coy; | ||
19 | int iteration, hx, hy, val, r, g, b, rr, gg, bb; | ||
20 | int itermax = 10000; | ||
21 | double magnify = 0.02; | ||
22 | |||
23 | // this mandel calc is run in the worker threads so it's here. it is | ||
24 | // just here to calculate something and consume cpu to demonstrate the | ||
25 | // ecore thread worker queue. don't pay much attention to the below code | ||
26 | magnify += ((double)(rand() % 100) / 100.0) / 4.0; | ||
27 | cox = (double)(rand() % 100) / 100.0; | ||
28 | coy = (double)(rand() % 100) / 100.0; | ||
29 | cox /= (magnify * 3.0); | ||
30 | r = rand() % 255; g = rand() % 255; b = rand() % 255; | ||
31 | for (hy = 0; hy < h; hy++) | ||
32 | { | ||
33 | for (hx = 0; hx < w; hx++) | ||
34 | { | ||
35 | cx = (((float)hx) / ((float)w) - 0.5) / (magnify * 3.0); | ||
36 | cy = (((float)hy) / ((float)h) - 0.5) / (magnify * 3.0); | ||
37 | cx += cox; | ||
38 | cy += coy; | ||
39 | x = 0.0; | ||
40 | y = 0.0; | ||
41 | for (iteration = 1; iteration < itermax; iteration++) | ||
42 | { | ||
43 | xx = (x * x) - (y * y) + cx; | ||
44 | y = (2.0 * x * y) + cy; | ||
45 | x = xx; | ||
46 | if (((x * x) + (y * y)) > 100.0) iteration = 999999; | ||
47 | } | ||
48 | val = (((x * x) + (y * y)) * 2.55) / 100.0; | ||
49 | if (val > 255) val = 255; | ||
50 | if (iteration >= 99999) | ||
51 | { | ||
52 | rr = (r * val) / 255; | ||
53 | gg = (g * val) / 255; | ||
54 | bb = (b * val) / 255; | ||
55 | pix[(hy * w) + hx] = | ||
56 | (val << 24) | (rr << 16) | (gg << 8) | (bb); | ||
57 | } | ||
58 | else | ||
59 | pix[(hy * w) + hx] = 0xffffffff; | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | |||
64 | static void | ||
65 | th_do(void *data, Ecore_Thread *th) | ||
66 | { | ||
67 | struct info *inf = data; | ||
68 | // CANNOT TOUCH inf->obj here! just inf->pix which is 256x256 @ 32bpp | ||
69 | // quick and dirty to consume some cpu - do a mandelbrot calc | ||
70 | mandel(inf->pix, 256, 256); | ||
71 | } | ||
72 | // | ||
73 | // END - code running in my custom thread instance | ||
74 | |||
75 | static void // thread job finished - collect results and put in img obj | ||
76 | th_end(void *data, Ecore_Thread *th) | ||
77 | { | ||
78 | struct info *inf = data; | ||
79 | |||
80 | // copy data to object, free calculated data and info struc | ||
81 | evas_object_image_data_copy_set(inf->obj, inf->pix); | ||
82 | evas_object_show(inf->obj); | ||
83 | free(inf->pix); | ||
84 | free(inf); | ||
85 | } | ||
86 | |||
87 | static void // if the thread is cancelled - free pix, keep obj tho | ||
88 | th_cancel(void *data, Ecore_Thread *th) | ||
89 | { | ||
90 | struct info *inf = data; | ||
91 | |||
92 | // just free pixel data and info struct | ||
93 | free(inf->pix); | ||
94 | free(inf); | ||
95 | } | ||
96 | |||
97 | static Eina_Bool // animate the objects so you see all the madels move | ||
98 | anim(void *data) | ||
99 | { | ||
100 | Evas_Object *o = data; | ||
101 | double t, z; | ||
102 | int w, h, v; | ||
103 | Evas_Coord x, y; | ||
104 | |||
105 | // just calculate some position using the pointer value of the object as | ||
106 | // a seed value to make different objects go into different places over time | ||
107 | v = ((int)o) & 0xff; | ||
108 | t = ecore_loop_time_get(); | ||
109 | w = 100 + ((v * 100) >> 8); | ||
110 | h = 100 + ((v * 100) >> 8); | ||
111 | z = (double)(v) / 100.0; | ||
112 | x = (w * sin(t)); | ||
113 | y = (h * cos(t + z)); | ||
114 | // do the actual move | ||
115 | evas_object_move(o, 200 + x - 128, 200 + y - 128); | ||
116 | // keep looping - return true | ||
117 | return EINA_TRUE; | ||
118 | } | ||
119 | |||
120 | EAPI_MAIN int | ||
121 | elm_main(int argc, char **argv) | ||
122 | { | ||
123 | Evas_Object *o, *bg; | ||
124 | int i; | ||
125 | |||
126 | win = elm_win_add(NULL, "efl-thread-6", ELM_WIN_BASIC); | ||
127 | elm_win_title_set(win, "EFL Thread 6"); | ||
128 | elm_win_autodel_set(win, EINA_TRUE); | ||
129 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
130 | evas_object_resize(win, 400, 400); | ||
131 | evas_object_show(win); | ||
132 | |||
133 | bg = elm_bg_add(win); | ||
134 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
135 | elm_win_resize_object_add(win, bg); | ||
136 | evas_object_show(bg); | ||
137 | |||
138 | // queue up 64 mandel generation thread jobs | ||
139 | for (i = 0; i < 64; i++) | ||
140 | { | ||
141 | struct info *inf; | ||
142 | |||
143 | // create ecore thread to do some threaded job inside the worker pool | ||
144 | inf = malloc(sizeof(struct info)); | ||
145 | if (inf) | ||
146 | { | ||
147 | o = evas_object_image_filled_add(evas_object_evas_get(win)); | ||
148 | evas_object_image_size_set(o, 256, 256); | ||
149 | evas_object_image_alpha_set(o, EINA_TRUE); | ||
150 | evas_object_resize(o, 256, 256); | ||
151 | inf->obj = o; | ||
152 | inf->pix = malloc(256 * 256 * sizeof(int)); | ||
153 | ecore_thread_run(th_do, th_end, th_cancel, inf); | ||
154 | // bonus - slide the objects around all the time with an | ||
155 | // animator that ticks off every frame. | ||
156 | ecore_animator_add(anim, o); | ||
157 | } | ||
158 | } | ||
159 | |||
160 | elm_run(); | ||
161 | elm_shutdown(); | ||
162 | |||
163 | return 0; | ||
164 | } | ||
165 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_win32_1.c b/libraries/elementary/src/examples/efl_thread_win32_1.c deleted file mode 100644 index 1a1d579..0000000 --- a/libraries/elementary/src/examples/efl_thread_win32_1.c +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_1 efl_thread_win32_1.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | #define WIN32_LEAN_AND_MEAN | ||
5 | #include <windows.h> | ||
6 | |||
7 | static Evas_Object *win = NULL; | ||
8 | static Evas_Object *rect = NULL; | ||
9 | |||
10 | static HANDLE thread; | ||
11 | |||
12 | // BEGIN - code running in my custom win32 thread instance | ||
13 | // | ||
14 | static DWORD WINAPI | ||
15 | my_thread_run(LPVOID arg) | ||
16 | { | ||
17 | double t = 0.0; | ||
18 | |||
19 | for (;;) | ||
20 | { | ||
21 | ecore_thread_main_loop_begin(); // begin critical | ||
22 | { // indented for illustration of "critical" block | ||
23 | Evas_Coord x, y; | ||
24 | |||
25 | x = 200 + (200 * sin(t)); | ||
26 | y = 200 + (200 * cos(t)); | ||
27 | evas_object_move(rect, x - 50, y - 50); | ||
28 | } | ||
29 | ecore_thread_main_loop_end(); // end critical | ||
30 | usleep(1000); | ||
31 | t += 0.02; | ||
32 | } | ||
33 | return 0; | ||
34 | } | ||
35 | // | ||
36 | // END - code running in my custom win32 thread instance | ||
37 | |||
38 | static void | ||
39 | my_thread_new(void) | ||
40 | { | ||
41 | thread = CreateThread(NULL, 0, my_thread_run, NULL, 0, NULL); | ||
42 | if (!thread) | ||
43 | { | ||
44 | char *str = evil_last_error_get(); | ||
45 | if (str) | ||
46 | { | ||
47 | fprintf("thread creation failed: %s\n", str); | ||
48 | free(str); | ||
49 | } | ||
50 | } | ||
51 | } | ||
52 | |||
53 | EAPI_MAIN int | ||
54 | elm_main(int argc, char **argv) | ||
55 | { | ||
56 | Evas_Object *o, *bg; | ||
57 | |||
58 | win = elm_win_add(NULL, "efl-thread-1", ELM_WIN_BASIC); | ||
59 | elm_win_title_set(win, "EFL Thread 1"); | ||
60 | elm_win_autodel_set(win, EINA_TRUE); | ||
61 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
62 | evas_object_resize(win, 400, 400); | ||
63 | evas_object_show(win); | ||
64 | |||
65 | bg = elm_bg_add(win); | ||
66 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
67 | elm_win_resize_object_add(win, bg); | ||
68 | evas_object_show(bg); | ||
69 | |||
70 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
71 | evas_object_color_set(o, 50, 80, 180, 255); | ||
72 | evas_object_resize(o, 100, 100); | ||
73 | evas_object_show(o); | ||
74 | rect = o; | ||
75 | |||
76 | // create custom thread to do some "work on the side" | ||
77 | my_thread_new(); | ||
78 | |||
79 | elm_run(); | ||
80 | elm_shutdown(); | ||
81 | |||
82 | return 0; | ||
83 | } | ||
84 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_win32_2.c b/libraries/elementary/src/examples/efl_thread_win32_2.c deleted file mode 100644 index d1cad15..0000000 --- a/libraries/elementary/src/examples/efl_thread_win32_2.c +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_2 efl_thread_win32_2.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | #define WIN32_LEAN_AND_MEAN | ||
5 | #include <windows.h> | ||
6 | |||
7 | static Evas_Object *win = NULL; | ||
8 | static Evas_Object *rect = NULL; | ||
9 | |||
10 | struct info | ||
11 | { | ||
12 | double x, y; | ||
13 | }; | ||
14 | |||
15 | static void *my_thread_mainloop_code(void *data); | ||
16 | |||
17 | static HANDLE thread; | ||
18 | |||
19 | // BEGIN - code running in my custom win32 thread instance | ||
20 | // | ||
21 | static DWORD WINAPI | ||
22 | my_thread_run(LPVOID arg) | ||
23 | { | ||
24 | double t = 0.0; | ||
25 | |||
26 | for (;;) | ||
27 | { | ||
28 | struct info *inf = malloc(sizeof(struct info)); | ||
29 | |||
30 | if (inf) | ||
31 | { | ||
32 | inf->x = 200 + (200 * sin(t)); | ||
33 | inf->y = 200 + (200 * cos(t)); | ||
34 | ecore_main_loop_thread_safe_call_sync | ||
35 | (my_thread_mainloop_code, inf); | ||
36 | } | ||
37 | // and sleep and loop | ||
38 | usleep(1000); | ||
39 | t += 0.02; | ||
40 | } | ||
41 | return 0; | ||
42 | } | ||
43 | // | ||
44 | // END - code running in my custom win32 thread instance | ||
45 | static void | ||
46 | my_thread_new(void) | ||
47 | { | ||
48 | thread = CreateThread(NULL, 0, my_thread_run, NULL, 0, NULL); | ||
49 | if (!thread) | ||
50 | { | ||
51 | char *str = evil_last_error_get(); | ||
52 | if (str) | ||
53 | { | ||
54 | fprintf("thread creation failed: %s\n", str); | ||
55 | free(str); | ||
56 | } | ||
57 | } | ||
58 | } | ||
59 | |||
60 | static void * | ||
61 | my_thread_mainloop_code(void *data) | ||
62 | { | ||
63 | struct info *inf = data; | ||
64 | evas_object_move(rect, inf->x - 50, inf->y - 50); | ||
65 | free(inf); | ||
66 | return NULL; | ||
67 | } | ||
68 | |||
69 | EAPI_MAIN int | ||
70 | elm_main(int argc, char **argv) | ||
71 | { | ||
72 | Evas_Object *o, *bg; | ||
73 | |||
74 | win = elm_win_add(NULL, "efl-thread-2", ELM_WIN_BASIC); | ||
75 | elm_win_title_set(win, "EFL Thread 2"); | ||
76 | elm_win_autodel_set(win, EINA_TRUE); | ||
77 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
78 | evas_object_resize(win, 400, 400); | ||
79 | evas_object_show(win); | ||
80 | |||
81 | bg = elm_bg_add(win); | ||
82 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
83 | elm_win_resize_object_add(win, bg); | ||
84 | evas_object_show(bg); | ||
85 | |||
86 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
87 | evas_object_color_set(o, 50, 80, 180, 255); | ||
88 | evas_object_resize(o, 100, 100); | ||
89 | evas_object_show(o); | ||
90 | rect = o; | ||
91 | |||
92 | // create custom thread to do some "work on the side" | ||
93 | my_thread_new(); | ||
94 | |||
95 | elm_run(); | ||
96 | elm_shutdown(); | ||
97 | |||
98 | return 0; | ||
99 | } | ||
100 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_win32_3.c b/libraries/elementary/src/examples/efl_thread_win32_3.c deleted file mode 100644 index e80be8c..0000000 --- a/libraries/elementary/src/examples/efl_thread_win32_3.c +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_3 efl_thread_win32_3.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | #define WIN32_LEAN_AND_MEAN | ||
5 | #include <windows.h> | ||
6 | |||
7 | static Evas_Object *win = NULL; | ||
8 | static Evas_Object *rect = NULL; | ||
9 | |||
10 | struct info | ||
11 | { | ||
12 | double x, y; | ||
13 | }; | ||
14 | |||
15 | static void my_thread_mainloop_code(void *data); | ||
16 | |||
17 | static HANDLE thread; | ||
18 | |||
19 | // BEGIN - code running in my custom win32 thread instance | ||
20 | // | ||
21 | static DWORD WINAPI | ||
22 | my_thread_run(LPVOID arg) | ||
23 | { | ||
24 | double t = 0.0; | ||
25 | |||
26 | // inside the thread function lets loop forever incrimenting a time point | ||
27 | for (;;) | ||
28 | { | ||
29 | struct info *inf = malloc(sizeof(struct info)); | ||
30 | |||
31 | if (inf) | ||
32 | { | ||
33 | inf->x = 200 + (200 * sin(t)); | ||
34 | inf->y = 200 + (200 * cos(t)); | ||
35 | // now call a function in the mainloop and pass it our allocated | ||
36 | // data that it will free when it gets it | ||
37 | ecore_main_loop_thread_safe_call_async | ||
38 | (my_thread_mainloop_code, inf); | ||
39 | } | ||
40 | // and sleep and loop | ||
41 | usleep(1000); | ||
42 | t += 0.02; | ||
43 | } | ||
44 | return NULL; | ||
45 | } | ||
46 | // | ||
47 | // END - code running in my custom win32 thread instance | ||
48 | static void | ||
49 | my_thread_new(void) | ||
50 | { | ||
51 | thread = CreateThread(NULL, 0, my_thread_run, NULL, 0, NULL); | ||
52 | if (!thread) | ||
53 | { | ||
54 | char *str = evil_last_error_get(); | ||
55 | if (str) | ||
56 | { | ||
57 | fprintf("thread creation failed: %s\n", str); | ||
58 | free(str); | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | |||
63 | static void | ||
64 | my_thread_mainloop_code(void *data) | ||
65 | { | ||
66 | struct info *inf = data; | ||
67 | evas_object_move(rect, inf->x - 50, inf->y - 50); | ||
68 | free(inf); | ||
69 | } | ||
70 | |||
71 | EAPI_MAIN int | ||
72 | elm_main(int argc, char **argv) | ||
73 | { | ||
74 | Evas_Object *o, *bg; | ||
75 | |||
76 | win = elm_win_add(NULL, "efl-thread-3", ELM_WIN_BASIC); | ||
77 | elm_win_title_set(win, "EFL Thread 3"); | ||
78 | elm_win_autodel_set(win, EINA_TRUE); | ||
79 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
80 | evas_object_resize(win, 400, 400); | ||
81 | evas_object_show(win); | ||
82 | |||
83 | bg = elm_bg_add(win); | ||
84 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
85 | elm_win_resize_object_add(win, bg); | ||
86 | evas_object_show(bg); | ||
87 | |||
88 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
89 | evas_object_color_set(o, 50, 80, 180, 255); | ||
90 | evas_object_resize(o, 100, 100); | ||
91 | evas_object_show(o); | ||
92 | rect = o; | ||
93 | |||
94 | // create custom thread to do some "work on the side" | ||
95 | my_thread_new(); | ||
96 | |||
97 | elm_run(); | ||
98 | elm_shutdown(); | ||
99 | |||
100 | return 0; | ||
101 | } | ||
102 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/efl_thread_win32_4.c b/libraries/elementary/src/examples/efl_thread_win32_4.c deleted file mode 100644 index 957c1c1..0000000 --- a/libraries/elementary/src/examples/efl_thread_win32_4.c +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o efl_thread_4 efl_thread_win32_4.c -g `pkg-config --cflags --libs elementary` | ||
3 | #include <Elementary.h> | ||
4 | #define WIN32_LEAN_AND_MEAN | ||
5 | #include <windows.h> | ||
6 | |||
7 | static Evas_Object *win = NULL; | ||
8 | static Evas_Object *rect = NULL; | ||
9 | |||
10 | struct info | ||
11 | { | ||
12 | double x, y; | ||
13 | }; | ||
14 | |||
15 | static void my_thread_mainloop_code(void *data); | ||
16 | |||
17 | static HANDLE thread; | ||
18 | static CRITICAL_SECTION lock; | ||
19 | static int th_exit = 0; | ||
20 | |||
21 | // BEGIN - code running in my custom win32 thread instance | ||
22 | // | ||
23 | static DWORD WINAPI | ||
24 | my_thread_run(LPVOID arg) | ||
25 | { | ||
26 | double t = 0.0; | ||
27 | |||
28 | // inside the thread function lets loop forever incrimenting a time point | ||
29 | for (;;) | ||
30 | { | ||
31 | struct info *inf = malloc(sizeof(struct info)); | ||
32 | int do_exit; | ||
33 | |||
34 | if (inf) | ||
35 | { | ||
36 | inf->x = 200 + (200 * sin(t)); | ||
37 | inf->y = 200 + (200 * cos(t)); | ||
38 | // now call a function in the mainloop and pass it our allocated | ||
39 | // data that it will free when it gets it | ||
40 | ecore_main_loop_thread_safe_call_async | ||
41 | (my_thread_mainloop_code, inf); | ||
42 | } | ||
43 | // and sleep and loop | ||
44 | usleep(1000); | ||
45 | t += 0.02; | ||
46 | // in case someone has asked us to cancel - then cancel this loop | ||
47 | // co-operatively (cancelling is co-operative) | ||
48 | EnterCriticalSection(&lock); | ||
49 | do_exit = th_exit; | ||
50 | LeaveCriticalSection(&lock); | ||
51 | if (do_exit) break; | ||
52 | } | ||
53 | DeleteCriticalSection(&lock); | ||
54 | return NULL; | ||
55 | } | ||
56 | // | ||
57 | // END - code running in my custom win32 thread instance | ||
58 | |||
59 | static void | ||
60 | my_thread_new(void) | ||
61 | { | ||
62 | InitializeCriticalSection(&lock); | ||
63 | thread = CreateThread(NULL, 0, my_thread_run, NULL, 0, NULL); | ||
64 | if (!thread) | ||
65 | { | ||
66 | char *str = evil_last_error_get(); | ||
67 | if (str) | ||
68 | { | ||
69 | fprintf("thread creation failed: %s\n", str); | ||
70 | free(str); | ||
71 | } | ||
72 | } | ||
73 | } | ||
74 | |||
75 | static void | ||
76 | my_thread_mainloop_code(void *data) | ||
77 | { | ||
78 | struct info *inf = data; | ||
79 | evas_object_move(rect, inf->x - 50, inf->y - 50); | ||
80 | free(inf); | ||
81 | } | ||
82 | |||
83 | // just test cancelling the thread | ||
84 | static void | ||
85 | down(void *data, Evas *e, Evas_Object *obj, void *event_info) | ||
86 | { | ||
87 | EnterCriticalSection(&lock); | ||
88 | th_exit = 1; | ||
89 | LeaveCriticalSection(&lock); | ||
90 | } | ||
91 | |||
92 | EAPI_MAIN int | ||
93 | elm_main(int argc, char **argv) | ||
94 | { | ||
95 | Evas_Object *o, *bg; | ||
96 | |||
97 | win = elm_win_add(NULL, "efl-thread-4", ELM_WIN_BASIC); | ||
98 | elm_win_title_set(win, "EFL Thread 4"); | ||
99 | elm_win_autodel_set(win, EINA_TRUE); | ||
100 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
101 | evas_object_resize(win, 400, 400); | ||
102 | evas_object_show(win); | ||
103 | |||
104 | bg = elm_bg_add(win); | ||
105 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
106 | elm_win_resize_object_add(win, bg); | ||
107 | evas_object_show(bg); | ||
108 | |||
109 | o = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
110 | evas_object_color_set(o, 50, 80, 180, 255); | ||
111 | evas_object_resize(o, 100, 100); | ||
112 | evas_object_show(o); | ||
113 | // new in the examples - we have a mouse down on the blue box cancel | ||
114 | // the thread | ||
115 | evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, down, NULL); | ||
116 | rect = o; | ||
117 | |||
118 | // create custom thread to do some "work on the side" | ||
119 | my_thread_new(); | ||
120 | |||
121 | elm_run(); | ||
122 | elm_shutdown(); | ||
123 | |||
124 | return 0; | ||
125 | } | ||
126 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/entry_example.c b/libraries/elementary/src/examples/entry_example.c deleted file mode 100644 index b28b76c..0000000 --- a/libraries/elementary/src/examples/entry_example.c +++ /dev/null | |||
@@ -1,580 +0,0 @@ | |||
1 | /* | ||
2 | * gcc -o entry_example entry_example.c `pkg-config --cflags --libs elementary` | ||
3 | */ | ||
4 | #include <Elementary.h> | ||
5 | |||
6 | typedef struct | ||
7 | { | ||
8 | Evas_Object *win; | ||
9 | Evas_Object *edit_buffer; | ||
10 | } App_Data; | ||
11 | |||
12 | typedef struct | ||
13 | { | ||
14 | Evas_Object *inwin; | ||
15 | Evas_Object *naviframe; | ||
16 | Evas_Object *grid; | ||
17 | Evas_Object *settings; | ||
18 | |||
19 | int size; | ||
20 | int vsize; | ||
21 | int width, height; | ||
22 | |||
23 | const char *emo; | ||
24 | |||
25 | App_Data *ad; | ||
26 | } App_Inwin_Data; | ||
27 | |||
28 | static void | ||
29 | _edit_buffer_insert(Evas_Object *e, const char *text) | ||
30 | { | ||
31 | elm_entry_entry_insert(e, text); | ||
32 | elm_object_focus_set(e, EINA_TRUE); | ||
33 | } | ||
34 | |||
35 | static void | ||
36 | _it_sel_cb(void *data, Evas_Object *obj, void *event) | ||
37 | { | ||
38 | App_Inwin_Data *aid = data; | ||
39 | Elm_Object_Item *gg_it = event; | ||
40 | |||
41 | aid->emo = elm_object_item_data_get(gg_it); | ||
42 | |||
43 | elm_naviframe_item_simple_promote(aid->naviframe, aid->settings); | ||
44 | } | ||
45 | |||
46 | static char * | ||
47 | _emo_label_get(void *data, Evas_Object *obj, const char *part) | ||
48 | { | ||
49 | return strdup(data); | ||
50 | } | ||
51 | |||
52 | static Evas_Object * | ||
53 | _emo_content_get(void *data, Evas_Object *obj, const char *part) | ||
54 | { | ||
55 | Evas_Object *o; | ||
56 | |||
57 | if (strcmp(part, "elm.swallow.icon")) | ||
58 | return NULL; | ||
59 | o = elm_layout_add(obj); | ||
60 | elm_layout_theme_set(o, "entry/emoticon", data, "default"); | ||
61 | return o; | ||
62 | } | ||
63 | |||
64 | static void | ||
65 | _emo_del(void *data, Evas_Object *obj) | ||
66 | { | ||
67 | free(data); | ||
68 | } | ||
69 | |||
70 | static Evas_Object * | ||
71 | _page_grid_add(Evas_Object *parent, App_Inwin_Data *aid) | ||
72 | { | ||
73 | Evas_Object *grid; | ||
74 | char *theme, *emo; | ||
75 | Eina_List *emos, *it; | ||
76 | static Elm_Gengrid_Item_Class *it_class; | ||
77 | it_class = elm_gengrid_item_class_new(); | ||
78 | it_class->item_style = "default"; | ||
79 | it_class->func.text_get = _emo_label_get; | ||
80 | it_class->func.content_get = _emo_content_get; | ||
81 | it_class->func.del = _emo_del; | ||
82 | |||
83 | theme = elm_theme_list_item_path_get("default", NULL); | ||
84 | if (!theme) return NULL; | ||
85 | emos = edje_file_collection_list(theme); | ||
86 | free(theme); | ||
87 | if (!emos) return NULL; | ||
88 | |||
89 | grid = elm_gengrid_add(parent); | ||
90 | elm_gengrid_item_size_set(grid, 64, 80); | ||
91 | evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
92 | evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
93 | |||
94 | EINA_LIST_FOREACH(emos, it, emo) | ||
95 | { | ||
96 | char name[512]; | ||
97 | |||
98 | if (strncmp(emo, "elm/entry/emoticon/", 19)) | ||
99 | continue; | ||
100 | sscanf(emo, "elm/entry/emoticon/%[^/]/default", name); | ||
101 | elm_gengrid_item_append(grid, it_class, strdup(name), _it_sel_cb, aid); | ||
102 | } | ||
103 | edje_file_collection_list_free(emos); | ||
104 | elm_gengrid_item_class_free(it_class); | ||
105 | |||
106 | return grid; | ||
107 | } | ||
108 | |||
109 | static void | ||
110 | _btn_insert_cb(void *data, Evas_Object *obj, void *event) | ||
111 | { | ||
112 | App_Inwin_Data *aid = data; | ||
113 | const char *size[] = { | ||
114 | "size", | ||
115 | "absize", | ||
116 | "relsize" | ||
117 | }; | ||
118 | const char *vsize[] = { | ||
119 | "full", | ||
120 | "ascent" | ||
121 | }; | ||
122 | char buf[512]; | ||
123 | |||
124 | snprintf(buf, sizeof(buf), "<item %s=%dx%d vsize=%s href=emoticon/%s>" | ||
125 | "</item>", size[aid->size], aid->width, aid->height, | ||
126 | vsize[aid->vsize], aid->emo); | ||
127 | _edit_buffer_insert(aid->ad->edit_buffer, buf); | ||
128 | |||
129 | evas_object_del(aid->inwin); | ||
130 | } | ||
131 | |||
132 | static void | ||
133 | _width_changed_cb(void *data, Evas_Object *obj, void *event) | ||
134 | { | ||
135 | App_Inwin_Data *aid = data; | ||
136 | |||
137 | aid->width = atoi(elm_object_text_get(obj)); | ||
138 | } | ||
139 | |||
140 | static void | ||
141 | _height_changed_cb(void *data, Evas_Object *obj, void *event) | ||
142 | { | ||
143 | App_Inwin_Data *aid = data; | ||
144 | |||
145 | aid->height = atoi(elm_object_text_get(obj)); | ||
146 | } | ||
147 | |||
148 | static Evas_Object * | ||
149 | _page_settings_add(Evas_Object *parent, App_Inwin_Data *aid) | ||
150 | { | ||
151 | Evas_Object *box, *sizeopts, *box2, *sizebox, *vsizebox, | ||
152 | *rsize, *rabsize, *rrelsize, *rvfull, *rvascent, | ||
153 | *fwidth, *ewidth, *fheight, *eheight, | ||
154 | *binsert; | ||
155 | char buf[100]; | ||
156 | static Elm_Entry_Filter_Accept_Set accept_set = { | ||
157 | .accepted = "0123456789", | ||
158 | .rejected = NULL | ||
159 | }; | ||
160 | static Elm_Entry_Filter_Limit_Size limit_size = { | ||
161 | .max_char_count = 5, | ||
162 | .max_byte_count = 0 | ||
163 | }; | ||
164 | |||
165 | box = elm_box_add(parent); | ||
166 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
167 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
168 | |||
169 | sizeopts = elm_frame_add(parent); | ||
170 | elm_object_text_set(sizeopts, "Size"); | ||
171 | evas_object_size_hint_weight_set(sizeopts, EVAS_HINT_EXPAND, 0.0); | ||
172 | evas_object_size_hint_align_set(sizeopts, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
173 | elm_box_pack_end(box, sizeopts); | ||
174 | evas_object_show(sizeopts); | ||
175 | |||
176 | box2 = elm_box_add(parent); | ||
177 | evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
178 | evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
179 | elm_object_content_set(sizeopts, box2); | ||
180 | evas_object_show(box2); | ||
181 | |||
182 | sizebox = elm_box_add(parent); | ||
183 | elm_box_horizontal_set(sizebox, EINA_TRUE); | ||
184 | evas_object_size_hint_weight_set(sizebox, EVAS_HINT_EXPAND, | ||
185 | EVAS_HINT_EXPAND); | ||
186 | evas_object_size_hint_align_set(sizebox, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
187 | elm_box_pack_end(box2, sizebox); | ||
188 | evas_object_show(sizebox); | ||
189 | |||
190 | rsize = elm_radio_add(parent); | ||
191 | elm_object_text_set(rsize, "Scale adjusted (size)"); | ||
192 | elm_radio_state_value_set(rsize, 0); | ||
193 | elm_radio_value_pointer_set(rsize, &aid->size); | ||
194 | elm_box_pack_end(sizebox, rsize); | ||
195 | evas_object_show(rsize); | ||
196 | |||
197 | rabsize = elm_radio_add(parent); | ||
198 | elm_object_text_set(rabsize, "Absolute size (absize)"); | ||
199 | elm_radio_state_value_set(rabsize, 1); | ||
200 | elm_radio_value_pointer_set(rabsize, &aid->size); | ||
201 | elm_radio_group_add(rabsize, rsize); | ||
202 | elm_box_pack_end(sizebox, rabsize); | ||
203 | evas_object_show(rabsize); | ||
204 | |||
205 | rrelsize = elm_radio_add(parent); | ||
206 | elm_object_text_set(rrelsize, "Relative to line (relsize)"); | ||
207 | elm_radio_state_value_set(rrelsize, 2); | ||
208 | elm_radio_value_pointer_set(rrelsize, &aid->size); | ||
209 | elm_radio_group_add(rrelsize, rsize); | ||
210 | elm_box_pack_end(sizebox, rrelsize); | ||
211 | evas_object_show(rrelsize); | ||
212 | |||
213 | vsizebox = elm_box_add(parent); | ||
214 | elm_box_horizontal_set(vsizebox, EINA_TRUE); | ||
215 | evas_object_size_hint_weight_set(vsizebox, EVAS_HINT_EXPAND, | ||
216 | EVAS_HINT_EXPAND); | ||
217 | evas_object_size_hint_align_set(vsizebox, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
218 | elm_box_pack_end(box2, vsizebox); | ||
219 | evas_object_show(vsizebox); | ||
220 | |||
221 | rvfull = elm_radio_add(parent); | ||
222 | elm_object_text_set(rvfull, "Full height (vsize=full)"); | ||
223 | elm_radio_state_value_set(rvfull, 0); | ||
224 | elm_radio_value_pointer_set(rvfull, &aid->vsize); | ||
225 | elm_box_pack_end(vsizebox, rvfull); | ||
226 | evas_object_show(rvfull); | ||
227 | |||
228 | rvascent = elm_radio_add(parent); | ||
229 | elm_object_text_set(rvascent, "Ascent only (vsize=ascent)"); | ||
230 | elm_radio_state_value_set(rvascent, 1); | ||
231 | elm_radio_value_pointer_set(rvascent, &aid->vsize); | ||
232 | elm_radio_group_add(rvascent, rvfull); | ||
233 | elm_box_pack_end(vsizebox, rvascent); | ||
234 | evas_object_show(rvascent); | ||
235 | |||
236 | fwidth = elm_frame_add(parent); | ||
237 | elm_object_text_set(fwidth, "Width"); | ||
238 | evas_object_size_hint_weight_set(fwidth, EVAS_HINT_EXPAND, 0.0); | ||
239 | evas_object_size_hint_align_set(fwidth, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
240 | elm_box_pack_end(box2, fwidth); | ||
241 | evas_object_show(fwidth); | ||
242 | |||
243 | snprintf(buf, sizeof(buf), "%d", aid->width); | ||
244 | ewidth = elm_entry_add(parent); | ||
245 | elm_entry_single_line_set(ewidth, EINA_TRUE); | ||
246 | elm_entry_markup_filter_append(ewidth, elm_entry_filter_accept_set, | ||
247 | &accept_set); | ||
248 | elm_entry_markup_filter_append(ewidth, elm_entry_filter_limit_size, | ||
249 | &limit_size); | ||
250 | elm_object_text_set(ewidth, buf); | ||
251 | evas_object_size_hint_weight_set(ewidth, EVAS_HINT_EXPAND, 0.0); | ||
252 | evas_object_size_hint_align_set(ewidth, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
253 | elm_object_content_set(fwidth, ewidth); | ||
254 | evas_object_show(ewidth); | ||
255 | |||
256 | evas_object_smart_callback_add(ewidth, "changed", _width_changed_cb, aid); | ||
257 | |||
258 | fheight = elm_frame_add(parent); | ||
259 | elm_object_text_set(fheight, "Height"); | ||
260 | evas_object_size_hint_weight_set(fheight, EVAS_HINT_EXPAND, 0.0); | ||
261 | evas_object_size_hint_align_set(fheight, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
262 | elm_box_pack_end(box2, fheight); | ||
263 | evas_object_show(fheight); | ||
264 | |||
265 | snprintf(buf, sizeof(buf), "%d", aid->height); | ||
266 | eheight = elm_entry_add(parent); | ||
267 | elm_entry_single_line_set(eheight, EINA_TRUE); | ||
268 | elm_entry_markup_filter_append(eheight, elm_entry_filter_accept_set, | ||
269 | &accept_set); | ||
270 | elm_entry_markup_filter_append(eheight, elm_entry_filter_limit_size, | ||
271 | &limit_size); | ||
272 | elm_object_text_set(eheight, buf); | ||
273 | evas_object_size_hint_weight_set(eheight, EVAS_HINT_EXPAND, 0.0); | ||
274 | evas_object_size_hint_align_set(eheight, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
275 | elm_object_content_set(fheight, eheight); | ||
276 | evas_object_show(eheight); | ||
277 | |||
278 | evas_object_smart_callback_add(eheight, "changed", _height_changed_cb, aid); | ||
279 | |||
280 | binsert = elm_button_add(parent); | ||
281 | elm_object_text_set(binsert, "Insert"); | ||
282 | elm_box_pack_end(box, binsert); | ||
283 | evas_object_show(binsert); | ||
284 | |||
285 | evas_object_smart_callback_add(binsert, "clicked", _btn_insert_cb, aid); | ||
286 | |||
287 | return box; | ||
288 | } | ||
289 | |||
290 | static void | ||
291 | _insert_cancel_cb(void *data, Evas_Object *obj, void *event) | ||
292 | { | ||
293 | App_Inwin_Data *aid = data; | ||
294 | |||
295 | evas_object_del(aid->inwin); | ||
296 | } | ||
297 | |||
298 | static void | ||
299 | _inwin_del_cb(void *data, Evas *e, Evas_Object *obj, void *event) | ||
300 | { | ||
301 | free(data); | ||
302 | } | ||
303 | |||
304 | static void | ||
305 | _image_insert_cb(void *data, Evas_Object *obj, void *event) | ||
306 | { | ||
307 | App_Data *ad = data; | ||
308 | App_Inwin_Data *aid; | ||
309 | Evas_Object *inwin, *box, *box2, *naviframe, *o; | ||
310 | |||
311 | aid = calloc(1, sizeof(App_Inwin_Data)); | ||
312 | if (!aid) return; | ||
313 | |||
314 | aid->ad = ad; | ||
315 | aid->size = 1; | ||
316 | aid->vsize = 1; | ||
317 | aid->width = 64; | ||
318 | aid->height = 64; | ||
319 | |||
320 | inwin = elm_win_inwin_add(ad->win); | ||
321 | evas_object_size_hint_weight_set(inwin, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
322 | evas_object_size_hint_align_set(inwin, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
323 | evas_object_show(inwin); | ||
324 | |||
325 | evas_object_event_callback_add(inwin, EVAS_CALLBACK_DEL, _inwin_del_cb, | ||
326 | aid); | ||
327 | |||
328 | box = elm_box_add(ad->win); | ||
329 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
330 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
331 | elm_win_inwin_content_set(inwin, box); | ||
332 | evas_object_show(box); | ||
333 | |||
334 | naviframe = elm_naviframe_add(ad->win); | ||
335 | evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
336 | evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
337 | elm_box_pack_end(box, naviframe); | ||
338 | evas_object_show(naviframe); | ||
339 | |||
340 | o = _page_grid_add(ad->win, aid); | ||
341 | elm_naviframe_item_simple_push(naviframe, o); | ||
342 | aid->grid = o; | ||
343 | |||
344 | o = _page_settings_add(ad->win, aid); | ||
345 | elm_naviframe_item_simple_push(naviframe, o); | ||
346 | aid->settings = o; | ||
347 | |||
348 | elm_naviframe_item_simple_promote(naviframe, aid->grid); | ||
349 | |||
350 | box2 = elm_box_add(ad->win); | ||
351 | elm_box_horizontal_set(box2, EINA_TRUE); | ||
352 | evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, 0.0); | ||
353 | evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
354 | elm_box_pack_end(box, box2); | ||
355 | evas_object_show(box2); | ||
356 | |||
357 | o = elm_button_add(ad->win); | ||
358 | elm_object_text_set(o, "Cancel"); | ||
359 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
360 | evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
361 | elm_box_pack_end(box2, o); | ||
362 | evas_object_show(o); | ||
363 | |||
364 | evas_object_smart_callback_add(o, "clicked", _insert_cancel_cb, aid); | ||
365 | |||
366 | aid->inwin = inwin; | ||
367 | aid->naviframe = naviframe; | ||
368 | } | ||
369 | |||
370 | static void | ||
371 | _format_change_cb(void *data, Evas_Object *obj, void *event) | ||
372 | { | ||
373 | App_Data *ad = data; | ||
374 | char fmt_open[5], fmt_close[6]; | ||
375 | const char *sel; | ||
376 | int cursor; | ||
377 | char *s; | ||
378 | const char *ptr, *what; | ||
379 | Eina_Strbuf *buf = NULL; | ||
380 | |||
381 | sel = elm_object_text_get(obj); | ||
382 | snprintf(fmt_open, sizeof(fmt_open), "<%s>", sel); | ||
383 | snprintf(fmt_close, sizeof(fmt_close), "</%s>", sel); | ||
384 | |||
385 | buf = eina_strbuf_new(); | ||
386 | |||
387 | cursor = elm_entry_cursor_pos_get(ad->edit_buffer); | ||
388 | elm_entry_cursor_begin_set(ad->edit_buffer); | ||
389 | elm_entry_cursor_selection_begin(ad->edit_buffer); | ||
390 | elm_entry_cursor_pos_set(ad->edit_buffer, cursor); | ||
391 | elm_entry_cursor_selection_end(ad->edit_buffer); | ||
392 | sel = elm_entry_selection_get(ad->edit_buffer); | ||
393 | if (!sel || !sel[0]) | ||
394 | { | ||
395 | eina_strbuf_append(buf, fmt_open); | ||
396 | goto all_done; | ||
397 | } | ||
398 | what = fmt_open; | ||
399 | ptr = sel; | ||
400 | while ((s = strstr(ptr, what))) | ||
401 | { | ||
402 | ptr = s + strlen(what); | ||
403 | if (what == fmt_open) what = fmt_close; | ||
404 | else what = fmt_open; | ||
405 | } | ||
406 | eina_strbuf_append(buf, what); | ||
407 | if (what == fmt_close) | ||
408 | { | ||
409 | elm_entry_cursor_selection_begin(ad->edit_buffer); | ||
410 | elm_entry_cursor_end_set(ad->edit_buffer); | ||
411 | elm_entry_cursor_selection_end(ad->edit_buffer); | ||
412 | sel = elm_entry_selection_get(ad->edit_buffer); | ||
413 | if (sel) | ||
414 | { | ||
415 | Eina_Strbuf *buf2 = eina_strbuf_new(); | ||
416 | eina_strbuf_append(buf2, sel); | ||
417 | eina_strbuf_replace_first(buf2, fmt_close, ""); | ||
418 | elm_entry_entry_insert(ad->edit_buffer, | ||
419 | eina_strbuf_string_get(buf2)); | ||
420 | eina_strbuf_free(buf2); | ||
421 | } | ||
422 | } | ||
423 | elm_entry_select_none(ad->edit_buffer); | ||
424 | elm_entry_cursor_pos_set(ad->edit_buffer, cursor); | ||
425 | |||
426 | all_done: | ||
427 | _edit_buffer_insert(ad->edit_buffer, eina_strbuf_string_get(buf)); | ||
428 | eina_strbuf_free(buf); | ||
429 | } | ||
430 | |||
431 | static void | ||
432 | _autosave_change_cb(void *data, Evas_Object *obj, void *event) | ||
433 | { | ||
434 | App_Data *ad = data; | ||
435 | Eina_Bool state = elm_check_state_get(obj); | ||
436 | |||
437 | elm_entry_autosave_set(ad->edit_buffer, state); | ||
438 | if (state) elm_entry_file_save(ad->edit_buffer); | ||
439 | } | ||
440 | |||
441 | static void | ||
442 | _edit_dblclick_cb(void *data, Evas_Object *obj, void *event) | ||
443 | { | ||
444 | int current_cursor; | ||
445 | |||
446 | current_cursor = elm_entry_cursor_pos_get(obj); | ||
447 | |||
448 | while (elm_entry_cursor_prev(obj)) | ||
449 | { | ||
450 | const char *content; | ||
451 | if (elm_entry_cursor_is_visible_format_get(obj)) | ||
452 | break; | ||
453 | content = elm_entry_cursor_content_get(obj); | ||
454 | if (content && (content[0] == ' ')) | ||
455 | break; | ||
456 | } | ||
457 | |||
458 | if (current_cursor == elm_entry_cursor_pos_get(obj)) | ||
459 | return; | ||
460 | |||
461 | elm_entry_cursor_next(obj); | ||
462 | elm_entry_cursor_selection_begin(obj); | ||
463 | elm_entry_cursor_pos_set(obj, current_cursor); | ||
464 | while (elm_entry_cursor_next(obj)) | ||
465 | { | ||
466 | const char *content; | ||
467 | if (elm_entry_cursor_is_visible_format_get(obj)) | ||
468 | break; | ||
469 | content = elm_entry_cursor_content_get(obj); | ||
470 | if (content && (content[0] == ' ')) | ||
471 | break; | ||
472 | } | ||
473 | elm_entry_cursor_selection_end(obj); | ||
474 | } | ||
475 | |||
476 | static void | ||
477 | _edit_tplclick_cb(void *data, Evas_Object *obj, void *event) | ||
478 | { | ||
479 | elm_entry_cursor_line_begin_set(obj); | ||
480 | elm_entry_cursor_selection_begin(obj); | ||
481 | elm_entry_cursor_line_end_set(obj); | ||
482 | elm_entry_cursor_selection_end(obj); | ||
483 | } | ||
484 | |||
485 | static void | ||
486 | _win_del_cb(void *data, Evas_Object *obj, void *event) | ||
487 | { | ||
488 | evas_object_del(obj); | ||
489 | elm_exit(); | ||
490 | } | ||
491 | |||
492 | EAPI_MAIN int | ||
493 | elm_main(int argc, char *argv[]) | ||
494 | { | ||
495 | Evas_Object *win, *bg, *box, *tb, *en, *o, *icon; | ||
496 | App_Data app; | ||
497 | |||
498 | memset(&app, 0, sizeof(app)); | ||
499 | |||
500 | win = elm_win_add(NULL, "entry-example", ELM_WIN_BASIC); | ||
501 | elm_win_title_set(win, "Emacs Lite"); | ||
502 | evas_object_show(win); | ||
503 | |||
504 | bg = elm_bg_add(win); | ||
505 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
506 | elm_win_resize_object_add(win, bg); | ||
507 | evas_object_show(bg); | ||
508 | |||
509 | box = elm_box_add(win); | ||
510 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
511 | elm_win_resize_object_add(win, box); | ||
512 | evas_object_show(box); | ||
513 | |||
514 | tb = elm_box_add(win); | ||
515 | elm_box_horizontal_set(tb, EINA_TRUE); | ||
516 | evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0); | ||
517 | evas_object_size_hint_weight_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
518 | elm_box_pack_end(box, tb); | ||
519 | evas_object_show(tb); | ||
520 | |||
521 | o = elm_check_add(win); | ||
522 | elm_check_state_set(o, EINA_FALSE); | ||
523 | elm_object_text_set(o, "Autosave"); | ||
524 | elm_box_pack_end(tb, o); | ||
525 | evas_object_show(o); | ||
526 | |||
527 | evas_object_smart_callback_add(o, "changed", _autosave_change_cb, &app); | ||
528 | |||
529 | o = elm_button_add(win); | ||
530 | elm_object_text_set(o, "b"); | ||
531 | elm_box_pack_end(tb, o); | ||
532 | evas_object_show(o); | ||
533 | |||
534 | evas_object_smart_callback_add(o, "clicked", _format_change_cb, &app); | ||
535 | |||
536 | o = elm_button_add(win); | ||
537 | elm_object_text_set(o, "em"); | ||
538 | elm_box_pack_end(tb, o); | ||
539 | evas_object_show(o); | ||
540 | |||
541 | evas_object_smart_callback_add(o, "clicked", _format_change_cb, &app); | ||
542 | |||
543 | o = elm_button_add(win); | ||
544 | elm_box_pack_end(tb, o); | ||
545 | evas_object_show(o); | ||
546 | |||
547 | icon = elm_layout_add(win); | ||
548 | elm_layout_theme_set(icon, "entry", "emoticon/haha", "default"); | ||
549 | elm_object_part_content_set(o, "icon", icon); | ||
550 | |||
551 | evas_object_smart_callback_add(o, "clicked", _image_insert_cb, &app); | ||
552 | |||
553 | en = elm_entry_add(win); | ||
554 | elm_entry_autosave_set(en, EINA_FALSE); | ||
555 | elm_entry_file_set(en, "/tmp/da_test.txt", ELM_TEXT_FORMAT_MARKUP_UTF8); | ||
556 | evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
557 | evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
558 | elm_box_pack_end(box, en); | ||
559 | evas_object_show(en); | ||
560 | |||
561 | app.win = win; | ||
562 | app.edit_buffer = en; | ||
563 | |||
564 | evas_object_smart_callback_add(en, "clicked,double", _edit_dblclick_cb, | ||
565 | NULL); | ||
566 | evas_object_smart_callback_add(en, "clicked,triple", _edit_tplclick_cb, | ||
567 | NULL); | ||
568 | |||
569 | evas_object_smart_callback_add(win, "delete,request", _win_del_cb, &app); | ||
570 | |||
571 | elm_object_focus_set(app.edit_buffer, EINA_TRUE); | ||
572 | |||
573 | evas_object_resize(win, 300, 780); | ||
574 | |||
575 | elm_run(); | ||
576 | elm_shutdown(); | ||
577 | |||
578 | return 0; | ||
579 | } | ||
580 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/fileselector_button_example.c b/libraries/elementary/src/examples/fileselector_button_example.c deleted file mode 100644 index 7858388..0000000 --- a/libraries/elementary/src/examples/fileselector_button_example.c +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>file selector button widget</b> example, | ||
3 | * illustrating its usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g file selector_button_example.c -o file selector_button_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | static void /* hook on the sole smart callback */ | ||
23 | _file_chosen(void *data, | ||
24 | Evas_Object *obj, | ||
25 | void *event_info) | ||
26 | { | ||
27 | Evas_Object *entry = data; | ||
28 | const char *file = event_info; | ||
29 | if (file) | ||
30 | { | ||
31 | elm_object_text_set(entry, file); | ||
32 | printf("File chosen: %s\n", file); | ||
33 | } | ||
34 | else | ||
35 | printf("File selection canceled.\n"); | ||
36 | } | ||
37 | |||
38 | /* toggle inwin mode */ | ||
39 | static void | ||
40 | _inwin_mode_toggle(void *data, | ||
41 | Evas_Object *obj, | ||
42 | void *event_info) | ||
43 | { | ||
44 | Evas_Object *fs_bt = data; | ||
45 | Eina_Bool old_val = elm_fileselector_button_inwin_mode_get(fs_bt); | ||
46 | |||
47 | elm_fileselector_button_inwin_mode_set(fs_bt, !old_val); | ||
48 | printf("Inwin mode set to: %s\n", old_val ? "false" : "true"); | ||
49 | } | ||
50 | |||
51 | static void | ||
52 | _current_sel_toggle(void *data, | ||
53 | Evas_Object *obj, | ||
54 | void *event_info) | ||
55 | { | ||
56 | Evas_Object *fs_bt = data; | ||
57 | Eina_Bool old_val = elm_fileselector_button_is_save_get(fs_bt); | ||
58 | elm_fileselector_button_is_save_set(fs_bt, !old_val); | ||
59 | |||
60 | printf("%s text entry with selected item's name\n", | ||
61 | old_val ? "Disabling" : "Enabling"); | ||
62 | } | ||
63 | |||
64 | static void | ||
65 | _folder_only_toggle(void *data, | ||
66 | Evas_Object *obj, | ||
67 | void *event_info) | ||
68 | { | ||
69 | Evas_Object *fs_bt = data; | ||
70 | Eina_Bool old_val = elm_fileselector_button_folder_only_get(fs_bt); | ||
71 | elm_fileselector_button_folder_only_set(fs_bt, !old_val); | ||
72 | |||
73 | printf("Folder only mode set to: %s\n", old_val ? "false" : "true"); | ||
74 | } | ||
75 | |||
76 | static void | ||
77 | _expandable_toggle(void *data, | ||
78 | Evas_Object *obj, | ||
79 | void *event_info) | ||
80 | { | ||
81 | Evas_Object *fs_bt = data; | ||
82 | Eina_Bool old_val = elm_fileselector_button_expandable_get(fs_bt); | ||
83 | elm_fileselector_button_expandable_set(fs_bt, !old_val); | ||
84 | |||
85 | printf("Expandable folders mode set to: %s\n", old_val ? "false" : "true"); | ||
86 | } | ||
87 | |||
88 | EAPI_MAIN int | ||
89 | elm_main(int argc, | ||
90 | char **argv) | ||
91 | { | ||
92 | Evas_Object *win, *bg, *vbox, *hbox, *ic, *ck, *fs_bt, *en, *lb, *sep; | ||
93 | |||
94 | win = elm_win_add(NULL, "fileselector-button", ELM_WIN_BASIC); | ||
95 | elm_win_title_set(win, "File Selector Button Example"); | ||
96 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
97 | |||
98 | bg = elm_bg_add(win); | ||
99 | elm_win_resize_object_add(win, bg); | ||
100 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
101 | evas_object_show(bg); | ||
102 | |||
103 | vbox = elm_box_add(win); | ||
104 | elm_win_resize_object_add(win, vbox); | ||
105 | evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
106 | evas_object_show(vbox); | ||
107 | |||
108 | ic = elm_icon_add(win); | ||
109 | elm_icon_standard_set(ic, "file"); | ||
110 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
111 | |||
112 | /* file selector button */ | ||
113 | fs_bt = elm_fileselector_button_add(win); | ||
114 | elm_fileselector_button_path_set(fs_bt, "/tmp"); | ||
115 | elm_object_text_set(fs_bt, "Select a file"); | ||
116 | elm_object_part_content_set(fs_bt, "icon", ic); | ||
117 | |||
118 | elm_box_pack_end(vbox, fs_bt); | ||
119 | evas_object_show(fs_bt); | ||
120 | evas_object_show(ic); | ||
121 | |||
122 | /* attribute setting knobs */ | ||
123 | sep = elm_separator_add(win); | ||
124 | elm_separator_horizontal_set(sep, EINA_TRUE); | ||
125 | elm_box_pack_end(vbox, sep); | ||
126 | evas_object_show(sep); | ||
127 | |||
128 | hbox = elm_box_add(win); | ||
129 | elm_box_horizontal_set(hbox, EINA_TRUE); | ||
130 | elm_box_pack_end(vbox, hbox); | ||
131 | evas_object_show(hbox); | ||
132 | |||
133 | ck = elm_check_add(win); | ||
134 | elm_object_text_set(ck, "editable selection"); | ||
135 | elm_check_state_set(ck, elm_fileselector_button_is_save_get(fs_bt)); | ||
136 | evas_object_smart_callback_add(ck, "changed", _current_sel_toggle, fs_bt); | ||
137 | elm_box_pack_end(hbox, ck); | ||
138 | evas_object_show(ck); | ||
139 | |||
140 | ck = elm_check_add(win); | ||
141 | elm_object_text_set(ck, "\"inwin\" mode"); | ||
142 | elm_check_state_set(ck, elm_fileselector_button_inwin_mode_get(fs_bt)); | ||
143 | evas_object_smart_callback_add(ck, "changed", _inwin_mode_toggle, fs_bt); | ||
144 | elm_box_pack_end(hbox, ck); | ||
145 | evas_object_show(ck); | ||
146 | |||
147 | ck = elm_check_add(win); | ||
148 | elm_object_text_set(ck, "folders only"); | ||
149 | elm_check_state_set(ck, elm_fileselector_button_folder_only_get(fs_bt)); | ||
150 | evas_object_smart_callback_add(ck, "changed", _folder_only_toggle, fs_bt); | ||
151 | elm_box_pack_end(hbox, ck); | ||
152 | evas_object_show(ck); | ||
153 | |||
154 | ck = elm_check_add(win); | ||
155 | elm_object_text_set(ck, "expandable"); | ||
156 | elm_check_state_set(ck, elm_fileselector_button_expandable_get(fs_bt)); | ||
157 | evas_object_smart_callback_add(ck, "changed", _expandable_toggle, fs_bt); | ||
158 | elm_box_pack_end(hbox, ck); | ||
159 | evas_object_show(ck); | ||
160 | |||
161 | lb = elm_label_add(win); | ||
162 | elm_object_text_set(lb, "Last selection:"); | ||
163 | elm_box_pack_end(vbox, lb); | ||
164 | evas_object_show(lb); | ||
165 | |||
166 | en = elm_entry_add(win); | ||
167 | elm_entry_line_wrap_set(en, EINA_FALSE); | ||
168 | elm_entry_editable_set(en, EINA_FALSE); | ||
169 | evas_object_smart_callback_add(fs_bt, "file,chosen", _file_chosen, en); | ||
170 | elm_box_pack_end(vbox, en); | ||
171 | evas_object_show(en); | ||
172 | |||
173 | evas_object_resize(win, 400, 400); | ||
174 | evas_object_show(win); | ||
175 | |||
176 | elm_run(); | ||
177 | elm_shutdown(); | ||
178 | |||
179 | return 0; | ||
180 | } | ||
181 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/fileselector_entry_example.c b/libraries/elementary/src/examples/fileselector_entry_example.c deleted file mode 100644 index eafe80b..0000000 --- a/libraries/elementary/src/examples/fileselector_entry_example.c +++ /dev/null | |||
@@ -1,170 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>file selector entry widget</b> example, | ||
3 | * illustrating its usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g file selector_entry_example.c -o file selector_entry_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | /* hook on the file,chosen smart callback */ | ||
23 | static void | ||
24 | _file_chosen(void *data, | ||
25 | Evas_Object *obj, | ||
26 | void *event_info) | ||
27 | { | ||
28 | const char *file = event_info; | ||
29 | |||
30 | if (file) | ||
31 | printf("File chosen: %s\n", file); | ||
32 | else | ||
33 | printf("File selection canceled.\n"); | ||
34 | } | ||
35 | |||
36 | /* toggle inwin mode */ | ||
37 | static void | ||
38 | _inwin_mode_toggle(void *data, | ||
39 | Evas_Object *obj, | ||
40 | void *event_info) | ||
41 | { | ||
42 | Evas_Object *fs_entry = data; | ||
43 | Eina_Bool old_val = elm_fileselector_entry_inwin_mode_get(fs_entry); | ||
44 | |||
45 | elm_fileselector_entry_inwin_mode_set(fs_entry, !old_val); | ||
46 | printf("Inwin mode set to: %s\n", old_val ? "false" : "true"); | ||
47 | } | ||
48 | |||
49 | static void | ||
50 | _current_sel_toggle(void *data, | ||
51 | Evas_Object *obj, | ||
52 | void *event_info) | ||
53 | { | ||
54 | Evas_Object *fs_entry = data; | ||
55 | Eina_Bool old_val = elm_fileselector_entry_is_save_get(fs_entry); | ||
56 | elm_fileselector_entry_is_save_set(fs_entry, !old_val); | ||
57 | |||
58 | printf("%s text entry with selected item's name\n", | ||
59 | old_val ? "Disabling" : "Enabling"); | ||
60 | } | ||
61 | |||
62 | static void | ||
63 | _folder_only_toggle(void *data, | ||
64 | Evas_Object *obj, | ||
65 | void *event_info) | ||
66 | { | ||
67 | Evas_Object *fs_entry = data; | ||
68 | Eina_Bool old_val = elm_fileselector_entry_folder_only_get(fs_entry); | ||
69 | elm_fileselector_entry_folder_only_set(fs_entry, !old_val); | ||
70 | |||
71 | printf("Folder only mode set to: %s\n", old_val ? "false" : "true"); | ||
72 | } | ||
73 | |||
74 | static void | ||
75 | _expandable_toggle(void *data, | ||
76 | Evas_Object *obj, | ||
77 | void *event_info) | ||
78 | { | ||
79 | Evas_Object *fs_entry = data; | ||
80 | Eina_Bool old_val = elm_fileselector_entry_expandable_get(fs_entry); | ||
81 | elm_fileselector_entry_expandable_set(fs_entry, !old_val); | ||
82 | |||
83 | printf("Expandable folders mode set to: %s\n", old_val ? "false" : "true"); | ||
84 | } | ||
85 | |||
86 | EAPI_MAIN int | ||
87 | elm_main(int argc, | ||
88 | char **argv) | ||
89 | { | ||
90 | Evas_Object *win, *bg, *vbox, *hbox, *ic, *ck, *fs_entry, *sep; | ||
91 | |||
92 | win = elm_win_add(NULL, "fileselector-entry", ELM_WIN_BASIC); | ||
93 | elm_win_title_set(win, "File Selector Entry Example"); | ||
94 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
95 | |||
96 | bg = elm_bg_add(win); | ||
97 | elm_win_resize_object_add(win, bg); | ||
98 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
99 | evas_object_show(bg); | ||
100 | |||
101 | vbox = elm_box_add(win); | ||
102 | elm_win_resize_object_add(win, vbox); | ||
103 | evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
104 | evas_object_show(vbox); | ||
105 | |||
106 | ic = elm_icon_add(win); | ||
107 | elm_icon_standard_set(ic, "file"); | ||
108 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
109 | |||
110 | /* file selector entry */ | ||
111 | fs_entry = elm_fileselector_entry_add(win); | ||
112 | evas_object_size_hint_align_set(fs_entry, EVAS_HINT_FILL, 0); | ||
113 | elm_fileselector_entry_path_set(fs_entry, "/tmp"); | ||
114 | elm_object_text_set(fs_entry, "Select a file"); | ||
115 | elm_object_part_content_set(fs_entry, "button icon", ic); | ||
116 | |||
117 | elm_box_pack_end(vbox, fs_entry); | ||
118 | evas_object_show(fs_entry); | ||
119 | evas_object_show(ic); | ||
120 | |||
121 | /* attribute setting knobs */ | ||
122 | sep = elm_separator_add(win); | ||
123 | elm_separator_horizontal_set(sep, EINA_TRUE); | ||
124 | elm_box_pack_end(vbox, sep); | ||
125 | evas_object_show(sep); | ||
126 | |||
127 | hbox = elm_box_add(win); | ||
128 | elm_box_horizontal_set(hbox, EINA_TRUE); | ||
129 | elm_box_pack_end(vbox, hbox); | ||
130 | evas_object_show(hbox); | ||
131 | |||
132 | ck = elm_check_add(win); | ||
133 | elm_object_text_set(ck, "editable selection"); | ||
134 | elm_check_state_set(ck, elm_fileselector_entry_is_save_get(fs_entry)); | ||
135 | evas_object_smart_callback_add(ck, "changed", _current_sel_toggle, fs_entry); | ||
136 | elm_box_pack_end(hbox, ck); | ||
137 | evas_object_show(ck); | ||
138 | |||
139 | ck = elm_check_add(win); | ||
140 | elm_object_text_set(ck, "\"inwin\" mode"); | ||
141 | elm_check_state_set(ck, elm_fileselector_entry_inwin_mode_get(fs_entry)); | ||
142 | evas_object_smart_callback_add(ck, "changed", _inwin_mode_toggle, fs_entry); | ||
143 | elm_box_pack_end(hbox, ck); | ||
144 | evas_object_show(ck); | ||
145 | |||
146 | ck = elm_check_add(win); | ||
147 | elm_object_text_set(ck, "folders only"); | ||
148 | elm_check_state_set(ck, elm_fileselector_entry_folder_only_get(fs_entry)); | ||
149 | evas_object_smart_callback_add(ck, "changed", _folder_only_toggle, fs_entry); | ||
150 | elm_box_pack_end(hbox, ck); | ||
151 | evas_object_show(ck); | ||
152 | |||
153 | ck = elm_check_add(win); | ||
154 | elm_object_text_set(ck, "expandable"); | ||
155 | elm_check_state_set(ck, elm_fileselector_entry_expandable_get(fs_entry)); | ||
156 | evas_object_smart_callback_add(ck, "changed", _expandable_toggle, fs_entry); | ||
157 | elm_box_pack_end(hbox, ck); | ||
158 | evas_object_show(ck); | ||
159 | |||
160 | evas_object_smart_callback_add(fs_entry, "file,chosen", _file_chosen, NULL); | ||
161 | |||
162 | evas_object_resize(win, 400, 400); | ||
163 | evas_object_show(win); | ||
164 | |||
165 | elm_run(); | ||
166 | elm_shutdown(); | ||
167 | |||
168 | return 0; | ||
169 | } | ||
170 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/fileselector_example.c b/libraries/elementary/src/examples/fileselector_example.c deleted file mode 100644 index 7d91979..0000000 --- a/libraries/elementary/src/examples/fileselector_example.c +++ /dev/null | |||
@@ -1,240 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>file selector widget</b> example, | ||
3 | * illustrating its usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g file selector_example.c -o file selector_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | /* 'done' cb */ | ||
23 | static void | ||
24 | _fs_done(void *data, | ||
25 | Evas_Object *obj, | ||
26 | void *event_info) | ||
27 | { | ||
28 | const char *selected = event_info; | ||
29 | /* event_info contains the full path of the selected file or NULL | ||
30 | * if none is selected (or cancel is pressed) */ | ||
31 | |||
32 | printf("We're done! Selected file is: %s\n", | ||
33 | selected ? selected : "*none!*"); | ||
34 | |||
35 | _on_done(NULL, NULL, NULL); | ||
36 | } | ||
37 | |||
38 | /* 'selected' cb */ | ||
39 | static void | ||
40 | _fs_selected(void *data, | ||
41 | Evas_Object *obj, | ||
42 | void *event_info) | ||
43 | { | ||
44 | const char *selected = event_info; | ||
45 | /* event_info contains the full path of the selected file */ | ||
46 | |||
47 | printf("There's been a selection: %s\n", selected); | ||
48 | } | ||
49 | |||
50 | static void | ||
51 | _is_save_clicked(void *data, | ||
52 | Evas_Object *obj, | ||
53 | void *event_info) | ||
54 | { | ||
55 | Evas_Object *fs = data; | ||
56 | Eina_Bool old_val = elm_fileselector_is_save_get(fs); | ||
57 | |||
58 | printf("%s text entry with selected item's name\n", | ||
59 | old_val ? "Disabling" : "Enabling"); | ||
60 | |||
61 | elm_fileselector_is_save_set(fs, !old_val); | ||
62 | } | ||
63 | |||
64 | static void | ||
65 | _folder_only_clicked(void *data, | ||
66 | Evas_Object *obj, | ||
67 | void *event_info) | ||
68 | { | ||
69 | Evas_Object *fs = data; | ||
70 | Eina_Bool old_val = elm_fileselector_folder_only_get(fs); | ||
71 | |||
72 | printf("%s folder-only mode\n", | ||
73 | old_val ? "Disabling" : "Enabling"); | ||
74 | |||
75 | elm_fileselector_folder_only_set(fs, !old_val); | ||
76 | } | ||
77 | |||
78 | static void | ||
79 | _expandable_clicked(void *data, | ||
80 | Evas_Object *obj, | ||
81 | void *event_info) | ||
82 | { | ||
83 | Evas_Object *fs = data; | ||
84 | Eina_Bool old_val = elm_fileselector_expandable_get(fs); | ||
85 | |||
86 | printf("%s tree-view mode\n", | ||
87 | old_val ? "Disabling" : "Enabling"); | ||
88 | |||
89 | elm_fileselector_expandable_set(fs, !old_val); | ||
90 | } | ||
91 | |||
92 | static void | ||
93 | _sel_get_clicked(void *data, | ||
94 | Evas_Object *obj, | ||
95 | void *event_info) | ||
96 | { | ||
97 | Evas_Object *fs = data; | ||
98 | printf("Current selection is: %s\n", elm_fileselector_selected_get(fs)); | ||
99 | } | ||
100 | |||
101 | static void | ||
102 | _path_get_clicked(void *data, | ||
103 | Evas_Object *obj, | ||
104 | void *event_info) | ||
105 | { | ||
106 | Evas_Object *fs = data; | ||
107 | printf("Current selection's directory path is: %s\n", | ||
108 | elm_fileselector_path_get(fs)); | ||
109 | } | ||
110 | |||
111 | EAPI_MAIN int | ||
112 | elm_main(int argc, | ||
113 | char **argv) | ||
114 | { | ||
115 | Evas_Object *win, *fs, *bg, *vbox, *buttons_bx, *bt, *sep, *bx; | ||
116 | |||
117 | /* Set the locale according to the system pref. If you dont do so | ||
118 | * the file selector will order the files list in a case sensitive | ||
119 | * manner | ||
120 | */ | ||
121 | setlocale(LC_ALL, ""); | ||
122 | |||
123 | elm_need_ethumb(); /* let's have thumbnails of images on grid view */ | ||
124 | |||
125 | win = elm_win_add(NULL, "fileselector", ELM_WIN_BASIC); | ||
126 | elm_win_title_set(win, "File Selector Example"); | ||
127 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
128 | |||
129 | bg = elm_bg_add(win); | ||
130 | elm_win_resize_object_add(win, bg); | ||
131 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
132 | evas_object_show(bg); | ||
133 | |||
134 | bx = elm_box_add(win); | ||
135 | elm_win_resize_object_add(win, bx); | ||
136 | elm_box_horizontal_set(bx, EINA_TRUE); | ||
137 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
138 | /* evas_object_size_hint_align_set(fs, EVAS_HINT_FILL, EVAS_HINT_FILL); */ | ||
139 | evas_object_show(bx); | ||
140 | |||
141 | vbox = elm_box_add(win); | ||
142 | evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
143 | evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
144 | evas_object_show(vbox); | ||
145 | elm_box_pack_end(bx, vbox); | ||
146 | |||
147 | /* first file selector, in list mode */ | ||
148 | fs = elm_fileselector_add(win); | ||
149 | /* enable the fs file name entry */ | ||
150 | elm_fileselector_is_save_set(fs, EINA_TRUE); | ||
151 | /* custom list view */ | ||
152 | elm_fileselector_expandable_set(fs, EINA_FALSE); | ||
153 | /* start the fileselector in the /tmp/ dir */ | ||
154 | elm_fileselector_path_set(fs, "/tmp"); | ||
155 | |||
156 | evas_object_size_hint_weight_set(fs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
157 | evas_object_size_hint_align_set(fs, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
158 | elm_box_pack_end(vbox, fs); | ||
159 | evas_object_show(fs); | ||
160 | |||
161 | /* the 'done' cb is called when the user presses ok/cancel */ | ||
162 | evas_object_smart_callback_add(fs, "done", _fs_done, win); | ||
163 | /* the 'selected' cb is called when the user clicks on a file/dir */ | ||
164 | evas_object_smart_callback_add(fs, "selected", _fs_selected, win); | ||
165 | |||
166 | /* test buttons */ | ||
167 | sep = elm_separator_add(win); | ||
168 | elm_separator_horizontal_set(sep, EINA_TRUE); | ||
169 | elm_box_pack_end(vbox, sep); | ||
170 | evas_object_show(sep); | ||
171 | |||
172 | buttons_bx = elm_box_add(win); | ||
173 | elm_box_horizontal_set(buttons_bx, EINA_TRUE); | ||
174 | elm_box_pack_end(vbox, buttons_bx); | ||
175 | evas_object_show(buttons_bx); | ||
176 | |||
177 | bt = elm_check_add(win); | ||
178 | elm_object_text_set(bt, "editable selection"); | ||
179 | elm_check_state_set(bt, elm_fileselector_is_save_get(fs)); | ||
180 | evas_object_smart_callback_add(bt, "changed", _is_save_clicked, fs); | ||
181 | elm_box_pack_end(buttons_bx, bt); | ||
182 | evas_object_show(bt); | ||
183 | |||
184 | bt = elm_check_add(win); | ||
185 | elm_object_text_set(bt, "folders only"); | ||
186 | elm_check_state_set(bt, elm_fileselector_folder_only_get(fs)); | ||
187 | evas_object_smart_callback_add(bt, "changed", _folder_only_clicked, fs); | ||
188 | elm_box_pack_end(buttons_bx, bt); | ||
189 | evas_object_show(bt); | ||
190 | |||
191 | bt = elm_check_add(win); | ||
192 | elm_object_text_set(bt, "expandable"); | ||
193 | elm_check_state_set(bt, elm_fileselector_expandable_get(fs)); | ||
194 | evas_object_smart_callback_add(bt, "changed", _expandable_clicked, fs); | ||
195 | elm_box_pack_end(buttons_bx, bt); | ||
196 | evas_object_show(bt); | ||
197 | |||
198 | buttons_bx = elm_box_add(win); | ||
199 | elm_box_horizontal_set(buttons_bx, EINA_TRUE); | ||
200 | elm_box_pack_end(vbox, buttons_bx); | ||
201 | evas_object_show(buttons_bx); | ||
202 | |||
203 | bt = elm_button_add(win); | ||
204 | elm_object_text_set(bt, "Print selection"); | ||
205 | evas_object_smart_callback_add(bt, "clicked", _sel_get_clicked, fs); | ||
206 | elm_box_pack_end(buttons_bx, bt); | ||
207 | evas_object_show(bt); | ||
208 | |||
209 | bt = elm_button_add(win); | ||
210 | elm_object_text_set(bt, "Print path"); | ||
211 | evas_object_smart_callback_add(bt, "clicked", _path_get_clicked, fs); | ||
212 | elm_box_pack_end(buttons_bx, bt); | ||
213 | evas_object_show(bt); | ||
214 | |||
215 | sep = elm_separator_add(win); | ||
216 | elm_separator_horizontal_set(sep, EINA_FALSE); | ||
217 | elm_box_pack_end(bx, sep); | ||
218 | evas_object_show(sep); | ||
219 | |||
220 | /* second file selector, now with grid view */ | ||
221 | fs = elm_fileselector_add(win); | ||
222 | elm_fileselector_is_save_set(fs, EINA_TRUE); | ||
223 | elm_fileselector_mode_set(fs, ELM_FILESELECTOR_GRID); | ||
224 | elm_fileselector_buttons_ok_cancel_set(fs, EINA_FALSE); | ||
225 | elm_fileselector_path_set(fs, "/tmp"); | ||
226 | |||
227 | evas_object_size_hint_weight_set(fs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
228 | evas_object_size_hint_align_set(fs, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
229 | elm_box_pack_end(bx, fs); | ||
230 | evas_object_show(fs); | ||
231 | |||
232 | evas_object_resize(win, 800, 600); | ||
233 | evas_object_show(win); | ||
234 | |||
235 | elm_run(); | ||
236 | elm_shutdown(); | ||
237 | |||
238 | return 0; | ||
239 | } | ||
240 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/flip_example_01.c b/libraries/elementary/src/examples/flip_example_01.c deleted file mode 100644 index 41a0ef6..0000000 --- a/libraries/elementary/src/examples/flip_example_01.c +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o flip_example_01 flip_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _change_interaction(void *data, Evas_Object *obj, void *event_info); | ||
7 | |||
8 | EAPI_MAIN int | ||
9 | elm_main(int argc, char **argv) | ||
10 | { | ||
11 | Evas_Object *win, *bg, *rect, *rect2, *flip, *radio, *radio2, *radio3; | ||
12 | |||
13 | win = elm_win_add(NULL, "flip", ELM_WIN_BASIC); | ||
14 | elm_win_title_set(win, "Flip"); | ||
15 | elm_win_autodel_set(win, EINA_TRUE); | ||
16 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
17 | |||
18 | bg = elm_bg_add(win); | ||
19 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
20 | elm_win_resize_object_add(win, bg); | ||
21 | evas_object_show(bg); | ||
22 | |||
23 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
24 | evas_object_resize(rect, 150, 150); | ||
25 | evas_object_color_set(rect, 0, 0, 255, 255); | ||
26 | evas_object_show(rect); | ||
27 | |||
28 | rect2 = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
29 | evas_object_color_set(rect2, 0, 255, 0, 255); | ||
30 | evas_object_show(rect2); | ||
31 | |||
32 | flip = elm_flip_add(win); | ||
33 | elm_object_part_content_set(flip, "front", rect); | ||
34 | elm_object_part_content_set(flip, "back", rect2); | ||
35 | evas_object_resize(flip, 150, 150); | ||
36 | evas_object_move(flip, 10, 10); | ||
37 | evas_object_show(flip); | ||
38 | |||
39 | elm_flip_interaction_set(flip, ELM_FLIP_INTERACTION_PAGE); | ||
40 | elm_flip_interaction_direction_enabled_set(flip, ELM_FLIP_DIRECTION_UP, EINA_TRUE); | ||
41 | elm_flip_interaction_direction_enabled_set(flip, ELM_FLIP_DIRECTION_DOWN, EINA_TRUE); | ||
42 | elm_flip_interaction_direction_enabled_set(flip, ELM_FLIP_DIRECTION_LEFT, EINA_TRUE); | ||
43 | elm_flip_interaction_direction_enabled_set(flip, ELM_FLIP_DIRECTION_RIGHT, EINA_TRUE); | ||
44 | elm_flip_interaction_direction_hitsize_set(flip, ELM_FLIP_DIRECTION_UP, 1); | ||
45 | elm_flip_interaction_direction_hitsize_set(flip, ELM_FLIP_DIRECTION_DOWN, 1); | ||
46 | elm_flip_interaction_direction_hitsize_set(flip, ELM_FLIP_DIRECTION_LEFT, 1); | ||
47 | elm_flip_interaction_direction_hitsize_set(flip, ELM_FLIP_DIRECTION_RIGHT, 1); | ||
48 | |||
49 | radio = elm_radio_add(win); | ||
50 | elm_object_text_set(radio, "page"); | ||
51 | elm_radio_value_set(radio, ELM_FLIP_INTERACTION_PAGE); | ||
52 | elm_radio_state_value_set(radio, ELM_FLIP_INTERACTION_PAGE); | ||
53 | evas_object_resize(radio, 55, 30); | ||
54 | evas_object_move(radio, 10, 160); | ||
55 | evas_object_show(radio); | ||
56 | evas_object_smart_callback_add(radio, "changed", _change_interaction, flip); | ||
57 | |||
58 | radio2 = elm_radio_add(win); | ||
59 | elm_object_text_set(radio2, "cube"); | ||
60 | elm_radio_state_value_set(radio2, ELM_FLIP_INTERACTION_CUBE); | ||
61 | elm_radio_group_add(radio2, radio); | ||
62 | evas_object_resize(radio2, 55, 30); | ||
63 | evas_object_move(radio2, 75, 160); | ||
64 | evas_object_show(radio2); | ||
65 | evas_object_smart_callback_add(radio2, "changed", _change_interaction, flip); | ||
66 | |||
67 | radio3 = elm_radio_add(win); | ||
68 | elm_object_text_set(radio3, "rotate"); | ||
69 | elm_radio_state_value_set(radio3, ELM_FLIP_INTERACTION_ROTATE); | ||
70 | elm_radio_group_add(radio3, radio); | ||
71 | evas_object_resize(radio3, 55, 30); | ||
72 | evas_object_move(radio3, 140, 160); | ||
73 | evas_object_show(radio3); | ||
74 | evas_object_smart_callback_add(radio3, "changed", _change_interaction, flip); | ||
75 | |||
76 | evas_object_resize(win, 200, 200); | ||
77 | evas_object_show(win); | ||
78 | |||
79 | elm_run(); | ||
80 | elm_shutdown(); | ||
81 | |||
82 | return 0; | ||
83 | } | ||
84 | ELM_MAIN() | ||
85 | |||
86 | static void | ||
87 | _change_interaction(void *data, Evas_Object *obj, void *event_info) | ||
88 | { | ||
89 | elm_flip_interaction_set(data, elm_radio_state_value_get(obj)); | ||
90 | elm_flip_go(data, ELM_FLIP_ROTATE_XZ_CENTER_AXIS); | ||
91 | } | ||
diff --git a/libraries/elementary/src/examples/flipselector_example.c b/libraries/elementary/src/examples/flipselector_example.c deleted file mode 100644 index 209c3bf..0000000 --- a/libraries/elementary/src/examples/flipselector_example.c +++ /dev/null | |||
@@ -1,206 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>flip selector widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g flipselector_example.c -o flipselector_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static const char *commands = \ | ||
15 | "commands are:\n" | ||
16 | "\tn - flip to next item\n" | ||
17 | "\tp - flip to previous item\n" | ||
18 | "\tf - print first item's label\n" | ||
19 | "\tl - print last item's label\n" | ||
20 | "\ts - print selected item's label\n" | ||
21 | "\th - print help\n"; | ||
22 | |||
23 | static void | ||
24 | _on_done(void *data, | ||
25 | Evas_Object *obj, | ||
26 | void *event_info) | ||
27 | { | ||
28 | elm_exit(); | ||
29 | } | ||
30 | |||
31 | void /* unselect the item shown in the flip selector */ | ||
32 | _unsel_cb(void *data, | ||
33 | Evas_Object *obj, | ||
34 | void *event_info) | ||
35 | { | ||
36 | Elm_Object_Item *it; | ||
37 | Evas_Object *fp = data; | ||
38 | |||
39 | it = elm_flipselector_selected_item_get(fp); | ||
40 | elm_flipselector_item_selected_set(it, EINA_FALSE); | ||
41 | } | ||
42 | |||
43 | void /* delete the item shown in the flip selector */ | ||
44 | _del_cb(void *data, | ||
45 | Evas_Object *obj, | ||
46 | void *event_info) | ||
47 | { | ||
48 | Elm_Object_Item *it; | ||
49 | Evas_Object *fp = data; | ||
50 | |||
51 | it = elm_flipselector_selected_item_get(fp); | ||
52 | if (it) elm_object_item_del(it); | ||
53 | } | ||
54 | |||
55 | void /* underflow callback */ | ||
56 | _underflow_cb(void *data, | ||
57 | Evas_Object *obj, | ||
58 | void *event_info) | ||
59 | { | ||
60 | fprintf(stdout, "Underflow!\n"); | ||
61 | } | ||
62 | |||
63 | void /* overflow callback */ | ||
64 | _overflow_cb(void *data, | ||
65 | Evas_Object *obj, | ||
66 | void *event_info) | ||
67 | { | ||
68 | fprintf(stdout, "Overflow!\n"); | ||
69 | } | ||
70 | |||
71 | static void | ||
72 | _on_keydown(void *data, | ||
73 | Evas_Object *object, | ||
74 | Evas_Object *src, | ||
75 | Evas_Callback_Type type, | ||
76 | void *event_info) | ||
77 | { | ||
78 | Evas_Object *fs = data; | ||
79 | Evas_Event_Key_Down *ev = event_info; | ||
80 | |||
81 | if (type != EVAS_CALLBACK_KEY_DOWN) return; | ||
82 | |||
83 | if (strcmp(ev->keyname, "h") == 0) /* print help */ | ||
84 | { | ||
85 | fprintf(stdout, "%s", commands); | ||
86 | return; | ||
87 | } | ||
88 | |||
89 | if (strcmp(ev->keyname, "n") == 0) /* flip to next item */ | ||
90 | { | ||
91 | elm_flipselector_flip_next(fs); | ||
92 | |||
93 | fprintf(stdout, "Flipping to next item\n"); | ||
94 | |||
95 | return; | ||
96 | } | ||
97 | |||
98 | if (strcmp(ev->keyname, "p") == 0) /* flip to previous item */ | ||
99 | { | ||
100 | elm_flipselector_flip_prev(fs); | ||
101 | |||
102 | fprintf(stdout, "Flipping to previous item\n"); | ||
103 | |||
104 | return; | ||
105 | } | ||
106 | |||
107 | if (strcmp(ev->keyname, "f") == 0) /* print first item's label */ | ||
108 | { | ||
109 | Elm_Object_Item *it; | ||
110 | |||
111 | it = elm_flipselector_first_item_get(fs); | ||
112 | |||
113 | fprintf(stdout, "Flip selector's first item is: %s\n", it ? | ||
114 | elm_object_item_text_get(it) : "none"); | ||
115 | |||
116 | return; | ||
117 | } | ||
118 | |||
119 | if (strcmp(ev->keyname, "l") == 0) /* print last item's label */ | ||
120 | { | ||
121 | Elm_Object_Item *it; | ||
122 | |||
123 | it = elm_flipselector_last_item_get(fs); | ||
124 | |||
125 | fprintf(stdout, "Flip selector's last item is: %s\n", it ? | ||
126 | elm_object_item_text_get(it) : "none"); | ||
127 | |||
128 | return; | ||
129 | } | ||
130 | |||
131 | if (strcmp(ev->keyname, "s") == 0) /* print selected item's label */ | ||
132 | { | ||
133 | Elm_Object_Item *it; | ||
134 | |||
135 | it = elm_flipselector_selected_item_get(fs); | ||
136 | |||
137 | fprintf(stdout, "Flip selector's selected item is: %s\n", it ? | ||
138 | elm_object_item_text_get(it) : "none"); | ||
139 | |||
140 | return; | ||
141 | } | ||
142 | } | ||
143 | |||
144 | EAPI_MAIN int | ||
145 | elm_main(int argc, char **argv) | ||
146 | { | ||
147 | unsigned int i; | ||
148 | Evas_Object *win, *bg, *bx, *fp, *bt; | ||
149 | static const char *lbl[] = | ||
150 | { | ||
151 | "Elementary", | ||
152 | "Evas", | ||
153 | "Eina", | ||
154 | "Edje", | ||
155 | "Eet", | ||
156 | "Ecore", | ||
157 | "Efreet", | ||
158 | "Edbus" | ||
159 | }; | ||
160 | |||
161 | win = elm_win_add(NULL, "flipselector", ELM_WIN_BASIC); | ||
162 | elm_win_title_set(win, "Flip Selector Example"); | ||
163 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
164 | |||
165 | bg = elm_bg_add(win); | ||
166 | elm_win_resize_object_add(win, bg); | ||
167 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
168 | evas_object_show(bg); | ||
169 | |||
170 | bx = elm_box_add(win); | ||
171 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
172 | elm_win_resize_object_add(win, bx); | ||
173 | evas_object_show(bx); | ||
174 | |||
175 | fp = elm_flipselector_add(win); | ||
176 | evas_object_size_hint_weight_set(fp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
177 | evas_object_smart_callback_add(fp, "underflowed", _overflow_cb, NULL); | ||
178 | evas_object_smart_callback_add(fp, "overflowed", _underflow_cb, NULL); | ||
179 | for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++) | ||
180 | elm_flipselector_item_append(fp, lbl[i], NULL, NULL); | ||
181 | elm_box_pack_end(bx, fp); | ||
182 | evas_object_show(fp); | ||
183 | |||
184 | bt = elm_button_add(win); | ||
185 | elm_object_text_set(bt, "Unselect item"); | ||
186 | evas_object_smart_callback_add(bt, "clicked", _unsel_cb, fp); | ||
187 | elm_box_pack_end(bx, bt); | ||
188 | evas_object_show(bt); | ||
189 | |||
190 | bt = elm_button_add(win); | ||
191 | elm_object_text_set(bt, "Delete item"); | ||
192 | evas_object_smart_callback_add(bt, "clicked", _del_cb, fp); | ||
193 | elm_box_pack_end(bx, bt); | ||
194 | evas_object_show(bt); | ||
195 | |||
196 | elm_object_event_callback_add(win, (Elm_Event_Cb)_on_keydown, fp); | ||
197 | |||
198 | evas_object_show(win); | ||
199 | |||
200 | fprintf(stdout, "%s", commands); | ||
201 | elm_run(); | ||
202 | elm_shutdown(); | ||
203 | |||
204 | return 0; | ||
205 | } | ||
206 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/frame_example_01.c b/libraries/elementary/src/examples/frame_example_01.c deleted file mode 100644 index ed862b9..0000000 --- a/libraries/elementary/src/examples/frame_example_01.c +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o frame_example_01 frame_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | EAPI_MAIN int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg; | ||
10 | Evas_Object *f1, *r1, *f2, *r2, *f3, *r3, *f4, *r4; | ||
11 | |||
12 | win = elm_win_add(NULL, "frame", ELM_WIN_BASIC); | ||
13 | elm_win_title_set(win, "Frame"); | ||
14 | elm_win_autodel_set(win, EINA_TRUE); | ||
15 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
16 | |||
17 | bg = elm_bg_add(win); | ||
18 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
19 | elm_win_resize_object_add(win, bg); | ||
20 | evas_object_show(bg); | ||
21 | |||
22 | r1 = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
23 | evas_object_color_set(r1, 255, 0, 0, 255); | ||
24 | evas_object_show(r1); | ||
25 | |||
26 | f1= elm_frame_add(win); | ||
27 | elm_object_content_set(f1, r1); | ||
28 | elm_object_text_set(f1, "Default frame"); | ||
29 | evas_object_resize(f1, 100, 100); | ||
30 | evas_object_move(f1, 25, 25); | ||
31 | evas_object_show(f1); | ||
32 | |||
33 | r2 = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
34 | evas_object_color_set(r2, 0, 255, 0, 255); | ||
35 | evas_object_show(r2); | ||
36 | |||
37 | f2 = elm_frame_add(win); | ||
38 | elm_object_content_set(f2, r2); | ||
39 | elm_object_text_set(f2, "Padding frame"); | ||
40 | evas_object_resize(f2, 100, 100); | ||
41 | evas_object_move(f2, 150, 25); | ||
42 | elm_object_style_set(f2, "pad_small"); | ||
43 | evas_object_show(f2); | ||
44 | |||
45 | r3 = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
46 | evas_object_color_set(r3, 0, 0, 255, 255); | ||
47 | evas_object_show(r3); | ||
48 | |||
49 | f3 = elm_frame_add(win); | ||
50 | elm_object_content_set(f3, r3); | ||
51 | elm_object_text_set(f3, "Top outdent frame"); | ||
52 | evas_object_resize(f3, 100, 100); | ||
53 | evas_object_move(f3, 25, 150); | ||
54 | elm_object_style_set(f3, "outdent_top"); | ||
55 | evas_object_show(f3); | ||
56 | |||
57 | r4 = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
58 | evas_object_color_set(r4, 0, 0, 0, 255); | ||
59 | evas_object_show(r4); | ||
60 | |||
61 | f4 = elm_frame_add(win); | ||
62 | elm_object_content_set(f4, r4); | ||
63 | elm_object_text_set(f4, "Bottom outdent frame"); | ||
64 | evas_object_resize(f4, 100, 100); | ||
65 | evas_object_move(f4, 150, 150); | ||
66 | elm_object_style_set(f4, "outdent_bottom"); | ||
67 | evas_object_show(f4); | ||
68 | |||
69 | evas_object_resize(win, 275, 275); | ||
70 | evas_object_show(win); | ||
71 | |||
72 | elm_run(); | ||
73 | elm_shutdown(); | ||
74 | |||
75 | return 0; | ||
76 | } | ||
77 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/general_funcs_example.c b/libraries/elementary/src/examples/general_funcs_example.c deleted file mode 100644 index 626c272..0000000 --- a/libraries/elementary/src/examples/general_funcs_example.c +++ /dev/null | |||
@@ -1,188 +0,0 @@ | |||
1 | /* Compile with: | ||
2 | * gcc -g general_funcs_example.c -o general_funcs_example `pkg-config --cflags --libs elementary` | ||
3 | */ | ||
4 | |||
5 | #include <Elementary.h> | ||
6 | |||
7 | #define BIN_DIR "/usr/bin" | ||
8 | #define LIB_DIR "/usr/lib" | ||
9 | #define DATA_DIR "/usr/local/share/elementary" | ||
10 | |||
11 | #define WIDTH 300 | ||
12 | #define HEIGHT 300 | ||
13 | |||
14 | struct test_data | ||
15 | { | ||
16 | Evas_Object *btn; | ||
17 | Eina_Bool btn_enabled; | ||
18 | Eina_Bool btn_gets_focus; | ||
19 | }; | ||
20 | |||
21 | struct test_data d = {NULL, EINA_TRUE, EINA_TRUE}; | ||
22 | |||
23 | static void | ||
24 | _btn_enabled_cb(void *data, | ||
25 | Evas_Object *obj, | ||
26 | void *event) | ||
27 | { | ||
28 | elm_object_disabled_set(d.btn, !d.btn_enabled); | ||
29 | } | ||
30 | |||
31 | static void | ||
32 | /* focus callback */ | ||
33 | _btn_focus_cb(void *data, | ||
34 | Evas_Object *obj, | ||
35 | void *event) | ||
36 | { | ||
37 | elm_object_focus_set(d.btn, EINA_TRUE); | ||
38 | } | ||
39 | |||
40 | static void | ||
41 | /* unfocus callback */ | ||
42 | _btn_unfocus_cb(void *data, | ||
43 | Evas_Object *obj, | ||
44 | void *event) | ||
45 | { | ||
46 | elm_object_focus_set(d.btn, EINA_FALSE); | ||
47 | } | ||
48 | |||
49 | static void | ||
50 | /* focus allow callback */ | ||
51 | _btn_focus_allow_cb(void *data, | ||
52 | Evas_Object *obj, | ||
53 | void *event) | ||
54 | { | ||
55 | elm_object_focus_allow_set(d.btn, d.btn_gets_focus); | ||
56 | } | ||
57 | |||
58 | static void /* scaling callback */ | ||
59 | _btn_scale_cb(void *data, | ||
60 | Evas_Object *obj, | ||
61 | void *event) | ||
62 | { | ||
63 | elm_object_scale_set(d.btn, elm_slider_value_get(obj)); | ||
64 | } | ||
65 | |||
66 | EAPI_MAIN int | ||
67 | elm_main(int argc, | ||
68 | char **argv) | ||
69 | { | ||
70 | int h; | ||
71 | Evas_Object *win, *bg, *box, *frame, *check, *b, *slider; | ||
72 | |||
73 | /* tell elm about our app so it can figure out where to get files */ | ||
74 | elm_app_compile_bin_dir_set(BIN_DIR); | ||
75 | elm_app_compile_data_dir_set(DATA_DIR); | ||
76 | elm_app_compile_lib_dir_set(LIB_DIR); | ||
77 | elm_app_info_set(elm_main, "elementary", "images/logo.png"); | ||
78 | |||
79 | fprintf(stdout, "prefix was set to: %s\n", elm_app_prefix_dir_get()); | ||
80 | fprintf(stdout, "data directory is: %s\n", elm_app_data_dir_get()); | ||
81 | fprintf(stdout, "library directory is: %s\n", elm_app_lib_dir_get()); | ||
82 | fprintf(stdout, "locale directory is: %s\n", elm_app_locale_dir_get()); | ||
83 | |||
84 | win = elm_win_add(NULL, "top-level-funcs-example", ELM_WIN_BASIC); | ||
85 | elm_win_title_set(win, "Elementary Top-level Functions Example"); | ||
86 | |||
87 | /* by using this policy value, we avoid having to | ||
88 | * evas_object_smart_callback_add(win, "delete,request", _on_exit, NULL), | ||
89 | * calling elm_exit() on that callback ourselves. | ||
90 | */ | ||
91 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
92 | elm_win_autodel_set(win, EINA_TRUE); | ||
93 | |||
94 | bg = elm_bg_add(win); | ||
95 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
96 | elm_win_resize_object_add(win, bg); | ||
97 | evas_object_show(bg); | ||
98 | evas_object_size_hint_min_set(bg, 160, 160); | ||
99 | |||
100 | /* outer box */ | ||
101 | box = elm_box_add(win); | ||
102 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
103 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
104 | elm_win_resize_object_add(win, box); | ||
105 | evas_object_show(box); | ||
106 | |||
107 | frame = elm_frame_add(win); | ||
108 | elm_object_text_set(frame, "Button"); | ||
109 | evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
110 | evas_object_show(frame); | ||
111 | elm_box_pack_end(box, frame); | ||
112 | |||
113 | d.btn = elm_button_add(win); | ||
114 | elm_object_text_set(d.btn, "Click me"); | ||
115 | elm_object_content_set(frame, d.btn); | ||
116 | |||
117 | fprintf(stdout, "Elementary's finger size is set to %d pixels\n.", | ||
118 | elm_config_finger_size_get()); | ||
119 | elm_coords_finger_size_adjust(0, NULL, 3, &h); | ||
120 | /* so, button will be 3 fingers tall */ | ||
121 | evas_object_size_hint_min_set(d.btn, 0, h); | ||
122 | evas_object_show(d.btn); | ||
123 | |||
124 | b = elm_box_add(win); | ||
125 | elm_box_horizontal_set(b, EINA_FALSE); | ||
126 | evas_object_size_hint_weight_set(b, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
127 | evas_object_size_hint_align_set(b, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
128 | elm_win_resize_object_add(win, b); | ||
129 | elm_box_pack_end(box, b); | ||
130 | evas_object_show(b); | ||
131 | |||
132 | check = elm_check_add(win); | ||
133 | evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
134 | evas_object_size_hint_align_set(check, 0.0, 0.0); | ||
135 | elm_object_text_set(check, "Button enabled"); | ||
136 | elm_check_state_pointer_set(check, &d.btn_enabled); | ||
137 | evas_object_smart_callback_add(check, "changed", _btn_enabled_cb, NULL); | ||
138 | elm_box_pack_end(box, check); | ||
139 | evas_object_show(check); | ||
140 | |||
141 | b = elm_button_add(win); | ||
142 | evas_object_size_hint_weight_set(b, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
143 | evas_object_size_hint_align_set(b, 0.0, 0.0); | ||
144 | elm_object_text_set(b, "Focus top button"); | ||
145 | evas_object_smart_callback_add(b, "clicked", _btn_focus_cb, NULL); | ||
146 | elm_box_pack_end(box, b); | ||
147 | evas_object_show(b); | ||
148 | |||
149 | b = elm_button_add(win); | ||
150 | evas_object_size_hint_weight_set(b, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
151 | evas_object_size_hint_align_set(b, 0.0, 0.0); | ||
152 | elm_object_text_set(b, "Unfocus top button"); | ||
153 | evas_object_smart_callback_add(b, "clicked", _btn_unfocus_cb, NULL); | ||
154 | elm_box_pack_end(box, b); | ||
155 | evas_object_show(b); | ||
156 | |||
157 | check = elm_check_add(win); | ||
158 | evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
159 | evas_object_size_hint_align_set(check, 0.0, 0.0); | ||
160 | elm_object_text_set(check, "Button gets focus"); | ||
161 | elm_check_state_pointer_set(check, &d.btn_gets_focus); | ||
162 | evas_object_smart_callback_add(check, "changed", _btn_focus_allow_cb, NULL); | ||
163 | elm_box_pack_end(box, check); | ||
164 | evas_object_show(check); | ||
165 | |||
166 | slider = elm_slider_add(win); | ||
167 | elm_slider_min_max_set(slider, 0, 4); | ||
168 | elm_slider_unit_format_set(slider, "%1.1f"); | ||
169 | elm_slider_indicator_format_set(slider, "%1.1f"); | ||
170 | evas_object_size_hint_weight_set( | ||
171 | slider, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
172 | evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
173 | evas_object_smart_callback_add(slider, "changed", _btn_scale_cb, NULL); | ||
174 | elm_box_pack_end(box, slider); | ||
175 | evas_object_show(slider); | ||
176 | |||
177 | evas_object_resize(win, WIDTH, HEIGHT); | ||
178 | elm_win_focus_highlight_enabled_set(win, EINA_TRUE); | ||
179 | evas_object_show(win); | ||
180 | |||
181 | elm_run(); /* and run the program now, starting to handle all | ||
182 | * events, etc. */ | ||
183 | elm_shutdown(); /* clean up and shut down */ | ||
184 | |||
185 | /* exit code */ | ||
186 | return 0; | ||
187 | } | ||
188 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/gengrid_example.c b/libraries/elementary/src/examples/gengrid_example.c deleted file mode 100644 index e3b345d..0000000 --- a/libraries/elementary/src/examples/gengrid_example.c +++ /dev/null | |||
@@ -1,630 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>gengrid widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g gengrid_example.c -o gengrid_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | typedef struct _Example_Item | ||
15 | { | ||
16 | const char *path; | ||
17 | } Example_Item; | ||
18 | |||
19 | static const char *imgs[9] = | ||
20 | { | ||
21 | "panel_01.jpg", | ||
22 | "plant_01.jpg", | ||
23 | "rock_01.jpg", | ||
24 | "rock_02.jpg", | ||
25 | "sky_01.jpg", | ||
26 | "sky_02.jpg", | ||
27 | "sky_03.jpg", | ||
28 | "sky_04.jpg", | ||
29 | "wood_01.jpg", | ||
30 | }; | ||
31 | |||
32 | static Elm_Gengrid_Item_Class *gic = NULL; | ||
33 | static Evas_Object *before_bt, *after_bt; | ||
34 | |||
35 | static void | ||
36 | _on_done(void *data, | ||
37 | Evas_Object *obj, | ||
38 | void *event_info) | ||
39 | { | ||
40 | elm_exit(); | ||
41 | } | ||
42 | |||
43 | /* change layouting mode */ | ||
44 | static void | ||
45 | _horizontal_grid(void *data, | ||
46 | Evas_Object *obj, | ||
47 | void *event_info) | ||
48 | { | ||
49 | Evas_Object *grid = data; | ||
50 | |||
51 | elm_gengrid_horizontal_set(grid, elm_check_state_get(obj)); | ||
52 | } | ||
53 | |||
54 | /* "always select" callback */ | ||
55 | static void | ||
56 | _always_select_change(void *data, | ||
57 | Evas_Object *obj, | ||
58 | void *event_info) | ||
59 | { | ||
60 | Evas_Object *grid = data; | ||
61 | Eina_Bool always = elm_check_state_get(obj); | ||
62 | |||
63 | if (always) | ||
64 | elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_ALWAYS); | ||
65 | else | ||
66 | elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_DEFAULT); | ||
67 | |||
68 | fprintf(stdout, "\"Always select\" mode for gengrid items is now %s\n", | ||
69 | always ? "on" : "off"); | ||
70 | } | ||
71 | |||
72 | /* "bouncing mode" callback */ | ||
73 | static void | ||
74 | _bouncing_change(void *data, | ||
75 | Evas_Object *obj, | ||
76 | void *event_info) | ||
77 | { | ||
78 | Evas_Object *grid = data; | ||
79 | Eina_Bool bounce = elm_check_state_get(obj); | ||
80 | |||
81 | elm_gengrid_bounce_set(grid, bounce, bounce); | ||
82 | |||
83 | fprintf(stdout, "Bouncing effect for gengrid is now %s\n", | ||
84 | bounce ? "on" : "off"); | ||
85 | } | ||
86 | |||
87 | /* multi-selection callback */ | ||
88 | static void | ||
89 | _multi_change(void *data, | ||
90 | Evas_Object *obj, | ||
91 | void *event_info) | ||
92 | { | ||
93 | Evas_Object *grid = data; | ||
94 | Eina_Bool multi = elm_check_state_get(obj); | ||
95 | |||
96 | elm_gengrid_multi_select_set(grid, multi); | ||
97 | |||
98 | fprintf(stdout, "Multi-selection for gengrid is now %s\n", | ||
99 | multi ? "on" : "off"); | ||
100 | |||
101 | elm_object_disabled_set(before_bt, multi); | ||
102 | elm_object_disabled_set(after_bt, multi); | ||
103 | |||
104 | if (!multi) | ||
105 | { | ||
106 | Elm_Object_Item *gg_it; | ||
107 | const Eina_List *selected = elm_gengrid_selected_items_get(grid), *l; | ||
108 | EINA_LIST_FOREACH(selected, l, gg_it) | ||
109 | elm_gengrid_item_selected_set(gg_it, EINA_FALSE); | ||
110 | } | ||
111 | } | ||
112 | |||
113 | /* no selection callback */ | ||
114 | static void | ||
115 | _no_sel_change(void *data, | ||
116 | Evas_Object *obj, | ||
117 | void *event_info) | ||
118 | { | ||
119 | Evas_Object *grid = data; | ||
120 | Eina_Bool no_sel = elm_check_state_get(obj); | ||
121 | |||
122 | if (no_sel) | ||
123 | elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_NONE); | ||
124 | else | ||
125 | elm_gengrid_select_mode_set(grid, ELM_OBJECT_SELECT_MODE_DEFAULT); | ||
126 | |||
127 | fprintf(stdout, "Selection for gengrid items is now %s\n", | ||
128 | no_sel ? "disabled" : "enabled"); | ||
129 | } | ||
130 | |||
131 | /* item selection callback */ | ||
132 | static void | ||
133 | _grid_sel(void *data, | ||
134 | Evas_Object *obj, | ||
135 | void *event_info) | ||
136 | { | ||
137 | unsigned int x, y; | ||
138 | Example_Item *it = elm_object_item_data_get(event_info); | ||
139 | |||
140 | elm_gengrid_item_pos_get(event_info, &x, &y); | ||
141 | |||
142 | fprintf(stdout, "Item [%p], with data [%p], path %s, at position (%d, %d)," | ||
143 | " has been selected\n", event_info, data, it->path, x, y); | ||
144 | } | ||
145 | |||
146 | /* new item with random path */ | ||
147 | static Example_Item * | ||
148 | _item_new(void) | ||
149 | { | ||
150 | Example_Item *it; | ||
151 | |||
152 | it = malloc(sizeof(*it)); | ||
153 | it->path = eina_stringshare_add(imgs[rand() % (sizeof(imgs) / | ||
154 | sizeof(imgs[0]))]); | ||
155 | return it; | ||
156 | } | ||
157 | |||
158 | /* "insert before" callback */ | ||
159 | static void | ||
160 | _before_bt_clicked(void *data, | ||
161 | Evas_Object *obj, | ||
162 | void *event_info) | ||
163 | { | ||
164 | Example_Item *it; | ||
165 | Evas_Object *grid = data; | ||
166 | Elm_Object_Item *sel; | ||
167 | |||
168 | sel = elm_gengrid_selected_item_get(grid); | ||
169 | if (!sel) | ||
170 | return; | ||
171 | |||
172 | it = _item_new(); | ||
173 | elm_gengrid_item_insert_before(grid, gic, it, sel, _grid_sel, NULL); | ||
174 | } | ||
175 | |||
176 | /* "insert after" callback */ | ||
177 | static void | ||
178 | _after_bt_clicked(void *data, | ||
179 | Evas_Object *obj, | ||
180 | void *event_info) | ||
181 | { | ||
182 | Example_Item *it; | ||
183 | Evas_Object *grid = data; | ||
184 | Elm_Object_Item *sel; | ||
185 | |||
186 | sel = elm_gengrid_selected_item_get(grid); | ||
187 | if (!sel) | ||
188 | return; | ||
189 | |||
190 | it = _item_new(); | ||
191 | elm_gengrid_item_insert_after(grid, gic, it, sel, _grid_sel, NULL); | ||
192 | } | ||
193 | |||
194 | /* prepend an item */ | ||
195 | static void | ||
196 | _prepend_bt_clicked(void *data, | ||
197 | Evas_Object *obj, | ||
198 | void *event_info) | ||
199 | { | ||
200 | Example_Item *it; | ||
201 | Evas_Object *grid = data; | ||
202 | |||
203 | it = _item_new(); | ||
204 | elm_gengrid_item_prepend(grid, gic, it, _grid_sel, NULL); | ||
205 | } | ||
206 | |||
207 | /* append an item */ | ||
208 | static void | ||
209 | _append_bt_clicked(void *data, | ||
210 | Evas_Object *obj, | ||
211 | void *event_info) | ||
212 | { | ||
213 | Evas_Object *grid = data; | ||
214 | Example_Item *it = _item_new(); | ||
215 | |||
216 | elm_gengrid_item_append(grid, gic, it, _grid_sel, NULL); | ||
217 | } | ||
218 | |||
219 | /* delete items */ | ||
220 | static void | ||
221 | _clear_cb(void *data, | ||
222 | Evas_Object *obj, | ||
223 | void *event_info) | ||
224 | { | ||
225 | elm_gengrid_clear(data); | ||
226 | |||
227 | fprintf(stdout, "Clearing the grid!\n"); | ||
228 | } | ||
229 | |||
230 | /* bring in 1st item */ | ||
231 | static void | ||
232 | _bring_1st_clicked(void *data, | ||
233 | Evas_Object *obj, | ||
234 | void *event_info) | ||
235 | { | ||
236 | Elm_Object_Item *gg_it = elm_gengrid_first_item_get(data); | ||
237 | |||
238 | if (!gg_it) return; | ||
239 | |||
240 | elm_gengrid_item_bring_in(gg_it, ELM_GENGRID_ITEM_SCROLLTO_IN); | ||
241 | } | ||
242 | |||
243 | /* show last item */ | ||
244 | static void | ||
245 | _show_last_clicked(void *data, | ||
246 | Evas_Object *obj, | ||
247 | void *event_info) | ||
248 | { | ||
249 | Elm_Object_Item *gg_it = elm_gengrid_last_item_get(data); | ||
250 | |||
251 | if (!gg_it) return; | ||
252 | |||
253 | elm_gengrid_item_show(gg_it, ELM_GENGRID_ITEM_SCROLLTO_IN); | ||
254 | } | ||
255 | |||
256 | /* disable selected item */ | ||
257 | static void | ||
258 | _toggle_disabled_cb(void *data, | ||
259 | Evas_Object *obj, | ||
260 | void *event_info) | ||
261 | { | ||
262 | Elm_Object_Item *gg_it = elm_gengrid_selected_item_get(data); | ||
263 | |||
264 | if (!gg_it) return; | ||
265 | |||
266 | elm_gengrid_item_selected_set(gg_it, EINA_FALSE); | ||
267 | elm_object_item_disabled_set(gg_it, EINA_TRUE); | ||
268 | } | ||
269 | |||
270 | /* change items' size */ | ||
271 | static void | ||
272 | _size_changed(void *data, | ||
273 | Evas_Object *obj, | ||
274 | void *event_info) | ||
275 | { | ||
276 | Evas_Object *grid = data; | ||
277 | int size = elm_spinner_value_get(obj); | ||
278 | |||
279 | elm_gengrid_item_size_set(grid, size, size); | ||
280 | } | ||
281 | |||
282 | /* item double click callback */ | ||
283 | static void | ||
284 | _double_click(void *data, | ||
285 | Evas_Object *obj, | ||
286 | void *event_info) | ||
287 | { | ||
288 | fprintf(stdout, "Double click on item with handle %p\n", event_info); | ||
289 | } | ||
290 | |||
291 | /* item long press callback */ | ||
292 | static void | ||
293 | _long_pressed(void *data, | ||
294 | Evas_Object *obj, | ||
295 | void *event_info) | ||
296 | { | ||
297 | fprintf(stdout, "Long press on item with handle %p\n", event_info); | ||
298 | } | ||
299 | |||
300 | |||
301 | /* label fetching callback */ | ||
302 | static char * | ||
303 | _grid_label_get(void *data, | ||
304 | Evas_Object *obj, | ||
305 | const char *part) | ||
306 | { | ||
307 | const Example_Item *it = data; | ||
308 | char buf[256]; | ||
309 | |||
310 | snprintf(buf, sizeof(buf), "Photo %s", it->path); | ||
311 | return strdup(buf); | ||
312 | } | ||
313 | |||
314 | /* icon fetching callback */ | ||
315 | static Evas_Object * | ||
316 | _grid_content_get(void *data, | ||
317 | Evas_Object *obj, | ||
318 | const char *part) | ||
319 | { | ||
320 | const Example_Item *it = data; | ||
321 | |||
322 | if (!strcmp(part, "elm.swallow.icon")) | ||
323 | { | ||
324 | Evas_Object *icon = elm_bg_add(obj); | ||
325 | char buf[PATH_MAX]; | ||
326 | |||
327 | snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), | ||
328 | it->path); | ||
329 | |||
330 | elm_bg_file_set(icon, buf, NULL); | ||
331 | evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, | ||
332 | 1); | ||
333 | evas_object_show(icon); | ||
334 | return icon; | ||
335 | } | ||
336 | else if (!strcmp(part, "elm.swallow.end")) | ||
337 | { | ||
338 | Evas_Object *ck; | ||
339 | ck = elm_check_add(obj); | ||
340 | evas_object_propagate_events_set(ck, EINA_FALSE); | ||
341 | evas_object_show(ck); | ||
342 | return ck; | ||
343 | } | ||
344 | |||
345 | return NULL; | ||
346 | } | ||
347 | |||
348 | /* state fetching callback */ | ||
349 | static Eina_Bool | ||
350 | _grid_state_get(void *data, | ||
351 | Evas_Object *obj, | ||
352 | const char *part) | ||
353 | { | ||
354 | return EINA_FALSE; | ||
355 | } | ||
356 | |||
357 | /* deletion callback */ | ||
358 | static void | ||
359 | _grid_del(void *data, | ||
360 | Evas_Object *obj) | ||
361 | { | ||
362 | Example_Item *it = data; | ||
363 | |||
364 | eina_stringshare_del(it->path); | ||
365 | free(it); | ||
366 | } | ||
367 | |||
368 | /* scrolling animation stopped callback */ | ||
369 | static void | ||
370 | _grid_scroll_stopped_cb(void *data, | ||
371 | Evas_Object *obj, | ||
372 | void *event_info) | ||
373 | { | ||
374 | int h_pagenumber = 0, v_pagenumber = 0; | ||
375 | elm_gengrid_current_page_get(obj, &h_pagenumber, &v_pagenumber); | ||
376 | fprintf(stdout, "Grid current horiz page is %d, vert page is %d\n", | ||
377 | h_pagenumber, v_pagenumber); | ||
378 | } | ||
379 | |||
380 | /* items grid horizontal alignment change */ | ||
381 | static void | ||
382 | _h_align_change_cb(void *data, | ||
383 | Evas_Object *obj, | ||
384 | void *event_info) | ||
385 | { | ||
386 | double v_align; | ||
387 | double val = elm_slider_value_get(obj); | ||
388 | |||
389 | elm_gengrid_align_get(data, NULL, &v_align); | ||
390 | |||
391 | fprintf(stdout, "Setting horizontal alignment to %f\n", val); | ||
392 | elm_gengrid_align_set(data, val, v_align); | ||
393 | } | ||
394 | |||
395 | static void | ||
396 | _v_align_change_cb(void *data, | ||
397 | Evas_Object *obj, | ||
398 | void *event_info) | ||
399 | { | ||
400 | double h_align; | ||
401 | double val = elm_slider_value_get(obj); | ||
402 | |||
403 | elm_gengrid_align_get(data, &h_align, NULL); | ||
404 | |||
405 | fprintf(stdout, "Setting vertical alignment to %f\n", val); | ||
406 | elm_gengrid_align_set(data, h_align, val); | ||
407 | } | ||
408 | |||
409 | /* page relative size change */ | ||
410 | static void | ||
411 | _page_change_cb(void *data, | ||
412 | Evas_Object *obj, | ||
413 | void *event_info) | ||
414 | { | ||
415 | double val = elm_slider_value_get(obj); | ||
416 | |||
417 | elm_gengrid_page_relative_set(data, val, val); | ||
418 | |||
419 | fprintf(stdout, "Setting grid page's relative size to %f\n", val); | ||
420 | } | ||
421 | |||
422 | EAPI_MAIN int | ||
423 | elm_main(int argc, | ||
424 | char **argv) | ||
425 | { | ||
426 | Evas_Object *win, *bg, *grid, *bx, *hbx_1, *hbx_2, *hbx_3, *bt, *ck, *sl, | ||
427 | *sp; | ||
428 | Eina_Bool bounce; | ||
429 | double h, v; | ||
430 | |||
431 | srand(time(NULL)); | ||
432 | |||
433 | elm_app_info_set(elm_main, "elementary", "images"); | ||
434 | win = elm_win_add(NULL, "gengrid", ELM_WIN_BASIC); | ||
435 | elm_win_title_set(win, "Generic Grid Example"); | ||
436 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
437 | |||
438 | bg = elm_bg_add(win); | ||
439 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
440 | elm_win_resize_object_add(win, bg); | ||
441 | evas_object_show(bg); | ||
442 | |||
443 | bx = elm_box_add(win); | ||
444 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
445 | elm_win_resize_object_add(win, bx); | ||
446 | evas_object_show(bx); | ||
447 | |||
448 | grid = elm_gengrid_add(win); | ||
449 | elm_gengrid_item_size_set(grid, 150, 150); | ||
450 | evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
451 | evas_object_size_hint_min_set(grid, 600, 500); | ||
452 | elm_box_pack_end(bx, grid); | ||
453 | evas_object_smart_callback_add(grid, "clicked,double", _double_click, NULL); | ||
454 | evas_object_smart_callback_add(grid, "longpressed", _long_pressed, NULL); | ||
455 | evas_object_show(grid); | ||
456 | |||
457 | hbx_1 = elm_box_add(win); | ||
458 | evas_object_size_hint_weight_set(hbx_1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
459 | elm_box_horizontal_set(hbx_1, EINA_TRUE); | ||
460 | elm_box_pack_end(bx, hbx_1); | ||
461 | evas_object_show(hbx_1); | ||
462 | |||
463 | bt = elm_button_add(win); | ||
464 | elm_object_text_set(bt, "Append"); | ||
465 | evas_object_smart_callback_add(bt, "clicked", _append_bt_clicked, grid); | ||
466 | elm_box_pack_end(hbx_1, bt); | ||
467 | evas_object_show(bt); | ||
468 | |||
469 | bt = elm_button_add(win); | ||
470 | elm_object_text_set(bt, "Prepend"); | ||
471 | evas_object_smart_callback_add(bt, "clicked", _prepend_bt_clicked, grid); | ||
472 | elm_box_pack_end(hbx_1, bt); | ||
473 | evas_object_show(bt); | ||
474 | |||
475 | before_bt = elm_button_add(win); | ||
476 | elm_object_text_set(before_bt, "Insert before"); | ||
477 | evas_object_smart_callback_add(before_bt, "clicked", _before_bt_clicked, | ||
478 | grid); | ||
479 | elm_box_pack_end(hbx_1, before_bt); | ||
480 | evas_object_show(before_bt); | ||
481 | |||
482 | after_bt = elm_button_add(win); | ||
483 | elm_object_text_set(after_bt, "Insert after"); | ||
484 | evas_object_smart_callback_add(after_bt, "clicked", _after_bt_clicked, grid); | ||
485 | elm_box_pack_end(hbx_1, after_bt); | ||
486 | evas_object_show(after_bt); | ||
487 | |||
488 | bt = elm_button_add(win); | ||
489 | elm_object_text_set(bt, "Clear"); | ||
490 | evas_object_smart_callback_add(bt, "clicked", _clear_cb, grid); | ||
491 | elm_box_pack_end(hbx_1, bt); | ||
492 | evas_object_show(bt); | ||
493 | |||
494 | bt = elm_button_add(win); | ||
495 | elm_object_text_set(bt, "Bring in 1st"); | ||
496 | evas_object_smart_callback_add(bt, "clicked", _bring_1st_clicked, grid); | ||
497 | elm_box_pack_end(hbx_1, bt); | ||
498 | evas_object_show(bt); | ||
499 | |||
500 | bt = elm_button_add(win); | ||
501 | elm_object_text_set(bt, "Show last"); | ||
502 | evas_object_smart_callback_add(bt, "clicked", _show_last_clicked, grid); | ||
503 | elm_box_pack_end(hbx_1, bt); | ||
504 | evas_object_show(bt); | ||
505 | |||
506 | sp = elm_spinner_add(win); | ||
507 | elm_spinner_min_max_set(sp, 10, 1024); | ||
508 | elm_spinner_value_set(sp, 150); | ||
509 | elm_spinner_label_format_set(sp, "Item size: %.0f"); | ||
510 | evas_object_smart_callback_add(sp, "changed", _size_changed, grid); | ||
511 | evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
512 | elm_box_pack_end(hbx_1, sp); | ||
513 | evas_object_show(sp); | ||
514 | |||
515 | hbx_2 = elm_box_add(win); | ||
516 | evas_object_size_hint_weight_set(hbx_2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
517 | elm_box_horizontal_set(hbx_2, EINA_TRUE); | ||
518 | elm_box_pack_end(bx, hbx_2); | ||
519 | evas_object_show(hbx_2); | ||
520 | |||
521 | bt = elm_button_add(win); | ||
522 | elm_object_text_set(bt, "Disable item"); | ||
523 | evas_object_smart_callback_add(bt, "clicked", _toggle_disabled_cb, grid); | ||
524 | elm_box_pack_end(hbx_2, bt); | ||
525 | evas_object_show(bt); | ||
526 | |||
527 | ck = elm_check_add(win); | ||
528 | elm_object_text_set(ck, "Horizontal mode"); | ||
529 | evas_object_smart_callback_add(ck, "changed", _horizontal_grid, grid); | ||
530 | elm_box_pack_end(hbx_2, ck); | ||
531 | evas_object_show(ck); | ||
532 | |||
533 | ck = elm_check_add(win); | ||
534 | elm_object_text_set(ck, "Always select"); | ||
535 | evas_object_smart_callback_add(ck, "changed", _always_select_change, grid); | ||
536 | elm_box_pack_end(hbx_2, ck); | ||
537 | evas_object_show(ck); | ||
538 | |||
539 | ck = elm_check_add(win); | ||
540 | elm_gengrid_bounce_get(grid, &bounce, NULL); | ||
541 | elm_object_text_set(ck, "Bouncing"); | ||
542 | elm_check_state_set(ck, bounce); | ||
543 | evas_object_smart_callback_add(ck, "changed", _bouncing_change, grid); | ||
544 | elm_box_pack_end(hbx_2, ck); | ||
545 | evas_object_show(ck); | ||
546 | |||
547 | ck = elm_check_add(win); | ||
548 | elm_object_text_set(ck, "Multi-selection"); | ||
549 | elm_check_state_set(ck, elm_gengrid_multi_select_get(grid)); | ||
550 | evas_object_smart_callback_add(ck, "changed", _multi_change, grid); | ||
551 | elm_box_pack_end(hbx_2, ck); | ||
552 | evas_object_show(ck); | ||
553 | |||
554 | ck = elm_check_add(win); | ||
555 | elm_object_text_set(ck, "No selection"); | ||
556 | evas_object_smart_callback_add(ck, "changed", _no_sel_change, grid); | ||
557 | elm_box_pack_end(hbx_2, ck); | ||
558 | evas_object_show(ck); | ||
559 | |||
560 | hbx_3 = elm_box_add(win); | ||
561 | evas_object_size_hint_weight_set(hbx_3, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
562 | elm_box_horizontal_set(hbx_3, EINA_TRUE); | ||
563 | elm_box_pack_end(bx, hbx_3); | ||
564 | evas_object_show(hbx_3); | ||
565 | |||
566 | elm_gengrid_align_get(grid, &h, &v); | ||
567 | evas_object_smart_callback_add(grid, "scroll,anim,stop", _grid_scroll_stopped_cb, NULL); | ||
568 | |||
569 | sl = elm_slider_add(win); | ||
570 | elm_object_text_set(sl, "Horiz. alignment"); | ||
571 | elm_slider_span_size_set(sl, 100); | ||
572 | evas_object_size_hint_align_set(sl, 0.5, EVAS_HINT_FILL); | ||
573 | evas_object_size_hint_weight_set(sl, 0.0, EVAS_HINT_EXPAND); | ||
574 | elm_slider_indicator_format_set(sl, "%1.1f"); | ||
575 | elm_slider_value_set(sl, h); | ||
576 | elm_box_pack_end(hbx_3, sl); | ||
577 | evas_object_show(sl); | ||
578 | |||
579 | evas_object_smart_callback_add(sl, "changed", _h_align_change_cb, grid); | ||
580 | |||
581 | sl = elm_slider_add(win); | ||
582 | elm_object_text_set(sl, "Vert. alignment"); | ||
583 | elm_slider_span_size_set(sl, 100); | ||
584 | evas_object_size_hint_align_set(sl, 0.5, EVAS_HINT_FILL); | ||
585 | evas_object_size_hint_weight_set(sl, 0.0, EVAS_HINT_EXPAND); | ||
586 | elm_slider_indicator_format_set(sl, "%1.1f"); | ||
587 | elm_slider_value_set(sl, v); | ||
588 | elm_box_pack_end(hbx_3, sl); | ||
589 | evas_object_show(sl); | ||
590 | |||
591 | evas_object_smart_callback_add(sl, "changed", _v_align_change_cb, grid); | ||
592 | |||
593 | elm_gengrid_align_get(grid, &h, &v); | ||
594 | |||
595 | sl = elm_slider_add(win); | ||
596 | elm_object_text_set(sl, "Page rel. size"); | ||
597 | elm_slider_span_size_set(sl, 100); | ||
598 | evas_object_size_hint_align_set(sl, 0.5, EVAS_HINT_FILL); | ||
599 | evas_object_size_hint_weight_set(sl, 0.0, EVAS_HINT_EXPAND); | ||
600 | elm_slider_indicator_format_set(sl, "%1.1f"); | ||
601 | elm_slider_value_set(sl, h); | ||
602 | elm_box_pack_end(hbx_3, sl); | ||
603 | evas_object_show(sl); | ||
604 | |||
605 | _page_change_cb(grid, sl, NULL); | ||
606 | evas_object_smart_callback_add(sl, "changed", _page_change_cb, grid); | ||
607 | |||
608 | if (!gic) | ||
609 | { | ||
610 | gic = elm_gengrid_item_class_new(); | ||
611 | gic->item_style = "default"; | ||
612 | gic->func.text_get = _grid_label_get; | ||
613 | gic->func.content_get = _grid_content_get; | ||
614 | gic->func.state_get = _grid_state_get; | ||
615 | gic->func.del = _grid_del; | ||
616 | } // we only create the first time its needed. we dont unref/free | ||
617 | |||
618 | _append_bt_clicked(grid, NULL, NULL); | ||
619 | _append_bt_clicked(grid, NULL, NULL); | ||
620 | _append_bt_clicked(grid, NULL, NULL); | ||
621 | |||
622 | evas_object_resize(win, 600, 600); | ||
623 | evas_object_show(win); | ||
624 | |||
625 | elm_run(); | ||
626 | elm_shutdown(); | ||
627 | |||
628 | return 0; | ||
629 | } | ||
630 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/genlist_example_01.c b/libraries/elementary/src/examples/genlist_example_01.c deleted file mode 100644 index a03ace1..0000000 --- a/libraries/elementary/src/examples/genlist_example_01.c +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g genlist_example_01.c -o genlist_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | #define N_ITEMS 30 | ||
7 | |||
8 | static Elm_Genlist_Item_Class *_itc = NULL; | ||
9 | |||
10 | static char * | ||
11 | _item_label_get(void *data, Evas_Object *obj, const char *part) | ||
12 | { | ||
13 | char buf[256]; | ||
14 | snprintf(buf, sizeof(buf), "Item # %i", (int)(long)data); | ||
15 | return strdup(buf); | ||
16 | } | ||
17 | |||
18 | static Evas_Object * | ||
19 | _item_content_get(void *data, Evas_Object *obj, const char *part) | ||
20 | { | ||
21 | Evas_Object *ic = elm_icon_add(obj); | ||
22 | |||
23 | if (!strcmp(part, "elm.swallow.icon")) | ||
24 | elm_icon_standard_set(ic, "clock"); | ||
25 | |||
26 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
27 | return ic; | ||
28 | } | ||
29 | |||
30 | static void | ||
31 | _item_sel_cb(void *data, Evas_Object *obj, void *event_info) | ||
32 | { | ||
33 | printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n", | ||
34 | data, obj, event_info); | ||
35 | } | ||
36 | |||
37 | EAPI_MAIN int | ||
38 | elm_main(int argc, char **argv) | ||
39 | { | ||
40 | Evas_Object *win, *bg; | ||
41 | Evas_Object *list; | ||
42 | int i; | ||
43 | |||
44 | win = elm_win_add(NULL, "icon", ELM_WIN_BASIC); | ||
45 | elm_win_title_set(win, "Icon"); | ||
46 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
47 | elm_win_autodel_set(win, EINA_TRUE); | ||
48 | |||
49 | bg = elm_bg_add(win); | ||
50 | elm_bg_color_set(bg, 255,255 ,255); | ||
51 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
52 | elm_win_resize_object_add(win, bg); | ||
53 | evas_object_show(bg); | ||
54 | |||
55 | if (!_itc) | ||
56 | { | ||
57 | _itc = elm_genlist_item_class_new(); | ||
58 | _itc->item_style = "default"; | ||
59 | _itc->func.text_get = _item_label_get; | ||
60 | _itc->func.content_get = _item_content_get; | ||
61 | _itc->func.state_get = NULL; | ||
62 | _itc->func.del = NULL; | ||
63 | } | ||
64 | |||
65 | list = elm_genlist_add(win); | ||
66 | |||
67 | for (i = 0; i < N_ITEMS; i++) | ||
68 | { | ||
69 | elm_genlist_item_append(list, _itc, | ||
70 | (void *)(long)i, NULL, | ||
71 | ELM_GENLIST_ITEM_NONE, | ||
72 | _item_sel_cb, NULL); | ||
73 | } | ||
74 | |||
75 | evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
76 | elm_win_resize_object_add(win, list); | ||
77 | evas_object_show(list); | ||
78 | |||
79 | evas_object_size_hint_min_set(bg, 160, 160); | ||
80 | evas_object_size_hint_max_set(bg, 640, 640); | ||
81 | evas_object_resize(win, 320, 320); | ||
82 | evas_object_show(win); | ||
83 | |||
84 | elm_run(); | ||
85 | elm_shutdown(); | ||
86 | |||
87 | return 0; | ||
88 | } | ||
89 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/genlist_example_02.c b/libraries/elementary/src/examples/genlist_example_02.c deleted file mode 100644 index a773ff2..0000000 --- a/libraries/elementary/src/examples/genlist_example_02.c +++ /dev/null | |||
@@ -1,203 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g genlist_example_02.c -o genlist_example_02 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | #include <time.h> | ||
6 | |||
7 | #define N_ITEMS 300 | ||
8 | |||
9 | static Elm_Genlist_Item_Class *_itc = NULL; | ||
10 | |||
11 | static char * | ||
12 | _item_label_get(void *data, Evas_Object *obj, const char *part) | ||
13 | { | ||
14 | time_t t = (time_t)ecore_time_unix_get(); | ||
15 | char buf[256]; | ||
16 | int i = (int)(long)data; | ||
17 | if (i % 2) | ||
18 | { | ||
19 | int n; | ||
20 | snprintf(buf, sizeof(buf), "Very Long Item # %i - realized at %s", i, ctime(&t)); | ||
21 | n = strlen(buf); | ||
22 | buf[n - 1] = '\0'; | ||
23 | } | ||
24 | else | ||
25 | snprintf(buf, sizeof(buf), "short item # %i", i); | ||
26 | return strdup(buf); | ||
27 | } | ||
28 | |||
29 | static Evas_Object * | ||
30 | _item_content_get(void *data, Evas_Object *obj, const char *part) | ||
31 | { | ||
32 | Evas_Object *ic = elm_icon_add(obj); | ||
33 | |||
34 | if (!strcmp(part, "elm.swallow.icon")) | ||
35 | elm_icon_standard_set(ic, "clock"); | ||
36 | |||
37 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
38 | return ic; | ||
39 | } | ||
40 | |||
41 | static void | ||
42 | _item_sel_cb(void *data, Evas_Object *obj, void *event_info) | ||
43 | { | ||
44 | printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n", | ||
45 | data, obj, event_info); | ||
46 | } | ||
47 | |||
48 | static void | ||
49 | _show_status_cb(void *data, Evas_Object *o, void *event_info) | ||
50 | { | ||
51 | Evas_Object *list = data; | ||
52 | Evas_Coord x, y, w, h, mx, my; | ||
53 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
54 | |||
55 | const Eina_List *selected, *l, *realized; | ||
56 | printf("\nfirst selected item: %p\n", glit); | ||
57 | |||
58 | selected = elm_genlist_selected_items_get(list); | ||
59 | printf("all selected items (%d): ", eina_list_count(selected)); | ||
60 | EINA_LIST_FOREACH(selected, l, glit) | ||
61 | printf("%p ", glit); | ||
62 | printf("\n"); | ||
63 | |||
64 | realized = elm_genlist_realized_items_get(list); | ||
65 | printf("realized items (%d): ", eina_list_count(realized)); | ||
66 | EINA_LIST_FOREACH(realized, l, glit) | ||
67 | printf("%p ", glit); | ||
68 | printf("\n"); | ||
69 | printf("genlist mode: %d\n", elm_genlist_decorate_mode_get(list)); | ||
70 | printf("mode item: %p\n", elm_genlist_decorated_item_get(list)); | ||
71 | |||
72 | evas_object_geometry_get(list, &x, &y, &w, &h); | ||
73 | mx = w / 2 + x; | ||
74 | my = h / 2 + y; | ||
75 | glit = elm_genlist_at_xy_item_get(list, mx, my, NULL); | ||
76 | printf("item in the middle of the screen: %p\n", glit); | ||
77 | } | ||
78 | |||
79 | static void | ||
80 | _realize_cb(void *data, Evas_Object *o, void *event_info) | ||
81 | { | ||
82 | Evas_Object *list = data; | ||
83 | elm_genlist_realized_items_update(list); | ||
84 | } | ||
85 | |||
86 | EAPI_MAIN int | ||
87 | elm_main(int argc, char **argv) | ||
88 | { | ||
89 | Evas_Object *win, *bg, *box, *hbox; | ||
90 | Evas_Object *list, *btn; | ||
91 | int i; | ||
92 | |||
93 | win = elm_win_add(NULL, "genlist", ELM_WIN_BASIC); | ||
94 | elm_win_title_set(win, "Genlist - simple"); | ||
95 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
96 | elm_win_autodel_set(win, EINA_TRUE); | ||
97 | |||
98 | bg = elm_bg_add(win); | ||
99 | elm_bg_color_set(bg, 255,255 ,255); | ||
100 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
101 | elm_win_resize_object_add(win, bg); | ||
102 | evas_object_show(bg); | ||
103 | |||
104 | box = elm_box_add(win); | ||
105 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
106 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
107 | elm_win_resize_object_add(win, box); | ||
108 | evas_object_show(box); | ||
109 | |||
110 | list = elm_genlist_add(win); | ||
111 | |||
112 | if (!_itc) | ||
113 | { | ||
114 | _itc = elm_genlist_item_class_new(); | ||
115 | _itc->item_style = "default"; | ||
116 | _itc->func.text_get = _item_label_get; | ||
117 | _itc->func.content_get = _item_content_get; | ||
118 | _itc->func.state_get = NULL; | ||
119 | _itc->func.del = NULL; | ||
120 | } | ||
121 | |||
122 | Eina_Bool hbounce, vbounce, always, no_sel; | ||
123 | Elm_Scroller_Policy hp, vp; | ||
124 | Elm_Object_Select_Mode sel_mode; | ||
125 | |||
126 | always = no_sel = EINA_FALSE; | ||
127 | sel_mode = elm_genlist_select_mode_get(list); | ||
128 | if (sel_mode == ELM_OBJECT_SELECT_MODE_ALWAYS) | ||
129 | always = EINA_TRUE; | ||
130 | else if (sel_mode == ELM_OBJECT_SELECT_MODE_NONE) | ||
131 | no_sel = EINA_TRUE; | ||
132 | |||
133 | printf("default values:\n"); | ||
134 | printf("always select: %d\n", always); | ||
135 | elm_genlist_bounce_get(list, &hbounce, &vbounce); | ||
136 | printf("bounce - horizontal: %d, vertical: %d\n", hbounce, vbounce); | ||
137 | printf("homogeneous: %d\n", elm_genlist_homogeneous_get(list)); | ||
138 | printf("horizontal mode: %d\n", elm_genlist_mode_get(list)); | ||
139 | printf("longpress timeout: %0.3f\n", | ||
140 | elm_genlist_longpress_timeout_get(list)); | ||
141 | printf("multi selection: %d\n", elm_genlist_multi_select_get(list)); | ||
142 | printf("no selection mode: %d\n", no_sel); | ||
143 | elm_genlist_scroller_policy_get(list, &hp, &vp); | ||
144 | printf("scroller policy - horizontal: %d, vertical: %d\n", hp, vp); | ||
145 | printf("block count: %d\n", elm_genlist_block_count_get(list)); | ||
146 | printf("\n"); | ||
147 | |||
148 | elm_genlist_bounce_set(list, EINA_FALSE, EINA_FALSE); | ||
149 | elm_genlist_homogeneous_set(list, EINA_FALSE); | ||
150 | elm_genlist_mode_set(list, ELM_LIST_LIMIT); | ||
151 | elm_genlist_multi_select_set(list, EINA_TRUE); | ||
152 | elm_genlist_select_mode_set(list, ELM_OBJECT_SELECT_MODE_DEFAULT); | ||
153 | elm_genlist_scroller_policy_set(list, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_ON); | ||
154 | elm_genlist_longpress_timeout_set(list, 0.5); | ||
155 | elm_genlist_block_count_set(list, 16); | ||
156 | |||
157 | for (i = 0; i < N_ITEMS; i++) | ||
158 | { | ||
159 | elm_genlist_item_append(list, _itc, | ||
160 | (void *)(long)i, NULL, | ||
161 | ELM_GENLIST_ITEM_NONE, | ||
162 | _item_sel_cb, NULL); | ||
163 | } | ||
164 | |||
165 | evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
166 | evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
167 | elm_box_pack_end(box, list); | ||
168 | evas_object_show(list); | ||
169 | |||
170 | hbox = elm_box_add(win); | ||
171 | elm_box_horizontal_set(hbox, EINA_TRUE); | ||
172 | evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, 0); | ||
173 | evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
174 | elm_box_pack_end(box, hbox); | ||
175 | evas_object_show(hbox); | ||
176 | |||
177 | btn = elm_button_add(win); | ||
178 | elm_object_text_set(btn, "Show status"); | ||
179 | evas_object_size_hint_weight_set(btn, 0, 0); | ||
180 | evas_object_size_hint_align_set(btn, 0.5, 0.5); | ||
181 | evas_object_smart_callback_add(btn, "clicked", _show_status_cb, list); | ||
182 | elm_box_pack_end(hbox, btn); | ||
183 | evas_object_show(btn); | ||
184 | |||
185 | btn = elm_button_add(win); | ||
186 | elm_object_text_set(btn, "Realize"); | ||
187 | evas_object_size_hint_weight_set(btn, 0, 0); | ||
188 | evas_object_size_hint_align_set(btn, 0.5, 0.5); | ||
189 | evas_object_smart_callback_add(btn, "clicked", _realize_cb, list); | ||
190 | elm_box_pack_end(hbox, btn); | ||
191 | evas_object_show(btn); | ||
192 | |||
193 | evas_object_size_hint_min_set(bg, 160, 160); | ||
194 | evas_object_size_hint_max_set(bg, 200, 640); | ||
195 | evas_object_resize(win, 200, 320); | ||
196 | evas_object_show(win); | ||
197 | |||
198 | elm_run(); | ||
199 | elm_shutdown(); | ||
200 | |||
201 | return 0; | ||
202 | } | ||
203 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/genlist_example_03.c b/libraries/elementary/src/examples/genlist_example_03.c deleted file mode 100644 index 6264266..0000000 --- a/libraries/elementary/src/examples/genlist_example_03.c +++ /dev/null | |||
@@ -1,131 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g genlist_example_03.c -o genlist_example_03 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | #define N_ITEMS 30 | ||
7 | |||
8 | static Elm_Genlist_Item_Class *_itc = NULL; | ||
9 | |||
10 | static char * | ||
11 | _item_label_get(void *data, Evas_Object *obj, const char *part) | ||
12 | { | ||
13 | time_t t = (time_t)ecore_time_unix_get(); | ||
14 | char buf[256]; | ||
15 | int i = (int)(long)data; | ||
16 | |||
17 | if (!strcmp(part, "elm.text")) | ||
18 | snprintf(buf, sizeof(buf), "Item # %i", i); | ||
19 | else | ||
20 | { | ||
21 | int n; | ||
22 | snprintf(buf, sizeof(buf), "created at %s", ctime(&t)); | ||
23 | n = strlen(buf); | ||
24 | buf[n - 1] = '\0'; | ||
25 | } | ||
26 | |||
27 | return strdup(buf); | ||
28 | } | ||
29 | |||
30 | static Evas_Object * | ||
31 | _item_content_get(void *data, Evas_Object *obj, const char *part) | ||
32 | { | ||
33 | Evas_Object *ic = elm_icon_add(obj); | ||
34 | |||
35 | if (!strcmp(part, "elm.swallow.icon")) | ||
36 | elm_icon_standard_set(ic, "clock"); | ||
37 | |||
38 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
39 | return ic; | ||
40 | } | ||
41 | |||
42 | static void | ||
43 | _item_sel_cb(void *data, Evas_Object *obj, void *event_info) | ||
44 | { | ||
45 | printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n", | ||
46 | data, obj, event_info); | ||
47 | } | ||
48 | |||
49 | static Evas_Object * | ||
50 | _genlist_add(Evas_Object *box) | ||
51 | { | ||
52 | Evas_Object *list = elm_genlist_add(elm_object_parent_widget_get(box)); | ||
53 | evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
54 | evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
55 | evas_object_size_hint_min_set(list, 200, 160); | ||
56 | elm_box_pack_end(box, list); | ||
57 | evas_object_show(list); | ||
58 | |||
59 | return list; | ||
60 | } | ||
61 | |||
62 | static void | ||
63 | _genlist_fill(Evas_Object *list) | ||
64 | { | ||
65 | int i; | ||
66 | |||
67 | for (i = 0; i < N_ITEMS; i++) | ||
68 | { | ||
69 | elm_genlist_item_append(list, _itc, | ||
70 | (void *)(long)i, NULL, | ||
71 | ELM_GENLIST_ITEM_NONE, | ||
72 | _item_sel_cb, NULL); | ||
73 | } | ||
74 | } | ||
75 | |||
76 | EAPI_MAIN int | ||
77 | elm_main(int argc, char **argv) | ||
78 | { | ||
79 | Evas_Object *win, *bg, *box; | ||
80 | Evas_Object *list; | ||
81 | |||
82 | win = elm_win_add(NULL, "icon", ELM_WIN_BASIC); | ||
83 | elm_win_title_set(win, "Icon"); | ||
84 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
85 | elm_win_autodel_set(win, EINA_TRUE); | ||
86 | |||
87 | bg = elm_bg_add(win); | ||
88 | elm_bg_color_set(bg, 255,255 ,255); | ||
89 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
90 | elm_win_resize_object_add(win, bg); | ||
91 | evas_object_show(bg); | ||
92 | |||
93 | box = elm_box_add(win); | ||
94 | elm_box_horizontal_set(box, EINA_TRUE); | ||
95 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
96 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
97 | elm_win_resize_object_add(win, box); | ||
98 | evas_object_show(box); | ||
99 | |||
100 | if (!_itc) | ||
101 | { | ||
102 | _itc = elm_genlist_item_class_new(); | ||
103 | _itc->item_style = "double_label"; | ||
104 | _itc->func.text_get = _item_label_get; | ||
105 | _itc->func.content_get = _item_content_get; | ||
106 | _itc->func.state_get = NULL; | ||
107 | _itc->func.del = NULL; | ||
108 | } | ||
109 | |||
110 | list = _genlist_add(box); | ||
111 | _genlist_fill(list); | ||
112 | |||
113 | list = _genlist_add(box); | ||
114 | elm_genlist_mode_set(list, ELM_LIST_LIMIT); | ||
115 | _genlist_fill(list); | ||
116 | |||
117 | list = _genlist_add(box); | ||
118 | elm_genlist_mode_set(list, ELM_LIST_COMPRESS); | ||
119 | _genlist_fill(list); | ||
120 | |||
121 | evas_object_size_hint_min_set(bg, 800, 160); | ||
122 | evas_object_size_hint_max_set(bg, 800, 640); | ||
123 | evas_object_resize(win, 800, 320); | ||
124 | evas_object_show(win); | ||
125 | |||
126 | elm_run(); | ||
127 | elm_shutdown(); | ||
128 | |||
129 | return 0; | ||
130 | } | ||
131 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/genlist_example_04.c b/libraries/elementary/src/examples/genlist_example_04.c deleted file mode 100644 index 3e2d62c..0000000 --- a/libraries/elementary/src/examples/genlist_example_04.c +++ /dev/null | |||
@@ -1,364 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g genlist_example_04.c -o genlist_example_04 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | #define N_ITEMS 300 | ||
7 | |||
8 | static Elm_Genlist_Item_Class *_itc = NULL; | ||
9 | static Elm_Genlist_Item_Class *_itc_group = NULL; | ||
10 | static int nitems = 0; | ||
11 | |||
12 | static char * | ||
13 | _item_label_get(void *data, Evas_Object *obj, const char *part) | ||
14 | { | ||
15 | time_t t = (time_t)ecore_time_unix_get(); | ||
16 | char buf[256]; | ||
17 | int i = (int)(long)data; | ||
18 | |||
19 | if (!strcmp(part, "elm.text")) | ||
20 | snprintf(buf, sizeof(buf), "Item # %i", i); | ||
21 | else | ||
22 | { | ||
23 | int n; | ||
24 | snprintf(buf, sizeof(buf), "realized at %s", ctime(&t)); | ||
25 | n = strlen(buf); | ||
26 | buf[n - 1] = '\0'; | ||
27 | } | ||
28 | |||
29 | return strdup(buf); | ||
30 | } | ||
31 | |||
32 | static Evas_Object * | ||
33 | _item_content_get(void *data, Evas_Object *obj, const char *part) | ||
34 | { | ||
35 | Evas_Object *ic = elm_icon_add(obj); | ||
36 | |||
37 | if (!strcmp(part, "elm.swallow.icon")) | ||
38 | elm_icon_standard_set(ic, "clock"); | ||
39 | |||
40 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
41 | return ic; | ||
42 | } | ||
43 | |||
44 | static void | ||
45 | _item_sel_cb(void *data, Evas_Object *obj, void *event_info) | ||
46 | { | ||
47 | printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n", | ||
48 | data, obj, event_info); | ||
49 | } | ||
50 | |||
51 | static char * | ||
52 | _group_label_get(void *data, Evas_Object *obj, const char *part) | ||
53 | { | ||
54 | char buf[256]; | ||
55 | int i = (int)(long)data; | ||
56 | |||
57 | snprintf(buf, sizeof(buf), "Group %d (item #%d)", i / 7, i); | ||
58 | |||
59 | return strdup(buf); | ||
60 | } | ||
61 | |||
62 | static Evas_Object * | ||
63 | _group_content_get(void *data, Evas_Object *obj, const char *part) | ||
64 | { | ||
65 | Evas_Object *ic = elm_icon_add(obj); | ||
66 | |||
67 | if (!strcmp(part, "elm.swallow.icon")) | ||
68 | elm_icon_standard_set(ic, "home"); | ||
69 | |||
70 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
71 | return ic; | ||
72 | } | ||
73 | |||
74 | static void | ||
75 | _append_cb(void *data, Evas_Object *o, void *event_info) | ||
76 | { | ||
77 | Evas_Object *list = data; | ||
78 | |||
79 | elm_genlist_item_append(list, _itc, | ||
80 | (void *)(long)nitems++, NULL, | ||
81 | ELM_GENLIST_ITEM_NONE, | ||
82 | _item_sel_cb, NULL); | ||
83 | |||
84 | } | ||
85 | |||
86 | static void | ||
87 | _prepend_cb(void *data, Evas_Object *o, void *event_info) | ||
88 | { | ||
89 | Evas_Object *list = data; | ||
90 | |||
91 | elm_genlist_item_prepend(list, _itc, | ||
92 | (void *)(long)nitems++, NULL, | ||
93 | ELM_GENLIST_ITEM_NONE, | ||
94 | _item_sel_cb, NULL); | ||
95 | |||
96 | } | ||
97 | |||
98 | static void | ||
99 | _insert_before_cb(void *data, Evas_Object *o, void *event_info) | ||
100 | { | ||
101 | Evas_Object *list = data; | ||
102 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
103 | |||
104 | if (!glit) return; | ||
105 | |||
106 | elm_genlist_item_insert_before(list, _itc, | ||
107 | (void *)(long)nitems++, NULL, | ||
108 | glit, ELM_GENLIST_ITEM_NONE, | ||
109 | _item_sel_cb, NULL); | ||
110 | |||
111 | } | ||
112 | |||
113 | static void | ||
114 | _insert_after_cb(void *data, Evas_Object *o, void *event_info) | ||
115 | { | ||
116 | Evas_Object *list = data; | ||
117 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
118 | |||
119 | if (!glit) return; | ||
120 | |||
121 | elm_genlist_item_insert_after(list, _itc, | ||
122 | (void *)(long)nitems++, NULL, | ||
123 | glit, ELM_GENLIST_ITEM_NONE, | ||
124 | _item_sel_cb, NULL); | ||
125 | |||
126 | } | ||
127 | |||
128 | static void | ||
129 | _next_cb(void *data, Evas_Object *o, void *event_info) | ||
130 | { | ||
131 | Evas_Object *list = data; | ||
132 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
133 | |||
134 | if (glit) glit = elm_genlist_item_next_get(glit); | ||
135 | if (!glit) glit = elm_genlist_first_item_get(list); | ||
136 | |||
137 | elm_genlist_item_selected_set(glit, EINA_TRUE); | ||
138 | elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_IN); | ||
139 | } | ||
140 | |||
141 | static void | ||
142 | _prev_cb(void *data, Evas_Object *o, void *event_info) | ||
143 | { | ||
144 | Evas_Object *list = data; | ||
145 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
146 | |||
147 | if (glit) glit = elm_genlist_item_prev_get(glit); | ||
148 | if (!glit) glit = elm_genlist_last_item_get(list); | ||
149 | |||
150 | elm_genlist_item_selected_set(glit, EINA_TRUE); | ||
151 | elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_IN); | ||
152 | } | ||
153 | |||
154 | static void | ||
155 | _bring_in_cb(void *data, Evas_Object *o, void *event_info) | ||
156 | { | ||
157 | Elm_Object_Item *glit = data; | ||
158 | if (!glit) return; | ||
159 | |||
160 | elm_genlist_item_bring_in(glit, ELM_GENLIST_ITEM_SCROLLTO_IN); | ||
161 | } | ||
162 | |||
163 | static void | ||
164 | _show_cb(void *data, Evas_Object *o, void *event_info) | ||
165 | { | ||
166 | Elm_Object_Item *glit = data; | ||
167 | if (!glit) return; | ||
168 | |||
169 | elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_IN); | ||
170 | } | ||
171 | |||
172 | static void | ||
173 | _middle_in_cb(void *data, Evas_Object *o, void *event_info) | ||
174 | { | ||
175 | Elm_Object_Item *glit = data; | ||
176 | if (!glit) return; | ||
177 | |||
178 | elm_genlist_item_bring_in(glit, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); | ||
179 | } | ||
180 | |||
181 | static void | ||
182 | _middle_show_cb(void *data, Evas_Object *o, void *event_info) | ||
183 | { | ||
184 | Elm_Object_Item *glit = data; | ||
185 | if (!glit) return; | ||
186 | |||
187 | elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); | ||
188 | } | ||
189 | |||
190 | static void | ||
191 | _top_in_cb(void *data, Evas_Object *o, void *event_info) | ||
192 | { | ||
193 | Elm_Object_Item *glit = data; | ||
194 | if (!glit) return; | ||
195 | |||
196 | elm_genlist_item_bring_in(glit, ELM_GENLIST_ITEM_SCROLLTO_TOP); | ||
197 | } | ||
198 | |||
199 | static void | ||
200 | _top_show_cb(void *data, Evas_Object *o, void *event_info) | ||
201 | { | ||
202 | Elm_Object_Item *glit = data; | ||
203 | if (!glit) return; | ||
204 | |||
205 | elm_genlist_item_show(glit, ELM_GENLIST_ITEM_SCROLLTO_TOP); | ||
206 | } | ||
207 | |||
208 | static void | ||
209 | _realize_cb(void *data, Evas_Object *o, void *event_info) | ||
210 | { | ||
211 | Evas_Object *list = data; | ||
212 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
213 | if (!glit) return; | ||
214 | |||
215 | elm_genlist_item_update(glit); | ||
216 | } | ||
217 | |||
218 | static Evas_Object * | ||
219 | _button_add(Evas_Object *list, Evas_Object *box, const char *label, Evas_Smart_Cb cb) | ||
220 | { | ||
221 | Evas_Object *bt; | ||
222 | |||
223 | bt = elm_button_add(elm_object_parent_widget_get(list)); | ||
224 | elm_object_text_set(bt, label); | ||
225 | elm_box_pack_end(box, bt); | ||
226 | evas_object_show(bt); | ||
227 | |||
228 | if (cb) | ||
229 | evas_object_smart_callback_add(bt, "clicked", cb, list); | ||
230 | |||
231 | return bt; | ||
232 | } | ||
233 | |||
234 | EAPI_MAIN int | ||
235 | elm_main(int argc, char **argv) | ||
236 | { | ||
237 | Evas_Object *win, *bg, *box, *fbox; | ||
238 | Evas_Object *list; | ||
239 | Evas_Object *bt_bring_in, *bt_show; | ||
240 | Evas_Object *bt_middle_in, *bt_middle_show; | ||
241 | Evas_Object *bt_top_in, *bt_top_show; | ||
242 | int i; | ||
243 | |||
244 | win = elm_win_add(NULL, "icon", ELM_WIN_BASIC); | ||
245 | elm_win_title_set(win, "Icon"); | ||
246 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
247 | elm_win_autodel_set(win, EINA_TRUE); | ||
248 | |||
249 | bg = elm_bg_add(win); | ||
250 | elm_bg_color_set(bg, 255,255 ,255); | ||
251 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
252 | elm_win_resize_object_add(win, bg); | ||
253 | evas_object_show(bg); | ||
254 | |||
255 | box = elm_box_add(win); | ||
256 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
257 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
258 | elm_win_resize_object_add(win, box); | ||
259 | evas_object_show(box); | ||
260 | |||
261 | if (!_itc) | ||
262 | { | ||
263 | _itc = elm_genlist_item_class_new(); | ||
264 | _itc->item_style = "default"; | ||
265 | _itc->func.text_get = _item_label_get; | ||
266 | _itc->func.content_get = _item_content_get; | ||
267 | _itc->func.state_get = NULL; | ||
268 | _itc->func.del = NULL; | ||
269 | } | ||
270 | |||
271 | if (!_itc_group) | ||
272 | { | ||
273 | _itc_group = elm_genlist_item_class_new(); | ||
274 | _itc_group->item_style = "group_index"; | ||
275 | _itc_group->func.text_get = _group_label_get; | ||
276 | _itc_group->func.content_get = _group_content_get; | ||
277 | _itc_group->func.state_get = NULL; | ||
278 | _itc_group->func.del = NULL; | ||
279 | } | ||
280 | list = elm_genlist_add(win); | ||
281 | |||
282 | evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
283 | evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
284 | elm_box_pack_end(box, list); | ||
285 | evas_object_show(list); | ||
286 | |||
287 | fbox = elm_box_add(win); | ||
288 | elm_box_layout_set(fbox, evas_object_box_layout_flow_horizontal, | ||
289 | NULL, NULL); | ||
290 | evas_object_size_hint_weight_set(fbox, EVAS_HINT_EXPAND, 0); | ||
291 | evas_object_size_hint_align_set(fbox, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
292 | elm_box_pack_end(box, fbox); | ||
293 | evas_object_show(fbox); | ||
294 | |||
295 | _button_add(list, fbox, "prepend", _prepend_cb); | ||
296 | _button_add(list, fbox, "append", _append_cb); | ||
297 | _button_add(list, fbox, "insert before", _insert_before_cb); | ||
298 | _button_add(list, fbox, "insert after", _insert_after_cb); | ||
299 | _button_add(list, fbox, "prev", _prev_cb); | ||
300 | _button_add(list, fbox, "next", _next_cb); | ||
301 | _button_add(list, fbox, "realize", _realize_cb); | ||
302 | bt_bring_in = _button_add(list, fbox, "bring #50", NULL); | ||
303 | bt_show = _button_add(list, fbox, "show #50", NULL); | ||
304 | bt_middle_in = _button_add(list, fbox, "bring to middle #200", NULL); | ||
305 | bt_middle_show = _button_add(list, fbox, "show in middle #200", NULL); | ||
306 | bt_top_in = _button_add(list, fbox, "bring to top #250", NULL); | ||
307 | bt_top_show = _button_add(list, fbox, "show in top #250", NULL); | ||
308 | |||
309 | for (i = 0; i < N_ITEMS; i++) | ||
310 | { | ||
311 | Elm_Object_Item *gli, *glg; | ||
312 | |||
313 | if (i % 7 == 0) | ||
314 | { | ||
315 | glg = gli = elm_genlist_item_append(list, _itc_group, | ||
316 | (void *)(long)nitems++, NULL, | ||
317 | ELM_GENLIST_ITEM_GROUP, | ||
318 | _item_sel_cb, NULL); | ||
319 | elm_genlist_item_select_mode_set(gli, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); | ||
320 | } | ||
321 | else | ||
322 | { | ||
323 | gli = elm_genlist_item_append(list, _itc, | ||
324 | (void *)(long)nitems++, glg, | ||
325 | ELM_GENLIST_ITEM_NONE, | ||
326 | _item_sel_cb, NULL); | ||
327 | } | ||
328 | |||
329 | switch (i) | ||
330 | { | ||
331 | case 3: | ||
332 | elm_object_item_disabled_set(gli, EINA_TRUE); | ||
333 | break; | ||
334 | case 50: | ||
335 | evas_object_smart_callback_add( | ||
336 | bt_bring_in, "clicked", _bring_in_cb, gli); | ||
337 | evas_object_smart_callback_add( | ||
338 | bt_show, "clicked", _show_cb, gli); | ||
339 | break; | ||
340 | case 200: | ||
341 | evas_object_smart_callback_add( | ||
342 | bt_middle_in, "clicked", _middle_in_cb, gli); | ||
343 | evas_object_smart_callback_add( | ||
344 | bt_middle_show, "clicked", _middle_show_cb, gli); | ||
345 | break; | ||
346 | case 250: | ||
347 | evas_object_smart_callback_add( | ||
348 | bt_top_in, "clicked", _top_in_cb, gli); | ||
349 | evas_object_smart_callback_add( | ||
350 | bt_top_show, "clicked", _top_show_cb, gli); | ||
351 | } | ||
352 | } | ||
353 | |||
354 | evas_object_size_hint_min_set(bg, 160, 160); | ||
355 | evas_object_size_hint_max_set(bg, 640, 640); | ||
356 | evas_object_resize(win, 420, 320); | ||
357 | evas_object_show(win); | ||
358 | |||
359 | elm_run(); | ||
360 | elm_shutdown(); | ||
361 | |||
362 | return 0; | ||
363 | } | ||
364 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/genlist_example_05.c b/libraries/elementary/src/examples/genlist_example_05.c deleted file mode 100644 index 9cfd3b5..0000000 --- a/libraries/elementary/src/examples/genlist_example_05.c +++ /dev/null | |||
@@ -1,425 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g genlist_example_05.c -o genlist_example_05 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | #define N_ITEMS 6 | ||
7 | |||
8 | typedef struct _Node_Data { | ||
9 | Eina_List *children; | ||
10 | int value; | ||
11 | int level; | ||
12 | Eina_Bool favorite; | ||
13 | } Node_Data; | ||
14 | |||
15 | static Elm_Genlist_Item_Class *_itc = NULL; | ||
16 | static Elm_Genlist_Item_Class *_itp = NULL; | ||
17 | static Elm_Genlist_Item_Class *_itfav = NULL; | ||
18 | static int nitems = 0; | ||
19 | |||
20 | static char * | ||
21 | _item_label_get(void *data, Evas_Object *obj, const char *part) | ||
22 | { | ||
23 | char buf[256]; | ||
24 | Node_Data *d = data; | ||
25 | |||
26 | if (!strcmp(part, "elm.text")) | ||
27 | snprintf(buf, sizeof(buf), "Item # %i (level %i)", d->value, d->level); | ||
28 | |||
29 | return strdup(buf); | ||
30 | } | ||
31 | |||
32 | static Evas_Object * | ||
33 | _item_content_get(void *data, Evas_Object *obj, const char *part) | ||
34 | { | ||
35 | Evas_Object *ic = elm_icon_add(obj); | ||
36 | |||
37 | if (!strcmp(part, "elm.swallow.icon")) | ||
38 | elm_icon_standard_set(ic, "file"); | ||
39 | |||
40 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
41 | return ic; | ||
42 | } | ||
43 | |||
44 | static void | ||
45 | _item_sel_cb(void *data, Evas_Object *obj, void *event_info) | ||
46 | { | ||
47 | printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n", | ||
48 | data, obj, event_info); | ||
49 | } | ||
50 | |||
51 | static char * | ||
52 | _parent_label_get(void *data, Evas_Object *obj, const char *part) | ||
53 | { | ||
54 | char buf[256]; | ||
55 | Node_Data *d = data; | ||
56 | |||
57 | snprintf(buf, sizeof(buf), "Group %d (%d items)", d->value / 7, | ||
58 | eina_list_count(d->children)); | ||
59 | |||
60 | return strdup(buf); | ||
61 | } | ||
62 | |||
63 | static Evas_Object * | ||
64 | _parent_content_get(void *data, Evas_Object *obj, const char *part) | ||
65 | { | ||
66 | Evas_Object *ic = elm_icon_add(obj); | ||
67 | |||
68 | if (!strcmp(part, "elm.swallow.icon")) | ||
69 | elm_icon_standard_set(ic, "folder"); | ||
70 | |||
71 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
72 | return ic; | ||
73 | } | ||
74 | |||
75 | static char * | ||
76 | _favorite_label_get(void *data, Evas_Object *obj, const char *part) | ||
77 | { | ||
78 | char buf[256]; | ||
79 | Node_Data *d = data; | ||
80 | |||
81 | if (!strcmp(part, "elm.text")) | ||
82 | snprintf(buf, sizeof(buf), "Favorite # %i", d->value); | ||
83 | |||
84 | return strdup(buf); | ||
85 | } | ||
86 | |||
87 | static Evas_Object * | ||
88 | _favorite_content_get(void *data, Evas_Object *obj, const char *part) | ||
89 | { | ||
90 | Evas_Object *ic = elm_icon_add(obj); | ||
91 | |||
92 | if (!strcmp(part, "elm.swallow.icon")) | ||
93 | elm_icon_standard_set(ic, "apps"); | ||
94 | |||
95 | evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
96 | return ic; | ||
97 | } | ||
98 | |||
99 | static void | ||
100 | _append_cb(void *data, Evas_Object *o, void *event_info) | ||
101 | { | ||
102 | Evas_Object *list = data; | ||
103 | Elm_Object_Item *glit, *parent = NULL; | ||
104 | Node_Data *pdata, *d = malloc(sizeof(*d)); | ||
105 | |||
106 | d->children = NULL; | ||
107 | d->value = nitems++; | ||
108 | d->favorite = EINA_FALSE; | ||
109 | |||
110 | glit = elm_genlist_selected_item_get(list); | ||
111 | if (glit) | ||
112 | parent = elm_genlist_item_parent_get(glit); | ||
113 | |||
114 | if (parent) | ||
115 | { | ||
116 | d->level = elm_genlist_item_expanded_depth_get(parent) + 1; | ||
117 | pdata = elm_object_item_data_get(parent); | ||
118 | pdata->children = eina_list_append(pdata->children, d); | ||
119 | } | ||
120 | else | ||
121 | d->level = 0; | ||
122 | |||
123 | elm_genlist_item_append(list, _itc, | ||
124 | d, parent, | ||
125 | ELM_GENLIST_ITEM_NONE, | ||
126 | _item_sel_cb, NULL); | ||
127 | } | ||
128 | |||
129 | static void | ||
130 | _favorite_cb(void *data, Evas_Object *o, void *event_info) | ||
131 | { | ||
132 | Evas_Object *list = data; | ||
133 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
134 | |||
135 | if (!glit) return; | ||
136 | |||
137 | Node_Data *d = elm_object_item_data_get(glit); | ||
138 | d->favorite = !d->favorite; | ||
139 | if (d->favorite) | ||
140 | elm_genlist_item_item_class_update(glit, _itfav); | ||
141 | else | ||
142 | { | ||
143 | if (d->children) | ||
144 | elm_genlist_item_item_class_update(glit, _itp); | ||
145 | else | ||
146 | elm_genlist_item_item_class_update(glit, _itc); | ||
147 | } | ||
148 | |||
149 | elm_genlist_item_update(glit); | ||
150 | } | ||
151 | |||
152 | static void | ||
153 | _add_child_cb(void *data, Evas_Object *o, void *event_info) | ||
154 | { | ||
155 | Evas_Object *list = data; | ||
156 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
157 | Elm_Object_Item *glit_prev, *glit_parent; | ||
158 | |||
159 | if (!glit) return; | ||
160 | |||
161 | Node_Data *d = elm_object_item_data_get(glit); | ||
162 | glit_prev = elm_genlist_item_prev_get(glit); | ||
163 | glit_parent = elm_genlist_item_parent_get(glit); | ||
164 | |||
165 | Eina_Bool change_item = !d->children; | ||
166 | |||
167 | // creating new item data | ||
168 | Node_Data *ndata = malloc(sizeof(*ndata)); | ||
169 | ndata->value = nitems++; | ||
170 | ndata->children = NULL; | ||
171 | ndata->favorite = EINA_FALSE; | ||
172 | ndata->level = elm_genlist_item_expanded_depth_get(glit) + 1; | ||
173 | d->children = eina_list_append(d->children, ndata); | ||
174 | |||
175 | // Changing leaf item to parent item | ||
176 | if (change_item) | ||
177 | { | ||
178 | elm_object_item_del(glit); | ||
179 | |||
180 | if (glit_prev != glit_parent) | ||
181 | glit = elm_genlist_item_insert_after(list, _itp, d, glit_parent, | ||
182 | glit_prev, | ||
183 | ELM_GENLIST_ITEM_TREE, | ||
184 | _item_sel_cb, NULL); | ||
185 | else | ||
186 | glit = elm_genlist_item_prepend(list, _itp, d, glit_parent, | ||
187 | ELM_GENLIST_ITEM_TREE, | ||
188 | _item_sel_cb, NULL); | ||
189 | elm_genlist_item_expanded_set(glit, EINA_FALSE); | ||
190 | elm_genlist_item_selected_set(glit, EINA_TRUE); | ||
191 | } | ||
192 | else if (elm_genlist_item_expanded_get(glit)) | ||
193 | { | ||
194 | elm_genlist_item_append(list, _itc, ndata, glit, | ||
195 | ELM_GENLIST_ITEM_NONE, _item_sel_cb, NULL); | ||
196 | } | ||
197 | |||
198 | elm_genlist_item_update(glit); | ||
199 | |||
200 | } | ||
201 | |||
202 | static void | ||
203 | _clear_list(Node_Data *d) | ||
204 | { | ||
205 | Node_Data *tmp; | ||
206 | |||
207 | EINA_LIST_FREE(d->children, tmp) | ||
208 | _clear_list(tmp); | ||
209 | free(d); | ||
210 | } | ||
211 | |||
212 | static void | ||
213 | _del_item_cb(void *data, Evas_Object *o, void *event_info) | ||
214 | { | ||
215 | Evas_Object *list = data; | ||
216 | Elm_Object_Item *glit = elm_genlist_selected_item_get(list); | ||
217 | Elm_Object_Item *glit_parent = NULL; | ||
218 | |||
219 | if (!glit) return; | ||
220 | |||
221 | Node_Data *pdata, *d = elm_object_item_data_get(glit); | ||
222 | glit_parent = elm_genlist_item_parent_get(glit); | ||
223 | elm_genlist_item_subitems_clear(glit); | ||
224 | elm_object_item_del(glit); | ||
225 | |||
226 | _clear_list(d); | ||
227 | |||
228 | if (!glit_parent) return; | ||
229 | |||
230 | pdata = elm_object_item_data_get(glit_parent); | ||
231 | pdata->children = eina_list_remove(pdata->children, d); | ||
232 | elm_genlist_item_update(glit_parent); | ||
233 | } | ||
234 | |||
235 | static void | ||
236 | _expand_request_cb(void *data, Evas_Object *o, void *event_info) | ||
237 | { | ||
238 | Elm_Object_Item *glit = event_info; | ||
239 | printf("expand request on item: %p\n", event_info); | ||
240 | elm_genlist_item_expanded_set(glit, EINA_TRUE); | ||
241 | } | ||
242 | |||
243 | static void | ||
244 | _contract_request_cb(void *data, Evas_Object *o, void *event_info) | ||
245 | { | ||
246 | Elm_Object_Item *glit = event_info; | ||
247 | printf("contract request on item: %p\n", event_info); | ||
248 | elm_genlist_item_expanded_set(glit, EINA_FALSE); | ||
249 | } | ||
250 | |||
251 | static void | ||
252 | _expanded_cb(void *data, Evas_Object *o, void *event_info) | ||
253 | { | ||
254 | Eina_List *l; | ||
255 | Elm_Object_Item *glit = event_info; | ||
256 | Node_Data *it_data, *d = elm_object_item_data_get(glit); | ||
257 | Evas_Object *list = elm_object_item_widget_get(glit); | ||
258 | |||
259 | Elm_Genlist_Item_Class *ic; | ||
260 | |||
261 | EINA_LIST_FOREACH(d->children, l, it_data) | ||
262 | { | ||
263 | Elm_Object_Item *nitem; | ||
264 | Elm_Genlist_Item_Type type = ELM_GENLIST_ITEM_NONE; | ||
265 | printf("expanding item: #%d from parent #%d\n", it_data->value, d->value); | ||
266 | if (it_data->favorite) | ||
267 | ic = _itfav; | ||
268 | else if (it_data->children) | ||
269 | { | ||
270 | ic = _itp; | ||
271 | type = ELM_GENLIST_ITEM_TREE; | ||
272 | } | ||
273 | else | ||
274 | ic = _itc; | ||
275 | |||
276 | nitem = elm_genlist_item_append(list, ic, it_data, glit, | ||
277 | type, _item_sel_cb, NULL); | ||
278 | elm_genlist_item_expanded_set(nitem, EINA_FALSE); | ||
279 | } | ||
280 | } | ||
281 | |||
282 | static void | ||
283 | _contracted_cb(void *data, Evas_Object *o, void *event_info) | ||
284 | { | ||
285 | Elm_Object_Item *glit = event_info; | ||
286 | elm_genlist_item_subitems_clear(glit); | ||
287 | } | ||
288 | |||
289 | static Evas_Object * | ||
290 | _button_add(Evas_Object *list, Evas_Object *box, const char *label, Evas_Smart_Cb cb) | ||
291 | { | ||
292 | Evas_Object *bt; | ||
293 | |||
294 | bt = elm_button_add(elm_object_parent_widget_get(list)); | ||
295 | elm_object_text_set(bt, label); | ||
296 | elm_box_pack_end(box, bt); | ||
297 | evas_object_show(bt); | ||
298 | |||
299 | if (cb) | ||
300 | evas_object_smart_callback_add(bt, "clicked", cb, list); | ||
301 | |||
302 | return bt; | ||
303 | } | ||
304 | |||
305 | EAPI_MAIN int | ||
306 | elm_main(int argc, char **argv) | ||
307 | { | ||
308 | Evas_Object *win, *bg, *box, *fbox; | ||
309 | Evas_Object *list; | ||
310 | int i; | ||
311 | |||
312 | win = elm_win_add(NULL, "icon", ELM_WIN_BASIC); | ||
313 | elm_win_title_set(win, "Icon"); | ||
314 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
315 | elm_win_autodel_set(win, EINA_TRUE); | ||
316 | |||
317 | bg = elm_bg_add(win); | ||
318 | elm_bg_color_set(bg, 255,255 ,255); | ||
319 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
320 | elm_win_resize_object_add(win, bg); | ||
321 | evas_object_show(bg); | ||
322 | |||
323 | box = elm_box_add(win); | ||
324 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
325 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
326 | elm_win_resize_object_add(win, box); | ||
327 | evas_object_show(box); | ||
328 | |||
329 | if (!_itc) | ||
330 | { | ||
331 | _itc = elm_genlist_item_class_new(); | ||
332 | _itc->item_style = "default"; | ||
333 | _itc->func.text_get = _item_label_get; | ||
334 | _itc->func.content_get = _item_content_get; | ||
335 | _itc->func.state_get = NULL; | ||
336 | _itc->func.del = NULL; | ||
337 | } | ||
338 | |||
339 | if (!_itp) | ||
340 | { | ||
341 | _itp = elm_genlist_item_class_new(); | ||
342 | _itp->item_style = "default"; | ||
343 | _itp->func.text_get = _parent_label_get; | ||
344 | _itp->func.content_get = _parent_content_get; | ||
345 | _itp->func.state_get = NULL; | ||
346 | _itp->func.del = NULL; | ||
347 | } | ||
348 | |||
349 | if (!_itfav) | ||
350 | { | ||
351 | _itfav = elm_genlist_item_class_new(); | ||
352 | _itfav->item_style = "default"; | ||
353 | _itfav->func.text_get = _favorite_label_get; | ||
354 | _itfav->func.content_get = _favorite_content_get; | ||
355 | _itfav->func.state_get = NULL; | ||
356 | _itfav->func.del = NULL; | ||
357 | } | ||
358 | |||
359 | list = elm_genlist_add(win); | ||
360 | |||
361 | evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
362 | evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
363 | elm_box_pack_end(box, list); | ||
364 | evas_object_show(list); | ||
365 | |||
366 | fbox = elm_box_add(win); | ||
367 | elm_box_layout_set(fbox, evas_object_box_layout_flow_horizontal, | ||
368 | NULL, NULL); | ||
369 | evas_object_size_hint_weight_set(fbox, EVAS_HINT_EXPAND, 0); | ||
370 | evas_object_size_hint_align_set(fbox, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
371 | elm_box_pack_end(box, fbox); | ||
372 | evas_object_show(fbox); | ||
373 | |||
374 | _button_add(list, fbox, "append item", _append_cb); | ||
375 | _button_add(list, fbox, "favorite", _favorite_cb); | ||
376 | _button_add(list, fbox, "add child", _add_child_cb); | ||
377 | _button_add(list, fbox, "del item", _del_item_cb); | ||
378 | |||
379 | for (i = 0; i < N_ITEMS; i++) | ||
380 | { | ||
381 | Elm_Object_Item *gli, *glg; | ||
382 | Node_Data *data = malloc(sizeof(*data)); // data for this item | ||
383 | data->children = NULL; | ||
384 | data->value = i; | ||
385 | data->favorite = EINA_FALSE; | ||
386 | nitems++; | ||
387 | |||
388 | Node_Data *pdata; // data for the parent of the group | ||
389 | |||
390 | printf("creating item: #%d\n", data->value); | ||
391 | if (i % 3 == 0) | ||
392 | { | ||
393 | glg = gli = elm_genlist_item_append(list, _itp, data, NULL, | ||
394 | ELM_GENLIST_ITEM_TREE, | ||
395 | _item_sel_cb, NULL); | ||
396 | elm_genlist_item_expanded_set(glg, EINA_TRUE); | ||
397 | pdata = data; | ||
398 | data->level = 0; | ||
399 | } | ||
400 | else | ||
401 | { | ||
402 | gli = elm_genlist_item_append(list, _itc, data, glg, | ||
403 | ELM_GENLIST_ITEM_NONE, | ||
404 | _item_sel_cb, NULL); | ||
405 | pdata->children = eina_list_append(pdata->children, data); | ||
406 | data->level = 1; | ||
407 | } | ||
408 | } | ||
409 | |||
410 | evas_object_smart_callback_add(list, "expand,request", _expand_request_cb, list); | ||
411 | evas_object_smart_callback_add(list, "contract,request", _contract_request_cb, list); | ||
412 | evas_object_smart_callback_add(list, "expanded", _expanded_cb, list); | ||
413 | evas_object_smart_callback_add(list, "contracted", _contracted_cb, list); | ||
414 | |||
415 | evas_object_size_hint_min_set(bg, 160, 160); | ||
416 | evas_object_size_hint_max_set(bg, 640, 800); | ||
417 | evas_object_resize(win, 420, 600); | ||
418 | evas_object_show(win); | ||
419 | |||
420 | elm_run(); | ||
421 | elm_shutdown(); | ||
422 | |||
423 | return 0; | ||
424 | } | ||
425 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/hover_example_01.c b/libraries/elementary/src/examples/hover_example_01.c deleted file mode 100644 index e426200..0000000 --- a/libraries/elementary/src/examples/hover_example_01.c +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o hover_example_01 hover_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | _show_hover(void *data, Evas_Object *obj, void *event_info) | ||
8 | { | ||
9 | evas_object_show(data); | ||
10 | } | ||
11 | |||
12 | static void | ||
13 | _hide_hover(void *data, Evas_Object *obj, void *event_info) | ||
14 | { | ||
15 | evas_object_hide(data); | ||
16 | } | ||
17 | |||
18 | EAPI_MAIN int | ||
19 | elm_main(int argc, char **argv) | ||
20 | { | ||
21 | Evas_Object *win, *bg, *bt, *bt2, *rect, *rect2, *rect3, *hover; | ||
22 | |||
23 | win = elm_win_add(NULL, "hover", ELM_WIN_BASIC); | ||
24 | elm_win_title_set(win, "Hover"); | ||
25 | elm_win_autodel_set(win, EINA_TRUE); | ||
26 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
27 | |||
28 | bg = elm_bg_add(win); | ||
29 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
30 | elm_win_resize_object_add(win, bg); | ||
31 | evas_object_show(bg); | ||
32 | |||
33 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
34 | evas_object_size_hint_min_set(rect, 25, 25); | ||
35 | evas_object_color_set(rect, 255, 0, 0, 255); | ||
36 | evas_object_show(rect); | ||
37 | |||
38 | rect2 = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
39 | evas_object_size_hint_min_set(rect2, 25, 25); | ||
40 | evas_object_color_set(rect2, 0, 255, 0, 255); | ||
41 | evas_object_show(rect2); | ||
42 | |||
43 | rect3 = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
44 | evas_object_size_hint_min_set(rect3, 25, 25); | ||
45 | evas_object_color_set(rect3, 0, 0, 255, 255); | ||
46 | evas_object_show(rect3); | ||
47 | |||
48 | bt = elm_button_add(win); | ||
49 | elm_object_text_set(bt, "Show hover"); | ||
50 | evas_object_move(bt, 60, 90); | ||
51 | evas_object_resize(bt, 80, 20); | ||
52 | evas_object_show(bt); | ||
53 | |||
54 | bt2 = elm_button_add(win); | ||
55 | elm_object_text_set(bt2, "Hide hover"); | ||
56 | evas_object_show(bt2); | ||
57 | |||
58 | hover = elm_hover_add(win); | ||
59 | elm_hover_parent_set(hover, win); | ||
60 | elm_hover_target_set(hover, bt); | ||
61 | |||
62 | elm_object_style_set(hover, "popout"); | ||
63 | |||
64 | elm_object_part_content_set(hover, "left", rect); | ||
65 | elm_object_part_content_set(hover, "top", rect2); | ||
66 | elm_object_part_content_set(hover, "right", rect3); | ||
67 | elm_object_part_content_set(hover, "middle", bt2); | ||
68 | |||
69 | evas_object_smart_callback_add(bt, "clicked", _show_hover, hover); | ||
70 | evas_object_smart_callback_add(bt2, "clicked", _hide_hover, hover); | ||
71 | |||
72 | evas_object_resize(win, 200, 200); | ||
73 | evas_object_show(win); | ||
74 | |||
75 | elm_run(); | ||
76 | elm_shutdown(); | ||
77 | |||
78 | return 0; | ||
79 | } | ||
80 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/hoversel_example_01.c b/libraries/elementary/src/examples/hoversel_example_01.c deleted file mode 100644 index 412bf43..0000000 --- a/libraries/elementary/src/examples/hoversel_example_01.c +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o hoversel_example_01 hoversel_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _print_items(void *data, Evas_Object *obj, void *event_info); | ||
7 | static void _rm_items(void *data, Evas_Object *obj, void *event_info); | ||
8 | static void _sel(void *data, Evas_Object *obj, void *event_info); | ||
9 | static void _free(void *data, Evas_Object *obj, void *event_info); | ||
10 | static void _add_item(void *data, Evas_Object *obj, void *event_info); | ||
11 | |||
12 | EAPI_MAIN int | ||
13 | elm_main(int argc, char **argv) | ||
14 | { | ||
15 | Evas_Object *win, *bg, *rect, *hoversel; | ||
16 | Elm_Object_Item *hoversel_it; | ||
17 | |||
18 | win = elm_win_add(NULL, "hoversel", ELM_WIN_BASIC); | ||
19 | elm_win_title_set(win, "Hoversel"); | ||
20 | elm_win_autodel_set(win, EINA_TRUE); | ||
21 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
22 | evas_object_resize(win, 200, 300); | ||
23 | evas_object_show(win); | ||
24 | |||
25 | bg = elm_bg_add(win); | ||
26 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
27 | elm_win_resize_object_add(win, bg); | ||
28 | evas_object_show(bg); | ||
29 | |||
30 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
31 | evas_object_color_set(rect, 255, 0, 0, 255); | ||
32 | evas_object_show(rect); | ||
33 | |||
34 | hoversel = elm_hoversel_add(win); | ||
35 | elm_hoversel_hover_parent_set(hoversel, win); | ||
36 | elm_hoversel_horizontal_set(hoversel, EINA_FALSE); | ||
37 | elm_object_text_set(hoversel, "Hoversel"); | ||
38 | elm_object_part_content_set(hoversel, "icon", rect); | ||
39 | elm_hoversel_item_add(hoversel, "Print items", NULL, ELM_ICON_NONE, | ||
40 | _print_items, NULL); | ||
41 | elm_hoversel_item_add(hoversel, "Option 2", "home", ELM_ICON_STANDARD, NULL, | ||
42 | NULL); | ||
43 | hoversel_it = elm_hoversel_item_add(hoversel, "Clear all items", "close", | ||
44 | ELM_ICON_STANDARD, _rm_items, NULL); | ||
45 | evas_object_smart_callback_add(hoversel, "selected", _sel, hoversel_it); | ||
46 | evas_object_smart_callback_add(hoversel, "clicked", _add_item, NULL); | ||
47 | |||
48 | evas_object_resize(hoversel, 180, 30); | ||
49 | evas_object_move(hoversel, 10, 10); | ||
50 | evas_object_show(hoversel); | ||
51 | |||
52 | |||
53 | elm_run(); | ||
54 | elm_shutdown(); | ||
55 | |||
56 | return 0; | ||
57 | } | ||
58 | ELM_MAIN() | ||
59 | |||
60 | static void | ||
61 | _print_items(void *data, Evas_Object *obj, void *event_info) | ||
62 | { | ||
63 | const Eina_List *items = elm_hoversel_items_get(obj); | ||
64 | const Eina_List *l; | ||
65 | Elm_Object_Item *hoversel_it; | ||
66 | |||
67 | EINA_LIST_FOREACH(items, l, hoversel_it) | ||
68 | printf("%s\n", elm_object_item_text_get(hoversel_it)); | ||
69 | } | ||
70 | |||
71 | static void | ||
72 | _rm_items(void *data, Evas_Object *obj, void *event_info) | ||
73 | { | ||
74 | if (!elm_hoversel_expanded_get(obj)) | ||
75 | elm_hoversel_clear(obj); | ||
76 | } | ||
77 | |||
78 | static void | ||
79 | _sel(void *data, Evas_Object *obj, void *event_info) | ||
80 | { | ||
81 | if (!elm_hoversel_expanded_get(obj) && event_info != data) | ||
82 | elm_object_item_del(event_info); | ||
83 | } | ||
84 | |||
85 | static void | ||
86 | _add_item(void *data, Evas_Object *obj, void *event_info) | ||
87 | { | ||
88 | static int num = 0; | ||
89 | char *str = malloc(sizeof(char) * 10); | ||
90 | Elm_Object_Item *hoversel_it; | ||
91 | |||
92 | snprintf(str, 10, "item %d", ++num); | ||
93 | |||
94 | hoversel_it = elm_hoversel_item_add(obj, str, NULL, ELM_ICON_NONE, NULL, | ||
95 | str); | ||
96 | elm_object_item_del_cb_set(hoversel_it, _free); | ||
97 | } | ||
98 | |||
99 | static void | ||
100 | _free(void *data, Evas_Object *obj, void *event_info) | ||
101 | { | ||
102 | free(data); | ||
103 | } | ||
diff --git a/libraries/elementary/src/examples/icon_example_01.c b/libraries/elementary/src/examples/icon_example_01.c deleted file mode 100644 index daad19f..0000000 --- a/libraries/elementary/src/examples/icon_example_01.c +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g image_example_01.c -o image_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | EAPI_MAIN int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg, *icon; | ||
10 | const char *path, *group, *name; | ||
11 | |||
12 | win = elm_win_add(NULL, "icon", ELM_WIN_BASIC); | ||
13 | elm_win_title_set(win, "Icon"); | ||
14 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
15 | elm_win_autodel_set(win, EINA_TRUE); | ||
16 | |||
17 | bg = elm_bg_add(win); | ||
18 | elm_bg_color_set(bg, 255,255 ,255); | ||
19 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
20 | elm_win_resize_object_add(win, bg); | ||
21 | evas_object_show(bg); | ||
22 | |||
23 | icon = elm_icon_add(win); | ||
24 | elm_icon_order_lookup_set(icon, ELM_ICON_LOOKUP_THEME_FDO); | ||
25 | elm_icon_standard_set(icon, "home"); | ||
26 | |||
27 | path = NULL; | ||
28 | group = NULL; | ||
29 | name = NULL; | ||
30 | elm_icon_file_get(icon, &path, &group); | ||
31 | name = elm_icon_standard_get(icon); | ||
32 | printf("path = %s, group = %s, name = %s\n", path, group, name); | ||
33 | |||
34 | elm_icon_no_scale_set(icon, EINA_TRUE); | ||
35 | elm_icon_resizable_set(icon, EINA_FALSE, EINA_TRUE); | ||
36 | elm_icon_smooth_set(icon, EINA_FALSE); | ||
37 | elm_icon_fill_outside_set(icon, EINA_TRUE); | ||
38 | |||
39 | evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
40 | elm_win_resize_object_add(win, icon); | ||
41 | evas_object_show(icon); | ||
42 | |||
43 | evas_object_size_hint_min_set(bg, 160, 160); | ||
44 | evas_object_size_hint_max_set(bg, 640, 640); | ||
45 | evas_object_resize(win, 320, 320); | ||
46 | evas_object_show(win); | ||
47 | |||
48 | elm_run(); | ||
49 | elm_shutdown(); | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/image_example_01.c b/libraries/elementary/src/examples/image_example_01.c deleted file mode 100644 index c61f76c..0000000 --- a/libraries/elementary/src/examples/image_example_01.c +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g image_example_01.c -o image_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg, *image; | ||
10 | char buf[PATH_MAX]; | ||
11 | |||
12 | elm_app_info_set(elm_main, "elementary", "images/plant_01.jpg"); | ||
13 | win = elm_win_add(NULL, "image", ELM_WIN_BASIC); | ||
14 | elm_win_title_set(win, "Image"); | ||
15 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
16 | elm_win_autodel_set(win, EINA_TRUE); | ||
17 | |||
18 | bg = elm_bg_add(win); | ||
19 | elm_bg_color_set(bg, 255,255 ,255); | ||
20 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
21 | elm_win_resize_object_add(win, bg); | ||
22 | evas_object_show(bg); | ||
23 | |||
24 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); | ||
25 | |||
26 | image = elm_image_add(win); | ||
27 | if (!elm_image_file_set(image, buf, NULL)) | ||
28 | { | ||
29 | printf("error: could not load image \"%s\"\n", buf); | ||
30 | return -1; | ||
31 | } | ||
32 | |||
33 | elm_image_no_scale_set(image, EINA_TRUE); | ||
34 | elm_image_resizable_set(image, EINA_FALSE, EINA_TRUE); | ||
35 | elm_image_smooth_set(image, EINA_FALSE); | ||
36 | elm_image_orient_set(image, ELM_IMAGE_FLIP_HORIZONTAL); | ||
37 | elm_image_aspect_fixed_set(image, EINA_TRUE); | ||
38 | elm_image_fill_outside_set(image, EINA_TRUE); | ||
39 | elm_image_editable_set(image, EINA_TRUE); | ||
40 | |||
41 | evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
42 | elm_win_resize_object_add(win, image); | ||
43 | evas_object_show(image); | ||
44 | |||
45 | evas_object_size_hint_min_set(bg, 160, 160); | ||
46 | evas_object_size_hint_max_set(bg, 640, 640); | ||
47 | evas_object_resize(win, 320, 320); | ||
48 | evas_object_show(win); | ||
49 | |||
50 | elm_run(); | ||
51 | elm_shutdown(); | ||
52 | |||
53 | return 0; | ||
54 | } | ||
55 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/index_example_01.c b/libraries/elementary/src/examples/index_example_01.c deleted file mode 100644 index 682a5e7..0000000 --- a/libraries/elementary/src/examples/index_example_01.c +++ /dev/null | |||
@@ -1,209 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>index widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g index_example.c -o index_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | struct example_data | ||
15 | { | ||
16 | Evas_Object *list, *index; | ||
17 | }; | ||
18 | |||
19 | struct example_data d = {NULL, NULL}; | ||
20 | |||
21 | static const char *dict[] = \ | ||
22 | { | ||
23 | #include "dict.txt" | ||
24 | }; | ||
25 | |||
26 | static void | ||
27 | _index_item_del(void *data, | ||
28 | Evas_Object *obj, | ||
29 | void *event_info) | ||
30 | { | ||
31 | fprintf(stdout, "Deleting associated list node (%s). Comparing index " | ||
32 | "item data reported via callback with the one returned by " | ||
33 | "index's API on items: %s.\n", | ||
34 | elm_object_item_text_get(data), | ||
35 | data == elm_object_item_data_get(event_info) ? "OK" : | ||
36 | "FAIL, something went wrong"); | ||
37 | |||
38 | elm_object_item_del(data); | ||
39 | } | ||
40 | |||
41 | /* delete an index item */ | ||
42 | static void | ||
43 | _item_del(void *data, | ||
44 | Evas_Object *obj, | ||
45 | void *event_info) | ||
46 | { | ||
47 | Elm_Object_Item *iit; | ||
48 | Elm_Object_Item *lit = elm_index_selected_item_get(d.index, 0); | ||
49 | |||
50 | iit = elm_index_item_find(d.index, lit); | ||
51 | |||
52 | if (!iit) return; | ||
53 | |||
54 | fprintf(stdout, "Deleting last selected index item, which had letter" | ||
55 | " %s (pointing to %s)\n", elm_index_item_letter_get(iit), | ||
56 | elm_object_item_text_get(lit)); | ||
57 | |||
58 | elm_object_item_del(lit); | ||
59 | } | ||
60 | |||
61 | static void | ||
62 | _item_del_all(void *data, | ||
63 | Evas_Object *obj, | ||
64 | void *event_info) | ||
65 | { | ||
66 | elm_index_item_clear(d.index); | ||
67 | } | ||
68 | |||
69 | static void | ||
70 | _active_set(void *data, | ||
71 | Evas_Object *obj, | ||
72 | void *event_info) | ||
73 | { | ||
74 | elm_index_autohide_disabled_set(d.index, !elm_index_autohide_disabled_get(d.index)); | ||
75 | |||
76 | fprintf(stdout, "Toggling index programmatically.\n"); | ||
77 | } | ||
78 | |||
79 | /* "delay,changed" hook */ | ||
80 | static void | ||
81 | _index_changed(void *data, | ||
82 | Evas_Object *obj, | ||
83 | void *event_info) | ||
84 | { | ||
85 | elm_list_item_bring_in(event_info); | ||
86 | } | ||
87 | |||
88 | static void | ||
89 | _index_selected(void *data, | ||
90 | Evas_Object *obj, | ||
91 | void *event_info) | ||
92 | { | ||
93 | Elm_Object_Item *lit = event_info; | ||
94 | |||
95 | fprintf(stdout, "New index item selected. Comparing item reported" | ||
96 | " via callback with the selection returned by the API: " | ||
97 | "%s.\n", lit == elm_index_selected_item_get(obj, 0) ? "OK" : | ||
98 | "FAIL, something went wrong"); | ||
99 | } | ||
100 | |||
101 | static void | ||
102 | _on_done(void *data, | ||
103 | Evas_Object *obj, | ||
104 | void *event_info) | ||
105 | { | ||
106 | elm_exit(); | ||
107 | } | ||
108 | |||
109 | EAPI_MAIN int | ||
110 | elm_main(int argc, | ||
111 | char **argv) | ||
112 | { | ||
113 | Evas_Object *win, *bg, *hbox, *vbox, *bt, *sep; | ||
114 | Elm_Object_Item *lit; | ||
115 | unsigned int i; | ||
116 | char curr = 0; | ||
117 | |||
118 | win = elm_win_add(NULL, "index", ELM_WIN_BASIC); | ||
119 | elm_win_title_set(win, "Index Example"); | ||
120 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
121 | |||
122 | bg = elm_bg_add(win); | ||
123 | elm_win_resize_object_add(win, bg); | ||
124 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
125 | evas_object_show(bg); | ||
126 | |||
127 | vbox = elm_box_add(win); | ||
128 | elm_win_resize_object_add(win, vbox); | ||
129 | evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
130 | evas_object_show(vbox); | ||
131 | |||
132 | d.list = elm_list_add(win); | ||
133 | evas_object_size_hint_weight_set(d.list, EVAS_HINT_EXPAND, | ||
134 | EVAS_HINT_EXPAND); | ||
135 | evas_object_size_hint_align_set(d.list, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
136 | evas_object_show(d.list); | ||
137 | elm_box_pack_end(vbox, d.list); | ||
138 | |||
139 | d.index = elm_index_add(win); | ||
140 | elm_win_resize_object_add(win, d.index); | ||
141 | evas_object_size_hint_weight_set(d.index, EVAS_HINT_EXPAND, | ||
142 | EVAS_HINT_EXPAND); | ||
143 | evas_object_size_hint_align_set(d.list, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
144 | evas_object_show(d.index); | ||
145 | |||
146 | for (i = 0; i < (sizeof(dict) / sizeof(dict[0])); i++) | ||
147 | { | ||
148 | lit = elm_list_item_append(d.list, dict[i], NULL, NULL, NULL, NULL); | ||
149 | |||
150 | if (curr != dict[i][0]) | ||
151 | { | ||
152 | Elm_Object_Item *index_it; | ||
153 | char buf[32]; | ||
154 | |||
155 | curr = dict[i][0]; | ||
156 | /* indexing by first letters */ | ||
157 | |||
158 | snprintf(buf, sizeof(buf), "%c", curr); | ||
159 | elm_index_item_append(d.index, buf, NULL, lit); | ||
160 | index_it = elm_index_item_find(d.index, lit); | ||
161 | |||
162 | elm_object_item_del_cb_set(index_it, _index_item_del); | ||
163 | } | ||
164 | } | ||
165 | |||
166 | evas_object_smart_callback_add(d.index, "delay,changed", _index_changed, | ||
167 | NULL); | ||
168 | evas_object_smart_callback_add(d.index, "selected", _index_selected, NULL); | ||
169 | |||
170 | /* attribute setting knobs */ | ||
171 | sep = elm_separator_add(win); | ||
172 | elm_separator_horizontal_set(sep, EINA_TRUE); | ||
173 | elm_box_pack_end(vbox, sep); | ||
174 | evas_object_show(sep); | ||
175 | |||
176 | hbox = elm_box_add(win); | ||
177 | elm_box_horizontal_set(hbox, EINA_TRUE); | ||
178 | evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, 0); | ||
179 | evas_object_size_hint_fill_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
180 | elm_box_pack_end(vbox, hbox); | ||
181 | evas_object_show(hbox); | ||
182 | |||
183 | bt = elm_button_add(win); | ||
184 | elm_object_text_set(bt, "bring in index"); | ||
185 | evas_object_smart_callback_add(bt, "clicked", _active_set, NULL); | ||
186 | elm_box_pack_end(hbox, bt); | ||
187 | evas_object_show(bt); | ||
188 | |||
189 | bt = elm_button_add(win); | ||
190 | elm_object_text_set(bt, "delete last selected item"); | ||
191 | evas_object_smart_callback_add(bt, "clicked", _item_del, NULL); | ||
192 | elm_box_pack_end(hbox, bt); | ||
193 | evas_object_show(bt); | ||
194 | |||
195 | bt = elm_button_add(win); | ||
196 | elm_object_text_set(bt, "delete all items"); | ||
197 | evas_object_smart_callback_add(bt, "clicked", _item_del_all, NULL); | ||
198 | elm_box_pack_end(hbox, bt); | ||
199 | evas_object_show(bt); | ||
200 | |||
201 | evas_object_resize(win, 320, 600); | ||
202 | evas_object_show(win); | ||
203 | |||
204 | elm_run(); | ||
205 | elm_shutdown(); | ||
206 | |||
207 | return 0; | ||
208 | } | ||
209 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/index_example_02.c b/libraries/elementary/src/examples/index_example_02.c deleted file mode 100644 index ff2acde..0000000 --- a/libraries/elementary/src/examples/index_example_02.c +++ /dev/null | |||
@@ -1,152 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>index widget</b> example, illustrating its | ||
3 | * usage and API -- now with sorted insertions. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g index_example.c -o index_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static const char *items[] = \ | ||
15 | { | ||
16 | "Judith", | ||
17 | "Paulina", | ||
18 | "Cathy", | ||
19 | "Vendella", | ||
20 | "Naomi", | ||
21 | "Ashley", | ||
22 | "Stacey", | ||
23 | "Gail" | ||
24 | }; | ||
25 | |||
26 | static void | ||
27 | _index_changed(void *data, | ||
28 | Evas_Object *obj, | ||
29 | void *event_info) | ||
30 | { | ||
31 | Elm_Object_Item *item = elm_object_item_data_get(event_info); | ||
32 | elm_gengrid_item_bring_in(item, ELM_GENGRID_ITEM_SCROLLTO_IN); | ||
33 | } | ||
34 | |||
35 | static void | ||
36 | _on_done(void *data, | ||
37 | Evas_Object *obj, | ||
38 | void *event_info) | ||
39 | { | ||
40 | elm_exit(); | ||
41 | } | ||
42 | |||
43 | static char * | ||
44 | _grid_label_get(void *data, | ||
45 | Evas_Object *obj, | ||
46 | const char *part) | ||
47 | { | ||
48 | int idx = (int)data; | ||
49 | return strdup(items[idx]); | ||
50 | } | ||
51 | |||
52 | Evas_Object * | ||
53 | _grid_content_get(void *data, | ||
54 | Evas_Object *obj, | ||
55 | const char *part) | ||
56 | { | ||
57 | if (!strcmp(part, "elm.swallow.icon")) | ||
58 | { | ||
59 | char buf[PATH_MAX]; | ||
60 | snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), | ||
61 | "sky_01.jpg"); | ||
62 | |||
63 | Evas_Object *icon = elm_bg_add(obj); | ||
64 | elm_bg_file_set(icon, buf, NULL); | ||
65 | evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, | ||
66 | 1); | ||
67 | evas_object_show(icon); | ||
68 | return icon; | ||
69 | } | ||
70 | |||
71 | return NULL; | ||
72 | } | ||
73 | |||
74 | /* ordering alphabetically */ | ||
75 | static int | ||
76 | _index_icmp(const void *data1, | ||
77 | const void *data2) | ||
78 | { | ||
79 | const char *label1, *label2; | ||
80 | |||
81 | const Elm_Object_Item *index_it1 = data1; | ||
82 | const Elm_Object_Item *index_it2 = data2; | ||
83 | |||
84 | label1 = elm_index_item_letter_get(index_it1); | ||
85 | label2 = elm_index_item_letter_get(index_it2); | ||
86 | |||
87 | return strcasecmp(label1, label2); | ||
88 | } | ||
89 | |||
90 | EAPI_MAIN int | ||
91 | elm_main(int argc, | ||
92 | char **argv) | ||
93 | { | ||
94 | Evas_Object *win, *bg, *grid, *idx; | ||
95 | Elm_Object_Item *gg_it; | ||
96 | unsigned int i; | ||
97 | |||
98 | Elm_Gengrid_Item_Class gic; | ||
99 | |||
100 | elm_app_info_set(elm_main, "elementary", "images"); | ||
101 | win = elm_win_add(NULL, "index", ELM_WIN_BASIC); | ||
102 | elm_win_title_set(win, "Index Example"); | ||
103 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
104 | |||
105 | bg = elm_bg_add(win); | ||
106 | elm_win_resize_object_add(win, bg); | ||
107 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
108 | evas_object_show(bg); | ||
109 | |||
110 | grid = elm_gengrid_add(win); | ||
111 | elm_gengrid_item_size_set(grid, 150, 150); | ||
112 | |||
113 | gic.item_style = "default"; | ||
114 | gic.func.text_get = _grid_label_get; | ||
115 | gic.func.content_get = _grid_content_get; | ||
116 | gic.func.state_get = NULL; | ||
117 | gic.func.del = NULL; | ||
118 | |||
119 | evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
120 | elm_win_resize_object_add(win, grid); | ||
121 | evas_object_show(grid); | ||
122 | |||
123 | idx = elm_index_add(win); | ||
124 | evas_object_size_hint_weight_set(idx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
125 | elm_win_resize_object_add(win, idx); | ||
126 | |||
127 | evas_object_show(idx); | ||
128 | |||
129 | for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) | ||
130 | { | ||
131 | char buf[32]; | ||
132 | |||
133 | gg_it = elm_gengrid_item_append(grid, &gic, (void *)i, NULL, NULL); | ||
134 | |||
135 | /* indexing by first letters */ | ||
136 | snprintf(buf, sizeof(buf), "%c", items[i][0]); | ||
137 | elm_index_item_sorted_insert(idx, buf, NULL, gg_it, _index_icmp, NULL); | ||
138 | } | ||
139 | |||
140 | evas_object_smart_callback_add(idx, "delay,changed", _index_changed, NULL); | ||
141 | |||
142 | evas_object_resize(win, 320, 300); | ||
143 | evas_object_show(win); | ||
144 | |||
145 | elm_index_autohide_disabled_set(idx, EINA_FALSE); | ||
146 | |||
147 | elm_run(); | ||
148 | elm_shutdown(); | ||
149 | |||
150 | return 0; | ||
151 | } | ||
152 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/inwin_example.c b/libraries/elementary/src/examples/inwin_example.c deleted file mode 100644 index df7f679..0000000 --- a/libraries/elementary/src/examples/inwin_example.c +++ /dev/null | |||
@@ -1,152 +0,0 @@ | |||
1 | /* | ||
2 | * gcc -o inwin_example inwin_example.c `pkg-config --cflags --libs elementary` | ||
3 | */ | ||
4 | #include <Elementary.h> | ||
5 | |||
6 | static Evas_Object *inwin = NULL; | ||
7 | static const char *styles[] = { | ||
8 | "default", | ||
9 | "minimal", | ||
10 | "minimal_vertical" | ||
11 | }; | ||
12 | static int current_style = 0; | ||
13 | |||
14 | static void | ||
15 | _inwin_hide(void *data, Evas_Object *obj, void *event) | ||
16 | { | ||
17 | if (inwin) | ||
18 | { | ||
19 | evas_object_hide(inwin); | ||
20 | return; | ||
21 | } | ||
22 | elm_object_text_set(obj, "No inwin!"); | ||
23 | elm_object_disabled_set(obj, EINA_TRUE); | ||
24 | } | ||
25 | |||
26 | static void | ||
27 | _inwin_destroy(void *data, Evas_Object *obj, void *event) | ||
28 | { | ||
29 | if (inwin) | ||
30 | { | ||
31 | evas_object_del(inwin); | ||
32 | inwin = NULL; | ||
33 | return; | ||
34 | } | ||
35 | elm_object_text_set(obj, "No inwin!"); | ||
36 | elm_object_disabled_set(obj, EINA_TRUE); | ||
37 | } | ||
38 | |||
39 | static void | ||
40 | _btn_click_cb(void *data, Evas_Object *obj, void *event) | ||
41 | { | ||
42 | Evas_Object *o, *parent; | ||
43 | |||
44 | if (inwin) | ||
45 | { | ||
46 | elm_win_inwin_activate(inwin); | ||
47 | return; | ||
48 | } | ||
49 | |||
50 | parent = elm_object_top_widget_get(obj); | ||
51 | inwin = elm_win_inwin_add(parent); | ||
52 | elm_object_style_set(inwin, styles[current_style]); | ||
53 | evas_object_show(inwin); | ||
54 | |||
55 | current_style = (current_style + 1) % 3; | ||
56 | |||
57 | o = elm_box_add(parent); | ||
58 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
59 | evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
60 | elm_win_inwin_content_set(inwin, o); | ||
61 | evas_object_show(o); | ||
62 | |||
63 | o = elm_label_add(parent); | ||
64 | elm_object_text_set(o, "Click on the first button to hide the Inwin.<ps>" | ||
65 | "Second to destroy it<ps>"); | ||
66 | evas_object_show(o); | ||
67 | |||
68 | elm_box_pack_end(elm_win_inwin_content_get(inwin), o); | ||
69 | |||
70 | o = elm_button_add(parent); | ||
71 | elm_object_text_set(o, "Hide"); | ||
72 | evas_object_show(o); | ||
73 | |||
74 | evas_object_smart_callback_add(o, "clicked", _inwin_hide, NULL); | ||
75 | |||
76 | elm_box_pack_end(elm_win_inwin_content_get(inwin), o); | ||
77 | |||
78 | o = elm_button_add(parent); | ||
79 | elm_object_text_set(o, "Destroy"); | ||
80 | evas_object_show(o); | ||
81 | |||
82 | evas_object_smart_callback_add(o, "clicked", _inwin_destroy, NULL); | ||
83 | |||
84 | elm_box_pack_end(elm_win_inwin_content_get(inwin), o); | ||
85 | } | ||
86 | |||
87 | static void | ||
88 | _win_del_cb(void *data, Evas_Object *obj, void *event) | ||
89 | { | ||
90 | if (inwin) | ||
91 | { | ||
92 | Evas_Object *hover, *o = elm_win_inwin_content_unset(inwin); | ||
93 | evas_object_del(inwin); | ||
94 | inwin = NULL; | ||
95 | hover = elm_hover_add(obj); | ||
96 | elm_hover_target_set(hover, obj); | ||
97 | elm_object_part_content_set(hover, "middle", o); | ||
98 | evas_object_show(hover); | ||
99 | return; | ||
100 | } | ||
101 | evas_object_del(obj); | ||
102 | } | ||
103 | |||
104 | static Eina_Bool | ||
105 | _screenshot_hack_cb(void *data) | ||
106 | { | ||
107 | _btn_click_cb(NULL, data, NULL); | ||
108 | return EINA_FALSE; | ||
109 | } | ||
110 | |||
111 | EAPI_MAIN int | ||
112 | elm_main(int argc, char *argv[]) | ||
113 | { | ||
114 | Evas_Object *win, *bg, *box, *o; | ||
115 | |||
116 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
117 | |||
118 | win = elm_win_add(NULL, "inwin-example", ELM_WIN_BASIC); | ||
119 | elm_win_title_set(win, "Inwin Example"); | ||
120 | evas_object_resize(win, 400, 400); | ||
121 | evas_object_show(win); | ||
122 | |||
123 | evas_object_smart_callback_add(win, "delete,request", _win_del_cb, NULL); | ||
124 | |||
125 | bg = elm_bg_add(win); | ||
126 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
127 | elm_win_resize_object_add(win, bg); | ||
128 | evas_object_show(bg); | ||
129 | |||
130 | box = elm_box_add(win); | ||
131 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
132 | elm_win_resize_object_add(win, box); | ||
133 | evas_object_show(box); | ||
134 | |||
135 | o = elm_button_add(win); | ||
136 | elm_object_text_set(o, "Inwin!"); | ||
137 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
138 | evas_object_size_hint_align_set(o, 0.0, 0.0); | ||
139 | elm_box_pack_end(box, o); | ||
140 | evas_object_show(o); | ||
141 | |||
142 | evas_object_smart_callback_add(o, "clicked", _btn_click_cb, NULL); | ||
143 | |||
144 | if (!strncmp(elm_config_engine_get(), "shot", 4)) | ||
145 | ecore_timer_add(0.1, _screenshot_hack_cb, o); | ||
146 | |||
147 | elm_run(); | ||
148 | elm_shutdown(); | ||
149 | |||
150 | return 0; | ||
151 | } | ||
152 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/label_example_01.c b/libraries/elementary/src/examples/label_example_01.c deleted file mode 100644 index 343f40e..0000000 --- a/libraries/elementary/src/examples/label_example_01.c +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o label_example_01 label_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | EAPI_MAIN int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg, *label, *label2, *label3, *label4, *label5, *label6; | ||
10 | |||
11 | win = elm_win_add(NULL, "label", ELM_WIN_BASIC); | ||
12 | elm_win_title_set(win, "Label"); | ||
13 | elm_win_autodel_set(win, EINA_TRUE); | ||
14 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
15 | |||
16 | bg = elm_bg_add(win); | ||
17 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
18 | elm_win_resize_object_add(win, bg); | ||
19 | evas_object_show(bg); | ||
20 | |||
21 | label = elm_label_add(win); | ||
22 | elm_object_text_set(label, "Some long text for our label, that is long but " | ||
23 | "not too long."); | ||
24 | elm_label_slide_duration_set(label, 3); | ||
25 | elm_label_slide_set(label, EINA_TRUE); | ||
26 | elm_object_style_set(label, "slide_bounce"); | ||
27 | evas_object_resize(label, 200, 15); | ||
28 | evas_object_show(label); | ||
29 | |||
30 | label2 = elm_label_add(win); | ||
31 | elm_object_text_set(label2, "This is the text for our second label, which is" | ||
32 | " much longer than the previous one, maybe even " | ||
33 | "too long, but maybe not."); | ||
34 | elm_label_ellipsis_set(label2, EINA_TRUE); | ||
35 | evas_object_resize(label2, 200, 15); | ||
36 | evas_object_move(label2, 0, 15); | ||
37 | evas_object_show(label2); | ||
38 | |||
39 | label3 = elm_label_add(win); | ||
40 | elm_object_text_set(label3, "Some more long text much as before, long but " | ||
41 | "not too long."); | ||
42 | elm_label_line_wrap_set(label3, ELM_WRAP_CHAR); | ||
43 | elm_label_ellipsis_set(label3, EINA_TRUE); | ||
44 | evas_object_resize(label3, 200, 15); | ||
45 | evas_object_move(label3, 0, 30); | ||
46 | evas_object_show(label3); | ||
47 | |||
48 | label4 = elm_label_add(win); | ||
49 | elm_object_text_set(label4, "And for this label we choose a different text, " | ||
50 | "for no reason other than that we can."); | ||
51 | elm_label_line_wrap_set(label4, ELM_WRAP_CHAR); | ||
52 | evas_object_resize(label4, 200, 30); | ||
53 | evas_object_move(label4, 0, 45); | ||
54 | evas_object_show(label4); | ||
55 | |||
56 | label5 = elm_label_add(win); | ||
57 | elm_object_text_set(label5, "And for this label we choose a different text, " | ||
58 | "for no reason other than that we can."); | ||
59 | elm_label_line_wrap_set(label5, ELM_WRAP_WORD); | ||
60 | evas_object_resize(label5, 200, 30); | ||
61 | evas_object_move(label5, 0, 75); | ||
62 | evas_object_show(label5); | ||
63 | |||
64 | label6 = elm_label_add(win); | ||
65 | elm_object_text_set(label6, "Short text"); | ||
66 | elm_object_style_set(label6, "marker"); | ||
67 | evas_object_color_set(label6, 255, 0, 0, 255); | ||
68 | evas_object_resize(label6, 200, 15); | ||
69 | evas_object_move(label6, 0, 105); | ||
70 | evas_object_show(label6); | ||
71 | |||
72 | evas_object_resize(win, 200, 125); | ||
73 | evas_object_show(win); | ||
74 | |||
75 | elm_run(); | ||
76 | elm_shutdown(); | ||
77 | |||
78 | return 0; | ||
79 | } | ||
80 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/layout_example_01.c b/libraries/elementary/src/examples/layout_example_01.c deleted file mode 100644 index dfe3865..0000000 --- a/libraries/elementary/src/examples/layout_example_01.c +++ /dev/null | |||
@@ -1,150 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g layout_example_01.c -o layout_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | #define TABLE "example/table" | ||
7 | #define BOX "example/box" | ||
8 | #define TITLE "example/title" | ||
9 | #define SWALLOW "example/custom" | ||
10 | |||
11 | static int _box_buttons = 0; | ||
12 | |||
13 | static void | ||
14 | _tbl_btn_cb(void *data, Evas_Object *btn, void *event_info) | ||
15 | { | ||
16 | Evas_Object *layout = data; | ||
17 | |||
18 | elm_layout_table_unpack(layout, TABLE, btn); | ||
19 | evas_object_del(btn); | ||
20 | } | ||
21 | |||
22 | static void | ||
23 | _box_btn_cb(void *data, Evas_Object *btn, void *event_info) | ||
24 | { | ||
25 | Evas_Object *layout = data; | ||
26 | Evas_Object *item; | ||
27 | char buf[30]; | ||
28 | |||
29 | snprintf(buf, sizeof(buf), "Button %02d", _box_buttons++); | ||
30 | |||
31 | item = elm_button_add(elm_object_parent_widget_get(layout)); | ||
32 | elm_object_text_set(item, buf); | ||
33 | evas_object_size_hint_weight_set(item, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
34 | evas_object_size_hint_align_set(item, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
35 | evas_object_size_hint_min_set(item, 100, 50); | ||
36 | elm_layout_box_insert_before(layout, BOX, item, btn); | ||
37 | evas_object_smart_callback_add(item, "clicked", _box_btn_cb, layout); | ||
38 | evas_object_show(item); | ||
39 | } | ||
40 | |||
41 | static void | ||
42 | _swallow_btn_cb(void *data, Evas_Object *btn, void *event_info) | ||
43 | { | ||
44 | Evas_Object *layout = data; | ||
45 | Evas_Object *item; | ||
46 | |||
47 | elm_layout_table_clear(layout, TABLE, EINA_TRUE); | ||
48 | elm_layout_box_remove_all(layout, BOX, EINA_TRUE); | ||
49 | item = elm_object_part_content_unset(layout, SWALLOW); | ||
50 | evas_object_del(item); | ||
51 | } | ||
52 | |||
53 | EAPI_MAIN int | ||
54 | elm_main(int argc, char **argv) | ||
55 | { | ||
56 | Evas_Object *win, *bg, *icon, *icon2, *bt, *bt2, *layout; | ||
57 | Evas_Object *clk; | ||
58 | Evas_Object *item; | ||
59 | char buf[PATH_MAX]; | ||
60 | |||
61 | elm_app_info_set(elm_main, "elementary", "examples/layout_example.edj"); | ||
62 | win = elm_win_add(NULL, "layout", ELM_WIN_BASIC); | ||
63 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
64 | elm_win_autodel_set(win, EINA_TRUE); | ||
65 | |||
66 | bg = elm_bg_add(win); | ||
67 | elm_bg_color_set(bg, 255,255 ,255); | ||
68 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
69 | elm_win_resize_object_add(win, bg); | ||
70 | evas_object_show(bg); | ||
71 | |||
72 | // Adding layout and filling it with widgets | ||
73 | layout = elm_layout_add(win); | ||
74 | evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
75 | elm_win_resize_object_add(win, layout); | ||
76 | snprintf(buf, sizeof(buf), "%s/examples/layout_example.edj", elm_app_data_dir_get()); | ||
77 | elm_layout_file_set(layout, buf, "example/mylayout"); | ||
78 | evas_object_show(layout); | ||
79 | |||
80 | // Setting title | ||
81 | const char *title = elm_layout_data_get(layout, "title"); | ||
82 | if (title) | ||
83 | { | ||
84 | elm_win_title_set(win, title); | ||
85 | elm_object_part_text_set(layout, TITLE, title); | ||
86 | } | ||
87 | |||
88 | // Add icon, clock and button to the table | ||
89 | icon = elm_icon_add(win); | ||
90 | elm_icon_standard_set(icon, "home"); | ||
91 | evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
92 | evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
93 | elm_layout_table_pack(layout, TABLE, icon, 0, 0, 1, 1); | ||
94 | evas_object_show(icon); | ||
95 | |||
96 | icon2 = elm_icon_add(win); | ||
97 | elm_icon_standard_set(icon2, "close"); | ||
98 | evas_object_size_hint_weight_set(icon2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
99 | evas_object_size_hint_align_set(icon2, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
100 | elm_layout_table_pack(layout, TABLE, icon2, 1, 0, 1, 1); | ||
101 | evas_object_show(icon2); | ||
102 | |||
103 | clk = elm_clock_add(win); | ||
104 | evas_object_size_hint_weight_set(clk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
105 | evas_object_size_hint_align_set(clk, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
106 | elm_layout_table_pack(layout, TABLE, clk, 2, 0, 1, 1); | ||
107 | evas_object_show(clk); | ||
108 | |||
109 | bt = elm_button_add(win); | ||
110 | elm_object_text_set(bt, "Click me!"); | ||
111 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
112 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
113 | elm_layout_table_pack(layout, TABLE, bt, 0, 1, 3, 1); | ||
114 | evas_object_smart_callback_add(bt, "clicked", _tbl_btn_cb, layout); | ||
115 | evas_object_show(bt); | ||
116 | |||
117 | item = elm_button_add(win); | ||
118 | elm_object_text_set(item, "Position 0"); | ||
119 | evas_object_size_hint_weight_set(item, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
120 | evas_object_size_hint_align_set(item, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
121 | evas_object_size_hint_min_set(item, 100, 50); | ||
122 | elm_layout_box_insert_at(layout, BOX, item, 0); | ||
123 | evas_object_smart_callback_add(item, "clicked", _box_btn_cb, layout); | ||
124 | evas_object_show(item); | ||
125 | |||
126 | item = elm_button_add(win); | ||
127 | elm_object_text_set(item, "Prepended"); | ||
128 | evas_object_size_hint_weight_set(item, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
129 | evas_object_size_hint_align_set(item, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
130 | evas_object_size_hint_min_set(item, 100, 50); | ||
131 | elm_layout_box_prepend(layout, BOX, item); | ||
132 | evas_object_smart_callback_add(item, "clicked", _box_btn_cb, layout); | ||
133 | evas_object_show(item); | ||
134 | |||
135 | bt2 = elm_button_add(win); | ||
136 | elm_object_text_set(bt2, "Delete All"); | ||
137 | elm_object_part_content_set(layout, SWALLOW, bt2); | ||
138 | evas_object_smart_callback_add(bt2, "clicked", _swallow_btn_cb, layout); | ||
139 | |||
140 | evas_object_size_hint_min_set(bg, 160, 160); | ||
141 | evas_object_size_hint_max_set(bg, 640, 640); | ||
142 | evas_object_resize(win, 320, 320); | ||
143 | evas_object_show(win); | ||
144 | |||
145 | elm_run(); | ||
146 | elm_shutdown(); | ||
147 | |||
148 | return 0; | ||
149 | } | ||
150 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/layout_example_02.c b/libraries/elementary/src/examples/layout_example_02.c deleted file mode 100644 index ed112e0..0000000 --- a/libraries/elementary/src/examples/layout_example_02.c +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g layout_example_02.c -o layout_example_02 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | #define TABLE "example/table" | ||
7 | #define BOX "example/box" | ||
8 | #define TITLE "example/title" | ||
9 | #define SWALLOW "example/custom" | ||
10 | |||
11 | static const char *images[] = { "home", "close", "arrow_up", "arrow_down", NULL }; | ||
12 | |||
13 | struct _App { | ||
14 | int current; | ||
15 | }; | ||
16 | |||
17 | static void | ||
18 | _signal_cb(void *data, Evas_Object *o, const char *emission, const char *source) | ||
19 | { | ||
20 | struct _App *app = data; | ||
21 | Evas_Object *icon = elm_object_part_content_get(o, "elm.swallow.content"); | ||
22 | |||
23 | printf("signal received\n"); | ||
24 | |||
25 | if (!strcmp("elm,action,back", emission)) | ||
26 | app->current--; | ||
27 | else if (!strcmp("elm,action,next", emission)) | ||
28 | app->current++; | ||
29 | |||
30 | if (app->current < 0) | ||
31 | app->current = sizeof(images) - 1; | ||
32 | else if (images[app->current] == NULL) | ||
33 | app->current = 0; | ||
34 | |||
35 | elm_icon_standard_set(icon, images[app->current]); | ||
36 | } | ||
37 | |||
38 | EAPI_MAIN int | ||
39 | elm_main(int argc, char **argv) | ||
40 | { | ||
41 | Evas_Object *win, *bg, *layout, *icon; | ||
42 | struct _App app; | ||
43 | |||
44 | app.current = 0; | ||
45 | |||
46 | win = elm_win_add(NULL, "layout", ELM_WIN_BASIC); | ||
47 | elm_win_title_set(win, "Layout"); | ||
48 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
49 | elm_win_autodel_set(win, EINA_TRUE); | ||
50 | |||
51 | bg = elm_bg_add(win); | ||
52 | elm_bg_color_set(bg, 255, 255, 255); | ||
53 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
54 | elm_win_resize_object_add(win, bg); | ||
55 | evas_object_show(bg); | ||
56 | |||
57 | // Adding layout and filling it with widgets | ||
58 | layout = elm_layout_add(win); | ||
59 | evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
60 | elm_win_resize_object_add(win, layout); | ||
61 | elm_layout_theme_set( | ||
62 | layout, "layout", "application", "content-back-next"); | ||
63 | evas_object_show(layout); | ||
64 | |||
65 | icon = elm_icon_add(win); | ||
66 | elm_icon_standard_set(icon, images[app.current]); | ||
67 | evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
68 | elm_object_part_content_set(layout, "elm.swallow.content", icon); | ||
69 | |||
70 | elm_object_signal_callback_add(layout, "elm,action,back", "", _signal_cb, &app); | ||
71 | elm_object_signal_callback_add(layout, "elm,action,next", "", _signal_cb, &app); | ||
72 | |||
73 | evas_object_size_hint_min_set(bg, 160, 160); | ||
74 | evas_object_size_hint_max_set(bg, 640, 640); | ||
75 | evas_object_resize(win, 320, 320); | ||
76 | evas_object_show(win); | ||
77 | |||
78 | elm_run(); | ||
79 | elm_shutdown(); | ||
80 | |||
81 | return 0; | ||
82 | } | ||
83 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/layout_example_03.c b/libraries/elementary/src/examples/layout_example_03.c deleted file mode 100644 index 8c4c7b7..0000000 --- a/libraries/elementary/src/examples/layout_example_03.c +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g layout_example_03.c -o layout_example_03 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | #define TITLE "example/title" | ||
7 | #define SWALLOW "example/custom" | ||
8 | |||
9 | static Eina_Bool _btn_large = EINA_FALSE; | ||
10 | |||
11 | static void | ||
12 | _swallow_btn_cb(void *data, Evas_Object *btn, void *event_info) | ||
13 | { | ||
14 | Evas_Object *layout = data; | ||
15 | |||
16 | if (_btn_large == EINA_FALSE) | ||
17 | { | ||
18 | _btn_large = EINA_TRUE; | ||
19 | elm_object_signal_emit(layout, "button,enlarge", ""); | ||
20 | elm_object_text_set(btn, "Reduce me!"); | ||
21 | } | ||
22 | else | ||
23 | { | ||
24 | _btn_large = EINA_FALSE; | ||
25 | elm_object_signal_emit(layout, "button,reduce", ""); | ||
26 | elm_object_text_set(btn, "Enlarge me!"); | ||
27 | } | ||
28 | } | ||
29 | |||
30 | static void | ||
31 | _size_changed_cb(void *data, Evas_Object *layout, const char *emission, const char *source) | ||
32 | { | ||
33 | Evas_Object *edje; | ||
34 | Evas_Coord w, h; | ||
35 | |||
36 | elm_layout_sizing_eval(layout); | ||
37 | edje = elm_layout_edje_get(layout); | ||
38 | edje_object_size_min_calc(edje, &w, &h); | ||
39 | printf("Minimum size for this theme: %dx%d\n", w, h); | ||
40 | } | ||
41 | |||
42 | EAPI_MAIN int | ||
43 | elm_main(int argc, char **argv) | ||
44 | { | ||
45 | Evas_Object *win, *bg, *btn, *layout; | ||
46 | char buf[PATH_MAX]; | ||
47 | |||
48 | elm_app_info_set(elm_main, "elementary", "examples/layout_example.edj"); | ||
49 | win = elm_win_add(NULL, "layout", ELM_WIN_BASIC); | ||
50 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
51 | elm_win_autodel_set(win, EINA_TRUE); | ||
52 | |||
53 | bg = elm_bg_add(win); | ||
54 | elm_bg_color_set(bg, 255,255 ,255); | ||
55 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
56 | elm_win_resize_object_add(win, bg); | ||
57 | evas_object_show(bg); | ||
58 | |||
59 | // Adding layout | ||
60 | layout = elm_layout_add(win); | ||
61 | evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
62 | elm_win_resize_object_add(win, layout); | ||
63 | snprintf(buf, sizeof(buf), "%s/examples/layout_example.edj", elm_app_data_dir_get()); | ||
64 | elm_layout_file_set(layout, buf, "example/mylayout3"); | ||
65 | evas_object_show(layout); | ||
66 | |||
67 | elm_object_signal_callback_add(layout, "size,changed", "", _size_changed_cb, layout); | ||
68 | |||
69 | // Setting title | ||
70 | const char *title = elm_layout_data_get(layout, "title"); | ||
71 | if (title) | ||
72 | { | ||
73 | elm_win_title_set(win, title); | ||
74 | elm_object_part_text_set(layout, TITLE, title); | ||
75 | } | ||
76 | |||
77 | btn = elm_button_add(win); | ||
78 | elm_object_text_set(btn, "Enlarge me!"); | ||
79 | evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
80 | evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
81 | elm_object_part_content_set(layout, SWALLOW, btn); | ||
82 | evas_object_smart_callback_add(btn, "clicked", _swallow_btn_cb, layout); | ||
83 | |||
84 | evas_object_size_hint_min_set(bg, 160, 160); | ||
85 | evas_object_size_hint_max_set(bg, 640, 640); | ||
86 | evas_object_resize(win, 160, 160); | ||
87 | evas_object_show(win); | ||
88 | |||
89 | elm_run(); | ||
90 | elm_shutdown(); | ||
91 | |||
92 | return 0; | ||
93 | } | ||
94 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/list_example_01.c b/libraries/elementary/src/examples/list_example_01.c deleted file mode 100644 index 4520859..0000000 --- a/libraries/elementary/src/examples/list_example_01.c +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>list widget</b> example, illustrating its | ||
3 | * creation. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g list_example_01.c -o list_example_01 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | EAPI_MAIN int | ||
23 | elm_main(int argc, char **argv) | ||
24 | { | ||
25 | Evas_Object *win, *bg, *bx, *li; | ||
26 | unsigned int i; | ||
27 | static const char *lbl[] = | ||
28 | { | ||
29 | "Sunday", | ||
30 | "Monday", | ||
31 | "Tuesday", | ||
32 | "Wednesday", | ||
33 | "Thursday", | ||
34 | "Friday", | ||
35 | "Saturday" | ||
36 | }; | ||
37 | |||
38 | win = elm_win_add(NULL, "list", ELM_WIN_BASIC); | ||
39 | elm_win_title_set(win, "List Example"); | ||
40 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
41 | |||
42 | bg = elm_bg_add(win); | ||
43 | elm_win_resize_object_add(win, bg); | ||
44 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
45 | evas_object_show(bg); | ||
46 | |||
47 | bx = elm_box_add(win); | ||
48 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
49 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
50 | elm_win_resize_object_add(win, bx); | ||
51 | evas_object_show(bx); | ||
52 | |||
53 | li = elm_list_add(win); | ||
54 | evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
55 | evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
56 | elm_box_pack_end(bx, li); | ||
57 | for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++) | ||
58 | elm_list_item_append(li, lbl[i], NULL, NULL, NULL, NULL); | ||
59 | |||
60 | evas_object_show(li); | ||
61 | elm_list_go(li); | ||
62 | |||
63 | evas_object_resize(win, 320, 240); | ||
64 | evas_object_show(win); | ||
65 | |||
66 | elm_run(); | ||
67 | elm_shutdown(); | ||
68 | |||
69 | return 0; | ||
70 | } | ||
71 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/list_example_02.c b/libraries/elementary/src/examples/list_example_02.c deleted file mode 100644 index 3360131..0000000 --- a/libraries/elementary/src/examples/list_example_02.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /** | ||
2 | * Elementary's <b>list widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g list_example_02.c -o list_example_02 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | EAPI_MAIN int | ||
23 | elm_main(int argc, char **argv) | ||
24 | { | ||
25 | Evas_Object *win, *bg, *bx, *li; | ||
26 | unsigned int i; | ||
27 | static const char *lbl[] = | ||
28 | { | ||
29 | "Sunday", | ||
30 | "Monday", | ||
31 | "Tuesday", | ||
32 | "Wednesday", | ||
33 | "Thursday", | ||
34 | "Friday", | ||
35 | "Saturday" | ||
36 | }; | ||
37 | |||
38 | win = elm_win_add(NULL, "list", ELM_WIN_BASIC); | ||
39 | elm_win_title_set(win, "List Example"); | ||
40 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
41 | |||
42 | bg = elm_bg_add(win); | ||
43 | elm_win_resize_object_add(win, bg); | ||
44 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
45 | evas_object_show(bg); | ||
46 | |||
47 | bx = elm_box_add(win); | ||
48 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
49 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
50 | elm_win_resize_object_add(win, bx); | ||
51 | evas_object_show(bx); | ||
52 | |||
53 | /* default */ | ||
54 | li = elm_list_add(win); | ||
55 | evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
56 | evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
57 | elm_box_pack_end(bx, li); | ||
58 | for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++) | ||
59 | elm_list_item_append(li, lbl[i], NULL, NULL, NULL, NULL); | ||
60 | |||
61 | /* display horizontally and set compress mode */ | ||
62 | elm_list_horizontal_set(li, EINA_TRUE); | ||
63 | elm_list_mode_set(li, ELM_LIST_COMPRESS); | ||
64 | |||
65 | /* enable multiple selection and always select */ | ||
66 | elm_list_multi_select_set(li, EINA_TRUE); | ||
67 | elm_list_select_mode_set(li, ELM_OBJECT_SELECT_MODE_ALWAYS); | ||
68 | |||
69 | /* set bounce and scroller policy */ | ||
70 | elm_list_bounce_set(li, EINA_TRUE, EINA_TRUE); | ||
71 | elm_list_scroller_policy_set(li, ELM_SCROLLER_POLICY_AUTO, | ||
72 | ELM_SCROLLER_POLICY_ON); | ||
73 | |||
74 | elm_list_go(li); | ||
75 | evas_object_show(li); | ||
76 | |||
77 | evas_object_resize(win, 320, 120); | ||
78 | evas_object_show(win); | ||
79 | |||
80 | elm_run(); | ||
81 | elm_shutdown(); | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/list_example_03.c b/libraries/elementary/src/examples/list_example_03.c deleted file mode 100644 index cc1549a..0000000 --- a/libraries/elementary/src/examples/list_example_03.c +++ /dev/null | |||
@@ -1,441 +0,0 @@ | |||
1 | /** | ||
2 | * Elementary's <b>list widget</b> example, illustrating its API, | ||
3 | * covering most of item functions. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g list_example_03.c -o list_example_03 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static int counter = 3; | ||
15 | |||
16 | static void | ||
17 | _on_done(void *data, | ||
18 | Evas_Object *obj, | ||
19 | void *event_info) | ||
20 | { | ||
21 | elm_exit(); | ||
22 | } | ||
23 | |||
24 | static void | ||
25 | _prepend_cb(void *data, Evas_Object *obj, void *event_info) | ||
26 | { | ||
27 | Elm_Object_Item *list_it; | ||
28 | Evas_Object *li = data; | ||
29 | char label[32]; | ||
30 | |||
31 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
32 | list_it = elm_list_item_prepend(li, label, NULL, NULL, NULL, NULL); | ||
33 | if (!list_it) | ||
34 | printf("Error adding item\n"); | ||
35 | } | ||
36 | |||
37 | static void | ||
38 | _add_cb(void *data, Evas_Object *obj, void *event_info) | ||
39 | { | ||
40 | Elm_Object_Item *list_it; | ||
41 | Evas_Object *li = data; | ||
42 | char label[32]; | ||
43 | |||
44 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
45 | list_it = elm_list_item_append(li, label, NULL, NULL, NULL, NULL); | ||
46 | if (!list_it) | ||
47 | printf("Error adding item\n"); | ||
48 | } | ||
49 | |||
50 | static void | ||
51 | _add_ic_cb(void *data, Evas_Object *obj, void *event_info) | ||
52 | { | ||
53 | Elm_Object_Item *list_it; | ||
54 | Evas_Object *ic, *li = data; | ||
55 | char label[32]; | ||
56 | |||
57 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
58 | ic = elm_icon_add(li); | ||
59 | elm_icon_standard_set(ic, "home"); | ||
60 | elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE); | ||
61 | |||
62 | list_it = elm_list_item_append(li, label, ic, NULL, NULL, NULL); | ||
63 | if (!list_it) | ||
64 | printf("Error adding item with icon\n"); | ||
65 | } | ||
66 | |||
67 | static void | ||
68 | _sel_cb(void *data, Evas_Object *obj, void *event_info) | ||
69 | { | ||
70 | Elm_Object_Item *list_it = event_info; | ||
71 | printf("Selected label: %s\n", elm_object_item_text_get(list_it)); | ||
72 | } | ||
73 | |||
74 | static void | ||
75 | _add_func_cb(void *data, Evas_Object *obj, void *event_info) | ||
76 | { | ||
77 | Elm_Object_Item *list_it; | ||
78 | Evas_Object *li = data; | ||
79 | char label[32]; | ||
80 | |||
81 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
82 | list_it = elm_list_item_append(li, label, NULL, NULL, _sel_cb, NULL); | ||
83 | if (!list_it) | ||
84 | printf("Error adding item\n"); | ||
85 | } | ||
86 | |||
87 | static void | ||
88 | _sel_data_cb(void *data, Evas_Object *obj, void *event_info) | ||
89 | { | ||
90 | char *content = data; | ||
91 | Elm_Object_Item *list_it = event_info; | ||
92 | printf("Selected label: %s with data: %s\n", | ||
93 | elm_object_item_text_get(list_it), content); | ||
94 | } | ||
95 | |||
96 | static void | ||
97 | _free_data(void *data, Evas_Object *obj, void *event_info) | ||
98 | { | ||
99 | free(data); | ||
100 | } | ||
101 | |||
102 | static void | ||
103 | _add_data_cb(void *data, Evas_Object *obj, void *event_info) | ||
104 | { | ||
105 | Elm_Object_Item *list_it; | ||
106 | Evas_Object *li = data; | ||
107 | char label[32]; | ||
108 | char *content = malloc(sizeof(char) * 32); | ||
109 | |||
110 | snprintf(content, 32, "Item content %i", counter); | ||
111 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
112 | list_it = elm_list_item_append(li, label, NULL, NULL, _sel_data_cb, content); | ||
113 | if (!list_it) { | ||
114 | printf("Error adding item\n"); | ||
115 | return; | ||
116 | } | ||
117 | elm_object_item_del_cb_set(list_it, _free_data); | ||
118 | } | ||
119 | |||
120 | static void | ||
121 | _del_cb(void *data, Evas_Object *obj, void *event_info) | ||
122 | { | ||
123 | Elm_Object_Item *selected_item; | ||
124 | Evas_Object *li = data; | ||
125 | |||
126 | selected_item = elm_list_selected_item_get(li); | ||
127 | elm_object_item_del(selected_item); | ||
128 | } | ||
129 | |||
130 | static void | ||
131 | _unselect_cb(void *data, Evas_Object *obj, void *event_info) | ||
132 | { | ||
133 | Elm_Object_Item *selected_item; | ||
134 | Evas_Object *li = data; | ||
135 | |||
136 | selected_item = elm_list_selected_item_get(li); | ||
137 | elm_list_item_selected_set(selected_item, EINA_FALSE); | ||
138 | } | ||
139 | |||
140 | static void | ||
141 | _print_cb(void *data, Evas_Object *obj, void *event_info) | ||
142 | { | ||
143 | const Eina_List *l, *items; | ||
144 | Elm_Object_Item *list_it; | ||
145 | Evas_Object *li = data; | ||
146 | |||
147 | items = elm_list_items_get(li); | ||
148 | EINA_LIST_FOREACH(items, l, list_it) | ||
149 | printf("%s\n", elm_object_item_text_get(list_it)); | ||
150 | } | ||
151 | |||
152 | static void | ||
153 | _clear_cb(void *data, Evas_Object *obj, void *event_info) | ||
154 | { | ||
155 | Evas_Object *li = data; | ||
156 | elm_list_clear(li); | ||
157 | } | ||
158 | |||
159 | static void | ||
160 | _select_next_cb(void *data, Evas_Object *obj, void *event_info) | ||
161 | { | ||
162 | Elm_Object_Item *selected_item, *next_item; | ||
163 | Evas_Object *li = data; | ||
164 | |||
165 | selected_item = elm_list_selected_item_get(li); | ||
166 | if (!selected_item) return; | ||
167 | |||
168 | next_item = elm_list_item_next(selected_item); | ||
169 | if (next_item) | ||
170 | elm_list_item_selected_set(next_item, EINA_TRUE); | ||
171 | } | ||
172 | |||
173 | static void | ||
174 | _insert_after_cb(void *data, Evas_Object *obj, void *event_info) | ||
175 | { | ||
176 | Elm_Object_Item *selected_item, *list_it; | ||
177 | Evas_Object *li = data; | ||
178 | char label[32]; | ||
179 | |||
180 | selected_item = elm_list_selected_item_get(li); | ||
181 | if (!selected_item) return; | ||
182 | |||
183 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
184 | list_it = elm_list_item_insert_after(li, selected_item, label, NULL, NULL, | ||
185 | NULL, NULL); | ||
186 | if (!list_it) | ||
187 | printf("Error adding item\n"); | ||
188 | } | ||
189 | |||
190 | static void | ||
191 | _select_prev_cb(void *data, Evas_Object *obj, void *event_info) | ||
192 | { | ||
193 | Elm_Object_Item *selected_item, *prev_item; | ||
194 | Evas_Object *li = data; | ||
195 | |||
196 | selected_item = elm_list_selected_item_get(li); | ||
197 | if (!selected_item) return; | ||
198 | |||
199 | prev_item = elm_list_item_prev(selected_item); | ||
200 | if (prev_item) | ||
201 | elm_list_item_selected_set(prev_item, EINA_TRUE); | ||
202 | } | ||
203 | |||
204 | static void | ||
205 | _insert_before_cb(void *data, Evas_Object *obj, void *event_info) | ||
206 | { | ||
207 | Elm_Object_Item *selected_item, *list_it; | ||
208 | Evas_Object *li = data; | ||
209 | char label[32]; | ||
210 | |||
211 | selected_item = elm_list_selected_item_get(li); | ||
212 | if (!selected_item) return; | ||
213 | |||
214 | snprintf(label, sizeof(label), "Item %i", counter++); | ||
215 | list_it = elm_list_item_insert_before(li, selected_item, label, NULL, NULL, | ||
216 | NULL, NULL); | ||
217 | if (!list_it) | ||
218 | printf("Error adding item\n"); | ||
219 | } | ||
220 | |||
221 | static void | ||
222 | _set_separator_cb(void *data, Evas_Object *obj, void *event_info) | ||
223 | { | ||
224 | Elm_Object_Item *selected_item; | ||
225 | Evas_Object *li = data; | ||
226 | |||
227 | selected_item = elm_list_selected_item_get(li); | ||
228 | if (!selected_item) return; | ||
229 | elm_list_item_separator_set(selected_item, EINA_TRUE); | ||
230 | } | ||
231 | |||
232 | static void | ||
233 | _disable_cb(void *data, Evas_Object *obj, void *event_info) | ||
234 | { | ||
235 | Elm_Object_Item *selected_item; | ||
236 | Evas_Object *li = data; | ||
237 | |||
238 | selected_item = elm_list_selected_item_get(li); | ||
239 | if (!selected_item) return; | ||
240 | elm_object_item_disabled_set(selected_item, EINA_TRUE); | ||
241 | } | ||
242 | |||
243 | EAPI_MAIN int | ||
244 | elm_main(int argc, char **argv) | ||
245 | { | ||
246 | Evas_Object *win, *bg, *bx, *hbx, *li, *bt; | ||
247 | |||
248 | win = elm_win_add(NULL, "list", ELM_WIN_BASIC); | ||
249 | elm_win_title_set(win, "List Items Example"); | ||
250 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
251 | |||
252 | bg = elm_bg_add(win); | ||
253 | elm_win_resize_object_add(win, bg); | ||
254 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
255 | evas_object_show(bg); | ||
256 | |||
257 | bx = elm_box_add(win); | ||
258 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
259 | elm_win_resize_object_add(win, bx); | ||
260 | evas_object_show(bx); | ||
261 | |||
262 | li = elm_list_add(win); | ||
263 | evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
264 | evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
265 | elm_box_pack_end(bx, li); | ||
266 | |||
267 | elm_list_item_append(li, "Item 0", NULL, NULL, NULL, NULL); | ||
268 | elm_list_item_append(li, "Item 1", NULL, NULL, NULL, NULL); | ||
269 | elm_list_item_append(li, "Item 2", NULL, NULL, NULL, NULL); | ||
270 | |||
271 | hbx = elm_box_add(win); | ||
272 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
273 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0); | ||
274 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0); | ||
275 | elm_box_pack_end(bx, hbx); | ||
276 | evas_object_show(hbx); | ||
277 | |||
278 | bt = elm_button_add(win); | ||
279 | elm_object_text_set(bt, "Prepend item"); | ||
280 | evas_object_smart_callback_add(bt, "clicked", _prepend_cb, li); | ||
281 | elm_box_pack_end(hbx, bt); | ||
282 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
283 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
284 | evas_object_show(bt); | ||
285 | |||
286 | bt = elm_button_add(win); | ||
287 | elm_object_text_set(bt, "Append item"); | ||
288 | evas_object_smart_callback_add(bt, "clicked", _add_cb, li); | ||
289 | elm_box_pack_end(hbx, bt); | ||
290 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
291 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
292 | evas_object_show(bt); | ||
293 | |||
294 | hbx = elm_box_add(win); | ||
295 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
296 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0); | ||
297 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0); | ||
298 | elm_box_pack_end(bx, hbx); | ||
299 | evas_object_show(hbx); | ||
300 | |||
301 | bt = elm_button_add(win); | ||
302 | elm_object_text_set(bt, "Append with icon"); | ||
303 | evas_object_smart_callback_add(bt, "clicked", _add_ic_cb, li); | ||
304 | elm_box_pack_end(hbx, bt); | ||
305 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
306 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
307 | evas_object_show(bt); | ||
308 | |||
309 | bt = elm_button_add(win); | ||
310 | elm_object_text_set(bt, "Append with selected function"); | ||
311 | evas_object_smart_callback_add(bt, "clicked", _add_func_cb, li); | ||
312 | elm_box_pack_end(hbx, bt); | ||
313 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
314 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
315 | evas_object_show(bt); | ||
316 | |||
317 | bt = elm_button_add(win); | ||
318 | elm_object_text_set(bt, "Append with data"); | ||
319 | evas_object_smart_callback_add(bt, "clicked", _add_data_cb, li); | ||
320 | elm_box_pack_end(hbx, bt); | ||
321 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
322 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
323 | evas_object_show(bt); | ||
324 | |||
325 | hbx = elm_box_add(win); | ||
326 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
327 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0); | ||
328 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0); | ||
329 | elm_box_pack_end(bx, hbx); | ||
330 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
331 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
332 | evas_object_show(hbx); | ||
333 | |||
334 | bt = elm_button_add(win); | ||
335 | elm_object_text_set(bt, "Delete item"); | ||
336 | evas_object_smart_callback_add(bt, "clicked", _del_cb, li); | ||
337 | elm_box_pack_end(hbx, bt); | ||
338 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
339 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
340 | evas_object_show(bt); | ||
341 | |||
342 | bt = elm_button_add(win); | ||
343 | elm_object_text_set(bt, "Unselect item"); | ||
344 | evas_object_smart_callback_add(bt, "clicked", _unselect_cb, li); | ||
345 | elm_box_pack_end(hbx, bt); | ||
346 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
347 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
348 | evas_object_show(bt); | ||
349 | |||
350 | bt = elm_button_add(win); | ||
351 | elm_object_text_set(bt, "Print items"); | ||
352 | evas_object_smart_callback_add(bt, "clicked", _print_cb, li); | ||
353 | elm_box_pack_end(hbx, bt); | ||
354 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
355 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
356 | evas_object_show(bt); | ||
357 | |||
358 | bt = elm_button_add(win); | ||
359 | elm_object_text_set(bt, "Clear"); | ||
360 | evas_object_smart_callback_add(bt, "clicked", _clear_cb, li); | ||
361 | elm_box_pack_end(hbx, bt); | ||
362 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
363 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
364 | evas_object_show(bt); | ||
365 | |||
366 | hbx = elm_box_add(win); | ||
367 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
368 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0); | ||
369 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0); | ||
370 | elm_box_pack_end(bx, hbx); | ||
371 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
372 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
373 | evas_object_show(hbx); | ||
374 | |||
375 | bt = elm_button_add(win); | ||
376 | elm_object_text_set(bt, "Select next item"); | ||
377 | evas_object_smart_callback_add(bt, "clicked", _select_next_cb, li); | ||
378 | elm_box_pack_end(hbx, bt); | ||
379 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
380 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
381 | evas_object_show(bt); | ||
382 | |||
383 | bt = elm_button_add(win); | ||
384 | elm_object_text_set(bt, "Insert after item"); | ||
385 | evas_object_smart_callback_add(bt, "clicked", _insert_after_cb, li); | ||
386 | elm_box_pack_end(hbx, bt); | ||
387 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
388 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
389 | evas_object_show(bt); | ||
390 | |||
391 | bt = elm_button_add(win); | ||
392 | elm_object_text_set(bt, "Select previous item"); | ||
393 | evas_object_smart_callback_add(bt, "clicked", _select_prev_cb, li); | ||
394 | elm_box_pack_end(hbx, bt); | ||
395 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
396 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
397 | evas_object_show(bt); | ||
398 | |||
399 | bt = elm_button_add(win); | ||
400 | elm_object_text_set(bt, "Insert before item"); | ||
401 | evas_object_smart_callback_add(bt, "clicked", _insert_before_cb, li); | ||
402 | elm_box_pack_end(hbx, bt); | ||
403 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
404 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
405 | evas_object_show(bt); | ||
406 | |||
407 | hbx = elm_box_add(win); | ||
408 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
409 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, 0); | ||
410 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, 0); | ||
411 | elm_box_pack_end(bx, hbx); | ||
412 | evas_object_show(hbx); | ||
413 | |||
414 | bt = elm_button_add(win); | ||
415 | elm_object_text_set(bt, "Set as separator"); | ||
416 | evas_object_smart_callback_add(bt, "clicked", _set_separator_cb, li); | ||
417 | elm_box_pack_end(hbx, bt); | ||
418 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
419 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
420 | evas_object_show(bt); | ||
421 | |||
422 | bt = elm_button_add(win); | ||
423 | elm_object_text_set(bt, "Disable item"); | ||
424 | evas_object_smart_callback_add(bt, "clicked", _disable_cb, li); | ||
425 | elm_box_pack_end(hbx, bt); | ||
426 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0); | ||
427 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
428 | evas_object_show(bt); | ||
429 | |||
430 | elm_list_go(li); | ||
431 | evas_object_show(li); | ||
432 | |||
433 | evas_object_resize(win, 320, 600); | ||
434 | evas_object_show(win); | ||
435 | |||
436 | elm_run(); | ||
437 | elm_shutdown(); | ||
438 | |||
439 | return 0; | ||
440 | } | ||
441 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/map_example_01.c b/libraries/elementary/src/examples/map_example_01.c deleted file mode 100644 index 3c549b2..0000000 --- a/libraries/elementary/src/examples/map_example_01.c +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>map widget</b> example, illustrating its | ||
3 | * creation. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g map_example_01.c -o map_example_01 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _bt_zoom_in(void *data, Evas_Object *obj, void *ev) | ||
16 | { | ||
17 | int zoom; | ||
18 | elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); | ||
19 | zoom = elm_map_zoom_get(data); | ||
20 | elm_map_zoom_set(data, zoom + 1); | ||
21 | } | ||
22 | |||
23 | static void | ||
24 | _bt_zoom_out(void *data, Evas_Object *obj, void *ev) | ||
25 | { | ||
26 | int zoom; | ||
27 | elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); | ||
28 | zoom = elm_map_zoom_get(data); | ||
29 | elm_map_zoom_set(data, zoom - 1); | ||
30 | } | ||
31 | |||
32 | static void | ||
33 | _bt_zoom_fit(void *data, Evas_Object *obj, void *event_info) | ||
34 | { | ||
35 | elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FIT); | ||
36 | } | ||
37 | |||
38 | static void | ||
39 | _bt_zoom_fill(void *data, Evas_Object *obj, void *event_info) | ||
40 | { | ||
41 | elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FILL); | ||
42 | } | ||
43 | |||
44 | static void | ||
45 | _on_done(void *data, Evas_Object *obj, void *event_info) | ||
46 | { | ||
47 | elm_exit(); | ||
48 | } | ||
49 | |||
50 | /* FIXME: it shouldn't be required. For unknown reason map won't call | ||
51 | * pan_calculate until shot delay time, but then it will take a screenshot | ||
52 | * when the map isn't loaded yet (actually it won't be downloaded, because | ||
53 | * after the SS it will kill the example). */ | ||
54 | static Eina_Bool | ||
55 | _nasty_hack(void *data) | ||
56 | { | ||
57 | Evas_Object *o = data; | ||
58 | Evas *e = evas_object_evas_get(o); | ||
59 | evas_smart_objects_calculate(e); | ||
60 | return ECORE_CALLBACK_CANCEL; | ||
61 | } | ||
62 | |||
63 | EAPI_MAIN int | ||
64 | elm_main(int argc, char **argv) | ||
65 | { | ||
66 | Evas_Object *win, *bg, *map, *box, *bt; | ||
67 | |||
68 | win = elm_win_add(NULL, "map", ELM_WIN_BASIC); | ||
69 | elm_win_title_set(win, "Map Creation Example"); | ||
70 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
71 | |||
72 | bg = elm_bg_add(win); | ||
73 | elm_win_resize_object_add(win, bg); | ||
74 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
75 | evas_object_show(bg); | ||
76 | |||
77 | map = elm_map_add(win); | ||
78 | elm_win_resize_object_add(win, map); | ||
79 | evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
80 | evas_object_show(map); | ||
81 | |||
82 | box = elm_box_add(win); | ||
83 | evas_object_show(box); | ||
84 | |||
85 | bt = elm_button_add(win); | ||
86 | elm_object_text_set(bt, "+"); | ||
87 | elm_box_pack_end(box, bt); | ||
88 | evas_object_show(bt); | ||
89 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_in, map); | ||
90 | |||
91 | bt = elm_button_add(win); | ||
92 | elm_object_text_set(bt, "-"); | ||
93 | elm_box_pack_end(box, bt); | ||
94 | evas_object_show(bt); | ||
95 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_out, map); | ||
96 | |||
97 | bt = elm_button_add(win); | ||
98 | elm_object_text_set(bt, "X"); | ||
99 | elm_box_pack_end(box, bt); | ||
100 | evas_object_show(bt); | ||
101 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fit, map); | ||
102 | |||
103 | bt = elm_button_add(win); | ||
104 | elm_object_text_set(bt, "#"); | ||
105 | elm_box_pack_end(box, bt); | ||
106 | evas_object_show(bt); | ||
107 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fill, map); | ||
108 | |||
109 | elm_map_zoom_set(map, 12); | ||
110 | elm_map_region_show(map, -43.2, -22.9); | ||
111 | evas_object_resize(win, 512, 512); | ||
112 | evas_object_show(win); | ||
113 | |||
114 | ecore_timer_add(0.5, _nasty_hack, win); | ||
115 | |||
116 | elm_run(); | ||
117 | elm_shutdown(); | ||
118 | |||
119 | return 0; | ||
120 | } | ||
121 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/map_example_02.c b/libraries/elementary/src/examples/map_example_02.c deleted file mode 100644 index 43e300a..0000000 --- a/libraries/elementary/src/examples/map_example_02.c +++ /dev/null | |||
@@ -1,277 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>map widget</b> example, illustrating overlays | ||
3 | * usage. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g map_example_02.c -o map_example_02 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | typedef struct _Overlay_Data | ||
15 | { | ||
16 | const char *name; | ||
17 | const char *file; | ||
18 | } Overlay_Data; | ||
19 | |||
20 | Overlay_Data data_argentina = {"Argentina", NULL}; | ||
21 | Overlay_Data data_chile = {"Chile", NULL}; | ||
22 | Overlay_Data data_sampa = {"São Paulo", NULL}; | ||
23 | Overlay_Data data_rio = {"Rio de Janeiro", NULL}; | ||
24 | Overlay_Data data_brasilia = {"BrasÃlia", NULL}; | ||
25 | |||
26 | static Elm_Map_Overlay *bubble; | ||
27 | const char *data_dir; | ||
28 | |||
29 | static Evas_Object * | ||
30 | _icon_get(Evas_Object *obj, const char *file) | ||
31 | { | ||
32 | Evas_Object *icon = elm_icon_add(obj); | ||
33 | elm_icon_file_set(icon, file, NULL); | ||
34 | evas_object_show(icon); | ||
35 | return icon; | ||
36 | } | ||
37 | |||
38 | static Evas_Object * | ||
39 | _city_icon_get(Evas_Object *obj) | ||
40 | { | ||
41 | char buf[256]; | ||
42 | snprintf(buf, sizeof(buf), "%s/images/icon_07.png", data_dir); | ||
43 | return _icon_get(obj, buf); | ||
44 | } | ||
45 | |||
46 | static Evas_Object * | ||
47 | _clas_city_icon_get(Evas_Object *obj) | ||
48 | { | ||
49 | char buf[256]; | ||
50 | snprintf(buf, sizeof(buf), "%s/images/icon_05.png", data_dir); | ||
51 | return _icon_get(obj, buf); | ||
52 | } | ||
53 | |||
54 | static Evas_Object * | ||
55 | _country_icon_get(Evas_Object *obj) | ||
56 | { | ||
57 | char buf[256]; | ||
58 | snprintf(buf, sizeof(buf), "%s/images/icon_06.png", data_dir); | ||
59 | return _icon_get(obj, buf); | ||
60 | } | ||
61 | |||
62 | static Evas_Object * | ||
63 | _clas_country_icon_get(Evas_Object *obj) | ||
64 | { | ||
65 | char buf[256]; | ||
66 | snprintf(buf, sizeof(buf), "%s/images/icon_04.png", data_dir); | ||
67 | return _icon_get(obj, buf); | ||
68 | } | ||
69 | |||
70 | static Evas_Object * | ||
71 | _box_get(Evas_Object *obj, Overlay_Data *data) | ||
72 | { | ||
73 | Evas_Object *bx, *img, *label; | ||
74 | bx = elm_box_add(obj); | ||
75 | evas_object_show(bx); | ||
76 | |||
77 | img = evas_object_image_add(evas_object_evas_get(obj)); | ||
78 | evas_object_image_file_set(img, data->file, NULL); | ||
79 | evas_object_image_filled_set(img, EINA_TRUE); | ||
80 | evas_object_size_hint_min_set(img, 64, 64); | ||
81 | evas_object_show(img); | ||
82 | elm_box_pack_end(bx, img); | ||
83 | |||
84 | label = elm_label_add(obj); | ||
85 | elm_object_text_set(label, data->name); | ||
86 | evas_object_show(label); | ||
87 | elm_box_pack_end(bx, label); | ||
88 | return bx; | ||
89 | } | ||
90 | |||
91 | static void | ||
92 | _overlay_cb(void *data, Evas_Object *map, void *ev) | ||
93 | { | ||
94 | printf("Overlay clicked\n"); | ||
95 | Elm_Map_Overlay *overlay = ev; | ||
96 | Evas_Object *bx; | ||
97 | |||
98 | // prevent duplication | ||
99 | if (!bubble) bubble = elm_map_overlay_bubble_add(map); | ||
100 | |||
101 | elm_map_overlay_bubble_follow(bubble, overlay); | ||
102 | elm_map_overlay_bubble_content_clear(bubble); | ||
103 | bx = _box_get(map, elm_map_overlay_data_get(overlay)); | ||
104 | elm_map_overlay_bubble_content_append(bubble, bx); | ||
105 | } | ||
106 | |||
107 | static void | ||
108 | _bt_zoom_in(void *data, Evas_Object *obj, void *ev) | ||
109 | { | ||
110 | Evas_Object *map = data; | ||
111 | int zoom; | ||
112 | |||
113 | elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_MANUAL); | ||
114 | zoom = elm_map_zoom_get(map); | ||
115 | elm_map_zoom_set(map, zoom + 1); | ||
116 | } | ||
117 | |||
118 | static void | ||
119 | _bt_zoom_out(void *data, Evas_Object *obj, void *ev) | ||
120 | { | ||
121 | Evas_Object *map = data; | ||
122 | int zoom; | ||
123 | |||
124 | elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_MANUAL); | ||
125 | zoom = elm_map_zoom_get(map); | ||
126 | elm_map_zoom_set(map, zoom - 1); | ||
127 | } | ||
128 | |||
129 | static void | ||
130 | _bt_zoom_fit(void *data, Evas_Object *obj, void *event_info) | ||
131 | { | ||
132 | Evas_Object *map = data; | ||
133 | elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_AUTO_FIT); | ||
134 | } | ||
135 | |||
136 | static void | ||
137 | _bt_zoom_fill(void *data, Evas_Object *obj, void *event_info) | ||
138 | { | ||
139 | Evas_Object *map = data; | ||
140 | elm_map_zoom_mode_set(map, ELM_MAP_ZOOM_MODE_AUTO_FILL); | ||
141 | } | ||
142 | |||
143 | static void | ||
144 | _on_done(void *data, Evas_Object *obj, void *event_info) | ||
145 | { | ||
146 | elm_exit(); | ||
147 | } | ||
148 | |||
149 | /* FIXME: it shouldn't be required. For unknown reason map won't call | ||
150 | * pan_calculate until shot delay time, but then it will take a screenshot | ||
151 | * when the map isn't loaded yet (actually it won't be downloaded, because | ||
152 | * after the SS it will kill the example). */ | ||
153 | static Eina_Bool | ||
154 | _nasty_hack(void *data) | ||
155 | { | ||
156 | Evas_Object *o = data; | ||
157 | Evas *e = evas_object_evas_get(o); | ||
158 | evas_smart_objects_calculate(e); | ||
159 | return ECORE_CALLBACK_CANCEL; | ||
160 | } | ||
161 | |||
162 | EAPI_MAIN int | ||
163 | elm_main(int argc, char **argv) | ||
164 | { | ||
165 | Evas_Object *win, *bg, *map, *box, *bt; | ||
166 | Eina_List *ovls = NULL; | ||
167 | Elm_Map_Overlay *ovl, *city_clas, *country_clas; | ||
168 | char buf[255]; | ||
169 | |||
170 | elm_app_info_set(elm_main, "elementary", "images"); | ||
171 | data_dir = elm_app_data_dir_get(); | ||
172 | |||
173 | snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", "sdf"); | ||
174 | data_argentina.file = strdup(buf); | ||
175 | snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", "sdf"); | ||
176 | data_chile.file = strdup(buf); | ||
177 | snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", "sdf"); | ||
178 | data_sampa.file = strdup(buf); | ||
179 | snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", "sdf"); | ||
180 | data_rio.file = strdup(buf); | ||
181 | snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", "sdf"); | ||
182 | data_brasilia.file = strdup(buf); | ||
183 | |||
184 | win = elm_win_add(NULL, "map", ELM_WIN_BASIC); | ||
185 | elm_win_title_set(win, "Map Overlay Example"); | ||
186 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
187 | |||
188 | bg = elm_bg_add(win); | ||
189 | elm_win_resize_object_add(win, bg); | ||
190 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
191 | evas_object_show(bg); | ||
192 | |||
193 | map = elm_map_add(win); | ||
194 | elm_win_resize_object_add(win, map); | ||
195 | evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
196 | evas_object_show(map); | ||
197 | |||
198 | box = elm_box_add(win); | ||
199 | evas_object_show(box); | ||
200 | |||
201 | bt = elm_button_add(win); | ||
202 | elm_object_text_set(bt, "+"); | ||
203 | elm_box_pack_end(box, bt); | ||
204 | evas_object_show(bt); | ||
205 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_in, map); | ||
206 | |||
207 | bt = elm_button_add(win); | ||
208 | elm_object_text_set(bt, "-"); | ||
209 | elm_box_pack_end(box, bt); | ||
210 | evas_object_show(bt); | ||
211 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_out, map); | ||
212 | |||
213 | bt = elm_button_add(win); | ||
214 | elm_object_text_set(bt, "X"); | ||
215 | elm_box_pack_end(box, bt); | ||
216 | evas_object_show(bt); | ||
217 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fit, map); | ||
218 | |||
219 | bt = elm_button_add(win); | ||
220 | elm_object_text_set(bt, "#"); | ||
221 | elm_box_pack_end(box, bt); | ||
222 | evas_object_show(bt); | ||
223 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fill, map); | ||
224 | |||
225 | evas_object_smart_callback_add(map, "overlay,clicked", _overlay_cb, NULL); | ||
226 | |||
227 | city_clas = elm_map_overlay_class_add(map); | ||
228 | elm_map_overlay_displayed_zoom_min_set(city_clas, 3); | ||
229 | elm_map_overlay_icon_set(city_clas, _clas_city_icon_get(map)); | ||
230 | |||
231 | country_clas = elm_map_overlay_class_add(map); | ||
232 | elm_map_overlay_displayed_zoom_min_set(country_clas, 1); | ||
233 | elm_map_overlay_icon_set(country_clas, _clas_country_icon_get(map)); | ||
234 | |||
235 | ovl = elm_map_overlay_add(map, -43.2, -22.9); | ||
236 | elm_map_overlay_icon_set(ovl, _city_icon_get(map)); | ||
237 | elm_map_overlay_data_set(ovl, &data_rio); | ||
238 | elm_map_overlay_class_append(city_clas, ovl); | ||
239 | ovls = eina_list_append(ovls, ovl); | ||
240 | |||
241 | ovl = elm_map_overlay_add(map, -46.63, -23.55); | ||
242 | elm_map_overlay_icon_set(ovl, _city_icon_get(map)); | ||
243 | elm_map_overlay_data_set(ovl, &data_sampa); | ||
244 | elm_map_overlay_class_append(city_clas, ovl); | ||
245 | ovls = eina_list_append(ovls, ovl); | ||
246 | |||
247 | ovl = elm_map_overlay_add(map, -47.88, -15.78); | ||
248 | elm_map_overlay_icon_set(ovl, _city_icon_get(map)); | ||
249 | elm_map_overlay_data_set(ovl, &data_brasilia); | ||
250 | elm_map_overlay_class_append(city_clas, ovl); | ||
251 | ovls = eina_list_append(ovls, ovl); | ||
252 | |||
253 | ovl = elm_map_overlay_add(map, -65.23, -35.1); | ||
254 | elm_map_overlay_icon_set(ovl, _country_icon_get(map)); | ||
255 | elm_map_overlay_data_set(ovl, &data_argentina); | ||
256 | elm_map_overlay_class_append(country_clas, ovl); | ||
257 | ovls = eina_list_append(ovls, ovl); | ||
258 | |||
259 | ovl = elm_map_overlay_add(map, -71.3, -31.75); | ||
260 | elm_map_overlay_icon_set(ovl, _country_icon_get(map)); | ||
261 | elm_map_overlay_data_set(ovl, &data_chile); | ||
262 | elm_map_overlay_class_append(country_clas, ovl); | ||
263 | ovls = eina_list_append(ovls, ovl); | ||
264 | |||
265 | elm_map_overlays_show(ovls); | ||
266 | |||
267 | evas_object_resize(win, 512, 512); | ||
268 | evas_object_show(win); | ||
269 | |||
270 | ecore_timer_add(1, _nasty_hack, win); | ||
271 | |||
272 | elm_run(); | ||
273 | elm_shutdown(); | ||
274 | |||
275 | return 0; | ||
276 | } | ||
277 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/map_example_03.c b/libraries/elementary/src/examples/map_example_03.c deleted file mode 100644 index 2263707..0000000 --- a/libraries/elementary/src/examples/map_example_03.c +++ /dev/null | |||
@@ -1,208 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>map widget</b> example, illustrating route and | ||
3 | * name usage. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g map_example_03.c -o map_example_03 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | typedef struct _Example_Data | ||
15 | { | ||
16 | Evas_Object *map, *entry; | ||
17 | Elm_Map_Route *route; | ||
18 | double start_lon, start_lat, dest_lon, dest_lat; | ||
19 | Elm_Map_Name *name; | ||
20 | Elm_Map_Overlay *route_ovl; | ||
21 | } Example_Data; | ||
22 | |||
23 | static Example_Data example_data; | ||
24 | |||
25 | static void | ||
26 | _route_loaded(void *data, Evas_Object *obj, void *ev) | ||
27 | { | ||
28 | Example_Data *exam_data = data; | ||
29 | |||
30 | exam_data->route_ovl = elm_map_overlay_route_add(obj, exam_data->route); | ||
31 | elm_map_overlay_color_set(exam_data->route_ovl, 0, 255, 0, 255); | ||
32 | } | ||
33 | |||
34 | static void | ||
35 | _name_loaded(void *data, Evas_Object *obj, void *ev) | ||
36 | { | ||
37 | Example_Data *exam_data = data; | ||
38 | Evas_Object *map = obj; | ||
39 | |||
40 | if (exam_data->route) | ||
41 | elm_map_route_del(exam_data->route); | ||
42 | |||
43 | elm_map_name_region_get(exam_data->name, &(exam_data->dest_lon), | ||
44 | &(exam_data->dest_lat)); | ||
45 | |||
46 | exam_data->route = elm_map_route_add(map, ELM_MAP_ROUTE_TYPE_FOOT, | ||
47 | ELM_MAP_ROUTE_METHOD_SHORTEST, | ||
48 | exam_data->start_lon, exam_data->start_lat, | ||
49 | exam_data->dest_lon, exam_data->dest_lat, | ||
50 | NULL, NULL); | ||
51 | } | ||
52 | |||
53 | static void | ||
54 | _bt_route(void *data, Evas_Object *obj, void *ev) | ||
55 | { | ||
56 | Example_Data *exam_data = data; | ||
57 | Evas_Object *map; | ||
58 | char *address; | ||
59 | |||
60 | map = exam_data->map; | ||
61 | address = (char *)elm_object_text_get(exam_data->entry); | ||
62 | |||
63 | exam_data->name = elm_map_name_add(map, address, 0, 0, NULL, NULL); | ||
64 | |||
65 | evas_object_smart_callback_add(map, "name,loaded", _name_loaded, data); | ||
66 | evas_object_smart_callback_add(map, "route,loaded", _route_loaded, data); | ||
67 | } | ||
68 | |||
69 | static void | ||
70 | _bt_zoom_in(void *data, Evas_Object *obj, void *ev) | ||
71 | { | ||
72 | int zoom; | ||
73 | elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); | ||
74 | zoom = elm_map_zoom_get(data); | ||
75 | elm_map_zoom_set(data, zoom + 1); | ||
76 | } | ||
77 | |||
78 | static void | ||
79 | _bt_zoom_out(void *data, Evas_Object *obj, void *ev) | ||
80 | { | ||
81 | int zoom; | ||
82 | elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); | ||
83 | zoom = elm_map_zoom_get(data); | ||
84 | elm_map_zoom_set(data, zoom - 1); | ||
85 | } | ||
86 | |||
87 | static void | ||
88 | _bt_zoom_fit(void *data, Evas_Object *obj, void *event_info) | ||
89 | { | ||
90 | elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FIT); | ||
91 | } | ||
92 | |||
93 | static void | ||
94 | _bt_zoom_fill(void *data, Evas_Object *obj, void *event_info) | ||
95 | { | ||
96 | elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_AUTO_FILL); | ||
97 | } | ||
98 | |||
99 | static void | ||
100 | _on_done(void *data, Evas_Object *obj, void *event_info) | ||
101 | { | ||
102 | elm_exit(); | ||
103 | } | ||
104 | |||
105 | /* FIXME: it shouldn't be required. For unknown reason map won't call | ||
106 | * pan_calculate until shot delay time, but then it will take a screenshot | ||
107 | * when the map isn't loaded yet (actually it won't be downloaded, because | ||
108 | * after the SS it will kill the example). */ | ||
109 | static Eina_Bool | ||
110 | _nasty_hack(void *data) | ||
111 | { | ||
112 | Evas_Object *o = data; | ||
113 | Evas *e = evas_object_evas_get(o); | ||
114 | evas_smart_objects_calculate(e); | ||
115 | return ECORE_CALLBACK_CANCEL; | ||
116 | } | ||
117 | |||
118 | EAPI_MAIN int | ||
119 | elm_main(int argc, char **argv) | ||
120 | { | ||
121 | Evas_Object *win, *bg, *map, *box, *bt, *entry; | ||
122 | |||
123 | win = elm_win_add(NULL, "map", ELM_WIN_BASIC); | ||
124 | elm_win_title_set(win, "Map Route Example"); | ||
125 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
126 | |||
127 | bg = elm_bg_add(win); | ||
128 | elm_win_resize_object_add(win, bg); | ||
129 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
130 | evas_object_show(bg); | ||
131 | |||
132 | map = elm_map_add(win); | ||
133 | elm_win_resize_object_add(win, map); | ||
134 | evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
135 | evas_object_show(map); | ||
136 | |||
137 | box = elm_box_add(win); | ||
138 | evas_object_show(box); | ||
139 | |||
140 | bt = elm_button_add(win); | ||
141 | elm_object_text_set(bt, "+"); | ||
142 | elm_box_pack_end(box, bt); | ||
143 | evas_object_show(bt); | ||
144 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_in, map); | ||
145 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
146 | |||
147 | bt = elm_button_add(win); | ||
148 | elm_object_text_set(bt, "-"); | ||
149 | elm_box_pack_end(box, bt); | ||
150 | evas_object_show(bt); | ||
151 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_out, map); | ||
152 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
153 | |||
154 | bt = elm_button_add(win); | ||
155 | elm_object_text_set(bt, "X"); | ||
156 | elm_box_pack_end(box, bt); | ||
157 | evas_object_show(bt); | ||
158 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fit, map); | ||
159 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
160 | |||
161 | bt = elm_button_add(win); | ||
162 | elm_object_text_set(bt, "#"); | ||
163 | elm_box_pack_end(box, bt); | ||
164 | evas_object_show(bt); | ||
165 | evas_object_smart_callback_add(bt, "clicked", _bt_zoom_fill, map); | ||
166 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
167 | |||
168 | elm_box_horizontal_set(box, EINA_TRUE); | ||
169 | elm_win_resize_object_add(win, box); | ||
170 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
171 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0); | ||
172 | |||
173 | entry = elm_entry_add(win); | ||
174 | elm_entry_scrollable_set(entry, EINA_TRUE); | ||
175 | elm_entry_single_line_set(entry, EINA_TRUE); | ||
176 | elm_object_text_set(entry, "Jockey Club Brasileiro"); | ||
177 | evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
178 | evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0); | ||
179 | elm_box_pack_end(box, entry); | ||
180 | evas_object_show(entry); | ||
181 | |||
182 | bt = elm_button_add(win); | ||
183 | elm_object_text_set(bt, "Route"); | ||
184 | elm_box_pack_end(box, bt); | ||
185 | evas_object_show(bt); | ||
186 | evas_object_smart_callback_add(bt, "clicked", _bt_route, &example_data); | ||
187 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, 0); | ||
188 | |||
189 | example_data.map = map; | ||
190 | example_data.entry = entry; | ||
191 | example_data.route = NULL; | ||
192 | example_data.start_lon = -43.175; | ||
193 | example_data.start_lat = -22.97; | ||
194 | |||
195 | elm_map_zoom_set(map, 12); | ||
196 | elm_map_region_show(map, example_data.start_lon, example_data.start_lat); | ||
197 | |||
198 | evas_object_resize(win, 512, 512); | ||
199 | evas_object_show(win); | ||
200 | |||
201 | ecore_timer_add(0.5, _nasty_hack, win); | ||
202 | |||
203 | elm_run(); | ||
204 | elm_shutdown(); | ||
205 | |||
206 | return 0; | ||
207 | } | ||
208 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/mapbuf_example.c b/libraries/elementary/src/examples/mapbuf_example.c deleted file mode 100644 index 03603be..0000000 --- a/libraries/elementary/src/examples/mapbuf_example.c +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>mapbuf widget</b> example, illustrating its API. | ||
3 | * | ||
4 | * See stdout/stderr for output. Compile with: | ||
5 | * | ||
6 | * @verbatim | ||
7 | * gcc -g mapbuf_example.c -o mapbuf_example `pkg-config --cflags --libs elementary` | ||
8 | * @endverbatim | ||
9 | */ | ||
10 | |||
11 | #include <Elementary.h> | ||
12 | |||
13 | static void | ||
14 | _on_done(void *data, | ||
15 | Evas_Object *obj, | ||
16 | void *event_info) | ||
17 | { | ||
18 | elm_exit(); | ||
19 | } | ||
20 | |||
21 | static void | ||
22 | _enabled_cb(void *data, Evas_Object *obj, void *event_info) | ||
23 | { | ||
24 | Evas_Object *mb = data; | ||
25 | elm_mapbuf_enabled_set(mb, elm_check_state_get(obj)); | ||
26 | } | ||
27 | |||
28 | static void | ||
29 | _alpha_cb(void *data, Evas_Object *obj, void *event_info) | ||
30 | { | ||
31 | Evas_Object *mb = data; | ||
32 | elm_mapbuf_alpha_set(mb, elm_check_state_get(obj)); | ||
33 | } | ||
34 | |||
35 | static void | ||
36 | _smooth_cb(void *data, Evas_Object *obj, void *event_info) | ||
37 | { | ||
38 | Evas_Object *mb = data; | ||
39 | elm_mapbuf_smooth_set(mb, elm_check_state_get(obj)); | ||
40 | } | ||
41 | |||
42 | EAPI_MAIN int | ||
43 | elm_main(int argc, char **argv) | ||
44 | { | ||
45 | Evas_Object *win, *bg, *bx, *hbx, *tg, *ck, *mb, *tb, *ic; | ||
46 | unsigned int i, j; | ||
47 | |||
48 | win = elm_win_add(NULL, "mapbuf", ELM_WIN_BASIC); | ||
49 | elm_win_title_set(win, "Mapbuf Example"); | ||
50 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
51 | |||
52 | bg = elm_bg_add(win); | ||
53 | elm_win_resize_object_add(win, bg); | ||
54 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
55 | evas_object_show(bg); | ||
56 | |||
57 | bx = elm_box_add(win); | ||
58 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
59 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
60 | elm_win_resize_object_add(win, bx); | ||
61 | evas_object_show(bx); | ||
62 | |||
63 | mb = elm_mapbuf_add(win); | ||
64 | evas_object_size_hint_weight_set(mb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
65 | evas_object_size_hint_align_set(mb, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
66 | elm_box_pack_end(bx, mb); | ||
67 | |||
68 | tb = elm_table_add(win); | ||
69 | evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
70 | evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
71 | evas_object_show(tb); | ||
72 | |||
73 | for (i = 0; i < 8; i++) | ||
74 | { | ||
75 | for (j = 0; j < 8; j++) | ||
76 | { | ||
77 | ic = elm_icon_add(win); | ||
78 | elm_icon_standard_set(ic, "home"); | ||
79 | elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE); | ||
80 | evas_object_show(ic); | ||
81 | elm_table_pack(tb, ic, i, j, 1, 1); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | elm_object_content_set(mb, tb); | ||
86 | evas_object_show(mb); | ||
87 | |||
88 | hbx = elm_box_add(win); | ||
89 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
90 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
91 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
92 | elm_box_pack_end(bx, hbx); | ||
93 | evas_object_show(hbx); | ||
94 | |||
95 | tg = elm_check_add(win); | ||
96 | elm_object_style_set(tg, "toggle"); | ||
97 | elm_object_part_text_set(tg, "on", "Enabled"); | ||
98 | elm_object_part_text_set(tg, "off", "Disabled"); | ||
99 | elm_object_text_set(tg, "Map"); | ||
100 | evas_object_smart_callback_add(tg, "changed", _enabled_cb, mb); | ||
101 | elm_box_pack_end(hbx, tg); | ||
102 | evas_object_show(tg); | ||
103 | |||
104 | ck = elm_check_add(win); | ||
105 | elm_object_text_set(ck, "Alpha"); | ||
106 | elm_check_state_set(ck, EINA_TRUE); | ||
107 | evas_object_smart_callback_add(ck, "changed", _alpha_cb, mb); | ||
108 | elm_box_pack_end(hbx, ck); | ||
109 | evas_object_show(ck); | ||
110 | |||
111 | ck = elm_check_add(win); | ||
112 | elm_object_text_set(ck, "Smooth"); | ||
113 | elm_check_state_set(ck, EINA_TRUE); | ||
114 | evas_object_smart_callback_add(ck, "changed", _smooth_cb, mb); | ||
115 | elm_box_pack_end(hbx, ck); | ||
116 | evas_object_show(ck); | ||
117 | |||
118 | evas_object_resize(win, 240, 320); | ||
119 | evas_object_show(win); | ||
120 | |||
121 | elm_run(); | ||
122 | elm_shutdown(); | ||
123 | |||
124 | return 0; | ||
125 | } | ||
126 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/menu_example_01.c b/libraries/elementary/src/examples/menu_example_01.c deleted file mode 100644 index bb64f29..0000000 --- a/libraries/elementary/src/examples/menu_example_01.c +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g menu_example_01.c -o menu_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | _del_it(void *data, Evas_Object *obj, void *event_info) | ||
8 | { | ||
9 | const Eina_List *l; | ||
10 | Elm_Object_Item *menu_it = elm_menu_first_item_get(data); | ||
11 | menu_it = elm_menu_item_next_get(menu_it); | ||
12 | l = elm_menu_item_subitems_get(menu_it); | ||
13 | elm_object_item_del(eina_list_data_get(l)); | ||
14 | } | ||
15 | |||
16 | static void | ||
17 | _show(void *data, Evas *e, Evas_Object *obj, void *event_info) | ||
18 | { | ||
19 | Evas_Event_Mouse_Down *ev = event_info; | ||
20 | elm_menu_move(data, ev->canvas.x, ev->canvas.y); | ||
21 | evas_object_show(data); | ||
22 | } | ||
23 | |||
24 | EAPI_MAIN int | ||
25 | elm_main(int argc, char **argv) | ||
26 | { | ||
27 | Evas_Object *win, *bg, *menu, *button, *rect; | ||
28 | Elm_Object_Item *menu_it, *menu_it1; | ||
29 | |||
30 | win = elm_win_add(NULL, "menu", ELM_WIN_BASIC); | ||
31 | elm_win_title_set(win, "Menu"); | ||
32 | elm_win_autodel_set(win, EINA_TRUE); | ||
33 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
34 | |||
35 | bg = elm_bg_add(win); | ||
36 | elm_win_resize_object_add(win, bg); | ||
37 | evas_object_show(bg); | ||
38 | |||
39 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
40 | elm_win_resize_object_add(win, rect); | ||
41 | evas_object_color_set(rect, 0, 0, 0, 0); | ||
42 | evas_object_show(rect); | ||
43 | |||
44 | menu = elm_menu_add(win); | ||
45 | elm_menu_item_add(menu, NULL, NULL, "first item", NULL, NULL); | ||
46 | menu_it = elm_menu_item_add(menu, NULL, "mail-reply-all", "second item", NULL, NULL); | ||
47 | |||
48 | elm_menu_item_add(menu, menu_it, "object-rotate-left", "menu 1", NULL, NULL); | ||
49 | button = elm_button_add(win); | ||
50 | elm_object_text_set(button, "button - delete items"); | ||
51 | menu_it1 = elm_menu_item_add(menu, menu_it, NULL, NULL, NULL, NULL); | ||
52 | elm_object_item_content_set(menu_it1, button); | ||
53 | evas_object_smart_callback_add(button, "clicked", _del_it, menu); | ||
54 | elm_menu_item_separator_add(menu, menu_it); | ||
55 | elm_menu_item_add(menu, menu_it, NULL, "third item", NULL, NULL); | ||
56 | elm_menu_item_add(menu, menu_it, NULL, "fourth item", NULL, NULL); | ||
57 | elm_menu_item_add(menu, menu_it, "window-new", "sub menu", NULL, NULL); | ||
58 | |||
59 | menu_it = elm_menu_item_add(menu, NULL, NULL, "third item", NULL, NULL); | ||
60 | elm_object_item_disabled_set(menu_it, EINA_TRUE); | ||
61 | |||
62 | evas_object_event_callback_add(rect, EVAS_CALLBACK_MOUSE_DOWN, _show, menu); | ||
63 | evas_object_show(menu); | ||
64 | |||
65 | evas_object_resize(win, 250, 350); | ||
66 | evas_object_show(win); | ||
67 | |||
68 | elm_run(); | ||
69 | elm_shutdown(); | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/notify_example_01.c b/libraries/elementary/src/examples/notify_example_01.c deleted file mode 100644 index 28456f8..0000000 --- a/libraries/elementary/src/examples/notify_example_01.c +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o notify_example_01 notify_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _hide(void *data, Evas_Object *obj, void *event_info); | ||
7 | |||
8 | EAPI_MAIN int | ||
9 | elm_main(int argc, char **argv) | ||
10 | { | ||
11 | Evas_Object *win, *bg, *bx, *notify, *content; | ||
12 | |||
13 | win = elm_win_add(NULL, "notify", ELM_WIN_BASIC); | ||
14 | elm_win_title_set(win, "Notify"); | ||
15 | elm_win_autodel_set(win, EINA_TRUE); | ||
16 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
17 | |||
18 | bg = elm_bg_add(win); | ||
19 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
20 | elm_win_resize_object_add(win, bg); | ||
21 | evas_object_show(bg); | ||
22 | |||
23 | bx = elm_box_add(win); | ||
24 | elm_box_horizontal_set(bx, EINA_FALSE); | ||
25 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
26 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
27 | elm_win_resize_object_add(win, bx); | ||
28 | evas_object_show(bx); | ||
29 | |||
30 | content = elm_label_add(win); | ||
31 | elm_object_text_set(content, "default"); | ||
32 | evas_object_show(content); | ||
33 | |||
34 | notify = elm_notify_add(win); | ||
35 | elm_notify_allow_events_set(notify, EINA_FALSE); | ||
36 | elm_notify_timeout_set(notify, 5); | ||
37 | elm_object_content_set(notify, content); | ||
38 | evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
39 | evas_object_show(notify); | ||
40 | elm_box_pack_end(bx, notify); | ||
41 | evas_object_smart_callback_add(notify, "block,clicked", _hide, NULL); | ||
42 | |||
43 | content = elm_label_add(win); | ||
44 | elm_object_text_set(content, "bottom"); | ||
45 | evas_object_show(content); | ||
46 | |||
47 | notify = elm_notify_add(win); | ||
48 | elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM); | ||
49 | elm_object_content_set(notify, content); | ||
50 | evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
51 | evas_object_show(notify); | ||
52 | elm_box_pack_end(bx, notify); | ||
53 | |||
54 | content = elm_label_add(win); | ||
55 | elm_object_text_set(content, "center"); | ||
56 | evas_object_show(content); | ||
57 | |||
58 | notify = elm_notify_add(win); | ||
59 | elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_CENTER); | ||
60 | elm_object_content_set(notify, content); | ||
61 | evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
62 | evas_object_show(notify); | ||
63 | elm_box_pack_end(bx, notify); | ||
64 | |||
65 | evas_object_resize(win, 100, 200); | ||
66 | evas_object_show(win); | ||
67 | |||
68 | elm_run(); | ||
69 | elm_shutdown(); | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | ELM_MAIN() | ||
74 | |||
75 | static void | ||
76 | _hide(void *data, Evas_Object *obj, void *event_info) | ||
77 | { | ||
78 | evas_object_hide(obj); | ||
79 | } | ||
diff --git a/libraries/elementary/src/examples/panel_example_01.c b/libraries/elementary/src/examples/panel_example_01.c deleted file mode 100644 index ec9276c..0000000 --- a/libraries/elementary/src/examples/panel_example_01.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g panel_example_01.c -o panel_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | EAPI_MAIN int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg, *bx, *panel, *content; | ||
10 | |||
11 | win = elm_win_add(NULL, "panel", ELM_WIN_BASIC); | ||
12 | elm_win_title_set(win, "Panel"); | ||
13 | elm_win_autodel_set(win, EINA_TRUE); | ||
14 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
15 | |||
16 | bg = elm_bg_add(win); | ||
17 | elm_win_resize_object_add(win, bg); | ||
18 | evas_object_show(bg); | ||
19 | |||
20 | bx = elm_box_add(win); | ||
21 | elm_box_horizontal_set(bx, EINA_FALSE); | ||
22 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
23 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
24 | elm_win_resize_object_add(win, bx); | ||
25 | evas_object_show(bx); | ||
26 | |||
27 | panel = elm_panel_add(win); | ||
28 | elm_panel_orient_set(panel, ELM_PANEL_ORIENT_TOP); | ||
29 | elm_panel_toggle(panel); | ||
30 | evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
31 | evas_object_size_hint_align_set(panel, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
32 | evas_object_show(panel); | ||
33 | elm_box_pack_end(bx, panel); | ||
34 | |||
35 | content = elm_label_add(win); | ||
36 | elm_object_text_set(content, "content"); | ||
37 | evas_object_show(content); | ||
38 | evas_object_size_hint_min_set(content, 100, 30); | ||
39 | elm_object_content_set(panel, content); | ||
40 | |||
41 | panel = elm_panel_add(win); | ||
42 | elm_panel_orient_set(panel, ELM_PANEL_ORIENT_RIGHT); | ||
43 | elm_panel_hidden_set(panel, EINA_TRUE); | ||
44 | evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
45 | evas_object_size_hint_align_set(panel, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
46 | evas_object_show(panel); | ||
47 | elm_box_pack_end(bx, panel); | ||
48 | |||
49 | content = elm_label_add(win); | ||
50 | elm_object_text_set(content, "content2"); | ||
51 | evas_object_show(content); | ||
52 | evas_object_size_hint_min_set(content, 100, 30); | ||
53 | elm_object_content_set(panel, content); | ||
54 | |||
55 | panel = elm_panel_add(win); | ||
56 | evas_object_size_hint_weight_set(panel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
57 | evas_object_size_hint_align_set(panel, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
58 | evas_object_show(panel); | ||
59 | elm_box_pack_end(bx, panel); | ||
60 | |||
61 | content = elm_label_add(win); | ||
62 | elm_object_text_set(content, "content2"); | ||
63 | evas_object_show(content); | ||
64 | evas_object_size_hint_min_set(content, 100, 30); | ||
65 | elm_object_content_set(panel, content); | ||
66 | |||
67 | |||
68 | evas_object_show(win); | ||
69 | |||
70 | elm_run(); | ||
71 | elm_shutdown(); | ||
72 | |||
73 | return 0; | ||
74 | } | ||
75 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/panes_example.c b/libraries/elementary/src/examples/panes_example.c deleted file mode 100644 index b8314ca..0000000 --- a/libraries/elementary/src/examples/panes_example.c +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>panes widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g panes_example.c -o panes_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | static double size = 0.0; | ||
23 | |||
24 | static void | ||
25 | _press(void *data, Evas_Object *obj, void *event_info) | ||
26 | { | ||
27 | printf("Pressed\n"); | ||
28 | } | ||
29 | |||
30 | static void | ||
31 | _unpress(void *data, Evas_Object *obj, void *event_info) | ||
32 | { | ||
33 | printf("Unpressed, size : %f\n", elm_panes_content_left_size_get(obj)); | ||
34 | } | ||
35 | |||
36 | static void | ||
37 | _clicked(void *data, Evas_Object *obj, void *event_info) | ||
38 | { | ||
39 | printf("Clicked\n"); | ||
40 | } | ||
41 | |||
42 | static void | ||
43 | _clicked_double(void *data, Evas_Object *obj, void *event_info) | ||
44 | { | ||
45 | if (elm_panes_content_left_size_get(obj) > 0) | ||
46 | { | ||
47 | size = elm_panes_content_left_size_get(obj); | ||
48 | elm_panes_content_left_size_set(obj, 0.0); | ||
49 | printf("Double clicked, hidding.\n"); | ||
50 | } | ||
51 | else | ||
52 | { | ||
53 | elm_panes_content_left_size_set(obj, size); | ||
54 | printf("Double clicked, restoring size.\n"); | ||
55 | } | ||
56 | } | ||
57 | |||
58 | EAPI_MAIN int | ||
59 | elm_main(int argc, char **argv) | ||
60 | { | ||
61 | Evas_Object *win, *bg, *panes, *panes_h, *bt; | ||
62 | |||
63 | win = elm_win_add(NULL, "panes", ELM_WIN_BASIC); | ||
64 | elm_win_title_set(win, "Panes Example"); | ||
65 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
66 | |||
67 | bg = elm_bg_add(win); | ||
68 | elm_win_resize_object_add(win, bg); | ||
69 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
70 | elm_win_focus_highlight_enabled_set(win, EINA_TRUE); | ||
71 | evas_object_show(bg); | ||
72 | |||
73 | panes = elm_panes_add(win); | ||
74 | elm_win_resize_object_add(win, panes); | ||
75 | evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
76 | evas_object_size_hint_align_set(panes, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
77 | evas_object_show(panes); | ||
78 | |||
79 | bt = elm_button_add(win); | ||
80 | elm_object_text_set(bt, "Left"); | ||
81 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
82 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
83 | evas_object_show(bt); | ||
84 | elm_object_part_content_set(panes, "left", bt); | ||
85 | |||
86 | panes_h = elm_panes_add(win); | ||
87 | elm_panes_horizontal_set(panes_h, EINA_TRUE); | ||
88 | evas_object_size_hint_weight_set(panes_h, EVAS_HINT_EXPAND, | ||
89 | EVAS_HINT_EXPAND); | ||
90 | evas_object_size_hint_align_set(panes_h, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
91 | evas_object_show(panes_h); | ||
92 | elm_object_part_content_set(panes, "right", panes_h); | ||
93 | |||
94 | bt = elm_button_add(win); | ||
95 | elm_object_text_set(bt, "Up"); | ||
96 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
97 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
98 | evas_object_show(bt); | ||
99 | elm_object_part_content_set(panes_h, "left", bt); | ||
100 | |||
101 | bt = elm_button_add(win); | ||
102 | elm_object_text_set(bt, "Down"); | ||
103 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
104 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
105 | evas_object_show(bt); | ||
106 | elm_object_part_content_set(panes_h, "right", bt); | ||
107 | |||
108 | evas_object_smart_callback_add(panes, "clicked", _clicked, panes); | ||
109 | evas_object_smart_callback_add(panes, "clicked,double", _clicked_double, | ||
110 | panes); | ||
111 | evas_object_smart_callback_add(panes, "press", _press, panes); | ||
112 | evas_object_smart_callback_add(panes, "unpress", _unpress, panes); | ||
113 | |||
114 | evas_object_resize(win, 320, 400); | ||
115 | evas_object_show(win); | ||
116 | |||
117 | elm_run(); | ||
118 | elm_shutdown(); | ||
119 | |||
120 | return 0; | ||
121 | } | ||
122 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/photocam_example_01.c b/libraries/elementary/src/examples/photocam_example_01.c deleted file mode 100644 index 3bdec8e..0000000 --- a/libraries/elementary/src/examples/photocam_example_01.c +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o photocam_example_01 photocam_example_01.c -g `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\"" | ||
3 | //where directory is the path where images/insanely_huge_test_image.jpg can be found. | ||
4 | |||
5 | #include <Elementary.h> | ||
6 | |||
7 | static void _fit(void *data, Evas_Object *obj, void *event_info); | ||
8 | static void _unfit(void *data, Evas_Object *obj, void *event_info); | ||
9 | static void _zoom(void *data, Evas_Object *obj, void *event_info); | ||
10 | static void _bring_in(void *data, Evas_Object *obj, void *event_info); | ||
11 | |||
12 | EAPI_MAIN int | ||
13 | elm_main(int argc, char **argv) | ||
14 | { | ||
15 | Evas_Object *win, *bg, *obj, *photocam; | ||
16 | char buf[PATH_MAX]; | ||
17 | |||
18 | elm_app_info_set(elm_main, "elementary", "images/insanely_huge_test_image.jpg"); | ||
19 | win = elm_win_add(NULL, "photocam", ELM_WIN_BASIC); | ||
20 | elm_win_title_set(win, "Photocam"); | ||
21 | elm_win_autodel_set(win, EINA_TRUE); | ||
22 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
23 | |||
24 | bg = elm_bg_add(win); | ||
25 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
26 | elm_win_resize_object_add(win, bg); | ||
27 | evas_object_show(bg); | ||
28 | |||
29 | photocam = elm_photocam_add(win); | ||
30 | snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get()); | ||
31 | elm_photocam_file_set(photocam, buf); | ||
32 | elm_photocam_bounce_set(photocam, EINA_FALSE, EINA_TRUE); | ||
33 | evas_object_smart_callback_add(photocam, "loaded,detail", _bring_in, NULL); | ||
34 | evas_object_resize(photocam, 500, 400); | ||
35 | evas_object_show(photocam); | ||
36 | |||
37 | obj = elm_button_add(win); | ||
38 | elm_object_text_set(obj, "Fit"); | ||
39 | evas_object_show(obj); | ||
40 | evas_object_resize(obj, 50, 30); | ||
41 | evas_object_move(obj, 10, 410); | ||
42 | evas_object_smart_callback_add(obj, "clicked", _fit, photocam); | ||
43 | |||
44 | obj = elm_button_add(win); | ||
45 | elm_object_text_set(obj, "Unfit"); | ||
46 | evas_object_show(obj); | ||
47 | evas_object_resize(obj, 70, 30); | ||
48 | evas_object_move(obj, 70, 410); | ||
49 | evas_object_smart_callback_add(obj, "clicked", _unfit, photocam); | ||
50 | |||
51 | obj = elm_slider_add(win); | ||
52 | elm_object_text_set(obj, "Zoom"); | ||
53 | evas_object_show(obj); | ||
54 | evas_object_resize(obj, 300, 30); | ||
55 | evas_object_move(obj, 150, 410); | ||
56 | evas_object_smart_callback_add(obj, "changed", _zoom, photocam); | ||
57 | |||
58 | evas_object_resize(win, 500, 440); | ||
59 | evas_object_show(win); | ||
60 | |||
61 | elm_run(); | ||
62 | elm_shutdown(); | ||
63 | |||
64 | return 0; | ||
65 | } | ||
66 | ELM_MAIN() | ||
67 | |||
68 | static void | ||
69 | _bring_in(void *data, Evas_Object *obj, void *event_info) | ||
70 | { | ||
71 | int w, h; | ||
72 | elm_photocam_image_size_get(obj, &w, &h); | ||
73 | elm_photocam_image_region_bring_in(obj, w/2, h/2, 500, 400); | ||
74 | } | ||
75 | |||
76 | static void | ||
77 | _fit(void *data, Evas_Object *obj, void *event_info) | ||
78 | { | ||
79 | int x, y, w, h; | ||
80 | elm_photocam_image_region_get(data, &x, &y, &w, &h); | ||
81 | printf("region: {%d, %d, %d, %d}\n", x, y, w, h); | ||
82 | elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT); | ||
83 | } | ||
84 | |||
85 | static void | ||
86 | _unfit(void *data, Evas_Object *obj, void *event_info) | ||
87 | { | ||
88 | elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_MANUAL); | ||
89 | } | ||
90 | |||
91 | static void | ||
92 | _zoom(void *data, Evas_Object *obj, void *event_info) | ||
93 | { | ||
94 | double z = elm_slider_value_get(obj) * 8; | ||
95 | elm_photocam_zoom_set(data, z); | ||
96 | } | ||
diff --git a/libraries/elementary/src/examples/popup_example_01.c b/libraries/elementary/src/examples/popup_example_01.c deleted file mode 100644 index ee98726..0000000 --- a/libraries/elementary/src/examples/popup_example_01.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o popup_example_01 popup_example_01.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _block_clicked(void *data, Evas_Object *obj, void *event_info); | ||
7 | static void _timeout(void *data, Evas_Object *obj, void *event_info); | ||
8 | |||
9 | EAPI_MAIN int | ||
10 | elm_main(int argc, char **argv) | ||
11 | { | ||
12 | Evas_Object *win, *bg, *popup, *content; | ||
13 | |||
14 | win = elm_win_add(NULL, "popup", ELM_WIN_BASIC); | ||
15 | elm_win_title_set(win, "Popup"); | ||
16 | elm_win_autodel_set(win, EINA_TRUE); | ||
17 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
18 | |||
19 | bg = elm_bg_add(win); | ||
20 | elm_bg_color_set(bg, 128, 128, 128); | ||
21 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
22 | elm_win_resize_object_add(win, bg); | ||
23 | evas_object_show(bg); | ||
24 | |||
25 | content = elm_label_add(win); | ||
26 | elm_object_text_set(content, "<align=center>Content</align>"); | ||
27 | |||
28 | popup = elm_popup_add(win); | ||
29 | elm_popup_timeout_set(popup, 3.0); | ||
30 | evas_object_smart_callback_add(popup, "timeout", _timeout, NULL); | ||
31 | |||
32 | //Setting popup content | ||
33 | elm_object_content_set(popup, content); | ||
34 | //Seting popup title-text | ||
35 | elm_object_part_text_set(popup, "title,text", "Title"); | ||
36 | evas_object_show(popup); | ||
37 | evas_object_smart_callback_add(popup, "block,clicked", _block_clicked, NULL); | ||
38 | |||
39 | evas_object_show(win); | ||
40 | evas_object_resize(win, 480, 800); | ||
41 | |||
42 | elm_run(); | ||
43 | elm_shutdown(); | ||
44 | |||
45 | return 0; | ||
46 | } | ||
47 | ELM_MAIN() | ||
48 | |||
49 | static void | ||
50 | _block_clicked(void *data, Evas_Object *obj, | ||
51 | void *event_info) | ||
52 | { | ||
53 | evas_object_hide(obj); | ||
54 | } | ||
55 | |||
56 | static void | ||
57 | _timeout(void *data, Evas_Object *obj, void *event_info) | ||
58 | { | ||
59 | evas_object_hide(obj); | ||
60 | } | ||
diff --git a/libraries/elementary/src/examples/popup_example_02.c b/libraries/elementary/src/examples/popup_example_02.c deleted file mode 100644 index b66e05f..0000000 --- a/libraries/elementary/src/examples/popup_example_02.c +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o popup_example_02 popup_example_02.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _response_cb(void *data, Evas_Object *obj, void *event_info); | ||
7 | |||
8 | EAPI_MAIN int | ||
9 | elm_main(int argc, char **argv) | ||
10 | { | ||
11 | Evas_Object *win, *bg, *popup, *btn1, *btn2, *btn3, *icon1; | ||
12 | char buf[256]; | ||
13 | |||
14 | elm_app_info_set(elm_main, "elementary", "images/logo_small.png"); | ||
15 | win = elm_win_add(NULL, "popup", ELM_WIN_BASIC); | ||
16 | elm_win_title_set(win, "Popup"); | ||
17 | elm_win_autodel_set(win, EINA_TRUE); | ||
18 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
19 | |||
20 | bg = elm_bg_add(win); | ||
21 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
22 | elm_win_resize_object_add(win, bg); | ||
23 | evas_object_show(bg); | ||
24 | |||
25 | popup = elm_popup_add(win); | ||
26 | |||
27 | // Setting popup content-text | ||
28 | elm_object_text_set(popup, "This is the Content-Text for popup. The wrap" | ||
29 | "for the content-text is character wrapping"); | ||
30 | // Setting the wrapping type to character wrapping | ||
31 | elm_popup_content_text_wrap_type_set(popup, ELM_WRAP_CHAR); | ||
32 | |||
33 | // Seting popup title-text | ||
34 | elm_object_part_text_set(popup, "title,text", "Title"); | ||
35 | |||
36 | icon1 = elm_icon_add(popup); | ||
37 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get()); | ||
38 | elm_icon_file_set(icon1, buf, NULL); | ||
39 | //Setting popup title-icon | ||
40 | elm_object_part_content_set(popup, "title,icon", icon1); | ||
41 | |||
42 | // Creating the first action button | ||
43 | btn1 = elm_button_add(popup); | ||
44 | elm_object_text_set(btn1, "OK"); | ||
45 | |||
46 | // Setting the fist action button | ||
47 | elm_object_part_content_set(popup, "button1", btn1); | ||
48 | evas_object_smart_callback_add(btn1, "clicked", _response_cb, popup); | ||
49 | |||
50 | // Creating the second action button | ||
51 | btn2 = elm_button_add(popup); | ||
52 | elm_object_text_set(btn2, "Cancel"); | ||
53 | |||
54 | // Setting the second action button | ||
55 | elm_object_part_content_set(popup, "button2", btn2); | ||
56 | evas_object_smart_callback_add(btn2, "clicked", _response_cb, popup); | ||
57 | |||
58 | btn3 = elm_button_add(popup); | ||
59 | elm_object_text_set(btn3, "Close"); | ||
60 | // Setting this action button | ||
61 | elm_object_part_content_set(popup, "button3", btn3); | ||
62 | // Setting the orientation of popup to Top | ||
63 | elm_popup_orient_set(popup, ELM_POPUP_ORIENT_TOP); | ||
64 | // Display the popup object | ||
65 | evas_object_show(popup); | ||
66 | |||
67 | evas_object_resize(win, 480, 800); | ||
68 | evas_object_show(win); | ||
69 | |||
70 | elm_run(); | ||
71 | elm_shutdown(); | ||
72 | |||
73 | return 0; | ||
74 | } | ||
75 | ELM_MAIN() | ||
76 | |||
77 | static void | ||
78 | _response_cb(void *data, Evas_Object *obj, | ||
79 | void *event_info) | ||
80 | { | ||
81 | evas_object_del(data); | ||
82 | } | ||
83 | |||
diff --git a/libraries/elementary/src/examples/popup_example_03.c b/libraries/elementary/src/examples/popup_example_03.c deleted file mode 100644 index 97f09c9..0000000 --- a/libraries/elementary/src/examples/popup_example_03.c +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o popup_example_03 popup_example_03.c -g `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void _item_selected_cb(void *data, Evas_Object *obj, void *event_info); | ||
7 | static void _response_cb(void *data, Evas_Object *obj, void *event_info); | ||
8 | |||
9 | EAPI_MAIN int | ||
10 | elm_main(int argc, char **argv) | ||
11 | { | ||
12 | Evas_Object *win, *bg, *popup, *btn1, *btn2, *icon1; | ||
13 | Elm_Object_Item *popup_it1; | ||
14 | char buf[256]; | ||
15 | |||
16 | elm_app_info_set(elm_main, "elementary", "images/logo_small.png"); | ||
17 | win = elm_win_add(NULL, "popup", ELM_WIN_BASIC); | ||
18 | elm_win_title_set(win, "Popup"); | ||
19 | elm_win_autodel_set(win, EINA_TRUE); | ||
20 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
21 | |||
22 | bg = elm_bg_add(win); | ||
23 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
24 | elm_win_resize_object_add(win, bg); | ||
25 | evas_object_show(bg); | ||
26 | |||
27 | popup = elm_popup_add(win); | ||
28 | |||
29 | icon1 = elm_icon_add(popup); | ||
30 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get()); | ||
31 | elm_icon_file_set(icon1, buf, NULL); | ||
32 | |||
33 | //Seting popup title-text | ||
34 | elm_object_part_text_set(popup, "title,text", "Title"); | ||
35 | |||
36 | //Appending popup content-items | ||
37 | elm_popup_item_append(popup, "Message", NULL, _item_selected_cb, NULL); | ||
38 | elm_popup_item_append(popup, "Email", NULL, _item_selected_cb, NULL); | ||
39 | elm_popup_item_append(popup, "Contacts", NULL, _item_selected_cb, NULL); | ||
40 | elm_popup_item_append(popup, "Video", NULL, _item_selected_cb, NULL); | ||
41 | elm_popup_item_append(popup, "Music", NULL, _item_selected_cb, NULL); | ||
42 | elm_popup_item_append(popup, "Memo", NULL, _item_selected_cb, NULL); | ||
43 | popup_it1 = elm_popup_item_append(popup, "Radio", NULL, _item_selected_cb, | ||
44 | NULL); | ||
45 | |||
46 | //Changing the label of the item | ||
47 | elm_object_item_text_set(popup_it1, "FM"); | ||
48 | elm_popup_item_append(popup, "Messenger", NULL, _item_selected_cb, NULL); | ||
49 | elm_popup_item_append(popup, "Settings", NULL, _item_selected_cb, NULL); | ||
50 | elm_popup_item_append(popup, "App Installer", NULL, _item_selected_cb, NULL); | ||
51 | elm_popup_item_append(popup, "Browser", NULL, _item_selected_cb, NULL); | ||
52 | elm_popup_item_append(popup, "Weather", icon1, _item_selected_cb, NULL); | ||
53 | elm_popup_item_append(popup, "News Feeds", NULL, _item_selected_cb, NULL); | ||
54 | |||
55 | //Seting popup title-text | ||
56 | elm_object_part_text_set(popup, "title,text", "Title"); | ||
57 | |||
58 | // Creating the first action button | ||
59 | btn1 = elm_button_add(popup); | ||
60 | elm_object_text_set(btn1, "OK"); | ||
61 | |||
62 | //Appending the fist action button | ||
63 | elm_object_part_content_set(popup, "button1", btn1); | ||
64 | evas_object_smart_callback_add(btn1, "clicked", _response_cb, popup); | ||
65 | |||
66 | //Creating the second action button | ||
67 | btn2 = elm_button_add(popup); | ||
68 | elm_object_text_set(btn2, "Cancel"); | ||
69 | evas_object_smart_callback_add(btn2, "clicked", _response_cb, popup); | ||
70 | |||
71 | //Appending the second action button | ||
72 | elm_object_part_content_set(popup, "button1", btn2); | ||
73 | |||
74 | //Display the popup object | ||
75 | evas_object_show(popup); | ||
76 | |||
77 | evas_object_resize(win, 480, 800); | ||
78 | evas_object_show(win); | ||
79 | |||
80 | elm_run(); | ||
81 | elm_shutdown(); | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | ELM_MAIN() | ||
86 | |||
87 | static void | ||
88 | _item_selected_cb(void *data, Evas_Object *obj, | ||
89 | void *event_info) | ||
90 | { | ||
91 | printf("popup item selected: %s\n", elm_object_item_text_get(event_info)); | ||
92 | } | ||
93 | |||
94 | static void | ||
95 | _response_cb(void *data, Evas_Object *obj, | ||
96 | void *event_info) | ||
97 | { | ||
98 | evas_object_hide(data); | ||
99 | } | ||
diff --git a/libraries/elementary/src/examples/progressbar_example.c b/libraries/elementary/src/examples/progressbar_example.c deleted file mode 100644 index f7341a2..0000000 --- a/libraries/elementary/src/examples/progressbar_example.c +++ /dev/null | |||
@@ -1,239 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>progress bar widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g progressbar_example.c -o progressbar_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | typedef struct Progressbar_Example | ||
15 | { | ||
16 | Evas_Object *pb1; | ||
17 | Evas_Object *pb2; /* pulsing */ | ||
18 | Evas_Object *pb3; | ||
19 | Evas_Object *pb4; | ||
20 | Evas_Object *pb5; /* pulsing */ | ||
21 | Evas_Object *pb6; | ||
22 | Evas_Object *pb7; /* pulsing */ | ||
23 | |||
24 | Eina_Bool run; | ||
25 | Ecore_Timer *timer; | ||
26 | } Progressbar_Example; | ||
27 | |||
28 | static Progressbar_Example example_data; | ||
29 | |||
30 | static Eina_Bool | ||
31 | _progressbar_example_value_set(void *data) | ||
32 | { | ||
33 | double progress; | ||
34 | |||
35 | progress = elm_progressbar_value_get(example_data.pb1); | ||
36 | if (progress < 1.0) progress += 0.0123; | ||
37 | else progress = 0.0; | ||
38 | |||
39 | /* just the non-pulsing ones need an update */ | ||
40 | elm_progressbar_value_set(example_data.pb1, progress); | ||
41 | elm_progressbar_value_set(example_data.pb3, progress); | ||
42 | elm_progressbar_value_set(example_data.pb4, progress); | ||
43 | elm_progressbar_value_set(example_data.pb6, progress); | ||
44 | |||
45 | if (progress < 1.0) return ECORE_CALLBACK_RENEW; | ||
46 | |||
47 | example_data.run = 0; | ||
48 | return ECORE_CALLBACK_CANCEL; | ||
49 | } | ||
50 | |||
51 | static void | ||
52 | _progressbar_example_start(void *data, | ||
53 | Evas_Object *obj, | ||
54 | void *event_info) | ||
55 | { | ||
56 | elm_progressbar_pulse(example_data.pb2, EINA_TRUE); | ||
57 | elm_progressbar_pulse(example_data.pb5, EINA_TRUE); | ||
58 | elm_progressbar_pulse(example_data.pb7, EINA_TRUE); | ||
59 | |||
60 | if (!example_data.run) | ||
61 | { | ||
62 | example_data.timer = ecore_timer_add( | ||
63 | 0.1, _progressbar_example_value_set, NULL); | ||
64 | example_data.run = EINA_TRUE; | ||
65 | } | ||
66 | } | ||
67 | |||
68 | /* end of show */ | ||
69 | static void | ||
70 | _progressbar_example_stop(void *data, | ||
71 | Evas_Object *obj, | ||
72 | void *event_info) | ||
73 | { | ||
74 | elm_progressbar_pulse(example_data.pb2, EINA_FALSE); | ||
75 | elm_progressbar_pulse(example_data.pb5, EINA_FALSE); | ||
76 | elm_progressbar_pulse(example_data.pb7, EINA_FALSE); | ||
77 | |||
78 | if (example_data.run) | ||
79 | { | ||
80 | ecore_timer_del(example_data.timer); | ||
81 | example_data.run = EINA_FALSE; | ||
82 | } | ||
83 | } | ||
84 | |||
85 | static void | ||
86 | _on_done(void *data, | ||
87 | Evas_Object *obj, | ||
88 | void *event_info) | ||
89 | { | ||
90 | _progressbar_example_stop(NULL, NULL, NULL); | ||
91 | elm_exit(); | ||
92 | } | ||
93 | |||
94 | EAPI_MAIN int | ||
95 | elm_main(int argc, | ||
96 | char **argv) | ||
97 | { | ||
98 | Evas_Object *win, *bg, *pb, *bx, *hbx, *bt, *bt_bx, *ic1, *ic2; | ||
99 | char buf[PATH_MAX]; | ||
100 | |||
101 | elm_app_info_set(elm_main, "elementary", "images/logo_small.png"); | ||
102 | win = elm_win_add(NULL, "progressbar", ELM_WIN_BASIC); | ||
103 | elm_win_title_set(win, "Progress bar example"); | ||
104 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
105 | |||
106 | bg = elm_bg_add(win); | ||
107 | elm_win_resize_object_add(win, bg); | ||
108 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
109 | evas_object_show(bg); | ||
110 | |||
111 | bx = elm_box_add(win); | ||
112 | elm_win_resize_object_add(win, bx); | ||
113 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
114 | evas_object_show(bx); | ||
115 | |||
116 | /* pb with no label, default unit label and no icon */ | ||
117 | pb = elm_progressbar_add(win); | ||
118 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
119 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
120 | elm_box_pack_end(bx, pb); | ||
121 | evas_object_show(pb); | ||
122 | example_data.pb1 = pb; | ||
123 | |||
124 | /* pb with label, and set to pulse */ | ||
125 | pb = elm_progressbar_add(win); | ||
126 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
127 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
128 | elm_object_text_set(pb, "Infinite bounce"); | ||
129 | elm_progressbar_pulse_set(pb, EINA_TRUE); | ||
130 | elm_box_pack_end(bx, pb); | ||
131 | evas_object_show(pb); | ||
132 | example_data.pb2 = pb; | ||
133 | |||
134 | ic1 = elm_icon_add(win); | ||
135 | snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get()); | ||
136 | elm_icon_file_set(ic1, buf, NULL); | ||
137 | evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); | ||
138 | |||
139 | /* pb with label, icon, custom unit label and span size set */ | ||
140 | pb = elm_progressbar_add(win); | ||
141 | elm_object_text_set(pb, "Label"); | ||
142 | elm_object_part_content_set(pb, "icon", ic1); | ||
143 | elm_progressbar_inverted_set(pb, EINA_TRUE); | ||
144 | elm_progressbar_unit_format_set(pb, "%1.1f units"); | ||
145 | elm_progressbar_span_size_set(pb, 200); | ||
146 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
147 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
148 | elm_box_pack_end(bx, pb); | ||
149 | evas_object_show(ic1); | ||
150 | evas_object_show(pb); | ||
151 | example_data.pb3 = pb; | ||
152 | |||
153 | hbx = elm_box_add(win); | ||
154 | elm_box_horizontal_set(hbx, EINA_TRUE); | ||
155 | evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
156 | evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
157 | elm_box_pack_end(bx, hbx); | ||
158 | evas_object_show(hbx); | ||
159 | |||
160 | /* vertical pb */ | ||
161 | pb = elm_progressbar_add(win); | ||
162 | elm_progressbar_horizontal_set(pb, EINA_FALSE); | ||
163 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
164 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
165 | elm_box_pack_end(hbx, pb); | ||
166 | elm_object_text_set(pb, "percent"); | ||
167 | evas_object_show(pb); | ||
168 | example_data.pb4 = pb; | ||
169 | |||
170 | /* vertical pb, with pulse and custom (small) span size */ | ||
171 | pb = elm_progressbar_add(win); | ||
172 | elm_progressbar_horizontal_set(pb, EINA_FALSE); | ||
173 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
174 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
175 | elm_progressbar_span_size_set(pb, 80); | ||
176 | elm_progressbar_pulse_set(pb, EINA_TRUE); | ||
177 | elm_progressbar_unit_format_set(pb, NULL); | ||
178 | elm_object_text_set(pb, "Infinite bounce"); | ||
179 | elm_box_pack_end(hbx, pb); | ||
180 | evas_object_show(pb); | ||
181 | example_data.pb5 = pb; | ||
182 | |||
183 | ic2 = elm_icon_add(win); | ||
184 | elm_icon_file_set(ic2, buf, NULL); | ||
185 | evas_object_size_hint_aspect_set(ic2, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1); | ||
186 | |||
187 | /* vertical pb, inverted, with custom unit format and icon*/ | ||
188 | pb = elm_progressbar_add(win); | ||
189 | elm_progressbar_horizontal_set(pb, EINA_FALSE); | ||
190 | elm_object_text_set(pb, "Label"); | ||
191 | elm_object_part_content_set(pb, "icon", ic2); | ||
192 | elm_progressbar_inverted_set(pb, EINA_TRUE); | ||
193 | elm_progressbar_unit_format_set(pb, "%1.2f%%"); | ||
194 | elm_progressbar_span_size_set(pb, 200); | ||
195 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
196 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
197 | elm_box_pack_end(hbx, pb); | ||
198 | evas_object_show(ic2); | ||
199 | evas_object_show(pb); | ||
200 | example_data.pb6 = pb; | ||
201 | |||
202 | /* "wheel" style progress bar */ | ||
203 | pb = elm_progressbar_add(win); | ||
204 | elm_object_style_set(pb, "wheel"); | ||
205 | elm_object_text_set(pb, "Style: wheel"); | ||
206 | evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5); | ||
207 | evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
208 | elm_box_pack_end(bx, pb); | ||
209 | evas_object_show(pb); | ||
210 | example_data.pb7 = pb; | ||
211 | |||
212 | bt_bx = elm_box_add(win); | ||
213 | elm_box_horizontal_set(bt_bx, EINA_TRUE); | ||
214 | evas_object_size_hint_weight_set(bt_bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
215 | elm_box_pack_end(bx, bt_bx); | ||
216 | evas_object_show(bt_bx); | ||
217 | |||
218 | bt = elm_button_add(win); | ||
219 | elm_object_text_set(bt, "Start"); | ||
220 | evas_object_smart_callback_add(bt, "clicked", _progressbar_example_start, | ||
221 | NULL); | ||
222 | elm_box_pack_end(bt_bx, bt); | ||
223 | evas_object_show(bt); | ||
224 | |||
225 | bt = elm_button_add(win); | ||
226 | elm_object_text_set(bt, "Stop"); | ||
227 | evas_object_smart_callback_add(bt, "clicked", _progressbar_example_stop, | ||
228 | NULL); | ||
229 | elm_box_pack_end(bt_bx, bt); | ||
230 | evas_object_show(bt); | ||
231 | |||
232 | evas_object_show(win); | ||
233 | |||
234 | elm_run(); | ||
235 | elm_shutdown(); | ||
236 | |||
237 | return 0; | ||
238 | } | ||
239 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/radio_example_01.c b/libraries/elementary/src/examples/radio_example_01.c deleted file mode 100644 index 0d6b276..0000000 --- a/libraries/elementary/src/examples/radio_example_01.c +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g radio_example_01.c -o radio_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static int val = 1; | ||
7 | |||
8 | static void _cb(void *data, Evas_Object *obj, void *event_info); | ||
9 | |||
10 | EAPI_MAIN int | ||
11 | elm_main(int argc, char **argv) | ||
12 | { | ||
13 | Evas_Object *win, *bg, *bx, *radio, *group, *ic; | ||
14 | |||
15 | win = elm_win_add(NULL, "radio", ELM_WIN_BASIC); | ||
16 | elm_win_title_set(win, "Radio"); | ||
17 | elm_win_autodel_set(win, EINA_TRUE); | ||
18 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
19 | |||
20 | bg = elm_bg_add(win); | ||
21 | elm_win_resize_object_add(win, bg); | ||
22 | evas_object_show(bg); | ||
23 | |||
24 | bx = elm_box_add(win); | ||
25 | elm_box_horizontal_set(bx, EINA_TRUE); | ||
26 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
27 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
28 | elm_win_resize_object_add(win, bx); | ||
29 | evas_object_show(bx); | ||
30 | |||
31 | group = radio = elm_radio_add(win); | ||
32 | elm_object_text_set(radio, "Radio 1"); | ||
33 | elm_radio_state_value_set(radio, 1); | ||
34 | elm_radio_value_pointer_set(radio, &val); | ||
35 | ic = elm_icon_add(win); | ||
36 | elm_icon_standard_set(ic, "home"); | ||
37 | elm_object_part_content_set(radio, "icon", ic); | ||
38 | elm_box_pack_end(bx, radio); | ||
39 | evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
40 | evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
41 | evas_object_show(radio); | ||
42 | evas_object_smart_callback_add(radio, "changed", _cb, NULL); | ||
43 | |||
44 | radio = elm_radio_add(win); | ||
45 | elm_object_text_set(radio, "Radio 2"); | ||
46 | elm_radio_state_value_set(radio, 2); | ||
47 | elm_radio_value_pointer_set(radio, &val); | ||
48 | elm_radio_group_add(radio, group); | ||
49 | ic = elm_icon_add(win); | ||
50 | elm_icon_standard_set(ic, "file"); | ||
51 | elm_object_part_content_set(radio, "icon", ic); | ||
52 | elm_box_pack_end(bx, radio); | ||
53 | evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
54 | evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
55 | evas_object_show(radio); | ||
56 | evas_object_smart_callback_add(radio, "changed", _cb, NULL); | ||
57 | |||
58 | radio = elm_radio_add(win); | ||
59 | elm_object_text_set(radio, "Radio 3"); | ||
60 | elm_radio_state_value_set(radio, 3); | ||
61 | elm_radio_value_pointer_set(radio, &val); | ||
62 | elm_radio_group_add(radio, group); | ||
63 | elm_box_pack_end(bx, radio); | ||
64 | evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
65 | evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
66 | evas_object_show(radio); | ||
67 | evas_object_smart_callback_add(radio, "changed", _cb, NULL); | ||
68 | |||
69 | radio = elm_radio_add(win); | ||
70 | elm_object_text_set(radio, "Radio 4"); | ||
71 | elm_radio_state_value_set(radio, 4); | ||
72 | elm_box_pack_end(bx, radio); | ||
73 | evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
74 | evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
75 | evas_object_show(radio); | ||
76 | |||
77 | evas_object_show(win); | ||
78 | |||
79 | elm_run(); | ||
80 | elm_shutdown(); | ||
81 | |||
82 | return 0; | ||
83 | } | ||
84 | ELM_MAIN() | ||
85 | |||
86 | static void | ||
87 | _cb(void *data, Evas_Object *obj, void *event_info) | ||
88 | { | ||
89 | printf("val is now: %d\n", val); | ||
90 | } | ||
diff --git a/libraries/elementary/src/examples/scroller_example_01.c b/libraries/elementary/src/examples/scroller_example_01.c deleted file mode 100644 index 782892b..0000000 --- a/libraries/elementary/src/examples/scroller_example_01.c +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g scroller_example_01.c -o scroller_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static const char *text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse bibendum, nibh eget vehicula tempus, libero dui aliquam dui, eget pellentesque nulla est id mi. Sed orci nisl, mattis vitae dignissim scelerisque, imperdiet vel arcu. Integer ut libero id massa commodo dignissim sed at orci. Quisque sollicitudin eleifend malesuada. Donec orci orci, mollis quis euismod vel, tincidunt nec ipsum. Sed ut nulla ligula, ut commodo tellus. Duis non felis in odio fringilla venenatis eget in metus. Mauris molestie ipsum tortor. Suspendisse potenti. Curabitur facilisis ultricies cursus. In euismod viverra risus sit amet pharetra. Sed mauris lorem, volutpat a vehicula quis, interdum nec erat. Suspendisse auctor bibendum fringilla. Curabitur tincidunt sem risus.\ | ||
7 | <br>\ | ||
8 | Vestibulum laoreet, leo ut sollicitudin viverra, odio enim tempor est, at ullamcorper augue massa sit amet lacus. Phasellus eget orci sit amet sem condimentum semper. Quisque imperdiet purus vitae lacus bibendum ultricies sollicitudin metus interdum. Phasellus aliquam sem vitae mi imperdiet eu cursus ipsum euismod. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam sed tellus non ligula commodo porta sagittis id augue. Vestibulum faucibus vehicula purus, sit amet porttitor ligula lacinia ac. Morbi ipsum libero, rhoncus id dapibus tincidunt, sagittis eget tellus. Proin vehicula accumsan velit cursus pharetra. Nullam pellentesque erat fringilla diam elementum fringilla. Nam lobortis ultricies suscipit. Pellentesque ut ipsum a nisi placerat rutrum id vitae justo. Fusce blandit ligula mollis est auctor scelerisque. Suspendisse luctus nibh vitae nibh congue rutrum. Nunc vulputate diam vel est lacinia a imperdiet purus scelerisque. Maecenas et nisl mauris. Aenean molestie dolor nec lacus laoreet ac dictum sem condimentum. Integer sit amet enim lorem, vitae tincidunt justo. Ut vulputate ullamcorper tortor, eu pharetra nulla aliquet in. Vestibulum ultrices sapien a ligula venenatis eu gravida lacus fermentum.\ | ||
9 | <br>\ | ||
10 | Etiam dignissim libero sed velit rhoncus ultricies. Aenean porta erat sit amet orci auctor auctor. Suspendisse aliquet arcu ut est ultrices ut venenatis dui scelerisque. Nulla vitae leo massa. Nullam scelerisque felis lectus, sed faucibus mi. Pellentesque hendrerit libero nec metus viverra lobortis. Nulla facilisi. Sed fermentum aliquet velit non imperdiet. Vestibulum nec ante imperdiet dolor convallis ornare sit amet interdum mi. In tellus lorem, lobortis vitae consectetur ac, mattis sed enim. Vivamus nibh enim, convallis sed rutrum sit amet, scelerisque ullamcorper ipsum. Mauris dignissim posuere sagittis. Fusce volutpat hendrerit augue ut dapibus. Aenean eu hendrerit lorem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;\ | ||
11 | <br>\ | ||
12 | Nullam orci eros, mattis at gravida sed, iaculis et dolor. Pellentesque sagittis sollicitudin malesuada. Sed tincidunt, sapien in mollis semper, quam enim gravida neque, eu blandit lacus ligula sit amet nisl. Aenean quam nulla, dapibus at venenatis vel, accumsan id dolor. Nam varius urna id nisi tempus ut dignissim nunc ultricies. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer lacus tortor, pellentesque auctor venenatis sed, laoreet eget erat. Nunc erat est, pharetra vestibulum luctus et, commodo eu quam. In hac habitasse platea dictumst. In hac habitasse platea dictumst. Nam posuere diam vel felis scelerisque iaculis. Maecenas laoreet ipsum ac orci tempus lobortis.\ | ||
13 | <br>\ | ||
14 | Sed id massa metus, lobortis porta ipsum. Nullam pellentesque augue sit amet neque hendrerit vehicula eu quis elit. In nec ante massa. Praesent at pulvinar tortor. In laoreet molestie lectus, ut interdum lorem lobortis vitae. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum ligula sem, interdum eget gravida in, fringilla in sem. Phasellus orci felis, semper rhoncus pharetra a, pellentesque egestas elit. Ut bibendum, est vel gravida tincidunt, enim massa consectetur arcu, vitae pretium sem erat ac nisi. Ut eget erat nisl, eget laoreet arcu. Vivamus risus ipsum, aliquam non ornare et, ornare vel libero. Cras vel ipsum ut magna sagittis interdum at id risus. Morbi justo nulla, volutpat at molestie vel, mollis vitae nisl. Curabitur non erat elit, eu vehicula turpis. Sed eget feugiat neque.\ | ||
15 | <br>\ | ||
16 | Nulla facilisi. Donec sit amet ante sed lacus adipiscing hendrerit. Vivamus enim nibh, mollis eget elementum vitae, congue non sapien. Maecenas interdum magna vel velit faucibus tempus. Nullam nec nunc risus, lobortis imperdiet magna. Suspendisse potenti. Duis fringilla sodales massa eget egestas. Ut tincidunt adipiscing ante, quis consequat mauris venenatis vitae. Suspendisse mattis sollicitudin accumsan. Duis varius ornare dui ac interdum. Sed molestie elit sit amet dolor varius vel congue nibh varius. Donec semper risus placerat dolor blandit tempus. Etiam id leo sit amet nulla gravida suscipit ut ut metus. Curabitur non elit sit amet sem dapibus interdum ut dictum nunc. Integer ultrices tincidunt faucibus. Nam mollis turpis vitae nulla pulvinar in sodales purus lobortis. Cras nisl lectus, tincidunt a suscipit id, sodales nec nulla. Nulla faucibus pretium feugiat. Nam ullamcorper, ante nec ullamcorper eleifend, nisl est dictum magna, ac rhoncus quam lacus eu neque.\ | ||
17 | <br>\ | ||
18 | Cras sodales eros eget ligula porttitor tincidunt. Vivamus ac justo non nulla placerat tempor. Quisque ullamcorper venenatis lacus id mollis. Fusce tempor dui ut justo pretium at volutpat velit malesuada. In tellus diam, mattis sit amet viverra eu, porta sit amet metus. Pellentesque ante risus, dictum a rhoncus ut, hendrerit sed nisi. Donec congue dolor eu orci imperdiet id vulputate nulla eleifend. In vel risus urna, sit amet laoreet augue. Donec fringilla massa nec augue scelerisque eget fermentum augue mollis. Maecenas eu eros nulla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam lobortis, dui id sagittis vestibulum, magna ipsum venenatis sem, vel dapibus leo enim a elit.\ | ||
19 | <br>\ | ||
20 | Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin lectus felis, aliquet id euismod ac, vestibulum vel leo. Donec venenatis, nunc ornare dictum aliquet, dui purus ullamcorper massa, nec vehicula odio orci nec tortor. Cras sapien ante, laoreet ut placerat nec, mattis in velit. In hac habitasse platea dictumst. Vivamus viverra consectetur augue lobortis dignissim. Ut est nibh, varius at fringilla vitae, viverra at massa. Vivamus mattis bibendum lacus, at dignissim sapien auctor ac. Donec quis mauris lacus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus vel turpis quis ipsum mattis congue. Integer gravida semper eros vitae tempus. Maecenas volutpat mi vitae purus feugiat volutpat. Praesent ut diam lorem. Maecenas ultrices, felis a vestibulum auctor, neque dui tristique enim, id mollis nunc arcu eget dui. Sed rhoncus, ligula non elementum aliquet, ligula nisi lacinia sapien, sed mattis ipsum nibh et felis.\ | ||
21 | <br>\ | ||
22 | Nam libero diam, aliquam vel pharetra eu, fringilla sit amet lacus. Nullam varius eros vitae arcu porta ut accumsan massa ultrices. Donec at convallis magna. Proin sit amet dolor et enim fermentum blandit. In urna ligula, molestie lobortis varius eget, aliquam id justo. Maecenas ac viverra lacus. Quisque eros nisl, varius a sollicitudin at, auctor sit amet ligula. Nam in erat non leo volutpat pulvinar. Nulla quis turpis sit amet augue pharetra placerat non vel nunc. In at justo felis, ultrices congue lacus. Etiam sed est velit. Sed elementum, justo sit amet placerat porttitor, elit urna consectetur neque, eget scelerisque dui nisi quis magna. Donec condimentum sollicitudin augue eu volutpat. Etiam vel tempus mauris. Donec et leo eu nisl tempus malesuada sit amet in massa.\ | ||
23 | <br>\ | ||
24 | In in nulla eu justo venenatis hendrerit a ac ante. Mauris sollicitudin metus at eros volutpat eu tincidunt justo pharetra. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse potenti. Nunc purus velit, ornare sit amet pretium eu, congue tincidunt nunc. Maecenas sollicitudin augue sed magna tempor non rhoncus lorem pulvinar. Mauris scelerisque fringilla accumsan. Aliquam et ligula nec lectus dapibus hendrerit. Etiam cursus metus eget odio consectetur sit amet egestas turpis pulvinar. Aenean nec risus vel ante condimentum condimentum. Quisque convallis nunc porta mauris vulputate imperdiet. Etiam varius, nunc sit amet hendrerit convallis, est purus cursus libero, et varius eros leo eget est. Vestibulum a augue nulla, a convallis lacus. Mauris gravida metus ac enim mattis tempor. Etiam accumsan tempor mattis. Fusce dignissim urna at leo pellentesque a blandit nisl faucibus. Fusce consequat auctor nisi ut sodales. Etiam imperdiet velit quis magna consequat placerat. Sed nisl purus, condimentum ac adipiscing vitae, consectetur placerat neque. Morbi molestie sapien sed ante sagittis ullamcorper vel sed erat.\ | ||
25 | <br>\ | ||
26 | Nunc at risus nec dui viverra imperdiet vitae quis velit. Mauris ornare consectetur lorem, vel blandit risus lacinia vitae. Integer gravida, neque porta malesuada malesuada, leo urna egestas urna, at elementum ligula ipsum non diam. Maecenas lobortis, est eget interdum eleifend, tellus leo suscipit orci, sed fringilla eros nisl at erat. Proin bibendum dictum varius. Sed lectus leo, feugiat quis sollicitudin sit amet, egestas quis lacus. Donec vel est nec leo porttitor sagittis non quis lectus. Nunc in ullamcorper urna. Mauris sit amet porttitor dolor. Praesent eu dui nisi, quis aliquet tortor.\ | ||
27 | <br>\ | ||
28 | Duis auctor ornare nibh, non mollis augue cursus vitae. Suspendisse accumsan commodo felis, vitae convallis eros volutpat a. Fusce tincidunt, purus laoreet bibendum dignissim, justo felis iaculis velit, ac feugiat tortor turpis non velit. Integer tristique ultricies dolor, at condimentum nunc rutrum vel. Nam a velit nisl, quis hendrerit erat. Nulla sit amet metus pellentesque nulla consectetur venenatis. Nunc auctor, dolor eu ultricies adipiscing, augue dui sollicitudin arcu, ut dictum nisi felis ac leo. Donec tempor erat at nisi aliquam pulvinar. Etiam rutrum massa vitae libero gravida ac ornare justo molestie. Pellentesque non nisl varius nisl laoreet convallis sed porta sem. Donec rhoncus sapien tempus ligula placerat interdum.\ | ||
29 | <br>\ | ||
30 | Donec varius posuere lorem, a fermentum est molestie eu. Maecenas metus ligula, faucibus ac pharetra vel, accumsan quis mauris. Nulla ultrices, nunc ut tincidunt suscipit, elit dolor bibendum ante, at gravida nisl mi dictum purus. Integer vulputate facilisis nisi, quis porttitor mi iaculis sed. Aenean semper facilisis quam, ut dictum mauris vehicula sed. Sed non sem quis magna ornare egestas ut quis velit. Suspendisse ut quam est, euismod facilisis magna. Etiam mattis pulvinar augue, eget tristique purus porttitor non. Sed egestas dui ac odio auctor convallis. Sed posuere ornare iaculis. Aenean ac nulla ipsum, molestie facilisis eros. Phasellus tincidunt nunc diam. Aliquam malesuada, velit et tincidunt interdum, dolor mi hendrerit velit, quis facilisis ligula dui ac elit. In viverra pretium enim vel tempus.\ | ||
31 | <br>\ | ||
32 | Morbi at adipiscing nisi. Fusce vel turpis vel libero commodo mollis id iaculis urna. Nullam et elit non lectus egestas semper. Curabitur sodales turpis sit amet metus fringilla quis fermentum orci lacinia. Aenean lacinia feugiat hendrerit. Vivamus nec nisi nec neque lacinia rhoncus ut id erat. Suspendisse luctus tortor sed arcu interdum sit amet aliquet neque vehicula. Curabitur eget nunc vitae libero vulputate dictum. Etiam volutpat fermentum felis fringilla euismod. In scelerisque gravida dolor id molestie. Nam faucibus sapien id neque vehicula semper. Nulla egestas urna vitae sem scelerisque rhoncus. In hac habitasse platea dictumst. Nulla vitae lacus in diam aliquet sollicitudin vel nec leo. Sed ornare pellentesque nibh, a malesuada erat imperdiet et.\ | ||
33 | <br>\ | ||
34 | Maecenas adipiscing diam a urna interdum pharetra. Phasellus vitae turpis urna, ac consectetur sem. Sed porttitor nulla in nulla mattis tincidunt non eu lacus. Aliquam quis metus turpis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque at sapien quis purus bibendum lobortis. Donec in tincidunt nisl. Phasellus interdum tellus non leo aliquet ut vulputate nisl aliquam. Aliquam faucibus lorem ut lorem convallis non lobortis felis consequat. Phasellus nec leo ac turpis egestas laoreet. Cras venenatis odio et diam faucibus pellentesque. Quisque eu orci magna, quis lacinia tellus.\ | ||
35 | <br>\ | ||
36 | Aliquam nisl purus, aliquam quis tristique nec, varius eget risus. Nam sed ipsum leo. Proin congue sapien quis libero porta ornare. Mauris vel orci odio. Nam nec felis nibh, non congue odio. Duis vel mattis enim. Maecenas at dui eget ipsum pharetra consequat ac in massa. Proin fringilla arcu non enim feugiat accumsan. Proin tincidunt ligula mattis risus hendrerit in scelerisque risus aliquam. Vivamus libero sapien, ornare ut fringilla ullamcorper, sodales mattis purus. Quisque mauris sem, fermentum vitae adipiscing non, ultricies id mauris. Donec tincidunt, odio vel luctus hendrerit, dui mauris posuere erat, at interdum arcu nunc tincidunt dui. Pellentesque diam orci, malesuada a pellentesque nec, rhoncus at tellus.\ | ||
37 | <br>\ | ||
38 | Morbi in lacus nunc. Proin congue nisi at nunc gravida imperdiet. Duis et elementum arcu. Cras pretium, tortor in ultrices pharetra, sem ante condimentum elit, at dapibus augue lectus ac est. Pellentesque gravida rutrum pulvinar. Nulla nunc odio, dictum id tempus sit amet, faucibus volutpat nunc. Vestibulum ut ultricies tellus. Donec eget tortor metus, pellentesque placerat eros. Suspendisse ut lacus ipsum, sed fermentum est. Sed interdum ornare augue, sit amet bibendum ligula molestie eget. Aenean ac elit diam, eget ultricies nunc. Nullam quis nibh vitae diam pellentesque viverra. Aliquam ultricies elementum enim tristique malesuada. Vivamus rhoncus faucibus nunc, a pharetra enim sollicitudin ac. Suspendisse ultricies sodales metus vel rhoncus. Integer feugiat euismod molestie. Phasellus iaculis magna imperdiet erat consequat et pretium orci tincidunt.\ | ||
39 | <br>\ | ||
40 | Morbi tristique cursus consequat. Morbi posuere lacinia odio quis auctor. Nulla dui nisi, tincidunt condimentum aliquam sed, adipiscing cursus sem. Nullam eleifend lacus tempor nisl semper quis cursus velit vehicula. Morbi aliquam, sem at sollicitudin laoreet, nibh erat congue nisi, a pulvinar nulla orci vulputate orci. Morbi eu orci enim, quis aliquam ante. Nam ultricies laoreet varius. Proin vehicula sem vitae dolor ullamcorper et rhoncus lacus cursus. Nullam sit amet mauris sapien, vitae condimentum justo. Cras eu arcu magna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus vulputate erat ac diam sagittis dignissim non nec tellus. Vivamus tristique quam vel velit mollis in congue nulla malesuada. Phasellus hendrerit egestas urna vitae egestas. Morbi vitae enim magna. Proin quam tellus, tincidunt ut mollis ut, semper a mi. Vivamus nec pharetra purus. Aenean at lorem mauris, sed facilisis quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.\ | ||
41 | <br>\ | ||
42 | Cras tempor, enim in ullamcorper dignissim, elit eros sodales augue, vel molestie velit tellus sed risus. Suspendisse fermentum, augue id facilisis hendrerit, magna dolor euismod lectus, gravida consequat neque turpis lacinia nisi. Etiam id mi nulla, nec ultrices leo. Aliquam et mi tortor. Duis ullamcorper enim a tellus gravida ornare. Sed interdum, felis eu consequat sagittis, lectus neque ultricies velit, eget egestas ligula quam et mauris. Nunc eu quam enim. Duis tempus, arcu at tristique tristique, justo est gravida orci, vitae hendrerit risus tellus eu urna. Nunc vitae nunc vitae augue malesuada viverra. Etiam nec diam sit amet augue commodo pharetra. Fusce lectus urna, aliquam eget rhoncus tempor, ultrices et lacus.\ | ||
43 | <br>\ | ||
44 | Phasellus tincidunt, diam et ultricies ornare, ante tortor pretium elit, vitae viverra urna ipsum vel ipsum. Duis semper magna ac mauris rutrum facilisis. Suspendisse mi velit, auctor at rutrum sit amet, lacinia at orci. Phasellus diam magna, vulputate ac accumsan non, ultricies et lorem. Etiam nisi purus, tempor vel aliquet in, egestas sit amet massa. Quisque auctor, dui quis aliquet condimentum, ligula urna rhoncus mi, non vehicula velit sapien eu libero. Nam et elit elit, nec semper enim. Sed quis nulla ut ipsum consequat placerat. Nullam eros risus, congue et tincidunt et, ornare ac nibh. Aliquam vitae neque ac orci tincidunt pharetra. Quisque ac augue iaculis nisi lacinia laoreet. Etiam dolor magna, convallis eu bibendum vel, pellentesque non mi. Etiam eget nibh in metus venenatis hendrerit sit amet ac ligula. Nullam laoreet lobortis fringilla.\ | ||
45 | <br>\ | ||
46 | Donec non nunc sit amet sem consectetur sodales. Donec nisi ipsum, imperdiet sed commodo nec, placerat ac eros. Sed ac orci sit amet nisl molestie vestibulum. Nam sollicitudin mauris ac eros consequat iaculis. Nam aliquet lobortis ligula, at tempor libero hendrerit id. Vivamus at nisl eget sem dapibus dapibus quis at enim. Nam eget nisi urna. Nam ultrices, nibh ac vehicula dapibus, ante odio vestibulum ante, ut volutpat orci lectus in mi. Aliquam venenatis fermentum condimentum. Aliquam ac lacus elementum nisl molestie auctor ullamcorper sed orci. Nullam tristique metus sit amet purus commodo vulputate. Ut ante turpis, congue non lobortis non, vehicula non diam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris lobortis magna ac est facilisis in congue orci semper. Etiam et lacus eget elit viverra dictum eu ut neque. Vestibulum diam erat, posuere ut sagittis at, ultrices sed turpis. Cras justo risus, tempus eu facilisis vel, tempus scelerisque est. Vestibulum sagittis mauris ac turpis malesuada tincidunt. Proin et eros eget augue pellentesque tristique non in justo. Integer in leo sit amet lectus convallis rhoncus vitae eu quam.\ | ||
47 | <br>\ | ||
48 | Nulla eleifend hendrerit sem, vel feugiat mauris pellentesque vel. Vivamus ut lectus enim. Vestibulum nulla lacus, vestibulum et viverra sed, malesuada vitae urna. Integer consectetur, ante eget cursus tristique, lectus felis dignissim ipsum, non mollis arcu dui eu lacus. Integer sed ante ut magna euismod molestie sit amet ut leo. Quisque nec leo dui. Nunc sit amet ligula mi. Etiam sagittis scelerisque neque, ac lobortis lacus feugiat pellentesque. Donec ultricies est vel est tempus non volutpat turpis feugiat. Suspendisse potenti. Vestibulum et velit vitae nisi eleifend tincidunt quis eu odio. Nunc a massa arcu, ut ultrices sem. In eu tempor enim. Praesent aliquam arcu eleifend metus accumsan non pharetra dui ornare. Cras lorem leo, scelerisque sed suscipit at, semper porta magna. Vestibulum pellentesque, erat congue euismod fermentum, mauris purus blandit ligula, at luctus nisl magna in metus. Sed pulvinar, ipsum eget hendrerit egestas, lacus odio posuere tortor, in euismod libero purus id orci. In hac habitasse platea dictumst. Curabitur feugiat semper varius. Aliquam mauris metus, rhoncus in rhoncus non, blandit eget magna.\ | ||
49 | <br>\ | ||
50 | Cras sapien odio, facilisis id accumsan ut, laoreet sit amet felis. Duis et velit sed tellus volutpat porttitor. Praesent sagittis hendrerit sapien sit amet scelerisque. Vivamus vitae justo at mi venenatis cursus. Nulla est purus, lobortis vel rutrum vel, aliquam in ligula. Sed tortor mauris, pulvinar eget luctus id, faucibus at justo. Phasellus massa quam, tincidunt vel condimentum a, varius vitae tortor. Cras gravida ullamcorper mauris, vel condimentum neque sollicitudin sit amet. Nullam quis justo elit, facilisis dapibus orci. Ut ullamcorper, velit a fermentum elementum, erat erat posuere lacus, egestas iaculis nulla ante eget nibh. Nam ullamcorper leo at diam consectetur molestie. Suspendisse porttitor, eros ac euismod vulputate, tortor libero tempor urna, non pharetra nisl nunc quis sapien. Mauris commodo venenatis risus, eu commodo neque ultricies adipiscing. Nullam ac nunc tortor. Sed consectetur placerat luctus. Curabitur non risus lacus, tristique fermentum quam. Pellentesque viverra, nulla in imperdiet accumsan, eros erat ultrices enim, at adipiscing massa sapien vitae elit. Praesent libero tellus, pharetra et placerat sed, facilisis ut mauris. Phasellus nisl justo, consectetur quis eleifend eget, pulvinar eget erat.\ | ||
51 | <br>\ | ||
52 | Integer placerat tellus vitae leo luctus ac cursus velit varius. Fusce pulvinar iaculis purus, placerat blandit est imperdiet sit amet. Nulla tincidunt pellentesque tortor ac consequat. Morbi hendrerit, elit non sollicitudin lobortis, massa nunc rhoncus eros, vel egestas felis dolor non nunc. Praesent vel sagittis elit. Mauris pretium leo molestie purus ornare at volutpat risus suscipit. Integer quis orci et magna dapibus gravida. Maecenas metus est, egestas eu interdum nec, suscipit et turpis. Pellentesque eu sagittis ligula. Aenean interdum sem purus. Maecenas interdum nibh aliquam libero aliquam laoreet. Morbi mollis, ligula id vehicula malesuada, velit ipsum euismod nisi, quis mattis turpis neque eu odio. Praesent ultrices vestibulum nisl, non eleifend dui convallis vitae. Pellentesque id sem enim. Morbi eu turpis massa, non fringilla erat. Mauris at metus ut urna luctus rutrum vel in lorem. Donec vel facilisis nisi.\ | ||
53 | <br>\ | ||
54 | Phasellus sed facilisis mi. Suspendisse mollis sapien vitae lectus tincidunt a molestie nisl feugiat. Etiam sagittis lectus ut risus tempus consectetur. Phasellus non dolor massa, ac consequat mauris. In suscipit, purus sed pretium lacinia, odio tortor vestibulum leo, ac facilisis libero est eget neque. Nullam vel sem sem, vel egestas purus. Etiam tempus sem sit amet purus tempus hendrerit. Sed bibendum lacinia dapibus. In magna ipsum, molestie id mattis ut, posuere semper velit. Fusce ut lectus felis. Vivamus sagittis aliquam leo, ut facilisis tortor iaculis vel. Praesent egestas placerat est, ut congue justo vestibulum sed. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut id pellentesque nisi. Fusce bibendum urna eget leo porttitor tincidunt. Nunc blandit condimentum hendrerit. Nullam placerat, risus sed condimentum rhoncus, nisl neque imperdiet metus, condimentum lacinia ipsum elit non felis. Donec sit amet felis et diam adipiscing mattis.\ | ||
55 | <br>\ | ||
56 | Nulla et nisi ante. Duis ac nisi ut nibh mattis fringilla. Duis sapien lectus, consequat ut feugiat a, feugiat ut nisi. Aenean enim leo, gravida non bibendum id, vulputate eu magna. Suspendisse sed tortor faucibus eros sollicitudin fermentum. Ut cursus tellus ut dolor fermentum et iaculis mauris egestas. Donec sit amet massa leo, eget dignissim ante. Nam dignissim massa a risus lacinia at varius ligula tempus. Vivamus dignissim sem in enim consectetur sagittis. Aenean aliquam hendrerit urna eu aliquet. Donec luctus suscipit odio, ut accumsan neque suscipit vitae. Integer hendrerit facilisis orci feugiat commodo. Praesent vestibulum orci et turpis vehicula vulputate. Sed in purus sit amet tortor sagittis lacinia. Nam nibh justo, rhoncus et ultrices non, venenatis nec ligula. Suspendisse eget lacus sapien, et consequat erat. Ut auctor condimentum magna, ac condimentum magna laoreet volutpat. Sed urna urna, ultricies eget venenatis nec, adipiscing nec tellus.\ | ||
57 | <br>\ | ||
58 | Praesent viverra dui eget nisl lobortis in malesuada nunc sollicitudin. Aenean bibendum scelerisque metus ac facilisis. Donec est neque, egestas eu aliquet commodo, dictum eu metus. Quisque vel purus in sapien tristique euismod vitae nec eros. Aliquam tincidunt viverra odio. Aenean euismod lectus rutrum eros tempus ut lacinia eros pharetra. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras at sapien augue. Sed posuere, dolor nec ullamcorper venenatis, est est pulvinar urna, vel placerat nulla ligula sed eros. Pellentesque nec enim magna. Ut pharetra quam a lectus dapibus eu tristique ante porta. Aliquam vel augue eu risus mollis blandit sit amet vel arcu. Donec lobortis lacinia magna nec aliquet. Suspendisse fermentum magna eget est posuere nec pellentesque enim accumsan.\ | ||
59 | <br>\ | ||
60 | Vivamus commodo urna sit amet enim iaculis vel accumsan odio interdum. Etiam est lectus, fringilla in fermentum nec, imperdiet sit amet sapien. Suspendisse vitae lacus vel elit convallis iaculis non eu tellus. In nec dolor diam. Mauris sed tortor id ligula vestibulum mollis sit amet a neque. In hac habitasse platea dictumst. Donec a velit vel nunc ornare euismod sit amet vitae risus. Sed ultrices semper nibh, quis gravida magna dapibus ac. Fusce ut ligula velit. Aenean non mollis augue. Proin ut ligula nisi. Duis nec consequat dui. Praesent vel mauris orci. Nullam est nunc, ultrices ultricies suscipit et, adipiscing in augue. Sed porttitor mi in nunc euismod tincidunt.\ | ||
61 | <br>\ | ||
62 | Quisque laoreet congue augue quis cursus. Donec sed nisl odio. Etiam rhoncus fermentum lacus, quis pharetra urna semper vitae. Quisque non nisi at nunc volutpat porttitor. Donec ligula massa, suscipit non facilisis vitae, lacinia sit amet lacus. Fusce vel turpis orci. Etiam quis ligula eu nibh tincidunt posuere. Mauris sit amet quam leo, porta interdum diam. Nullam purus metus, facilisis quis ullamcorper vitae, mattis ultrices ante. Sed tincidunt lorem aliquet magna ultrices eleifend. In non nisi orci. In imperdiet, tellus eget fringilla elementum, lorem magna faucibus libero, id placerat turpis enim eget erat. Ut eros justo, ullamcorper ut sagittis eu, condimentum in arcu. Proin vel nisi ligula, vitae hendrerit purus. Vestibulum dignissim pulvinar consectetur. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse ac eros risus.\ | ||
63 | <br>\ | ||
64 | Cras at massa quam. Cras eget dolor tortor. Mauris non nisl sapien. Maecenas dictum tincidunt erat nec tincidunt. Maecenas vestibulum lobortis varius. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin adipiscing tincidunt mauris quis fringilla. Maecenas sit amet ligula vitae neque tincidunt pulvinar quis id orci. Pellentesque sagittis tellus eget leo dapibus tempor. Duis eu diam non justo tincidunt gravida. Cras eros dolor, sodales eget elementum et, adipiscing in enim. Suspendisse at elit elit, id dignissim nisl. Donec imperdiet, quam vitae mattis hendrerit, leo arcu sagittis massa, a placerat urna sapien viverra tortor. Integer auctor, felis non condimentum ultrices, lectus ligula vestibulum eros, non pharetra libero purus eu purus. Duis ornare lacinia erat vitae sagittis. Sed fringilla volutpat magna, id auctor nisi elementum ut. Nulla facilisi. Quisque ut quam elit, ac consequat ligula.\ | ||
65 | <br>\ | ||
66 | Etiam fringilla lobortis mauris, in ullamcorper elit vestibulum eu. Ut dolor nisi, egestas vel consequat sit amet, faucibus vel nulla. Etiam vitae nibh ut dui imperdiet accumsan vel quis arcu. Suspendisse potenti. Ut vitae tellus risus, eu imperdiet eros. Nam vitae lacus a leo pulvinar feugiat. Donec augue mauris, suscipit porta euismod at, viverra vel magna. Cras luctus viverra neque, sit amet venenatis mi consequat id. Nulla consequat consequat nunc, eget mattis nisl tempor id. Praesent mattis sagittis tortor sed feugiat. Nunc vitae nisl est, a feugiat orci. Fusce in ipsum mauris. Etiam mattis sollicitudin nisi eu imperdiet. Duis in laoreet libero. Aenean eleifend est sit amet purus ultricies pretium. Morbi id nisl ut purus tempus sollicitudin quis non tellus. Donec sed quam ac nisl cursus euismod eu euismod eros.\ | ||
67 | <br>\ | ||
68 | Suspendisse mattis elementum sapien. Aliquam erat volutpat. Sed a tortor vitae nisi ornare vehicula. Praesent id faucibus sem. Mauris luctus ornare ipsum, id euismod lorem fermentum id. Maecenas egestas, mi sit amet porta facilisis, erat elit pretium nunc, ut mollis ipsum metus iaculis ligula. Duis semper ligula rhoncus nibh vehicula in scelerisque diam rhoncus. Vivamus quam magna, ultricies et posuere sed, mollis tristique est. Vivamus consectetur cursus diam, vitae pharetra nisi aliquam et. Nulla tortor sem, molestie quis pellentesque nec, tincidunt a libero. Proin tincidunt purus ut purus ornare dictum. Proin vehicula orci eu eros aliquam eu posuere turpis lobortis. Vivamus dapibus bibendum tristique. Donec facilisis fringilla mauris nec consequat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse ac nunc nec lacus interdum adipiscing eget vel quam. Duis rhoncus urna quis nisl elementum laoreet. Integer euismod tincidunt pulvinar.\ | ||
69 | <br>\ | ||
70 | Sed congue scelerisque blandit. Nam pharetra, nisi at auctor elementum, dolor elit bibendum mauris, congue feugiat arcu turpis non tortor. Cras tincidunt tellus sit amet nulla fermentum adipiscing. Mauris imperdiet purus vel nulla tempor vel elementum metus tempor. Aliquam eu dolor ut risus scelerisque commodo. Ut adipiscing nisl eget nisl mollis semper. Vestibulum arcu augue, sodales convallis venenatis ac, egestas euismod metus. Cras luctus elit sed nisl faucibus at accumsan lectus pharetra. Nunc rhoncus turpis est, vitae luctus turpis. Mauris tempus, velit sit amet feugiat consequat, tortor diam scelerisque urna, sit amet convallis est nisi quis dolor. Vivamus facilisis tellus quis sapien dapibus at sodales elit feugiat. Cras varius laoreet urna, eu tincidunt orci iaculis in. Sed quis lacus ac ligula aliquam egestas. Nam mattis massa sed magna lacinia pharetra. Sed semper faucibus mauris, ut consectetur libero tristique nec.\ | ||
71 | <br>\ | ||
72 | Proin vel elit id ante lacinia molestie quis in lectus. Nunc in ante nulla. Nam nec sem sed felis placerat rutrum. Sed pharetra molestie metus facilisis ornare. In sed nunc vel tellus volutpat dictum. Nunc risus enim, congue vel fermentum sed, varius eget elit. Proin vitae mi tortor. Pellentesque ut justo ligula. Nunc nibh elit, mattis at iaculis ac, pretium fermentum dui. Praesent in quam turpis. Quisque id velit eros. Nulla facilisi. Maecenas commodo dignissim libero nec pharetra. Praesent eget augue nec odio scelerisque sagittis. Donec nec dui dolor. Donec est nisi, faucibus vitae ultricies quis, cursus vel lorem. Nulla suscipit ultricies dui, vitae volutpat risus fermentum sit amet.\ | ||
73 | <br>\ | ||
74 | Morbi eu libero urna. Aliquam et nunc nec risus varius aliquet. Aenean semper sem sed purus ornare aliquam. Maecenas lobortis tristique nibh, id fermentum est egestas vel. Nam ut tortor pharetra augue rhoncus vulputate et et nisl. Donec scelerisque aliquet convallis. Quisque felis tellus, aliquet eu fermentum sed, mollis et lorem. Vivamus imperdiet, mauris at imperdiet tempor, elit justo aliquet purus, vitae vulputate dui elit euismod nulla. Nam nisl sem, laoreet at fermentum eu, eleifend vel quam. Duis venenatis hendrerit felis eget viverra. Aenean tincidunt ultrices pulvinar. Duis at risus tellus, sed euismod ipsum. Donec sit amet dui quam. Praesent at nunc a turpis sollicitudin faucibus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam tincidunt accumsan lacinia. Nunc blandit gravida urna, quis venenatis metus mollis vel. Cras a nunc ac tortor aliquam fermentum ac sed purus. Etiam porttitor tincidunt risus, et scelerisque velit egestas vitae. Nulla at arcu sed sapien vehicula laoreet.\ | ||
75 | <br>\ | ||
76 | Pellentesque rhoncus odio id ante porttitor mollis. Nullam non mi vel erat suscipit lobortis. Vivamus urna neque, gravida ac interdum eget, commodo sit amet nunc. Maecenas libero nisl, bibendum eget tristique eget, laoreet vitae arcu. Maecenas porta diam vel libero tempus fermentum. Aenean molestie fringilla magna, tincidunt condimentum nunc aliquam nec. Mauris congue commodo lacus, in condimentum orci posuere id. Maecenas in ultrices ipsum. Nam sit amet orci nisi, ac lacinia nibh. Nullam molestie lorem eget felis interdum nec semper neque ultrices. Nunc et leo eu leo faucibus euismod. Suspendisse potenti. Vivamus id enim sed augue rutrum volutpat.\ | ||
77 | <br>\ | ||
78 | Curabitur facilisis placerat mi nec consectetur. Sed sed ante orci. Aliquam dapibus egestas dapibus. Aliquam feugiat urna ut libero adipiscing sed consectetur nulla mollis. Donec lacinia condimentum libero a egestas. Vivamus vestibulum ipsum ante, vitae fermentum libero. In hac habitasse platea dictumst. Ut sed quam libero. Aliquam bibendum sollicitudin faucibus. Nam elit felis, pulvinar vitae convallis id, fermentum sed leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec dolor neque, vehicula commodo vulputate et, faucibus id nisi.\ | ||
79 | <br>\ | ||
80 | Vestibulum id metus in lectus iaculis aliquet rhoncus sit amet justo. Phasellus ac arcu ac felis auctor volutpat vitae nec mauris. Integer convallis, eros vel molestie tempor, odio enim posuere libero, quis iaculis elit ipsum eu eros. Sed metus diam, elementum ut scelerisque eu, scelerisque suscipit tellus. Aliquam congue fringilla sapien, vitae viverra arcu egestas sed. Donec quis lacus ipsum, ac faucibus eros. Suspendisse potenti. Cras non ipsum et dui tristique interdum. Vivamus ultrices vestibulum augue. Donec ac lacus quam, nec commodo eros. Quisque ac lacus lorem, vitae pellentesque nisl. Aliquam nec justo augue, quis porta tortor. Cras sit amet egestas eros. Duis neque ante, vulputate vel faucibus eu, sodales nec justo. Sed sagittis egestas orci sed lobortis. Donec eget consectetur nulla.\ | ||
81 | <br>\ | ||
82 | Vivamus mollis sodales ligula non imperdiet. Duis eget volutpat velit. Nunc eu dolor felis. Vestibulum massa augue, convallis in facilisis eget, vestibulum in mi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis non ante enim, non volutpat massa. Mauris nunc turpis, dignissim non egestas vel, tristique id sem. Phasellus magna purus, scelerisque eget varius in, convallis id enim. Sed eu dolor neque, nec porta odio. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam pharetra diam id pharetra. Nulla lectus orci, condimentum sed malesuada vulputate, dictum quis purus.\ | ||
83 | <br>\ | ||
84 | Pellentesque quis lorem orci, commodo faucibus lectus. Nullam cursus, purus in porttitor tincidunt, enim ligula sagittis urna, eu fermentum velit eros a sapien. Maecenas ornare, mi eget faucibus malesuada, leo justo lobortis erat, et lobortis massa dolor ac augue. Nulla pulvinar malesuada lorem, id venenatis nulla pulvinar non. Praesent ac augue tortor, a feugiat risus. Vestibulum molestie ultrices felis vel fermentum. Maecenas feugiat eros non libero tempus condimentum sed sed metus. Sed sagittis metus et dui facilisis vitae vehicula massa convallis. Morbi sed ante nulla, nec posuere lorem. Donec euismod fringilla diam, in suscipit libero eleifend nec. Donec tristique scelerisque nibh sed euismod. Ut sed felis erat, ullamcorper vehicula sapien. Nunc pharetra interdum pretium. Nunc a mauris orci. Cras eu quam justo.\ | ||
85 | <br>\ | ||
86 | Proin ultricies dolor sit amet eros sollicitudin nec pulvinar tortor luctus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin imperdiet turpis sit amet libero placerat in mattis quam molestie. Quisque luctus sem libero, vel venenatis purus. Ut vehicula egestas risus in pulvinar. Etiam ut vehicula est. Quisque commodo erat id est mattis pretium. Ut lobortis mauris a magna eleifend ultrices. Donec lacinia pharetra nisi, nec laoreet lacus varius et. Morbi risus diam, pulvinar a convallis id, blandit in lorem. Mauris quis tempor mi. Integer at nisi sapien. Integer dignissim consectetur tellus id rutrum. Nulla odio augue, sagittis in vestibulum ac, viverra convallis purus. Aliquam commodo mi id nibh bibendum vel viverra arcu consequat. Proin ipsum velit, ultrices id egestas nec, gravida eu dolor. Duis facilisis orci eu turpis feugiat ullamcorper. Integer venenatis metus non erat facilisis vel consectetur lectus varius. Nunc ac leo magna, a aliquet felis. Curabitur malesuada, arcu quis interdum lacinia, sapien sem condimentum ante, ac lacinia purus metus at orci.\ | ||
87 | <br>\ | ||
88 | Sed venenatis neque eu arcu bibendum imperdiet. Maecenas eget augue quis enim pretium cursus vitae venenatis dolor. Maecenas sit amet mauris mi. Aliquam luctus, dolor varius rhoncus rhoncus, diam turpis bibendum dui, eu hendrerit arcu nibh nec orci. Praesent condimentum, leo et commodo vulputate, purus odio interdum est, sed aliquam tellus lectus ut justo. Aenean pulvinar luctus dapibus. Nulla tempus, ante vel dictum ultricies, massa urna tincidunt libero, ut rhoncus risus turpis eget arcu. Morbi auctor commodo libero, in pretium quam vestibulum nec. Aenean ac tincidunt nulla. Cras vel orci enim. Praesent non metus ipsum.\ | ||
89 | <br>\ | ||
90 | Praesent ligula nulla, aliquam in tincidunt eu, lacinia eget neque. Integer tincidunt neque in risus malesuada gravida. Nullam ornare viverra nisl vel interdum. Nullam eget lectus a ipsum condimentum aliquam sit amet eu felis. Nam eu nisl enim. In pulvinar tincidunt ultrices. Morbi mi ipsum, placerat sit amet mollis vel, tincidunt vel nisi. In sed eros non magna sodales convallis pulvinar non turpis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce volutpat egestas elit, in lobortis urna egestas vitae. Nulla non tincidunt massa. Praesent ut convallis nunc. Morbi quis massa non lacus lobortis tempor non id libero. Proin turpis ante, porta et ullamcorper sit amet, malesuada vitae nisl. Suspendisse faucibus, ipsum quis varius porta, tellus augue porta arcu, nec posuere massa libero sed enim. Sed id suscipit ante. Ut fringilla sagittis orci porta tincidunt. Proin non massa sem. Nullam sollicitudin mauris et lorem euismod ut eleifend neque tempus.\ | ||
91 | <br>\ | ||
92 | Duis est est, rhoncus vel feugiat sed, iaculis id arcu. Donec ultrices lacinia dapibus. Fusce accumsan malesuada dolor, vitae viverra quam condimentum et. Sed id tellus lacus, ut sollicitudin turpis. Donec egestas ante et nunc consequat dapibus. Duis rutrum scelerisque orci, sollicitudin congue lectus condimentum non. In quis lacus et justo pellentesque vehicula. Nulla accumsan hendrerit lectus, non ornare nibh vehicula vitae. Sed iaculis dapibus laoreet. Nunc rutrum eleifend mi, ac interdum augue egestas nec. Morbi feugiat tincidunt eros, sit amet congue nisl ultricies sed. Nulla id est non dolor mattis lacinia. Mauris quis faucibus libero. Phasellus facilisis, massa a dapibus elementum, augue magna auctor tellus, nec placerat lorem lacus in purus. Morbi congue ipsum in dui euismod eleifend auctor eros eleifend. Pellentesque porttitor tincidunt pharetra. Maecenas quis tellus sed arcu convallis ultrices mollis ut neque.\ | ||
93 | <br>\ | ||
94 | Duis non sem ut mi facilisis pretium sit amet a erat. Suspendisse dignissim nisl nec risus tincidunt vitae ultrices arcu bibendum. Donec condimentum ullamcorper ipsum at vehicula. Donec interdum, odio vel blandit aliquet, nisi urna iaculis ligula, a ullamcorper mi ligula nec ligula. Curabitur pellentesque, augue id volutpat aliquet, lorem enim auctor sem, at tempus nibh augue ac diam. Etiam interdum lorem non nisi tempus vestibulum ut convallis elit. Cras cursus facilisis velit eget consectetur. Duis faucibus nulla sed leo accumsan et pharetra turpis aliquet. Curabitur ullamcorper tincidunt sapien lacinia suscipit. Curabitur consectetur, urna nec tempor lobortis, massa lectus accumsan turpis, vitae semper erat leo at dui. Sed ut facilisis velit. Ut vestibulum dapibus gravida. Quisque pellentesque auctor tortor eu malesuada. Vestibulum mauris dolor, tristique sit amet varius sit amet, varius eget neque. Curabitur in urna sit amet mi cursus pharetra sit amet at odio. Vivamus enim neque, tincidunt id adipiscing ac, volutpat non massa. Quisque gravida malesuada felis, eu aliquam nulla vestibulum id. Nullam eleifend ultricies cursus.\ | ||
95 | <br>\ | ||
96 | Pellentesque rutrum elementum orci, nec feugiat nisl vehicula nec. Suspendisse quis turpis ipsum. Maecenas eleifend nibh sit amet nisi auctor at auctor libero auctor. Suspendisse potenti. Morbi nec orci quis quam porttitor malesuada. Curabitur blandit luctus lacinia. Cras id turpis neque, a luctus justo. Morbi nec turpis risus. Fusce posuere urna sed nisl scelerisque mattis. Cras leo neque, dignissim ut vestibulum at, viverra in magna. Proin tellus leo, cursus eu porta id, eleifend in purus. Integer ut sapien leo, sed aliquet diam. Proin hendrerit imperdiet tincidunt.\ | ||
97 | <br>\ | ||
98 | Quisque rutrum urna non mi commodo vitae vestibulum velit tincidunt. Pellentesque vitae dolor et leo porta consectetur. Fusce semper eleifend tincidunt. In hac habitasse platea dictumst. Nulla mollis, dui in malesuada feugiat, sapien sapien porttitor nulla, at congue metus turpis vel arcu. Phasellus quis enim eu quam varius interdum quis lobortis magna. Quisque augue orci, suscipit eu malesuada ac, convallis id tortor. Fusce et tortor a mi fringilla congue. Praesent iaculis justo vel leo fringilla sodales. Nullam egestas, orci scelerisque placerat sagittis, diam tellus semper libero, in imperdiet neque sapien eget magna. Etiam eget massa orci, at interdum neque. Integer molestie enim eu sapien pellentesque lobortis a ac urna. Donec eu elit sit amet nunc bibendum faucibus et vel orci. Sed fringilla tristique sollicitudin. Donec rutrum pellentesque velit luctus suscipit. Aliquam lobortis sollicitudin ante at consectetur. Praesent nulla sapien, condimentum quis ornare quis, consequat sit amet arcu. Suspendisse potenti.\ | ||
99 | <br>\ | ||
100 | Ut volutpat lorem in lorem malesuada ultricies. Nunc nec eros lorem, ac iaculis velit. Donec vel metus lorem, a suscipit odio. Aliquam tincidunt nulla sit amet urna porttitor pulvinar. Cras adipiscing venenatis nibh a viverra. Etiam a metus nibh. Praesent sodales feugiat dolor, in scelerisque purus dapibus commodo. Mauris non mi metus. Fusce a aliquet ante. Aliquam erat volutpat. Praesent nec condimentum elit. Sed posuere orci et tortor volutpat sollicitudin. Vestibulum bibendum convallis dolor, non hendrerit velit consectetur eu. Aenean pharetra neque ac felis sollicitudin a ornare nunc accumsan. Aenean luctus dolor non purus lobortis sodales eget eget libero. Vivamus risus quam, vestibulum in ullamcorper et, vestibulum sit amet nunc. Ut odio felis, condimentum eget venenatis ut, suscipit ac sem. Nulla sit amet leo a metus hendrerit vehicula at vitae ante.\ | ||
101 | <br>\ | ||
102 | Aliquam diam leo, ultrices a sodales sed, laoreet id purus. Nullam eleifend leo vitae nisi euismod ac posuere elit tempus. Phasellus sed tellus est, eget fringilla diam. Aenean tempor enim quis nisi congue vitae placerat turpis vehicula. Proin congue, risus in pretium euismod, lacus tellus porttitor nulla, eget egestas lacus orci id orci. Proin nulla mauris, feugiat imperdiet consectetur id, condimentum ac libero. Donec consectetur leo a elit tincidunt vitae luctus nisl porta. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sit amet orci quis dolor molestie commodo. Integer placerat risus neque. Phasellus non laoreet tellus. Nam pulvinar pellentesque nibh, egestas suscipit nisl gravida ac. Quisque sodales lorem imperdiet orci consequat ultricies. Phasellus fringilla diam id neque facilisis pharetra.\ | ||
103 | <br>\ | ||
104 | Nam scelerisque nulla ut neque tempor blandit volutpat nisl vehicula. Nam orci enim, luctus ut venenatis et, egestas id nunc. Phasellus risus sem, scelerisque sed vestibulum a, aliquam at sem. Sed venenatis tristique nisi id eleifend. Morbi urna tellus, cursus ac porttitor rhoncus, commodo at mi. Mauris ac magna nisi. Maecenas rutrum lobortis sapien, sed dapibus neque hendrerit a. Aliquam fringilla lectus nec arcu tempor et molestie dui suscipit. Proin et felis velit, vel pellentesque ligula. Donec tempus, mi at mollis porttitor, mauris urna congue elit, at varius nisi elit et est. Quisque eu libero lorem, eget tincidunt velit. Nullam hendrerit metus quis urna adipiscing quis tristique tortor condimentum. Integer iaculis scelerisque sem, vitae consectetur lorem facilisis eu. Phasellus consectetur blandit auctor. Morbi eleifend mollis ipsum, id facilisis leo euismod ut. Nunc id est tellus."; | ||
105 | |||
106 | EAPI_MAIN int | ||
107 | elm_main(int argc, char **argv) | ||
108 | { | ||
109 | Evas_Object *win, *bg, *label, *scroller; | ||
110 | |||
111 | win = elm_win_add(NULL, "scroller", ELM_WIN_BASIC); | ||
112 | elm_win_title_set(win, "Scroller"); | ||
113 | elm_win_autodel_set(win, EINA_TRUE); | ||
114 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
115 | |||
116 | bg = elm_bg_add(win); | ||
117 | elm_win_resize_object_add(win, bg); | ||
118 | evas_object_show(bg); | ||
119 | |||
120 | label = elm_label_add(win); | ||
121 | elm_object_text_set(label, text); | ||
122 | evas_object_show(label); | ||
123 | |||
124 | scroller = elm_scroller_add(win); | ||
125 | elm_win_resize_object_add(win, scroller); | ||
126 | evas_object_show(scroller); | ||
127 | elm_object_content_set(scroller, label); | ||
128 | elm_scroller_bounce_set(scroller, EINA_TRUE, EINA_FALSE); | ||
129 | elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON); | ||
130 | elm_scroller_propagate_events_set(scroller, EINA_TRUE); | ||
131 | elm_scroller_page_relative_set(scroller, 0, 1); | ||
132 | elm_scroller_region_show(scroller, 50, 50, 200, 200); | ||
133 | |||
134 | evas_object_resize(win, 400, 400); | ||
135 | evas_object_show(win); | ||
136 | |||
137 | elm_run(); | ||
138 | elm_shutdown(); | ||
139 | |||
140 | return 0; | ||
141 | } | ||
142 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/segment_control_example.c b/libraries/elementary/src/examples/segment_control_example.c deleted file mode 100644 index bd98037..0000000 --- a/libraries/elementary/src/examples/segment_control_example.c +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>segment_control widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g segment_control_example.c -o segment_control_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | EAPI_MAIN int | ||
23 | elm_main(int argc, char **argv) | ||
24 | { | ||
25 | Evas_Object *win, *bg, *sc, *ic; | ||
26 | Elm_Object_Item *seg_it; | ||
27 | int count, idx; | ||
28 | |||
29 | win = elm_win_add(NULL, "segment_control", ELM_WIN_BASIC); | ||
30 | elm_win_title_set(win, "Segment Control Example"); | ||
31 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
32 | |||
33 | bg = elm_bg_add(win); | ||
34 | elm_win_resize_object_add(win, bg); | ||
35 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
36 | evas_object_show(bg); | ||
37 | |||
38 | sc = elm_segment_control_add(win); | ||
39 | evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
40 | elm_win_resize_object_add(win, sc); | ||
41 | evas_object_show(sc); | ||
42 | |||
43 | elm_segment_control_item_add(sc, NULL, "only text"); | ||
44 | |||
45 | ic = elm_icon_add(win); | ||
46 | elm_icon_standard_set(ic, "close"); | ||
47 | elm_segment_control_item_add(sc, ic, NULL); | ||
48 | |||
49 | ic = elm_icon_add(win); | ||
50 | elm_icon_standard_set(ic, "home"); | ||
51 | elm_segment_control_item_add(sc, ic, "Home"); | ||
52 | |||
53 | ic = elm_icon_add(win); | ||
54 | elm_icon_standard_set(ic, "close"); | ||
55 | elm_segment_control_item_add(sc, ic, ""); | ||
56 | |||
57 | count = elm_segment_control_item_count_get(sc); | ||
58 | elm_segment_control_item_insert_at(sc, NULL, "Inserted at", count - 1); | ||
59 | |||
60 | seg_it = elm_segment_control_item_insert_at(sc, NULL, "To be deleted", 2); | ||
61 | elm_object_item_del(seg_it); | ||
62 | |||
63 | elm_segment_control_item_insert_at(sc, NULL, "To be deleted", 2); | ||
64 | elm_segment_control_item_del_at(sc, 2); | ||
65 | |||
66 | seg_it = elm_segment_control_item_get(sc, 0); | ||
67 | elm_object_item_text_set(seg_it, "Only Text"); | ||
68 | |||
69 | count = elm_segment_control_item_count_get(sc); | ||
70 | seg_it = elm_segment_control_item_get(sc, count / 2); | ||
71 | elm_segment_control_item_selected_set(seg_it, EINA_TRUE); | ||
72 | seg_it = elm_segment_control_item_selected_get(sc); | ||
73 | idx = elm_segment_control_item_index_get(seg_it); | ||
74 | printf("Item selected: %i\n", idx); | ||
75 | |||
76 | evas_object_show(win); | ||
77 | |||
78 | elm_run(); | ||
79 | elm_shutdown(); | ||
80 | |||
81 | return 0; | ||
82 | } | ||
83 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/separator_example_01.c b/libraries/elementary/src/examples/separator_example_01.c deleted file mode 100644 index 344784d..0000000 --- a/libraries/elementary/src/examples/separator_example_01.c +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g separator_example_01.c -o separator_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | EAPI_MAIN int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg, *bx, *rect, *separator; | ||
10 | |||
11 | win = elm_win_add(NULL, "separator", ELM_WIN_BASIC); | ||
12 | elm_win_title_set(win, "Separator"); | ||
13 | elm_win_autodel_set(win, EINA_TRUE); | ||
14 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
15 | |||
16 | bg = elm_bg_add(win); | ||
17 | elm_win_resize_object_add(win, bg); | ||
18 | evas_object_show(bg); | ||
19 | |||
20 | bx = elm_box_add(win); | ||
21 | elm_box_horizontal_set(bx, EINA_TRUE); | ||
22 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
23 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
24 | elm_win_resize_object_add(win, bx); | ||
25 | evas_object_show(bx); | ||
26 | |||
27 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
28 | evas_object_color_set(rect, 0, 255, 0, 255); | ||
29 | evas_object_size_hint_min_set(rect, 90, 200); | ||
30 | evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
31 | evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
32 | evas_object_show(rect); | ||
33 | elm_box_pack_end(bx, rect); | ||
34 | |||
35 | separator = elm_separator_add(win); | ||
36 | elm_separator_horizontal_set(separator, EINA_TRUE); | ||
37 | evas_object_show(separator); | ||
38 | elm_box_pack_end(bx, separator); | ||
39 | |||
40 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
41 | evas_object_color_set(rect, 0, 0, 255, 255); | ||
42 | evas_object_size_hint_min_set(rect, 90, 200); | ||
43 | evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
44 | evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
45 | evas_object_show(rect); | ||
46 | elm_box_pack_end(bx, rect); | ||
47 | |||
48 | evas_object_show(win); | ||
49 | |||
50 | elm_run(); | ||
51 | elm_shutdown(); | ||
52 | |||
53 | return 0; | ||
54 | } | ||
55 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/slider_example.c b/libraries/elementary/src/examples/slider_example.c deleted file mode 100644 index 14d70c0..0000000 --- a/libraries/elementary/src/examples/slider_example.c +++ /dev/null | |||
@@ -1,149 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>slider widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g slider_example.c -o slider_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | static void | ||
23 | _changed_cb(void *data, Evas_Object *obj, void *event_info) | ||
24 | { | ||
25 | double val = elm_slider_value_get(obj); | ||
26 | printf("Changed to %1.2f\n", val); | ||
27 | } | ||
28 | |||
29 | static void | ||
30 | _delay_changed_cb(void *data, Evas_Object *obj, void *event_info) | ||
31 | { | ||
32 | double val = elm_slider_value_get(obj); | ||
33 | printf("Delay changed to %1.2f\n", val); | ||
34 | } | ||
35 | |||
36 | static char* | ||
37 | _indicator_format(double val) | ||
38 | { | ||
39 | char *indicator = malloc(sizeof(char) * 32); | ||
40 | snprintf(indicator, 32, "%1.2f u", val); | ||
41 | return indicator; | ||
42 | } | ||
43 | |||
44 | static void | ||
45 | _indicator_free(char *str) | ||
46 | { | ||
47 | free(str); | ||
48 | } | ||
49 | |||
50 | EAPI_MAIN int | ||
51 | elm_main(int argc, char **argv) | ||
52 | { | ||
53 | Evas_Object *win, *bg, *bx, *sl, *ic; | ||
54 | |||
55 | win = elm_win_add(NULL, "slider", ELM_WIN_BASIC); | ||
56 | elm_win_title_set(win, "Slider Example"); | ||
57 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
58 | |||
59 | bg = elm_bg_add(win); | ||
60 | elm_win_resize_object_add(win, bg); | ||
61 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
62 | evas_object_show(bg); | ||
63 | |||
64 | bx = elm_box_add(win); | ||
65 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
66 | elm_win_resize_object_add(win, bx); | ||
67 | evas_object_show(bx); | ||
68 | |||
69 | /* default */ | ||
70 | sl = elm_slider_add(win); | ||
71 | evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); | ||
72 | evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
73 | elm_box_pack_end(bx, sl); | ||
74 | evas_object_show(sl); | ||
75 | |||
76 | /* with icon, end and label */ | ||
77 | sl = elm_slider_add(win); | ||
78 | elm_object_text_set(sl, "Counter"); | ||
79 | |||
80 | ic = elm_icon_add(win); | ||
81 | elm_icon_standard_set(ic, "home"); | ||
82 | elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE); | ||
83 | elm_object_part_content_set(sl, "icon", ic); | ||
84 | |||
85 | ic = elm_icon_add(win); | ||
86 | elm_icon_standard_set(ic, "folder"); | ||
87 | elm_icon_resizable_set(ic, EINA_FALSE, EINA_FALSE); | ||
88 | elm_object_part_content_set(sl, "end", ic); | ||
89 | |||
90 | evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); | ||
91 | evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
92 | elm_box_pack_end(bx, sl); | ||
93 | evas_object_show(sl); | ||
94 | |||
95 | /* value set and span size */ | ||
96 | sl = elm_slider_add(win); | ||
97 | elm_slider_value_set(sl, 1); | ||
98 | elm_slider_span_size_set(sl, 200); | ||
99 | evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); | ||
100 | evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
101 | elm_box_pack_end(bx, sl); | ||
102 | evas_object_show(sl); | ||
103 | |||
104 | /* with unit label and min - max */ | ||
105 | sl = elm_slider_add(win); | ||
106 | elm_slider_unit_format_set(sl, "%1.0f units"); | ||
107 | elm_slider_min_max_set(sl, 0, 100); | ||
108 | evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); | ||
109 | evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
110 | elm_box_pack_end(bx, sl); | ||
111 | evas_object_show(sl); | ||
112 | |||
113 | /* with indicator label and inverted */ | ||
114 | sl = elm_slider_add(win); | ||
115 | elm_slider_indicator_format_set(sl, "%1.2f"); | ||
116 | elm_slider_inverted_set(sl, EINA_TRUE); | ||
117 | evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); | ||
118 | evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
119 | elm_box_pack_end(bx, sl); | ||
120 | evas_object_show(sl); | ||
121 | |||
122 | /* vertical with indicator format func */ | ||
123 | sl = elm_slider_add(win); | ||
124 | elm_slider_horizontal_set(sl, EINA_FALSE); | ||
125 | elm_slider_indicator_format_function_set(sl, _indicator_format, | ||
126 | _indicator_free); | ||
127 | evas_object_size_hint_align_set(sl, 0.5, EVAS_HINT_FILL); | ||
128 | evas_object_size_hint_weight_set(sl, 0, EVAS_HINT_EXPAND); | ||
129 | elm_box_pack_end(bx, sl); | ||
130 | evas_object_show(sl); | ||
131 | |||
132 | /* callbacks */ | ||
133 | sl = elm_slider_add(win); | ||
134 | elm_slider_unit_format_set(sl, "%1.3f units"); | ||
135 | evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); | ||
136 | evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
137 | elm_box_pack_end(bx, sl); | ||
138 | evas_object_show(sl); | ||
139 | evas_object_smart_callback_add(sl, "changed", _changed_cb, NULL); | ||
140 | evas_object_smart_callback_add(sl, "delay,changed", _delay_changed_cb, NULL); | ||
141 | |||
142 | evas_object_show(win); | ||
143 | |||
144 | elm_run(); | ||
145 | elm_shutdown(); | ||
146 | |||
147 | return 0; | ||
148 | } | ||
149 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/slideshow_example.c b/libraries/elementary/src/examples/slideshow_example.c deleted file mode 100644 index db011b8..0000000 --- a/libraries/elementary/src/examples/slideshow_example.c +++ /dev/null | |||
@@ -1,323 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>slide show widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -o slideshow_example slideshow_example.c -g `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | static Evas_Object *slideshow, *bt_start, *bt_stop; | ||
23 | static Elm_Slideshow_Item_Class itc; | ||
24 | |||
25 | static char img1[256], img2[256], img3[256], img4[256], img5[256], img6[256], img7[256], img8[256], img9[256]; | ||
26 | |||
27 | static void | ||
28 | _notify_show(void *data, | ||
29 | Evas *e, | ||
30 | Evas_Object *obj, | ||
31 | void *event_info) | ||
32 | { | ||
33 | evas_object_show(data); | ||
34 | } | ||
35 | |||
36 | /* jump to next item, cyclically */ | ||
37 | static void | ||
38 | _next(void *data, | ||
39 | Evas_Object *obj, | ||
40 | void *event_info) | ||
41 | { | ||
42 | elm_slideshow_next(data); | ||
43 | } | ||
44 | |||
45 | static void | ||
46 | _previous(void *data, | ||
47 | Evas_Object *obj, | ||
48 | void *event_info) | ||
49 | { | ||
50 | elm_slideshow_previous(data); | ||
51 | } | ||
52 | |||
53 | static void | ||
54 | _first(void *data, | ||
55 | Evas_Object *obj, | ||
56 | void *event_info) | ||
57 | { | ||
58 | elm_slideshow_item_show(data); | ||
59 | } | ||
60 | |||
61 | static void | ||
62 | _last(void *data, | ||
63 | Evas_Object *obj, | ||
64 | void *event_info) | ||
65 | { | ||
66 | elm_slideshow_item_show(data); | ||
67 | } | ||
68 | |||
69 | static void | ||
70 | _mouse_in(void *data, | ||
71 | Evas *e, | ||
72 | Evas_Object *obj, | ||
73 | void *event_info) | ||
74 | { | ||
75 | elm_notify_timeout_set(data, 0.0); | ||
76 | evas_object_show(data); | ||
77 | } | ||
78 | |||
79 | static void | ||
80 | _mouse_out(void *data, | ||
81 | Evas *e, | ||
82 | Evas_Object *obj, | ||
83 | void *event_info) | ||
84 | { | ||
85 | elm_notify_timeout_set(data, 3.0); | ||
86 | } | ||
87 | |||
88 | /* transition changed */ | ||
89 | static void | ||
90 | _transition_select(void *data, | ||
91 | Evas_Object *obj, | ||
92 | void *event_info) | ||
93 | { | ||
94 | elm_slideshow_transition_set(slideshow, data); | ||
95 | elm_object_text_set(obj, data); | ||
96 | } | ||
97 | |||
98 | static void | ||
99 | _layout_select(void *data, | ||
100 | Evas_Object *obj, | ||
101 | void *event_info) | ||
102 | { | ||
103 | elm_slideshow_layout_set(slideshow, data); | ||
104 | elm_object_text_set(obj, data); | ||
105 | } | ||
106 | |||
107 | /* start the show! */ | ||
108 | static void | ||
109 | _start(void *data, | ||
110 | Evas_Object *obj, | ||
111 | void *event_info) | ||
112 | { | ||
113 | elm_slideshow_timeout_set(slideshow, elm_spinner_value_get(data)); | ||
114 | |||
115 | elm_object_disabled_set(bt_start, EINA_TRUE); | ||
116 | elm_object_disabled_set(bt_stop, EINA_FALSE); | ||
117 | } | ||
118 | |||
119 | static void | ||
120 | _stop(void *data, | ||
121 | Evas_Object *obj, | ||
122 | void *event_info) | ||
123 | { | ||
124 | elm_slideshow_timeout_set(slideshow, 0.0); | ||
125 | elm_object_disabled_set(bt_start, EINA_FALSE); | ||
126 | elm_object_disabled_set(bt_stop, EINA_TRUE); | ||
127 | } | ||
128 | |||
129 | /* slideshow transition time has changed */ | ||
130 | static void | ||
131 | _spin(void *data, | ||
132 | Evas_Object *obj, | ||
133 | void *event_info) | ||
134 | { | ||
135 | if (elm_slideshow_timeout_get(slideshow) > 0) | ||
136 | elm_slideshow_timeout_set(slideshow, elm_spinner_value_get(data)); | ||
137 | } | ||
138 | |||
139 | /* get our images to make slideshow items */ | ||
140 | static Evas_Object * | ||
141 | _get(void *data, | ||
142 | Evas_Object *obj) | ||
143 | { | ||
144 | Evas_Object *photo = elm_photo_add(obj); | ||
145 | elm_photo_file_set(photo, data); | ||
146 | elm_photo_fill_inside_set(photo, EINA_TRUE); | ||
147 | elm_object_style_set(photo, "shadow"); | ||
148 | |||
149 | return photo; | ||
150 | } | ||
151 | |||
152 | /* ordering alphabetically */ | ||
153 | static int | ||
154 | _cmp_func(const void *data1, | ||
155 | const void *data2) | ||
156 | { | ||
157 | const char *img_path1, *img_path2; | ||
158 | |||
159 | const Elm_Object_Item *slide_it1 = data1; | ||
160 | const Elm_Object_Item *slide_it2 = data2; | ||
161 | |||
162 | img_path1 = elm_object_item_data_get(slide_it1); | ||
163 | img_path2 = elm_object_item_data_get(slide_it2); | ||
164 | |||
165 | return strcasecmp(img_path1, img_path2); | ||
166 | } | ||
167 | |||
168 | EAPI_MAIN int | ||
169 | elm_main(int argc, | ||
170 | char **argv) | ||
171 | { | ||
172 | Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin; | ||
173 | Elm_Object_Item *slide_first, *slide_last, *slide_it; | ||
174 | const char *transition, *layout; | ||
175 | const Eina_List *l, *list; | ||
176 | const char *data_dir; | ||
177 | |||
178 | elm_app_info_set(elm_main, "elementary", "images"); | ||
179 | data_dir = elm_app_data_dir_get(); | ||
180 | snprintf(img1, sizeof(img1), "%s/images/logo.png", data_dir); | ||
181 | snprintf(img2, sizeof(img2), "%s/images/plant_01.jpg", data_dir); | ||
182 | snprintf(img3, sizeof(img3), "%s/images/rock_01.jpg", data_dir); | ||
183 | snprintf(img4, sizeof(img4), "%s/images/rock_02.jpg", data_dir); | ||
184 | snprintf(img5, sizeof(img5), "%s/images/sky_01.jpg", data_dir); | ||
185 | snprintf(img6, sizeof(img6), "%s/images/sky_04.jpg", data_dir); | ||
186 | snprintf(img7, sizeof(img7), "%s/images/wood_01.jpg", data_dir); | ||
187 | snprintf(img8, sizeof(img8), "%s/images/mystrale.jpg", data_dir); | ||
188 | snprintf(img9, sizeof(img9), "%s/images/mystrale_2.jpg", data_dir); | ||
189 | |||
190 | win = elm_win_add(NULL, "slideshow", ELM_WIN_BASIC); | ||
191 | elm_win_title_set(win, "Slideshow example"); | ||
192 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
193 | elm_win_autodel_set(win, EINA_TRUE); | ||
194 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
195 | evas_object_resize(win, 600, 400); | ||
196 | evas_object_show(win); | ||
197 | |||
198 | bg = elm_bg_add(win); | ||
199 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
200 | elm_win_resize_object_add(win, bg); | ||
201 | evas_object_show(bg); | ||
202 | |||
203 | slideshow = elm_slideshow_add(win); | ||
204 | elm_slideshow_loop_set(slideshow, EINA_TRUE); | ||
205 | evas_object_size_hint_weight_set(slideshow, | ||
206 | EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
207 | elm_win_resize_object_add(win, slideshow); | ||
208 | evas_object_show(slideshow); | ||
209 | |||
210 | itc.func.get = _get; | ||
211 | itc.func.del = NULL; | ||
212 | |||
213 | slide_first = elm_slideshow_item_sorted_insert(slideshow, &itc, img1, _cmp_func); | ||
214 | elm_slideshow_item_sorted_insert(slideshow, &itc, img2, _cmp_func); | ||
215 | elm_slideshow_item_sorted_insert(slideshow, &itc, img3, _cmp_func); | ||
216 | elm_slideshow_item_sorted_insert(slideshow, &itc, img4, _cmp_func); | ||
217 | elm_slideshow_item_sorted_insert(slideshow, &itc, img5, _cmp_func); | ||
218 | elm_slideshow_item_sorted_insert(slideshow, &itc, img6, _cmp_func); | ||
219 | elm_slideshow_item_sorted_insert(slideshow, &itc, img7, _cmp_func); | ||
220 | elm_slideshow_item_sorted_insert(slideshow, &itc, img8, _cmp_func); | ||
221 | slide_last = elm_slideshow_item_add(slideshow, &itc, img9); | ||
222 | |||
223 | list = elm_slideshow_items_get(slideshow); | ||
224 | fprintf(stdout, "List of items in the slideshow:\n"); | ||
225 | EINA_LIST_FOREACH(list, l, slide_it) | ||
226 | fprintf(stdout, "\t%s\n", | ||
227 | (const char *)elm_object_item_data_get(slide_it)); | ||
228 | |||
229 | notify = elm_notify_add(win); | ||
230 | elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM); | ||
231 | evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
232 | elm_win_resize_object_add(win, notify); | ||
233 | elm_notify_timeout_set(notify, 3.0); | ||
234 | |||
235 | bx = elm_box_add(win); | ||
236 | elm_box_horizontal_set(bx, EINA_TRUE); | ||
237 | elm_object_content_set(notify, bx); | ||
238 | evas_object_show(bx); | ||
239 | |||
240 | evas_object_event_callback_add(bx, EVAS_CALLBACK_MOUSE_IN, _mouse_in, | ||
241 | notify); | ||
242 | evas_object_event_callback_add(bx, EVAS_CALLBACK_MOUSE_OUT, _mouse_out, | ||
243 | notify); | ||
244 | |||
245 | bt = elm_button_add(win); | ||
246 | elm_object_text_set(bt, "Previous"); | ||
247 | evas_object_smart_callback_add(bt, "clicked", _previous, slideshow); | ||
248 | elm_box_pack_end(bx, bt); | ||
249 | evas_object_show(bt); | ||
250 | |||
251 | bt = elm_button_add(win); | ||
252 | elm_object_text_set(bt, "Next"); | ||
253 | evas_object_smart_callback_add(bt, "clicked", _next, slideshow); | ||
254 | elm_box_pack_end(bx, bt); | ||
255 | evas_object_show(bt); | ||
256 | |||
257 | bt = elm_button_add(win); | ||
258 | elm_object_text_set(bt, "First"); | ||
259 | evas_object_smart_callback_add(bt, "clicked", _first, slide_first); | ||
260 | elm_box_pack_end(bx, bt); | ||
261 | evas_object_show(bt); | ||
262 | |||
263 | bt = elm_button_add(win); | ||
264 | elm_object_text_set(bt, "Last"); | ||
265 | evas_object_smart_callback_add(bt, "clicked", _last, slide_last); | ||
266 | elm_box_pack_end(bx, bt); | ||
267 | evas_object_show(bt); | ||
268 | |||
269 | hv = elm_hoversel_add(win); | ||
270 | elm_box_pack_end(bx, hv); | ||
271 | elm_hoversel_hover_parent_set(hv, win); | ||
272 | EINA_LIST_FOREACH(elm_slideshow_transitions_get(slideshow), l, transition) | ||
273 | elm_hoversel_item_add(hv, transition, NULL, 0, _transition_select, | ||
274 | transition); | ||
275 | elm_object_text_set(hv, eina_list_data_get( | ||
276 | elm_slideshow_transitions_get(slideshow))); | ||
277 | evas_object_show(hv); | ||
278 | |||
279 | hv = elm_hoversel_add(win); | ||
280 | elm_box_pack_end(bx, hv); | ||
281 | elm_hoversel_hover_parent_set(hv, win); | ||
282 | EINA_LIST_FOREACH(elm_slideshow_layouts_get(slideshow), l, layout) | ||
283 | elm_hoversel_item_add(hv, layout, NULL, 0, _layout_select, layout); | ||
284 | elm_object_text_set(hv, elm_slideshow_layout_get(slideshow)); | ||
285 | evas_object_show(hv); | ||
286 | |||
287 | spin = elm_spinner_add(win); | ||
288 | elm_spinner_label_format_set(spin, "%2.0f s"); | ||
289 | evas_object_smart_callback_add(spin, "changed", _spin, spin); | ||
290 | elm_spinner_step_set(spin, 1); | ||
291 | elm_spinner_min_max_set(spin, 1, 30); | ||
292 | elm_spinner_value_set(spin, 3); | ||
293 | elm_box_pack_end(bx, spin); | ||
294 | evas_object_show(spin); | ||
295 | |||
296 | bt = elm_button_add(win); | ||
297 | bt_start = bt; | ||
298 | elm_object_text_set(bt, "Start"); | ||
299 | evas_object_smart_callback_add(bt, "clicked", _start, spin); | ||
300 | elm_box_pack_end(bx, bt); | ||
301 | evas_object_show(bt); | ||
302 | |||
303 | bt = elm_button_add(win); | ||
304 | bt_stop = bt; | ||
305 | elm_object_text_set(bt, "Stop"); | ||
306 | evas_object_smart_callback_add(bt, "clicked", _stop, spin); | ||
307 | elm_box_pack_end(bx, bt); | ||
308 | elm_object_disabled_set(bt, EINA_TRUE); | ||
309 | evas_object_show(bt); | ||
310 | |||
311 | evas_object_event_callback_add(slideshow, EVAS_CALLBACK_MOUSE_UP, | ||
312 | _notify_show, notify); | ||
313 | evas_object_event_callback_add(slideshow, EVAS_CALLBACK_MOUSE_MOVE, | ||
314 | _notify_show, notify); | ||
315 | |||
316 | _notify_show(notify, NULL, NULL, NULL); | ||
317 | |||
318 | elm_run(); | ||
319 | elm_shutdown(); | ||
320 | |||
321 | return 0; | ||
322 | } | ||
323 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/spinner_example.c b/libraries/elementary/src/examples/spinner_example.c deleted file mode 100644 index de18047..0000000 --- a/libraries/elementary/src/examples/spinner_example.c +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>spinner widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g spinner_example.c -o spinner_example `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | static void | ||
23 | _changed_cb(void *data, Evas_Object *obj, void *event_info) | ||
24 | { | ||
25 | printf("Value changed to %0.f\n", elm_spinner_value_get(obj)); | ||
26 | } | ||
27 | |||
28 | static void | ||
29 | _delay_changed_cb(void *data, Evas_Object *obj, void *event_info) | ||
30 | { | ||
31 | printf("Value delay changed to %0.f\n", elm_spinner_value_get(obj)); | ||
32 | } | ||
33 | |||
34 | EAPI_MAIN int | ||
35 | elm_main(int argc, char **argv) | ||
36 | { | ||
37 | Evas_Object *win, *bg, *bx, *sp; | ||
38 | |||
39 | win = elm_win_add(NULL, "spinner", ELM_WIN_BASIC); | ||
40 | elm_win_title_set(win, "Spinner Example"); | ||
41 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
42 | |||
43 | bg = elm_bg_add(win); | ||
44 | elm_win_resize_object_add(win, bg); | ||
45 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
46 | evas_object_show(bg); | ||
47 | |||
48 | bx = elm_box_add(win); | ||
49 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
50 | elm_win_resize_object_add(win, bx); | ||
51 | evas_object_show(bx); | ||
52 | |||
53 | /* default */ | ||
54 | sp = elm_spinner_add(win); | ||
55 | evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5); | ||
56 | evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
57 | elm_box_pack_end(bx, sp); | ||
58 | evas_object_show(sp); | ||
59 | |||
60 | /* format */ | ||
61 | sp = elm_spinner_add(win); | ||
62 | elm_spinner_label_format_set(sp, "Percentage %%%1.2f something"); | ||
63 | evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5); | ||
64 | evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
65 | elm_box_pack_end(bx, sp); | ||
66 | evas_object_show(sp); | ||
67 | |||
68 | /* min max, step and wrap */ | ||
69 | sp = elm_spinner_add(win); | ||
70 | elm_spinner_label_format_set(sp, "%1.1f units"); | ||
71 | elm_spinner_step_set(sp, 1.5); | ||
72 | elm_spinner_wrap_set(sp, EINA_TRUE); | ||
73 | elm_spinner_min_max_set(sp, -50.0, 250.0); | ||
74 | evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5); | ||
75 | evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
76 | elm_box_pack_end(bx, sp); | ||
77 | evas_object_show(sp); | ||
78 | |||
79 | /* vertical */ | ||
80 | sp = elm_spinner_add(win); | ||
81 | elm_object_style_set(sp, "vertical"); | ||
82 | elm_spinner_interval_set(sp, 0.2); | ||
83 | evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5); | ||
84 | evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
85 | elm_box_pack_end(bx, sp); | ||
86 | evas_object_show(sp); | ||
87 | |||
88 | /* disabled edition */ | ||
89 | sp = elm_spinner_add(win); | ||
90 | elm_spinner_editable_set(sp, EINA_FALSE); | ||
91 | evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5); | ||
92 | evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
93 | elm_box_pack_end(bx, sp); | ||
94 | evas_object_show(sp); | ||
95 | |||
96 | /* special values */ | ||
97 | sp = elm_spinner_add(win); | ||
98 | elm_spinner_editable_set(sp, EINA_FALSE); | ||
99 | elm_spinner_min_max_set(sp, 1, 12); | ||
100 | elm_spinner_special_value_add(sp, 1, "January"); | ||
101 | elm_spinner_special_value_add(sp, 2, "February"); | ||
102 | elm_spinner_special_value_add(sp, 3, "March"); | ||
103 | elm_spinner_special_value_add(sp, 4, "April"); | ||
104 | elm_spinner_special_value_add(sp, 5, "May"); | ||
105 | elm_spinner_special_value_add(sp, 6, "June"); | ||
106 | elm_spinner_special_value_add(sp, 7, "July"); | ||
107 | elm_spinner_special_value_add(sp, 8, "August"); | ||
108 | elm_spinner_special_value_add(sp, 9, "September"); | ||
109 | elm_spinner_special_value_add(sp, 10, "October"); | ||
110 | elm_spinner_special_value_add(sp, 11, "November"); | ||
111 | elm_spinner_special_value_add(sp, 12, "December"); | ||
112 | evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5); | ||
113 | evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
114 | elm_box_pack_end(bx, sp); | ||
115 | evas_object_show(sp); | ||
116 | |||
117 | sp = elm_spinner_add(win); | ||
118 | evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5); | ||
119 | evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
120 | elm_box_pack_end(bx, sp); | ||
121 | evas_object_show(sp); | ||
122 | evas_object_smart_callback_add(sp, "changed", _changed_cb, NULL); | ||
123 | evas_object_smart_callback_add(sp, "delay,changed", _delay_changed_cb, NULL); | ||
124 | |||
125 | evas_object_show(win); | ||
126 | |||
127 | elm_run(); | ||
128 | elm_shutdown(); | ||
129 | |||
130 | return 0; | ||
131 | } | ||
132 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/table_example_01.c b/libraries/elementary/src/examples/table_example_01.c deleted file mode 100644 index 16d6036..0000000 --- a/libraries/elementary/src/examples/table_example_01.c +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g table_example_01.c -o table_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | EAPI_MAIN int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg, *label, *table; | ||
10 | |||
11 | win = elm_win_add(NULL, "table", ELM_WIN_BASIC); | ||
12 | elm_win_title_set(win, "Table"); | ||
13 | elm_win_autodel_set(win, EINA_TRUE); | ||
14 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
15 | |||
16 | bg = elm_bg_add(win); | ||
17 | elm_win_resize_object_add(win, bg); | ||
18 | evas_object_show(bg); | ||
19 | |||
20 | table = elm_table_add(win); | ||
21 | elm_win_resize_object_add(win, table); | ||
22 | evas_object_show(table); | ||
23 | elm_table_padding_set(table, 5, 5); | ||
24 | elm_table_homogeneous_set(table, EINA_TRUE); | ||
25 | |||
26 | label = elm_label_add(win); | ||
27 | elm_object_text_set(label, "label 0"); | ||
28 | evas_object_show(label); | ||
29 | elm_table_pack(table, label, 0, 0, 1, 1); | ||
30 | |||
31 | label = elm_label_add(win); | ||
32 | elm_object_text_set(label, "label 1"); | ||
33 | evas_object_show(label); | ||
34 | elm_table_pack(table, label, 1, 0, 1, 1); | ||
35 | |||
36 | label = elm_label_add(win); | ||
37 | elm_object_text_set(label, "label 2"); | ||
38 | evas_object_show(label); | ||
39 | elm_table_pack(table, label, 0, 1, 1, 1); | ||
40 | |||
41 | label = elm_label_add(win); | ||
42 | elm_object_text_set(label, "label 3"); | ||
43 | evas_object_show(label); | ||
44 | elm_table_pack(table, label, 1, 1, 1, 1); | ||
45 | |||
46 | evas_object_show(win); | ||
47 | |||
48 | elm_run(); | ||
49 | elm_shutdown(); | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/table_example_02.c b/libraries/elementary/src/examples/table_example_02.c deleted file mode 100644 index d466fe8..0000000 --- a/libraries/elementary/src/examples/table_example_02.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g table_example_02.c -o table_example_02 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | EAPI_MAIN int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg, *rect, *table; | ||
10 | |||
11 | win = elm_win_add(NULL, "table", ELM_WIN_BASIC); | ||
12 | elm_win_title_set(win, "Table"); | ||
13 | elm_win_autodel_set(win, EINA_TRUE); | ||
14 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
15 | |||
16 | bg = elm_bg_add(win); | ||
17 | elm_win_resize_object_add(win, bg); | ||
18 | evas_object_show(bg); | ||
19 | |||
20 | table = elm_table_add(win); | ||
21 | elm_win_resize_object_add(win, table); | ||
22 | evas_object_show(table); | ||
23 | elm_table_homogeneous_set(table, EINA_FALSE); | ||
24 | |||
25 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
26 | evas_object_color_set(rect, 255, 0, 0, 255); | ||
27 | evas_object_size_hint_min_set(rect, 100, 50); | ||
28 | evas_object_show(rect); | ||
29 | elm_table_pack(table, rect, 0, 0, 2, 1); | ||
30 | |||
31 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
32 | evas_object_color_set(rect, 0, 255, 0, 255); | ||
33 | evas_object_size_hint_min_set(rect, 50, 100); | ||
34 | evas_object_show(rect); | ||
35 | elm_table_pack(table, rect, 0, 1, 1, 2); | ||
36 | |||
37 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
38 | evas_object_color_set(rect, 0, 0, 255, 255); | ||
39 | evas_object_size_hint_min_set(rect, 50, 50); | ||
40 | evas_object_show(rect); | ||
41 | elm_table_pack(table, rect, 1, 1, 1, 1); | ||
42 | |||
43 | rect = evas_object_rectangle_add(evas_object_evas_get(win)); | ||
44 | evas_object_color_set(rect, 255, 255, 0, 255); | ||
45 | evas_object_size_hint_min_set(rect, 50, 50); | ||
46 | evas_object_show(rect); | ||
47 | elm_table_pack(table, rect, 1, 2, 1, 1); | ||
48 | |||
49 | evas_object_show(win); | ||
50 | |||
51 | elm_run(); | ||
52 | elm_shutdown(); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/theme_example_01.c b/libraries/elementary/src/examples/theme_example_01.c deleted file mode 100644 index e848297..0000000 --- a/libraries/elementary/src/examples/theme_example_01.c +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * gcc -o theme_example_01 theme_example_01.c `pkg-config --cflags --libs elementary` | ||
3 | */ | ||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | btn_extension_click_cb(void *data, Evas_Object *btn, void *ev) | ||
8 | { | ||
9 | const char *lbl = elm_object_text_get(btn); | ||
10 | |||
11 | if (!strncmp(lbl, "Load", 4)) | ||
12 | { | ||
13 | elm_theme_extension_add(NULL, "./theme_example.edj"); | ||
14 | elm_object_text_set(btn, "Unload extension"); | ||
15 | } | ||
16 | else if (!strncmp(lbl, "Unload", 6)) | ||
17 | { | ||
18 | elm_theme_extension_del(NULL, "./theme_example.edj"); | ||
19 | elm_object_text_set(btn, "Load extension"); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | static void | ||
24 | btn_style_click_cb(void *data, Evas_Object *btn, void *ev) | ||
25 | { | ||
26 | const char *styles[] = { | ||
27 | "chucknorris", | ||
28 | "default", | ||
29 | "anchor" | ||
30 | }; | ||
31 | static int sel_style = 0; | ||
32 | |||
33 | sel_style = (sel_style + 1) % 3; | ||
34 | elm_object_style_set(btn, styles[sel_style]); | ||
35 | } | ||
36 | |||
37 | EAPI_MAIN int | ||
38 | elm_main(int argc, char *argv[]) | ||
39 | { | ||
40 | Evas_Object *win, *bg, *box, *btn; | ||
41 | |||
42 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
43 | |||
44 | elm_theme_extension_add(NULL, "./theme_example.edj"); | ||
45 | |||
46 | win = elm_win_add(NULL, "Theme example", ELM_WIN_BASIC); | ||
47 | elm_win_autodel_set(win, EINA_TRUE); | ||
48 | evas_object_resize(win, 300, 320); | ||
49 | evas_object_show(win); | ||
50 | |||
51 | bg = elm_bg_add(win); | ||
52 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
53 | elm_win_resize_object_add(win, bg); | ||
54 | evas_object_show(bg); | ||
55 | |||
56 | box = elm_box_add(win); | ||
57 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
58 | elm_win_resize_object_add(win, box); | ||
59 | evas_object_show(box); | ||
60 | |||
61 | btn = elm_button_add(win); | ||
62 | elm_object_text_set(btn, "Unload extension"); | ||
63 | elm_box_pack_end(box, btn); | ||
64 | evas_object_show(btn); | ||
65 | evas_object_smart_callback_add(btn, "clicked", btn_extension_click_cb, NULL); | ||
66 | |||
67 | btn = elm_button_add(win); | ||
68 | elm_object_text_set(btn, "Switch style"); | ||
69 | elm_object_style_set(btn, "chucknorris"); | ||
70 | elm_box_pack_end(box, btn); | ||
71 | evas_object_show(btn); | ||
72 | evas_object_smart_callback_add(btn, "clicked", btn_style_click_cb, NULL); | ||
73 | |||
74 | elm_run(); | ||
75 | elm_shutdown(); | ||
76 | |||
77 | return 0; | ||
78 | } | ||
79 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/theme_example_02.c b/libraries/elementary/src/examples/theme_example_02.c deleted file mode 100644 index acab9d7..0000000 --- a/libraries/elementary/src/examples/theme_example_02.c +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * gcc -o theme_example_02 theme_example_02.c `pkg-config --cflags --libs elememntaru` | ||
3 | */ | ||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | _btn_clicked_cb(void *data, Evas_Object *obj, void *ev) | ||
8 | { | ||
9 | static int loaded = 1; | ||
10 | if (loaded) | ||
11 | elm_theme_overlay_del(NULL, "./theme_example.edj"); | ||
12 | else | ||
13 | elm_theme_overlay_add(NULL, "./theme_example.edj"); | ||
14 | loaded = 1 - loaded; | ||
15 | } | ||
16 | |||
17 | EAPI_MAIN int | ||
18 | elm_main(int argc, char *argv[]) | ||
19 | { | ||
20 | Evas_Object *win, *bg, *box, *btn; | ||
21 | |||
22 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
23 | |||
24 | elm_theme_overlay_add(NULL, "./theme_example.edj"); | ||
25 | |||
26 | win = elm_win_add(NULL, "Theme example", ELM_WIN_BASIC); | ||
27 | elm_win_autodel_set(win, EINA_TRUE); | ||
28 | evas_object_resize(win, 300, 320); | ||
29 | evas_object_show(win); | ||
30 | |||
31 | bg = elm_bg_add(win); | ||
32 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
33 | elm_win_resize_object_add(win, bg); | ||
34 | evas_object_show(bg); | ||
35 | |||
36 | box = elm_box_add(win); | ||
37 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
38 | elm_win_resize_object_add(win, box); | ||
39 | evas_object_show(box); | ||
40 | |||
41 | btn = elm_button_add(win); | ||
42 | elm_object_text_set(btn, "Button 1"); | ||
43 | elm_box_pack_end(box, btn); | ||
44 | evas_object_show(btn); | ||
45 | evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, NULL); | ||
46 | |||
47 | btn = elm_button_add(win); | ||
48 | elm_object_text_set(btn, "Button 2"); | ||
49 | elm_box_pack_end(box, btn); | ||
50 | evas_object_show(btn); | ||
51 | evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, NULL); | ||
52 | |||
53 | btn = elm_button_add(win); | ||
54 | elm_object_text_set(btn, "Button 3"); | ||
55 | elm_box_pack_end(box, btn); | ||
56 | evas_object_show(btn); | ||
57 | evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, NULL); | ||
58 | |||
59 | btn = elm_button_add(win); | ||
60 | elm_object_text_set(btn, "Button 4"); | ||
61 | elm_box_pack_end(box, btn); | ||
62 | evas_object_show(btn); | ||
63 | evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, NULL); | ||
64 | |||
65 | elm_run(); | ||
66 | elm_shutdown(); | ||
67 | |||
68 | return 0; | ||
69 | } | ||
70 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/thumb_example_01.c b/libraries/elementary/src/examples/thumb_example_01.c deleted file mode 100644 index eaf0ec2..0000000 --- a/libraries/elementary/src/examples/thumb_example_01.c +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -g thumb_example_01.c -o thumb_example_01 `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | _generation_started_cb(void *data, Evas_Object *o, void *event_info) | ||
8 | { | ||
9 | printf("thumbnail generation started.\n"); | ||
10 | } | ||
11 | |||
12 | static void | ||
13 | _generation_finished_cb(void *data, Evas_Object *o, void *event_info) | ||
14 | { | ||
15 | printf("thumbnail generation finished.\n"); | ||
16 | } | ||
17 | |||
18 | static void | ||
19 | _generation_error_cb(void *data, Evas_Object *o, void *event_info) | ||
20 | { | ||
21 | printf("thumbnail generation error.\n"); | ||
22 | } | ||
23 | |||
24 | EAPI_MAIN int | ||
25 | elm_main(int argc, char **argv) | ||
26 | { | ||
27 | Evas_Object *win, *bg; | ||
28 | Evas_Object *thumb; | ||
29 | char buf[PATH_MAX]; | ||
30 | #ifdef ELM_ETHUMB | ||
31 | Ethumb_Client *client; | ||
32 | #endif | ||
33 | |||
34 | elm_need_ethumb(); | ||
35 | |||
36 | elm_app_info_set(elm_main, "elementary", "images/plant_01.jpg"); | ||
37 | win = elm_win_add(NULL, "thumb", ELM_WIN_BASIC); | ||
38 | elm_win_title_set(win, "Thumbnailer"); | ||
39 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
40 | elm_win_autodel_set(win, EINA_TRUE); | ||
41 | |||
42 | bg = elm_bg_add(win); | ||
43 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
44 | elm_win_resize_object_add(win, bg); | ||
45 | evas_object_show(bg); | ||
46 | |||
47 | #ifdef ELM_ETHUMB | ||
48 | client = elm_thumb_ethumb_client_get(); | ||
49 | if (!client) | ||
50 | { | ||
51 | printf("error: could not get Ethumb client.\n"); | ||
52 | return 1; | ||
53 | } | ||
54 | ethumb_client_size_set(client, 160, 160); | ||
55 | #endif | ||
56 | |||
57 | thumb = elm_thumb_add(win); | ||
58 | |||
59 | evas_object_smart_callback_add(thumb, "generate,start", _generation_started_cb, NULL); | ||
60 | evas_object_smart_callback_add(thumb, "generate,stop", _generation_finished_cb, NULL); | ||
61 | evas_object_smart_callback_add(thumb, "generate,error", _generation_error_cb, NULL); | ||
62 | |||
63 | elm_thumb_editable_set(thumb, EINA_FALSE); | ||
64 | snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); | ||
65 | elm_thumb_file_set(thumb, buf, NULL); | ||
66 | elm_thumb_reload(thumb); | ||
67 | |||
68 | evas_object_size_hint_weight_set(thumb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
69 | elm_win_resize_object_add(win, thumb); | ||
70 | evas_object_show(thumb); | ||
71 | |||
72 | evas_object_size_hint_min_set(bg, 160, 160); | ||
73 | evas_object_size_hint_max_set(bg, 640, 640); | ||
74 | evas_object_resize(win, 320, 320); | ||
75 | evas_object_show(win); | ||
76 | |||
77 | elm_run(); /* and run the program now, starting to handle all | ||
78 | * events, etc. */ | ||
79 | elm_shutdown(); /* clean up and shut down */ | ||
80 | /* exit code */ | ||
81 | return 0; | ||
82 | } | ||
83 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/toolbar_example_01.c b/libraries/elementary/src/examples/toolbar_example_01.c deleted file mode 100644 index 867172d..0000000 --- a/libraries/elementary/src/examples/toolbar_example_01.c +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>toolbar widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g toolbar_example_01.c -o toolbar_example_01 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | static void | ||
23 | _item_1_pressed(void *data, Evas_Object *obj, void *event_info) | ||
24 | { | ||
25 | Evas_Object *bt = data; | ||
26 | elm_object_text_set(bt, "Print Document"); | ||
27 | } | ||
28 | |||
29 | static void | ||
30 | _item_2_pressed(void *data, Evas_Object *obj, void *event_info) | ||
31 | { | ||
32 | Evas_Object *bt = data; | ||
33 | elm_object_text_set(bt, "Create new folder"); | ||
34 | } | ||
35 | |||
36 | static void | ||
37 | _item_3_pressed(void *data, Evas_Object *obj, void *event_info) | ||
38 | { | ||
39 | /* This function won't be called because we disabled item that call it */ | ||
40 | Evas_Object *bt = data; | ||
41 | elm_object_text_set(bt, "Create and send email"); | ||
42 | } | ||
43 | |||
44 | EAPI_MAIN int | ||
45 | elm_main(int argc, char **argv) | ||
46 | { | ||
47 | Evas_Object *win, *bg, *bx, *tb, *bt; | ||
48 | Elm_Object_Item *tb_it; | ||
49 | |||
50 | win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC); | ||
51 | elm_win_title_set(win, "Toolbar Example"); | ||
52 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
53 | |||
54 | bg = elm_bg_add(win); | ||
55 | elm_win_resize_object_add(win, bg); | ||
56 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
57 | evas_object_show(bg); | ||
58 | |||
59 | bx = elm_box_add(win); | ||
60 | elm_win_resize_object_add(win, bx); | ||
61 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
62 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
63 | evas_object_show(bx); | ||
64 | |||
65 | bt = elm_button_add(win); | ||
66 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
67 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
68 | elm_object_text_set(bt, "Button"); | ||
69 | evas_object_show(bt); | ||
70 | |||
71 | tb = elm_toolbar_add(win); | ||
72 | elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_SCROLL); | ||
73 | evas_object_size_hint_weight_set(tb, 0.0, 0.0); | ||
74 | evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0); | ||
75 | evas_object_show(tb); | ||
76 | |||
77 | elm_toolbar_item_append(tb, "document-print", "Print", _item_1_pressed, bt); | ||
78 | elm_toolbar_item_append(tb, "folder-new", "New Folder", _item_2_pressed, bt); | ||
79 | |||
80 | tb_it = elm_toolbar_item_append(tb, "mail-send", "Create and send email", | ||
81 | _item_3_pressed, bt); | ||
82 | elm_object_item_disabled_set(tb_it, EINA_TRUE); | ||
83 | |||
84 | elm_toolbar_homogeneous_set(tb, EINA_FALSE); | ||
85 | |||
86 | elm_box_pack_end(bx, tb); | ||
87 | elm_box_pack_end(bx, bt); | ||
88 | |||
89 | evas_object_resize(win, 200, 200); | ||
90 | evas_object_show(win); | ||
91 | |||
92 | elm_run(); | ||
93 | elm_shutdown(); | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/toolbar_example_02.c b/libraries/elementary/src/examples/toolbar_example_02.c deleted file mode 100644 index 273fe47..0000000 --- a/libraries/elementary/src/examples/toolbar_example_02.c +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>toolbar widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g toolbar_example_02.c -o toolbar_example_02 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | static void | ||
23 | _item_pressed(void *data, Evas_Object *obj, void *event_info) | ||
24 | { | ||
25 | Elm_Object_Item *tb_it = event_info; | ||
26 | elm_toolbar_item_state_set(tb_it, elm_toolbar_item_state_next(tb_it)); | ||
27 | elm_toolbar_item_selected_set(tb_it, EINA_FALSE); | ||
28 | } | ||
29 | |||
30 | EAPI_MAIN int | ||
31 | elm_main(int argc, char **argv) | ||
32 | { | ||
33 | Evas_Object *win, *bg, *bx, *tb, *bt; | ||
34 | Elm_Object_Item *tb_it; | ||
35 | |||
36 | win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC); | ||
37 | elm_win_title_set(win, "Toolbar Example"); | ||
38 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
39 | |||
40 | bg = elm_bg_add(win); | ||
41 | elm_win_resize_object_add(win, bg); | ||
42 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
43 | evas_object_show(bg); | ||
44 | |||
45 | bx = elm_box_add(win); | ||
46 | elm_win_resize_object_add(win, bx); | ||
47 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
48 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
49 | evas_object_show(bx); | ||
50 | |||
51 | bt = elm_button_add(win); | ||
52 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
53 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
54 | elm_object_text_set(bt, "Button"); | ||
55 | evas_object_show(bt); | ||
56 | |||
57 | tb = elm_toolbar_add(win); | ||
58 | elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_HIDE); | ||
59 | evas_object_size_hint_weight_set(tb, 0.0, 0.0); | ||
60 | evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0); | ||
61 | evas_object_show(tb); | ||
62 | |||
63 | elm_toolbar_item_append(tb, "document-print", "Print", NULL, NULL); | ||
64 | elm_toolbar_item_append(tb, "folder-new", "Folder", NULL, NULL); | ||
65 | elm_toolbar_item_append(tb, "clock", "Clock", NULL, NULL); | ||
66 | elm_toolbar_item_append(tb, "refresh", "Update", NULL, NULL); | ||
67 | |||
68 | tb_it = elm_toolbar_item_append(tb, "mail-send", "Send Mail", | ||
69 | _item_pressed, NULL); | ||
70 | elm_toolbar_item_state_add(tb_it, "emptytrash", "Empty Trash", | ||
71 | _item_pressed, NULL); | ||
72 | elm_toolbar_item_state_add(tb_it, "trashcan_full", "Full Trash", | ||
73 | _item_pressed, NULL); | ||
74 | |||
75 | elm_toolbar_item_priority_set(tb_it, 10); | ||
76 | |||
77 | elm_box_pack_end(bx, tb); | ||
78 | elm_box_pack_end(bx, bt); | ||
79 | |||
80 | evas_object_resize(win, 230, 200); | ||
81 | evas_object_show(win); | ||
82 | |||
83 | elm_run(); | ||
84 | elm_shutdown(); | ||
85 | |||
86 | return 0; | ||
87 | } | ||
88 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/toolbar_example_03.c b/libraries/elementary/src/examples/toolbar_example_03.c deleted file mode 100644 index 8af248b..0000000 --- a/libraries/elementary/src/examples/toolbar_example_03.c +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /** | ||
2 | * Simple Elementary's <b>toolbar widget</b> example, illustrating its | ||
3 | * usage and API. | ||
4 | * | ||
5 | * See stdout/stderr for output. Compile with: | ||
6 | * | ||
7 | * @verbatim | ||
8 | * gcc -g toolbar_example_03.c -o toolbar_example_03 `pkg-config --cflags --libs elementary` | ||
9 | * @endverbatim | ||
10 | */ | ||
11 | |||
12 | #include <Elementary.h> | ||
13 | |||
14 | static void | ||
15 | _on_done(void *data, | ||
16 | Evas_Object *obj, | ||
17 | void *event_info) | ||
18 | { | ||
19 | elm_exit(); | ||
20 | } | ||
21 | |||
22 | EAPI_MAIN int | ||
23 | elm_main(int argc, char **argv) | ||
24 | { | ||
25 | Evas_Object *win, *bg, *bx, *tb, *bt, *menu; | ||
26 | Elm_Object_Item *tb_it; | ||
27 | |||
28 | win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC); | ||
29 | elm_win_title_set(win, "Toolbar Example"); | ||
30 | evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); | ||
31 | |||
32 | bg = elm_bg_add(win); | ||
33 | elm_win_resize_object_add(win, bg); | ||
34 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
35 | evas_object_show(bg); | ||
36 | |||
37 | bx = elm_box_add(win); | ||
38 | elm_win_resize_object_add(win, bx); | ||
39 | evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
40 | evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
41 | evas_object_show(bx); | ||
42 | |||
43 | bt = elm_button_add(win); | ||
44 | evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
45 | evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
46 | elm_object_text_set(bt, "Button"); | ||
47 | evas_object_show(bt); | ||
48 | |||
49 | tb = elm_toolbar_add(win); | ||
50 | evas_object_size_hint_weight_set(tb, 0.0, 0.0); | ||
51 | evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0); | ||
52 | evas_object_show(tb); | ||
53 | |||
54 | elm_toolbar_item_append(tb, "document-print", "Print", NULL, NULL); | ||
55 | elm_toolbar_item_append(tb, "folder-new", "Folder", NULL, NULL); | ||
56 | elm_toolbar_item_append(tb, "clock", "Clock", NULL, NULL); | ||
57 | elm_toolbar_item_append(tb, "refresh", "Update", NULL, NULL); | ||
58 | |||
59 | elm_toolbar_menu_parent_set(tb, win); | ||
60 | |||
61 | tb_it = elm_toolbar_item_append(tb, "mail-send", "Send Mail", NULL, NULL); | ||
62 | elm_toolbar_item_menu_set(tb_it, EINA_TRUE); | ||
63 | |||
64 | menu = elm_toolbar_item_menu_get(tb_it); | ||
65 | elm_menu_item_add(menu, NULL, "emptytrash", "Empty Trash", NULL, NULL); | ||
66 | elm_menu_item_add(menu, NULL, "trashcan_full", "Full Trash", NULL, NULL); | ||
67 | |||
68 | elm_toolbar_item_priority_set(tb_it, 10); | ||
69 | |||
70 | elm_box_pack_end(bx, tb); | ||
71 | elm_box_pack_end(bx, bt); | ||
72 | |||
73 | evas_object_resize(win, 230, 200); | ||
74 | evas_object_show(win); | ||
75 | |||
76 | elm_run(); | ||
77 | elm_shutdown(); | ||
78 | |||
79 | return 0; | ||
80 | } | ||
81 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/transit_example_01.c b/libraries/elementary/src/examples/transit_example_01.c deleted file mode 100644 index 26323c9..0000000 --- a/libraries/elementary/src/examples/transit_example_01.c +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o transit_example_01 transit_example_01.c `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | static void | ||
7 | on_done(void *data, Evas_Object *obj, void *event_info) | ||
8 | { | ||
9 | /* quit the mainloop (elm_run) */ | ||
10 | elm_exit(); | ||
11 | } | ||
12 | |||
13 | EAPI_MAIN int | ||
14 | elm_main(int argc, char **argv) | ||
15 | { | ||
16 | Evas_Object *win, *bg, *bt; | ||
17 | Elm_Transit *trans; | ||
18 | |||
19 | win = elm_win_add(NULL, "transit-basic", ELM_WIN_BASIC); | ||
20 | elm_win_title_set(win, "Transit - Basic"); | ||
21 | evas_object_smart_callback_add(win, "delete,request", on_done, NULL); | ||
22 | elm_win_autodel_set(win, EINA_TRUE); | ||
23 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
24 | evas_object_resize(win, 400, 400); | ||
25 | |||
26 | bg = elm_bg_add(win); | ||
27 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
28 | elm_win_resize_object_add(win, bg); | ||
29 | evas_object_show(bg); | ||
30 | |||
31 | bt = elm_button_add(win); | ||
32 | elm_object_text_set(bt, "Resizing Effect"); | ||
33 | evas_object_show(bt); | ||
34 | evas_object_move(bt, 50, 100); | ||
35 | evas_object_resize(bt, 100, 50); | ||
36 | |||
37 | evas_object_show(win); | ||
38 | |||
39 | trans = elm_transit_add(); | ||
40 | elm_transit_object_add(trans, bt); | ||
41 | |||
42 | elm_transit_effect_resizing_add(trans, 100, 50, 300, 150); | ||
43 | |||
44 | elm_transit_duration_set(trans, 5.0); | ||
45 | elm_transit_go(trans); | ||
46 | |||
47 | elm_run(); | ||
48 | elm_shutdown(); | ||
49 | |||
50 | return 0; | ||
51 | } | ||
52 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/transit_example_02.c b/libraries/elementary/src/examples/transit_example_02.c deleted file mode 100644 index c00e83a..0000000 --- a/libraries/elementary/src/examples/transit_example_02.c +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o transit_example_02 transit_example_02.c `pkg-config --cflags --libs elementary` | ||
3 | |||
4 | #include <Elementary.h> | ||
5 | |||
6 | EAPI_MAIN int | ||
7 | elm_main(int argc, char **argv) | ||
8 | { | ||
9 | Evas_Object *win, *bg, *bt, *bt2, *bt3, *bt4; | ||
10 | Elm_Transit *trans, *trans2, *trans3, *trans4; | ||
11 | |||
12 | win = elm_win_add(NULL, "transit9", ELM_WIN_BASIC); | ||
13 | elm_win_title_set(win, "Transit 9"); | ||
14 | elm_win_autodel_set(win, EINA_TRUE); | ||
15 | evas_object_resize(win, 400, 400); | ||
16 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
17 | evas_object_show(win); | ||
18 | |||
19 | bg = elm_bg_add(win); | ||
20 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
21 | elm_win_resize_object_add(win, bg); | ||
22 | evas_object_show(bg); | ||
23 | |||
24 | bt = elm_button_add(win); | ||
25 | elm_object_text_set(bt, "Chain 1"); | ||
26 | evas_object_resize(bt, 100, 100); | ||
27 | evas_object_move(bt, 0, 0); | ||
28 | evas_object_show(bt); | ||
29 | |||
30 | bt2 = elm_button_add(win); | ||
31 | elm_object_text_set(bt2, "Chain 2"); | ||
32 | evas_object_resize(bt2, 100, 100); | ||
33 | evas_object_move(bt2, 300, 0); | ||
34 | evas_object_show(bt2); | ||
35 | |||
36 | bt3 = elm_button_add(win); | ||
37 | elm_object_text_set(bt3, "Chain 3"); | ||
38 | evas_object_resize(bt3, 100, 100); | ||
39 | evas_object_move(bt3, 300, 300); | ||
40 | evas_object_show(bt3); | ||
41 | |||
42 | bt4 = elm_button_add(win); | ||
43 | elm_object_text_set(bt4, "Chain 4"); | ||
44 | evas_object_resize(bt4, 100, 100); | ||
45 | evas_object_move(bt4, 0, 300); | ||
46 | evas_object_show(bt4); | ||
47 | |||
48 | trans = elm_transit_add(); | ||
49 | elm_transit_tween_mode_set(trans, ELM_TRANSIT_TWEEN_MODE_ACCELERATE); | ||
50 | elm_transit_effect_translation_add(trans, 0, 0, 300, 0); | ||
51 | elm_transit_object_add(trans, bt); | ||
52 | elm_transit_duration_set(trans, 1); | ||
53 | elm_transit_objects_final_state_keep_set(trans, EINA_TRUE); | ||
54 | elm_transit_go(trans); | ||
55 | |||
56 | trans2 = elm_transit_add(); | ||
57 | elm_transit_tween_mode_set(trans2, ELM_TRANSIT_TWEEN_MODE_ACCELERATE); | ||
58 | elm_transit_effect_translation_add(trans2, 0, 0, 0, 300); | ||
59 | elm_transit_object_add(trans2, bt2); | ||
60 | elm_transit_duration_set(trans2, 1); | ||
61 | elm_transit_objects_final_state_keep_set(trans2, EINA_TRUE); | ||
62 | elm_transit_chain_transit_add(trans, trans2); | ||
63 | |||
64 | trans3 = elm_transit_add(); | ||
65 | elm_transit_tween_mode_set(trans3, ELM_TRANSIT_TWEEN_MODE_ACCELERATE); | ||
66 | elm_transit_effect_translation_add(trans3, 0, 0, -300, 0); | ||
67 | elm_transit_object_add(trans3, bt3); | ||
68 | elm_transit_duration_set(trans3, 1); | ||
69 | elm_transit_objects_final_state_keep_set(trans3, EINA_TRUE); | ||
70 | elm_transit_chain_transit_add(trans2, trans3); | ||
71 | |||
72 | trans4 = elm_transit_add(); | ||
73 | elm_transit_tween_mode_set(trans4, ELM_TRANSIT_TWEEN_MODE_ACCELERATE); | ||
74 | elm_transit_effect_translation_add(trans4, 0, 0, 0, -300); | ||
75 | elm_transit_object_add(trans4, bt4); | ||
76 | elm_transit_duration_set(trans4, 1); | ||
77 | elm_transit_objects_final_state_keep_set(trans4, EINA_TRUE); | ||
78 | elm_transit_chain_transit_add(trans3, trans4); | ||
79 | |||
80 | elm_run(); | ||
81 | elm_shutdown(); | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/transit_example_03.c b/libraries/elementary/src/examples/transit_example_03.c deleted file mode 100644 index 0bfc8fd..0000000 --- a/libraries/elementary/src/examples/transit_example_03.c +++ /dev/null | |||
@@ -1,332 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o transit_example_03 transit_example_03.c `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\"" | ||
3 | //where directory is the a path where images/icon_07.png can be found. | ||
4 | |||
5 | #include <Elementary.h> | ||
6 | |||
7 | /* structure to hold context for many callbacks */ | ||
8 | struct Context { | ||
9 | Eina_Bool events_enabled; | ||
10 | Eina_Bool auto_reverse; | ||
11 | Eina_Bool final_state_keep; | ||
12 | int repeat_times; | ||
13 | Elm_Transit_Tween_Mode tween_mode; | ||
14 | Evas_Object *obj; | ||
15 | }; | ||
16 | |||
17 | static void | ||
18 | _transit_translation(Elm_Transit *trans) | ||
19 | { | ||
20 | /* considering the original position (x0, y0), moves the object from | ||
21 | * (x0 - 20, y0 - 50) to (x0 + 70, y0 + 150) */ | ||
22 | elm_transit_effect_translation_add(trans, -20, -50, 70, 150); | ||
23 | } | ||
24 | |||
25 | static void | ||
26 | _transit_color(Elm_Transit *trans) | ||
27 | { | ||
28 | /* changes the object color from 100, 255, 100, 255 to | ||
29 | * 200, 50, 200, 50 */ | ||
30 | elm_transit_effect_color_add(trans, 100, 255, 100, 255, 200, 50, 200, 50); | ||
31 | } | ||
32 | |||
33 | static void | ||
34 | _transit_rotation(Elm_Transit *trans) | ||
35 | { | ||
36 | /* rotates the object from its original angle to 135 degrees to the right */ | ||
37 | elm_transit_effect_rotation_add(trans, 0.0, 135.0); | ||
38 | } | ||
39 | |||
40 | static void | ||
41 | _transit_wipe(Elm_Transit *trans) | ||
42 | { | ||
43 | /* hide the object clipping it from the left to the right */ | ||
44 | elm_transit_effect_wipe_add(trans, | ||
45 | ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE, | ||
46 | ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT); | ||
47 | } | ||
48 | |||
49 | static void | ||
50 | _transit_zoom(Elm_Transit *trans) | ||
51 | { | ||
52 | /* zoom the object from its original size to 2x */ | ||
53 | elm_transit_effect_zoom_add(trans, 1.0, 2.0); | ||
54 | } | ||
55 | |||
56 | static void | ||
57 | _transit_resizing(Elm_Transit *trans) | ||
58 | { | ||
59 | /* resize the object from 250x100 to 400x160 */ | ||
60 | elm_transit_effect_resizing_add(trans, 250, 100, 400, 160); | ||
61 | } | ||
62 | |||
63 | |||
64 | /* helper structure that will hold the transit checkboxes string, callbacks | ||
65 | * and checked statuses */ | ||
66 | static struct { | ||
67 | const char *label; | ||
68 | void (*transition_add_cb)(Elm_Transit *); | ||
69 | Eina_Bool checked; | ||
70 | } _transitions[] = { | ||
71 | { "Translation", _transit_translation, EINA_FALSE }, | ||
72 | { "Color", _transit_color, EINA_FALSE }, | ||
73 | { "Rotation", _transit_rotation, EINA_FALSE }, | ||
74 | { "Wipe", _transit_wipe, EINA_FALSE }, | ||
75 | { "Zoom", _transit_zoom, EINA_FALSE }, | ||
76 | { "Resizing", _transit_resizing, EINA_FALSE }, | ||
77 | { NULL, NULL, EINA_FALSE } | ||
78 | }; | ||
79 | |||
80 | static void | ||
81 | on_done(void *data, Evas_Object *obj, void *event_info) | ||
82 | { | ||
83 | /* quit the mainloop (elm_run) */ | ||
84 | elm_exit(); | ||
85 | } | ||
86 | |||
87 | /* add a checkbox to the box with the given label, and uses the checked | ||
88 | * pointer as state_pointer to this checkbox */ | ||
89 | static void | ||
90 | _checkbox_transition_add(Evas_Object *box, const char *label, Eina_Bool *checked) | ||
91 | { | ||
92 | Evas_Object *check = elm_check_add(elm_object_parent_widget_get(box)); | ||
93 | evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
94 | evas_object_size_hint_align_set(check, 0.0, 0.0); | ||
95 | elm_object_text_set(check, label); | ||
96 | elm_check_state_pointer_set(check, checked); | ||
97 | elm_box_pack_end(box, check); | ||
98 | evas_object_show(check); | ||
99 | } | ||
100 | |||
101 | static void | ||
102 | _transit_start(void *data, Evas_Object *o, void *event_info) | ||
103 | { | ||
104 | Elm_Transit *trans = NULL; | ||
105 | int i; | ||
106 | struct Context *ctxt = data; | ||
107 | Evas_Object *obj = ctxt->obj; // the object on which the transition will be | ||
108 | // applied | ||
109 | |||
110 | // FIXME: Should check if there's another transit going before starting a new | ||
111 | // one | ||
112 | |||
113 | /* initialization: create the transition and add the object to it */ | ||
114 | trans = elm_transit_add(); | ||
115 | elm_transit_object_add(trans, obj); | ||
116 | |||
117 | /* from our helper structure and array, check if the specified transition is | ||
118 | * checked and use its callback to add this transition to trans */ | ||
119 | for (i = 0; _transitions[i].label; i++) | ||
120 | { | ||
121 | if (_transitions[i].checked) | ||
122 | _transitions[i].transition_add_cb(trans); | ||
123 | } | ||
124 | |||
125 | /* get the various options for this transition from the context structure */ | ||
126 | elm_transit_event_enabled_set(trans, ctxt->events_enabled); | ||
127 | elm_transit_auto_reverse_set(trans, ctxt->auto_reverse); | ||
128 | elm_transit_objects_final_state_keep_set(trans, ctxt->final_state_keep); | ||
129 | elm_transit_tween_mode_set(trans, ctxt->tween_mode); | ||
130 | elm_transit_repeat_times_set(trans, ctxt->repeat_times); | ||
131 | |||
132 | /* set the transition time to 2 seconds and start it */ | ||
133 | elm_transit_duration_set(trans, 2.0); | ||
134 | elm_transit_go(trans); | ||
135 | } | ||
136 | |||
137 | /* callback useful just to know whether we can receive events from the | ||
138 | * object or not */ | ||
139 | static void | ||
140 | _object_clicked(void *data, Evas_Object *o, void *event_info) | ||
141 | { | ||
142 | printf("object clicked!\n"); | ||
143 | } | ||
144 | |||
145 | /* update our context with the given value for repeat count */ | ||
146 | static void | ||
147 | _cb_repeat_changed(void *data, Evas_Object *obj, void *event) | ||
148 | { | ||
149 | int *repeat_cnt = data; | ||
150 | |||
151 | *repeat_cnt = elm_spinner_value_get(obj); | ||
152 | } | ||
153 | |||
154 | /* update our context with the given tween mode for the transition */ | ||
155 | static void | ||
156 | _cb_tween_changed(void *data, Evas_Object *obj, void *event) | ||
157 | { | ||
158 | Elm_Transit_Tween_Mode *mode = data; | ||
159 | double val = 0.0; | ||
160 | |||
161 | val = elm_spinner_value_get(obj); | ||
162 | if (val == 1.0) | ||
163 | *mode = ELM_TRANSIT_TWEEN_MODE_LINEAR; | ||
164 | else if (val == 2.0) | ||
165 | *mode = ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL; | ||
166 | else if (val == 3.0) | ||
167 | *mode = ELM_TRANSIT_TWEEN_MODE_DECELERATE; | ||
168 | else if (val == 4.0) | ||
169 | *mode = ELM_TRANSIT_TWEEN_MODE_ACCELERATE; | ||
170 | } | ||
171 | |||
172 | EAPI_MAIN int | ||
173 | elm_main(int argc, char **argv) | ||
174 | { | ||
175 | Evas_Object *win, *bg, *obj, *icon, *box, *vbox, *vbox2, *hbox, *btn; | ||
176 | Evas_Object *cbox, *dummy, *spinner; | ||
177 | char buf[PATH_MAX]; | ||
178 | int i; | ||
179 | struct Context context; | ||
180 | |||
181 | /* initialize our context */ | ||
182 | context.events_enabled = EINA_FALSE; | ||
183 | context.auto_reverse = EINA_FALSE; | ||
184 | context.final_state_keep = EINA_FALSE; | ||
185 | context.repeat_times = 0; | ||
186 | context.tween_mode = ELM_TRANSIT_TWEEN_MODE_LINEAR; | ||
187 | |||
188 | elm_app_info_set(elm_main, "elementary", "images/icon_07.png"); | ||
189 | |||
190 | /* add a window */ | ||
191 | win = elm_win_add(NULL, "transit", ELM_WIN_BASIC); | ||
192 | elm_win_title_set(win, "Transit Example"); | ||
193 | evas_object_smart_callback_add(win, "delete,request", on_done, NULL); | ||
194 | elm_win_autodel_set(win, EINA_TRUE); | ||
195 | |||
196 | /* add a scalable white background to this window */ | ||
197 | bg = elm_bg_add(win); | ||
198 | elm_bg_color_set(bg, 255, 255, 255); | ||
199 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
200 | evas_object_size_hint_min_set(bg, 640, 640); | ||
201 | evas_object_size_hint_max_set(bg, 640, 640); | ||
202 | elm_win_resize_object_add(win, bg); | ||
203 | evas_object_show(bg); | ||
204 | |||
205 | /* add a vertical box that will hold everything */ | ||
206 | box = elm_box_add(win); | ||
207 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
208 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
209 | elm_win_resize_object_add(win, box); | ||
210 | evas_object_show(box); | ||
211 | |||
212 | /* a dummy background to create some space for the animation */ | ||
213 | dummy = elm_bg_add(win); | ||
214 | evas_object_size_hint_weight_set(dummy, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
215 | elm_box_pack_end(box, dummy); | ||
216 | evas_object_show(dummy); | ||
217 | |||
218 | /* add an object that we are going to play with */ | ||
219 | /* this object isn't packed inside the box because we don't want it to have | ||
220 | * its size, position, aspect or anything else controled by the container */ | ||
221 | obj = elm_button_add(win); | ||
222 | elm_object_text_set(obj, "Transformed object!"); | ||
223 | icon = elm_icon_add(win); | ||
224 | snprintf(buf, sizeof(buf), "%s/images/icon_07.png", elm_app_data_dir_get()); | ||
225 | elm_icon_file_set(icon, buf, NULL); | ||
226 | elm_object_part_content_set(obj, "icon", icon); | ||
227 | evas_object_move(obj, 160, 60); | ||
228 | evas_object_resize(obj, 250, 100); | ||
229 | evas_object_show(obj); | ||
230 | context.obj = obj; | ||
231 | |||
232 | /* a callback to know if clicks are being received */ | ||
233 | evas_object_smart_callback_add(obj, "clicked", _object_clicked, NULL); | ||
234 | |||
235 | /* button to start our transition */ | ||
236 | btn = elm_button_add(win); | ||
237 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
238 | elm_object_text_set(btn, "Transit!"); | ||
239 | elm_box_pack_end(box, btn); | ||
240 | evas_object_show(btn); | ||
241 | evas_object_smart_callback_add(btn, "clicked", _transit_start, &context); | ||
242 | |||
243 | /* horizontal box to help visual organization */ | ||
244 | hbox = elm_box_add(win); | ||
245 | elm_box_horizontal_set(hbox, EINA_TRUE); | ||
246 | evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
247 | evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, 0.0); | ||
248 | elm_box_pack_end(box, hbox); | ||
249 | evas_object_show(hbox); | ||
250 | |||
251 | /* horizontal box that will hold the many transition checkboxes */ | ||
252 | vbox = elm_box_add(win); | ||
253 | evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
254 | evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, 0.0); | ||
255 | |||
256 | /* create the respective checkboxes based on our helper structure and | ||
257 | * array */ | ||
258 | for (i = 0; _transitions[i].label; i++) | ||
259 | _checkbox_transition_add(vbox, _transitions[i].label, | ||
260 | &_transitions[i].checked); | ||
261 | |||
262 | elm_box_pack_end(hbox, vbox); | ||
263 | evas_object_show(vbox); | ||
264 | |||
265 | /* vertical box that will hold the many transition option checkboxes */ | ||
266 | vbox2 = elm_box_add(win); | ||
267 | evas_object_size_hint_weight_set(vbox2, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
268 | evas_object_size_hint_align_set(vbox2, EVAS_HINT_FILL, 0.0); | ||
269 | elm_box_pack_end(hbox, vbox2); | ||
270 | evas_object_show(vbox2); | ||
271 | |||
272 | /* the rest of this code adds widgets to control some of the behavior of | ||
273 | * the transitions */ | ||
274 | cbox = elm_check_add(win); | ||
275 | evas_object_size_hint_weight_set(cbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
276 | evas_object_size_hint_align_set(cbox, 0.0, 0.0); | ||
277 | elm_object_text_set(cbox, "Events enabled"); | ||
278 | elm_check_state_pointer_set(cbox, &context.events_enabled); | ||
279 | elm_box_pack_end(vbox2, cbox); | ||
280 | evas_object_show(cbox); | ||
281 | |||
282 | cbox = elm_check_add(win); | ||
283 | evas_object_size_hint_weight_set(cbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
284 | evas_object_size_hint_align_set(cbox, 0.0, 0.0); | ||
285 | elm_object_text_set(cbox, "Auto reverse"); | ||
286 | elm_check_state_pointer_set(cbox, &context.auto_reverse); | ||
287 | elm_box_pack_end(vbox2, cbox); | ||
288 | evas_object_show(cbox); | ||
289 | |||
290 | cbox = elm_check_add(win); | ||
291 | evas_object_size_hint_weight_set(cbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
292 | evas_object_size_hint_align_set(cbox, 0.0, 0.0); | ||
293 | elm_object_text_set(cbox, "Keep final state"); | ||
294 | elm_check_state_pointer_set(cbox, &context.final_state_keep); | ||
295 | elm_box_pack_end(vbox2, cbox); | ||
296 | evas_object_show(cbox); | ||
297 | |||
298 | spinner = elm_spinner_add(win); | ||
299 | elm_object_style_set(spinner, "vertical"); | ||
300 | elm_spinner_min_max_set(spinner, 0, 4); | ||
301 | elm_spinner_label_format_set(spinner, "%.0f"); | ||
302 | elm_spinner_editable_set(spinner, EINA_FALSE); | ||
303 | evas_object_size_hint_weight_set(spinner, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
304 | evas_object_size_hint_align_set(spinner, 0.0, EVAS_HINT_FILL); | ||
305 | evas_object_smart_callback_add(spinner, "changed", _cb_repeat_changed, &context.repeat_times); | ||
306 | elm_box_pack_end(vbox2, spinner); | ||
307 | evas_object_show(spinner); | ||
308 | |||
309 | spinner = elm_spinner_add(win); | ||
310 | elm_object_style_set(spinner, "vertical"); | ||
311 | elm_spinner_min_max_set(spinner, 1, 4); | ||
312 | elm_spinner_label_format_set(spinner, "%.0f"); | ||
313 | elm_spinner_editable_set(spinner, EINA_FALSE); | ||
314 | elm_spinner_special_value_add(spinner, 1, "linear"); | ||
315 | elm_spinner_special_value_add(spinner, 2, "sinusoidal"); | ||
316 | elm_spinner_special_value_add(spinner, 3, "decelerate"); | ||
317 | elm_spinner_special_value_add(spinner, 4, "accelerate"); | ||
318 | evas_object_size_hint_weight_set(spinner, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
319 | evas_object_size_hint_align_set(spinner, 0.0, EVAS_HINT_FILL); | ||
320 | evas_object_size_hint_min_set(spinner, 200, 30); | ||
321 | evas_object_smart_callback_add(spinner, "changed", _cb_tween_changed, &context.tween_mode); | ||
322 | elm_box_pack_end(vbox2, spinner); | ||
323 | evas_object_show(spinner); | ||
324 | |||
325 | evas_object_show(win); | ||
326 | |||
327 | elm_run(); | ||
328 | elm_shutdown(); | ||
329 | |||
330 | return 0; | ||
331 | } | ||
332 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/transit_example_04.c b/libraries/elementary/src/examples/transit_example_04.c deleted file mode 100644 index cf0338f..0000000 --- a/libraries/elementary/src/examples/transit_example_04.c +++ /dev/null | |||
@@ -1,173 +0,0 @@ | |||
1 | //Compile with: | ||
2 | //gcc -o transit_example_04 transit_example_04.c `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\"" | ||
3 | //where directory is the a path where images/icon_07.png can be found. | ||
4 | |||
5 | #include <Elementary.h> | ||
6 | |||
7 | static void | ||
8 | _transit_flip(Elm_Transit *trans) | ||
9 | { | ||
10 | elm_transit_effect_flip_add(trans, ELM_TRANSIT_EFFECT_FLIP_AXIS_X, EINA_TRUE); | ||
11 | } | ||
12 | |||
13 | static void | ||
14 | _transit_blend(Elm_Transit *trans) | ||
15 | { | ||
16 | elm_transit_effect_blend_add(trans); | ||
17 | } | ||
18 | |||
19 | static void | ||
20 | _transit_fade(Elm_Transit *trans) | ||
21 | { | ||
22 | elm_transit_effect_fade_add(trans); | ||
23 | } | ||
24 | |||
25 | static void | ||
26 | _transit_resizable_flip(Elm_Transit *trans) | ||
27 | { | ||
28 | elm_transit_effect_resizable_flip_add( | ||
29 | trans, ELM_TRANSIT_EFFECT_FLIP_AXIS_Y, EINA_TRUE); | ||
30 | } | ||
31 | |||
32 | static struct { | ||
33 | const char *label; | ||
34 | void (*transition_add_cb)(Elm_Transit *); | ||
35 | Eina_Bool checked; | ||
36 | } _transitions[] = { | ||
37 | { "Flip", _transit_flip, EINA_FALSE }, | ||
38 | { "Blend", _transit_blend, EINA_FALSE }, | ||
39 | { "Fade", _transit_fade, EINA_FALSE }, | ||
40 | { "Resizable Flip", _transit_resizable_flip, EINA_FALSE }, | ||
41 | { NULL, NULL, EINA_FALSE } | ||
42 | }; | ||
43 | |||
44 | static void | ||
45 | on_done(void *data, Evas_Object *obj, void *event_info) | ||
46 | { | ||
47 | /* quit the mainloop (elm_run) */ | ||
48 | elm_exit(); | ||
49 | } | ||
50 | |||
51 | static void | ||
52 | _checkbox_transition_add(Evas_Object *box, const char *label, Eina_Bool *checked) | ||
53 | { | ||
54 | Evas_Object *check = elm_check_add(elm_object_parent_widget_get(box)); | ||
55 | evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
56 | evas_object_size_hint_align_set(check, 0.0, 0.0); | ||
57 | elm_object_text_set(check, label); | ||
58 | elm_check_state_pointer_set(check, checked); | ||
59 | elm_box_pack_end(box, check); | ||
60 | evas_object_show(check); | ||
61 | } | ||
62 | |||
63 | static void | ||
64 | _transit_start(void *data, Evas_Object *o, void *event_info) | ||
65 | { | ||
66 | Elm_Transit *trans = NULL; | ||
67 | Eina_List *objs = data, *l; | ||
68 | Evas_Object *obj; | ||
69 | int i; | ||
70 | |||
71 | trans = elm_transit_add(); | ||
72 | EINA_LIST_FOREACH(objs, l, obj) | ||
73 | elm_transit_object_add(trans, obj); | ||
74 | |||
75 | // FIXME: Should check if there's another transit going before starting a new | ||
76 | // one | ||
77 | |||
78 | for (i = 0; _transitions[i].label; i++) | ||
79 | { | ||
80 | if (_transitions[i].checked) | ||
81 | _transitions[i].transition_add_cb(trans); | ||
82 | } | ||
83 | |||
84 | elm_transit_duration_set(trans, 2.0); | ||
85 | elm_transit_go(trans); | ||
86 | } | ||
87 | |||
88 | EAPI_MAIN int | ||
89 | elm_main(int argc, char **argv) | ||
90 | { | ||
91 | Evas_Object *win, *bg, *obj, *icon, *box, *vbox, *btn, *dummy; | ||
92 | Eina_List *objs = NULL; | ||
93 | char buf[PATH_MAX]; | ||
94 | int i; | ||
95 | |||
96 | elm_app_info_set(elm_main, "elementary", "images/icon_07.png"); | ||
97 | /* add a window */ | ||
98 | win = elm_win_add(NULL, "transit", ELM_WIN_BASIC); | ||
99 | elm_win_title_set(win, "Transit Example"); | ||
100 | evas_object_smart_callback_add(win, "delete,request", on_done, NULL); | ||
101 | elm_win_autodel_set(win, EINA_TRUE); | ||
102 | |||
103 | /* add a scalable white background to this window */ | ||
104 | bg = elm_bg_add(win); | ||
105 | elm_bg_color_set(bg, 255, 255, 255); | ||
106 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
107 | evas_object_size_hint_min_set(bg, 640, 640); | ||
108 | evas_object_size_hint_max_set(bg, 640, 640); | ||
109 | elm_win_resize_object_add(win, bg); | ||
110 | evas_object_show(bg); | ||
111 | |||
112 | box = elm_box_add(win); | ||
113 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
114 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
115 | elm_win_resize_object_add(win, box); | ||
116 | evas_object_show(box); | ||
117 | |||
118 | dummy = elm_bg_add(win); | ||
119 | evas_object_size_hint_weight_set(dummy, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
120 | elm_box_pack_end(box, dummy); | ||
121 | evas_object_show(dummy); | ||
122 | |||
123 | /* add an object that we are going to play with */ | ||
124 | obj = elm_button_add(win); | ||
125 | elm_object_text_set(obj, "Transformed object!"); | ||
126 | icon = elm_icon_add(win); | ||
127 | snprintf(buf, sizeof(buf), "%s/images/icon_07.png", elm_app_data_dir_get()); | ||
128 | elm_icon_file_set(icon, buf, NULL); | ||
129 | elm_object_part_content_set(obj, "icon", icon); | ||
130 | evas_object_move(obj, 160, 60); | ||
131 | evas_object_resize(obj, 250, 100); | ||
132 | evas_object_show(obj); | ||
133 | |||
134 | objs = eina_list_append(objs, obj); | ||
135 | |||
136 | /* add another object that we are going to play with */ | ||
137 | obj = elm_button_add(win); | ||
138 | elm_object_text_set(obj, "Another object!"); | ||
139 | icon = elm_icon_add(win); | ||
140 | snprintf(buf, sizeof(buf), "%s/images/icon_08.png", elm_app_data_dir_get()); | ||
141 | elm_icon_file_set(icon, buf, NULL); | ||
142 | elm_object_part_content_set(obj, "icon", icon); | ||
143 | evas_object_move(obj, 160, 60); | ||
144 | evas_object_resize(obj, 250, 100); | ||
145 | |||
146 | objs = eina_list_append(objs, obj); | ||
147 | |||
148 | btn = elm_button_add(win); | ||
149 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
150 | elm_object_text_set(btn, "Transit!"); | ||
151 | elm_box_pack_end(box, btn); | ||
152 | evas_object_show(btn); | ||
153 | |||
154 | evas_object_smart_callback_add(btn, "clicked", _transit_start, objs); | ||
155 | |||
156 | vbox = elm_box_add(win); | ||
157 | evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_FILL); | ||
158 | evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, 0.0); | ||
159 | |||
160 | for (i = 0; _transitions[i].label; i++) | ||
161 | _checkbox_transition_add(vbox, _transitions[i].label, &_transitions[i].checked); | ||
162 | |||
163 | elm_box_pack_end(box, vbox); | ||
164 | evas_object_show(vbox); | ||
165 | |||
166 | evas_object_show(win); | ||
167 | |||
168 | elm_run(); | ||
169 | elm_shutdown(); | ||
170 | |||
171 | return 0; | ||
172 | } | ||
173 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/web_example.c b/libraries/elementary/src/examples/web_example.c deleted file mode 100644 index 0158315..0000000 --- a/libraries/elementary/src/examples/web_example.c +++ /dev/null | |||
@@ -1,623 +0,0 @@ | |||
1 | /* | ||
2 | * gcc -o web_example web_example.c `pkg-config --cflags --libs elementary ewebkit` -D_GNU_SOURCE | ||
3 | */ | ||
4 | |||
5 | #define _GNU_SOURCE | ||
6 | #include <Elementary.h> | ||
7 | #ifdef HAVE_ELEMENTARY_WEB | ||
8 | #include <EWebKit.h> | ||
9 | #endif | ||
10 | |||
11 | typedef struct _Tab_Data Tab_Data; | ||
12 | |||
13 | typedef struct | ||
14 | { | ||
15 | Evas_Object *win; | ||
16 | Evas_Object *main_box; | ||
17 | Evas_Object *naviframe; | ||
18 | Evas_Object *url; | ||
19 | Evas_Object *default_web; | ||
20 | Evas_Object *tabs; | ||
21 | Evas_Object *close_tab; | ||
22 | Evas_Object *search_box; | ||
23 | Evas_Object *search_entry; | ||
24 | |||
25 | struct { | ||
26 | Evas_Object *back; | ||
27 | Evas_Object *fwd; | ||
28 | Evas_Object *refresh; | ||
29 | } nav; | ||
30 | |||
31 | Tab_Data *current_tab; | ||
32 | |||
33 | Eina_Bool exiting : 1; | ||
34 | } App_Data; | ||
35 | |||
36 | struct _Tab_Data | ||
37 | { | ||
38 | Evas_Object *web; | ||
39 | App_Data *app; | ||
40 | Elm_Object_Item *tab; | ||
41 | }; | ||
42 | |||
43 | static Evas_Object * _web_create_window_cb(void *data, Evas_Object *obj, Eina_Bool js, const Elm_Web_Window_Features *wf); | ||
44 | |||
45 | static void | ||
46 | nav_button_update(App_Data *ad) | ||
47 | { | ||
48 | Eina_Bool back, fwd; | ||
49 | |||
50 | back = !elm_web_back_possible_get(ad->current_tab->web); | ||
51 | fwd = !elm_web_forward_possible_get(ad->current_tab->web); | ||
52 | |||
53 | elm_object_disabled_set(ad->nav.back, back); | ||
54 | elm_object_disabled_set(ad->nav.fwd, fwd); | ||
55 | } | ||
56 | |||
57 | static void | ||
58 | tab_current_set(Tab_Data *td) | ||
59 | { | ||
60 | const char *uri; | ||
61 | |||
62 | if (td == td->app->current_tab) | ||
63 | return; | ||
64 | |||
65 | td->app->current_tab = td; | ||
66 | |||
67 | uri = elm_web_uri_get(td->web); | ||
68 | elm_object_text_set(td->app->url, uri); | ||
69 | |||
70 | nav_button_update(td->app); | ||
71 | elm_entry_icon_visible_set(td->app->url, EINA_TRUE); | ||
72 | |||
73 | elm_naviframe_item_simple_promote(td->app->naviframe, td->web); | ||
74 | } | ||
75 | |||
76 | static void | ||
77 | _tab_clicked_cb(void *data, Evas_Object *obj, void *event_info) | ||
78 | { | ||
79 | Tab_Data *td = data; | ||
80 | /* the first toolbar_item_append() calls the select callback before the item | ||
81 | * is assigned, so we need a workaround for that. */ | ||
82 | if (!td->tab) | ||
83 | td->tab = event_info; | ||
84 | tab_current_set(td); | ||
85 | } | ||
86 | |||
87 | static void | ||
88 | _title_changed_cb(void *data, Evas_Object *obj, void *event_info) | ||
89 | { | ||
90 | Tab_Data *td = data; | ||
91 | const char *title = event_info; | ||
92 | char buf[20] = ""; | ||
93 | |||
94 | if (title) | ||
95 | strncpy(buf, title, sizeof(buf) - 1); | ||
96 | elm_object_item_text_set(td->tab, buf); | ||
97 | } | ||
98 | |||
99 | static void | ||
100 | _uri_changed_cb(void *data, Evas_Object *obj, void *event_info) | ||
101 | { | ||
102 | Tab_Data *td = data; | ||
103 | const char *uri = event_info; | ||
104 | |||
105 | if (td != td->app->current_tab) | ||
106 | return; | ||
107 | |||
108 | nav_button_update(td->app); | ||
109 | elm_object_text_set(td->app->url, uri); | ||
110 | } | ||
111 | |||
112 | static void | ||
113 | _web_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) | ||
114 | { | ||
115 | Tab_Data *td = data; | ||
116 | |||
117 | if (td->tab) | ||
118 | elm_object_item_del(td->tab); | ||
119 | |||
120 | free(td); | ||
121 | } | ||
122 | |||
123 | static void | ||
124 | _tb_item_del_cb(void *data, Evas_Object *obj, void *event_info) | ||
125 | { | ||
126 | Tab_Data *td = data; | ||
127 | if (!td->app->exiting && !elm_toolbar_selected_item_get(obj)) | ||
128 | { | ||
129 | td->app->current_tab = NULL; | ||
130 | elm_entry_icon_visible_set(td->app->url, EINA_FALSE); | ||
131 | if (td->app->search_box) | ||
132 | evas_object_del(td->app->search_box); | ||
133 | } | ||
134 | td->tab = NULL; | ||
135 | } | ||
136 | |||
137 | Tab_Data * | ||
138 | tab_add(App_Data *ad) | ||
139 | { | ||
140 | Tab_Data *td; | ||
141 | |||
142 | td = calloc(1, sizeof(Tab_Data)); | ||
143 | if (!td) return NULL; | ||
144 | |||
145 | td->web = elm_web_add(ad->win); | ||
146 | elm_web_window_create_hook_set(td->web, _web_create_window_cb, ad); | ||
147 | elm_web_inwin_mode_set(td->web, EINA_TRUE); | ||
148 | evas_object_size_hint_weight_set(td->web, EVAS_HINT_EXPAND, | ||
149 | EVAS_HINT_EXPAND); | ||
150 | evas_object_size_hint_align_set(td->web, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
151 | elm_naviframe_item_simple_push(ad->naviframe, td->web); | ||
152 | |||
153 | td->app = ad; | ||
154 | td->tab = elm_toolbar_item_append(td->app->tabs, NULL, "New tab", | ||
155 | _tab_clicked_cb, td); | ||
156 | elm_object_item_del_cb_set(td->tab, _tb_item_del_cb); | ||
157 | |||
158 | evas_object_data_set(td->web, "tab_data", td); | ||
159 | |||
160 | evas_object_smart_callback_add(td->web, "title,changed", _title_changed_cb, | ||
161 | td); | ||
162 | evas_object_smart_callback_add(td->web, "uri,changed", _uri_changed_cb, td); | ||
163 | evas_object_event_callback_add(td->web, EVAS_CALLBACK_FREE, _web_free_cb, | ||
164 | td); | ||
165 | |||
166 | elm_toolbar_item_selected_set(td->tab, EINA_TRUE); | ||
167 | return td; | ||
168 | } | ||
169 | |||
170 | static char * | ||
171 | uri_sanitize(const char *uri) | ||
172 | { | ||
173 | char *fixed_uri; | ||
174 | char *schema; | ||
175 | char *tmp; | ||
176 | |||
177 | if (!uri || !*uri) return NULL; | ||
178 | |||
179 | tmp = strstr(uri, "://"); | ||
180 | if (!tmp || (tmp == uri) || (tmp > (uri + 15))) | ||
181 | { | ||
182 | char *new_uri = NULL; | ||
183 | if (ecore_file_exists(uri)) | ||
184 | { | ||
185 | schema = "file"; | ||
186 | new_uri = ecore_file_realpath(uri); | ||
187 | } | ||
188 | else | ||
189 | schema = "http"; | ||
190 | |||
191 | if (asprintf(&fixed_uri, "%s://%s", schema, new_uri ? new_uri : uri) > | ||
192 | 0) | ||
193 | { | ||
194 | free(new_uri); | ||
195 | return fixed_uri; | ||
196 | } | ||
197 | free(new_uri); | ||
198 | } | ||
199 | else | ||
200 | return strdup(uri); | ||
201 | |||
202 | return NULL; | ||
203 | } | ||
204 | |||
205 | static void | ||
206 | tab_uri_set(Tab_Data *td, const char *uri) | ||
207 | { | ||
208 | char *sane_uri = uri_sanitize(uri); | ||
209 | elm_web_uri_set(td->web, sane_uri); | ||
210 | free(sane_uri); | ||
211 | } | ||
212 | |||
213 | static void | ||
214 | _url_activated_cb(void *data, Evas_Object *obj, void *event_info) | ||
215 | { | ||
216 | App_Data *ad = data; | ||
217 | Tab_Data *td; | ||
218 | const char *uri = eina_stringshare_ref(elm_object_text_get(obj)); | ||
219 | |||
220 | if (!ad->current_tab) | ||
221 | td = tab_add(ad); | ||
222 | else | ||
223 | td = ad->current_tab; | ||
224 | tab_uri_set(td, uri); | ||
225 | eina_stringshare_del(uri); | ||
226 | } | ||
227 | |||
228 | static void | ||
229 | _nav_back_cb(void *data, Evas_Object *obj, void *event_info) | ||
230 | { | ||
231 | App_Data *ad = data; | ||
232 | |||
233 | elm_web_back(ad->current_tab->web); | ||
234 | } | ||
235 | |||
236 | static void | ||
237 | _nav_refresh_cb(void *data, Evas_Object *obj, void *event_info) | ||
238 | { | ||
239 | App_Data *ad = data; | ||
240 | const Evas_Modifier *mods = evas_key_modifier_get(evas_object_evas_get(obj)); | ||
241 | |||
242 | if (evas_key_modifier_is_set(mods, "Shift")) | ||
243 | elm_web_reload_full(ad->current_tab->web); | ||
244 | else | ||
245 | elm_web_reload(ad->current_tab->web); | ||
246 | } | ||
247 | |||
248 | static void | ||
249 | _nav_fwd_cb(void *data, Evas_Object *obj, void *event_info) | ||
250 | { | ||
251 | App_Data *ad = data; | ||
252 | |||
253 | elm_web_forward(ad->current_tab->web); | ||
254 | } | ||
255 | |||
256 | static void | ||
257 | _close_tab_cb(void *data, Evas_Object *obj, void *event_info) | ||
258 | { | ||
259 | App_Data *ad = data; | ||
260 | |||
261 | if (!ad->current_tab) | ||
262 | return; | ||
263 | evas_object_del(ad->current_tab->web); | ||
264 | } | ||
265 | |||
266 | static void | ||
267 | _add_tab_cb(void *data, Evas_Object *obj, void *event_info) | ||
268 | { | ||
269 | App_Data *ad = data; | ||
270 | tab_add(ad); | ||
271 | elm_object_focus_set(ad->url, EINA_TRUE); | ||
272 | } | ||
273 | |||
274 | static Evas_Object * | ||
275 | _web_create_window_cb(void *data, Evas_Object *obj, Eina_Bool js, const Elm_Web_Window_Features *wf) | ||
276 | { | ||
277 | App_Data *ad = data; | ||
278 | Tab_Data *td; | ||
279 | |||
280 | td = tab_add(ad); | ||
281 | return td->web; | ||
282 | } | ||
283 | |||
284 | static void | ||
285 | _win_del_request_cb(void *data, Evas_Object *obj, void *event_info) | ||
286 | { | ||
287 | App_Data *ad = data; | ||
288 | ad->exiting = EINA_TRUE; | ||
289 | } | ||
290 | |||
291 | static void | ||
292 | _win_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) | ||
293 | { | ||
294 | free(data); | ||
295 | } | ||
296 | |||
297 | static void | ||
298 | _search_entry_changed_cb(void *data, Evas_Object *obj, void *event_info) | ||
299 | { | ||
300 | App_Data *ad = data; | ||
301 | const char *text; | ||
302 | |||
303 | text = elm_object_text_get(obj); | ||
304 | elm_web_text_search(ad->current_tab->web, text, EINA_FALSE, EINA_TRUE, | ||
305 | EINA_TRUE); | ||
306 | elm_web_text_matches_unmark_all(ad->current_tab->web); | ||
307 | elm_web_text_matches_mark(ad->current_tab->web, text, EINA_FALSE, EINA_TRUE, | ||
308 | 0); | ||
309 | } | ||
310 | |||
311 | static void | ||
312 | _search_entry_activate_cb(void *data, Evas_Object *obj, void *event_info) | ||
313 | { | ||
314 | App_Data *ad = data; | ||
315 | const char *text; | ||
316 | |||
317 | text = elm_object_text_get(obj); | ||
318 | elm_web_text_search(ad->current_tab->web, text, EINA_FALSE, EINA_TRUE, | ||
319 | EINA_TRUE); | ||
320 | } | ||
321 | |||
322 | static void | ||
323 | _search_next_cb(void *data, Evas_Object *obj, void *event_info) | ||
324 | { | ||
325 | App_Data *ad = data; | ||
326 | const char *text; | ||
327 | |||
328 | text = elm_object_text_get(ad->search_entry); | ||
329 | elm_web_text_search(ad->current_tab->web, text, EINA_FALSE, EINA_TRUE, | ||
330 | EINA_TRUE); | ||
331 | } | ||
332 | |||
333 | static void | ||
334 | _search_prev_cb(void *data, Evas_Object *obj, void *event_info) | ||
335 | { | ||
336 | App_Data *ad = data; | ||
337 | const char *text; | ||
338 | |||
339 | text = elm_object_text_get(ad->search_entry); | ||
340 | elm_web_text_search(ad->current_tab->web, text, EINA_FALSE, EINA_FALSE, | ||
341 | EINA_TRUE); | ||
342 | } | ||
343 | |||
344 | static void | ||
345 | _search_close_cb(void *data, Evas_Object *obj, void *event_info) | ||
346 | { | ||
347 | App_Data *ad = data; | ||
348 | evas_object_del(ad->search_box); | ||
349 | } | ||
350 | |||
351 | static void | ||
352 | _search_box_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) | ||
353 | { | ||
354 | App_Data *ad = data; | ||
355 | ad->search_box = NULL; | ||
356 | ad->search_entry = NULL; | ||
357 | } | ||
358 | |||
359 | static void | ||
360 | _win_search_trigger_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) | ||
361 | { | ||
362 | Evas_Event_Key_Down *ev = event_info; | ||
363 | App_Data *ad = data; | ||
364 | Evas_Object *box, *box2, *entry, *btn, *ic; | ||
365 | |||
366 | if (strcmp(ev->keyname, "f") || | ||
367 | !evas_key_modifier_is_set(ev->modifiers, "Control")) | ||
368 | return; | ||
369 | if (ad->search_box || !ad->current_tab) | ||
370 | return; | ||
371 | |||
372 | box = elm_box_add(ad->win); | ||
373 | elm_box_horizontal_set(box, EINA_TRUE); | ||
374 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0.0); | ||
375 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
376 | elm_box_pack_after(ad->main_box, box, ad->url); | ||
377 | evas_object_show(box); | ||
378 | |||
379 | evas_object_event_callback_add(box, EVAS_CALLBACK_DEL, _search_box_del_cb, | ||
380 | ad); | ||
381 | |||
382 | entry = elm_entry_add(ad->win); | ||
383 | elm_entry_single_line_set(entry, EINA_TRUE); | ||
384 | elm_entry_scrollable_set(entry, EINA_TRUE); | ||
385 | evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
386 | evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
387 | elm_box_pack_end(box, entry); | ||
388 | evas_object_show(entry); | ||
389 | |||
390 | evas_object_smart_callback_add(entry, "changed", _search_entry_changed_cb, | ||
391 | ad); | ||
392 | evas_object_smart_callback_add(entry, "activated", _search_entry_activate_cb, | ||
393 | ad); | ||
394 | |||
395 | box2 = elm_box_add(ad->win); | ||
396 | elm_box_horizontal_set(box2, EINA_TRUE); | ||
397 | elm_object_part_content_set(entry, "end", box2); | ||
398 | |||
399 | btn = elm_button_add(ad->win); | ||
400 | elm_box_pack_end(box2, btn); | ||
401 | evas_object_show(btn); | ||
402 | |||
403 | ic = elm_icon_add(ad->win); | ||
404 | elm_icon_standard_set(ic, "arrow_up"); | ||
405 | elm_object_part_content_set(btn, "icon", ic); | ||
406 | |||
407 | evas_object_smart_callback_add(btn, "clicked", _search_prev_cb, ad); | ||
408 | |||
409 | btn = elm_button_add(ad->win); | ||
410 | elm_box_pack_end(box2, btn); | ||
411 | evas_object_show(btn); | ||
412 | |||
413 | ic = elm_icon_add(ad->win); | ||
414 | elm_icon_standard_set(ic, "arrow_down"); | ||
415 | elm_object_part_content_set(btn, "icon", ic); | ||
416 | |||
417 | evas_object_smart_callback_add(btn, "clicked", _search_next_cb, ad); | ||
418 | |||
419 | btn = elm_button_add(ad->win); | ||
420 | elm_box_pack_end(box, btn); | ||
421 | evas_object_show(btn); | ||
422 | |||
423 | ic = elm_icon_add(ad->win); | ||
424 | elm_icon_standard_set(ic, "close"); | ||
425 | elm_object_part_content_set(btn, "icon", ic); | ||
426 | |||
427 | evas_object_smart_callback_add(btn, "clicked", _search_close_cb, ad); | ||
428 | |||
429 | ad->search_box = box; | ||
430 | ad->search_entry = entry; | ||
431 | |||
432 | elm_object_focus_set(entry, EINA_TRUE); | ||
433 | } | ||
434 | |||
435 | static void | ||
436 | default_content_set(Evas_Object *web) | ||
437 | { | ||
438 | #ifdef HAVE_ELEMENTARY_WEB | ||
439 | Evas_Object *view, *frame; | ||
440 | const char contents[] = "" | ||
441 | "<html>\n" | ||
442 | " <head>\n" | ||
443 | " <title>Nothing to see here, move along</title>\n" | ||
444 | " </head>\n" | ||
445 | " <body>\n" | ||
446 | " <a href=\"http://www.enlightenment.org\" target=\"_blank\">E</a>\n" | ||
447 | " <br />\n" | ||
448 | " <a href=\"http://www.google.com\" target=\"_blank\">Google</a>\n" | ||
449 | " <br />\n" | ||
450 | " </body>\n" | ||
451 | "</html>\n"; | ||
452 | |||
453 | view = elm_web_webkit_view_get(web); | ||
454 | frame = ewk_view_frame_main_get(view); | ||
455 | ewk_frame_contents_set(frame, contents, sizeof(contents) - 1, "text/html", | ||
456 | "UTF-8", NULL); | ||
457 | #else | ||
458 | (void) web; | ||
459 | #endif | ||
460 | } | ||
461 | |||
462 | EAPI_MAIN int | ||
463 | elm_main(int argc, char *argv[]) | ||
464 | { | ||
465 | Evas_Object *win, *bg, *box, *box2, *btn, *ic, *url, *naviframe, *tabs, *web; | ||
466 | Evas *e; | ||
467 | Evas_Modifier_Mask ctrl_mask; | ||
468 | App_Data *ad; | ||
469 | |||
470 | if (!elm_need_web()) | ||
471 | return -1; | ||
472 | |||
473 | ad = calloc(1, sizeof(App_Data)); | ||
474 | if (!ad) return -1; | ||
475 | |||
476 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); | ||
477 | |||
478 | win = elm_win_add(NULL, "example-web", ELM_WIN_BASIC); | ||
479 | elm_win_autodel_set(win, EINA_TRUE); | ||
480 | |||
481 | e = evas_object_evas_get(win); | ||
482 | ctrl_mask = evas_key_modifier_mask_get(e, "Control"); | ||
483 | if (!evas_object_key_grab(win, "f", ctrl_mask, 0, EINA_TRUE)) | ||
484 | fprintf(stderr, "Could not grab trigger for search dialog\n"); | ||
485 | |||
486 | evas_object_smart_callback_add(win, "delete,request", _win_del_request_cb, | ||
487 | ad); | ||
488 | evas_object_event_callback_add(win, EVAS_CALLBACK_KEY_DOWN, | ||
489 | _win_search_trigger_cb, ad); | ||
490 | evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _win_free_cb, ad); | ||
491 | |||
492 | bg = elm_bg_add(win); | ||
493 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
494 | elm_win_resize_object_add(win, bg); | ||
495 | evas_object_show(bg); | ||
496 | |||
497 | box = elm_box_add(win); | ||
498 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
499 | elm_win_resize_object_add(win, box); | ||
500 | evas_object_show(box); | ||
501 | |||
502 | url = elm_entry_add(win); | ||
503 | elm_entry_single_line_set(url, EINA_TRUE); | ||
504 | elm_entry_scrollable_set(url, EINA_TRUE); | ||
505 | evas_object_size_hint_weight_set(url, EVAS_HINT_EXPAND, 0.0); | ||
506 | evas_object_size_hint_align_set(url, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
507 | elm_box_pack_end(box, url); | ||
508 | evas_object_show(url); | ||
509 | |||
510 | evas_object_smart_callback_add(url, "activated", _url_activated_cb, ad); | ||
511 | |||
512 | box2 = elm_box_add(win); | ||
513 | elm_box_horizontal_set(box2, EINA_TRUE); | ||
514 | elm_object_part_content_set(url, "icon", box2); | ||
515 | elm_entry_icon_visible_set(url, EINA_FALSE); | ||
516 | |||
517 | btn = elm_button_add(win); | ||
518 | elm_box_pack_end(box2, btn); | ||
519 | evas_object_show(btn); | ||
520 | |||
521 | ad->nav.back = btn; | ||
522 | |||
523 | ic = elm_icon_add(win); | ||
524 | elm_icon_standard_set(ic, "arrow_left"); | ||
525 | elm_object_part_content_set(btn, "icon", ic); | ||
526 | |||
527 | evas_object_smart_callback_add(btn, "clicked", _nav_back_cb, ad); | ||
528 | |||
529 | btn = elm_button_add(win); | ||
530 | elm_box_pack_end(box2, btn); | ||
531 | evas_object_show(btn); | ||
532 | |||
533 | ad->nav.refresh = btn; | ||
534 | |||
535 | ic = elm_icon_add(win); | ||
536 | elm_icon_standard_set(ic, "refresh"); | ||
537 | elm_object_part_content_set(btn, "icon", ic); | ||
538 | |||
539 | evas_object_smart_callback_add(btn, "clicked", _nav_refresh_cb, ad); | ||
540 | |||
541 | btn = elm_button_add(win); | ||
542 | elm_box_pack_end(box2, btn); | ||
543 | evas_object_show(btn); | ||
544 | |||
545 | ad->nav.fwd = btn; | ||
546 | |||
547 | ic = elm_icon_add(win); | ||
548 | elm_icon_standard_set(ic, "arrow_right"); | ||
549 | elm_object_part_content_set(btn, "icon", ic); | ||
550 | |||
551 | evas_object_smart_callback_add(btn, "clicked", _nav_fwd_cb, ad); | ||
552 | |||
553 | box2 = elm_box_add(win); | ||
554 | elm_box_horizontal_set(box2, EINA_TRUE); | ||
555 | evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, 0.0); | ||
556 | evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
557 | elm_box_pack_end(box, box2); | ||
558 | evas_object_show(box2); | ||
559 | |||
560 | btn = elm_button_add(win); | ||
561 | elm_box_pack_end(box2, btn); | ||
562 | evas_object_show(btn); | ||
563 | |||
564 | ic = elm_icon_add(win); | ||
565 | elm_icon_standard_set(ic, "file"); | ||
566 | elm_object_part_content_set(btn, "icon", ic); | ||
567 | |||
568 | evas_object_smart_callback_add(btn, "clicked", _add_tab_cb, ad); | ||
569 | |||
570 | tabs = elm_toolbar_add(win); | ||
571 | elm_toolbar_align_set(tabs, 0.0); | ||
572 | elm_toolbar_select_mode_set(tabs, ELM_OBJECT_SELECT_MODE_ALWAYS); | ||
573 | elm_toolbar_homogeneous_set(tabs, EINA_FALSE); | ||
574 | elm_toolbar_shrink_mode_set(tabs, ELM_TOOLBAR_SHRINK_MENU); | ||
575 | evas_object_size_hint_weight_set(tabs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
576 | evas_object_size_hint_align_set(tabs, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
577 | elm_box_pack_end(box2, tabs); | ||
578 | evas_object_show(tabs); | ||
579 | |||
580 | btn = elm_button_add(win); | ||
581 | elm_box_pack_end(box2, btn); | ||
582 | evas_object_show(btn); | ||
583 | |||
584 | evas_object_smart_callback_add(btn, "clicked", _close_tab_cb, ad); | ||
585 | |||
586 | ic = elm_icon_add(win); | ||
587 | elm_icon_standard_set(ic, "close"); | ||
588 | elm_object_part_content_set(btn, "icon", ic); | ||
589 | |||
590 | naviframe = elm_naviframe_add(win); | ||
591 | evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
592 | evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
593 | elm_box_pack_end(box, naviframe); | ||
594 | evas_object_show(naviframe); | ||
595 | |||
596 | elm_toolbar_menu_parent_set(tabs, naviframe); | ||
597 | |||
598 | web = elm_web_add(win); | ||
599 | elm_web_window_create_hook_set(web, _web_create_window_cb, ad); | ||
600 | elm_web_history_enabled_set(web, EINA_FALSE); | ||
601 | evas_object_size_hint_weight_set(web, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
602 | evas_object_size_hint_align_set(web, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
603 | elm_naviframe_item_simple_push(naviframe, web); | ||
604 | |||
605 | default_content_set(web); | ||
606 | |||
607 | ad->win = win; | ||
608 | ad->main_box = box; | ||
609 | ad->naviframe = naviframe; | ||
610 | ad->url = url; | ||
611 | ad->default_web = web; | ||
612 | ad->tabs = tabs; | ||
613 | ad->close_tab = btn; | ||
614 | |||
615 | evas_object_resize(win, 480, 640); | ||
616 | evas_object_show(win); | ||
617 | |||
618 | elm_run(); | ||
619 | elm_shutdown(); | ||
620 | |||
621 | return 0; | ||
622 | } | ||
623 | ELM_MAIN() | ||
diff --git a/libraries/elementary/src/examples/win_example.c b/libraries/elementary/src/examples/win_example.c deleted file mode 100644 index 87e985d..0000000 --- a/libraries/elementary/src/examples/win_example.c +++ /dev/null | |||
@@ -1,327 +0,0 @@ | |||
1 | /* | ||
2 | * gcc -o win_example win_example.c `pkg-config --cflags --libs elementary ecore-x` | ||
3 | */ | ||
4 | #ifdef HAVE_ELEMENTARY_X | ||
5 | # include <Ecore_X.h> | ||
6 | #endif | ||
7 | |||
8 | #include <Elementary.h> | ||
9 | |||
10 | static void | ||
11 | _btn_activate_cb(void *data, Evas_Object *obj, void *event) | ||
12 | { | ||
13 | elm_win_activate(data); | ||
14 | } | ||
15 | |||
16 | static void | ||
17 | _btn_lower_cb(void *data, Evas_Object *obj, void *event) | ||
18 | { | ||
19 | elm_win_lower(data); | ||
20 | } | ||
21 | |||
22 | static void | ||
23 | _btn_raise_cb(void *data, Evas_Object *obj, void *event) | ||
24 | { | ||
25 | elm_win_raise(data); | ||
26 | } | ||
27 | |||
28 | static void | ||
29 | _btn_borderless_cb(void *data, Evas_Object *obj, void *event) | ||
30 | { | ||
31 | Eina_Bool flag = elm_win_borderless_get(data); | ||
32 | elm_win_borderless_set(data, !flag); | ||
33 | } | ||
34 | |||
35 | static void | ||
36 | _btn_shaped_cb(void *data, Evas_Object *obj, void *event) | ||
37 | { | ||
38 | Eina_Bool flag = elm_win_shaped_get(data); | ||
39 | elm_win_shaped_set(data, !flag); | ||
40 | } | ||
41 | |||
42 | static void | ||
43 | _btn_alpha_cb(void *data, Evas_Object *obj, void *event) | ||
44 | { | ||
45 | Eina_Bool flag = elm_win_alpha_get(data); | ||
46 | elm_win_alpha_set(data, !flag); | ||
47 | } | ||
48 | |||
49 | static void | ||
50 | _btn_fullscreen_cb(void *data, Evas_Object *obj, void *event) | ||
51 | { | ||
52 | Eina_Bool flag = elm_win_fullscreen_get(data); | ||
53 | elm_win_fullscreen_set(data, !flag); | ||
54 | } | ||
55 | |||
56 | static void | ||
57 | _btn_maximized_cb(void *data, Evas_Object *obj, void *event) | ||
58 | { | ||
59 | Eina_Bool flag = elm_win_maximized_get(data); | ||
60 | elm_win_maximized_set(data, !flag); | ||
61 | } | ||
62 | |||
63 | static void | ||
64 | _btn_iconified_cb(void *data, Evas_Object *obj, void *event) | ||
65 | { | ||
66 | Eina_Bool flag = elm_win_iconified_get(data); | ||
67 | elm_win_iconified_set(data, !flag); | ||
68 | } | ||
69 | |||
70 | static void | ||
71 | _btn_rotation_cb(void *data, Evas_Object *obj, void *event) | ||
72 | { | ||
73 | int angle = elm_win_rotation_get(data); | ||
74 | angle = (angle + 90) % 360; | ||
75 | elm_win_rotation_set(data, angle); | ||
76 | } | ||
77 | |||
78 | static void | ||
79 | _btn_rotation_resize_cb(void *data, Evas_Object *obj, void *event) | ||
80 | { | ||
81 | int angle = elm_win_rotation_get(data); | ||
82 | angle = (angle + 90) % 360; | ||
83 | elm_win_rotation_with_resize_set(data, angle); | ||
84 | } | ||
85 | |||
86 | static void | ||
87 | _btn_sticky_cb(void *data, Evas_Object *obj, void *event) | ||
88 | { | ||
89 | Eina_Bool flag = elm_win_sticky_get(data); | ||
90 | elm_win_sticky_set(data, !flag); | ||
91 | } | ||
92 | |||
93 | static void | ||
94 | _yes_quit_cb(void *data, Evas_Object *obj, void *event) | ||
95 | { | ||
96 | elm_exit(); | ||
97 | } | ||
98 | |||
99 | static void | ||
100 | _no_quit_cb(void *data, Evas_Object *obj, void *event) | ||
101 | { | ||
102 | evas_object_del(data); | ||
103 | } | ||
104 | |||
105 | static void | ||
106 | _main_win_del_cb(void *data, Evas_Object *obj, void *event) | ||
107 | { | ||
108 | Evas_Object *msg, *box, *box2, *btn, *lbl, *sep; | ||
109 | |||
110 | msg = elm_notify_add(obj); | ||
111 | elm_notify_orient_set(msg, ELM_NOTIFY_ORIENT_CENTER); | ||
112 | elm_notify_allow_events_set(msg, EINA_FALSE); | ||
113 | evas_object_show(msg); | ||
114 | |||
115 | box = elm_box_add(obj); | ||
116 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
117 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
118 | elm_object_content_set(msg, box); | ||
119 | evas_object_show(box); | ||
120 | |||
121 | lbl = elm_label_add(obj); | ||
122 | elm_object_text_set(lbl, "Really want quit?"); | ||
123 | evas_object_size_hint_weight_set(lbl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
124 | evas_object_size_hint_align_set(lbl, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
125 | elm_box_pack_end(box, lbl); | ||
126 | evas_object_show(lbl); | ||
127 | |||
128 | sep = elm_separator_add(obj); | ||
129 | elm_separator_horizontal_set(sep, EINA_TRUE); | ||
130 | elm_box_pack_end(box, sep); | ||
131 | evas_object_show(sep); | ||
132 | |||
133 | box2 = elm_box_add(obj); | ||
134 | elm_box_horizontal_set(box2, EINA_TRUE); | ||
135 | evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, 0.0); | ||
136 | evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
137 | elm_box_pack_end(box, box2); | ||
138 | evas_object_show(box2); | ||
139 | |||
140 | btn = elm_button_add(obj); | ||
141 | elm_object_text_set(btn, "Yes"); | ||
142 | elm_box_pack_end(box2, btn); | ||
143 | evas_object_show(btn); | ||
144 | |||
145 | evas_object_smart_callback_add(btn, "clicked", _yes_quit_cb, NULL); | ||
146 | |||
147 | btn = elm_button_add(obj); | ||
148 | elm_object_text_set(btn, "No"); | ||
149 | elm_box_pack_end(box2, btn); | ||
150 | evas_object_show(btn); | ||
151 | |||
152 | evas_object_smart_callback_add(btn, "clicked", _no_quit_cb, msg); | ||
153 | } | ||
154 | |||
155 | static void | ||
156 | _force_focus_cb(void *data, Evas_Object *obj, void *event) | ||
157 | { | ||
158 | #ifdef HAVE_ELEMENTARY_X | ||
159 | Ecore_X_Window xwin = elm_win_xwindow_get(data); | ||
160 | ecore_x_window_focus(xwin); | ||
161 | #endif | ||
162 | } | ||
163 | |||
164 | static void | ||
165 | _win_focused_cb(void *data, Evas_Object *obj, void *event) | ||
166 | { | ||
167 | const char *name = data; | ||
168 | printf("Window focused: %s\n", name); | ||
169 | } | ||
170 | |||
171 | EAPI_MAIN int | ||
172 | elm_main(int argc, char *argv[]) | ||
173 | { | ||
174 | Evas_Object *win, *win2, *bg, *bigbox, *box, *btn, *o; | ||
175 | char buf[256]; | ||
176 | |||
177 | elm_app_info_set(elm_main, "elementary", "images/logo.png"); | ||
178 | win = elm_win_add(NULL, "win-example", ELM_WIN_BASIC); | ||
179 | elm_win_title_set(win, "Elm_Win Example"); | ||
180 | elm_win_focus_highlight_enabled_set(win, EINA_TRUE); | ||
181 | evas_object_resize(win, 400, 400); | ||
182 | evas_object_show(win); | ||
183 | |||
184 | evas_object_smart_callback_add(win, "focus,in", _win_focused_cb, "mainwin"); | ||
185 | |||
186 | evas_object_smart_callback_add(win, "delete,request", _main_win_del_cb, | ||
187 | NULL); | ||
188 | |||
189 | bg = elm_bg_add(win); | ||
190 | evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
191 | elm_win_resize_object_add(win, bg); | ||
192 | evas_object_show(bg); | ||
193 | |||
194 | bigbox = elm_box_add(win); | ||
195 | elm_box_horizontal_set(bigbox, EINA_TRUE); | ||
196 | evas_object_size_hint_weight_set(bigbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
197 | elm_win_resize_object_add(win, bigbox); | ||
198 | evas_object_show(bigbox); | ||
199 | |||
200 | box = elm_box_add(win); | ||
201 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
202 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
203 | elm_box_pack_end(bigbox, box); | ||
204 | evas_object_show(box); | ||
205 | |||
206 | win2 = elm_win_add(NULL, "sub-win-example", ELM_WIN_DIALOG_BASIC); | ||
207 | elm_win_autodel_set(win2, EINA_TRUE); | ||
208 | elm_win_title_set(win2, "Managed window"); | ||
209 | evas_object_show(win2); | ||
210 | |||
211 | evas_object_smart_callback_add(win2, "focus,in", _win_focused_cb, "managed"); | ||
212 | |||
213 | o = elm_icon_add(win2); | ||
214 | sprintf(buf, "%s/images/logo.png", elm_app_data_dir_get()); | ||
215 | elm_icon_file_set(o, buf, NULL); | ||
216 | elm_icon_resizable_set(o, 0, 0); | ||
217 | elm_icon_no_scale_set(o, EINA_TRUE); | ||
218 | elm_win_resize_object_add(win2, o); | ||
219 | evas_object_show(o); | ||
220 | |||
221 | o = elm_label_add(win); | ||
222 | elm_object_text_set(o, "<b>Managed Window</b>"); | ||
223 | elm_box_pack_end(box, o); | ||
224 | evas_object_show(o); | ||
225 | |||
226 | #define WIN_ACTION(name) \ | ||
227 | do { \ | ||
228 | btn = elm_button_add(win); \ | ||
229 | elm_object_text_set(btn, #name); \ | ||
230 | elm_box_pack_end(box, btn); \ | ||
231 | evas_object_show(btn); \ | ||
232 | evas_object_smart_callback_add(btn, "clicked", _btn_##name##_cb, win2); \ | ||
233 | } while (0) | ||
234 | |||
235 | WIN_ACTION(activate); | ||
236 | WIN_ACTION(lower); | ||
237 | WIN_ACTION(raise); | ||
238 | WIN_ACTION(borderless); | ||
239 | WIN_ACTION(shaped); | ||
240 | WIN_ACTION(alpha); | ||
241 | WIN_ACTION(fullscreen); | ||
242 | WIN_ACTION(maximized); | ||
243 | WIN_ACTION(iconified); | ||
244 | WIN_ACTION(rotation); | ||
245 | WIN_ACTION(rotation_resize); | ||
246 | WIN_ACTION(sticky); | ||
247 | |||
248 | box = elm_box_add(win); | ||
249 | evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
250 | evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
251 | elm_box_pack_end(bigbox, box); | ||
252 | evas_object_show(box); | ||
253 | |||
254 | win2 = elm_win_add(NULL, "sub-win-example2", ELM_WIN_BASIC); | ||
255 | elm_win_autodel_set(win2, EINA_TRUE); | ||
256 | elm_win_title_set(win2, "Non-managed window"); | ||
257 | elm_win_override_set(win2, EINA_TRUE); | ||
258 | evas_object_show(win2); | ||
259 | |||
260 | evas_object_smart_callback_add(win2, "focus,in", _win_focused_cb, | ||
261 | "override"); | ||
262 | |||
263 | o = elm_bg_add(win2); | ||
264 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
265 | elm_win_resize_object_add(win2, o); | ||
266 | evas_object_show(o); | ||
267 | |||
268 | bigbox = elm_box_add(win2); | ||
269 | evas_object_size_hint_weight_set(bigbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | ||
270 | elm_win_resize_object_add(win2, bigbox); | ||
271 | evas_object_show(bigbox); | ||
272 | |||
273 | o = elm_label_add(win2); | ||
274 | elm_object_text_set(o, "This window should have no borders or titlebar.<ps>" | ||
275 | "It was set in override mode, so the Window Manager<ps>" | ||
276 | "should ignore everything about it.<ps>" | ||
277 | "It's up to the program to handle it properly, and some" | ||
278 | "of the actions performed on it may not have any effect." | ||
279 | ); | ||
280 | elm_box_pack_end(bigbox, o); | ||
281 | evas_object_show(o); | ||
282 | |||
283 | o = elm_entry_add(win2); | ||
284 | elm_object_text_set(o, "See if you can focus me"); | ||
285 | elm_entry_single_line_set(o, EINA_TRUE); | ||
286 | elm_entry_scrollable_set(o, EINA_TRUE); | ||
287 | evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); | ||
288 | evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); | ||
289 | elm_box_pack_end(bigbox, o); | ||
290 | evas_object_show(o); | ||
291 | |||
292 | o = elm_separator_add(win2); | ||
293 | elm_separator_horizontal_set(o, EINA_TRUE); | ||
294 | elm_box_pack_end(bigbox, o); | ||
295 | evas_object_show(o); | ||
296 | |||
297 | o = elm_button_add(win2); | ||
298 | elm_object_text_set(o, "Focus me"); | ||
299 | elm_box_pack_end(bigbox, o); | ||
300 | evas_object_show(o); | ||
301 | |||
302 | evas_object_smart_callback_add(o, "clicked", _force_focus_cb, win2); | ||
303 | |||
304 | o = elm_label_add(win); | ||
305 | elm_object_text_set(o, "<b>Override Window</b>"); | ||
306 | elm_box_pack_end(box, o); | ||
307 | evas_object_show(o); | ||
308 | |||
309 | WIN_ACTION(activate); | ||
310 | WIN_ACTION(lower); | ||
311 | WIN_ACTION(raise); | ||
312 | WIN_ACTION(borderless); | ||
313 | WIN_ACTION(shaped); | ||
314 | WIN_ACTION(alpha); | ||
315 | WIN_ACTION(fullscreen); | ||
316 | WIN_ACTION(maximized); | ||
317 | WIN_ACTION(iconified); | ||
318 | WIN_ACTION(rotation); | ||
319 | WIN_ACTION(rotation_resize); | ||
320 | WIN_ACTION(sticky); | ||
321 | |||
322 | elm_run(); | ||
323 | elm_shutdown(); | ||
324 | |||
325 | return 0; | ||
326 | } | ||
327 | ELM_MAIN() | ||