summaryrefslogtreecommitdiff
path: root/src/output.h
blob: 0085bd7cb132ebe311505c34967b078b479e22e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef WLCLOCK_OUTPUT_H
#define WLCLOCK_OUTPUT_H

#include<wayland-server.h>

struct Wlclock;
struct Wlclock_surface;

struct Wlclock_output
{
	struct wl_list  link;
	struct Wlclock *clock;

	struct wl_output      *wl_output;
	struct zxdg_output_v1 *xdg_output;

	char     *name;
	uint32_t  global_name;
	uint32_t  scale;

	bool configured;

	struct Wlclock_surface *surface;
};

bool create_output (struct Wlclock *clock, struct wl_registry *registry,
		uint32_t name, const char *interface, uint32_t version);
bool configure_output (struct Wlclock_output *output);
struct Wlclock_output *get_output_from_global_name (struct Wlclock *clock, uint32_t name);
void destroy_output (struct Wlclock_output *output);
void destroy_all_outputs (struct Wlclock *clock);

#endif