Download presentation
Presentation is loading. Please wait.
1
Efl을 이용한 타이젠 네이티브 웨어러블 앱 만들기
박진솔
2
소개 박진솔 EFL 한국 커뮤니티 운영진 삼성전자 Tizen Platform – UIFW, TV Profile
3
목차 EFL? EFL 한국 커뮤니티 TIZEN? SDK 설치 프로젝트 만들어 보기 샘플코드 개발이 막힐 때
4
efl? No!!!!! Executable and Linkable Format
Enlightenment Foundation Library Window Manager Unity, Gnome shell , Lxde, Xfce, KDE etc…
5
efl?
6
efl 한국 커뮤니티 https://www.facebook.com/enlightenment.or.kr
7
TIZEN Linux Foundation Project Mobile – Native/Web
Samsung Electronics, Intel, etc... Profile - Mobile, Wearable, TV, IVI, etc TV - Native not support Smart TV Mobile – Native/Web Samsung Z, Z3 Wearable – Native/Web Samsung Gear, Gear2, Gear S, Gear S2
8
Tizen
9
Tizen
10
Tizen
11
Tizen sdk Tizen.org SDK Eclipse base Repo – Git 지원 OS
Gerrit (Git review system) GBS (Git Build System) 지원 OS Ubuntu Windows Mac Tizen Platform 최신버전은 2.4
12
Tizen sdk
13
TIZEN SDK Wearable Profile latest version 2.3.1
14
TIZEN SDK
15
Emulator create
16
Project create Tizen Native Project
17
Project create Basic UI Hello Tizen!
18
Project create Template - Basic UI
19
basic ui에서 하는일 - 초기화 int main(int argc, char *argv[]) { event_callback.create = app_create; event_callback.terminate = app_terminate; event_callback.pause = app_pause; event_callback.resume = app_resume; event_callback.app_control = app_control; ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_orient_changed, &ad); ret = ui_app_main(argc, argv, &event_callback, &ad); return ret; }
20
basic ui에서 하는일 - 핸들러 event_callback.create = app_create;
static bool app_create(void *data) { /* Hook to take necessary actions before main event loop starts Initialize UI resources and application's data If this function returns true, the main loop of application starts If this function returns false, the application is terminated */ appdata_s *ad = data; create_base_gui(ad); return true; } event_callback.create = app_create;
21
basic ui에서 하는일 – 화면 구성 static void create_base_gui(appdata_s *ad) { /* Window create */ ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE); if (elm_win_wm_rotation_supported_get(ad->win)) { int rots[4] = { 0, 90, 180, 270 }; elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4);
22
basic ui에서 하는일 – 화면 구성 static void create_base_gui(appdata_s *ad) { evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL); eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad);
23
basic ui에서 하는일 – 화면 구성 static void create_base_gui(appdata_s *ad) { /* Label */ ad->label = elm_label_add(ad->conform); elm_object_text_set(ad->label, "<align=center>Hello Tizen</align>"); evas_object_size_hint_weight_set(ad->label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_object_content_set(ad->conform, ad->label); /* Show window after base gui is set up */ evas_object_show(ad->win); }
24
run
25
run
26
run
27
Project create Basic UI UI Builder Watch Widget Service Lib
28
UI Builder
29
widget
30
UI Builder
31
UI Builder
32
gear watch designer 간단한 Watch face를 만들고 싶을때는..
33
watch app - 초기화 int main(int argc, char *argv[]) { event_callback.create = app_create; event_callback.terminate = app_terminate; event_callback.pause = app_pause; event_callback.resume = app_resume; event_callback.app_control = app_control; event_callback.time_tick = app_time_tick; event_callback.ambient_tick = app_ambient_tick; event_callback.ambient_changed = app_ambient_changed; ret = watch_app_main(argc, argv, &event_callback, &ad); return ret; }
34
watch app - UI구성 static void create_base_gui(appdata_s *ad, int width, int height) { /* Window */ ret = watch_app_get_elm_win(&ad->win); evas_object_resize(ad->win, width, height); /* Label*/ ad->label = elm_label_add(ad->conform); evas_object_resize(ad->label, width, height / 3); evas_object_move(ad->label, 0, height / 3); ret = watch_time_get_current_time(&watch_time); update_watch(ad, watch_time, 0); }
35
watch app – ambient mode
36
watch app – 시간이 지나가면 static void app_time_tick(watch_time_h watch_time, void *data) { /* Called at each second while your app is visible. Update watch UI. */ appdata_s *ad = data; update_watch(ad, watch_time, 0); } static void app_ambient_tick(watch_time_h watch_time, void *data) /* Called at each minute while the device is in ambient mode. Update watch UI. */ update_watch(ad, watch_time, 1);
37
watch app - UI구성 static void update_watch(appdata_s *ad, watch_time_h watch_time, int ambient) { char watch_text[TEXT_BUF_SIZE]; int hour24, minute, second; watch_time_get_hour24(watch_time, &hour24); watch_time_get_minute(watch_time, &minute); watch_time_get_second(watch_time, &second); if (!ambient) snprintf(watch_text, TEXT_BUF_SIZE, "<align=center>Hello Watch<br/>%02d:%02d:%02d</align>", hour24, minute, second); else snprintf(watch_text, TEXT_BUF_SIZE, "<align=center>Hello Watch<br/>%02d:%02d</align>", hour24, minute); elm_object_text_set(ad->label, watch_text); }
38
sample code
39
guide
40
하다가 막히면!?
41
하다가 막히면!? Tizen.rog Forum에 질문
42
하다가 막히면!?
43
질문/답변
44
감사합니다. EFL 한국 커뮤니티
Similar presentations