wl_proxy
Represents a protocol object on the client side.
- Provided by: libwayland-dev (Version: 1.4.0-1ubuntu1.1)
- Source: wayland
- Report a bug
Represents a protocol object on the client side.
#include <wayland-client.h>
struct wl_proxy * wl_proxy_create (struct
wl_proxy *factory, const struct wl_interface *interface)
void wl_proxy_destroy (struct wl_proxy *proxy)
int wl_proxy_add_listener (struct wl_proxy *proxy,
void(**implementation)(void), void *data)
const void * wl_proxy_get_listener (struct wl_proxy *proxy)
int wl_proxy_add_dispatcher (struct wl_proxy *proxy,
wl_dispatcher_func_t dispatcher, const void *implementation, void
*data)
struct wl_proxy * wl_proxy_marshal_array_constructor (struct
wl_proxy *proxy, uint32_t opcode, union wl_argument *args,
const struct wl_interface *interface)
void wl_proxy_marshal (struct wl_proxy *proxy, uint32_t
opcode,...)
struct wl_proxy * wl_proxy_marshal_constructor (struct
wl_proxy *proxy, uint32_t opcode, const struct wl_interface
*interface,...)
void wl_proxy_marshal_array (struct wl_proxy *proxy, uint32_t
opcode, union wl_argument *args)
void wl_proxy_set_user_data (struct wl_proxy *proxy, void
*user_data)
void * wl_proxy_get_user_data (struct wl_proxy *proxy)
uint32_t wl_proxy_get_id (struct wl_proxy *proxy)
const char * wl_proxy_get_class (struct wl_proxy *proxy)
void wl_proxy_set_queue (struct wl_proxy *proxy, struct
wl_event_queue *queue)
Represents a protocol object on the client side.
A wl_proxy acts as a client side proxy to an object existing in the compositor. The proxy is responsible for converting requests made by the clients with wl_proxy_marshal() into Wayland's wire format. Events coming from the compositor are also handled by the proxy, which will in turn call the handler set with wl_proxy_add_listener().
Note:
Set a proxy's listener (with dispatcher)
Parameters:
Returns:
Set proxy's listener to use dispatcher_func as its dispatcher and dispatcher_data as its dispatcher-specific implementation and its user data to data. If a listener has already been set, this function fails and nothing is changed.
The exact details of dispatcher_data depend on the dispatcher used. This function is intended to be used by language bindings, not user code.
Set a proxy's listener
Parameters:
Returns:
Set proxy's listener to implementation and its user data to data. If a listener has already been set, this function fails and nothing is changed.
implementation is a vector of function pointers. For an opcode n, implementation[n] should point to the handler of n for the given object.
Create a proxy object with a given interface
Parameters:
Returns:
This function creates a new proxy object with the supplied interface. The proxy object will have an id assigned from the client id space. The id should be created on the compositor side by sending an appropriate request with wl_proxy_marshal().
The proxy will inherit the display and event queue of the factory object.
Note:
See Also:
Destroy a proxy object
Parameters:
Get the interface name (class) of a proxy object
Parameters:
Returns:
Get the id of a proxy object
Parameters:
Returns:
Get a proxy's listener
Parameters:
Returns:
Gets the address to the proxy's listener; which is the listener set with wl_proxy_add_listener.
This function is useful in client with multiple listeners on the same interface to allow the identification of which code to eexecute.
Get the user data associated with a proxy
Parameters:
Returns:
Prepare a request to be sent to the compositor
Parameters:
This function is similar to wl_proxy_marshal_constructor(), except it doesn't create proxies for new-id arguments.
Note:
See Also:
Prepare a request to be sent to the compositor
Parameters:
This function is similar to wl_proxy_marshal_array_constructor(), except it doesn't create proxies for new-id arguments.
Note:
See Also:
Prepare a request to be sent to the compositor
Parameters:
Translates the request given by opcode and the extra arguments into the wire format and write it to the connection buffer. This version takes an array of the union type wl_argument.
For new-id arguments, this function will allocate a new wl_proxy and send the ID to the server. The new wl_proxy will be returned on success or NULL on errror with errno set accordingly.
Note:
See Also:
Prepare a request to be sent to the compositor
Parameters:
Returns:
Translates the request given by opcode and the extra arguments into the wire format and write it to the connection buffer.
For new-id arguments, this function will allocate a new wl_proxy and send the ID to the server. The new wl_proxy will be returned on success or NULL on errror with errno set accordingly.
Note:
Assign a proxy to an event queue
Parameters:
Assign proxy to event queue. Events coming from proxy will be queued in queue instead of the display's main queue.
See Also:
Set the user data associated with a proxy
Parameters:
Set the user data associated with proxy. When events for this proxy are received, user_data will be supplied to its listener.
Generated automatically by Doxygen for Wayland from the source code.