개발

[EFL] 3. Simple Application using Evas.

소혼 2011. 3. 16. 21:54
반응형

EFL의 가장 기본 구조인 Evas library만으로 이루어진 간단한 어플리케이션을 만들어 보았습니다.


컴파일은 아래와 같이 하면 됩니다.
gcc -c simple simple.c `pkg-config --cflags --libs evas ecore-evas`

#include <Evas.h>
#include <Ecore_Evas.h>
#include <stdio.h>

int main()
{
    Evas* evas;
    Ecore_Evas* window;
    Evas_Object* rect2;

    evas_init();
    ecore_init();
    ecore_evas_init();

    window = ecore_evas_new(NULL, 0, 0, 800, 600, NULL);
    evas = ecore_evas_get(window);
    ecore_evas_show(window);

    rect2 = evas_object_rectangle_add(evas);
    evas_object_color_set(rect2, 255, 0, 0,255);
    evas_object_move(rect2, 100, 100);
    evas_object_resize(rect2, 200, 200);
    evas_object_show(rect2);

    ecore_main_loop_begin();

    ecore_evas_shutdown();
    ecore_shutdown();
    evas_shutdown();

    return 0;
}

Evas는 Ecore와 더불에 EFL의 가장 중요한 라이브러리입니다. 
반응형

'개발' 카테고리의 다른 글

Chrome Build on Ubuntu Linux  (0) 2011.04.01
Firefox 4.0 공식 릴리즈  (0) 2011.03.23
[EFL/Eina] eina_unicode 예제.  (0) 2011.03.09
[SKIA] SkHello  (0) 2011.02.09
[GLIB] GString 예제  (0) 2010.10.28