SDL  2.0
The wl_output interface

An output describes part of the compositor geometry. The compositor works in the 'compositor coordinate system' and an output corresponds to a rectangular area in that space that is actually visible. This typically corresponds to a monitor that displays part of the compositor space. This object is published as global during start up, or when a monitor is hotplugged. More...

Data Structures

struct  wl_output_listener
 

Macros

#define WL_OUTPUT_GEOMETRY_SINCE_VERSION   1
 
#define WL_OUTPUT_MODE_SINCE_VERSION   1
 
#define WL_OUTPUT_DONE_SINCE_VERSION   2
 
#define WL_OUTPUT_SCALE_SINCE_VERSION   2
 
#define WL_OUTPUT_RELEASE_SINCE_VERSION   3
 

Enumerations

enum  wl_output_subpixel {
  WL_OUTPUT_SUBPIXEL_UNKNOWN = 0,
  WL_OUTPUT_SUBPIXEL_NONE = 1,
  WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2,
  WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3,
  WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4,
  WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5
}
 
enum  wl_output_transform {
  WL_OUTPUT_TRANSFORM_NORMAL = 0,
  WL_OUTPUT_TRANSFORM_90 = 1,
  WL_OUTPUT_TRANSFORM_180 = 2,
  WL_OUTPUT_TRANSFORM_270 = 3,
  WL_OUTPUT_TRANSFORM_FLIPPED = 4,
  WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5,
  WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6,
  WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7
}
 
enum  wl_output_mode {
  WL_OUTPUT_MODE_CURRENT = 0x1,
  WL_OUTPUT_MODE_PREFERRED = 0x2
}
 

Functions

static int wl_output_add_listener (struct wl_output *wl_output, const struct wl_output_listener *listener, void *data)
 
static void wl_output_set_user_data (struct wl_output *wl_output, void *user_data)
 
static voidwl_output_get_user_data (struct wl_output *wl_output)
 
static void wl_output_destroy (struct wl_output *wl_output)
 
static void wl_output_release (struct wl_output *wl_output)
 

Detailed Description

An output describes part of the compositor geometry. The compositor works in the 'compositor coordinate system' and an output corresponds to a rectangular area in that space that is actually visible. This typically corresponds to a monitor that displays part of the compositor space. This object is published as global during start up, or when a monitor is hotplugged.

Macro Definition Documentation

◆ WL_OUTPUT_DONE_SINCE_VERSION

#define WL_OUTPUT_DONE_SINCE_VERSION   2

Definition at line 5218 of file wayland-client-protocol.h.

◆ WL_OUTPUT_GEOMETRY_SINCE_VERSION

#define WL_OUTPUT_GEOMETRY_SINCE_VERSION   1

Definition at line 5210 of file wayland-client-protocol.h.

◆ WL_OUTPUT_MODE_SINCE_VERSION

#define WL_OUTPUT_MODE_SINCE_VERSION   1

Definition at line 5214 of file wayland-client-protocol.h.

◆ WL_OUTPUT_RELEASE_SINCE_VERSION

#define WL_OUTPUT_RELEASE_SINCE_VERSION   3

Definition at line 5227 of file wayland-client-protocol.h.

◆ WL_OUTPUT_SCALE_SINCE_VERSION

#define WL_OUTPUT_SCALE_SINCE_VERSION   2

Definition at line 5222 of file wayland-client-protocol.h.

Enumeration Type Documentation

◆ wl_output_mode

mode information

These flags describe properties of an output mode. They are used in the flags bitfield of the mode event.

Enumerator
WL_OUTPUT_MODE_CURRENT 

indicates this is the current mode

WL_OUTPUT_MODE_PREFERRED 

indicates this is the preferred mode

Definition at line 5086 of file wayland-client-protocol.h.

5086  {
5087  /**
5088  * indicates this is the current mode
5089  */
5090  WL_OUTPUT_MODE_CURRENT = 0x1,
5091  /**
5092  * indicates this is the preferred mode
5093  */
5095 };

◆ wl_output_subpixel

subpixel geometry information

This enumeration describes how the physical pixels on an output are laid out.

Enumerator
WL_OUTPUT_SUBPIXEL_UNKNOWN 

unknown geometry

WL_OUTPUT_SUBPIXEL_NONE 

no geometry

WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB 

horizontal RGB

WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR 

horizontal BGR

WL_OUTPUT_SUBPIXEL_VERTICAL_RGB 

vertical RGB

WL_OUTPUT_SUBPIXEL_VERTICAL_BGR 

vertical BGR

Definition at line 4995 of file wayland-client-protocol.h.

4995  {
4996  /**
4997  * unknown geometry
4998  */
5000  /**
5001  * no geometry
5002  */
5004  /**
5005  * horizontal RGB
5006  */
5008  /**
5009  * horizontal BGR
5010  */
5012  /**
5013  * vertical RGB
5014  */
5016  /**
5017  * vertical BGR
5018  */
5020 };

◆ wl_output_transform

transform from framebuffer to output

This describes the transform that a compositor will apply to a surface to compensate for the rotation or mirroring of an output device.

The flipped values correspond to an initial flip around a vertical axis followed by rotation.

The purpose is mainly to allow clients to render accordingly and tell the compositor, so that for fullscreen surfaces, the compositor will still be able to scan out directly from client surfaces.

Enumerator
WL_OUTPUT_TRANSFORM_NORMAL 

no transform

WL_OUTPUT_TRANSFORM_90 

90 degrees counter-clockwise

WL_OUTPUT_TRANSFORM_180 

180 degrees counter-clockwise

WL_OUTPUT_TRANSFORM_270 

270 degrees counter-clockwise

WL_OUTPUT_TRANSFORM_FLIPPED 

