#include <Elementary.h>
struct info
{
double x, y;
};
static void
{
double t = 0.0;
for (;;)
{
struct info *inf = malloc(sizeof(struct info));
if (inf)
{
inf->x = 200 + (200 * sin(t));
inf->y = 200 + (200 * cos(t));
}
usleep(1000);
t += 0.02;
}
}
static void
th_feedback(
void *data EINA_UNUSED,
Ecore_Thread *th EINA_UNUSED,
void *msg)
{
struct info *inf = msg;
evas_object_move(rect, inf->x - 50, inf->y - 50);
free(inf);
}
static void th_end(
void *data EINA_UNUSED,
Ecore_Thread *th EINA_UNUSED) { printf(
"thread ended\n"); }
static void th_cancel(
void *data EINA_UNUSED,
Ecore_Thread *th EINA_UNUSED) { printf(
"thread cancelled\n"); }
static void
down(
void *data EINA_UNUSED,
Evas *e EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
thr = NULL;
}
static void
del(
void *data EINA_UNUSED,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
thr = NULL;
}
EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
evas_object_resize(o, 100, 100);
rect = o;
NULL, EINA_TRUE);
evas_object_resize(win, 400, 400);
return 0;
}