mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-02-11 07:10:29 +01:00
protocol: widen the callback_data arg for ping/sync to 64bit
The only invocations we have right now of these callbacks ignore the argument or force it to zero. But in the future we may have an interface that requires a callback and that interface may need to store a timestamp or object ID in this argument - so let's make sure we have enough space for that.
This commit is contained in:
parent
32c03fab35
commit
e0a6c75cb4
7 changed files with 13 additions and 8 deletions
|
|
@ -396,7 +396,7 @@
|
|||
the ei_callback object is destroyed by the EIS implementation and as such the
|
||||
client must not attempt to use it after that point.
|
||||
</description>
|
||||
<arg name="callback_data" type="uint32" summary="request-specific data for the callback"/>
|
||||
<arg name="callback_data" type="uint64" summary="request-specific data for the callback"/>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
|
|
@ -418,7 +418,7 @@
|
|||
the ei_pingpong object is destroyed by the client and as such must not be used
|
||||
any further.
|
||||
</description>
|
||||
<arg name="callback_data" type="uint32" summary="request-specific data for the callback"/>
|
||||
<arg name="callback_data" type="uint64" summary="request-specific data for the callback"/>
|
||||
</request>
|
||||
|
||||
<!-- ei_pingpong events version 1 -->
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ ei_callback_get_id(struct ei_callback *callback)
|
|||
}
|
||||
|
||||
static struct brei_result *
|
||||
handle_msg_done(struct ei_callback *callback, uint32_t callback_data)
|
||||
handle_msg_done(struct ei_callback *callback, uint64_t callback_data)
|
||||
{
|
||||
callback->func(callback, callback->callback_data, callback_data);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@
|
|||
struct ei;
|
||||
struct ei_callback;
|
||||
|
||||
typedef void (*ei_callback_func)(struct ei_callback *callback, void *callback_data, uint32_t proto_data);
|
||||
typedef void (*ei_callback_func)(struct ei_callback *callback,
|
||||
void *callback_data,
|
||||
uint64_t proto_data);
|
||||
|
||||
/* This is a protocol-only object, not exposed in the API */
|
||||
struct ei_callback {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ struct callback_user_data {
|
|||
};
|
||||
|
||||
static void
|
||||
sync_callback(struct ei_callback *callback, void *callback_data, uint32_t proto_data)
|
||||
sync_callback(struct ei_callback *callback, void *callback_data, uint64_t proto_data)
|
||||
{
|
||||
struct ei_connection *connection = callback_data;
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@ struct pingpong_user_data {
|
|||
};
|
||||
|
||||
static void
|
||||
ping_pingpong(struct eis_pingpong *pingpong, void *pingpong_data, uint32_t proto_data)
|
||||
ping_pingpong(struct eis_pingpong *pingpong, void *pingpong_data,
|
||||
uint64_t proto_data)
|
||||
{
|
||||
struct eis_connection *connection = pingpong_data;
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ eis_pingpong_get_version(struct eis_pingpong *pingpong)
|
|||
}
|
||||
|
||||
static struct brei_result *
|
||||
client_msg_done(struct eis_pingpong *pingpong, uint32_t pingpong_data)
|
||||
client_msg_done(struct eis_pingpong *pingpong, uint64_t pingpong_data)
|
||||
{
|
||||
pingpong->func(pingpong, pingpong->pingpong_data, pingpong_data);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ struct eis;
|
|||
struct eis_client;
|
||||
struct eis_pingpong;
|
||||
|
||||
typedef void (*eis_pingpong_func)(struct eis_pingpong *pingpong, void *pingpong_data, uint32_t proto_data);
|
||||
typedef void (*eis_pingpong_func)(struct eis_pingpong *pingpong,
|
||||
void *pingpong_data,
|
||||
uint64_t proto_data);
|
||||
|
||||
/* This is a protocol-only object, not exposed in the API */
|
||||
struct eis_pingpong {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue