X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fivi-compositor.h;h=bdd91ffacb000faf12e2cea0a12c0827be77f6c3;hb=ef3d1990c498e6d9b1a24531b751688cac287d28;hp=3765f656c0f8e8d0b33edfcf259ae318b76957f6;hpb=2d7243208d3e455decd730e7e33ab2452b1a0508;p=src%2Fagl-compositor.git diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h index 3765f65..bdd91ff 100644 --- a/src/ivi-compositor.h +++ b/src/ivi-compositor.h @@ -27,15 +27,22 @@ #define IVI_COMPOSITOR_H #include +#include "config.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "agl-shell-server-protocol.h" -#define ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) +struct ivi_compositor; + +struct desktop_client { + struct wl_resource *resource; + struct ivi_compositor *ivi; + struct wl_list link; /* ivi_compositor::desktop_clients */ +}; struct ivi_compositor { struct weston_compositor *compositor; @@ -61,23 +68,33 @@ struct ivi_compositor { const struct weston_drm_output_api *drm_api; struct wl_global *agl_shell; + struct wl_global *agl_shell_desktop; + struct { + bool activate_apps_by_default; /* switches once xdg top level has been 'created' */ + } quirks; + struct { struct wl_client *client; struct wl_resource *resource; bool ready; } shell_client; + struct wl_list desktop_clients; /* desktop_client::link */ + struct wl_list outputs; /* ivi_output.link */ struct wl_list surfaces; /* ivi_surface.link */ struct weston_desktop *desktop; + struct ivi_policy *policy; struct wl_list pending_surfaces; + struct wl_list popup_pending_apps; struct weston_layer hidden; struct weston_layer background; struct weston_layer normal; struct weston_layer panel; + struct weston_layer popup; struct weston_layer fullscreen; }; @@ -98,6 +115,12 @@ struct ivi_output { struct ivi_surface *left; struct ivi_surface *right; + /* for the black surface */ + struct fullscreen_view { + struct ivi_surface *fs; + struct wl_listener fs_destroy; + } fullscreen_view; + struct wl_listener output_destroy; /* @@ -118,16 +141,32 @@ enum ivi_surface_role { IVI_SURFACE_ROLE_DESKTOP, IVI_SURFACE_ROLE_BACKGROUND, IVI_SURFACE_ROLE_PANEL, + IVI_SURFACE_ROLE_POPUP, +}; + +struct pending_popup { + struct ivi_output *ioutput; + char *app_id; + int x; int y; + + struct wl_list link; /** ivi_compositor::popup_pending_surfaces */ }; struct ivi_desktop_surface { struct ivi_output *pending_output; + struct ivi_output *last_output; }; struct ivi_background_surface { struct ivi_output *output; }; +struct ivi_popup_surface { + struct ivi_output *output; + int x; + int y; +}; + struct ivi_panel_surface { struct ivi_output *output; enum agl_shell_edge edge; @@ -151,12 +190,14 @@ struct ivi_surface { int32_t x, y; int32_t width, height; } pending; + bool activated_by_default; enum ivi_surface_role role; union { struct ivi_desktop_surface desktop; struct ivi_background_surface bg; struct ivi_panel_surface panel; + struct ivi_popup_surface popup; }; }; @@ -174,9 +215,22 @@ struct ivi_shell_client { struct ivi_compositor * to_ivi_compositor(struct weston_compositor *ec); +#ifdef HAVE_SYSTEMD +int +ivi_agl_systemd_notify(struct ivi_compositor *ivi); +#else +static int +ivi_agl_systemd_notify(struct ivi_compositor *ivi) +{ +} +#endif + int ivi_shell_init(struct ivi_compositor *ivi); +void +ivi_shell_init_black_fs(struct ivi_compositor *ivi); + int ivi_shell_create_global(struct ivi_compositor *ivi); @@ -195,6 +249,15 @@ to_ivi_output(struct weston_output *o); void ivi_set_desktop_surface(struct ivi_surface *surface); +/* + * removes the pending popup one + */ +bool +ivi_check_pending_desktop_surface_popup(struct ivi_surface *surface); + +void +ivi_set_desktop_surface_popup(struct ivi_surface *surface); + void ivi_reflow_outputs(struct ivi_compositor *ivi); @@ -221,4 +284,10 @@ ivi_layout_activate(struct ivi_output *output, const char *app_id); void ivi_layout_desktop_committed(struct ivi_surface *surf); +void +ivi_layout_panel_committed(struct ivi_surface *surface); + +void +ivi_layout_popup_committed(struct ivi_surface *surface); + #endif