forked from enlightenment/efl
elm table: Fixed wrong description and argument name about packing API
This commit is contained in:
parent
5c6b745ea7
commit
152deb9a9a
|
@ -322,27 +322,27 @@ _padding_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_table_pack(Evas_Object *obj,
|
elm_table_pack(Evas_Object *obj,
|
||||||
Evas_Object *subobj,
|
Evas_Object *subobj,
|
||||||
int x,
|
int col,
|
||||||
int y,
|
int row,
|
||||||
int w,
|
int colspan,
|
||||||
int h)
|
int rowspan)
|
||||||
{
|
{
|
||||||
ELM_TABLE_CHECK(obj);
|
ELM_TABLE_CHECK(obj);
|
||||||
eo_do(obj, elm_obj_table_pack(subobj, x, y, w, h));
|
eo_do(obj, elm_obj_table_pack(subobj, col, row, colspan, rowspan));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_pack(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
_pack(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
{
|
{
|
||||||
Evas_Object *subobj = va_arg(*list, Evas_Object *);
|
Evas_Object *subobj = va_arg(*list, Evas_Object *);
|
||||||
int x = va_arg(*list, int);
|
int col = va_arg(*list, int);
|
||||||
int y = va_arg(*list, int);
|
int row = va_arg(*list, int);
|
||||||
int w = va_arg(*list, int);
|
int colspan = va_arg(*list, int);
|
||||||
int h = va_arg(*list, int);
|
int rowspan = va_arg(*list, int);
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||||
|
|
||||||
elm_widget_sub_object_add(obj, subobj);
|
elm_widget_sub_object_add(obj, subobj);
|
||||||
evas_object_table_pack(wd->resize_obj, subobj, x, y, w, h);
|
evas_object_table_pack(wd->resize_obj, subobj, col, row, colspan, rowspan);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -365,61 +365,61 @@ _unpack(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_table_pack_set(Evas_Object *subobj,
|
elm_table_pack_set(Evas_Object *subobj,
|
||||||
int x,
|
int col,
|
||||||
int y,
|
int row,
|
||||||
int w,
|
int colspan,
|
||||||
int h)
|
int rowspan)
|
||||||
{
|
{
|
||||||
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
|
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
|
||||||
|
|
||||||
ELM_TABLE_CHECK(obj);
|
ELM_TABLE_CHECK(obj);
|
||||||
eo_do(obj, elm_obj_table_pack_set(subobj, x, y, w, h));
|
eo_do(obj, elm_obj_table_pack_set(subobj, col, row, colspan, rowspan));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_pack_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
_pack_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
{
|
{
|
||||||
Evas_Object *subobj = va_arg(*list, Evas_Object *);
|
Evas_Object *subobj = va_arg(*list, Evas_Object *);
|
||||||
int x = va_arg(*list, int);
|
int col = va_arg(*list, int);
|
||||||
int y = va_arg(*list, int);
|
int row = va_arg(*list, int);
|
||||||
int w = va_arg(*list, int);
|
int colspan = va_arg(*list, int);
|
||||||
int h = va_arg(*list, int);
|
int rowspan = va_arg(*list, int);
|
||||||
|
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||||
|
|
||||||
evas_object_table_pack(wd->resize_obj, subobj, x, y, w, h);
|
evas_object_table_pack(wd->resize_obj, subobj, col, row, colspan, rowspan);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_table_pack_get(Evas_Object *subobj,
|
elm_table_pack_get(Evas_Object *subobj,
|
||||||
int *x,
|
int *col,
|
||||||
int *y,
|
int *row,
|
||||||
int *w,
|
int *colspan,
|
||||||
int *h)
|
int *rowspan)
|
||||||
{
|
{
|
||||||
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
|
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
|
||||||
ELM_TABLE_CHECK(obj);
|
ELM_TABLE_CHECK(obj);
|
||||||
eo_do(obj, elm_obj_table_pack_get(subobj, x, y, w, h));
|
eo_do(obj, elm_obj_table_pack_get(subobj, col, row, colspan, rowspan));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_pack_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
_pack_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
{
|
{
|
||||||
Evas_Object *subobj = va_arg(*list, Evas_Object *);
|
Evas_Object *subobj = va_arg(*list, Evas_Object *);
|
||||||
int *x = va_arg(*list, int *);
|
int *col = va_arg(*list, int *);
|
||||||
int *y = va_arg(*list, int *);
|
int *row = va_arg(*list, int *);
|
||||||
int *w = va_arg(*list, int *);
|
int *colspan = va_arg(*list, int *);
|
||||||
int *h = va_arg(*list, int *);
|
int *rowspan = va_arg(*list, int *);
|
||||||
|
|
||||||
unsigned short ix, iy, iw, ih;
|
unsigned short icol, irow, icolspan, irowspan;
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||||
|
|
||||||
evas_object_table_pack_get
|
evas_object_table_pack_get
|
||||||
(wd->resize_obj, subobj, &ix, &iy, &iw, &ih);
|
(wd->resize_obj, subobj, &icol, &irow, &icolspan, &irowspan);
|
||||||
if (x) *x = ix;
|
if (col) *col = icol;
|
||||||
if (y) *y = iy;
|
if (row) *row = irow;
|
||||||
if (w) *w = iw;
|
if (colspan) *colspan = icolspan;
|
||||||
if (h) *h = ih;
|
if (rowspan) *rowspan = irowspan;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* table = elm_table_add(win);
|
* table = elm_table_add(win);
|
||||||
* evas_object_show(table);
|
* evas_object_show(table);
|
||||||
* elm_table_padding_set(table, space_between_columns, space_between_rows);
|
* elm_table_padding_set(table, space_between_columns, space_between_rows);
|
||||||
* elm_table_pack(table, table_content_object, x_coord, y_coord, colspan, rowspan);
|
* elm_table_pack(table, table_content_object, column, row, colspan, rowspan);
|
||||||
* elm_table_pack(table, table_content_object, next_x_coord, next_y_coord, colspan, rowspan);
|
* elm_table_pack(table, table_content_object, next_column, next_row, colspan, rowspan);
|
||||||
* elm_table_pack(table, table_content_object, other_x_coord, other_y_coord, colspan, rowspan);
|
* elm_table_pack(table, table_content_object, other_column, other_row, colspan, rowspan);
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
* The following are examples of how to use a table:
|
* The following are examples of how to use a table:
|
||||||
|
|
|
@ -86,16 +86,16 @@ enum
|
||||||
* @brief Add a subobject on the table with the coordinates passed
|
* @brief Add a subobject on the table with the coordinates passed
|
||||||
*
|
*
|
||||||
* @param[in] subobj
|
* @param[in] subobj
|
||||||
* @param[in] x
|
* @param[in] column
|
||||||
* @param[in] y
|
* @param[in] row
|
||||||
* @param[in] w
|
* @param[in] colspan
|
||||||
* @param[in] h
|
* @param[in] rowspan
|
||||||
*
|
*
|
||||||
* @see elm_table_pack
|
* @see elm_table_pack
|
||||||
*
|
*
|
||||||
* @ingroup Table
|
* @ingroup Table
|
||||||
*/
|
*/
|
||||||
#define elm_obj_table_pack(subobj, x, y, w, h) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h)
|
#define elm_obj_table_pack(subobj, column, row, colspan, rowspan) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int, col), EO_TYPECHECK(int, row), EO_TYPECHECK(int, colspan), EO_TYPECHECK(int, rowspan)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def elm_obj_table_unpack
|
* @def elm_obj_table_unpack
|
||||||
|
@ -118,16 +118,16 @@ enum
|
||||||
* @brief Set the packing location of an existing child of the table
|
* @brief Set the packing location of an existing child of the table
|
||||||
*
|
*
|
||||||
* @param[in] subobj
|
* @param[in] subobj
|
||||||
* @param[in] x
|
* @param[in] column
|
||||||
* @param[in] y
|
* @param[in] row
|
||||||
* @param[in] w
|
* @param[in] colspan
|
||||||
* @param[in] h
|
* @param[in] rowspan
|
||||||
*
|
*
|
||||||
* @see elm_table_pack_set
|
* @see elm_table_pack_set
|
||||||
*
|
*
|
||||||
* @ingroup Table
|
* @ingroup Table
|
||||||
*/
|
*/
|
||||||
#define elm_obj_table_pack_set(subobj, x, y, w, h) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK_SET), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h)
|
#define elm_obj_table_pack_set(subobj, col, row, colspan, rowspan) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK_SET), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int, col), EO_TYPECHECK(int, row), EO_TYPECHECK(int, colspan), EO_TYPECHECK(int, rowspan)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def elm_obj_table_pack_get
|
* @def elm_obj_table_pack_get
|
||||||
|
@ -136,16 +136,16 @@ enum
|
||||||
* @brief Get the packing location of an existing child of the table
|
* @brief Get the packing location of an existing child of the table
|
||||||
*
|
*
|
||||||
* @param[in] subobj
|
* @param[in] subobj
|
||||||
* @param[out] x
|
* @param[out] column
|
||||||
* @param[out] y
|
* @param[out] row
|
||||||
* @param[out] w
|
* @param[out] colspan
|
||||||
* @param[out] h
|
* @param[out] rowspan
|
||||||
*
|
*
|
||||||
* @see elm_table_pack_get
|
* @see elm_table_pack_get
|
||||||
*
|
*
|
||||||
* @ingroup Table
|
* @ingroup Table
|
||||||
*/
|
*/
|
||||||
#define elm_obj_table_pack_get(subobj, x, y, w, h) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK_GET), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int *, x), EO_TYPECHECK(int *, y), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h)
|
#define elm_obj_table_pack_get(subobj, col, row, colspan, rowspan) ELM_OBJ_TABLE_ID(ELM_OBJ_TABLE_SUB_ID_PACK_GET), EO_TYPECHECK(Evas_Object *, subobj), EO_TYPECHECK(int *, col), EO_TYPECHECK(int *, row), EO_TYPECHECK(int *, colspan), EO_TYPECHECK(int *, rowspan)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def elm_obj_table_clear
|
* @def elm_obj_table_clear
|
||||||
|
|
|
@ -59,10 +59,10 @@ EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizon
|
||||||
*
|
*
|
||||||
* @param obj The table object
|
* @param obj The table object
|
||||||
* @param subobj The subobject to be added to the table
|
* @param subobj The subobject to be added to the table
|
||||||
* @param x Row number
|
* @param col Column number
|
||||||
* @param y Column number
|
* @param row Row number
|
||||||
* @param w colspan
|
* @param colspan colspan
|
||||||
* @param h rowspan
|
* @param rowspan rowspan
|
||||||
*
|
*
|
||||||
* @note All positioning inside the table is relative to rows and columns, so
|
* @note All positioning inside the table is relative to rows and columns, so
|
||||||
* a value of 0 for x and y, means the top left cell of the table, and a
|
* a value of 0 for x and y, means the top left cell of the table, and a
|
||||||
|
@ -70,7 +70,7 @@ EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizon
|
||||||
*
|
*
|
||||||
* @ingroup Table
|
* @ingroup Table
|
||||||
*/
|
*/
|
||||||
EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
|
EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int col, int row, int colspan, int rowspan);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Remove child from table.
|
* @brief Remove child from table.
|
||||||
|
@ -86,35 +86,35 @@ EAPI void elm_table_unpack(Evas_Object *obj, Evas_Object *subobj);
|
||||||
* @brief Set the packing location of an existing child of the table
|
* @brief Set the packing location of an existing child of the table
|
||||||
*
|
*
|
||||||
* @param subobj The subobject to be modified in the table
|
* @param subobj The subobject to be modified in the table
|
||||||
* @param x Row number
|
* @param col Column number
|
||||||
* @param y Column number
|
* @param row Row number
|
||||||
* @param w rowspan
|
* @param colspan colspan
|
||||||
* @param h colspan
|
* @param rowspan rowspan
|
||||||
*
|
*
|
||||||
* Modifies the position of an object already in the table.
|
* Modifies the position of an object already in the table.
|
||||||
*
|
*
|
||||||
* @note All positioning inside the table is relative to rows and columns, so
|
* @note All positioning inside the table is relative to rows and columns, so
|
||||||
* a value of 0 for x and y, means the top left cell of the table, and a
|
* a value of 0 for col and row, means the top left cell of the table, and a
|
||||||
* value of 1 for w and h means @p subobj only takes that 1 cell.
|
* value of 1 for colspan and rowspan means @p subobj only takes that 1 cell.
|
||||||
*
|
*
|
||||||
* @ingroup Table
|
* @ingroup Table
|
||||||
*/
|
*/
|
||||||
EAPI void elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h);
|
EAPI void elm_table_pack_set(Evas_Object *subobj, int col, int row, int colspan, int rowspan);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the packing location of an existing child of the table
|
* @brief Get the packing location of an existing child of the table
|
||||||
*
|
*
|
||||||
* @param subobj The subobject to be modified in the table
|
* @param subobj The subobject to be modified in the table
|
||||||
* @param x Row number
|
* @param col Column number
|
||||||
* @param y Column number
|
* @param row Row number
|
||||||
* @param w rowspan
|
* @param colspan colspan
|
||||||
* @param h colspan
|
* @param rowspan rowspan
|
||||||
*
|
*
|
||||||
* @see elm_table_pack_set()
|
* @see elm_table_pack_set()
|
||||||
*
|
*
|
||||||
* @ingroup Table
|
* @ingroup Table
|
||||||
*/
|
*/
|
||||||
EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h);
|
EAPI void elm_table_pack_get(Evas_Object *subobj, int *col, int *row, int *colspan, int *rowspan);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Faster way to remove all child objects from a table object.
|
* @brief Faster way to remove all child objects from a table object.
|
||||||
|
|
Loading…
Reference in New Issue