This lets you limit the size of the font that will be used.
Especially useful when using fit.
-2011-03-10 WooHyun Jung
-
- * Fix: Emit clicked signal on entry if still in - missing.
-
-2011-03-10 Cedric BAIL
-
- * Correctly propagate recursive event with existing and non existing
- part.
-
-2011-03-11 Cedric BAIL
-
- * Add PROXY part.
-
-2011-03-19 Carsten Haitzler (The Rasterman)
-
- * Change edje_decc to only use edje_cc as the compiler for security
- and correctness reasons.
-
-2011-03-23 Brett Nash (nash)
-
- * Move some of edje over to use smart clipper in evas. This _should_
- be transparent to users.
### Checks for header files
-AC_CHECK_HEADERS([locale.h sys/resource.h])
+AC_CHECK_HEADERS([locale.h])
EFL_CHECK_PATH_MAX
%{_libdir}/*.a
%{_libdir}/pkgconfig/*
%{_includedir}/edje-1/*.h
-%{_libdir}/edje/utils/epp
%files bin
%defattr(-, root, root)
static void ob_collections_group_parts_part_description(void);
static void st_collections_group_parts_part_description_inherit(void);
-static void st_collections_group_parts_part_description_source(void);
static void st_collections_group_parts_part_description_state(void);
static void st_collections_group_parts_part_description_visible(void);
static void st_collections_group_parts_part_description_align(void);
{"collections.group.parts.part.table.items.item.position", st_collections_group_parts_part_table_items_item_position},
{"collections.group.parts.part.table.items.item.span", st_collections_group_parts_part_table_items_item_span},
{"collections.group.parts.part.description.inherit", st_collections_group_parts_part_description_inherit},
- {"collections.group.parts.part.description.source", st_collections_group_parts_part_description_source},
{"collections.group.parts.part.description.state", st_collections_group_parts_part_description_state},
{"collections.group.parts.part.description.visible", st_collections_group_parts_part_description_visible},
{"collections.group.parts.part.description.align", st_collections_group_parts_part_description_align},
return sizeof(statement_handlers) / sizeof (New_Object_Handler);
}
-static void
-_edje_part_description_fill(Edje_Part_Description_Spec_Fill *fill)
-{
- fill->smooth = 1;
- fill->pos_rel_x = FROM_DOUBLE(0.0);
- fill->pos_abs_x = 0;
- fill->rel_x = FROM_DOUBLE(1.0);
- fill->abs_x = 0;
- fill->pos_rel_y = FROM_DOUBLE(0.0);
- fill->pos_abs_y = 0;
- fill->rel_y = FROM_DOUBLE(1.0);
- fill->abs_y = 0;
- fill->angle = 0;
- fill->spread = 0;
- fill->type = EDJE_FILL_TYPE_SCALE;
-}
-
static Edje_Part_Description_Common *
_edje_part_description_alloc(unsigned char type, const char *collection, const char *part)
{
ed = mem_alloc(SZ(Edje_Part_Description_Image));
ed->image.id = -1;
-
- _edje_part_description_fill(&ed->image.fill);
+ ed->image.fill.smooth = 1;
+ ed->image.fill.pos_rel_x = FROM_DOUBLE(0.0);
+ ed->image.fill.pos_abs_x = 0;
+ ed->image.fill.rel_x = FROM_DOUBLE(1.0);
+ ed->image.fill.abs_x = 0;
+ ed->image.fill.pos_rel_y = FROM_DOUBLE(0.0);
+ ed->image.fill.pos_abs_y = 0;
+ ed->image.fill.rel_y = FROM_DOUBLE(1.0);
+ ed->image.fill.abs_y = 0;
+ ed->image.fill.angle = 0;
+ ed->image.fill.spread = 0;
+ ed->image.fill.type = EDJE_FILL_TYPE_SCALE;
result = &ed->common;
break;
}
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *ed;
-
- ed = mem_alloc(SZ(Edje_Part_Description_Proxy));
-
- ed->proxy.id = -1;
-
- _edje_part_description_fill(&ed->proxy.fill);
-
- result = &ed->common;
- break;
- }
case EDJE_PART_TYPE_BOX:
{
Edje_Part_Description_Box *ed;
"BOX", EDJE_PART_TYPE_BOX,
"TABLE", EDJE_PART_TYPE_TABLE,
"EXTERNAL", EDJE_PART_TYPE_EXTERNAL,
- "PROXY", EDJE_PART_TYPE_PROXY,
NULL);
if (ep->default_desc || ep->other.desc_count > 0)
break;
}
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *ped = (Edje_Part_Description_Proxy*) ed;
- Edje_Part_Description_Proxy *pparent = (Edje_Part_Description_Proxy*) parent;
-
- ped->proxy.id = pparent->proxy.id;
-
- break;
- }
case EDJE_PART_TYPE_BOX:
{
Edje_Part_Description_Box *bed = (Edje_Part_Description_Box *) ed;
/**
@page edcref
-
- @property
- source
- @parameters
- [another part's name]
- @effect
- Causes the part to use another part content as the content of this part.
- Only work with PROXY part.
- @endproperty
-*/
-static void
-st_collections_group_parts_part_description_source(void)
-{
- Edje_Part_Collection *pc;
- Edje_Part *ep;
- Edje_Part_Description_Proxy *ed;
- char *name;
-
- check_arg_count(1);
-
- pc = eina_list_data_get(eina_list_last(edje_collections));
- ep = pc->parts[pc->parts_count - 1];
-
- if (ep->type != EDJE_PART_TYPE_PROXY)
- {
- ERR("%s: Error. parse error %s:%i. "
- "source attributes in non-PROXY part.",
- progname, file_in, line - 1);
- exit(-1);
- }
-
- ed = (Edje_Part_Description_Proxy*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*) ep->other.desc[ep->other.desc_count - 1];
-
- name = parse_str(0);
-
- data_queue_part_lookup(pc, name, &(ed->proxy.id));
- free(name);
-}
-
-/**
- @page edcref
@property
state
@parameters
{
Edje_Part_Collection *pc;
Edje_Part *ep;
- Edje_Part_Description_Spec_Fill *fill;
+ Edje_Part_Description_Image *ed;
check_arg_count(1);
pc = eina_list_data_get(eina_list_last(edje_collections));
ep = pc->parts[pc->parts_count - 1];
- switch (ep->type)
+ if (ep->type != EDJE_PART_TYPE_IMAGE)
{
- case EDJE_PART_TYPE_IMAGE:
- {
- Edje_Part_Description_Image *ed;
-
- ed = (Edje_Part_Description_Image*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->image.fill;
- break;
- }
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *ed;
-
- ed = (Edje_Part_Description_Proxy*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->proxy.fill;
- break;
- }
- default:
- {
- ERR("%s: Error. parse error %s:%i. "
- "image and proxy attributes in non-IMAGE, non-PROXY `%s` part (%i).",
- progname, file_in, line - 1, ep->name, ep->type);
- exit(-1);
- }
+ ERR("%s: Error. parse error %s:%i. "
+ "image attributes in non-IMAGE part.",
+ progname, file_in, line - 1);
+ exit(-1);
}
- fill->smooth = parse_bool(0);
+ ed = (Edje_Part_Description_Image*) ep->default_desc;
+ if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
+
+ ed->image.fill.smooth = parse_bool(0);
}
/**
{
Edje_Part_Collection *pc;
Edje_Part *ep;
- Edje_Part_Description_Spec_Fill *fill;
+ Edje_Part_Description_Image *ed;
check_arg_count(1);
pc = eina_list_data_get(eina_list_last(edje_collections));
ep = pc->parts[pc->parts_count - 1];
- switch (ep->type)
+ if (ep->type != EDJE_PART_TYPE_IMAGE)
{
- case EDJE_PART_TYPE_IMAGE:
- {
- Edje_Part_Description_Image *ed;
-
- ed = (Edje_Part_Description_Image*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->image.fill;
- break;
- }
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *ed;
-
- ed = (Edje_Part_Description_Proxy*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->proxy.fill;
- break;
- }
- default:
- {
- ERR("%s: Error. parse error %s:%i. "
- "image and proxy attributes in non-IMAGE, non-PROXY part.",
- progname, file_in, line - 1);
- exit(-1);
- }
+ ERR("%s: Error. parse error %s:%i. "
+ "image attributes in non-IMAGE part.",
+ progname, file_in, line - 1);
+ exit(-1);
}
- fill->type = parse_enum(0,
- "SCALE", EDJE_FILL_TYPE_SCALE,
- "TILE", EDJE_FILL_TYPE_TILE,
- NULL);
+ ed = (Edje_Part_Description_Image*) ep->default_desc;
+ if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
+
+ ed->image.fill.type = parse_enum(0,
+ "SCALE", EDJE_FILL_TYPE_SCALE,
+ "TILE", EDJE_FILL_TYPE_TILE,
+ NULL);
}
/**
{
Edje_Part_Collection *pc;
Edje_Part *ep;
- Edje_Part_Description_Spec_Fill *fill;
+ Edje_Part_Description_Image *ed;
check_arg_count(2);
pc = eina_list_data_get(eina_list_last(edje_collections));
ep = pc->parts[pc->parts_count - 1];
- switch (ep->type)
+ if (ep->type != EDJE_PART_TYPE_IMAGE)
{
- case EDJE_PART_TYPE_IMAGE:
- {
- Edje_Part_Description_Image *ed;
-
- ed = (Edje_Part_Description_Image*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->image.fill;
- break;
- }
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *ed;
-
- ed = (Edje_Part_Description_Proxy*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->proxy.fill;
- break;
- }
- default:
- {
- ERR("%s: Error. parse error %s:%i. "
- "image and proxy attributes in non-IMAGE, non-PROXY part.",
- progname, file_in, line - 1);
- exit(-1);
- }
+ ERR("%s: Error. parse error %s:%i. "
+ "image attributes in non-IMAGE part.",
+ progname, file_in, line - 1);
+ exit(-1);
}
- fill->pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
- fill->pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
+ ed = (Edje_Part_Description_Image*) ep->default_desc;
+ if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
+
+ ed->image.fill.pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
+ ed->image.fill.pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
}
/**
{
Edje_Part_Collection *pc;
Edje_Part *ep;
- Edje_Part_Description_Spec_Fill *fill;
+ Edje_Part_Description_Image *ed;
check_arg_count(2);
pc = eina_list_data_get(eina_list_last(edje_collections));
ep = pc->parts[pc->parts_count - 1];
-
- switch (ep->type)
+ if (ep->type != EDJE_PART_TYPE_IMAGE)
{
- case EDJE_PART_TYPE_IMAGE:
- {
- Edje_Part_Description_Image *ed;
-
- ed = (Edje_Part_Description_Image*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->image.fill;
- break;
- }
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *ed;
-
- ed = (Edje_Part_Description_Proxy*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->proxy.fill;
- break;
- }
- default:
- {
- ERR("%s: Error. parse error %s:%i. "
- "image and proxy attributes in non-IMAGE, non-PROXY part.",
- progname, file_in, line - 1);
- exit(-1);
- }
+ ERR("%s: Error. parse error %s:%i. "
+ "image attributes in non-IMAGE part.",
+ progname, file_in, line - 1);
+ exit(-1);
}
- fill->pos_abs_x = parse_int(0);
- fill->pos_abs_y = parse_int(1);
+ ed = (Edje_Part_Description_Image*) ep->default_desc;
+ if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
+
+ ed->image.fill.pos_abs_x = parse_int(0);
+ ed->image.fill.pos_abs_y = parse_int(1);
}
/**
{
Edje_Part_Collection *pc;
Edje_Part *ep;
- Edje_Part_Description_Spec_Fill *fill;
+ Edje_Part_Description_Image *ed;
check_arg_count(2);
pc = eina_list_data_get(eina_list_last(edje_collections));
ep = pc->parts[pc->parts_count - 1];
- switch (ep->type)
+ if (ep->type != EDJE_PART_TYPE_IMAGE)
{
- case EDJE_PART_TYPE_IMAGE:
- {
- Edje_Part_Description_Image *ed;
-
- ed = (Edje_Part_Description_Image*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->image.fill;
- break;
- }
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *ed;
-
- ed = (Edje_Part_Description_Proxy*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->proxy.fill;
- break;
- }
- default:
- {
- ERR("%s: Error. parse error %s:%i. "
- "image and proxy attributes in non-IMAGE, non-PROXY part.",
- progname, file_in, line - 1);
- exit(-1);
- }
+ ERR("%s: Error. parse error %s:%i. "
+ "image attributes in non-IMAGE part.",
+ progname, file_in, line - 1);
+ exit(-1);
}
- fill->rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
- fill->rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
+ ed = (Edje_Part_Description_Image*) ep->default_desc;
+ if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
+
+ ed->image.fill.rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
+ ed->image.fill.rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
}
/**
{
Edje_Part_Collection *pc;
Edje_Part *ep;
- Edje_Part_Description_Spec_Fill *fill;
+ Edje_Part_Description_Image *ed;
check_arg_count(2);
pc = eina_list_data_get(eina_list_last(edje_collections));
ep = pc->parts[pc->parts_count - 1];
- switch (ep->type)
+ if (ep->type != EDJE_PART_TYPE_IMAGE)
{
- case EDJE_PART_TYPE_IMAGE:
- {
- Edje_Part_Description_Image *ed;
-
- ed = (Edje_Part_Description_Image*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->image.fill;
- break;
- }
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *ed;
-
- ed = (Edje_Part_Description_Proxy*) ep->default_desc;
- if (ep->other.desc_count) ed = (Edje_Part_Description_Proxy*) ep->other.desc[ep->other.desc_count - 1];
-
- fill = &ed->proxy.fill;
- break;
- }
- default:
- {
- ERR("%s: Error. parse error %s:%i. "
- "image and proxy attributes in non-IMAGE, non-PROXY part.",
- progname, file_in, line - 1);
- exit(-1);
- }
+ ERR("%s: Error. parse error %s:%i. "
+ "image attributes in non-IMAGE part.",
+ progname, file_in, line - 1);
+ exit(-1);
}
- fill->abs_x = parse_int(0);
- fill->abs_y = parse_int(1);
+ ed = (Edje_Part_Description_Image*) ep->default_desc;
+ if (ep->other.desc_count) ed = (Edje_Part_Description_Image*) ep->other.desc[ep->other.desc_count - 1];
+
+ ed->image.fill.abs_x = parse_int(0);
+ ed->image.fill.abs_y = parse_int(1);
}
"FOCUS_OBJECT", EDJE_ACTION_TYPE_FOCUS_OBJECT,
"PARAM_COPY", EDJE_ACTION_TYPE_PARAM_COPY,
"PARAM_SET", EDJE_ACTION_TYPE_PARAM_SET,
+ "HIDE_VISIBLE_PASSWORD", EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD,
NULL);
if (ep->action == EDJE_ACTION_TYPE_STATE_SET)
{
/* this is implicitly set by script {} so this is here just for
* completeness */
break;
+ case EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD:
case EDJE_ACTION_TYPE_FOCUS_OBJECT:
case EDJE_ACTION_TYPE_FOCUS_SET:
check_arg_count(1);
data_queue_part_lookup(pc, name, &(et->id));
else if (ep->action == EDJE_ACTION_TYPE_FOCUS_OBJECT)
data_queue_part_lookup(pc, name, &(et->id));
+ else if (ep->action == EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD)
+ data_queue_part_lookup(pc, name, &(et->id));
else
{
ERR("%s: Error. parse error %s:%i. "
#include <math.h>
#include "edje_cc.h"
-#include "edje_prefix.h"
#include <Ecore.h>
#include <Ecore_File.h>
-#ifdef _WIN32
-# define EPP_EXT ".exe"
-#else
-# define EPP_EXT
-#endif
-
static void new_object(void);
static void new_statement(void);
static char *perform_math (char *input);
void
compile(void)
{
- char buf[4096], buf2[4096];
+ char buf[4096];
char inc[4096];
static char tmpn[4096];
int fd;
* Run the input through the C pre-processor.
*/
ret = -1;
- snprintf(buf2, sizeof(buf2), "%s/edje/utils/epp"EPP_EXT, e_prefix_lib_get());
- if (ecore_file_exists(buf2))
+ if (ecore_file_exists(EPP_DIR"/epp"))
{
- snprintf(buf, sizeof(buf), "%s %s -I%s %s -o %s",
- buf2, file_in, inc, def, tmpn);
+ snprintf(buf, sizeof(buf), EPP_DIR"/epp %s -I%s %s -o %s",
+ file_in, inc, def, tmpn);
ret = system(buf);
}
/*
if (ret == EXIT_SUCCESS)
file_in = tmpn;
free(def);
+/* OLD CODE
+ snprintf(buf, sizeof(buf), "cat %s | cpp -I%s %s -E -o %s",
+ file_in, inc, def, tmpn);
+ ret = system(buf);
+ if (ret < 0)
+ {
+ snprintf(buf, sizeof(buf), "gcc -I%s %s -E -o %s %s",
+ inc, def, tmpn, file_in);
+ ret = system(buf);
+ }
+ if (ret >= 0) file_in = tmpn;
+ free(def);
+ */
}
fd = open(file_in, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
eet_close(ef);
return 0;
}
- /* force compiler to be edje_cc */
- edje_file->compiler = strdup("edje_cc");
if (!edje_file->compiler)
{
edje_file->compiler = strdup("edje_cc");
return "TEXT";
case EDJE_PART_TYPE_IMAGE:
return "IMAGE";
- case EDJE_PART_TYPE_PROXY:
- return "PROXY";
case EDJE_PART_TYPE_SWALLOW:
return "SWALLOW";
case EDJE_PART_TYPE_TEXTBLOCK:
if (machine) puts("IMAGE-END");
else if (detail > 1) puts(INDENT4 "}");
}
- else if (t == EDJE_PART_TYPE_PROXY)
- {
- int x2, y2;
- double dx2, dy2;
- Eina_Bool has_orgin, has_size;
-
- if (machine) puts("PROXY-BEGIN");
- else puts(INDENT4 "proxy {");
- // TODO Support source
- // TODO support proxy.fill.smooth
-
- dx = edje_edit_state_fill_origin_relative_x_get
- (ed, part, state, value);
- dy = edje_edit_state_fill_origin_relative_y_get
- (ed, part, state, value);
- x = edje_edit_state_fill_origin_offset_x_get
- (ed, part, state, value);
- y = edje_edit_state_fill_origin_offset_y_get
- (ed, part, state, value);
-
- dx2 = edje_edit_state_fill_size_relative_x_get
- (ed, part, state, value);
- dy2 = edje_edit_state_fill_size_relative_y_get
- (ed, part, state, value);
- x2 = edje_edit_state_fill_size_offset_x_get
- (ed, part, state, value);
- y2 = edje_edit_state_fill_size_offset_y_get
- (ed, part, state, value);
-
- has_orgin = (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y));
- has_size = (FDIFF(dx2, 1.0) || FDIFF(dy2, 1.0) || (x2) || (y2));
-
- if ((has_orgin) || (has_size))
- {
- if (machine) puts("PROXY-FILL-BEGIN");
- else puts(INDENT5 "fill {");
-
- if (has_orgin)
- {
- if (machine)
- printf("ORIGIN-RELATIVE-X: %g\n"
- "ORIGIN-RELATIVE-Y: %g\n"
- "ORIGIN-OFFSET-X: %d\n"
- "ORIGIN-OFFSET-Y: %d\n",
- dx, dy, x, y);
- else
- printf(INDENT6 "origin {\n"
- INDENT7 "relative: %g %g;\n"
- INDENT7 "offset: %d %d;\n"
- INDENT6 "}\n",
- dx, dy, x, y);
- }
-
- if (has_size)
- {
- if (machine)
- printf("SIZE-RELATIVE-X: %g\n"
- "SIZE-RELATIVE-Y: %g\n"
- "SIZE-OFFSET-X: %d\n"
- "SIZE-OFFSET-Y: %d\n",
- dx2, dy2, x2, y2);
- else
- printf(INDENT6 "size {\n"
- INDENT7 "relative: %g %g;\n"
- INDENT7 "offset: %d %d;\n"
- INDENT6 "}\n",
- dx2, dy2, x2, y2);
- }
-
- if (machine) puts("PROXY-FILL-END");
- else puts(INDENT5 "}");
- }
-
- if (machine) puts("PROXY-END");
- else puts(INDENT4 "}");
- }
else if ((t == EDJE_PART_TYPE_TEXTBLOCK) || (t == EDJE_PART_TYPE_TEXT))
{
if (machine) puts("TEXT-BEGIN");
$(CWARNFLAGS)
DEFS= \
--DHAVE_CONFIG_H \
-DHAVE_STRERROR \
-DFATAL_EXIT_CODE=1 \
--DSUCCESS_EXIT_CODE=0 \
+-DSUCCESS_EXIT_CODE=1 \
-DGCC_INCLUDE_DIR=\"/usr/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/include\" \
-DTOOL_INCLUDE_DIR=\"/usr/bin\" \
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <stdlib.h>
-
+#include "config.h"
#include "cpplib.h"
static void
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
-
+#include "config.h"
#include "cpplib.h"
/* Print the file names and line numbers of the #include
/* Parse a C expression from text in a string */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "config.h"
+#include "cpplib.h"
+#include "cpphash.h"
#ifdef __EMX__
-# include <strings.h>
+#include <strings.h>
#endif
#ifdef MULTIBYTE_CHARS
-# include <locale.h>
+#include <locale.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include "cpplib.h"
-#include "cpphash.h"
-
/* This is used for communicating lists of keywords with cccp.c. */
struct arglist {
struct arglist *next;
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-
+#include "config.h"
#include "cpplib.h"
#include "cpphash.h"
static HASHNODE *hashtab[HASHSIZE];
+#include <string.h>
+#include <stdlib.h>
+
#define IS_IDCHAR(ch) is_idchar[(unsigned char)(ch)]
/*
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+const char *version_string = "0.0.0";
-#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#elif defined __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#elif defined _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-#else
-# include <stddef.h>
-void *alloca (size_t);
-#endif
+#include "config.h"
#ifdef __EMX__
#include <strings.h>
#include "cpplib.h"
#include "cpphash.h"
-const char *version_string = "0.0.0";
-
#ifndef STDC_VALUE
#define STDC_VALUE 1
#endif
#include <stdio.h>
#include <string.h>
#include <signal.h>
+#ifdef __STDC__
#include <stdlib.h>
+#endif
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef USG
#include <time.h>
#include <sys/time.h> /* for __DATE__ and __TIME__ */
-#ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
+#include <sys/resource.h>
#else
#include <sys/param.h> /* CYGNUS LOCAL: shebs -noquiet */
#include <sys/times.h>
}
else if (c == '@' && CPP_BUFFER(pfile)->has_escapes
&& is_hor_space[PEEKN(1)])
- FORWARD(1);
+ FORWARD(2);
else
return;
}
continue;
if (i < nargs || (nargs == 0 && i == 0))
{
- unsigned char *bp;
-
/* if we are working on last arg which absorbs rest of args... */
if (i == nargs - 1 && defn->rest_args)
rest_args = 1;
token = macarg(pfile, rest_args);
args[i].raw_length = CPP_WRITTEN(pfile) - args[i].raw;
args[i].newlines = 0; /* FIXME */
- bp = ARG_BASE + args[i].raw;
- while (is_space[(unsigned char)(*bp)]) { bp++; }
- args[i].raw_length -= bp - (ARG_BASE + args[i].raw);
- args[i].raw = bp - ARG_BASE;
- if (args[i].raw_length > 0)
- {
- bp = ARG_BASE + args[i].raw + args[i].raw_length - 1;
- while (is_space[(unsigned char)(*bp)])
- {
- bp--;
- args[i].raw_length--;
- if (args[i].raw_length < 1) break;
- }
- }
}
else
token = macarg(pfile, 0);
if (totlen > xbuf_len)
abort();
}
+
/* if there is anything left of the definition
* after handling the arg list, copy that in too. */
xbuf[totlen] = 0;
xbuf_len = totlen;
+
}
pfile->output_escapes--;
}
else if (CPP_TRADITIONAL(pfile))
{
- if (newlines > 0)
- {
- output_line_command(pfile, 0, same_file);
- return CPP_VSPACE;
- }
- else
- {
- return CPP_COMMENT;
- }
- }
- else if (newlines > 0)
- {
- output_line_command(pfile, 0, same_file);
- CPP_RESERVE(pfile, 1);
- CPP_PUTC_Q(pfile, ' ');
- return CPP_VSPACE;
+ return CPP_COMMENT;
}
else
{
}
else if (is_space[c])
{
- CPP_RESERVE(pfile, 1);
+ CPP_RESERVE(pfile, 2);
if (pfile->output_escapes)
CPP_PUTC_Q(pfile, '@');
+ CPP_PUTC_Q(pfile, c);
return CPP_HSPACE;
}
}
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include "config.h"
#include "cpplib.h"
#define EPP_DEBUG 0
continue;
case CPP_VSPACE:
+ if (!got_text)
+ goto next;
break;
default:
EDJE_PART_TYPE_BOX = 8,
EDJE_PART_TYPE_TABLE = 9,
EDJE_PART_TYPE_EXTERNAL = 10,
- EDJE_PART_TYPE_PROXY = 11,
- EDJE_PART_TYPE_LAST = 12
+ EDJE_PART_TYPE_LAST = 11
} Edje_Part_Type;
typedef enum _Edje_Text_Effect
EDJE_ACTION_TYPE_FOCUS_OBJECT = 10,
EDJE_ACTION_TYPE_PARAM_COPY = 11,
EDJE_ACTION_TYPE_PARAM_SET = 12,
- EDJE_ACTION_TYPE_LAST = 13
+ EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD = 13,
+ EDJE_ACTION_TYPE_LAST = 14
} Edje_Action_Type;
typedef enum _Edje_Tween_Mode
INIT_EMP_BOTH(RECTANGLE, Edje_Part_Description_Common, ce);
INIT_EMP_BOTH(TEXT, Edje_Part_Description_Text, ce);
INIT_EMP_BOTH(IMAGE, Edje_Part_Description_Image, ce);
- INIT_EMP_BOTH(PROXY, Edje_Part_Description_Proxy, ce);
INIT_EMP_BOTH(SWALLOW, Edje_Part_Description_Common, ce);
INIT_EMP_BOTH(TEXTBLOCK, Edje_Part_Description_Text, ce);
INIT_EMP_BOTH(GROUP, Edje_Part_Description_Common, ce);
EDIT_ALLOC_POOL_RTL(TEXT, Text, text);
EDIT_ALLOC_POOL_RTL(TEXTBLOCK, Text, text);
EDIT_ALLOC_POOL_RTL(IMAGE, Image, image);
- EDIT_ALLOC_POOL_RTL(PROXY, Proxy, proxy);
EDIT_ALLOC_POOL_RTL(BOX, Box, box);
EDIT_ALLOC_POOL_RTL(TABLE, Table, table);
EDIT_ALLOC_POOL_RTL(EXTERNAL, External, external_params);
}
}
if (ed->postponed) return;
- evas_object_smart_changed(ed->obj);
+ //TODO: need to find out "when", "how" ed->obj can be deleted.
+ //if ed->obj can be deleted then this expception handling is granted.
+ //otherwise, we should fix app-usage and remove this handling.
+ if (ed->obj)
+ evas_object_smart_changed(ed->obj);
ed->postponed = 1;
}
evas_object_textblock_style_insets_get(ep->object, &ins_l, &ins_r, &ins_t, &ins_b);
mw = ins_l + tw + ins_r;
mh = ins_t + th + ins_b;
- if (chosen_desc->text.min_x)
+// if (chosen_desc->text.min_x)
{
if (mw > *minw) *minw = mw;
}
- if (chosen_desc->text.min_y)
+// if (chosen_desc->text.min_y)
{
if (mh > *minh) *minh = mh;
}
static void
_edje_part_recalc_single_fill(Edje_Real_Part *ep,
- Edje_Part_Description_Spec_Fill *fill,
+ Edje_Part_Description_Spec_Image *desc,
Edje_Calc_Params *params)
{
int fw;
int fh;
- params->smooth = fill->smooth;
+ params->smooth = desc->fill.smooth;
- if (fill->type == EDJE_FILL_TYPE_TILE)
+ if (desc->fill.type == EDJE_FILL_TYPE_TILE)
evas_object_image_size_get(ep->object, &fw, NULL);
else
fw = params->w;
- params->type.common.fill.x = fill->pos_abs_x
- + TO_INT(SCALE(fill->pos_rel_x, fw));
- params->type.common.fill.w = fill->abs_x
- + TO_INT(SCALE(fill->rel_x, fw));
+ params->type.common.fill.x = desc->fill.pos_abs_x
+ + TO_INT(SCALE(desc->fill.pos_rel_x, fw));
+ params->type.common.fill.w = desc->fill.abs_x
+ + TO_INT(SCALE(desc->fill.rel_x, fw));
- if (fill->type == EDJE_FILL_TYPE_TILE)
+ if (desc->fill.type == EDJE_FILL_TYPE_TILE)
evas_object_image_size_get(ep->object, NULL, &fh);
else
fh = params->h;
- params->type.common.fill.y = fill->pos_abs_y
- + TO_INT(SCALE(fill->pos_rel_y, fh));
- params->type.common.fill.h = fill->abs_y
- + TO_INT(SCALE(fill->rel_y, fh));
+ params->type.common.fill.y = desc->fill.pos_abs_y
+ + TO_INT(SCALE(desc->fill.pos_rel_y, fh));
+ params->type.common.fill.h = desc->fill.abs_y
+ + TO_INT(SCALE(desc->fill.rel_y, fh));
- params->type.common.fill.angle = fill->angle;
- params->type.common.fill.spread = fill->spread;
+ params->type.common.fill.angle = desc->fill.angle;
+ params->type.common.fill.spread = desc->fill.spread;
}
static void
/* fill */
if (ep->part->type == EDJE_PART_TYPE_IMAGE)
- _edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Image *)desc)->image.fill, params);
- else if (ep->part->type == EDJE_PART_TYPE_PROXY)
- _edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Proxy *)desc)->proxy.fill, params);
+ _edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Image *)desc)->image, params);
/* colors */
if ((desc->color_class) && (*desc->color_class))
case EDJE_PART_TYPE_TABLE:
case EDJE_PART_TYPE_SWALLOW:
case EDJE_PART_TYPE_GROUP:
- case EDJE_PART_TYPE_PROXY:
break;
case EDJE_PART_TYPE_GRADIENT:
/* FIXME: THIS ONE SHOULD NEVER BE TRIGGERED. */
}
static void
-_edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Proxy *chosen_desc, FLOAT_T pos)
-{
- Edje_Real_Part *pp;
- int part_id;
-
- if (p3->type.common.fill.w == 0 || p3->type.common.fill.h == 0)
- {
- evas_object_image_source_set(ep->object, NULL);
- return ;
- }
-
- if (pos >= 0.5) {
- part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id;
- } else {
- part_id = chosen_desc->proxy.id;
- }
-
- pp = ed->table_parts[part_id % ed->table_parts_size];
-
- switch (pp->part->type)
- {
- case EDJE_PART_TYPE_IMAGE:
- case EDJE_PART_TYPE_TEXT:
- case EDJE_PART_TYPE_TEXTBLOCK:
- case EDJE_PART_TYPE_RECTANGLE:
- case EDJE_PART_TYPE_BOX:
- case EDJE_PART_TYPE_TABLE:
- case EDJE_PART_TYPE_PROXY:
- evas_object_image_source_set(ep->object, pp->object);
- break;
- case EDJE_PART_TYPE_GRADIENT:
- /* FIXME: THIS ONE SHOULD NEVER BE TRIGGERED. */
- break;
- case EDJE_PART_TYPE_GROUP:
- case EDJE_PART_TYPE_SWALLOW:
- case EDJE_PART_TYPE_EXTERNAL:
- evas_object_image_source_set(ep->object, pp->swallowed_object);
- break;
- }
-
- evas_object_image_fill_set(ep->object, p3->type.common.fill.x, p3->type.common.fill.y,
- p3->type.common.fill.w, p3->type.common.fill.h);
- evas_object_image_smooth_scale_set(ep->object, p3->smooth);
-}
-
-static void
_edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Image *chosen_desc, FLOAT_T pos)
{
int image_id;
switch (part_type)
{
case EDJE_PART_TYPE_IMAGE:
- p3->type.common.spec.image.l = INTP(p1->type.common.spec.image.l, p2->type.common.spec.image.l, pos);
- p3->type.common.spec.image.r = INTP(p1->type.common.spec.image.r, p2->type.common.spec.image.r, pos);
- p3->type.common.spec.image.t = INTP(p1->type.common.spec.image.t, p2->type.common.spec.image.t, pos);
- p3->type.common.spec.image.b = INTP(p1->type.common.spec.image.b, p2->type.common.spec.image.b, pos);
- case EDJE_PART_TYPE_PROXY:
p3->type.common.fill.x = INTP(p1->type.common.fill.x, p2->type.common.fill.x, pos);
p3->type.common.fill.y = INTP(p1->type.common.fill.y, p2->type.common.fill.y, pos);
p3->type.common.fill.w = INTP(p1->type.common.fill.w, p2->type.common.fill.w, pos);
p3->type.common.fill.h = INTP(p1->type.common.fill.h, p2->type.common.fill.h, pos);
+ p3->type.common.spec.image.l = INTP(p1->type.common.spec.image.l, p2->type.common.spec.image.l, pos);
+ p3->type.common.spec.image.r = INTP(p1->type.common.spec.image.r, p2->type.common.spec.image.r, pos);
+ p3->type.common.spec.image.t = INTP(p1->type.common.spec.image.t, p2->type.common.spec.image.t, pos);
+ p3->type.common.spec.image.b = INTP(p1->type.common.spec.image.b, p2->type.common.spec.image.b, pos);
break;
case EDJE_PART_TYPE_TEXT:
p3->type.text.size = INTP(p1->type.text.size, p2->type.text.size, pos);
evas_object_image_scale_hint_set(ep->object,
img_desc->image.scale_hint);
}
- case EDJE_PART_TYPE_PROXY:
case EDJE_PART_TYPE_RECTANGLE:
case EDJE_PART_TYPE_TEXTBLOCK:
case EDJE_PART_TYPE_BOX:
case EDJE_PART_TYPE_TEXT:
_edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc);
break;
- case EDJE_PART_TYPE_PROXY:
- _edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy*) chosen_desc, pos);
- break;
case EDJE_PART_TYPE_IMAGE:
_edje_image_recalc_apply(ed, ep, pf, (Edje_Part_Description_Image*) chosen_desc, pos);
break;
Eet_Data_Descriptor *_edje_edd_edje_part_description_swallow = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_group = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_image = NULL;
-Eet_Data_Descriptor *_edje_edd_edje_part_description_proxy = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_text = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_textblock = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_box = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_swallow_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_group_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_image_pointer = NULL;
-Eet_Data_Descriptor *_edje_edd_edje_part_description_proxy_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_text_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_textblock_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_box_pointer = NULL;
EMP(RECTANGLE, rectangle);
EMP(TEXT, text);
EMP(IMAGE, image);
-EMP(PROXY, proxy);
EMP(SWALLOW, swallow);
EMP(TEXTBLOCK, textblock);
EMP(GROUP, group);
{ EDJE_PART_TYPE_BOX, "box" },
{ EDJE_PART_TYPE_TABLE, "table" },
{ EDJE_PART_TYPE_EXTERNAL, "external" },
- { EDJE_PART_TYPE_PROXY, "proxy" }
};
static const char *
FREED(_edje_edd_edje_part_description_swallow);
FREED(_edje_edd_edje_part_description_group);
FREED(_edje_edd_edje_part_description_image);
- FREED(_edje_edd_edje_part_description_proxy);
FREED(_edje_edd_edje_part_description_text);
FREED(_edje_edd_edje_part_description_textblock);
FREED(_edje_edd_edje_part_description_box);
FREED(_edje_edd_edje_part_description_swallow_pointer);
FREED(_edje_edd_edje_part_description_group_pointer);
FREED(_edje_edd_edje_part_description_image_pointer);
- FREED(_edje_edd_edje_part_description_proxy_pointer);
FREED(_edje_edd_edje_part_description_text_pointer);
FREED(_edje_edd_edje_part_description_textblock_pointer);
FREED(_edje_edd_edje_part_description_box_pointer);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.RECTANGLE", count.RECTANGLE, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TEXT", count.TEXT, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.IMAGE", count.IMAGE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.PROXY", count.PROXY, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.SWALLOW", count.SWALLOW, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TEXTBLOCK", count.TEXTBLOCK, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.GROUP", count.GROUP, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.spread", image.fill.spread, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.type", image.fill.type, EET_T_CHAR);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Proxy);
- eddc.func.mem_free = mem_free_proxy;
- eddc.func.mem_alloc = mem_alloc_proxy;
- _edje_edd_edje_part_description_proxy =
- eet_data_descriptor_file_new(&eddc);
- EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, common);
-
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.id", proxy.id, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.smooth", proxy.fill.smooth, EET_T_CHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.pos_rel_x", proxy.fill.pos_rel_x, EDJE_T_FLOAT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.pos_abs_x", proxy.fill.pos_abs_x, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.rel_x", proxy.fill.rel_x, EDJE_T_FLOAT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.abs_x", proxy.fill.abs_x, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.pos_rel_y", proxy.fill.pos_rel_y, EDJE_T_FLOAT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.pos_abs_y", proxy.fill.pos_abs_y, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.rel_y", proxy.fill.rel_y, EDJE_T_FLOAT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.abs_y", proxy.fill.abs_y, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.angle", proxy.fill.angle, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.spread", proxy.fill.spread, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.type", proxy.fill.type, EET_T_CHAR);
-
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text);
eddc.func.mem_free = mem_free_text;
eddc.func.mem_alloc = mem_alloc_text;
EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_swallow);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_group);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Image, part_description_image);
- EDJE_DEFINE_POINTER_TYPE(Part_Description_Proxy, part_description_proxy);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Text, part_description_text);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Text, part_description_textblock);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Box, part_description_box);
EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "swallow", _edje_edd_edje_part_description_swallow);
EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "group", _edje_edd_edje_part_description_group);
EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "image", _edje_edd_edje_part_description_image);
- EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "proxy", _edje_edd_edje_part_description_proxy);
EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "text", _edje_edd_edje_part_description_text);
EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "textblock", _edje_edd_edje_part_description_textblock);
EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "box", _edje_edd_edje_part_description_box);
EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "swallow", swallow);
EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "group", group);
EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "image", image);
- EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "proxy", proxy);
EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "text", text);
EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "textblock", textblock);
EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "box", box);
if (ep->type == EDJE_PART_TYPE_RECTANGLE)
rp->object = evas_object_rectangle_add(ed->evas);
- else if (ep->type == EDJE_PART_TYPE_IMAGE || ep->type == EDJE_PART_TYPE_PROXY)
+ else if (ep->type == EDJE_PART_TYPE_IMAGE)
rp->object = evas_object_image_add(ed->evas);
else if (ep->type == EDJE_PART_TYPE_TEXT)
{
img->image.fill.spread = 0;
img->image.fill.type = EDJE_FILL_TYPE_SCALE;
}
- else if (rp->part->type == EDJE_PART_TYPE_PROXY)
- {
- Edje_Part_Description_Proxy *pro;
-
- pro = (Edje_Part_Description_Proxy*) pd;
-
- memset(&pro->proxy, 0, sizeof (pro->proxy));
-
- pro->proxy.id = -1;
- pro->proxy.fill.smooth = 1;
- pro->proxy.fill.pos_rel_x = 0.0;
- pro->proxy.fill.pos_abs_x = 0;
- pro->proxy.fill.rel_x = 1.0;
- pro->proxy.fill.abs_x = 0;
- pro->proxy.fill.pos_rel_y = 0.0;
- pro->proxy.fill.pos_abs_y = 0;
- pro->proxy.fill.rel_y = 1.0;
- pro->proxy.fill.abs_y = 0;
- pro->proxy.fill.angle = 0;
- pro->proxy.fill.spread = 0;
- pro->proxy.fill.type = EDJE_FILL_TYPE_SCALE;
- }
else if (rp->part->type == EDJE_PART_TYPE_EXTERNAL)
{
Edje_Part_Description_External *external;
switch (rp->part->type)
{
- case EDJE_PART_TYPE_PROXY:
- {
- Edje_Part_Description_Proxy *pro_to = (Edje_Part_Description_Proxy*) pdto;
- Edje_Part_Description_Proxy *pro_from = (Edje_Part_Description_Proxy*) pdfrom;
-
- pro_to->proxy = pro_from->proxy;
-
- break;
- }
case EDJE_PART_TYPE_IMAGE:
{
Edje_Part_Description_Image *img_to = (Edje_Part_Description_Image*) pdto;
EAPI double \
edje_edit_state_fill_##Type##_relative_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \
{ \
+ Edje_Part_Description_Image *img; \
+ \
eina_error_set(0); \
\
GET_PD_OR_RETURN(0); \
\
- switch (rp->part->type) \
- { \
- case EDJE_PART_TYPE_IMAGE: \
- { \
- Edje_Part_Description_Image *img; \
- \
- img = (Edje_Part_Description_Image*) pd; \
- \
- return TO_DOUBLE(img->image.fill.Class##rel_##Value); \
- } \
- case EDJE_PART_TYPE_PROXY: \
- { \
- Edje_Part_Description_Proxy *pro; \
+ if (rp->part->type != EDJE_PART_TYPE_IMAGE) \
+ return 0; \
\
- pro = (Edje_Part_Description_Proxy*) pd; \
+ img = (Edje_Part_Description_Image*) pd; \
\
- return TO_DOUBLE(pro->proxy.fill.Class##rel_##Value); \
- } \
- } \
- \
- return 0; \
+ return TO_DOUBLE(img->image.fill.Class##rel_##Value); \
} \
EAPI void \
edje_edit_state_fill_##Type##_relative_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
{ \
+ Edje_Part_Description_Image *img; \
+ \
eina_error_set(0); \
\
GET_PD_OR_RETURN(); \
\
- switch (rp->part->type) \
- { \
- case EDJE_PART_TYPE_IMAGE: \
- { \
- Edje_Part_Description_Image *img; \
- \
- img = (Edje_Part_Description_Image*) pd; \
- \
- img->image.fill.Class##rel_##Value = FROM_DOUBLE(v); \
- \
- break; \
- } \
- case EDJE_PART_TYPE_PROXY: \
- { \
- Edje_Part_Description_Proxy *pro; \
- \
- pro = (Edje_Part_Description_Proxy*) pd; \
- \
- pro->proxy.fill.Class##rel_##Value = FROM_DOUBLE(v); \
+ if (rp->part->type != EDJE_PART_TYPE_IMAGE) \
+ return; \
\
- break; \
- } \
- default: \
- return; \
- } \
+ img = (Edje_Part_Description_Image*) pd; \
\
+ img->image.fill.Class##rel_##Value = FROM_DOUBLE(v); \
edje_object_calc_force(obj); \
}
EAPI int \
edje_edit_state_fill_##Type##_offset_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \
{ \
+ Edje_Part_Description_Image *img; \
+ \
eina_error_set(0); \
\
GET_PD_OR_RETURN(0); \
\
- switch (rp->part->type) \
- { \
- case EDJE_PART_TYPE_IMAGE: \
- { \
- Edje_Part_Description_Image *img; \
- \
- img = (Edje_Part_Description_Image*) pd; \
- \
- return img->image.fill.Class##abs_##Value; \
- } \
- case EDJE_PART_TYPE_PROXY: \
- { \
- Edje_Part_Description_Proxy *pro; \
+ if (rp->part->type != EDJE_PART_TYPE_IMAGE) \
+ return 0; \
\
- pro = (Edje_Part_Description_Proxy*) pd; \
+ img = (Edje_Part_Description_Image*) pd; \
\
- return pro->proxy.fill.Class##abs_##Value; \
- } \
- } \
- return 0; \
+ return img->image.fill.Class##abs_##Value; \
} \
EAPI void \
edje_edit_state_fill_##Type##_offset_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
{ \
+ Edje_Part_Description_Image *img; \
+ \
eina_error_set(0); \
\
GET_PD_OR_RETURN(); \
\
- switch (rp->part->type) \
- { \
- case EDJE_PART_TYPE_IMAGE: \
- { \
- Edje_Part_Description_Image *img; \
- \
- img = (Edje_Part_Description_Image*) pd; \
- \
- img->image.fill.Class##abs_##Value = FROM_DOUBLE(v); \
- return; \
- } \
- case EDJE_PART_TYPE_PROXY: \
- { \
- Edje_Part_Description_Proxy *pro; \
- \
- pro = (Edje_Part_Description_Proxy*) pd; \
+ if (rp->part->type != EDJE_PART_TYPE_IMAGE) \
+ return; \
\
- pro->proxy.fill.Class##abs_##Value = FROM_DOUBLE(v); \
- return; \
- } \
- default: \
- return; \
- } \
+ img = (Edje_Part_Description_Image*) pd; \
\
+ img->image.fill.Class##abs_##Value = FROM_DOUBLE(v); \
edje_object_calc_force(obj); \
}
//Fill
BUF_APPEND(I5"fill {\n");
- if (!img->image.fill.smooth)
+ if (rp->part->type == EDJE_PART_TYPE_IMAGE && !img->image.fill.smooth)
BUF_APPEND(I6"smooth: 0;\n");
//TODO Support spread
BUF_APPEND(I5"}\n");
}
- if (rp->part->type == EDJE_PART_TYPE_PROXY)
- {
- Edje_Part_Description_Proxy *pro;
-
- pro = (Edje_Part_Description_Proxy *) pd;
-
- //Fill
-
- BUF_APPEND(I5"fill {\n");
- if (!pro->proxy.fill.smooth)
- BUF_APPEND(I6"smooth: 0;\n");
- //TODO Support spread
- //TODO Support source
-
- if (pro->proxy.fill.pos_rel_x || pro->proxy.fill.pos_rel_y ||
- pro->proxy.fill.pos_abs_x || pro->proxy.fill.pos_abs_y)
- {
- BUF_APPEND(I6"origin {\n");
- if (pro->proxy.fill.pos_rel_x || pro->proxy.fill.pos_rel_y)
- BUF_APPENDF(I7"relative: %g %g;\n", TO_DOUBLE(pro->proxy.fill.pos_rel_x), TO_DOUBLE(pro->proxy.fill.pos_rel_y));
- if (pro->proxy.fill.pos_abs_x || pro->proxy.fill.pos_abs_y)
- BUF_APPENDF(I7"offset: %d %d;\n", pro->proxy.fill.pos_abs_x, pro->proxy.fill.pos_abs_y);
- BUF_APPEND(I6"}\n");
- }
-
- if (TO_DOUBLE(pro->proxy.fill.rel_x) != 1.0 || TO_DOUBLE(pro->proxy.fill.rel_y) != 1.0 ||
- pro->proxy.fill.abs_x || pro->proxy.fill.abs_y)
- {
- BUF_APPEND(I6"size {\n");
- if (pro->proxy.fill.rel_x != 1.0 || pro->proxy.fill.rel_y != 1.0)
- BUF_APPENDF(I7"relative: %g %g;\n", TO_DOUBLE(pro->proxy.fill.rel_x), TO_DOUBLE(pro->proxy.fill.rel_y));
- if (pro->proxy.fill.abs_x || pro->proxy.fill.abs_y)
- BUF_APPENDF(I7"offset: %d %d;\n", pro->proxy.fill.abs_x, pro->proxy.fill.abs_y);
- BUF_APPEND(I6"}\n");
- }
-
- BUF_APPEND(I5"}\n");
- }
-
//Text
if (rp->part->type == EDJE_PART_TYPE_TEXT)
{
Evas_Textblock_Cursor *sel_start, *sel_end;
Evas_Textblock_Cursor *cursor_user, *cursor_user_extra;
Evas_Textblock_Cursor *preedit_start, *preedit_end;
- Ecore_Timer *pw_timer;
Eina_List *sel;
Eina_List *anchors;
Eina_List *anchorlist;
evas_object_show(ob);
sel->obj_bg = ob;
en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, sel->obj_bg);
-
+
ob = edje_object_add(en->rp->edje->evas);
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source6);
evas_object_smart_member_add(ob, smart);
evas_object_show(ob);
sel->obj_fg = ob;
en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, sel->obj_fg);
-
+
ob = evas_object_rectangle_add(en->rp->edje->evas);
evas_object_color_set(ob, 0, 0, 0, 0);
evas_object_smart_member_add(ob, smart);
if (an->item)
{
Evas_Coord cx, cy, cw, ch;
-
+
if (!evas_textblock_cursor_format_item_geometry_get
(an->start, &cx, &cy, &cw, &ch))
continue;
else
{
Evas_Textblock_Rectangle *r;
-
+
r = range->data;
*(&(sel->rect)) = *r;
if (sel->obj_bg)
{
if (an)
{
- /*
+ /*
if (!firsttext)
{
if (an->name) free(an->name);
void
_edje_entry_hide_visible_password(Edje_Real_Part *rp)
{
+ Entry *en = rp->entry_data;/*remove this line*/
const Evas_Object_Textblock_Node_Format *node;
node = evas_textblock_node_format_first_get(rp->object);
for (; node ; node = evas_textblock_node_format_next_get(node))
}
}
}
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(rp);
_edje_emit(rp->edje, "entry,changed", rp->part->name);
-}
-
-static Eina_Bool
-_password_timer_cb(void *data)
-{
- Entry *en = (Entry *)data;
- _edje_entry_hide_visible_password(en->rp);
- /*count characters*/
+ /*remove the below 2 lines*/
if (en->func)
en->func(en->data, NULL);
- en->pw_timer = NULL;
- return ECORE_CALLBACK_CANCEL;
}
static void
// if PASSWORD_SHOW_LAST_CHARACTER mode, appending it with password tag
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD_SHOW_LAST_CHARACTER)
- {
- _edje_entry_hide_visible_password(en->rp);
- /*if inputtin text is not allowed, dont allow text input*/
- if (en->func)
- if (en->func(en->data, (void *)ev->string))
- return;
- evas_object_textblock_text_markup_prepend(en->cursor, "<password=off>");
- evas_object_textblock_text_markup_prepend(en->cursor, ev->string);
- evas_object_textblock_text_markup_prepend(en->cursor, "</password>");
- if (en->pw_timer)
- {
- ecore_timer_del(en->pw_timer);
- en->pw_timer = NULL;
- }
- en->pw_timer = ecore_timer_add(2.0, _password_timer_cb, en);
+ {
+ _edje_entry_hide_visible_password(en->rp);
+ /*remove the below 3 lines*/
+ if (en->func)
+ if (en->func(en->data, (void *)ev->string))
+ return;
+ _text_filter_format_prepend(en, en->cursor, "+ password=off");
+ _text_filter_markup_prepend(en, en->cursor, ev->string);
+ _text_filter_format_prepend(en, en->cursor, "- password");
}
else
{
- /*if inputtin text is not allowed, dont allow text input*/
+ /*remove the below 3 lines*/
if (en->func)
if (en->func(en->data, (void *)ev->string))
return;
str = eina_strbuf_new();
ct = _edje_entry_cursor_content_get(rp, EDJE_CURSOR_MAIN);
- if (!ct || strlen(ct) == 0) return;
+ if (!ct || strlen(ct) == 0)
+ {
+ if (_edje_entry_cursor_prev(rp, EDJE_CURSOR_MAIN))
+ {
+ ct = _edje_entry_cursor_content_get(rp, EDJE_CURSOR_MAIN);
+ if (!ct || strlen(ct) == 0) return;
+ }
+ else
+ return;
+ }
block_type = _get_char_type(ct);
static void
_edje_entry_mouse_double_clicked(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
- Edje* ed = data;
- Edje_Real_Part *rp = ed->focused_part;
+ Edje_Real_Part *rp = data;
Entry *en;
if (!rp) return;
en = rp->entry_data;
{
Edje_Real_Part *rp = data;
Entry *en;
- if (!rp) return;
+ if (!rp) return ECORE_CALLBACK_CANCEL;
en = rp->entry_data;
if (en->longpress_timer)
{
ecore_timer_del(en->longpress_timer);
en->longpress_timer = NULL;
- }
-
+ }
+
en->long_pressed = EINA_TRUE;
en->longpress_timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
}
static void
en = rp->entry_data;
en->double_clicked = EINA_FALSE;
en->long_pressed = EINA_FALSE;
-
+
if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) ||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
return;
return;
}
#endif
-
+
en->select_mod_start = EINA_FALSE;
en->select_mod_end = EINA_FALSE;
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT)
evas_object_geometry_get(rp->object, &x, &y, &w, &h);
en->cx = ev->canvas.x - x;
en->cy = ev->canvas.y - y;
-
+
if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
{
evas_textblock_cursor_char_coord_set(en->cursor, en->cx, en->cy);
{
Evas_Coord lx, ly, lw, lh;
int line;
-
+
line = evas_textblock_cursor_line_coord_set(en->cursor, en->cy);
if (line == -1)
_curs_end(en->cursor, rp->object, en);
else
{
int lnum;
-
+
lnum = evas_textblock_cursor_line_geometry_get(en->cursor, &lx, &ly, &lw, &lh);
if (lnum < 0)
{
}
if (dosel)
{
- if ((en->have_selection) &&
+ if ((en->have_selection) &&
((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT)))
{
Eina_List *first, *last;
FLOAT_T sc;
-
+
first = en->sel;
last = eina_list_last(en->sel);
if (first && last)
{
Evas_Textblock_Rectangle *r1, *r2;
Evas_Coord d, d1, d2;
-
+
r1 = first->data;
r2 = last->data;
d = r1->x - en->cx;
if (sc == ZERO) sc = _edje_scale;
d = (Evas_Coord)MUL(FROM_INT(20), sc); // FIXME: maxing number!
d = d * d;
-
+
if (d1 < d2)
{
if (d1 <= d)
if (en->rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
{
- if (en->longpress_timer) ecore_timer_del(en->longpress_timer);
- en->longpress_timer = ecore_timer_add(1.0, _long_press, data);
+ if (en->longpress_timer) ecore_timer_del(en->longpress_timer);
+ en->longpress_timer = ecore_timer_add(1.0, _long_press, data);
}
else
- _edje_entry_real_part_configure(rp);
+ _edje_entry_real_part_configure(rp);
}
static void
}
if (en->double_clicked) return;
- if (en->long_pressed) return;
+ if (en->long_pressed)
+ {
+ en->long_pressed = EINA_FALSE;
+ return;
+ }
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
if (rp->part->select_mode != EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
{
if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT))
- {
+ {
if (en->select_allow)
{
if (en->had_sel)
}
else
evas_textblock_cursor_copy(en->cursor, en->sel_end);
-
+
if (en->selecting)
{
if (en->have_selection)
#endif
_caps_mode_check(en);
-
+
_edje_entry_real_part_configure(rp);
}
return;
}
#endif
-
+
if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE)
{
_edje_entry_real_part_configure(rp);
+ if (en->long_pressed)
+ {
+ tc = evas_object_textblock_cursor_new(rp->object);
+ evas_textblock_cursor_copy(en->cursor, tc);
+ evas_object_geometry_get(rp->object, &x, &y, &w, &h);
+
+ en->cx = ev->cur.canvas.x - x;
+ en->cy = ev->cur.canvas.y - y;
+ evas_textblock_cursor_char_coord_set(en->cursor, en->cx, en->cy);
+
+ if (evas_textblock_cursor_compare(tc, en->cursor))
+ _edje_emit(rp->edje, "cursor,changed", rp->part->name);
+ evas_textblock_cursor_free(tc);
+
+ _edje_emit(en->rp->edje, "magnifier,changed", en->rp->part->name);
+ }
}
else
{
else
_curs_lin_end(en->cursor, rp->object, en);
}
-
+
if ((rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_EXPLICIT) ||
(rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
{
}
_edje_entry_real_part_configure(rp);
-
+
_edje_emit(en->rp->edje, "handler,moving", en->rp->part->name);
}
}
_edje_entry_real_part_configure(rp);
+
+ _edje_emit(en->rp->edje, "handler,moving", en->rp->part->name);
}
static void
{
ob = edje_object_add(en->rp->edje->evas);
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source3);
- evas_object_smart_member_add(ob, smart);
- evas_object_stack_above(ob, rp->object);
+ evas_object_layer_set(ob, EVAS_LAYER_MAX - 2);
en->block_handler_top = ob;
en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, en->block_handler_top);
evas_object_event_callback_add(ob, EVAS_CALLBACK_MOUSE_DOWN, _edje_entry_top_handler_mouse_down_cb, en->rp);
{
ob = edje_object_add(en->rp->edje->evas);
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source2);
- evas_object_smart_member_add(ob, smart);
- evas_object_stack_above(ob, rp->object);
+ evas_object_layer_set(ob, EVAS_LAYER_MAX - 2);
en->block_handler_btm = ob;
en->rp->edje->subobjs = eina_list_append(en->rp->edje->subobjs, en->block_handler_btm);
evas_object_event_callback_add(ob, EVAS_CALLBACK_MOUSE_DOWN, _edje_entry_bottom_handler_mouse_down_cb, en->rp);
}
done:
en->cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(rp->object);
-
+
edje_object_signal_callback_add(rp->edje->obj, "mouse,down,1,double", rp->part->name, _edje_entry_mouse_double_clicked, rp);
}
#endif
rp->edje->subobjs = eina_list_remove(rp->edje->subobjs, en->cursor_bg);
rp->edje->subobjs = eina_list_remove(rp->edje->subobjs, en->cursor_fg);
+ rp->edje->subobjs = eina_list_remove(rp->edje->subobjs, en->block_handler_top);
+ rp->edje->subobjs = eina_list_remove(rp->edje->subobjs, en->block_handler_btm);
evas_object_del(en->cursor_bg);
evas_object_del(en->cursor_fg);
- if (en->pw_timer)
+ if (en->block_handler_top)
+ evas_object_del(en->block_handler_top);
+ if (en->block_handler_btm)
+ evas_object_del(en->block_handler_btm);
+
+ if (en->longpress_timer)
{
- ecore_timer_del(en->pw_timer);
- en->pw_timer = NULL;
+ ecore_timer_del(en->longpress_timer);
+ en->longpress_timer = NULL;
}
+
#ifdef HAVE_ECORE_IMF
if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE)
{
#endif
_edje_entry_real_part_configure(rp);
-
+
en->select_allow = EINA_TRUE;
en->had_sel = EINA_TRUE;
+
+ _edje_emit(en->rp->edje, "selection,end", en->rp->part->name);
}
void
return;
en->select_allow = allow;
-
+
if ((allow) && (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_BLOCK_HANDLE))
{
_edje_entry_select_word(rp);
{
Entry *en = rp->entry_data;
if (!en) return;
-
+
en->func = func;
en->data = data;
}
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD_SHOW_LAST_CHARACTER)
{
- _edje_entry_hide_visible_password(en->rp);
+ _edje_entry_hide_visible_password(en->rp);
/* if inputtin text is not allowed, dont allow text input */
if (en->func)
{
- if (en->func(en->data, (void *)ev->str)) return ECORE_CALLBACK_PASS_ON;
+ if (en->func(en->data, (void *)ev->str)) return ECORE_CALLBACK_PASS_ON;
}
- evas_object_textblock_text_markup_prepend(en->cursor, "<password=off>");
- evas_object_textblock_text_markup_prepend(en->cursor, ev->str);
- evas_object_textblock_text_markup_prepend(en->cursor, "</password>");
-
- if (en->pw_timer)
- {
- ecore_timer_del(en->pw_timer);
- en->pw_timer = NULL;
- }
- en->pw_timer = ecore_timer_add(2.0, _password_timer_cb, en);
+ _text_filter_format_prepend(en, tc, "+ password=off");
+ _text_filter_markup_prepend(en, tc, ev->str);
+ _text_filter_format_prepend(en, tc, "- password");
}
else
{
if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON;
-// ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &cursor_pos);
ecore_imf_context_preedit_string_with_attributes_get(en->imf_context, &preedit_string, &attrs, &cursor_pos);
if (!strcmp(preedit_string, ""))
/* insert preedit character(s) */
//xx
- if (strlen(preedit_string) > 0)
+ if (strlen(preedit_string) > 0)
{
buf = eina_strbuf_new();
if (attrs)
evas_textblock_cursor_pos_set(en->cursor, preedit_start_pos + cursor_pos);
}
- /* count characters*/
+ /* count characters*/
if (en->func)
en->func(en->data, NULL);
case EDJE_PART_TYPE_RECTANGLE:
rp->object = evas_object_rectangle_add(ed->evas);
break;
- case EDJE_PART_TYPE_PROXY:
case EDJE_PART_TYPE_IMAGE:
rp->object = evas_object_image_add(ed->evas);
break;
eina_mempool_del(ce->mp.RECTANGLE);
eina_mempool_del(ce->mp.TEXT);
eina_mempool_del(ce->mp.IMAGE);
- eina_mempool_del(ce->mp.PROXY);
eina_mempool_del(ce->mp.SWALLOW);
eina_mempool_del(ce->mp.TEXTBLOCK);
eina_mempool_del(ce->mp.GROUP);
eina_mempool_del(ce->mp_rtl.RECTANGLE);
eina_mempool_del(ce->mp_rtl.TEXT);
eina_mempool_del(ce->mp_rtl.IMAGE);
- eina_mempool_del(ce->mp_rtl.PROXY);
eina_mempool_del(ce->mp_rtl.SWALLOW);
eina_mempool_del(ce->mp_rtl.TEXTBLOCK);
eina_mempool_del(ce->mp_rtl.GROUP);
FREE_POOL(RECTANGLE, ce, desc);
FREE_POOL(TEXT, ce, desc);
FREE_POOL(IMAGE, ce, desc);
- FREE_POOL(PROXY, ce, desc);
FREE_POOL(SWALLOW, ce, desc);
FREE_POOL(TEXTBLOCK, ce, desc);
FREE_POOL(GROUP, ce, desc);
typedef struct _Edje_Part_Dragable Edje_Part_Dragable;
typedef struct _Edje_Part_Image_Id Edje_Part_Image_Id;
typedef struct _Edje_Part_Description_Image Edje_Part_Description_Image;
-typedef struct _Edje_Part_Description_Proxy Edje_Part_Description_Proxy;
typedef struct _Edje_Part_Description_Text Edje_Part_Description_Text;
typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box;
typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table;
typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill;
typedef struct _Edje_Part_Description_Spec_Border Edje_Part_Description_Spec_Border;
typedef struct _Edje_Part_Description_Spec_Image Edje_Part_Description_Spec_Image;
-typedef struct _Edje_Part_Description_Spec_Proxy Edje_Part_Description_Spec_Proxy;
typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text;
typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_Box;
typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table;
TYPE RECTANGLE; \
TYPE TEXT; \
TYPE IMAGE; \
- TYPE PROXY; \
TYPE SWALLOW; \
TYPE TEXTBLOCK; \
TYPE GROUP; \
struct _Edje_Part_Description_Spec_Image
{
- Edje_Part_Description_Spec_Fill fill;
-
Edje_Part_Image_Id **tweens; /* list of Edje_Part_Image_Id */
unsigned int tweens_count; /* number of tweens */
Eina_Bool set; /* if image condition it's content */
Edje_Part_Description_Spec_Border border;
-};
-
-struct _Edje_Part_Description_Spec_Proxy
-{
Edje_Part_Description_Spec_Fill fill;
-
- int id; /* the part id to use as a source for this state */
};
struct _Edje_Part_Description_Spec_Text
Edje_Part_Description_Spec_Image image;
};
-struct _Edje_Part_Description_Proxy
-{
- Edje_Part_Description_Common common;
- Edje_Part_Description_Spec_Proxy proxy;
-};
-
struct _Edje_Part_Description_Text
{
Edje_Part_Description_Common common;
typedef Eina_Bool(*Edje_elm_function) (void *data, void *input_data);
struct _Edje
{
- Evas_Object *clipper; /* a big rect to clip this Edje to */
- Evas *evas; /* the Evas this Edje belongs to */
const Edje_Smart_Api *api;
const char *path;
const char *group;
Evas_Coord x, y, w, h;
Edje_Size min;
double paused_at;
+ Evas *evas; /* the Evas this Edje belongs to */
Evas_Object *obj; /* the smart object */
+ Evas_Object *clipper; /* a big rect to clip this Edje to */
Edje_File *file; /* the file the data comes form */
Edje_Part_Collection *collection; /* the description being used */
Eina_List *actions; /* currently running actions */
extern Eina_Mempool *_emp_RECTANGLE;
extern Eina_Mempool *_emp_TEXT;
extern Eina_Mempool *_emp_IMAGE;
-extern Eina_Mempool *_emp_PROXY;
extern Eina_Mempool *_emp_SWALLOW;
extern Eina_Mempool *_emp_TEXTBLOCK;
extern Eina_Mempool *_emp_GROUP;
Edje_Real_Part *_edje_real_part_get(const Edje *ed, const char *part);
Edje_Real_Part *_edje_real_part_recursive_get(const Edje *ed, const char *part);
+Edje *_edje_recursive_get(Edje *ed, const char *part, Edje_Real_Part **orp);
Edje_Color_Class *_edje_color_class_find(Edje *ed, const char *color_class);
void _edje_color_class_member_add(Edje *ed, const char *color_class);
void _edje_color_class_member_del(Edje *ed, const char *color_class);
void _edje_text_class_members_free(void);
void _edje_text_class_hash_free(void);
-Edje *_edje_fetch(const Evas_Object *obj) EINA_PURE;
+Edje *_edje_fetch(const Evas_Object *obj);
int _edje_freeze(Edje *ed);
int _edje_thaw(Edje *ed);
int _edje_block(Edje *ed);
if (_edje_block_break(ed)) goto break_prog;
}
break;
+ case EDJE_ACTION_TYPE_HIDE_VISIBLE_PASSWORD:
+ {
+ Edje_Real_Part *part;
+ part = ed->table_parts[pr->param.dst % ed->table_parts_size];
+ _edje_entry_hide_visible_password(part);
+ }
+ break;
default:
// _edje_emit(ed, "program,start", pr->name);
// _edje_emit(ed, "program,stop", pr->name);
if (ed->delete_me) return;
- sep = strchr(sig, EDJE_PART_PATH_SEPARATOR);
+ sep = strrchr(sig, EDJE_PART_PATH_SEPARATOR);
/* If we are not sending the signal to a part of the child, the
* signal if for ourself
if (sep)
{
Edje_Real_Part *rp = NULL;
- const char *newsig;
Edje *ed2;
- char *part;
- char *idx;
+ char *newsig;
size_t length;
+ char *part;
- /* the signal contains a colon, split the signal into "parts:signal" */
- length = sep - sig + 1;
+ /* the signal contains a colon, split the signal into "parts:signal",
+ * use _edje_real_part_recursive_get_helper to find the real part.
+ */
+ length = strlen(sig) + 1;
part = alloca(length);
- memcpy(part, sig, length - 1);
- part[length - 1] = '\0';
+ memcpy(part, sig, length);
- newsig = sep + 1;
+ newsig = part + (sep - sig);
- /* lookup for alias */
- if (ed->collection && ed->collection->alias)
- {
- char *alias;
-
- alias = eina_hash_find(ed->collection->alias, part);
- if (alias) {
- char *aliased;
- int alien;
- int nslen;
-
- alien = strlen(alias);
- nslen = strlen(newsig);
- length = alien + nslen + 2;
-
- aliased = alloca(length);
- memcpy(aliased, alias, alien);
- aliased[alien] = EDJE_PART_PATH_SEPARATOR;
- memcpy(aliased + alien + 1, newsig, nslen + 1);
-
- _edje_emit(ed, aliased, src);
- return;
- }
- }
+ *newsig = '\0';
+ newsig++;
- /* search for the index if present and remove it from the part */
- idx = strchr(part, EDJE_PART_PATH_SEPARATOR_INDEXL);
- if (idx)
+ ed2 = _edje_recursive_get(ed, part, &rp);
+ if (ed2 && ed2 != ed)
{
- char *end;
-
- end = strchr(idx + 1, EDJE_PART_PATH_SEPARATOR_INDEXR);
- if (end && end != idx + 1)
- {
- char *tmp;
-
- tmp = alloca(end - idx - 1);
- memcpy(tmp, idx + 1, end - idx - 1);
- tmp[end - idx - 1] = '\0';
- *idx = '\0';
- idx = tmp;
- }
- else
- {
- idx = NULL;
- }
+ _edje_emit(ed2, newsig, src);
}
-
- /* search for the right part now */
- rp = _edje_real_part_get(ed, part);
- if (!rp) goto end;
-
- switch (rp->part->type)
+ else if (rp)
{
- case EDJE_PART_TYPE_GROUP:
- if (!rp->swallowed_object) goto end;
- ed2 = _edje_fetch(rp->swallowed_object);
- if (!ed2) goto end;
+ switch (rp->part->type)
+ {
+ case EDJE_PART_TYPE_EXTERNAL:
+ if (!rp->swallowed_object) break ;
- _edje_emit(ed2, newsig, src);
- break;
+ _edje_external_signal_emit(rp->swallowed_object, newsig, src);
+ break ;
+ case EDJE_PART_TYPE_BOX:
+ case EDJE_PART_TYPE_TABLE:
+ _edje_emit(rp->edje, newsig, src);
+ break ;
+ case EDJE_PART_TYPE_GROUP:
+ if (!rp->swallowed_object) break;
- case EDJE_PART_TYPE_EXTERNAL:
- if (!rp->swallowed_object) break ;
+ ed2 = _edje_fetch(rp->swallowed_object);
+ if (!ed2) break;
- if (!idx)
- {
- _edje_external_signal_emit(rp->swallowed_object, newsig, src);
- }
- else
- {
- Evas_Object *child;
-
- child = _edje_children_get(rp, idx);
- ed2 = _edje_fetch(child);
- if (!ed2) goto end;
- _edje_emit(ed2, newsig, src);
- }
- break ;
-
- case EDJE_PART_TYPE_BOX:
- case EDJE_PART_TYPE_TABLE:
- if (idx)
- {
- Evas_Object *child;
-
- child = _edje_children_get(rp, idx);
- ed2 = _edje_fetch(child);
- if (!ed2) goto end;
_edje_emit(ed2, newsig, src);
- }
- break ;
-
- default:
- fprintf(stderr, "SPANK SPANK SPANK !!!\nYou should never be here !\n");
- break;
+ break ;
+ default:
+ fprintf(stderr, "SPANK SPANK SPANK !!!\nYou should never be here !\n");
+ break;
+ }
}
}
- end:
emsg.sig = sig;
emsg.src = src;
_edje_message_send(ed, EDJE_QUEUE_SCRIPT, EDJE_MESSAGE_SIGNAL, 0, &emsg);
static void _edje_smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h);
static void _edje_smart_show(Evas_Object * obj);
static void _edje_smart_hide(Evas_Object * obj);
+static void _edje_smart_color_set(Evas_Object * obj, int r, int g, int b, int a);
+static void _edje_smart_clip_set(Evas_Object * obj, Evas_Object * clip);
+static void _edje_smart_clip_unset(Evas_Object * obj);
static void _edje_smart_calculate(Evas_Object * obj);
static Eina_Bool _edje_smart_file_set(Evas_Object *obj, const char *file, const char *group);
static Edje_Smart_Api _edje_smart_class = EDJE_SMART_API_INIT_NAME_VERSION("edje");
-static Evas_Smart_Class _edje_smart_parent;
static Evas_Smart *_edje_smart = NULL;
Eina_List *_edje_edjes = NULL;
Evas_Object *e;
if (!_edje_smart)
{
- memset(&_edje_smart_parent, 0, sizeof(_edje_smart_parent));
_edje_object_smart_set(&_edje_smart_class);
_edje_smart = evas_smart_class_new((Evas_Smart_Class *)&_edje_smart_class);
}
e = evas_object_smart_add(evas, _edje_smart);
+ ed = _edje_fetch(e);
return e;
}
if (!sc)
return;
- evas_object_smart_clipped_smart_set(&sc->base);
-
- _edje_smart_parent.add = sc->base.add; /* Save parent class */
sc->base.add = _edje_smart_add;
- _edje_smart_parent.del = sc->base.del; /* Save parent class */
sc->base.del = _edje_smart_del;
- /* we'll handle move thank you */
sc->base.move = _edje_smart_move;
sc->base.resize = _edje_smart_resize;
- _edje_smart_parent.show = sc->base.show; /* Save parent class */
sc->base.show = _edje_smart_show;
- _edje_smart_parent.hide = sc->base.hide; /* Save parent class */
sc->base.hide = _edje_smart_hide;
+ sc->base.color_set = _edje_smart_color_set;
+ sc->base.clip_set = _edje_smart_clip_set;
+ sc->base.clip_unset = _edje_smart_clip_unset;
sc->base.calculate = _edje_smart_calculate;
- //sc->base.member_add = NULL;
- //sc->base.member_del = NULL;
+ sc->base.member_add = NULL;
+ sc->base.member_del = NULL;
sc->file_set = _edje_smart_file_set;
}
{
Edje *ed;
- _edje_smart_parent.show(obj);
ed = evas_object_smart_data_get(obj);
if (!ed) return;
if (evas_object_visible_get(obj)) return;
+ if (evas_object_visible_get(ed->clipper)) return;
+ if ((ed->collection) && (evas_object_clipees_get(ed->clipper)))
+ evas_object_show(ed->clipper);
if (_edje_script_only(ed))
{
_edje_script_only_show(ed);
{
Edje *ed;
- _edje_smart_parent.hide(obj);
ed = evas_object_smart_data_get(obj);
if (!ed) return;
if (!evas_object_visible_get(obj)) return;
+ if (!evas_object_visible_get(ed->clipper)) return;
+ if ((ed->collection) && (evas_object_clipees_get(ed->clipper)))
+ evas_object_hide(ed->clipper);
if (_edje_script_only(ed))
{
_edje_script_only_hide(ed);
}
static void
+_edje_smart_color_set(Evas_Object * obj, int r, int g, int b, int a)
+{
+ Edje *ed;
+
+ ed = evas_object_smart_data_get(obj);
+ if (!ed) return;
+ evas_object_color_set(ed->clipper, r, g, b, a);
+// _edje_emit(ed, "color_set", NULL);
+}
+
+static void
+_edje_smart_clip_set(Evas_Object * obj, Evas_Object * clip)
+{
+ Edje *ed;
+
+ ed = evas_object_smart_data_get(obj);
+ if (!ed) return;
+ if (evas_object_clip_get(obj) == clip) return;
+ evas_object_clip_set(ed->clipper, clip);
+// _edje_emit(ed, "clip_set", NULL);
+}
+
+static void
+_edje_smart_clip_unset(Evas_Object * obj)
+{
+ Edje *ed;
+
+ ed = evas_object_smart_data_get(obj);
+ if (!ed) return;
+ if (!evas_object_clip_get(obj)) return;
+ evas_object_clip_unset(ed->clipper);
+// _edje_emit(ed, "clip_unset", NULL);
+}
+
+static void
_edje_smart_calculate(Evas_Object *obj)
{
Edje *ed;
static void _edje_object_signal_preload_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
Edje_Real_Part *_edje_real_part_recursive_get_helper(const Edje *ed, char **path);
+static Edje *_edje_recursive_get_helper(Edje *ed, char **path, Edje_Real_Part **orp);
/************************** API Routines **************************/
{
Edje *ed;
Edje_Real_Part *rp;
-
+
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
rp = _edje_real_part_recursive_get(ed, (char *)part);
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
-
+
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return NULL;
}
/**
- * @brief Advances the cursor to the next cursor position.
- * @see evas_textblock_cursor_char_next
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur The edje cursor to advance
*/
EAPI Eina_Bool
edje_object_part_text_cursor_next(Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Moves the cursor to the previous char
- * @see evas_textblock_cursor_char_prev
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur the edje cursor to work on
*/
EAPI Eina_Bool
edje_object_part_text_cursor_prev(Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Move the cursor to the char above the current cursor position.
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur the edje cursor to work on
*/
EAPI Eina_Bool
edje_object_part_text_cursor_up(Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Moves the cursor to the char below the current cursor position.
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur the edje cursor to work on
*/
EAPI Eina_Bool
edje_object_part_text_cursor_down(Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Moves the cursor to the beginning of the text part
- * @see evas_textblock_cursor_paragraph_first
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur the edje cursor to work on
*/
EAPI void
edje_object_part_text_cursor_begin_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Moves the cursor to the end of the text part.
- * @see evas_textblock_cursor_paragraph_last
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur the edje cursor to work on
*/
EAPI void
edje_object_part_text_cursor_end_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Copy the cursor to another cursor.
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param sry the cursor to copy from
- * @param dst the cursor to copy to
*/
EAPI void
edje_object_part_text_cursor_copy(Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst)
}
/**
- * @brief Move the cursor to the beginning of the line.
- * @see evas_textblock_cursor_line_char_first
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur the edje cursor to work on
*/
EAPI void
edje_object_part_text_cursor_line_begin_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Move the cursor to the end of the line.
- * @see evas_textblock_cursor_line_char_last
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur the edje cursor to work on
*/
EAPI void
edje_object_part_text_cursor_line_end_set(Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Returns whether the cursor points to a format.
- * @see evas_textblock_cursor_is_format
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur The cursor to adjust.
- * @return EINA_TRUE if it's true, EINA_FALSE otherwise.
*/
EAPI Eina_Bool
edje_object_part_text_cursor_is_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Return true if the cursor points to a visible format
- * For example \t, \n, item and etc.
- * @see evas_textblock_cursor_format_is_visible_get
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur The cursor to adjust.
*/
EAPI Eina_Bool
edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
}
/**
- * @brief Returns the content (char) at the cursor position.
- * @see evas_textblock_cursor_content_get
+ * @brief XX
*
* @param obj A valid Evas_Object handle
* @param part The part name
- * @param cur The cursor to use
*/
EAPI const char *
edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
return rp;
}
+Edje *
+_edje_recursive_get(Edje *ed, const char *part, Edje_Real_Part **orp)
+{
+ Edje *oed;
+ char **path;
+
+ path = eina_str_split(part, EDJE_PART_PATH_SEPARATOR_STRING, 0);
+ if (!path) return NULL;
+
+ oed = _edje_recursive_get_helper(ed, path, orp);
+
+ free(*path);
+ free(path);
+ return oed;
+}
+
Evas_Object *
_edje_children_get(Edje_Real_Part *rp, const char *partid)
{
}
/* Private Routines */
+static Edje *
+_edje_recursive_get_helper(Edje *ed, char **path, Edje_Real_Part **orp)
+{
+ Evas_Object *child;
+ Edje_Real_Part *rp;
+ char *idx = NULL;
+
+ if (!path[0])
+ return NULL;
+
+ if (ed->collection && ed->collection->alias)
+ {
+ char *alias;
+
+ alias = _edje_merge_path(eina_hash_find(ed->collection->alias, path[0]), path + 1);
+ if (alias) {
+ Edje *tmp;
+
+ tmp = _edje_recursive_get(ed, alias, orp);
+ free(alias);
+ return tmp;
+ }
+ }
+
+ //printf(" lookup: %s on %s\n", path[0], ed->parent ? ed->parent : "-");
+ idx = strchr(path[0], EDJE_PART_PATH_SEPARATOR_INDEXL);
+ if (idx)
+ {
+ char *end;
+
+ end = strchr(idx + 1, EDJE_PART_PATH_SEPARATOR_INDEXR);
+ if (end)
+ {
+ *end = '\0';
+ *idx = '\0';
+ idx++;
+ }
+ }
+
+ rp = _edje_real_part_get(ed, path[0]);
+ if (!rp) return NULL;
+
+ if (!path[1] && !idx)
+ {
+ *orp = rp;
+ return rp->edje;
+ }
+
+ switch (rp->part->type)
+ {
+ case EDJE_PART_TYPE_GROUP:
+ if (!rp->swallowed_object) return NULL;
+ ed = _edje_fetch(rp->swallowed_object);
+ if (!ed) return NULL;
+ path++;
+
+ if (!path[0]) return ed;
+ return _edje_recursive_get_helper(ed, path, orp);
+ case EDJE_PART_TYPE_BOX:
+ case EDJE_PART_TYPE_TABLE:
+ case EDJE_PART_TYPE_EXTERNAL:
+ if (!idx)
+ {
+ *orp = rp;
+ return NULL;
+ }
+ path++;
+
+ child = _edje_children_get(rp, idx);
+
+ ed = _edje_fetch(child);
+ if (!ed) return NULL;
+ if (!path[0]) return ed;
+ return _edje_recursive_get_helper(ed, path, orp);
+ default:
+ return NULL;
+ }
+}
+
Edje_Real_Part *
_edje_real_part_get(const Edje *ed, const char *part)
{
rp->swallow_params.min.h = h1;
if (w2 > 0) rp->swallow_params.max.w = w2;
if (h2 > 0) rp->swallow_params.max.h = h2;
- switch (am)
+ switch (am)
{
case EVAS_ASPECT_CONTROL_NONE:
rp->swallow_params.aspect.mode = EDJE_ASPECT_CONTROL_NONE;