Difference between revisions of "EFL"
From ArmadeusWiki
m (→Simple test) |
|||
Line 1: | Line 1: | ||
− | |||
What is it ? | What is it ? | ||
http://en.wikipedia.org/wiki/Enlightenment_Foundation_Libraries | http://en.wikipedia.org/wiki/Enlightenment_Foundation_Libraries | ||
Line 6: | Line 5: | ||
== Simple test == | == Simple test == | ||
− | [[Image:080120_160232.jpg]] | + | [[Image:080120_160232.jpg|thumb|]]<br> |
A test using Evas and Ecore and Evas_Ecore | A test using Evas and Ecore and Evas_Ecore |
Revision as of 12:38, 22 January 2008
What is it ? http://en.wikipedia.org/wiki/Enlightenment_Foundation_Libraries
Simple test
A test using Evas and Ecore and Evas_Ecore
The source of the above example :
#include <stdio.h> #include <Ecore_Evas.h> #include <Ecore.h> #define WIDTH 320 #define HEIGHT 240 Ecore_Evas * ee; Evas * evas; Evas_Object * base_rect; Evas_Object * base_rect_sec; Evas_Object * img; int main(){ evas_init(); ecore_init(); //ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, WIDTH, HEIGHT); // When you test on your host computer ee = ecore_evas_fb_new(NULL, 270, WIDTH, HEIGHT); //When you will run it on the board ecore_evas_show(ee); evas = ecore_evas_get(ee); base_rect = evas_object_rectangle_add(evas);//This is the red rectangle evas_object_resize(base_rect, WIDTH, HEIGHT-100); evas_object_color_set(base_rect, 255, 0, 0, 25); evas_object_show(base_rect); base_rect_sec = evas_object_rectangle_add(evas);//This is the blue rectangle evas_object_resize(base_rect_sec, WIDTH-200, HEIGHT); evas_object_color_set(base_rect_sec, 0, 0, 255, 25); evas_object_show(base_rect_sec); img = evas_object_image_add(evas);//This is the png evas_object_image_file_set(img, "e_logo.png", NULL); evas_object_resize(img, 241, 195); evas_object_image_fill_set(img, 0, 0, 241, 195); evas_object_layer_set(img, -999); evas_object_show(img); ecore_main_loop_begin(); return 0; }
As you can see, there is no "Violet" rectangle !