.fault_list = NULL,
.init_count = 0,
.prevent_overwrite = 0,
- .event_filter = 0.02f,
+ .event_filter = 0.01f,
};
struct cb_info {
}
if (ret < 0) {
- DbgPrint("Resize request is failed: %d\n", ret);
+ ErrPrint("Resize request is failed: %d\n", ret);
goto errout;
}
static void resize_cb(struct livebox *handler, const struct packet *result, void *data)
{
int ret;
- struct cb_info *info = data;
- ret_cb_t cb;
- void *cbdata;
-
- cb = info->cb;
- cbdata = info->data;
- destroy_cb_info(info);
if (!result) {
ret = LB_STATUS_ERROR_FAULT;
* after this request.
*/
if (ret < 0) {
- DbgPrint("Resize request is failed: %d\n", ret);
+ ErrPrint("Resize request is failed: %d\n", ret);
goto errout;
}
- DbgPrint("Resize request is successfully sent\n");
return;
errout:
if (ret < 0)
goto errout;
- DbgPrint("Succeed to send period change request, waiting result\n");
return;
errout:
}
if (ret == 0) {
- DbgPrint("Returns %d (waiting deleted event)\n", ret);
handler->deleted_cb = cb;
handler->deleted_cbdata = cbdata;
} else if (cb) {
}
if (ret >= 0) {
- DbgPrint("new request is sent, just waiting the created event\n");
handler->created_cb = cb;
handler->created_cbdata = cbdata;
}
if (ret < 0) {
- DbgPrint("Failed to create a PD\n");
+ ErrPrint("Failed to create a PD[%d]\n", ret);
goto errout;
}
destroy_cb_info(info);
if (!result) {
- DbgPrint("Result is NIL (may connection lost)\n");
+ ErrPrint("Result is NIL (may connection lost)\n");
ret = LB_STATUS_ERROR_FAULT;
} else if (packet_get(result, "i", &ret) != 1) {
- DbgPrint("Invalid parameter\n");
+ ErrPrint("Invalid parameter\n");
ret = LB_STATUS_ERROR_INVALID;
}
if (ret == 0) {
- DbgPrint("PD Destroyed callback prepared\n");
handler->pd_destroyed_cb = cb;
handler->pd_destroyed_cbdata = cbdata;
} else if (cb) {
- DbgPrint("PD is not desroyed (forcely reset, pd flag)\n");
handler->is_pd_created = 0;
cb(handler, ret, cbdata);
}
ret = LB_STATUS_ERROR_INVALID;
}
- DbgPrint("Delete category returns: %d\n", ret);
-
if (cb)
cb(handler, ret, cbdata);
}
else if (packet_get(result, "i", &ret) != 1)
ret = LB_STATUS_ERROR_INVALID;
- DbgPrint("Delete category returns: %d\n", ret);
-
if (cb)
cb(handler, ret, cbdata);
}
goto errout;
}
- DbgPrint("Access event is successfully sent. waiting result\n");
return;
errout:
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("Send: %dx%d\n", x, y);
-
return master_rpc_async_request(handler, packet, 0, access_ret_cb, NULL);
}
return LB_STATUS_ERROR_FAULT;
}
- DbgPrint("Send: %dx%d\n", x, y);
-
return master_rpc_request_only(handler, packet);
}
EAPI int livebox_fini(void)
{
if (s_info.init_count <= 0) {
- DbgPrint("Didn't initialized\n");
+ ErrPrint("Doesn't initialized\n");
return LB_STATUS_ERROR_INVALID;
}
s_info.init_count--;
if (s_info.init_count > 0) {
- DbgPrint("init count : %d\n", s_info.init_count);
+ ErrPrint("init count : %d\n", s_info.init_count);
return LB_STATUS_SUCCESS;
}
return NULL;
}
- DbgPrint("Successfully sent a new request ([%lf] %s)\n", handler->timestamp, handler->pkgname);
handler->state = CREATE;
return lb_ref(handler);
}
if (!cb)
cb = default_period_changed_cb;
- handler->period_changed_cb = cb;
- handler->period_cbdata = data;
-
ret = master_rpc_async_request(handler, packet, 0, period_ret_cb, NULL);
- if (ret < 0) {
- handler->period_changed_cb = NULL;
- handler->period_cbdata = NULL;
+ if (ret == LB_STATUS_SUCCESS) {
+ handler->period_changed_cb = cb;
+ handler->period_cbdata = data;
}
return ret;
dlist_foreach(s_info.fault_list, l, info) {
if (info->handler == cb) {
void *data;
+
s_info.fault_list = dlist_remove(s_info.fault_list, l);
data = info->user_data;
free(info);
if (!cb)
cb = default_update_mode_cb;
- handler->update_mode_cb = cb;
- handler->update_mode_cbdata = data;
-
ret = master_rpc_async_request(handler, packet, 0, update_mode_cb, NULL);
- if (ret < 0) {
- handler->update_mode_cb = NULL;
- handler->update_mode_cbdata = NULL;
+ if (ret == LB_STATUS_SUCCESS) {
+ handler->update_mode_cb = cb;
+ handler->update_mode_cbdata = data;
}
return ret;
if (!cb)
cb = default_lb_size_changed_cb;
- handler->size_changed_cb = cb;
- handler->size_cbdata = data;
-
ret = master_rpc_async_request(handler, packet, 0, resize_cb, NULL);
- if (ret < 0) {
- handler->size_changed_cb = NULL;
- handler->size_cbdata = NULL;
+ if (ret == LB_STATUS_SUCCESS) {
+ handler->size_changed_cb = cb;
+ handler->size_cbdata = data;
}
return ret;
int ret;
timestamp = util_timestamp();
- DbgPrint("CLICKED: %lf\n", timestamp);
if (!handler) {
ErrPrint("Handler is NIL\n");
}
if (handler->lb.auto_launch) {
- DbgPrint("Auto-launch enabled: %s\n", handler->lb.auto_launch);
+ DbgPrint("AUTO_LAUNCH [%s]\n", handler->lb.auto_launch);
if (aul_launch_app(handler->lb.auto_launch, NULL) < 0)
ErrPrint("Failed to launch app %s\n", handler->lb.auto_launch);
}
return LB_STATUS_ERROR_FAULT;
}
+ DbgPrint("CLICKED: %lf\n", timestamp);
ret = master_rpc_request_only(handler, packet);
- DbgPrint("Click request: %d\n", ret);
if (!handler->lb.mouse_event && (handler->lb.type == _LB_TYPE_BUFFER || handler->lb.type == _LB_TYPE_SCRIPT)) {
int ret; /* Shadow variable */
ret = send_mouse_event(handler, "lb_mouse_down", x * handler->lb.width, y * handler->lb.height);
if (ret < 0)
- DbgPrint("Failed to send Down: %d\n", ret);
+ ErrPrint("Failed to send Down: %d\n", ret);
ret = send_mouse_event(handler, "lb_mouse_move", x * handler->lb.width, y * handler->lb.height);
if (ret < 0)
- DbgPrint("Failed to send Move: %d\n", ret);
+ ErrPrint("Failed to send Move: %d\n", ret);
ret = send_mouse_event(handler, "lb_mouse_up", x * handler->lb.width, y * handler->lb.height);
if (ret < 0)
- DbgPrint("Failed to send Up: %d\n", ret);
+ ErrPrint("Failed to send Up: %d\n", ret);
}
return ret;
if (!cb)
cb = default_pd_created_cb;
- handler->pd_created_cb = cb;
- handler->pd_created_cbdata = data;
-
+ DbgPrint("PERF_DBOX\n");
ret = master_rpc_async_request(handler, packet, 0, pd_create_cb, NULL);
- if (ret < 0) {
- handler->pd_created_cb = NULL;
- handler->pd_created_cbdata = NULL;
+ if (ret == LB_STATUS_SUCCESS) {
+ handler->pd_created_cb = cb;
+ handler->pd_created_cbdata = data;
}
return ret;
}
if (!handler->is_pd_created) {
- DbgPrint("PD is not created\n");
+ ErrPrint("PD is not created\n");
return LB_STATUS_ERROR_INVALID;
}
if (!cb)
cb = default_access_event_cb;
- handler->access_event_cb = cb;
- handler->access_event_cbdata = data;
-
ret = send_access_event(handler, cmd, x * w, y * h);
- if (ret < 0) {
- handler->access_event_cb = NULL;
- handler->access_event_cbdata = NULL;
+ if (ret == LB_STATUS_SUCCESS) {
+ handler->access_event_cb = cb;
+ handler->access_event_cbdata = data;
}
return ret;
int flag = 1;
if (type & CONTENT_EVENT_MOUSE_MASK) {
- if (!handler->lb.mouse_event) {
- ErrPrint("Box is not support the mouse event\n");
+ if (!handler->lb.mouse_event)
return LB_STATUS_ERROR_INVALID;
- }
if (!handler->lb.data.fb) {
ErrPrint("Handler is not valid\n");
h = &_h;
if (!handler->is_pd_created) {
- DbgPrint("Buffer is not created yet [%dx%d]\n", *w, *h);
*w = handler->pd.default_width;
*h = handler->pd.default_height;
} else {
case _LB_TYPE_BUFFER:
case _LB_TYPE_SCRIPT:
if (!fb_is_created(handler->lb.data.fb)) {
- DbgPrint("Buffer is not created yet - reset size\n");
w = 0;
h = 0;
}
if (!cb)
cb = default_group_changed_cb;
- handler->group_changed_cb = cb;
- handler->group_cbdata = data;
-
ret = master_rpc_async_request(handler, packet, 0, set_group_ret_cb, NULL);
- if (ret < 0) {
- handler->group_changed_cb = NULL;
- handler->group_cbdata = NULL;
+ if (ret == LB_STATUS_SUCCESS) {
+ handler->group_changed_cb = cb;
+ handler->group_cbdata = data;
}
return ret;
{
struct packet *packet;
- if (!handler) {
- ErrPrint("Handler is NIL\n");
+ if (!handler || pixmap == 0) {
+ ErrPrint("Handler is NIL [%d]\n", pixmap);
return LB_STATUS_ERROR_INVALID;
}
{
struct packet *packet;
- if (!handler) {
- ErrPrint("Handler is NIL\n");
+ if (!handler || pixmap == 0) {
+ ErrPrint("Handler is NIL [%d]\n", pixmap);
return LB_STATUS_ERROR_INVALID;
}
if (!cb)
cb = default_pinup_cb;
- handler->pinup_cb = cb;
- handler->pinup_cbdata = data;
-
ret = master_rpc_async_request(handler, packet, 0, pinup_done_cb, NULL);
- if (ret < 0) {
- handler->pinup_cb = NULL;
- handler->pinup_cbdata = NULL;
+ if (ret == LB_STATUS_SUCCESS) {
+ handler->pinup_cb = cb;
+ handler->pinup_cbdata = data;
}
return ret;
}
}
- DbgPrint("Change the visibility %d <> %d, %s\n", handler->visible, state, handler->id);
-
if (handler->visible == state)
return LB_STATUS_ERROR_ALREADY;
return handler;
if (handler->created_cb) {
- DbgPrint("Clear created event callback\n");
handler->created_cb(handler, LB_STATUS_ERROR_FAULT, handler->created_cbdata);
handler->created_cb = NULL;
handler->created_cbdata = NULL;
}
if (handler->deleted_cb) {
- DbgPrint("Clear deleted event callback\n");
handler->deleted_cb(handler, LB_STATUS_ERROR_FAULT, handler->deleted_cbdata);
handler->deleted_cb = NULL;
handler->deleted_cbdata = NULL;
}
if (handler->pinup_cb) {
- DbgPrint("Clear pinup event callback\n");
handler->pinup_cb(handler, LB_STATUS_ERROR_FAULT, handler->pinup_cbdata);
handler->pinup_cb = NULL;
handler->pinup_cbdata = NULL;
}
if (handler->group_changed_cb) {
- DbgPrint("Clear group changed event callback\n");
handler->group_changed_cb(handler, LB_STATUS_ERROR_FAULT, handler->group_cbdata);
handler->group_changed_cb = NULL;
handler->group_cbdata = NULL;
}
if (handler->period_changed_cb) {
- DbgPrint("Clear period changed event callback\n");
handler->period_changed_cb(handler, LB_STATUS_ERROR_FAULT, handler->period_cbdata);
handler->period_changed_cb = NULL;
handler->period_cbdata = NULL;
}
if (handler->size_changed_cb) {
- DbgPrint("Clear size changed event callback\n");
handler->size_changed_cb(handler, LB_STATUS_ERROR_FAULT, handler->size_cbdata);
handler->size_changed_cb = NULL;
handler->size_cbdata = NULL;
}
if (handler->pd_created_cb) {
- DbgPrint("Clear pd created event callback\n");
handler->pd_created_cb(handler, LB_STATUS_ERROR_FAULT, handler->pd_created_cbdata);
handler->pd_created_cb = NULL;
handler->pd_created_cbdata = NULL;
}
if (handler->pd_destroyed_cb) {
- DbgPrint("Clear pd destroyed event callback\n");
handler->pd_destroyed_cb(handler, LB_STATUS_ERROR_FAULT, handler->pd_destroyed_cbdata);
handler->pd_destroyed_cb = NULL;
handler->pd_destroyed_cbdata = NULL;
}
if (handler->update_mode_cb) {
- DbgPrint("Clear update mode callback\n");
handler->update_mode_cb(handler, LB_STATUS_ERROR_FAULT, handler->update_mode_cbdata);
handler->update_mode_cb = NULL;
handler->update_mode_cbdata = NULL;
}
if (handler->access_event_cb) {
- DbgPrint("Clear access status callback\n");
handler->access_event_cb(handler, LB_STATUS_ERROR_FAULT, handler->access_event_cbdata);
handler->access_event_cb = NULL;
handler->access_event_cbdata = NULL;