mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-20 04:30:07 +01:00
ei: Expose ei_event_ref()
As with eis, expose ei_event_ref() as well, for consistency. Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/340>
This commit is contained in:
parent
42b9a89371
commit
5e57b1ed5f
2 changed files with 17 additions and 9 deletions
|
|
@ -86,6 +86,3 @@ ei_event_new_for_device(struct ei_device *device);
|
|||
|
||||
struct ei *
|
||||
ei_event_get_context(struct ei_event *event);
|
||||
|
||||
struct ei_event *
|
||||
ei_event_ref(struct ei_event *event);
|
||||
|
|
|
|||
23
src/libei.h
23
src/libei.h
|
|
@ -1111,13 +1111,24 @@ struct ei *
|
|||
ei_seat_get_context(struct ei_seat *seat);
|
||||
|
||||
/**
|
||||
* Release resources associated with this event. This function always
|
||||
* returns NULL.
|
||||
* Increase the refcount of this struct by one. Use ei_event_unref() to decrease
|
||||
* the refcount. This function always returns the same event that the reference
|
||||
* was added to.
|
||||
*
|
||||
* The caller cannot increase the refcount of an event. Events should be
|
||||
* considered transient data and not be held longer than required.
|
||||
* ei_event_unref() is provided for consistency (as opposed to, say,
|
||||
* ei_event_free()).
|
||||
* Events should be considered transient data and not be held longer than
|
||||
* required.
|
||||
*/
|
||||
struct ei_event *
|
||||
ei_event_ref(struct ei_event *event);
|
||||
|
||||
/**
|
||||
* Decrease the refcount of this struct by one. When the refcount reaches
|
||||
* zero, all allocated resources for this struct are released.
|
||||
*
|
||||
* Events should be considered transient data and not be held longer than
|
||||
* required.
|
||||
*
|
||||
* @return always NULL
|
||||
*/
|
||||
struct ei_event *
|
||||
ei_event_unref(struct ei_event *event);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue