프로그래밍/Tizen

[EFL] 기본 윈도우

chance 2014. 7. 13. 16:25

* 메인루프

elm_run() : 메인 루프 시작

 ecore_main_loop_begin() 을 호출


elm_exit() : 메인루프 종료

 ecore_main_loop_quit()


* ELM_MAIN();

 엔트리 포인트인 main 함수 매크로

 elm_init(), elm_main( int argc, char **argv); 을 호출.

 elm_main이 사용자의 엔트리 포인트가 되므로 구현.



* 윈도우 만들기

Evas_Object *win;


1. 일반적인 윈도우 생성

win = elm_win_add( NULL, "name", ELM_WIN_BASIC);

elm_win_title_set(win, "window title" );

Evas_Object* bg = elm_bg_add( win );

elm_bg_color_set( bg, 255, 255, 255 );

elm_win_resize_object_add( win, bg );

evas_object_show(bg);



2. 유틸리티를 사용한 윈도우 생성

win = elm_win_util_standard_add( "name", "window title" );



3. 기타 오브젝트 설정 메쏘드

void evas_object_move( Evas_Object *obj, Evas_Coord x, Evas_Coord y );

void evas_object_resize( Evas_Object *obj, Evas_Coord w, Evas_Coord h );


void evas_object_show( Evas_Object *obj );

void evas_object_hide( Evas_Object *obj );



4. 콜백 설정 메쏘드

기본 evas 오브젝트 콜백

void evas_object_event_callback_add(

Evas_Object *obj,

Evas_Callback_Type type,

Evas_Object_Event_Cb func,

const void *data );


void (* Evas_Object_Event_Cb) ( void *data, Evas *e, Evas_Object *obj, void *event_info);


그외의 오브젝트 콜백

void evas_object_smart_callback_add( 

Evas_Object *obj, 

const char *event, 

Evas_Smart_Cb func,

const void *data );


void(* Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info);