summaryrefslogtreecommitdiff
path: root/src/compositor/meta-surface.h
blob: 60d9824b15163aac94fa84efcf47fb922c42c8ee (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
 * Copyright (C) 2019 Alberts Muktupāvels
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef META_SURFACE_H
#define META_SURFACE_H

#include <X11/extensions/Xdamage.h>
#include "meta-compositor.h"
#include "window.h"

G_BEGIN_DECLS

#define META_TYPE_SURFACE (meta_surface_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaSurface, meta_surface, META, SURFACE, GObject)

MetaCompositor  *meta_surface_get_compositor        (MetaSurface        *self);

MetaWindow      *meta_surface_get_window            (MetaSurface        *self);

Pixmap           meta_surface_get_pixmap            (MetaSurface        *self);

int              meta_surface_get_x                 (MetaSurface        *self);

int              meta_surface_get_y                 (MetaSurface        *self);

int              meta_surface_get_width             (MetaSurface        *self);

int              meta_surface_get_height            (MetaSurface        *self);

XserverRegion    meta_surface_get_opaque_region     (MetaSurface        *self);

XserverRegion    meta_surface_get_shape_region      (MetaSurface        *self);

cairo_surface_t *meta_surface_get_image             (MetaSurface        *self);

gboolean         meta_surface_has_shadow            (MetaSurface        *self);

gboolean         meta_surface_is_opaque             (MetaSurface        *self);

gboolean         meta_surface_is_visible            (MetaSurface        *self);

void             meta_surface_show                  (MetaSurface        *self);

void             meta_surface_hide                  (MetaSurface        *self);

void             meta_surface_process_damage        (MetaSurface        *self,
                                                     XDamageNotifyEvent *event);

void             meta_surface_opacity_changed       (MetaSurface        *self);

void             meta_surface_opaque_region_changed (MetaSurface        *self);

void             meta_surface_shape_region_changed  (MetaSurface        *self);

void             meta_surface_sync_geometry         (MetaSurface        *self);

void             meta_surface_pre_paint             (MetaSurface        *self);

G_END_DECLS

#endif