{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_KEY_DOWN, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_KEY_DOWN, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_KEY_UP, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_KEY_UP, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_ENTER, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_ENTER, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_LEAVE, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_LEAVE, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_DOWN, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_DOWN, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_UP, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_UP, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_MOVE, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+ (void)info->handler(info, BUFFER_EVENT_MOVE, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_KEY_DOWN, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_KEY_DOWN, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_KEY_UP, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_KEY_UP, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_ENTER, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_ENTER, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_LEAVE, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_LEAVE, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_DOWN, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_DOWN, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_UP, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_UP, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;
{
const char *pkgname;
const char *id;
- int w;
- int h;
- double x;
- double y;
+ int x;
+ int y;
double timestamp;
struct livebox_buffer *info;
- if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, ×tamp, &x, &y) != 7) {
+ if (packet_get(packet, "ssdii", &pkgname, &id, ×tamp, &x, &y) != 5) {
ErrPrint("Invalid packet\n");
goto out;
}
goto out;
}
- if (info->handler)
- (void)info->handler(info, BUFFER_EVENT_MOVE, timestamp, x, y, info->data);
+ if (info->handler) {
+ int w;
+ int h;
+ if (provider_buffer_get_size(info, &w, &h, NULL) < 0) {
+ ErrPrint("Failed to get buffer size [%s:%s]\n", pkgname, id);
+ goto out;
+ }
+
+ (void)info->handler(info, BUFFER_EVENT_MOVE, timestamp, (double)x / (double)w, (double)y / (double)h, info->data);
+ }
out:
return NULL;