* @since_tizen 2.3
*/
enum dynamicbox_type {
- DBOX_TYPE_IMAGE = 0x01, /**< Contents of a dynamicbox is based on the image file */
- DBOX_TYPE_BUFFER = 0x02, /**< Contents of a dynamicbox is based on canvas buffer(shared) */
- DBOX_TYPE_TEXT = 0x04, /**< Contents of a dynamicbox is based on formatted text file */
- DBOX_TYPE_RESOURCE_ID = 0x08, /**< Contens of a dynamicbox is shared by the resource id(depends on window system) */
- DBOX_TYPE_UIFW = 0x10, /**< Using UI F/W resource for sharing content & event */
- DBOX_TYPE_INVALID = 0xFF /**< Unknown Dynamic Box type */
+ DBOX_CONTENT_TYPE_IMAGE = 0x01, /**< Contents of a dynamicbox is based on the image file */
+ DBOX_CONTENT_TYPE_BUFFER = 0x02, /**< Contents of a dynamicbox is based on canvas buffer(shared) */
+ DBOX_CONTENT_TYPE_TEXT = 0x04, /**< Contents of a dynamicbox is based on formatted text file */
+ DBOX_CONTENT_TYPE_RESOURCE_ID = 0x08, /**< Contens of a dynamicbox is shared by the resource id(depends on window system) */
+ DBOX_CONTENT_TYPE_UIFW = 0x10, /**< Using UI F/W resource for sharing content & event */
+ DBOX_CONTENT_TYPE_INVALID = 0xFF /**< Unknown Dynamic Box type */
};
/**
(void)dbox_set_gbar_fb(common, buf_id);
switch (common->gbar.type) {
- case _GBAR_TYPE_SCRIPT:
- case _GBAR_TYPE_BUFFER:
+ case GBAR_TYPE_SCRIPT:
+ case GBAR_TYPE_BUFFER:
switch (fb_type(dbox_get_gbar_fb(common))) {
case DBOX_FB_TYPE_FILE:
case DBOX_FB_TYPE_SHM:
break;
}
break;
- case _GBAR_TYPE_ELEMENTARY:
- case _GBAR_TYPE_TEXT:
+ case GBAR_TYPE_UIFW:
+ case GBAR_TYPE_TEXT:
default:
break;
}
* Lock file should be deleted after all callbacks are processed.
*/
switch (common->gbar.type) {
- case _GBAR_TYPE_SCRIPT:
- case _GBAR_TYPE_BUFFER:
+ case GBAR_TYPE_SCRIPT:
+ case GBAR_TYPE_BUFFER:
switch (fb_type(dbox_get_gbar_fb(common))) {
case DBOX_FB_TYPE_FILE:
case DBOX_FB_TYPE_SHM:
break;
}
break;
- case _GBAR_TYPE_ELEMENTARY:
- case _GBAR_TYPE_TEXT:
+ case GBAR_TYPE_UIFW:
+ case GBAR_TYPE_TEXT:
default:
break;
}
int size_list;
int user;
int pinup_supported;
- enum dbox_type dbox_type;
- enum gbar_type gbar_type;
+ enum dynamicbox_dbox_type dbox_type;
+ enum dynamicbox_gbar_type gbar_type;
double period;
int is_pinned_up;
common->is_pinned_up = is_pinned_up;
switch (dbox_type) {
- case _DBOX_TYPE_ELEMENTARY:
- case _DBOX_TYPE_FILE:
+ case DBOX_TYPE_UIFW:
+ case DBOX_TYPE_FILE:
break;
- case _DBOX_TYPE_SCRIPT:
- case _DBOX_TYPE_BUFFER:
+ case DBOX_TYPE_SCRIPT:
+ case DBOX_TYPE_BUFFER:
if (!strlen(dbox_fname)) {
break;
}
ErrPrint("Failed to do sync FB (%s - %s)\n", pkgname, util_basename(util_uri_to_path(id)));
}
break;
- case _DBOX_TYPE_TEXT:
+ case DBOX_TYPE_TEXT:
dbox_set_text_dbox(common);
break;
default:
dbox_set_gbarsize(common, gbar_w, gbar_h);
dbox_set_default_gbarsize(common, gbar_w, gbar_h);
switch (gbar_type) {
- case _GBAR_TYPE_SCRIPT:
- case _GBAR_TYPE_BUFFER:
+ case GBAR_TYPE_SCRIPT:
+ case GBAR_TYPE_BUFFER:
if (!strlen(gbar_fname)) {
break;
}
*/
break;
- case _GBAR_TYPE_TEXT:
+ case GBAR_TYPE_TEXT:
dbox_set_text_gbar(common);
break;
- case _GBAR_TYPE_ELEMENTARY:
+ case GBAR_TYPE_UIFW:
default:
break;
}
h = handler->common->dbox.height;
switch (handler->common->dbox.type) {
- case _DBOX_TYPE_BUFFER:
- case _DBOX_TYPE_SCRIPT:
+ case DBOX_TYPE_BUFFER:
+ case DBOX_TYPE_SCRIPT:
if (!fb_is_created(handler->common->dbox.fb)) {
w = 0;
h = 0;
if (!handler || handler->state != DBOX_STATE_CREATE) {
ErrPrint("Handler is invalid\n");
- return DBOX_TYPE_INVALID;
+ return DBOX_CONTENT_TYPE_INVALID;
}
if (!handler->common || handler->common->state != DBOX_STATE_CREATE) {
ErrPrint("Handler is invalid\n");
- return DBOX_TYPE_INVALID;
+ return DBOX_CONTENT_TYPE_INVALID;
}
if (!handler->common->id) {
ErrPrint("Handler is not valid\n");
- return DBOX_TYPE_INVALID;
+ return DBOX_CONTENT_TYPE_INVALID;
}
if (gbar) {
switch (handler->common->gbar.type) {
- case _GBAR_TYPE_TEXT:
- return DBOX_TYPE_TEXT;
- case _GBAR_TYPE_BUFFER:
- case _GBAR_TYPE_SCRIPT:
+ case GBAR_TYPE_TEXT:
+ return DBOX_CONTENT_TYPE_TEXT;
+ case GBAR_TYPE_BUFFER:
+ case GBAR_TYPE_SCRIPT:
{
const char *id;
id = fb_id(handler->common->gbar.fb);
if (id && !strncasecmp(id, SCHEMA_PIXMAP, strlen(SCHEMA_PIXMAP))) {
- return DBOX_TYPE_RESOURCE_ID;
+ return DBOX_CONTENT_TYPE_RESOURCE_ID;
}
}
- return DBOX_TYPE_BUFFER;
- case _GBAR_TYPE_ELEMENTARY:
- return DBOX_TYPE_UIFW;
+ return DBOX_CONTENT_TYPE_BUFFER;
+ case GBAR_TYPE_UIFW:
+ return DBOX_CONTENT_TYPE_UIFW;
default:
break;
}
- return DBOX_TYPE_INVALID;
+ return DBOX_CONTENT_TYPE_INVALID;
} else {
switch (handler->common->dbox.type) {
- case _DBOX_TYPE_FILE:
- return DBOX_TYPE_IMAGE;
- case _DBOX_TYPE_BUFFER:
- case _DBOX_TYPE_SCRIPT:
+ case DBOX_TYPE_FILE:
+ return DBOX_CONTENT_TYPE_IMAGE;
+ case DBOX_TYPE_BUFFER:
+ case DBOX_TYPE_SCRIPT:
{
const char *id;
id = fb_id(handler->common->dbox.fb);
if (id && !strncasecmp(id, SCHEMA_PIXMAP, strlen(SCHEMA_PIXMAP))) {
- return DBOX_TYPE_RESOURCE_ID;
+ return DBOX_CONTENT_TYPE_RESOURCE_ID;
}
}
- return DBOX_TYPE_BUFFER;
- case _DBOX_TYPE_TEXT:
- return DBOX_TYPE_TEXT;
- case _DBOX_TYPE_ELEMENTARY:
- return DBOX_TYPE_UIFW;
+ return DBOX_CONTENT_TYPE_BUFFER;
+ case DBOX_TYPE_TEXT:
+ return DBOX_CONTENT_TYPE_TEXT;
+ case DBOX_TYPE_UIFW:
+ return DBOX_CONTENT_TYPE_UIFW;
default:
break;
}
- return DBOX_TYPE_INVALID;
+ return DBOX_CONTENT_TYPE_INVALID;
}
return type;
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
- if (handler->common->gbar.type != _GBAR_TYPE_SCRIPT && handler->common->gbar.type != _GBAR_TYPE_BUFFER) {
+ if (handler->common->gbar.type != GBAR_TYPE_SCRIPT && handler->common->gbar.type != GBAR_TYPE_BUFFER) {
ErrPrint("Handler is not valid type\n");
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
- if (handler->common->dbox.type != _DBOX_TYPE_SCRIPT && handler->common->dbox.type != _DBOX_TYPE_BUFFER) {
+ if (handler->common->dbox.type != DBOX_TYPE_SCRIPT && handler->common->dbox.type != DBOX_TYPE_BUFFER) {
ErrPrint("Handler is not valid type\n");
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
- if (handler->common->gbar.type != _GBAR_TYPE_SCRIPT && handler->common->gbar.type != _GBAR_TYPE_BUFFER) {
+ if (handler->common->gbar.type != GBAR_TYPE_SCRIPT && handler->common->gbar.type != GBAR_TYPE_BUFFER) {
ErrPrint("Handler is not valid type\n");
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
- if (handler->common->dbox.type != _DBOX_TYPE_SCRIPT && handler->common->dbox.type != _DBOX_TYPE_BUFFER) {
+ if (handler->common->dbox.type != DBOX_TYPE_SCRIPT && handler->common->dbox.type != DBOX_TYPE_BUFFER) {
ErrPrint("Handler is not valid type\n");
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
return 0;
}
- if (handler->common->gbar.type != _GBAR_TYPE_SCRIPT && handler->common->gbar.type != _GBAR_TYPE_BUFFER) {
+ if (handler->common->gbar.type != GBAR_TYPE_SCRIPT && handler->common->gbar.type != GBAR_TYPE_BUFFER) {
ErrPrint("Invalid handler\n");
return 0;
}
return 0;
}
- if (handler->common->dbox.type != _DBOX_TYPE_SCRIPT && handler->common->dbox.type != _DBOX_TYPE_BUFFER) {
+ if (handler->common->dbox.type != DBOX_TYPE_SCRIPT && handler->common->dbox.type != DBOX_TYPE_BUFFER) {
ErrPrint("Invalid handler\n");
return 0;
}
return NULL;
}
- if (handler->common->gbar.type != _GBAR_TYPE_SCRIPT && handler->common->gbar.type != _GBAR_TYPE_BUFFER) {
+ if (handler->common->gbar.type != GBAR_TYPE_SCRIPT && handler->common->gbar.type != GBAR_TYPE_BUFFER) {
ErrPrint("Handler is not valid type\n");
return NULL;
}
return NULL;
}
- if (handler->common->dbox.type != _DBOX_TYPE_SCRIPT && handler->common->dbox.type != _DBOX_TYPE_BUFFER) {
+ if (handler->common->dbox.type != DBOX_TYPE_SCRIPT && handler->common->dbox.type != DBOX_TYPE_BUFFER) {
ErrPrint("Handler is not valid type\n");
return NULL;
}
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
- if ((handler->common->dbox.type != _DBOX_TYPE_TEXT && handler->common->gbar.type != _GBAR_TYPE_TEXT) || !handler->common->id) {
+ if ((handler->common->dbox.type != DBOX_TYPE_TEXT && handler->common->gbar.type != GBAR_TYPE_TEXT) || !handler->common->id) {
ErrPrint("Handler is not valid\n");
return DBOX_STATUS_ERROR_INVALID_PARAMETER;
}
}
/* Data provider will set this */
- common->dbox.type = _DBOX_TYPE_FILE;
- common->gbar.type = _GBAR_TYPE_SCRIPT;
+ common->dbox.type = DBOX_TYPE_FILE;
+ common->gbar.type = GBAR_TYPE_SCRIPT;
/* Used for handling the mouse event on a box */
common->dbox.mouse_event = 0;
void dbox_set_filename(struct dynamicbox_common *common, const char *filename)
{
if (common->filename) {
- if (common->dbox.type == _DBOX_TYPE_FILE || common->dbox.type == _DBOX_TYPE_TEXT) {
+ if (common->dbox.type == DBOX_TYPE_FILE || common->dbox.type == DBOX_TYPE_TEXT) {
if (common->filename[0] && unlink(common->filename) < 0) {
ErrPrint("unlink: %s (%s)\n", strerror(errno), common->filename);
}
void dbox_set_text_dbox(struct dynamicbox_common *common)
{
- common->dbox.type = _DBOX_TYPE_TEXT;
+ common->dbox.type = DBOX_TYPE_TEXT;
}
void dbox_set_text_gbar(struct dynamicbox_common *common)
{
- common->gbar.type = _GBAR_TYPE_TEXT;
+ common->gbar.type = GBAR_TYPE_TEXT;
}
int dbox_text_dbox(struct dynamicbox_common *common)
{
- return common->dbox.type == _DBOX_TYPE_TEXT;
+ return common->dbox.type == DBOX_TYPE_TEXT;
}
int dbox_text_gbar(struct dynamicbox_common *common)
{
- return common->gbar.type == _GBAR_TYPE_TEXT;
+ return common->gbar.type == GBAR_TYPE_TEXT;
}
void dbox_set_period(struct dynamicbox_common *common, double period)