Documentation for <wlr/types/wlr_output_management_v1.h>

Back to index

Table of contents

struct wlr_output_configuration_head_v1

struct wlr_output_configuration_head_v1 {
	struct wlr_output_head_v1_state state;
	struct wlr_output_configuration_v1 *config;
	struct wl_list link;
	struct wl_resource *resource;
	struct wl_listener output_destroy;
};

wlr_output_configuration_head_v1_create()

struct wlr_output_configuration_head_v1 *wlr_output_configuration_head_v1_create(​struct wlr_output_configuration_v1 *config, struct wlr_output *output);

Create a new configuration head for the given output. This adds the head to the provided output configuration.

The configuration head will be pre-filled with data from `output`. The compositor should adjust this data according to its current internal state.

struct wlr_output_configuration_v1

struct wlr_output_configuration_v1 {
	struct wl_list heads;
	struct wlr_output_manager_v1 *manager;
	uint32_t serial;
	bool finalized;
	bool finished;
	struct wl_resource *resource;
};

wlr_output_configuration_v1_create()

struct wlr_output_configuration_v1 *wlr_output_configuration_v1_create(​void);

Create a new, empty output configuration. Compositors should add current head status with wlr_output_configuration_head_v1_create(). They can then call wlr_output_manager_v1_set_configuration().

wlr_output_configuration_v1_destroy()

void wlr_output_configuration_v1_destroy(​struct wlr_output_configuration_v1 *config);

wlr_output_configuration_v1_send_failed()

void wlr_output_configuration_v1_send_failed(​struct wlr_output_configuration_v1 *config);

If the configuration comes from a client request, this sends negative feedback to the client (configuration has not been applied).

wlr_output_configuration_v1_send_succeeded()

void wlr_output_configuration_v1_send_succeeded(​struct wlr_output_configuration_v1 *config);

If the configuration comes from a client request, this sends positive feedback to the client (configuration has been applied).

struct wlr_output_head_v1

struct wlr_output_head_v1 {
	struct wlr_output_head_v1_state state;
	struct wlr_output_manager_v1 *manager;
	struct wl_list link;
	struct wl_list resources;
	struct wl_list mode_resources;
	struct wl_listener output_destroy;
};

struct wlr_output_head_v1_state

struct wlr_output_head_v1_state {
	struct wlr_output *output;
	bool enabled;
	struct wlr_output_mode *mode;
	struct {
		int32_t width, height;
		int32_t refresh;
	} custom_mode;
	int32_t x, y;
	enum wl_output_transform transform;
	float scale;
};

struct wlr_output_manager_v1

struct wlr_output_manager_v1 {
	struct wl_display *display;
	struct wl_global *global;
	struct wl_list resources;
	struct wl_list heads;
	uint32_t serial;
	bool current_configuration_dirty;
	struct {
		struct wl_signal apply;
		struct wl_signal test;
		struct wl_signal destroy;
	} events;
	struct wl_listener display_destroy;
	void *data;
};

wlr_output_manager_v1_create()

struct wlr_output_manager_v1 *wlr_output_manager_v1_create(​struct wl_display *display);

Create a new output manager. The compositor is responsible for calling wlr_output_manager_v1_set_configuration() whenever the current output configuration changes.

wlr_output_manager_v1_set_configuration()

void wlr_output_manager_v1_set_configuration(​struct wlr_output_manager_v1 *manager, struct wlr_output_configuration_v1 *config);

Updates the output manager's current configuration. This will broadcast any changes to all clients.

This function takes ownership over `config`. That is, the compositor must not access the configuration anymore.