2017-11-15 02:55:04 -08:00
|
|
|
#define EFL_BETA_API_SUPPORT 1
|
2017-11-07 09:35:34 -08:00
|
|
|
|
2017-11-15 02:55:04 -08:00
|
|
|
#include <Eina.h>
|
2017-11-15 10:22:44 -08:00
|
|
|
#include <Efl_Core.h>
|
2017-11-15 02:55:04 -08:00
|
|
|
#include "example_rectangle.eo.h"
|
|
|
|
|
|
|
|
Example_Rectangle *
|
2017-11-07 09:35:34 -08:00
|
|
|
_rect_create()
|
|
|
|
{
|
|
|
|
Example_Rectangle *rectangle;
|
|
|
|
|
2018-05-25 10:17:51 -07:00
|
|
|
rectangle = efl_new(EXAMPLE_RECTANGLE_CLASS,
|
2017-11-07 09:35:34 -08:00
|
|
|
efl_name_set(efl_added, "Rectangle"),
|
|
|
|
example_rectangle_width_set(efl_added, 5),
|
|
|
|
example_rectangle_height_set(efl_added, 10));
|
|
|
|
|
|
|
|
return rectangle;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI_MAIN void
|
|
|
|
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
|
|
|
{
|
2017-11-15 02:55:04 -08:00
|
|
|
Eo *rectangle;
|
2017-11-07 09:35:34 -08:00
|
|
|
|
2017-11-15 02:55:04 -08:00
|
|
|
rectangle = _rect_create();
|
2017-11-07 09:35:34 -08:00
|
|
|
|
2017-11-15 02:55:04 -08:00
|
|
|
printf("Rectangle is %dx%d, area is %d\n",
|
|
|
|
example_rectangle_width_get(rectangle),
|
|
|
|
example_rectangle_height_get(rectangle),
|
|
|
|
example_rectangle_area(rectangle));
|
2017-11-07 09:35:34 -08:00
|
|
|
|
2017-11-16 09:37:57 -08:00
|
|
|
efl_unref(rectangle);
|
|
|
|
|
2017-11-07 09:35:34 -08:00
|
|
|
efl_exit(0);
|
|
|
|
}
|
|
|
|
EFL_MAIN()
|
|
|
|
|