shell: quit weston, if weston-desktop-shell dies early
[profile/ivi/weston-ivi-shell.git] / desktop-shell / shell.h
index 8ef550f..2cfd1d6 100644 (file)
  */
 
 #include <stdbool.h>
+#include <time.h>
 
 #include "compositor.h"
 
+#include "desktop-shell-server-protocol.h"
+
 enum animation_type {
        ANIMATION_NONE,
 
@@ -52,6 +55,41 @@ enum exposay_layout_state {
        EXPOSAY_LAYOUT_ANIMATE_TO_OVERVIEW, /* in transition to all windows */
 };
 
+struct exposay_output {
+       int num_surfaces;
+       int grid_size;
+       int surface_size;
+
+       int hpadding_outer;
+       int vpadding_outer;
+       int padding_inner;
+};
+
+struct exposay {
+       /* XXX: Make these exposay_surfaces. */
+       struct weston_view *focus_prev;
+       struct weston_view *focus_current;
+       struct weston_view *clicked;
+       struct workspace *workspace;
+       struct weston_seat *seat;
+
+       struct wl_list surface_list;
+
+       struct weston_keyboard_grab grab_kbd;
+       struct weston_pointer_grab grab_ptr;
+
+       enum exposay_target_state state_target;
+       enum exposay_layout_state state_cur;
+       int in_flight; /* number of animations still running */
+
+       int row_current;
+       int column_current;
+       struct exposay_output *cur_output;
+
+       bool mod_pressed;
+       bool mod_invalid;
+};
+
 struct focus_surface {
        struct weston_surface *surface;
        struct weston_view *view;
@@ -69,6 +107,14 @@ struct workspace {
        struct weston_view_animation *focus_animation;
 };
 
+struct shell_output {
+       struct desktop_shell  *shell;
+       struct weston_output  *output;
+       struct exposay_output eoutput;
+       struct wl_listener    destroy_listener;
+       struct wl_list        link;
+};
+
 struct desktop_shell {
        struct weston_compositor *compositor;
 
@@ -89,7 +135,6 @@ struct desktop_shell {
        struct weston_surface *grab_surface;
 
        struct {
-               struct weston_process process;
                struct wl_client *client;
                struct wl_resource *desktop_shell;
                struct wl_listener client_destroy_listener;
@@ -146,50 +191,28 @@ struct desktop_shell {
                struct wl_event_source *startup_timer;
        } fade;
 
-       struct exposay {
-               /* XXX: Make these exposay_surfaces. */
-               struct weston_view *focus_prev;
-               struct weston_view *focus_current;
-               struct weston_view *clicked;
-               struct workspace *workspace;
-               struct weston_seat *seat;
-               struct wl_list surface_list;
-
-               struct weston_keyboard_grab grab_kbd;
-               struct weston_pointer_grab grab_ptr;
-
-                enum exposay_target_state state_target;
-                enum exposay_layout_state state_cur;
-               int in_flight; /* number of animations still running */
-
-               int num_surfaces;
-               int grid_size;
-               int surface_size;
-
-               int hpadding_outer;
-               int vpadding_outer;
-               int padding_inner;
-
-               int row_current;
-               int column_current;
-
-               bool mod_pressed;
-               bool mod_invalid;
-       } exposay;
+       struct exposay exposay;
 
        uint32_t binding_modifier;
+       uint32_t exposay_modifier;
        enum animation_type win_animation_type;
+       enum animation_type win_close_animation_type;
        enum animation_type startup_animation_type;
        enum animation_type focus_animation_type;
 
+       struct weston_layer minimized_layer;
+
+       struct wl_listener seat_create_listener;
        struct wl_listener output_create_listener;
+       struct wl_listener output_move_listener;
        struct wl_list output_list;
 
+       enum desktop_shell_panel_position panel_position;
+
        char *client;
-};
 
-void
-set_alpha_if_fullscreen(struct shell_surface *shsurf);
+       struct timespec startup_time;
+};
 
 struct weston_output *
 get_default_output(struct weston_compositor *compositor);
@@ -208,7 +231,7 @@ lower_fullscreen_layer(struct desktop_shell *shell);
 
 void
 activate(struct desktop_shell *shell, struct weston_surface *es,
-        struct weston_seat *seat);
+        struct weston_seat *seat, bool configure);
 
 void
 exposay_binding(struct weston_seat *seat,
@@ -218,3 +241,11 @@ int
 input_panel_setup(struct desktop_shell *shell);
 void
 input_panel_destroy(struct desktop_shell *shell);
+
+typedef void (*shell_for_each_layer_func_t)(struct desktop_shell *,
+                                           struct weston_layer *, void *);
+
+void
+shell_for_each_layer(struct desktop_shell *shell,
+                    shell_for_each_layer_func_t func,
+                    void *data);