shell: Rename solid_color_surface to weston_curtain
create_solid_color_surface actually returns a weston_view that it creates internally. Since weston_solid_color_view is long and dull, rename it to weston_curtain. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
@@ -2069,6 +2069,7 @@ create_black_surface(struct weston_compositor *ec,
|
|||||||
float x, float y, int w, int h)
|
float x, float y, int w, int h)
|
||||||
{
|
{
|
||||||
struct weston_solid_color_surface surface_data = {};
|
struct weston_solid_color_surface surface_data = {};
|
||||||
|
struct weston_view *view;
|
||||||
|
|
||||||
surface_data.surface_committed = black_surface_committed;
|
surface_data.surface_committed = black_surface_committed;
|
||||||
surface_data.get_label = black_surface_get_label;
|
surface_data.get_label = black_surface_get_label;
|
||||||
@@ -2078,8 +2079,7 @@ create_black_surface(struct weston_compositor *ec,
|
|||||||
surface_data.g = 0;
|
surface_data.g = 0;
|
||||||
surface_data.b = 0;
|
surface_data.b = 0;
|
||||||
|
|
||||||
struct weston_view *view =
|
view = weston_curtain_create(ec, &surface_data, x, y, w, h);
|
||||||
create_solid_color_surface(ec, &surface_data, x, y, w, h);
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -480,6 +480,7 @@ static void
|
|||||||
kiosk_shell_output_recreate_background(struct kiosk_shell_output *shoutput)
|
kiosk_shell_output_recreate_background(struct kiosk_shell_output *shoutput)
|
||||||
{
|
{
|
||||||
struct kiosk_shell *shell = shoutput->shell;
|
struct kiosk_shell *shell = shoutput->shell;
|
||||||
|
struct weston_compositor *ec = shell->compositor;
|
||||||
struct weston_output *output = shoutput->output;
|
struct weston_output *output = shoutput->output;
|
||||||
struct weston_config_section *shell_section = NULL;
|
struct weston_config_section *shell_section = NULL;
|
||||||
uint32_t bg_color = 0x0;
|
uint32_t bg_color = 0x0;
|
||||||
@@ -505,12 +506,10 @@ kiosk_shell_output_recreate_background(struct kiosk_shell_output *shoutput)
|
|||||||
solid_surface.surface_committed = NULL;
|
solid_surface.surface_committed = NULL;
|
||||||
solid_surface.surface_private = NULL;
|
solid_surface.surface_private = NULL;
|
||||||
|
|
||||||
shoutput->background_view =
|
shoutput->background_view = weston_curtain_create(ec, &solid_surface,
|
||||||
create_solid_color_surface(shoutput->shell->compositor,
|
output->x, output->y,
|
||||||
&solid_surface,
|
output->width,
|
||||||
output->x, output->y,
|
output->height);
|
||||||
output->width,
|
|
||||||
output->height);
|
|
||||||
|
|
||||||
weston_surface_set_role(shoutput->background_view->surface,
|
weston_surface_set_role(shoutput->background_view->surface,
|
||||||
"kiosk-shell-background", NULL, 0);
|
"kiosk-shell-background", NULL, 0);
|
||||||
|
|||||||
@@ -139,9 +139,9 @@ surface_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct weston_view *
|
struct weston_view *
|
||||||
create_solid_color_surface(struct weston_compositor *compositor,
|
weston_curtain_create(struct weston_compositor *compositor,
|
||||||
struct weston_solid_color_surface *ss,
|
struct weston_solid_color_surface *ss,
|
||||||
float x, float y, int w, int h)
|
float x, float y, int w, int h)
|
||||||
{
|
{
|
||||||
struct weston_surface *surface = NULL;
|
struct weston_surface *surface = NULL;
|
||||||
struct weston_view *view;
|
struct weston_view *view;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "shared/helpers.h"
|
#include "shared/helpers.h"
|
||||||
#include <libweston/libweston.h>
|
#include <libweston/libweston.h>
|
||||||
|
|
||||||
/* parameter for create_solid_color_surface() */
|
/* parameter for weston_curtain_create() */
|
||||||
struct weston_solid_color_surface {
|
struct weston_solid_color_surface {
|
||||||
int (*get_label)(struct weston_surface *es, char *buf, size_t len);
|
int (*get_label)(struct weston_surface *es, char *buf, size_t len);
|
||||||
void (*surface_committed)(struct weston_surface *es, int32_t sx, int32_t sy);
|
void (*surface_committed)(struct weston_surface *es, int32_t sx, int32_t sy);
|
||||||
@@ -53,6 +53,6 @@ surface_get_label(struct weston_surface *surface, char *buf, size_t len);
|
|||||||
/* helper to create a view w/ a color
|
/* helper to create a view w/ a color
|
||||||
*/
|
*/
|
||||||
struct weston_view *
|
struct weston_view *
|
||||||
create_solid_color_surface(struct weston_compositor *compositor,
|
weston_curtain_create(struct weston_compositor *compositor,
|
||||||
struct weston_solid_color_surface *ss,
|
struct weston_solid_color_surface *ss,
|
||||||
float x, float y, int w, int h);
|
float x, float y, int w, int h);
|
||||||
|
|||||||
@@ -89,9 +89,8 @@ output_create_view(struct test_output *t_output)
|
|||||||
solid_surface.surface_committed = NULL;
|
solid_surface.surface_committed = NULL;
|
||||||
solid_surface.surface_private = NULL;
|
solid_surface.surface_private = NULL;
|
||||||
|
|
||||||
t_output->view =
|
t_output->view = weston_curtain_create(t_output->compositor,
|
||||||
create_solid_color_surface(t_output->compositor,
|
&solid_surface, 0, 0, 320, 240);
|
||||||
&solid_surface, 0, 0, 320, 240);
|
|
||||||
weston_view_set_output(t_output->view, t_output->output);
|
weston_view_set_output(t_output->view, t_output->output);
|
||||||
|
|
||||||
/* weston_compositor_remove_output() has to be patched with
|
/* weston_compositor_remove_output() has to be patched with
|
||||||
|
|||||||
Reference in New Issue
Block a user