summaryrefslogtreecommitdiff
path: root/ivi-shell/ivi-layout-private.h
blob: 5d5c240aa8631cb12ef9bf3eeef0f04fb1bbe787 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
 * Copyright (C) 2014 DENSO CORPORATION
 *
 * Permission to use, copy, modify, distribute, and sell this software and
 * its documentation for any purpose is hereby granted without fee, provided
 * that the above copyright notice appear in all copies and that both that
 * copyright notice and this permission notice appear in supporting
 * documentation, and that the name of the copyright holders not be used in
 * advertising or publicity pertaining to distribution of the software
 * without specific, written prior permission.  The copyright holders make
 * no representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied warranty.
 *
 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#ifndef _ivi_layout_PRIVATE_H_
#define _ivi_layout_PRIVATE_H_

#include "compositor.h"
#include "ivi-layout.h"
#include "ivi-layout-transition.h"

struct ivi_layout_surface {
    struct wl_list link;
    struct wl_list list_notification;
    struct wl_list list_layer;
    uint32_t update_count;
    uint32_t id_surface;

    struct ivi_layout *layout;
    struct weston_surface *surface;
    struct weston_view *view;

    uint32_t buffer_width;
    uint32_t buffer_height;

    struct wl_listener surface_destroy_listener;
    struct weston_transform surface_rotation;
    struct weston_transform layer_rotation;
    struct weston_transform surface_pos;
    struct weston_transform layer_pos;
    struct weston_transform scaling;
    struct ivi_layout_SurfaceProperties prop;
    int32_t pixelformat;
    uint32_t event_mask;

    struct {
        struct ivi_layout_SurfaceProperties prop;
        struct wl_list link;
    } pending;

    struct {
        struct wl_list link;
        struct wl_list list_layer;
    } order;

    struct {
        ivi_controller_surface_content_callback callback;
        void* userdata;
    } content_observer;
};

struct ivi_layout_layer {
    struct wl_list link;
    struct wl_list list_notification;
    struct wl_list list_screen;
    struct wl_list link_to_surface;
    uint32_t id_layer;

    struct ivi_layout *layout;

    struct ivi_layout_LayerProperties prop;
    uint32_t event_mask;

    struct {
        struct ivi_layout_LayerProperties prop;
        struct wl_list list_surface;
        struct wl_list link;
    } pending;

    struct {
        struct wl_list list_surface;
        struct wl_list link;
    } order;
};

struct ivi_layout {
    struct weston_compositor *compositor;

    struct wl_list list_surface;
    struct wl_list list_layer;
    struct wl_list list_screen;

    struct {
        struct wl_list list_create;
        struct wl_list list_remove;
    } layer_notification;

    struct {
        struct wl_list list_create;
        struct wl_list list_remove;
        struct wl_list list_configure;
    } surface_notification;

    struct weston_layer layout_layer;

    struct ivi_layout_transition_set* transitions;
    struct wl_list pending_transition_list;
};

struct ivi_layout *get_instance(void);

#endif