Hello people.

I am trying to get involved in EFL programming.
But i am having a problem with resizing my application.
The tutorial that i am reading say nothing about it and i can not find
other people having the same problem on google.

This is the problem:

I made a basic Edje application and i expect it to resize when i
manually resize the window, but instead, a black background is drawn.

This is the app:

#include <Ecore_Evas.h>
#include <Ecore.h>
#include <Edje.h>

#define WIDTH 400
#define HEIGHT 400


// Declaraciones
int app_signal_exit(void *data, int type, void *event);

// GLOBALS
Ecore_Evas  *   ee;
Evas        *   evas;
Evas_Object *   edje;

Evas_Coord   edje_w, edje_h;


int main(int argv, char *argc[])
{
        ecore_init();
        ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, app_signal_exit, NULL);


        ecore_evas_init();

   ee = ecore_evas_software_x11_new(NULL, 0,  0, 0, WIDTH, HEIGHT);
        ecore_evas_title_set(ee, "EDJE example");
        ecore_evas_borderless_set(ee, 0);
        ecore_evas_shaped_set(ee, 0);
        //ecore_evas_show(ee);


   evas = ecore_evas_get(ee);
        //evas_font_path_append(evas, "edje/fonts/");

        edje_init();
   edje = edje_object_add(evas);
        edje_object_file_set(edje, "edje/XXX.edj", "test");
        evas_object_move(edje, 0, 0);
        edje_object_size_min_get(edje, &edje_w, &edje_h);
        if ( edje_w <= 10 )
            edje_w = WIDTH;
        if ( edje_h <= 10 )
            edje_h = HEIGHT;
        evas_object_resize(edje, edje_w, edje_h);
        evas_object_show(edje);

        ecore_evas_resize(ee, (int)edje_w, (int)edje_h);
        ecore_evas_show(ee);

        /* Insert Objects and callbacks here */

        ecore_main_loop_begin();

        return 0;
}


int app_signal_exit(void *data, int type, void *event){

        printf("DEBUG: Exit called, shutting down\n");
        ecore_main_loop_quit();
        return 1;
}




and XXX.edc


collections {
    group {
        name: "test";
        parts {
            part {
                name: "box-red";
                type: RECT;
                mouse_events: 0;
                description {
                   state: "default" 0.0;
                   color: 255 0 0 255;
                   rel1 {
                      relative: 0.0 0.0;
                      offset: 0 0;
                   }
                   rel2 {
                      relative: 0.5 0.5;
                      offset: 0 0;
                   }
                }
            }
            part {
                name: "box-blue";
                type: RECT;
                mouse_events: 0;
                description {
                    state: "default" 0.0;
                    color: 0 0 255 255;
                    rel1 {
                        relative: 1.0 1.0;
                        offset: 0 0;
                        to: "box-red";
                    }
                    rel2 {
                        relative: 1.0 1.0;
                        offset: 0 0;
                    }
                }
            }
        }
    }
}

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to