forked from enlightenment/efl
api change... yes i know. sorry! but it's early days. this is much cleaner
using better namespacing. SVN revision: 7119
This commit is contained in:
parent
fd356dc4d9
commit
073e9b47c6
|
@ -159,10 +159,10 @@ bg_key_down(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
Demo_Edje *de;
|
||||
|
||||
de = l->data;
|
||||
if (!strcmp(ev->keyname, "p")) edje_play_set(de->edje, 1);
|
||||
else if (!strcmp(ev->keyname, "o")) edje_play_set(de->edje, 0);
|
||||
else if (!strcmp(ev->keyname, "a")) edje_animation_set(de->edje, 1);
|
||||
else if (!strcmp(ev->keyname, "s")) edje_animation_set(de->edje, 0);
|
||||
if (!strcmp(ev->keyname, "p")) edje_object_play_set(de->edje, 1);
|
||||
else if (!strcmp(ev->keyname, "o")) edje_object_play_set(de->edje, 0);
|
||||
else if (!strcmp(ev->keyname, "a")) edje_object_animation_set(de->edje, 1);
|
||||
else if (!strcmp(ev->keyname, "s")) edje_object_animation_set(de->edje, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -433,10 +433,10 @@ test_setup(char *file, char *name)
|
|||
evas_object_show(o);
|
||||
de->title = o;
|
||||
|
||||
o = edje_add(evas);
|
||||
edje_file_set(o, file, name);
|
||||
edje_signal_callback_add(o, "do_it", "the_source", cb, NULL);
|
||||
edje_signal_callback_add(o, "mouse,*", "logo", cb, NULL);
|
||||
o = edje_object_add(evas);
|
||||
edje_object_file_set(o, file, name);
|
||||
edje_object_signal_callback_add(o, "do_it", "the_source", cb, NULL);
|
||||
edje_object_signal_callback_add(o, "mouse,*", "logo", cb, NULL);
|
||||
evas_object_move(o, 10 + 10, 10 + 20);
|
||||
evas_object_resize(o, 200, 240);
|
||||
evas_object_show(o);
|
||||
|
|
|
@ -7,26 +7,24 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/* API here */
|
||||
/***************************************************************************/
|
||||
|
||||
void edje_init (void);
|
||||
void edje_frametime_set (double t);
|
||||
double edje_frametime_get (void);
|
||||
Evas_Object *edje_add(Evas *evas);
|
||||
void edje_file_set(Evas_Object *o, const char *file, const char *part);
|
||||
void edje_signal_callback_add(Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
|
||||
void *edje_signal_callback_del(Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
|
||||
void edje_signal_emit(Evas_Object *o, const char *emission, const char *source);
|
||||
void edje_play_set(Evas_Object *obj, int play);
|
||||
int edje_play_get(Evas_Object *obj);
|
||||
void edje_animation_set(Evas_Object *obj, int on);
|
||||
int edje_animation_get(Evas_Object *obj);
|
||||
int edje_part_exists(Evas_Object *obj, const char *part);
|
||||
void edje_part_geometry_get(Evas_Object *o, const char *part, double *x, double *y, double *w, double *h);
|
||||
void edje_part_text_set(Evas_Object *o, const char *part, const char *text);
|
||||
const char *edje_part_text_get(Evas_Object *obj, const char *part);
|
||||
|
||||
Evas_Object *edje_object_add (Evas *evas);
|
||||
void edje_object_file_set (Evas_Object *o, const char *file, const char *part);
|
||||
void edje_object_file_get (Evas_Object *o, const char **file, const char **part);
|
||||
void edje_object_signal_callback_add (Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
|
||||
void *edje_object_signal_callback_del (Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
|
||||
void edje_object_signal_emit (Evas_Object *o, const char *emission, const char *source);
|
||||
void edje_object_play_set (Evas_Object *o, int play);
|
||||
int edje_object_play_get (Evas_Object *o);
|
||||
void edje_object_animation_set (Evas_Object *o, int on);
|
||||
int edje_object_animation_get (Evas_Object *o);
|
||||
int edje_object_part_exists (Evas_Object *o, const char *part);
|
||||
void edje_object_part_geometry_get (Evas_Object *o, const char *part, double *x, double *y, double *w, double *h);
|
||||
void edje_object_part_text_set (Evas_Object *o, const char *part, const char *text);
|
||||
const char *edje_object_part_text_get (Evas_Object *o, const char *part);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ static Evas_Hash *_edje_file_hash = NULL;
|
|||
|
||||
/* API Routines */
|
||||
void
|
||||
edje_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||
edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
@ -109,6 +109,22 @@ edje_file_set(Evas_Object *obj, const char *file, const char *part)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
edje_object_file_get(Evas_Object *obj, const char **file, const char **part)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed)
|
||||
{
|
||||
if (file) *file = NULL;
|
||||
if (part) *part = NULL;
|
||||
return;
|
||||
}
|
||||
if (file) *file = ed->path;
|
||||
if (part) *part = ed->part;
|
||||
}
|
||||
|
||||
void
|
||||
_edje_file_add(Edje *ed)
|
||||
{
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
* ? reduce linked list walking and list_nth calls
|
||||
* ? add containering (hbox, vbox, table, wrapping multi-line hbox & vbox)
|
||||
* ? add numeric params to conditions for progs (ranges etc.)
|
||||
* ? key/value pair config values per colelction and per edje file
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ edje_frametime_get(void)
|
|||
}
|
||||
|
||||
void
|
||||
edje_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
|
||||
edje_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Signal_Callback *escb;
|
||||
|
@ -49,7 +49,7 @@ edje_signal_callback_add(Evas_Object *obj, const char *emission, const char *sou
|
|||
}
|
||||
|
||||
void *
|
||||
edje_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source))
|
||||
edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source))
|
||||
{
|
||||
Edje *ed;
|
||||
Evas_List *l;
|
||||
|
@ -88,7 +88,7 @@ edje_signal_callback_del(Evas_Object *obj, const char *emission, const char *sou
|
|||
}
|
||||
|
||||
void
|
||||
edje_signal_emit(Evas_Object *obj, const char *emission, const char *source)
|
||||
edje_object_signal_emit(Evas_Object *obj, const char *emission, const char *source)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
@ -99,7 +99,7 @@ edje_signal_emit(Evas_Object *obj, const char *emission, const char *source)
|
|||
}
|
||||
|
||||
void
|
||||
edje_play_set(Evas_Object *obj, int play)
|
||||
edje_object_play_set(Evas_Object *obj, int play)
|
||||
{
|
||||
Edje *ed;
|
||||
double t;
|
||||
|
@ -129,7 +129,7 @@ edje_play_set(Evas_Object *obj, int play)
|
|||
}
|
||||
|
||||
int
|
||||
edje_play_get(Evas_Object *obj)
|
||||
edje_object_play_get(Evas_Object *obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
@ -140,7 +140,7 @@ edje_play_get(Evas_Object *obj)
|
|||
}
|
||||
|
||||
void
|
||||
edje_animation_set(Evas_Object *obj, int on)
|
||||
edje_object_animation_set(Evas_Object *obj, int on)
|
||||
{
|
||||
Edje *ed;
|
||||
Evas_List *l;
|
||||
|
@ -177,7 +177,7 @@ edje_animation_set(Evas_Object *obj, int on)
|
|||
}
|
||||
|
||||
int
|
||||
edje_animation_get(Evas_Object *obj)
|
||||
edje_object_animation_get(Evas_Object *obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ static Evas_Smart *_edje_smart = NULL;
|
|||
|
||||
/* API Routines */
|
||||
Evas_Object *
|
||||
edje_add(Evas *evas)
|
||||
edje_object_add(Evas *evas)
|
||||
{
|
||||
if (!_edje_smart)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "edje_private.h"
|
||||
|
||||
int
|
||||
edje_part_exists(Evas_Object *obj, const char *part)
|
||||
edje_object_part_exists(Evas_Object *obj, const char *part)
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
@ -20,7 +20,7 @@ edje_part_exists(Evas_Object *obj, const char *part)
|
|||
}
|
||||
|
||||
void
|
||||
edje_part_geometry_get(Evas_Object *obj, const char *part, double *x, double *y, double *w, double *h )
|
||||
edje_object_part_geometry_get(Evas_Object *obj, const char *part, double *x, double *y, double *w, double *h )
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
@ -55,7 +55,7 @@ edje_part_geometry_get(Evas_Object *obj, const char *part, double *x, double *y,
|
|||
}
|
||||
|
||||
void
|
||||
edje_part_text_set(Evas_Object *obj, const char *part, const char *text)
|
||||
edje_object_part_text_set(Evas_Object *obj, const char *part, const char *text)
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
@ -89,7 +89,7 @@ edje_part_text_set(Evas_Object *obj, const char *part, const char *text)
|
|||
}
|
||||
|
||||
const char *
|
||||
edje_part_text_get(Evas_Object *obj, const char *part)
|
||||
edje_object_part_text_get(Evas_Object *obj, const char *part)
|
||||
{
|
||||
Evas_List *l;
|
||||
Edje *ed;
|
||||
|
|
Loading…
Reference in New Issue