Loading...
Searching...
No Matches
wayland::server::viewporter_t Class Reference

surface cropping and scaling More...

`#include <wayland-server-protocol-extra.hpp>`

Inherits wayland::server::resource_t.

## Public Member Functions

std::function< void()> & | on_destroy ()
| unbind from the cropping and scaling interface
std::function< void(viewport_t, surface_t)> & | on_get_viewport ()
| extend surface interface for crop and scale
void | post_viewport_exists (std::string const &msg)
| Post error: the surface already has a viewport object associated.
bool | proxy_has_object () const
| Check whether this wrapper actually wraps an object.
void | post_no_memory () const
uint32_t | get_id () const
client_t | get_client () const
unsigned int | get_version () const
std::string | get_class ()

## Detailed Description

surface cropping and scaling

The global interface exposing surface cropping and scaling capabilities is used to instantiate an interface extension for a wl_surface object. This extended interface will then allow cropping and scaling the surface contents, effectively disconnecting the direct relationship between the buffer and the surface size.

Definition at line 361 of file wayland-server-protocol-extra.hpp.

## Member Function Documentation

## get_class()

std::string wayland::server::resource_t::get_class | ( |  | ) |

inherited

Retrieve the interface name (class) of a resource object.

Returns
  Interface name of the resource object.

## get_client()

client_t wayland::server::resource_t::get_client | ( |  | ) | const

inherited

Get the associated client

Returns
  the client that owns the resource.

## get_id()

uint32_t wayland::server::resource_t::get_id | ( |  | ) | const

inherited

Get the internal ID of the resource

Returns
  the internal ID of the resource

## get_version()

unsigned int wayland::server::resource_t::get_version | ( |  | ) | const

inherited

Get interface version

Returns
  Interface version this resource has been constructed with.

## on_destroy()

std::function< void()> & viewporter_t::on_destroy | ( |  | ) |

unbind from the cropping and scaling interface

Informs the server that the client will not be using this protocol object anymore. This does not affect any other objects, wp_viewport objects included.

Definition at line 796 of file wayland-server-protocol-extra.cpp.

## on_get_viewport()

std::function< void(viewport_t, surface_t)> & viewporter_t::on_get_viewport | ( |  | ) |

extend surface interface for crop and scale

Parameters

  id | the new viewport interface id
  surface | the surface

Instantiate an interface extension for the given wl_surface to crop and scale its content. If the given wl_surface already has a wp_viewport object associated, the viewport_exists protocol error is raised.

Definition at line 802 of file wayland-server-protocol-extra.cpp.

## post_no_memory()

void wayland::server::resource_t::post_no_memory | ( |  | ) | const

inherited

Post "not enough memory" error to the client

If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance.

## post_viewport_exists()

void viewporter_t::post_viewport_exists | ( | std::string const & | msg | ) |

Post error: the surface already has a viewport object associated.

Definition at line 808 of file wayland-server-protocol-extra.cpp.

## proxy_has_object()

bool wayland::server::resource_t::proxy_has_object | ( |  | ) | const

inherited

Check whether this wrapper actually wraps an object.

Returns
  true if there is an underlying object, false if this wrapper is empty

The documentation for this class was generated from the following files:

- obj-x86_64-linux-gnu/wayland-server-protocol-extra.hpp
- obj-x86_64-linux-gnu/wayland-server-protocol-extra.cpp