Struct smithay_client_toolkit::reexports::client::Proxy[][src]

pub struct Proxy<I> where
    I: Interface
{ /* fields omitted */ }

An handle to a wayland proxy

This represents a wayland object instanciated in your client session. Several handles to the same object can exist at a given time, and cloning them won't create a new protocol object, only clone the handle. The lifetime of the protocol object is not tied to the lifetime of these handles, but rather to sending or receiving destroying messages.

These handles are notably used to send requests to the server. To do you need to import the associated RequestsTrait trait from the module of this interface.

Methods

impl<I> Proxy<I> where
    I: Interface
[src]

Send a request through this object

This is the generic method to send requests.

Several requests require the creation of new objects using the child() method, which if done wrong can cause protocol errors (in which case the server will terminate your connexion). Thus unless your know exactly what you are doing, you should use the helper methods provided by the various RequestsTrait for each interface, which handle this correctly for you.

Check if the object associated with this proxy is still alive

Will return false if either:

  • The object has been destroyed
  • The object is not managed by this library (see the from_c_ptr method)

Retrieve the interface version of this wayland object instance

Returns 0 on dead objects

Associate an arbitrary payload to this object

The pointer you associate here can be retrieved from any other proxy to the same wayland object.

Setting or getting user data is done as an atomic operation. You are responsible for the correct initialization of this pointer, synchronisation of access, and destruction of the contents at the appropriate time.

Retrieve the arbitrary payload associated to this object

See set_user_data for explanations.

Check whether this proxy is managed by the library or not

See from_c_ptr for details.

Check if the other proxy refers to the same underlying wayland object

Get a raw pointer to the underlying wayland object

Retrieve a pointer to the object from the libwayland-client.so library. You will mostly need it to interface with C libraries needing access to wayland objects (to initialize an opengl context for example).

Create a Proxy instance from a C pointer

Create a Proxy from a raw pointer to a wayland object from the C library.

If the pointer was previously obtained by the c_ptr() method, this constructs a new proxy for the same object just like the clone() method would have.

If the object was created by some other C library you are interfacing with, it will be created in an "unmanaged" state: wayland-client will treat it as foreign, and as such most of the safeties will be absent. Notably the lifetime of the object can't be tracked, so the alive() method will always return false and you are responsible of not using an object past its destruction (as this would cause a protocol error). You will also be unable to associate any user data pointer to this object.

In order to handle protocol races, invoking it with a NULL pointer will create an already-dead object.

Create a wrapper for this object for queue management

As assigning a proxy to an event queue can be a racy operation in contextes involving multiple thread, this provides a facility to do this safely.

The wrapper object created behaves like a regular Proxy, except that all objects created as the result of its requests will be assigned to the queue associated to the provided token, rather than the queue of their parent. This does not change the queue of the proxy itself.

Create a new child object

This creates a new wayland object, considered as a child of this object. It will notably inherit its interface version.

The created object should immediatly be implemented and sent in a request to the server, to keep the object list properly synchronized. Failure to do so will likely cause a protocol error.

Check whether this proxy has been implemented with given type

Always returns false if the proxy is no longer alive

Trait Implementations

impl RequestsTrait for Proxy<WlDataDevice>
[src]

start drag-and-drop operation Read more

copy data to the selection Read more

destroy data device Read more

impl RequestsTrait for Proxy<WlSubsurface>
[src]

remove sub-surface interface Read more

reposition the sub-surface Read more

restack the sub-surface Read more

restack the sub-surface Read more

set sub-surface to synchronized mode Read more

set sub-surface to desynchronized mode Read more

impl RequestsTrait for Proxy<WlDataOffer>
[src]

accept one of the offered mime types Read more

request that the data is transferred Read more

destroy data offer Read more

the offer will no longer be used Read more

set the available/preferred drag-and-drop actions Read more

impl<I> Clone for Proxy<I> where
    I: Interface
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl RequestsTrait for Proxy<WlShm>
[src]

create a shm pool Read more

