forked from enlightenment/efl
Add some consts to Edje's API.
Some methods do no change object internal state and can be marked as read only. In parallel have infamous edje_object_part_object_get() to return a read-only object, so it's even more clear that one should not touch this object state (either a cast or a compiler warning if you do that!) SVN revision: 35485
This commit is contained in:
parent
dbe1ac5aca
commit
d428d6ec1d
|
@ -200,21 +200,21 @@ extern "C" {
|
||||||
EAPI Evas_Object *edje_object_add (Evas *evas);
|
EAPI Evas_Object *edje_object_add (Evas *evas);
|
||||||
|
|
||||||
/* edje_util.c */
|
/* edje_util.c */
|
||||||
EAPI const char *edje_object_data_get (Evas_Object *obj, const char *key);
|
EAPI const char *edje_object_data_get (const Evas_Object *obj, const char *key);
|
||||||
|
|
||||||
/* edje_load.c */
|
/* edje_load.c */
|
||||||
EAPI int edje_object_file_set (Evas_Object *obj, const char *file, const char *group);
|
EAPI int edje_object_file_set (Evas_Object *obj, const char *file, const char *group);
|
||||||
EAPI void edje_object_file_get (Evas_Object *obj, const char **file, const char **group);
|
EAPI void edje_object_file_get (const Evas_Object *obj, const char **file, const char **group);
|
||||||
EAPI int edje_object_load_error_get (Evas_Object *obj);
|
EAPI int edje_object_load_error_get (const Evas_Object *obj);
|
||||||
|
|
||||||
/* edje_program.c */
|
/* edje_program.c */
|
||||||
EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *obj, const char *emission, const char *source), void *data);
|
EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *obj, const char *emission, const char *source), void *data);
|
||||||
EAPI void *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *obj, const char *emission, const char *source));
|
EAPI void *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *obj, const char *emission, const char *source));
|
||||||
EAPI void edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source);
|
EAPI void edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source);
|
||||||
EAPI void edje_object_play_set (Evas_Object *obj, int play);
|
EAPI void edje_object_play_set (Evas_Object *obj, int play);
|
||||||
EAPI int edje_object_play_get (Evas_Object *obj);
|
EAPI int edje_object_play_get (const Evas_Object *obj);
|
||||||
EAPI void edje_object_animation_set (Evas_Object *obj, int on);
|
EAPI void edje_object_animation_set (Evas_Object *obj, int on);
|
||||||
EAPI int edje_object_animation_get (Evas_Object *obj);
|
EAPI int edje_object_animation_get (const Evas_Object *obj);
|
||||||
|
|
||||||
/* edje_util.c */
|
/* edje_util.c */
|
||||||
EAPI int edje_object_freeze (Evas_Object *obj);
|
EAPI int edje_object_freeze (Evas_Object *obj);
|
||||||
|
@ -222,30 +222,30 @@ extern "C" {
|
||||||
EAPI void edje_object_color_class_set (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
|
EAPI void edje_object_color_class_set (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
|
||||||
EAPI void edje_object_color_class_del (Evas_Object *obj, const char *color_class);
|
EAPI void edje_object_color_class_del (Evas_Object *obj, const char *color_class);
|
||||||
EAPI void edje_object_text_class_set (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size);
|
EAPI void edje_object_text_class_set (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size);
|
||||||
EAPI void edje_object_size_min_get (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
|
EAPI void edje_object_size_min_get (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
|
||||||
EAPI void edje_object_size_max_get (Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
|
EAPI void edje_object_size_max_get (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
|
||||||
EAPI void edje_object_calc_force (Evas_Object *obj);
|
EAPI void edje_object_calc_force (Evas_Object *obj);
|
||||||
EAPI void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
|
EAPI void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
|
||||||
EAPI void edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh);
|
EAPI void edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh);
|
||||||
EAPI int edje_object_part_exists (Evas_Object *obj, const char *part);
|
EAPI int edje_object_part_exists (const Evas_Object *obj, const char *part);
|
||||||
EAPI Evas_Object *edje_object_part_object_get (Evas_Object *obj, const char *part);
|
EAPI const Evas_Object *edje_object_part_object_get (const Evas_Object *obj, const char *part);
|
||||||
EAPI void edje_object_part_geometry_get (Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
EAPI void edje_object_part_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
||||||
EAPI void edje_object_text_change_cb_set (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, const char *part), void *data);
|
EAPI void edje_object_text_change_cb_set (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, const char *part), void *data);
|
||||||
EAPI void edje_object_part_text_set (Evas_Object *obj, const char *part, const char *text);
|
EAPI void edje_object_part_text_set (Evas_Object *obj, const char *part, const char *text);
|
||||||
EAPI const char *edje_object_part_text_get (Evas_Object *obj, const char *part);
|
EAPI const char *edje_object_part_text_get (const Evas_Object *obj, const char *part);
|
||||||
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
|
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
|
||||||
EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow);
|
EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow);
|
||||||
EAPI Evas_Object *edje_object_part_swallow_get (Evas_Object *obj, const char *part);
|
EAPI Evas_Object *edje_object_part_swallow_get (const Evas_Object *obj, const char *part);
|
||||||
EAPI const char *edje_object_part_state_get (Evas_Object *obj, const char *part, double *val_ret);
|
EAPI const char *edje_object_part_state_get (const Evas_Object *obj, const char *part, double *val_ret);
|
||||||
EAPI int edje_object_part_drag_dir_get (Evas_Object *obj, const char *part);
|
EAPI int edje_object_part_drag_dir_get (const Evas_Object *obj, const char *part);
|
||||||
EAPI void edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy);
|
EAPI void edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy);
|
||||||
EAPI void edje_object_part_drag_value_get (Evas_Object *obj, const char *part, double *dx, double *dy);
|
EAPI void edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
|
||||||
EAPI void edje_object_part_drag_size_set (Evas_Object *obj, const char *part, double dw, double dh);
|
EAPI void edje_object_part_drag_size_set (Evas_Object *obj, const char *part, double dw, double dh);
|
||||||
EAPI void edje_object_part_drag_size_get (Evas_Object *obj, const char *part, double *dw, double *dh);
|
EAPI void edje_object_part_drag_size_get (const Evas_Object *obj, const char *part, double *dw, double *dh);
|
||||||
EAPI void edje_object_part_drag_step_set (Evas_Object *obj, const char *part, double dx, double dy);
|
EAPI void edje_object_part_drag_step_set (Evas_Object *obj, const char *part, double dx, double dy);
|
||||||
EAPI void edje_object_part_drag_step_get (Evas_Object *obj, const char *part, double *dx, double *dy);
|
EAPI void edje_object_part_drag_step_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
|
||||||
EAPI void edje_object_part_drag_page_set (Evas_Object *obj, const char *part, double dx, double dy);
|
EAPI void edje_object_part_drag_page_set (Evas_Object *obj, const char *part, double dx, double dy);
|
||||||
EAPI void edje_object_part_drag_page_get (Evas_Object *obj, const char *part, double *dx, double *dy);
|
EAPI void edje_object_part_drag_page_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
|
||||||
EAPI void edje_object_part_drag_step (Evas_Object *obj, const char *part, double dx, double dy);
|
EAPI void edje_object_part_drag_step (Evas_Object *obj, const char *part, double dx, double dy);
|
||||||
EAPI void edje_object_part_drag_page (Evas_Object *obj, const char *part, double dx, double dy);
|
EAPI void edje_object_part_drag_page (Evas_Object *obj, const char *part, double dx, double dy);
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ edje_object_file_set(Evas_Object *obj, const char *file, const char *group)
|
||||||
* interested in one of the values.
|
* interested in one of the values.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_file_get(Evas_Object *obj, const char **file, const char **group)
|
edje_object_file_get(const Evas_Object *obj, const char **file, const char **group)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ edje_object_file_get(Evas_Object *obj, const char **file, const char **group)
|
||||||
* 7: Incompatible File
|
* 7: Incompatible File
|
||||||
*/
|
*/
|
||||||
EAPI int
|
EAPI int
|
||||||
edje_object_load_error_get(Evas_Object *obj)
|
edje_object_load_error_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
|
|
|
@ -1073,7 +1073,7 @@ void _edje_text_class_member_del(Edje *ed, const char *text_class);
|
||||||
void _edje_text_class_members_free(void);
|
void _edje_text_class_members_free(void);
|
||||||
void _edje_text_class_hash_free(void);
|
void _edje_text_class_hash_free(void);
|
||||||
|
|
||||||
Edje *_edje_fetch(Evas_Object *obj);
|
Edje *_edje_fetch(const Evas_Object *obj);
|
||||||
int _edje_freeze(Edje *ed);
|
int _edje_freeze(Edje *ed);
|
||||||
int _edje_thaw(Edje *ed);
|
int _edje_thaw(Edje *ed);
|
||||||
int _edje_block(Edje *ed);
|
int _edje_block(Edje *ed);
|
||||||
|
|
|
@ -262,7 +262,7 @@ edje_object_play_set(Evas_Object *obj, int play)
|
||||||
* 1 if Edje set to play
|
* 1 if Edje set to play
|
||||||
*/
|
*/
|
||||||
EAPI int
|
EAPI int
|
||||||
edje_object_play_get(Evas_Object *obj)
|
edje_object_play_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ edje_object_animation_set(Evas_Object *obj, int on)
|
||||||
* 1 if animated
|
* 1 if animated
|
||||||
*/
|
*/
|
||||||
EAPI int
|
EAPI int
|
||||||
edje_object_animation_get(Evas_Object *obj)
|
edje_object_animation_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ edje_fontset_append_get(void)
|
||||||
* @endcode
|
* @endcode
|
||||||
*/
|
*/
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
edje_object_data_get(Evas_Object *obj, const char *key)
|
edje_object_data_get(const Evas_Object *obj, const char *key)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
@ -683,7 +683,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
||||||
* 1 if Edje part exists
|
* 1 if Edje part exists
|
||||||
*/
|
*/
|
||||||
EAPI int
|
EAPI int
|
||||||
edje_object_part_exists(Evas_Object *obj, const char *part)
|
edje_object_part_exists(const Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -707,8 +707,8 @@ edje_object_part_exists(Evas_Object *obj, const char *part)
|
||||||
* @return Returns the Evas_Object corresponding to the given part,
|
* @return Returns the Evas_Object corresponding to the given part,
|
||||||
* or NULL on failure (if the part doesn't exist)
|
* or NULL on failure (if the part doesn't exist)
|
||||||
**/
|
**/
|
||||||
EAPI Evas_Object *
|
EAPI const Evas_Object *
|
||||||
edje_object_part_object_get(Evas_Object *obj, const char *part)
|
edje_object_part_object_get(const Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -734,7 +734,7 @@ edje_object_part_object_get(Evas_Object *obj, const char *part)
|
||||||
* values you are uninterested in.
|
* values you are uninterested in.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_part_geometry_get(Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h )
|
edje_object_part_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h )
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -821,7 +821,7 @@ edje_object_part_text_set(Evas_Object *obj, const char *part, const char *text)
|
||||||
* @return The text string
|
* @return The text string
|
||||||
*/
|
*/
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
edje_object_part_text_get(Evas_Object *obj, const char *part)
|
edje_object_part_text_get(const Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -1032,7 +1032,7 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
|
||||||
* @return The swallowed object, or NULL if there is none.
|
* @return The swallowed object, or NULL if there is none.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
edje_object_part_swallow_get(Evas_Object *obj, const char *part)
|
edje_object_part_swallow_get(const Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -1053,7 +1053,7 @@ edje_object_part_swallow_get(Evas_Object *obj, const char *part)
|
||||||
* to zero if no Edje is connected to the Evas Object.
|
* to zero if no Edje is connected to the Evas Object.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_size_min_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
edje_object_size_min_get(const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
|
@ -1077,7 +1077,7 @@ edje_object_size_min_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
||||||
* to zero if no Edje is connected to the Evas Object.
|
* to zero if no Edje is connected to the Evas Object.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_size_max_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
|
edje_object_size_max_get(const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
|
@ -1280,7 +1280,7 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co
|
||||||
*/
|
*/
|
||||||
/* FIXME: Correctly return other states */
|
/* FIXME: Correctly return other states */
|
||||||
EAPI const char *
|
EAPI const char *
|
||||||
edje_object_part_state_get(Evas_Object *obj, const char *part, double *val_ret)
|
edje_object_part_state_get(const Evas_Object *obj, const char *part, double *val_ret)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -1328,7 +1328,7 @@ edje_object_part_state_get(Evas_Object *obj, const char *part, double *val_ret)
|
||||||
* 3: Dragable in X & Y directions
|
* 3: Dragable in X & Y directions
|
||||||
*/
|
*/
|
||||||
EAPI int
|
EAPI int
|
||||||
edje_object_part_drag_dir_get(Evas_Object *obj, const char *part)
|
edje_object_part_drag_dir_get(const Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -1386,7 +1386,7 @@ edje_object_part_drag_value_set(Evas_Object *obj, const char *part, double dx, d
|
||||||
*/
|
*/
|
||||||
/* FIXME: Should this be x and y instead of dx/dy? */
|
/* FIXME: Should this be x and y instead of dx/dy? */
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_part_drag_value_get(Evas_Object *obj, const char *part, double *dx, double *dy)
|
edje_object_part_drag_value_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -1452,7 +1452,7 @@ edje_object_part_drag_size_set(Evas_Object *obj, const char *part, double dw, do
|
||||||
* Gets the dragable object size.
|
* Gets the dragable object size.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_part_drag_size_get(Evas_Object *obj, const char *part, double *dw, double *dh)
|
edje_object_part_drag_size_get(const Evas_Object *obj, const char *part, double *dw, double *dh)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -1510,7 +1510,7 @@ edje_object_part_drag_step_set(Evas_Object *obj, const char *part, double dx, do
|
||||||
* Gets the x and y step increments for the dragable object.
|
* Gets the x and y step increments for the dragable object.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_part_drag_step_get(Evas_Object *obj, const char *part, double *dx, double *dy)
|
edje_object_part_drag_step_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -1568,7 +1568,7 @@ edje_object_part_drag_page_set(Evas_Object *obj, const char *part, double dx, do
|
||||||
* Gets the x,y page step increments for the dragable object.
|
* Gets the x,y page step increments for the dragable object.
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_part_drag_page_get(Evas_Object *obj, const char *part, double *dx, double *dy)
|
edje_object_part_drag_page_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
@ -1923,7 +1923,7 @@ _edje_text_class_hash_free(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
Edje *
|
Edje *
|
||||||
_edje_fetch(Evas_Object *obj)
|
_edje_fetch(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
char *type;
|
char *type;
|
||||||
|
|
Loading…
Reference in New Issue