180 degree flip around a vertical axis

WL_OUTPUT_TRANSFORM_FLIPPED_90 

flip and rotate 90 degrees counter-clockwise

WL_OUTPUT_TRANSFORM_FLIPPED_180 

flip and rotate 180 degrees counter-clockwise

WL_OUTPUT_TRANSFORM_FLIPPED_270 

flip and rotate 270 degrees counter-clockwise

Definition at line 5041 of file wayland-client-protocol.h.

5041  {
5042  /**
5043  * no transform
5044  */
5046  /**
5047  * 90 degrees counter-clockwise
5048  */
5050  /**
5051  * 180 degrees counter-clockwise
5052  */
5054  /**
5055  * 270 degrees counter-clockwise
5056  */
5058  /**
5059  * 180 degree flip around a vertical axis
5060  */
5062  /**
5063  * flip and rotate 90 degrees counter-clockwise
5064  */
5066  /**
5067  * flip and rotate 180 degrees counter-clockwise
5068  */
5070  /**
5071  * flip and rotate 270 degrees counter-clockwise
5072  */
5074 };

Function Documentation

◆ wl_output_add_listener()

static int wl_output_add_listener ( struct wl_output *  wl_output,
const struct wl_output_listener listener,
void data 
)
inlinestatic

Definition at line 5198 of file wayland-client-protocol.h.

5200 {
5201  return wl_proxy_add_listener((struct wl_proxy *) wl_output,
5202  (void (**)(void)) listener, data);
5203 }

◆ wl_output_destroy()

static void wl_output_destroy ( struct wl_output *  wl_output)
inlinestatic

Definition at line 5251 of file wayland-client-protocol.h.

5252 {
5253  wl_proxy_destroy((struct wl_proxy *) wl_output);
5254 }

◆ wl_output_get_user_data()

static void* wl_output_get_user_data ( struct wl_output *  wl_output)
inlinestatic

Definition at line 5238 of file wayland-client-protocol.h.

5239 {
5240  return wl_proxy_get_user_data((struct wl_proxy *) wl_output);
5241 }

◆ wl_output_release()

static void wl_output_release ( struct wl_output *  wl_output)
inlinestatic

Using this request a client can tell the server that it is not going to use the output object anymore.

Definition at line 5263 of file wayland-client-protocol.h.

5264 {
5265  wl_proxy_marshal_flags((struct wl_proxy *) wl_output,
5266  WL_OUTPUT_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) wl_output), WL_MARSHAL_FLAG_DESTROY);
5267 }

References NULL, and WL_OUTPUT_RELEASE.

◆ wl_output_set_user_data()

static void wl_output_set_user_data ( struct wl_output *  wl_output,
void user_data 
)
inlinestatic

Definition at line 5231 of file wayland-client-protocol.h.

5232 {
5233  wl_proxy_set_user_data((struct wl_proxy *) wl_output, user_data);
5234 }
NULL
#define NULL
Definition: begin_code.h:167
WL_OUTPUT_TRANSFORM_180
@ WL_OUTPUT_TRANSFORM_180
Definition: wayland-client-protocol.h:5053
WL_OUTPUT_SUBPIXEL_NONE
@ WL_OUTPUT_SUBPIXEL_NONE
Definition: wayland-client-protocol.h:5003
WL_OUTPUT_TRANSFORM_270
@ WL_OUTPUT_TRANSFORM_270
Definition: wayland-client-protocol.h:5057
WL_OUTPUT_TRANSFORM_FLIPPED
@ WL_OUTPUT_TRANSFORM_FLIPPED
Definition: wayland-client-protocol.h:5061
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
WL_OUTPUT_MODE_PREFERRED
@ WL_OUTPUT_MODE_PREFERRED
Definition: wayland-client-protocol.h:5094
WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR
@ WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR
Definition: wayland-client-protocol.h:5011
WL_OUTPUT_TRANSFORM_FLIPPED_270
@ WL_OUTPUT_TRANSFORM_FLIPPED_270
Definition: wayland-client-protocol.h:5073
WL_OUTPUT_SUBPIXEL_VERTICAL_RGB
@ WL_OUTPUT_SUBPIXEL_VERTICAL_RGB
Definition: wayland-client-protocol.h:5015
WL_OUTPUT_TRANSFORM_FLIPPED_180
@ WL_OUTPUT_TRANSFORM_FLIPPED_180
Definition: wayland-client-protocol.h:5069
WL_OUTPUT_MODE_CURRENT
@ WL_OUTPUT_MODE_CURRENT
Definition: wayland-client-protocol.h:5090
WL_OUTPUT_SUBPIXEL_VERTICAL_BGR
@ WL_OUTPUT_SUBPIXEL_VERTICAL_BGR
Definition: wayland-client-protocol.h:5019
WL_OUTPUT_SUBPIXEL_UNKNOWN
@ WL_OUTPUT_SUBPIXEL_UNKNOWN
Definition: wayland-client-protocol.h:4999
WL_OUTPUT_RELEASE
#define WL_OUTPUT_RELEASE
Definition: wayland-client-protocol.h:5205
WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB
@ WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB
Definition: wayland-client-protocol.h:5007
WL_OUTPUT_TRANSFORM_NORMAL
@ WL_OUTPUT_TRANSFORM_NORMAL
Definition: wayland-client-protocol.h:5045
WL_OUTPUT_TRANSFORM_90
@ WL_OUTPUT_TRANSFORM_90
Definition: wayland-client-protocol.h:5049
WL_OUTPUT_TRANSFORM_FLIPPED_90
@ WL_OUTPUT_TRANSFORM_FLIPPED_90
Definition: wayland-client-protocol.h:5065