impl RequestsTrait for Proxy<WlRegion>
[src]

destroy region Read more

add rectangle to region Read more

subtract rectangle from region Read more

impl RequestsTrait for Proxy<WlSeat>
[src]

return pointer object Read more

return keyboard object Read more

return touch object Read more

release the seat object Read more

impl RequestsTrait for Proxy<WlCompositor>
[src]

create new surface Read more

create new region Read more

impl RequestsTrait for Proxy<WlDataSource>
[src]

add an offered mime type Read more

destroy the data source Read more

set the available drag-and-drop actions Read more

impl RequestsTrait for Proxy<WlTouch>
[src]

release the touch object Read more

impl<I> Send for Proxy<I> where
    I: Interface
[src]

impl RequestsTrait for Proxy<WlShmPool>
[src]

create a buffer from the pool Read more

destroy the pool Read more

change the size of the pool mapping Read more

impl RequestsTrait for Proxy<WlCallback>
[src]

impl RequestsTrait for Proxy<WlShellSurface>
[src]

respond to a ping event Read more

start an interactive move Read more

start an interactive resize Read more

make the surface a toplevel surface Read more

make the surface a transient surface Read more

make the surface a fullscreen surface Read more

make the surface a popup surface Read more

make the surface a maximized surface Read more

set surface title Read more

set surface class Read more

impl RequestsTrait for Proxy<WlPointer>
[src]

set the pointer surface Read more

release the pointer object Read more

impl RequestsTrait for Proxy<WlBuffer>
[src]

destroy a buffer Read more

impl RequestsTrait for Proxy<WlOutput>
[src]

release the output object Read more

impl RequestsTrait for Proxy<WlDisplay>
[src]

asynchronous roundtrip Read more

get global registry object Read more

impl RequestsTrait for Proxy<WlKeyboard>
[src]

release the keyboard object Read more

impl RequestsTrait for Proxy<WlSurface>
[src]

delete surface Read more

set the surface contents Read more

mark part of the surface damaged Read more

request a frame throttling hint Read more

set opaque region Read more

set input region Read more

commit pending surface state Read more

sets the buffer transformation Read more

sets the buffer scaling factor Read more

mark part of the surface damaged using buffer coordinates Read more

impl RequestsTrait for Proxy<WlDataDeviceManager>
[src]

create a new data source Read more

create a new data device Read more

impl RequestsTrait for Proxy<WlRegistry>
[src]

bind an object to the display Read more

impl<I> Sync for Proxy<I> where
    I: Interface
[src]

impl<I> Drop for Proxy<I> where
    I: Interface
[src]

Executes the destructor for this type. Read more

impl RequestsTrait for Proxy<WlShell>
[src]

create a shell surface from a surface Read more

impl RequestsTrait for Proxy<WlSubcompositor>
[src]

unbind from the subcompositor interface Read more

give a surface the role sub-surface Read more

impl RequestsTrait for Proxy<ZwpPointerConstraintsV1>
[src]

destroy the pointer constraints manager object Read more

lock pointer to a position Read more

confine pointer to a region Read more

impl RequestsTrait for Proxy<ZwpTabletV1>
[src]

destroy the tablet object Read more

impl RequestsTrait for Proxy<ZxdgImporterV1>
[src]

destroy the xdg_importer object Read more

import a surface Read more

impl RequestsTrait for Proxy<ZwpIdleInhibitorV1>
[src]

destroy the idle inhibitor object Read more

impl RequestsTrait for Proxy<ZwpLinuxDmabufV1>
[src]

unbind the factory Read more

create a temporary object for buffer parameters Read more

impl RequestsTrait for Proxy<ZxdgPositionerV6>
[src]

destroy the xdg_positioner object Read more

set the size of the to-be positioned rectangle Read more

set the anchor rectangle within the parent surface Read more

set anchor rectangle anchor edges Read more

set child surface gravity Read more

set the adjustment to be done when constrained Read more

set surface position offset Read more

impl RequestsTrait for Proxy<ZwpKeyboardShortcutsInhibitorV1>
[src]

