forked from enlightenment/efl
aaaaaaaaaaaah message queue related fix.
SVN revision: 11207
This commit is contained in:
parent
1ac05630b8
commit
f4208aa56c
|
@ -1,5 +1,6 @@
|
|||
fonts {
|
||||
font: "Vera.ttf" "Edje.Vera";
|
||||
font: "Vera.ttf" "Vera";
|
||||
font: "VeraBd.ttf" "Vera Bold";
|
||||
}
|
||||
images {
|
||||
image: "bg.png" LOSSY 95;
|
||||
|
@ -136,7 +137,7 @@ data
|
|||
collections {
|
||||
group {
|
||||
name: "test";
|
||||
min: 32 32;
|
||||
min: 128 128;
|
||||
max: 1024 768;
|
||||
data {
|
||||
item: "My Data" "The string to attach to this data";
|
||||
|
@ -245,7 +246,7 @@ collections {
|
|||
text {
|
||||
text: "This is a longer test string";
|
||||
text_class: "plainjane";
|
||||
font: "Edje.Vera";
|
||||
font: "Vera";
|
||||
size: 6;
|
||||
// fit: 0 1;
|
||||
// min: 1 1;
|
||||
|
@ -582,7 +583,7 @@ collections {
|
|||
get_text_class("plainjane", font, size);
|
||||
snprintf(buf, 256, "%s SIZE: %f", font, size);
|
||||
emit("DEBUG...", buf);
|
||||
set_text_class("plainjane", "-Bitstream-Bitstream Vera Sans-bold-i-normal--0-0-0-0-p-0-ascii-0", 8.0);
|
||||
set_text_class("plainjane", "Vera Bold", 8.0);
|
||||
}
|
||||
}
|
||||
program {
|
||||
|
@ -604,7 +605,7 @@ collections {
|
|||
snprintf(buf, 256, "**Mouse at** x: %i y: %i\n", w, h);
|
||||
emit("DEBUG...", buf);
|
||||
set_color_class("bg", 255, 255, 255, 255);
|
||||
set_text_class("plainjane", "-Bitstream-Bitstream Vera Sans-medium-r-normal--0-0-0-0-p-0-ascii-0", 6.0);
|
||||
set_text_class("plainjane", "Vera", 6.0);
|
||||
}
|
||||
}
|
||||
program {
|
||||
|
@ -651,6 +652,7 @@ collections {
|
|||
anim(1.5, "anim_cb", 7777);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
program {
|
||||
name: "random_signal";
|
||||
signal: "show";
|
||||
|
@ -665,6 +667,7 @@ collections {
|
|||
in: 1.0 5.0;
|
||||
action: SIGNAL_EMIT "do_random" "the_source";
|
||||
}
|
||||
#endif
|
||||
program {
|
||||
name: "logo_click_d1";
|
||||
signal: "mouse,down,1";
|
||||
|
|
|
@ -332,7 +332,7 @@ data_write(void)
|
|||
progname, ep->name);
|
||||
ABORT_WRITE(ef, file_out);
|
||||
}
|
||||
|
||||
/*
|
||||
if (epd->text.font)
|
||||
{
|
||||
Evas_List *lll;
|
||||
|
@ -354,6 +354,7 @@ data_write(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
for (l3 = ep->other_desc; l3; l3 = l3->next)
|
||||
{
|
||||
epd = l3->data;
|
||||
|
|
|
@ -162,13 +162,13 @@ main_delete_request(Ecore_Evas *ee)
|
|||
static void
|
||||
main_pre_rend(Ecore_Evas *ee)
|
||||
{
|
||||
edje_thaw();
|
||||
// edje_thaw();
|
||||
}
|
||||
|
||||
static void
|
||||
main_post_rend(Ecore_Evas *ee)
|
||||
{
|
||||
edje_freeze();
|
||||
// edje_freeze();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -685,6 +685,8 @@ test_setup(char *file, char *name)
|
|||
hh = starth;
|
||||
}
|
||||
|
||||
printf("%i %i, %i %i\n", (int)startw, (int)starth, (int)ww, (int)hh);
|
||||
|
||||
de = calloc(1, sizeof(Demo_Edje));
|
||||
edjes = evas_list_append(edjes, de);
|
||||
|
||||
|
@ -777,7 +779,7 @@ test_setup(char *file, char *name)
|
|||
edje_object_size_min_get(o, &(de->minw), &(de->minh));
|
||||
if (ww < de->minw) w = de->minw;
|
||||
if (hh < de->minh) h = de->minh;
|
||||
edje_object_size_min_get(o, &(de->maxw), &(de->maxh));
|
||||
edje_object_size_max_get(o, &(de->maxw), &(de->maxh));
|
||||
if (de->maxw > 0)
|
||||
{
|
||||
if (ww > de->maxw) w = de->maxw;
|
||||
|
|
|
@ -182,12 +182,15 @@ _edje_recalc(Edje *ed)
|
|||
{
|
||||
Evas_List *l;
|
||||
|
||||
// printf("ed->freeze = %i\n", ed->freeze);
|
||||
// printf("ed->calc_only = %i\n", ed->calc_only);
|
||||
if (!ed->dirty) return;
|
||||
if (ed->freeze)
|
||||
{
|
||||
ed->recalc = 1;
|
||||
if (!ed->calc_only) return;
|
||||
}
|
||||
// printf("recalcies\n");
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *ep;
|
||||
|
@ -504,12 +507,14 @@ _edje_part_recalc_single(Edje *ed,
|
|||
char *font;
|
||||
int size;
|
||||
Evas_Coord tw, th;
|
||||
char buf[4096];
|
||||
|
||||
text = chosen_desc->text.text;
|
||||
font = chosen_desc->text.font;
|
||||
size = chosen_desc->text.size;
|
||||
|
||||
if ((chosen_desc->text.text_class) && (strlen(chosen_desc->text.text_class) > 0))
|
||||
if ((chosen_desc->text.text_class) &&
|
||||
(strlen(chosen_desc->text.text_class) > 0))
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
|
@ -524,6 +529,15 @@ _edje_part_recalc_single(Edje *ed,
|
|||
if (ep->text.text) text = ep->text.text;
|
||||
if (ep->text.font) font = ep->text.font;
|
||||
if (ep->text.size > 0) size = ep->text.size;
|
||||
|
||||
strcpy(buf, "fonts/");
|
||||
strcat(buf, font);
|
||||
|
||||
evas_object_text_font_set(ep->object, buf, 10);
|
||||
|
||||
if (evas_object_text_ascent_get(ep->object) > 0) font = buf;
|
||||
// font = buf;
|
||||
|
||||
evas_object_text_font_set(ep->object, font, size);
|
||||
if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y))
|
||||
{
|
||||
|
@ -698,6 +712,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep)
|
|||
Edje_Part_Description *chosen_desc;
|
||||
double pos = 0.0;
|
||||
|
||||
// printf("^^^^calc: %s\n", ep->part->name);
|
||||
if (ep->calculated) return;
|
||||
if (ep->calculating)
|
||||
{
|
||||
|
@ -716,6 +731,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep)
|
|||
if (ep->param2.rel2_to_x) _edje_part_recalc(ed, ep->param2.rel2_to_x);
|
||||
if (ep->param2.rel2_to_y) _edje_part_recalc(ed, ep->param2.rel2_to_y);
|
||||
|
||||
// printf("CALC\n");
|
||||
|
||||
/* actually calculate now */
|
||||
if (ep->description_pos == 0.0)
|
||||
chosen_desc = ep->param1.description;
|
||||
|
@ -728,6 +745,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep)
|
|||
ep->calculated = 1;
|
||||
return;
|
||||
}
|
||||
// printf("CALC2\n");
|
||||
|
||||
ep->chosen_description = chosen_desc;
|
||||
if (ep->param1.description)
|
||||
|
@ -852,6 +870,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep)
|
|||
}
|
||||
if (!ed->calc_only)
|
||||
{
|
||||
// printf("APPL\n");
|
||||
if (ep->part->type == EDJE_PART_TYPE_RECTANGLE)
|
||||
{
|
||||
evas_object_move(ep->object, ed->x + p3.x, ed->y + p3.y);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#include "Edje.h"
|
||||
#include <Ecore_Job.h>
|
||||
#include "edje_private.h"
|
||||
|
||||
Ecore_Job *job = NULL;
|
||||
|
||||
void
|
||||
edje_object_message_send(Evas_Object *obj, Edje_Message_Type type, int id, void *msg)
|
||||
{
|
||||
|
@ -23,7 +26,6 @@ edje_object_message_handler_set(Evas_Object *obj, void (*func) (void *data, Evas
|
|||
|
||||
static Evas_List *msgq = NULL;
|
||||
static Evas_List *tmp_msgq = NULL;
|
||||
static Ecore_Idle_Enterer *idler = NULL;
|
||||
|
||||
static int
|
||||
_edje_dummy_timer(void *data)
|
||||
|
@ -31,25 +33,27 @@ _edje_dummy_timer(void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_edje_idler(void *data)
|
||||
static void
|
||||
_edje_job(void *data)
|
||||
{
|
||||
_edje_message_queue_process();
|
||||
return 1;
|
||||
job = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_edje_message_init(void)
|
||||
{
|
||||
idler = ecore_idle_enterer_add(_edje_idler, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_message_shutdown(void)
|
||||
{
|
||||
_edje_message_queue_clear();
|
||||
ecore_idle_enterer_del(idler);
|
||||
idler = NULL;
|
||||
if (job)
|
||||
{
|
||||
ecore_job_del(job);
|
||||
job = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -197,7 +201,8 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
Edje_Message *em;
|
||||
int i;
|
||||
unsigned char *msg = NULL;
|
||||
|
||||
|
||||
if (!job) job = ecore_job_add(_edje_job, NULL);
|
||||
em = _edje_message_new(ed, queue, type, id);
|
||||
if (!em) return;
|
||||
switch (em->type)
|
||||
|
|
|
@ -292,6 +292,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
Evas_Coord tw, th;
|
||||
Evas_Coord ox, oy, sw, sh;
|
||||
char *buf = NULL;
|
||||
char buf2[4096];
|
||||
|
||||
text = chosen_desc->text.text;
|
||||
font = chosen_desc->text.font;
|
||||
|
@ -312,6 +313,15 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if (ep->text.text) text = ep->text.text;
|
||||
if (ep->text.font) font = ep->text.font;
|
||||
if (ep->text.size > 0) size = ep->text.size;
|
||||
|
||||
strcpy(buf2, "fonts/");
|
||||
strcat(buf2, font);
|
||||
|
||||
evas_object_text_font_set(ep->object, buf2, 10);
|
||||
|
||||
if (evas_object_text_ascent_get(ep->object) > 0) font = buf2;
|
||||
// font = buf2;
|
||||
|
||||
ox = _edje_text_styles[ep->part->effect].offset.x;
|
||||
oy = _edje_text_styles[ep->part->effect].offset.y;
|
||||
sw = params->w - (_edje_text_styles[ep->part->effect].pad.l + _edje_text_styles[ep->part->effect].pad.r);
|
||||
|
|
|
@ -351,6 +351,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
|||
Evas_List *l;
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
// printf("------------ edje_object_text_class_set\n");
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!text_class)) return;
|
||||
if (size < 0.0) size = 0.0;
|
||||
|
@ -1455,15 +1456,25 @@ int
|
|||
_edje_freeze(Edje *ed)
|
||||
{
|
||||
ed->freeze++;
|
||||
// printf("FREEZE %i\n", ed->freeze);
|
||||
return ed->freeze;
|
||||
}
|
||||
|
||||
int
|
||||
_edje_thaw(Edje *ed)
|
||||
{
|
||||
// printf("THAW %i\n", ed->freeze);
|
||||
ed->freeze--;
|
||||
if (ed->freeze < 0) ed->freeze = 0;
|
||||
if ((ed->freeze == 0) && (ed->recalc)) _edje_recalc(ed);
|
||||
if (ed->freeze < 0)
|
||||
{
|
||||
// printf("-------------########### OVER THAW\n");
|
||||
ed->freeze = 0;
|
||||
}
|
||||
if ((ed->freeze == 0) && (ed->recalc))
|
||||
{
|
||||
// printf("thaw recalc\n");
|
||||
_edje_recalc(ed);
|
||||
}
|
||||
return ed->freeze;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue