Documentation for <wlr/interfaces/wlr_output.h>

Back to index

Table of contents

wlr_output_damage_whole()

void wlr_output_damage_whole(​struct wlr_output *output);

Notify compositors that the output needs to be fully repainted.

struct wlr_output_impl

struct wlr_output_impl {
	bool (*set_cursor)(​struct wlr_output *output, struct wlr_buffer *buffer, int hotspot_x, int hotspot_y);
	bool (*move_cursor)(​struct wlr_output *output, int x, int y);
	void (*destroy)(​struct wlr_output *output);
	bool (*test)(​struct wlr_output *output);
	bool (*commit)(​struct wlr_output *output);
	size_t (*get_gamma_size)(​struct wlr_output *output);
	const struct wlr_drm_format_set *(*get_cursor_formats)(​struct wlr_output *output, uint32_t buffer_caps);
	void (*get_cursor_size)(​struct wlr_output *output, int *width, int *height);
	const struct wlr_drm_format_set *(*get_primary_formats)(​struct wlr_output *output, uint32_t buffer_caps);
};

A backend implementation of struct wlr_output.

The commit function is mandatory. Other functions are optional.

wlr_output_init()

void wlr_output_init(​struct wlr_output *output, struct wlr_backend *backend, const struct wlr_output_impl *impl, struct wl_display *display);

Initialize a new output.

wlr_output_send_frame()

void wlr_output_send_frame(​struct wlr_output *output);

Send a frame event.

See wlr_output.events.frame.

wlr_output_send_present()

void wlr_output_send_present(​struct wlr_output *output, struct wlr_output_event_present *event);

Send a present event.

See wlr_output.events.present.

wlr_output_update_custom_mode()

void wlr_output_update_custom_mode(​struct wlr_output *output, int32_t width, int32_t height, int32_t refresh);

Update the current output custom mode.

The backend must call this function when the mode is updated to notify compositors about the change.

wlr_output_update_enabled()

void wlr_output_update_enabled(​struct wlr_output *output, bool enabled);

Update the current output status.

The backend must call this function when the status is updated to notify compositors about the change.

wlr_output_update_mode()

void wlr_output_update_mode(​struct wlr_output *output, struct wlr_output_mode *mode);

Update the current output mode.

The backend must call this function when the mode is updated to notify compositors about the change.

wlr_output_update_needs_frame()

void wlr_output_update_needs_frame(​struct wlr_output *output);

Notify compositors that they need to submit a new frame in order to apply output changes.