destroy the keyboard shortcuts inhibitor object Read more

impl RequestsTrait for Proxy<ZwpTabletV2>
[src]

destroy the tablet object Read more

impl RequestsTrait for Proxy<ZwpPointerGesturePinchV1>
[src]

destroy the pinch gesture object Read more

impl RequestsTrait for Proxy<ZxdgExportedV1>
[src]

unexport the exported surface Read more

impl RequestsTrait for Proxy<ZwpLinuxBufferParamsV1>
[src]

delete this object, used or not Read more

add a dmabuf to the temporary set Read more

create a wl_buffer from the given dmabufs Read more

immediately create a wl_buffer from the given dmabufs Read more

impl RequestsTrait for Proxy<ZwpInputPanelV1>
[src]

impl RequestsTrait for Proxy<ZwpTabletManagerV1>
[src]

get the tablet seat Read more

release the memory for the tablet manager object Read more

impl RequestsTrait for Proxy<ZwpInputMethodContextV1>
[src]

This is a destructor, you cannot send requests to this object any longer once this method is called. Read more

commit string Read more

pre-edit string Read more

pre-edit styling Read more

pre-edit cursor Read more

delete text Read more

set cursor to a new position Read more

keysym Read more

grab hardware keyboard Read more

forward key event Read more

forward modifiers event Read more

impl RequestsTrait for Proxy<ZwpTextInputV1>
[src]

request activation Read more

request deactivation Read more

show input panels Read more

hide input panels Read more

reset Read more

sets the surrounding text Read more

set content purpose and hint Read more

sets preferred language Read more

impl RequestsTrait for Proxy<ZwpInputMethodV1>
[src]

impl RequestsTrait for Proxy<ZwpTabletManagerV2>
[src]

get the tablet seat Read more

release the memory for the tablet manager object Read more

impl RequestsTrait for Proxy<ZwpTabletPadV2>
[src]

set compositor feedback Read more

destroy the pad object Read more

impl RequestsTrait for Proxy<ZwpTextInputManagerV1>
[src]

impl RequestsTrait for Proxy<ZwpTabletSeatV1>
[src]

release the memory for the tablet seat object Read more

impl RequestsTrait for Proxy<ZwpXwaylandKeyboardGrabManagerV1>
[src]

destroy the keyboard grab manager Read more

grab the keyboard to a surface Read more

impl RequestsTrait for Proxy<ZxdgOutputManagerV1>
[src]

destroy the xdg_output_manager object Read more

create an xdg output from a wl_output Read more

impl RequestsTrait for Proxy<ZxdgImportedV2>
[src]

destroy the xdg_imported object Read more

set as the parent of some surface Read more

impl RequestsTrait for Proxy<ZwpPointerGesturesV1>
[src]

get swipe gesture Read more

get pinch gesture Read more

impl RequestsTrait for Proxy<ZwpRelativePointerManagerV1>
[src]

destroy the relative pointer manager object Read more

get a relative pointer object Read more

impl RequestsTrait for Proxy<ZxdgSurfaceV6>
[src]

destroy the xdg_surface Read more

assign the xdg_toplevel surface role Read more

assign the xdg_popup surface role Read more

set the new window geometry Read more

ack a configure event Read more

impl RequestsTrait for Proxy<ZwpTabletSeatV2>
[src]

release the memory for the tablet seat object Read more

impl RequestsTrait for Proxy<ZwpXwaylandKeyboardGrabV1>
[src]

destroy the grabbed keyboard object Read more

impl RequestsTrait for Proxy<ZwpTabletPadRingV2>
[src]

set compositor feedback Read more

destroy the ring object Read more

impl RequestsTrait for Proxy<ZxdgToplevelV6>
[src]

destroy the xdg_toplevel Read more

set the parent of this surface Read more

set surface title Read more

set application ID Read more

show the window menu Read more

start an interactive move Read more

start an interactive resize Read more

set the maximum size Read more

set the minimum size Read more

maximize the window Read more

