Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
EFL을이용한타이젠네이티브웨어러블앱만들기
EFL 한국커뮤니티
박진솔
목차
EFL?
EFL 한국커뮤니티
TIZEN?
SDK 설치
프로젝트만들어보기
샘플코드
개발이막힐때
EFL?
No!!!!! Executable and Linkable Format
Enlightenment Foundation Library
Window Manager Unity, Gnome shell , Lxde, Xfce, KDE etc…
https://www.enlightenment.org
EFL?
EFL한국커뮤니티
https://www.facebook.com/enlightenment.or.kr
http://efl.or.kr
TIZEN
Linux Foundation Project 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
TIZEN
TIZEN
TIZEN
TIZEN SDK
Tizen.org
SDK Eclipse base
Repo –Git Gerrit (Git review system) GBS (Git Build System)
지원OS Ubuntu Windows Mac
Tizen Platform최신버전은 2.4
http://tizen.org
TIZEN SDK
TIZEN SDK
Wearable Profile
latest version 2.3.1
TIZEN SDK
EMULATOR CREATE
PROJECT CREATE
Tizen Native Project
PROJECT CREATE
Basic UI
Hello Tizen!
PROJECT CREATE
Template - Basic UI
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;
}
BASIC UI에서하는일 -핸들러
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;
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);
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);
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);
}
RUN
RUN
RUN
PROJECT CREATE
Basic UI
UI Builder
Watch
Widget
Service
Lib
Widget
UI BUILDER
WIDGET
UI BUILDER
UI BUILDER
GEAR WATCH DESIGNER
http://developer.samsung.com/gear/design/watch-designer
간단한Watch face를만들고싶을때는..
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;
}
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);
}
WATCH APP – AMBIENT MODE
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. */
appdata_s *ad = data;
update_watch(ad, watch_time, 1);
}
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);
}
SAMPLE CODE
GUIDE
https://developer.tizen.org/ko/development/getting-started/native-application
하다가막히면!?
Tizen.rog
Forum에질문
하다가막히면!?
질문/답변
감사합니다.
EFL 한국커뮤니티
http://efl.or.kr