elm table: Fixed wrong description and argument name about packing API

This commit is contained in:
Ryuan Choi 2013-04-25 18:10:18 +09:00
parent 5c6b745ea7
commit 152deb9a9a
4 changed files with 70 additions and 70 deletions

View File

@ -322,27 +322,27 @@ _padding_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
EAPI void
elm_table_pack(Evas_Object *obj,
Evas_Object *subobj,
int x,
int y,
int w,
int h)
int col,
int row,
int colspan,
int rowspan)
{
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
_pack(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *subobj = va_arg(*list, Evas_Object *);
int x = va_arg(*list, int);
int y = va_arg(*list, int);
int w = va_arg(*list, int);
int h = va_arg(*list, int);
int col = va_arg(*list, int);
int row = va_arg(*list, int);
int colspan = va_arg(*list, int);
int rowspan = va_arg(*list, int);
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
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
@ -365,61 +365,61 @@ _unpack(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
EAPI void
elm_table_pack_set(Evas_Object *subobj,
int x,
int y,
int w,
int h)
int col,
int row,
int colspan,
int rowspan)
{
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
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
_pack_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *subobj = va_arg(*list, Evas_Object *);
int x = va_arg(*list, int);
int y = va_arg(*list, int);
int w = va_arg(*list, int);
int h = va_arg(*list, int);
int col = va_arg(*list, int);
int row = va_arg(*list, int);
int colspan = va_arg(*list, int);
int rowspan = va_arg(*list, int);
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
elm_table_pack_get(Evas_Object *subobj,
int *x,
int *y,
int *w,
int *h)
int *col,
int *row,
int *colspan,
int *rowspan)
{
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
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
_pack_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
Evas_Object *subobj = va_arg(*list, Evas_Object *);
int *x = va_arg(*list, int *);
int *y = va_arg(*list, int *);
int *w = va_arg(*list, int *);
int *h = va_arg(*list, int *);
int *col = va_arg(*list, int *);
int *row = va_arg(*list, int *);
int *colspan = 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);
evas_object_table_pack_get
(wd->resize_obj, subobj, &ix, &iy, &iw, &ih);
if (x) *x = ix;
if (y) *y = iy;
if (w) *w = iw;
if (h) *h = ih;
(wd->resize_obj, subobj, &icol, &irow, &icolspan, &irowspan);
if (col) *col = icol;
if (row) *row = irow;
if (colspan) *colspan = icolspan;
if (rowspan) *rowspan = irowspan;
}
EAPI void

View File

@ -17,9 +17,9 @@
* table = elm_table_add(win);
* evas_object_show(table);
* 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, next_x_coord, next_y_coord, colspan, rowspan);
* elm_table_pack(table, table_content_object, other_x_coord, other_y_coord, colspan, rowspan);
* elm_table_pack(table, table_content_object, column, row, colspan, rowspan);
* elm_table_pack(table, table_content_object, next_column, next_row, colspan, rowspan);
* elm_table_pack(table, table_content_object, other_column, other_row, colspan, rowspan);
* @endcode
*
* The following are examples of how to use a table:

View File

@ -86,16 +86,16 @@ enum
* @brief Add a subobject on the table with the coordinates passed
*
* @param[in] subobj
* @param[in] x
* @param[in] y
* @param[in] w
* @param[in] h
* @param[in] column
* @param[in] row
* @param[in] colspan
* @param[in] rowspan
*
* @see elm_table_pack
*
* @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
@ -118,16 +118,16 @@ enum
* @brief Set the packing location of an existing child of the table
*
* @param[in] subobj
* @param[in] x
* @param[in] y
* @param[in] w
* @param[in] h
* @param[in] column
* @param[in] row
* @param[in] colspan
* @param[in] rowspan
*
* @see elm_table_pack_set
*
* @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
@ -136,16 +136,16 @@ enum
* @brief Get the packing location of an existing child of the table
*
* @param[in] subobj
* @param[out] x
* @param[out] y
* @param[out] w
* @param[out] h
* @param[out] column
* @param[out] row
* @param[out] colspan
* @param[out] rowspan
*
* @see elm_table_pack_get
*
* @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

View File

@ -59,10 +59,10 @@ EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizon
*
* @param obj The table object
* @param subobj The subobject to be added to the table
* @param x Row number
* @param y Column number
* @param w colspan
* @param h rowspan
* @param col Column number
* @param row Row number
* @param colspan colspan
* @param rowspan rowspan
*
* @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
@ -70,7 +70,7 @@ EAPI void elm_table_padding_get(const Evas_Object *obj, Evas_Coord *horizon
*
* @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.
@ -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
*
* @param subobj The subobject to be modified in the table
* @param x Row number
* @param y Column number
* @param w rowspan
* @param h colspan
* @param col Column number
* @param row Row number
* @param colspan colspan
* @param rowspan rowspan
*
* Modifies the position of an object already in the table.
*
* @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
* value of 1 for w and h means @p subobj only takes that 1 cell.
* a value of 0 for col and row, means the top left cell of the table, and a
* value of 1 for colspan and rowspan means @p subobj only takes that 1 cell.
*
* @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
*
* @param subobj The subobject to be modified in the table
* @param x Row number
* @param y Column number
* @param w rowspan
* @param h colspan
* @param col Column number
* @param row Row number
* @param colspan colspan
* @param rowspan rowspan
*
* @see elm_table_pack_set()
*
* @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.