unmaximize the window Read more

set the window as fullscreen on a monitor Read more

set the window as minimized Read more

impl RequestsTrait for Proxy<ZxdgOutputV1>
[src]

destroy the xdg_output object Read more

impl RequestsTrait for Proxy<ZwpConfinedPointerV1>
[src]

destroy the confined pointer object Read more

set a new confine region Read more

impl RequestsTrait for Proxy<ZxdgPopupV6>
[src]

remove xdg_popup interface Read more

make the popup take an explicit grab Read more

impl RequestsTrait for Proxy<ZwpFullscreenShellModeFeedbackV1>
[src]

impl RequestsTrait for Proxy<ZxdgExporterV2>
[src]

destroy the xdg_exporter object Read more

export a toplevel surface Read more

impl RequestsTrait for Proxy<ZwpRelativePointerV1>
[src]

release the relative pointer object Read more

impl RequestsTrait for Proxy<ZwpPointerGestureSwipeV1>
[src]

destroy the pointer swipe gesture object Read more

impl RequestsTrait for Proxy<ZxdgImportedV1>
[src]

destroy the xdg_imported object Read more

set as the parent of some surface Read more

impl RequestsTrait for Proxy<ZwpInputPanelSurfaceV1>
[src]

set the surface type as a keyboard Read more

set the surface type as an overlay panel Read more

impl RequestsTrait for Proxy<ZxdgShellV6>
[src]

destroy xdg_shell Read more

create a positioner object Read more

create a shell surface from a surface Read more

respond to a ping event Read more

impl RequestsTrait for Proxy<ZwpTabletPadStripV2>
[src]

set compositor feedback Read more

destroy the strip object Read more

impl RequestsTrait for Proxy<ZxdgImporterV2>
[src]

destroy the xdg_importer object Read more

import a toplevel surface Read more

impl RequestsTrait for Proxy<ZwpLockedPointerV1>
[src]

destroy the locked pointer object Read more

set the pointer cursor position hint Read more

set a new lock region Read more

impl RequestsTrait for Proxy<ZwpFullscreenShellV1>
[src]

release the wl_fullscreen_shell interface Read more

present surface for display Read more

present surface for display at a particular mode Read more

impl RequestsTrait for Proxy<XdgShell>
[src]

destroy xdg_shell Read more

enable use of this unstable version Read more

create a shell surface from a surface Read more

create a popup for a surface Read more

respond to a ping event Read more

impl RequestsTrait for Proxy<ZwpTabletToolV1>
[src]

set the tablet tool's surface Read more

destroy the tool object Read more

impl RequestsTrait for Proxy<ZxdgExporterV1>
[src]

destroy the xdg_exporter object Read more

export a surface Read more

impl RequestsTrait for Proxy<ZwpIdleInhibitManagerV1>
[src]

destroy the idle inhibitor object Read more

create a new inhibitor object Read more

impl RequestsTrait for Proxy<ZwpTabletPadGroupV2>
[src]

destroy the pad object Read more

impl RequestsTrait for Proxy<ZwpKeyboardShortcutsInhibitManagerV1>
[src]

destroy the keyboard shortcuts inhibitor object Read more

create a new keyboard shortcuts inhibitor object Read more

impl RequestsTrait for Proxy<XdgSurface>
[src]

Destroy the xdg_surface Read more

set the parent of this surface Read more

set surface title Read more

set application ID Read more

show the window menu Read more

start an interactive move Read more

start an interactive resize Read more

ack a configure event Read more

set the new window geometry Read more

maximize the window Read more

unmaximize the window Read more

set the window as fullscreen on a monitor Read more

set the window as minimized Read more

impl RequestsTrait for Proxy<ZxdgExportedV2>
[src]

unexport the exported surface Read more

impl RequestsTrait for Proxy<ZwpTabletToolV2>
[src]

set the tablet tool's surface Read more

destroy the tool object Read more

impl RequestsTrait for Proxy<XdgPopup>
[src]

remove xdg_popup interface Read more