summaryrefslogtreecommitdiff
path: root/src/compositor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor.h')
-rw-r--r--src/compositor.h167
1 files changed, 86 insertions, 81 deletions
diff --git a/src/compositor.h b/src/compositor.h
index 057f8be8..c0fc0a6e 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -110,9 +110,9 @@ struct weston_shell_interface {
struct weston_seat *ws, uint32_t edges);
void (*set_title)(struct shell_surface *shsurf,
const char *title);
- void (*set_margin)(struct shell_surface *shsurf,
- int32_t left, int32_t right,
- int32_t top, int32_t bottom);
+ void (*set_window_geometry)(struct shell_surface *shsurf,
+ int32_t x, int32_t y,
+ int32_t width, int32_t height);
};
struct weston_animation {
@@ -526,9 +526,15 @@ enum {
* to off */
};
+struct weston_layer_entry {
+ struct wl_list link;
+ struct weston_layer *layer;
+};
+
struct weston_layer {
- struct wl_list view_list;
+ struct weston_layer_entry view_list;
struct wl_list link;
+ pixman_box32_t mask;
};
struct weston_plane {
@@ -643,6 +649,9 @@ struct weston_compositor {
/* Raw keyboard processing (no libxkbcommon initialization or handling) */
int use_xkbcommon;
+
+ int32_t kb_repeat_rate;
+ int32_t kb_repeat_delay;
};
struct weston_buffer {
@@ -686,6 +695,8 @@ struct weston_buffer_viewport {
*/
int32_t width, height;
} surface;
+
+ int changed;
};
struct weston_region {
@@ -693,57 +704,6 @@ struct weston_region {
pixman_region32_t region;
};
-struct weston_subsurface {
- struct wl_resource *resource;
-
- /* guaranteed to be valid and non-NULL */
- struct weston_surface *surface;
- struct wl_listener surface_destroy_listener;
-
- /* can be NULL */
- struct weston_surface *parent;
- struct wl_listener parent_destroy_listener;
- struct wl_list parent_link;
- struct wl_list parent_link_pending;
-
- struct {
- int32_t x;
- int32_t y;
- int set;
- } position;
-
- struct {
- int has_data;
-
- /* wl_surface.attach */
- int newly_attached;
- struct weston_buffer_reference buffer_ref;
- int32_t sx;
- int32_t sy;
-
- /* wl_surface.damage */
- pixman_region32_t damage;
-
- /* wl_surface.set_opaque_region */
- pixman_region32_t opaque;
-
- /* wl_surface.set_input_region */
- pixman_region32_t input;
-
- /* wl_surface.frame */
- struct wl_list frame_callback_list;
-
- /* wl_surface.set_buffer_transform */
- /* wl_surface.set_buffer_scale */
- struct weston_buffer_viewport buffer_viewport;
- } cached;
-
- int synchronized;
-
- /* Used for constructing the view tree */
- struct wl_list unused_views;
-};
-
/* Using weston_view transformations
*
* To add a transformation to a view, create a struct weston_transform, and
@@ -780,8 +740,9 @@ struct weston_view {
struct wl_signal destroy_signal;
struct wl_list link;
- struct wl_list layer_link;
+ struct weston_layer_entry layer_link;
struct weston_plane *plane;
+ struct weston_view *parent_view;
pixman_region32_t clip;
float alpha; /* part of geometry, see below */
@@ -813,6 +774,8 @@ struct weston_view {
pixman_region32_t boundingbox;
pixman_region32_t opaque;
+ pixman_region32_t masked_boundingbox;
+ pixman_region32_t masked_opaque;
/* matrix and inverse are used only if enabled = 1.
* If enabled = 0, use x, y, width, height directly.
@@ -838,6 +801,32 @@ struct weston_view {
uint32_t output_mask;
};
+struct weston_surface_state {
+ /* wl_surface.attach */
+ int newly_attached;
+ struct weston_buffer *buffer;
+ struct wl_listener buffer_destroy_listener;
+ int32_t sx;
+ int32_t sy;
+
+ /* wl_surface.damage */
+ pixman_region32_t damage;
+
+ /* wl_surface.set_opaque_region */
+ pixman_region32_t opaque;
+
+ /* wl_surface.set_input_region */
+ pixman_region32_t input;
+
+ /* wl_surface.frame */
+ struct wl_list frame_callback_list;
+
+ /* wl_surface.set_buffer_transform */
+ /* wl_surface.set_scaling_factor */
+ /* wl_viewport.set */
+ struct weston_buffer_viewport buffer_viewport;
+};
+
struct weston_surface {
struct wl_resource *resource;
struct wl_signal destroy_signal;
@@ -882,31 +871,7 @@ struct weston_surface {
struct wl_resource *viewport_resource;
/* All the pending state, that wl_surface.commit will apply. */
- struct {
- /* wl_surface.attach */
- int newly_attached;
- struct weston_buffer *buffer;
- struct wl_listener buffer_destroy_listener;
- int32_t sx;
- int32_t sy;
-
- /* wl_surface.damage */
- pixman_region32_t damage;
-
- /* wl_surface.set_opaque_region */
- pixman_region32_t opaque;
-
- /* wl_surface.set_input_region */
- pixman_region32_t input;
-
- /* wl_surface.frame */
- struct wl_list frame_callback_list;
-
- /* wl_surface.set_buffer_transform */
- /* wl_surface.set_scaling_factor */
- /* wl_viewport.set */
- struct weston_buffer_viewport buffer_viewport;
- } pending;
+ struct weston_surface_state pending;
/*
* If non-NULL, this function will be called on
@@ -925,6 +890,35 @@ struct weston_surface {
struct wl_list subsurface_list_pending; /* ...::parent_link_pending */
};
+struct weston_subsurface {
+ struct wl_resource *resource;
+
+ /* guaranteed to be valid and non-NULL */
+ struct weston_surface *surface;
+ struct wl_listener surface_destroy_listener;
+
+ /* can be NULL */
+ struct weston_surface *parent;
+ struct wl_listener parent_destroy_listener;
+ struct wl_list parent_link;
+ struct wl_list parent_link_pending;
+
+ struct {
+ int32_t x;
+ int32_t y;
+ int set;
+ } position;
+
+ int has_cached_data;
+ struct weston_surface_state cached;
+ struct weston_buffer_reference cached_buffer_ref;
+
+ int synchronized;
+
+ /* Used for constructing the view tree */
+ struct wl_list unused_views;
+};
+
enum weston_key_state_update {
STATE_UPDATE_AUTOMATIC,
STATE_UPDATE_NONE,
@@ -1015,9 +1009,20 @@ void
notify_touch_frame(struct weston_seat *seat);
void
+weston_layer_entry_insert(struct weston_layer_entry *list,
+ struct weston_layer_entry *entry);
+void
+weston_layer_entry_remove(struct weston_layer_entry *entry);
+void
weston_layer_init(struct weston_layer *layer, struct wl_list *below);
void
+weston_layer_set_mask(struct weston_layer *layer, int x, int y, int width, int height);
+
+void
+weston_layer_set_mask_infinite(struct weston_layer *layer);
+
+void
weston_plane_init(struct weston_plane *plane,
struct weston_compositor *ec,
int32_t x, int32_t y);