forked from enlightenment/efl
testing the edje message queue.. revealed.... problems... and.. now....
FIXES! :) SVN revision: 12419
This commit is contained in:
parent
5d5a4b4551
commit
bec1a34a8e
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
exec edje_cc -v -fd ./test/fonts -id ./images src/edje_test.edc edje_test.eet
|
|
@ -114,9 +114,9 @@ enum Msg_Type
|
||||||
MSG_INT_SET = 6,
|
MSG_INT_SET = 6,
|
||||||
MSG_FLOAT_SET = 7,
|
MSG_FLOAT_SET = 7,
|
||||||
MSG_STRING_INT = 8,
|
MSG_STRING_INT = 8,
|
||||||
MSG_INT_FLOAT = 9,
|
MSG_STRING_FLOAT = 9,
|
||||||
MSG_STRING_INT_SET = 10,
|
MSG_STRING_INT_SET = 10,
|
||||||
MSG_INT_FLOAT_SET = 11
|
MSG_STRING_FLOAT_SET = 11
|
||||||
};
|
};
|
||||||
|
|
||||||
native send_message(Msg_Type:type, id, ...);
|
native send_message(Msg_Type:type, id, ...);
|
||||||
|
|
|
@ -0,0 +1,279 @@
|
||||||
|
fonts {
|
||||||
|
font: "Vera.ttf" "Vera";
|
||||||
|
}
|
||||||
|
images {
|
||||||
|
image: "bg.png" LOSSY 95;
|
||||||
|
image: "e.png" LOSSY 95;
|
||||||
|
}
|
||||||
|
|
||||||
|
collections {
|
||||||
|
group {
|
||||||
|
name: "test";
|
||||||
|
script {
|
||||||
|
public message(Msg_Type:type, id, ...) {
|
||||||
|
if (type == MSG_NONE)
|
||||||
|
{
|
||||||
|
new buf[100];
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "ID: %i", id);
|
||||||
|
emit("MESSAGE NONE", buf);
|
||||||
|
send_message(type, id + 1000);
|
||||||
|
}
|
||||||
|
else if (type == MSG_STRING)
|
||||||
|
{
|
||||||
|
new str[100];
|
||||||
|
new buf[100];
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE STRING ID: %i", id);
|
||||||
|
for (new j = 0; j < (sizeof(str) - 1); j++)
|
||||||
|
{
|
||||||
|
str[j] = getarg(2, j);
|
||||||
|
if (str[j] == 0) break;
|
||||||
|
}
|
||||||
|
emit(buf, str);
|
||||||
|
send_message(type, id + 1000, "A Test Reply");
|
||||||
|
}
|
||||||
|
else if (type == MSG_INT)
|
||||||
|
{
|
||||||
|
new str[100];
|
||||||
|
new buf[100];
|
||||||
|
new val;
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE INT ID: %i", id);
|
||||||
|
val = getarg(2);
|
||||||
|
snprintf(str, sizeof(str), "V = %i", val);
|
||||||
|
emit(buf, str);
|
||||||
|
send_message(type, id + 1000, 987);
|
||||||
|
}
|
||||||
|
else if (type == MSG_FLOAT)
|
||||||
|
{
|
||||||
|
new str[100];
|
||||||
|
new buf[100];
|
||||||
|
new Float:val;
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE FLOAT ID: %i", id);
|
||||||
|
val = getfarg(2);
|
||||||
|
snprintf(str, sizeof(str), "V = %f", val);
|
||||||
|
emit(buf, str);
|
||||||
|
send_message(type, id + 1000, 3.14159);
|
||||||
|
}
|
||||||
|
else if (type == MSG_STRING_SET)
|
||||||
|
{
|
||||||
|
new str[100];
|
||||||
|
new buf[100];
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE STRING SET ID: %i", id);
|
||||||
|
for (new i = 2; i < numargs(); i++)
|
||||||
|
{
|
||||||
|
for (new j = 0; j < (sizeof(str) - 1); j++)
|
||||||
|
{
|
||||||
|
str[j] = getarg(i, j);
|
||||||
|
if (str[j] == 0) break;
|
||||||
|
}
|
||||||
|
emit(buf, str);
|
||||||
|
}
|
||||||
|
send_message(type, id + 1000, "Alpha", "Beta", "Gamma", "Delta");
|
||||||
|
}
|
||||||
|
else if (type == MSG_INT_SET)
|
||||||
|
{
|
||||||
|
new buf[100];
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE INT SET ID: %i", id);
|
||||||
|
for (new i = 2; i < numargs(); i++)
|
||||||
|
{
|
||||||
|
new val;
|
||||||
|
new str[100];
|
||||||
|
|
||||||
|
val = getarg(i);
|
||||||
|
snprintf(str, sizeof(str), "V = %i", val);
|
||||||
|
emit(buf, str);
|
||||||
|
}
|
||||||
|
send_message(type, id + 1000, 1, 2, 3, 4);
|
||||||
|
}
|
||||||
|
else if (type == MSG_FLOAT_SET)
|
||||||
|
{
|
||||||
|
new buf[100];
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE FLOAT SET ID: %i", id);
|
||||||
|
for (new i = 2; i < numargs(); i++)
|
||||||
|
{
|
||||||
|
new Float:val;
|
||||||
|
new str[100];
|
||||||
|
|
||||||
|
val = getfarg(i);
|
||||||
|
snprintf(str, sizeof(str), "V = %f", val);
|
||||||
|
emit(buf, str);
|
||||||
|
}
|
||||||
|
send_message(type, id + 1000, 0.1, 0.2, 0.3, 0.4);
|
||||||
|
}
|
||||||
|
else if (type == MSG_STRING_INT)
|
||||||
|
{
|
||||||
|
new str[100];
|
||||||
|
new buf[100];
|
||||||
|
new val;
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE STRING INT ID: %i", id);
|
||||||
|
for (new j = 0; j < (sizeof(str) - 1); j++)
|
||||||
|
{
|
||||||
|
str[j] = getarg(2, j);
|
||||||
|
if (str[j] == 0) break;
|
||||||
|
}
|
||||||
|
emit(buf, str);
|
||||||
|
val = getarg(3);
|
||||||
|
snprintf(str, sizeof(str), "V = %i", val);
|
||||||
|
emit(buf, str);
|
||||||
|
send_message(type, id + 1000, "Single Int Reply", 1234);
|
||||||
|
}
|
||||||
|
else if (type == MSG_STRING_FLOAT)
|
||||||
|
{
|
||||||
|
new str[100];
|
||||||
|
new buf[100];
|
||||||
|
new Float:val;
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE STRING INT ID: %i", id);
|
||||||
|
for (new j = 0; j < (sizeof(str) - 1); j++)
|
||||||
|
{
|
||||||
|
str[j] = getarg(2, j);
|
||||||
|
if (str[j] == 0) break;
|
||||||
|
}
|
||||||
|
emit(buf, str);
|
||||||
|
val = getfarg(3);
|
||||||
|
snprintf(str, sizeof(str), "V = %f", val);
|
||||||
|
emit(buf, str);
|
||||||
|
send_message(type, id + 1000, "Single Float Reply", 0.1234);
|
||||||
|
}
|
||||||
|
else if (type == MSG_STRING_INT_SET)
|
||||||
|
{
|
||||||
|
new str[100];
|
||||||
|
new buf[100];
|
||||||
|
new val;
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE STRING INT SET ID: %i", id);
|
||||||
|
for (new j = 0; j < (sizeof(str) - 1); j++)
|
||||||
|
{
|
||||||
|
str[j] = getarg(2, j);
|
||||||
|
if (str[j] == 0) break;
|
||||||
|
}
|
||||||
|
emit(buf, str);
|
||||||
|
for (new i = 3; i < numargs(); i++)
|
||||||
|
{
|
||||||
|
val = getarg(i);
|
||||||
|
snprintf(str, sizeof(str), "V = %i", val);
|
||||||
|
emit(buf, str);
|
||||||
|
}
|
||||||
|
send_message(type, id + 1000, "Four Ints Reply", 7, 6, 5, 4);
|
||||||
|
}
|
||||||
|
else if (type == MSG_STRING_FLOAT_SET)
|
||||||
|
{
|
||||||
|
new str[100];
|
||||||
|
new buf[100];
|
||||||
|
new Float:val;
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf), "MESSAGE STRING INT SET ID: %i", id);
|
||||||
|
for (new j = 0; j < (sizeof(str) - 1); j++)
|
||||||
|
{
|
||||||
|
str[j] = getarg(2, j);
|
||||||
|
if (str[j] == 0) break;
|
||||||
|
}
|
||||||
|
emit(buf, str);
|
||||||
|
for (new i = 3; i < numargs(); i++)
|
||||||
|
{
|
||||||
|
val = getfarg(i);
|
||||||
|
snprintf(str, sizeof(str), "V = %f", val);
|
||||||
|
emit(buf, str);
|
||||||
|
}
|
||||||
|
send_message(type, id + 1000, "Four Floats Reply", 1.7, 1.6, 1.5, 1.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parts {
|
||||||
|
part {
|
||||||
|
name: "background";
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
color_class: "bg";
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
offset: 0 0;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 1.0;
|
||||||
|
offset: -1 -1;
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "bg.png";
|
||||||
|
border: 12 12 12 12;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "text1";
|
||||||
|
type: TEXT;
|
||||||
|
effect: SOFT_SHADOW;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.0 0.0;
|
||||||
|
offset: 8 8;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 1.0 0.0;
|
||||||
|
offset: -9 20;
|
||||||
|
}
|
||||||
|
color: 255 255 255 255;
|
||||||
|
color3: 0 0 0 32;
|
||||||
|
text {
|
||||||
|
text: "Test String";
|
||||||
|
font: "Vera";
|
||||||
|
size: 10;
|
||||||
|
align: 0.0 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "logo";
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
min: 64 64;
|
||||||
|
max: 320 320;
|
||||||
|
aspect: 1.0 1.0;
|
||||||
|
rel1 {
|
||||||
|
relative: 0.4 0.4;
|
||||||
|
offset: 0 0;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative: 0.6 0.6;
|
||||||
|
offset: -1 -1;
|
||||||
|
}
|
||||||
|
image {
|
||||||
|
normal: "e.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
description {
|
||||||
|
state: "clicked" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
color: 255 255 255 128;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
programs {
|
||||||
|
program {
|
||||||
|
name: "logo_click";
|
||||||
|
signal: "mouse,down,1";
|
||||||
|
source: "logo";
|
||||||
|
action: STATE_SET "clicked" 0.0;
|
||||||
|
transition: LINEAR 0.0;
|
||||||
|
target: "logo";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "logo_unclick";
|
||||||
|
signal: "mouse,up,1";
|
||||||
|
source: "logo";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
transition: DECELERATE 0.25;
|
||||||
|
target: "logo";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,6 +15,7 @@ bin_SCRIPTS = \
|
||||||
bin_PROGRAMS = \
|
bin_PROGRAMS = \
|
||||||
edje \
|
edje \
|
||||||
edje_ls \
|
edje_ls \
|
||||||
|
edje_test \
|
||||||
@EDJE_CC_PRG@ \
|
@EDJE_CC_PRG@ \
|
||||||
@EDJE_DECC_PRG@
|
@EDJE_DECC_PRG@
|
||||||
|
|
||||||
|
@ -70,6 +71,17 @@ $(top_builddir)/src/lib/libedje.la
|
||||||
|
|
||||||
edje_ls_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la
|
edje_ls_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
edje_test_SOURCES = \
|
||||||
|
edje_test_main.c
|
||||||
|
|
||||||
|
edje_test_LDADD = \
|
||||||
|
$(top_builddir)/src/lib/libedje.la
|
||||||
|
|
||||||
|
edje_test_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la
|
||||||
|
|
||||||
|
|
||||||
EXTRA_SCRIPTS = edje_recc
|
EXTRA_SCRIPTS = edje_recc
|
||||||
|
|
||||||
EXTRA_DIST = edje_recc
|
EXTRA_DIST = edje_recc
|
||||||
|
|
|
@ -0,0 +1,356 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <Ecore.h>
|
||||||
|
#include <Evas.h>
|
||||||
|
#include <Ecore_Evas.h>
|
||||||
|
#include "Edje.h"
|
||||||
|
|
||||||
|
Ecore_Evas *ee;
|
||||||
|
Evas *evas;
|
||||||
|
|
||||||
|
Evas_Object *o_bg;
|
||||||
|
Evas_Object *o_edje;
|
||||||
|
|
||||||
|
void signal_cb(void *data, Evas_Object *o, const char *sig, const char *src);
|
||||||
|
void resize_cb(Ecore_Evas *ee);
|
||||||
|
void key_cb(void *data, Evas *e, Evas_Object *o, void *ei);
|
||||||
|
void message_cb(void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg);
|
||||||
|
|
||||||
|
void
|
||||||
|
signal_cb(void *data, Evas_Object *o, const char *sig, const char *src)
|
||||||
|
{
|
||||||
|
printf("EMIT: \"%s\" \"%s\"\n", sig, src);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
resize_cb(Ecore_Evas *ee)
|
||||||
|
{
|
||||||
|
Evas_Coord w, h;
|
||||||
|
|
||||||
|
evas_output_viewport_get(evas, NULL, NULL, &w, &h);
|
||||||
|
evas_object_resize(o_bg, w, h);
|
||||||
|
evas_object_resize(o_edje, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
key_cb(void *data, Evas *e, Evas_Object *o, void *ei)
|
||||||
|
{
|
||||||
|
Evas_Event_Key_Down *ev;
|
||||||
|
|
||||||
|
ev = ei;
|
||||||
|
printf("KEY: %s\n", ev->keyname);
|
||||||
|
if (!strcmp(ev->keyname, "Escape")) ecore_main_loop_quit();
|
||||||
|
if (!strcmp(ev->keyname, "space"))
|
||||||
|
{
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_NONE,
|
||||||
|
77, NULL);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "1"))
|
||||||
|
{
|
||||||
|
Edje_Message_String msg;
|
||||||
|
|
||||||
|
msg.str = "A Test String";
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_STRING,
|
||||||
|
101, &msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "2"))
|
||||||
|
{
|
||||||
|
Edje_Message_Int msg;
|
||||||
|
|
||||||
|
msg.val = 42;
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_INT,
|
||||||
|
102, &msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "3"))
|
||||||
|
{
|
||||||
|
Edje_Message_Float msg;
|
||||||
|
|
||||||
|
msg.val = 3.14159;
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_FLOAT,
|
||||||
|
103, &msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "4"))
|
||||||
|
{
|
||||||
|
Edje_Message_String_Set *msg;
|
||||||
|
|
||||||
|
msg = calloc(1,
|
||||||
|
sizeof(Edje_Message_String_Set) -
|
||||||
|
sizeof(char *) +
|
||||||
|
(7 * sizeof(char *)));
|
||||||
|
msg->count = 7;
|
||||||
|
msg->str[0] = "String 1";
|
||||||
|
msg->str[1] = "String 2";
|
||||||
|
msg->str[2] = "String 3";
|
||||||
|
msg->str[3] = "String 4";
|
||||||
|
msg->str[4] = "String 5";
|
||||||
|
msg->str[5] = "String 6";
|
||||||
|
msg->str[6] = "String 7";
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_STRING_SET,
|
||||||
|
104, msg);
|
||||||
|
free(msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "5"))
|
||||||
|
{
|
||||||
|
Edje_Message_Int_Set *msg;
|
||||||
|
|
||||||
|
msg = calloc(1,
|
||||||
|
sizeof(Edje_Message_Int_Set) -
|
||||||
|
sizeof(int) +
|
||||||
|
(7 * sizeof(int)));
|
||||||
|
msg->count = 7;
|
||||||
|
msg->val[0] = 42;
|
||||||
|
msg->val[1] = 43;
|
||||||
|
msg->val[2] = 44;
|
||||||
|
msg->val[3] = 45;
|
||||||
|
msg->val[4] = 46;
|
||||||
|
msg->val[5] = 47;
|
||||||
|
msg->val[6] = 48;
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_INT_SET,
|
||||||
|
105, msg);
|
||||||
|
free(msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "6"))
|
||||||
|
{
|
||||||
|
Edje_Message_Float_Set *msg;
|
||||||
|
|
||||||
|
msg = calloc(1,
|
||||||
|
sizeof(Edje_Message_Float_Set) -
|
||||||
|
sizeof(double) +
|
||||||
|
(7 * sizeof(double)));
|
||||||
|
msg->count = 7;
|
||||||
|
msg->val[0] = 1.2345;
|
||||||
|
msg->val[1] = 7.7777;
|
||||||
|
msg->val[2] = 3.1415;
|
||||||
|
msg->val[3] = 9.8765;
|
||||||
|
msg->val[4] = 7.8901;
|
||||||
|
msg->val[5] = 3.4567;
|
||||||
|
msg->val[6] = 6.7890;
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_FLOAT_SET,
|
||||||
|
106, msg);
|
||||||
|
free(msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "7"))
|
||||||
|
{
|
||||||
|
Edje_Message_String_Int msg;
|
||||||
|
|
||||||
|
msg.str = "A Test String and Int";
|
||||||
|
msg.val = 42;
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_STRING_INT,
|
||||||
|
107, &msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "8"))
|
||||||
|
{
|
||||||
|
Edje_Message_String_Float msg;
|
||||||
|
|
||||||
|
msg.str = "A Test String and Float";
|
||||||
|
msg.val = 777.777;
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_STRING_FLOAT,
|
||||||
|
108, &msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "9"))
|
||||||
|
{
|
||||||
|
Edje_Message_String_Int_Set *msg;
|
||||||
|
|
||||||
|
msg = calloc(1,
|
||||||
|
sizeof(Edje_Message_String_Int_Set) -
|
||||||
|
sizeof(int) +
|
||||||
|
(7 * sizeof(int)));
|
||||||
|
msg->str = "A Test String and Int Set";
|
||||||
|
msg->count = 7;
|
||||||
|
msg->val[0] = 42;
|
||||||
|
msg->val[1] = 43;
|
||||||
|
msg->val[2] = 44;
|
||||||
|
msg->val[3] = 45;
|
||||||
|
msg->val[4] = 46;
|
||||||
|
msg->val[5] = 47;
|
||||||
|
msg->val[6] = 48;
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_STRING_INT_SET,
|
||||||
|
109, msg);
|
||||||
|
free(msg);
|
||||||
|
}
|
||||||
|
if (!strcmp(ev->keyname, "0"))
|
||||||
|
{
|
||||||
|
Edje_Message_String_Float_Set *msg;
|
||||||
|
|
||||||
|
msg = calloc(1,
|
||||||
|
sizeof(Edje_Message_String_Float_Set) -
|
||||||
|
sizeof(double) +
|
||||||
|
(7 * sizeof(double)));
|
||||||
|
msg->str = "A Test String and Float Set";
|
||||||
|
msg->count = 7;
|
||||||
|
msg->val[0] = 1.2345;
|
||||||
|
msg->val[1] = 7.7777;
|
||||||
|
msg->val[2] = 3.1415;
|
||||||
|
msg->val[3] = 9.8765;
|
||||||
|
msg->val[4] = 7.8901;
|
||||||
|
msg->val[5] = 3.4567;
|
||||||
|
msg->val[6] = 6.7890;
|
||||||
|
edje_object_message_send(o_edje, EDJE_MESSAGE_STRING_FLOAT_SET,
|
||||||
|
110, msg);
|
||||||
|
free(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
message_cb(void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg)
|
||||||
|
{
|
||||||
|
printf("MESSAGE FROM OBJ, TYPE: %i, ID %i\n", type, id);
|
||||||
|
if (type == EDJE_MESSAGE_NONE)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_STRING)
|
||||||
|
{
|
||||||
|
Edje_Message_String *emsg;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_String *)msg;
|
||||||
|
printf(" STRING: \"%s\"\n", emsg->str);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_INT)
|
||||||
|
{
|
||||||
|
Edje_Message_Int *emsg;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_Int *)msg;
|
||||||
|
printf(" INT: %i\n", emsg->val);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_FLOAT)
|
||||||
|
{
|
||||||
|
Edje_Message_Float *emsg;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_Float *)msg;
|
||||||
|
printf(" FLOAT: %f\n", emsg->val);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_STRING_SET)
|
||||||
|
{
|
||||||
|
Edje_Message_String_Set *emsg;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_String_Set *)msg;
|
||||||
|
for (i = 0; i < emsg->count; i++)
|
||||||
|
printf(" STR: %s\n", emsg->str[i]);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_INT_SET)
|
||||||
|
{
|
||||||
|
Edje_Message_Int_Set *emsg;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_Int_Set *)msg;
|
||||||
|
for (i = 0; i < emsg->count; i++)
|
||||||
|
printf(" INT: %i\n", emsg->val[i]);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_FLOAT_SET)
|
||||||
|
{
|
||||||
|
Edje_Message_Float_Set *emsg;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_Float_Set *)msg;
|
||||||
|
for (i = 0; i < emsg->count; i++)
|
||||||
|
printf(" FLOAT: %f\n", emsg->val[i]);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_STRING_INT)
|
||||||
|
{
|
||||||
|
Edje_Message_String_Int *emsg;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_String_Int *)msg;
|
||||||
|
printf(" STR: %s\n", emsg->str);
|
||||||
|
printf(" INT: %i\n", emsg->val);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_STRING_FLOAT)
|
||||||
|
{
|
||||||
|
Edje_Message_String_Float *emsg;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_String_Float *)msg;
|
||||||
|
printf(" STR: %s\n", emsg->str);
|
||||||
|
printf(" FLOAT: %f\n", emsg->val);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_STRING_INT_SET)
|
||||||
|
{
|
||||||
|
Edje_Message_String_Int_Set *emsg;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_String_Int_Set *)msg;
|
||||||
|
printf(" STR: %s\n", emsg->str);
|
||||||
|
for (i = 0; i < emsg->count; i++)
|
||||||
|
printf(" INT: %i\n", emsg->val[i]);
|
||||||
|
}
|
||||||
|
else if (type == EDJE_MESSAGE_STRING_FLOAT_SET)
|
||||||
|
{
|
||||||
|
Edje_Message_String_Float_Set *emsg;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
emsg = (Edje_Message_String_Float_Set *)msg;
|
||||||
|
printf(" STR: %s\n", emsg->str);
|
||||||
|
for (i = 0; i < emsg->count; i++)
|
||||||
|
printf(" INT: %f\n", emsg->val[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
Evas_Object *o;
|
||||||
|
|
||||||
|
if (argc != 3)
|
||||||
|
{
|
||||||
|
printf("Usage: eddje_test edje_file.eet part_to_load\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ecore_init();
|
||||||
|
ecore_app_args_set(argc, (const char **)argv);
|
||||||
|
ecore_evas_init();
|
||||||
|
edje_init();
|
||||||
|
|
||||||
|
if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_X11))
|
||||||
|
ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 240, 320);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_FB))
|
||||||
|
ee = ecore_evas_fb_new(NULL, 270, 240, 320);
|
||||||
|
}
|
||||||
|
if (!ee)
|
||||||
|
{
|
||||||
|
if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_FB))
|
||||||
|
ee = ecore_evas_fb_new(NULL, 270, 240, 320);
|
||||||
|
if (!ee)
|
||||||
|
ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 240, 320);
|
||||||
|
if (!ee)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Cannot create Canvas!\n");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
evas = ecore_evas_get(ee);
|
||||||
|
evas_image_cache_set(evas, 8192 * 1024);
|
||||||
|
evas_font_cache_set(evas, 512 * 1024);
|
||||||
|
|
||||||
|
o = evas_object_rectangle_add(evas);
|
||||||
|
evas_object_move(o, 0, 0);
|
||||||
|
evas_object_resize(o, 240, 320);
|
||||||
|
evas_object_color_set(o, 255, 255, 255, 255);
|
||||||
|
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN, key_cb, NULL);
|
||||||
|
evas_object_focus_set(o, 1);
|
||||||
|
evas_object_show(o);
|
||||||
|
o_bg = o;
|
||||||
|
|
||||||
|
o = edje_object_add(evas);
|
||||||
|
edje_object_signal_callback_add(o, "*", "*", signal_cb, NULL);
|
||||||
|
edje_object_message_handler_set(o, message_cb, NULL);
|
||||||
|
edje_object_file_set(o, argv[1], argv[2]);
|
||||||
|
evas_object_move(o, 0, 0);
|
||||||
|
evas_object_resize(o, 240, 320);
|
||||||
|
evas_object_show(o);
|
||||||
|
o_edje = o;
|
||||||
|
|
||||||
|
ecore_evas_callback_resize_set(ee, resize_cb);
|
||||||
|
ecore_evas_show(ee);
|
||||||
|
|
||||||
|
ecore_main_loop_begin();
|
||||||
|
|
||||||
|
edje_shutdown();
|
||||||
|
ecore_evas_shutdown();
|
||||||
|
ecore_shutdown();
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -1210,6 +1210,7 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Message_Type type;
|
Edje_Message_Type type;
|
||||||
int id, i, n;
|
int id, i, n;
|
||||||
|
Embryo_Cell *ptr;
|
||||||
|
|
||||||
if (params[0] < (sizeof(Embryo_Cell) * (2))) return 0;
|
if (params[0] < (sizeof(Embryo_Cell) * (2))) return 0;
|
||||||
ed = embryo_program_data_get(ep);
|
ed = embryo_program_data_get(ep);
|
||||||
|
@ -1247,17 +1248,19 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
Edje_Message_Int *emsg;
|
Edje_Message_Int *emsg;
|
||||||
|
|
||||||
emsg = alloca(sizeof(Edje_Message_Int));
|
emsg = alloca(sizeof(Edje_Message_Int));
|
||||||
emsg->val = (int)params[3];
|
ptr = embryo_data_address_get(ep, params[3]);
|
||||||
|
emsg->val = (int)*ptr;
|
||||||
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_FLOAT:
|
case EDJE_MESSAGE_FLOAT:
|
||||||
{
|
{
|
||||||
Edje_Message_Int *emsg;
|
Edje_Message_Float *emsg;
|
||||||
float f;
|
float f;
|
||||||
|
|
||||||
emsg = alloca(sizeof(Edje_Message_Int));
|
emsg = alloca(sizeof(Edje_Message_Float));
|
||||||
f = EMBRYO_CELL_TO_FLOAT(params[3]);
|
ptr = embryo_data_address_get(ep, params[3]);
|
||||||
|
f = EMBRYO_CELL_TO_FLOAT(*ptr);
|
||||||
emsg->val = (double)f;
|
emsg->val = (double)f;
|
||||||
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
||||||
}
|
}
|
||||||
|
@ -1266,7 +1269,7 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
{
|
{
|
||||||
Edje_Message_String_Set *emsg;
|
Edje_Message_String_Set *emsg;
|
||||||
|
|
||||||
n = (params[0] / sizeof(Embryo_Cell));
|
n = (params[0] / sizeof(Embryo_Cell)) + 1;
|
||||||
emsg = alloca(sizeof(Edje_Message_String_Set) + ((n - 3 - 1) * sizeof(char *)));
|
emsg = alloca(sizeof(Edje_Message_String_Set) + ((n - 3 - 1) * sizeof(char *)));
|
||||||
emsg->count = n - 3;
|
emsg->count = n - 3;
|
||||||
for (i = 3; i < n; i++)
|
for (i = 3; i < n; i++)
|
||||||
|
@ -1292,11 +1295,14 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
{
|
{
|
||||||
Edje_Message_Int_Set *emsg;
|
Edje_Message_Int_Set *emsg;
|
||||||
|
|
||||||
n = (params[0] / sizeof(Embryo_Cell));
|
n = (params[0] / sizeof(Embryo_Cell)) + 1;
|
||||||
emsg = alloca(sizeof(Edje_Message_Int_Set) + ((n - 3 - 1) * sizeof(int)));
|
emsg = alloca(sizeof(Edje_Message_Int_Set) + ((n - 3 - 1) * sizeof(int)));
|
||||||
emsg->count = n - 3;
|
emsg->count = n - 3;
|
||||||
for (i = 3; i < n; i++)
|
for (i = 3; i < n; i++)
|
||||||
emsg->val[i - 3] = (int)params[i];
|
{
|
||||||
|
ptr = embryo_data_address_get(ep, params[i]);
|
||||||
|
emsg->val[i - 3] = (int)*ptr;
|
||||||
|
}
|
||||||
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1304,14 +1310,15 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
{
|
{
|
||||||
Edje_Message_Float_Set *emsg;
|
Edje_Message_Float_Set *emsg;
|
||||||
|
|
||||||
n = (params[0] / sizeof(Embryo_Cell));
|
n = (params[0] / sizeof(Embryo_Cell)) + 1;
|
||||||
emsg = alloca(sizeof(Edje_Message_Float_Set) + ((n - 3 - 1) * sizeof(double)));
|
emsg = alloca(sizeof(Edje_Message_Float_Set) + ((n - 3 - 1) * sizeof(double)));
|
||||||
emsg->count = n - 3;
|
emsg->count = n - 3;
|
||||||
for (i = 3; i < n; i++)
|
for (i = 3; i < n; i++)
|
||||||
{
|
{
|
||||||
float f;
|
float f;
|
||||||
|
|
||||||
f = EMBRYO_CELL_TO_FLOAT(params[i]);
|
ptr = embryo_data_address_get(ep, params[i]);
|
||||||
|
f = EMBRYO_CELL_TO_FLOAT(*ptr);
|
||||||
emsg->val[i - 3] = (double)f;
|
emsg->val[i - 3] = (double)f;
|
||||||
}
|
}
|
||||||
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
||||||
|
@ -1333,7 +1340,8 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
embryo_data_string_get(ep, cptr, s);
|
embryo_data_string_get(ep, cptr, s);
|
||||||
emsg = alloca(sizeof(Edje_Message_String_Int));
|
emsg = alloca(sizeof(Edje_Message_String_Int));
|
||||||
emsg->str = s;
|
emsg->str = s;
|
||||||
emsg->val = (int)params[4];
|
ptr = embryo_data_address_get(ep, params[4]);
|
||||||
|
emsg->val = (int)*ptr;
|
||||||
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1355,7 +1363,8 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
embryo_data_string_get(ep, cptr, s);
|
embryo_data_string_get(ep, cptr, s);
|
||||||
emsg = alloca(sizeof(Edje_Message_String_Float));
|
emsg = alloca(sizeof(Edje_Message_String_Float));
|
||||||
emsg->str = s;
|
emsg->str = s;
|
||||||
f = EMBRYO_CELL_TO_FLOAT(params[4]);
|
ptr = embryo_data_address_get(ep, params[4]);
|
||||||
|
f = EMBRYO_CELL_TO_FLOAT(*ptr);
|
||||||
emsg->val = (double)f;
|
emsg->val = (double)f;
|
||||||
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
||||||
}
|
}
|
||||||
|
@ -1375,12 +1384,15 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
l = embryo_data_string_length_get(ep, cptr);
|
l = embryo_data_string_length_get(ep, cptr);
|
||||||
s = alloca(l + 1);
|
s = alloca(l + 1);
|
||||||
embryo_data_string_get(ep, cptr, s);
|
embryo_data_string_get(ep, cptr, s);
|
||||||
n = (params[0] / sizeof(Embryo_Cell));
|
n = (params[0] / sizeof(Embryo_Cell)) + 1;
|
||||||
emsg = alloca(sizeof(Edje_Message_String_Int_Set) + ((n - 4 - 1) * sizeof(int)));
|
emsg = alloca(sizeof(Edje_Message_String_Int_Set) + ((n - 4 - 1) * sizeof(int)));
|
||||||
emsg->str = s;
|
emsg->str = s;
|
||||||
emsg->count = n - 4;
|
emsg->count = n - 4;
|
||||||
for (i = 4; i < n; i++)
|
for (i = 4; i < n; i++)
|
||||||
emsg->val[i - 4] = (int)params[i];
|
{
|
||||||
|
ptr = embryo_data_address_get(ep, params[i]);
|
||||||
|
emsg->val[i - 4] = (int)*ptr;
|
||||||
|
}
|
||||||
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1399,7 +1411,7 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
l = embryo_data_string_length_get(ep, cptr);
|
l = embryo_data_string_length_get(ep, cptr);
|
||||||
s = alloca(l + 1);
|
s = alloca(l + 1);
|
||||||
embryo_data_string_get(ep, cptr, s);
|
embryo_data_string_get(ep, cptr, s);
|
||||||
n = (params[0] / sizeof(Embryo_Cell));
|
n = (params[0] / sizeof(Embryo_Cell)) + 1;
|
||||||
emsg = alloca(sizeof(Edje_Message_String_Float_Set) + ((n - 4 - 1) * sizeof(double)));
|
emsg = alloca(sizeof(Edje_Message_String_Float_Set) + ((n - 4 - 1) * sizeof(double)));
|
||||||
emsg->str = s;
|
emsg->str = s;
|
||||||
emsg->count = n - 4;
|
emsg->count = n - 4;
|
||||||
|
@ -1407,7 +1419,8 @@ _edje_embryo_fn_send_message(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
{
|
{
|
||||||
float f;
|
float f;
|
||||||
|
|
||||||
f = EMBRYO_CELL_TO_FLOAT(params[i]);
|
ptr = embryo_data_address_get(ep, params[i]);
|
||||||
|
f = EMBRYO_CELL_TO_FLOAT(*ptr);
|
||||||
emsg->val[i - 4] = (double)f;
|
emsg->val[i - 4] = (double)f;
|
||||||
}
|
}
|
||||||
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
_edje_message_send(ed, EDJE_QUEUE_APP, type, id, emsg);
|
||||||
|
|
|
@ -439,16 +439,21 @@ _edje_message_process(Edje_Message *em)
|
||||||
((Edje_Message_String *)em->msg)->str);
|
((Edje_Message_String *)em->msg)->str);
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_INT:
|
case EDJE_MESSAGE_INT:
|
||||||
embryo_parameter_cell_push(em->edje->collection->script,
|
{
|
||||||
(Embryo_Cell)((Edje_Message_Int *)em->msg)->val);
|
Embryo_Cell v;
|
||||||
|
|
||||||
|
v = (Embryo_Cell)((Edje_Message_Int *)em->msg)->val;
|
||||||
|
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_FLOAT:
|
case EDJE_MESSAGE_FLOAT:
|
||||||
{
|
{
|
||||||
float v;
|
Embryo_Cell v;
|
||||||
|
float fv;
|
||||||
|
|
||||||
v = (Embryo_Cell)((Edje_Message_Float *)em->msg)->val;
|
fv = ((Edje_Message_Float *)em->msg)->val;
|
||||||
embryo_parameter_cell_push(em->edje->collection->script,
|
v = EMBRYO_FLOAT_TO_CELL(fv);
|
||||||
(Embryo_Cell)EMBRYO_FLOAT_TO_CELL(v));
|
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_STRING_SET:
|
case EDJE_MESSAGE_STRING_SET:
|
||||||
|
@ -458,53 +463,68 @@ _edje_message_process(Edje_Message *em)
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_INT_SET:
|
case EDJE_MESSAGE_INT_SET:
|
||||||
for (i = 0; i < ((Edje_Message_Int_Set *)em->msg)->count; i++)
|
for (i = 0; i < ((Edje_Message_Int_Set *)em->msg)->count; i++)
|
||||||
embryo_parameter_cell_push(em->edje->collection->script,
|
{
|
||||||
(Embryo_Cell)((Edje_Message_Int_Set *)em->msg)->val[i]);
|
Embryo_Cell v;
|
||||||
|
|
||||||
|
v = (Embryo_Cell)((Edje_Message_Int_Set *)em->msg)->val[i];
|
||||||
|
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_FLOAT_SET:
|
case EDJE_MESSAGE_FLOAT_SET:
|
||||||
for (i = 0; i < ((Edje_Message_Float_Set *)em->msg)->count; i++)
|
for (i = 0; i < ((Edje_Message_Float_Set *)em->msg)->count; i++)
|
||||||
{
|
{
|
||||||
float v;
|
Embryo_Cell v;
|
||||||
|
float fv;
|
||||||
|
|
||||||
v = ((Edje_Message_Float_Set *)em->msg)->val[i];
|
fv = ((Edje_Message_Float_Set *)em->msg)->val[i];
|
||||||
embryo_parameter_cell_push(em->edje->collection->script,
|
v = EMBRYO_FLOAT_TO_CELL(fv);
|
||||||
(Embryo_Cell)EMBRYO_FLOAT_TO_CELL(v));
|
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_STRING_INT:
|
case EDJE_MESSAGE_STRING_INT:
|
||||||
embryo_parameter_string_push(em->edje->collection->script,
|
embryo_parameter_string_push(em->edje->collection->script,
|
||||||
((Edje_Message_String_Int *)em->msg)->str);
|
((Edje_Message_String_Int *)em->msg)->str);
|
||||||
embryo_parameter_cell_push(em->edje->collection->script,
|
{
|
||||||
(Embryo_Cell)((Edje_Message_String_Int *)em->msg)->val);
|
Embryo_Cell v;
|
||||||
|
|
||||||
|
v = (Embryo_Cell)((Edje_Message_String_Int *)em->msg)->val;
|
||||||
|
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_STRING_FLOAT:
|
case EDJE_MESSAGE_STRING_FLOAT:
|
||||||
embryo_parameter_string_push(em->edje->collection->script,
|
embryo_parameter_string_push(em->edje->collection->script,
|
||||||
((Edje_Message_String_Float *)em->msg)->str);
|
((Edje_Message_String_Float *)em->msg)->str);
|
||||||
{
|
{
|
||||||
float v;
|
Embryo_Cell v;
|
||||||
|
float fv;
|
||||||
|
|
||||||
v = (Embryo_Cell)((Edje_Message_String_Float *)em->msg)->val;
|
fv = ((Edje_Message_String_Float *)em->msg)->val;
|
||||||
embryo_parameter_cell_push(em->edje->collection->script,
|
v = EMBRYO_FLOAT_TO_CELL(fv);
|
||||||
(Embryo_Cell)EMBRYO_FLOAT_TO_CELL(v));
|
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_STRING_INT_SET:
|
case EDJE_MESSAGE_STRING_INT_SET:
|
||||||
embryo_parameter_string_push(em->edje->collection->script,
|
embryo_parameter_string_push(em->edje->collection->script,
|
||||||
((Edje_Message_String_Int_Set *)em->msg)->str);
|
((Edje_Message_String_Int_Set *)em->msg)->str);
|
||||||
for (i = 0; i < ((Edje_Message_String_Int_Set *)em->msg)->count; i++)
|
for (i = 0; i < ((Edje_Message_String_Int_Set *)em->msg)->count; i++)
|
||||||
embryo_parameter_cell_push(em->edje->collection->script,
|
{
|
||||||
(Embryo_Cell)((Edje_Message_String_Int_Set *)em->msg)->val[i]);
|
Embryo_Cell v;
|
||||||
|
|
||||||
|
v = (Embryo_Cell)((Edje_Message_String_Int_Set *)em->msg)->val[i];
|
||||||
|
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
||||||
embryo_parameter_string_push(em->edje->collection->script,
|
embryo_parameter_string_push(em->edje->collection->script,
|
||||||
((Edje_Message_String_Float_Set *)em->msg)->str);
|
((Edje_Message_String_Float_Set *)em->msg)->str);
|
||||||
for (i = 0; i < ((Edje_Message_String_Float_Set *)em->msg)->count; i++)
|
for (i = 0; i < ((Edje_Message_String_Float_Set *)em->msg)->count; i++)
|
||||||
{
|
{
|
||||||
float v;
|
Embryo_Cell v;
|
||||||
|
float fv;
|
||||||
|
|
||||||
v = ((Edje_Message_String_Float_Set *)em->msg)->val[i];
|
fv = ((Edje_Message_String_Float_Set *)em->msg)->val[i];
|
||||||
embryo_parameter_cell_push(em->edje->collection->script,
|
v = EMBRYO_FLOAT_TO_CELL(fv);
|
||||||
(Embryo_Cell)EMBRYO_FLOAT_TO_CELL(v));
|
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue