mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-31 15:50:11 +01:00
protocol: rename type to context_type
type is a reserved keyword in many languages, let's not make this harder to use than necessary
This commit is contained in:
parent
bf77479c6a
commit
cfbb906358
3 changed files with 15 additions and 13 deletions
|
|
@ -105,8 +105,8 @@
|
|||
<entry name="sender" value="1"/>
|
||||
</enum>
|
||||
|
||||
<request name="type" since="1">
|
||||
<description summary="type request">
|
||||
<request name="context_type" since="1">
|
||||
<description summary="context type request">
|
||||
Notify the EIS implementation of the type of this context.
|
||||
|
||||
This request is optional, the default client type is context_type.receiver.
|
||||
|
|
@ -159,8 +159,8 @@
|
|||
sent by the client must be provided in this version
|
||||
or any lower version.
|
||||
|
||||
This event is sent immediately after connection. A client
|
||||
should not issue any requests until processing this version.
|
||||
This event is sent immediately after connection to the EIS implementation.
|
||||
A client should not issue any requests until processing this version.
|
||||
|
||||
Note that the EIS implementation assumes that the supported
|
||||
client version of this interface is 1 unless and until the client
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
summary="the highest version supported by the EIS implementation"/>
|
||||
</event>
|
||||
|
||||
<event name="connection" since="1">
|
||||
<event name="connection" type="destructor" since="1">
|
||||
<description summary="the core connection object">
|
||||
Provides the client with the connection object that is the top-level
|
||||
object for all future requests and events.
|
||||
|
|
@ -278,7 +278,9 @@
|
|||
|
||||
<event name="done" type="destructor" since="1">
|
||||
<description summary="done event">
|
||||
Notify the client when the related request is done.
|
||||
Notify the client when the related request is done. Immediately after this event
|
||||
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="uint" summary="request-specific data for the callback"/>
|
||||
</event>
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@ ei_connection_setup_initialize(struct ei_connection_setup *setup, uint32_t versi
|
|||
{
|
||||
struct ei *ei = ei_connection_setup_get_context(setup);
|
||||
|
||||
if (version >= EI_CONNECTION_SETUP_REQUEST_TYPE_SINCE_VERSION)
|
||||
ei_connection_setup_request_type(setup,
|
||||
ei->is_sender ?
|
||||
EI_CONNECTION_SETUP_CONTEXT_TYPE_SENDER :
|
||||
EI_CONNECTION_SETUP_CONTEXT_TYPE_RECEIVER);
|
||||
if (version >= EI_CONNECTION_SETUP_REQUEST_CONTEXT_TYPE_SINCE_VERSION)
|
||||
ei_connection_setup_request_context_type(setup,
|
||||
ei->is_sender ?
|
||||
EI_CONNECTION_SETUP_CONTEXT_TYPE_SENDER :
|
||||
EI_CONNECTION_SETUP_CONTEXT_TYPE_RECEIVER);
|
||||
|
||||
if (version >= EI_CONNECTION_SETUP_REQUEST_NAME_SINCE_VERSION)
|
||||
ei_connection_setup_request_name(setup, ei->name);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ client_msg_name(struct eis_connection_setup *setup, const char *name)
|
|||
}
|
||||
|
||||
static int
|
||||
client_msg_type(struct eis_connection_setup *setup, uint32_t type)
|
||||
client_msg_context_type(struct eis_connection_setup *setup, uint32_t type)
|
||||
{
|
||||
switch(type) {
|
||||
case EIS_CONNECTION_SETUP_CONTEXT_TYPE_SENDER:
|
||||
|
|
@ -168,7 +168,7 @@ client_msg_interface_version(struct eis_connection_setup *setup, const char *nam
|
|||
|
||||
static const struct eis_connection_setup_interface interface = {
|
||||
.done = client_msg_done,
|
||||
.type = client_msg_type,
|
||||
.context_type = client_msg_context_type,
|
||||
.name = client_msg_name,
|
||||
.interface_version = client_msg_interface_version,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue