-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all, finally i'm able to test my EFL code under my ARM-based devel
board. My target is to be able to have a crosscc edje, therefore i've
started at the bottom, in order eet, evas, ecore and finally edje.
cross-eet works well, my problem is evas. I wrote a simple app (see
main.c attached) with a lot of printf for debugging (at this moment i
haven't gdbserver working on target, damn), and here's a cut&paste from
my target console when i run my app.

/sbin # sb_evas1
Evas inizializzato.
Evas canvas istanziato.
Engine disponibili:
fb
buffer
Framebuffer disponibile.
Output method: 1
Step1 !
Segmentation fault

Looking in the code, it seems that the segfault happens at
evas_output_method_set(evas, output_method)

Can anyone help me? 

TIA

Massi
- -- 
Massimiliano Calamelli
http://mcalamelli.netsons.org
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFF+CAWleGEL56NNP4RAgcOAKC5vjVmBQr7zIgDVAFiU186rhoEZACfaEnp
lep70T9fCn+ZOu8rEpvCe7g=
=Ik3L
-----END PGP SIGNATURE-----
#include <stdlib.h>
#include <stdio.h>
#include <Evas.h>
#include <Evas_Engine_FB.h>

int main (int argc, char **argv) {
    Evas *evas;
    Evas_List *engine_list, *l;
    Evas_Object *line1, *line2, *line3, *line4;
    
    int rot = 0;
    int output_method = 0;
    
    if (!evas_init()) {
        printf("Impossibile inizializzare Evas.\n");
        return -1;
    }
    printf("Evas inizializzato.\n");    
        
    evas = evas_new();
    if (!evas) {
        printf("Impossibile istanziare Evas canvas.\n");
        return -1;
    }
    printf("Evas canvas istanziato.\n");    
    
    engine_list = evas_render_method_list();
    if (!engine_list) {
        fprintf(stderr, "Nessun engines supportato.\n");
        exit(-1);
    }
    printf("Engine disponibili:\n");
    for (l = engine_list; l; l = l->next) {
        char *engine_name;

        engine_name = l->data;
        printf("%s\n", engine_name);
    }
    evas_render_method_list_free(engine_list);    
    
    output_method = evas_render_method_lookup("fb");
    
    if (output_method == 0) {
        printf("Framebuffer non disponibile.\n");
        return -1;
    }
    printf("Framebuffer disponibile.\n");
    
    printf("Output method: %d\n", output_method);
    printf("Step1 !\n");
    evas_output_method_set(evas, output_method);
    printf("Step2 !\n");
    evas_output_size_set(evas, 640, 480);
    printf("Step3 !\n");
    evas_output_viewport_set(evas, 0, 0, 640, 480);
    printf("Step4 !\n"); 

    Evas_Engine_Info_FB *einfo;
    einfo = (Evas_Engine_Info_FB *) evas_engine_info_get(evas);
    if (!einfo) {
        printf("Errore nelle info dell'engine.\n");
        return -1;
    }
    printf("Info sull'engine OK.\n");    
    einfo->info.virtual_terminal = 0;
    einfo->info.device_number = 0;
    einfo->info.refresh = 0;
    einfo->info.rotation = rot;
    evas_engine_info_set(evas, (Evas_Engine_Info *) einfo);
    
    line1 = evas_object_line_add(evas);
    evas_object_color_set(line1, 255, 255, 0, 0);
    line2 = evas_object_line_add(evas);
    evas_object_color_set(line2, 255, 255, 0, 0);
    line3 = evas_object_line_add(evas);
    evas_object_color_set(line3, 255, 255, 0, 0);
    line4 = evas_object_line_add(evas);
    evas_object_color_set(line4, 255, 255, 0, 0);            
    
    evas_object_line_xy_set(line1, 10, 10, 630, 10);
    evas_object_line_xy_set(line2, 630, 10, 630, 470);
    evas_object_line_xy_set(line3, 10, 470, 630, 470);
    evas_object_line_xy_set(line4, 10, 10, 10, 470);
    
    evas_object_show(line1);
    evas_object_show(line2);
    evas_object_show(line3);
    evas_object_show(line4);
    
    evas_render(evas);
    
    evas_shutdown();    
    return 0;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to