I - Implementation type that will act as the listener for received events.public abstract class Proxy<I> extends Object implements WaylandObject
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 marshal(int) into Wayland's wire format. Events
coming from the compositor are also handled by the proxy, which will in
turn call the implementation.
With the exception of function setQueue(EventQueue), functions
accessing a Proxy are not normally used by client code. Clients
should normally use the higher level interface generated by the scanner to
interact with compositor objects.
| Modifier | Constructor and Description |
|---|---|
protected |
Proxy(long pointer) |
protected |
Proxy(Long pointer,
I implementation,
int version) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy a proxy object
|
boolean |
equals(Object o) |
int |
getId()
Get the id of a proxy object
|
I |
getImplementation()
Get a proxy's listener
Gets the proxy's listener; which is the implementation set when this proxy was constructed.
|
Long |
getPointer() |
int |
getVersion() |
int |
hashCode() |
protected void |
marshal(int opcode) |
protected void |
marshal(int opcode,
Arguments args)
Prepare a request to be sent to the compositor
This function is similar to
marshalConstructor(int, Object, int, Class, Arguments), except
it doesn't create proxies for new-id arguments. |
protected <J,T extends Proxy<J>> |
marshalConstructor(int opcode,
J implementation,
int version,
Class<T> newProxyCls,
Arguments args)
Prepare a request to be sent to the compositor
Translates the request given by opcode and the extra arguments into the
wire format and write it to the connection buffer.
|
void |
setQueue(EventQueue queue)
Assign a proxy to an event queue
Assign proxy to event queue.
|
public final Long pointer
protected void marshal(int opcode,
Arguments args)
marshalConstructor(int, Object, int, Class, Arguments), except
it doesn't create proxies for new-id arguments.
This should not normally be used by non-generated code.opcode - Opcode of the request to be sentargs - Extra arguments for the given requestprotected void marshal(int opcode)
opcode - Opcode of the request to be sent#marshal(int, Arguments)}protected <J,T extends Proxy<J>> T marshalConstructor(int opcode, J implementation, int version, Class<T> newProxyCls, Arguments args)
Proxy
and send the ID to the server. The new Proxy will be returned
on success or NULL on errror with errno set accordingly.
This is intended to be used by language bindings and not in
non-generated code.J - implementation TypeT - proxy Typeopcode - Opcode of the request to be sentimplementation - The listener to use for the new proxyversion - The runtime version of the new proxynewProxyCls - The type to use for the new proxyargs - Extra arguments for the given requestpublic I getImplementation()
getImplementation in interface WaylandObjectpublic int getId()
getId in interface WaylandObjectpublic int getVersion()
getVersion in interface WaylandObjectpublic void setQueue(EventQueue queue)
proxy will be
queued in queue instead of the display's main queue.queue - The event queue that will handle this proxyDisplay.dispatchQueue(EventQueue)public void destroy()
public Long getPointer()
getPointer in interface WaylandObjectCopyright © 2016. All rights reserved.