# Shell utils

struct weston_output *weston_shell_utils_get_default_output(struct weston_compositor *compositor)

struct weston_output *weston_shell_utils_get_focused_output(struct weston_compositor *compositor)

void weston_shell_utils_subsurfaces_boundingbox(struct weston_surface *surface, int32_t *x, int32_t *y, int32_t *w, int32_t *h)

  TODO: Fix this function to take into account nested subsurfaces.

void weston_shell_utils_center_on_output(struct weston_view *view, struct weston_output *output)

int weston_shell_utils_surface_get_label(struct weston_surface *surface, char *buf, size_t len)

struct weston_curtain *weston_shell_utils_curtain_create(struct weston_compositor *compositor, struct weston_curtain_params *params)

void weston_shell_utils_curtain_destroy(struct weston_curtain *curtain)

enum weston_layer_position weston_shell_utils_view_get_layer_position(struct weston_view *view)

void weston_output_set_shell_private(struct weston_output *output, void *private_data)

  Assign shell private data to an output.

  Shells will have their own private structures for output management. Some callbacks will provide a weston_output to the shell, and the shell will need to map that to its internal abstraction. Allow the shell to assign private data to an output to make this mapping easier.

  This can only be done once for an output.

  Parameters:

    - output – The output to assign private data to

    - private_data – The shell private data

void *weston_output_get_shell_private(struct weston_output *output)

  Get private data for an output.

  Allows the shell to retreive the private data it set for an output. The shell must have set private data previously, or an assert() is generated.

  Parameters:

    output – The output to get private data for

  Returns:

    The private data