blob: 7262a420238285d5ae788f6f0d2731a8eec1b372 (
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
34
35
36
37
38
39
40
41
|
#ifndef WLCLOCK_SURFACE_H
#define WLCLOCK_SURFACE_H
#include<wayland-server.h>
#include"buffer.h"
#include"wlclock.h"
#include<stdint.h>
#include<stdbool.h>
struct Wlclock;
struct Wlclock_output;
struct Wlclock_surface
{
struct Wlclock_output *output;
struct wl_surface *background_surface;
struct wl_surface *hands_surface;
struct wl_subsurface *subsurface;
struct zwlr_layer_surface_v1 *layer_surface;
struct Wlclock_dimensions dimensions;
struct Wlclock_buffer background_buffers[2];
struct Wlclock_buffer *current_background_buffer;
struct Wlclock_buffer hands_buffers[2];
struct Wlclock_buffer *current_hands_buffer;
bool configured;
struct wl_callback *frame_callback;
bool background_dirty, hands_dirty;
};
bool create_surface (struct Wlclock_output *output);
void destroy_surface (struct Wlclock_surface *surface);
void destroy_all_surfaces (struct Wlclock *clock);
void update_surface (struct Wlclock_surface *surface);
void update_all_surfaces (struct Wlclock *clock);
void update_all_hands (struct Wlclock *clock);
#endif
|