blob: 693233860cc97db117ed2f7ddb4fd845fdc17366 [file] [log] [blame]
/*
* Copyright (c) 2022 Amlogic, Inc. All rights reserved.
*
* This source code is subject to the terms and conditions defined in the
* file 'LICENSE' which is part of this source code package.
*
* Description:
*/
#ifndef AML_SIMPLESHELL_H
#define AML_SIMPLESHELL_H
#include <libweston/libweston.h>
#define WESTON_ZORDER_MAX 1000
#define WESTON_ZORDER_DEFAULT 50
#define WESTON_ZORDER_INTERVAL 10
struct weston_surface_id {
int id;
struct weston_surface *surface;
struct wl_list link;
};
struct weston_key_intercept {
uint32_t key_code;
uint32_t flags;
struct wl_resource *keyboard_object;
struct weston_surface *surface;
struct wl_list link;
};
struct weston_key_info {
struct wl_resource *resource;
uint32_t key;
struct wl_list link;
};
int
load_simple_shell(struct weston_compositor *compositor,
void* (*load_module)(const char *, const char *));
bool
weston_keyboard_is_intercepted_keycode(struct weston_keyboard *keyboard,
uint32_t keycode, uint32_t mods_depressed,
uint32_t mods_latched,
uint32_t mods_locked, uint32_t group,
uint32_t serial, enum wl_keyboard_key_state state,
uint32_t msecs, bool modifier);
void
weston_keyboard_add_key_info(struct weston_keyboard *keyboard,
struct wl_resource *resource, uint32_t key);
void
weston_compositor_build_view_list_by_zorder(struct weston_compositor *compositor);
void
weston_surface_destroy_info_for_surface(struct weston_surface *surface);
void
weston_compositor_add_surface_id(
struct weston_compositor *compositor,
struct weston_surface *surface);
void
weston_compositor_clear_surface_id(struct weston_compositor *compositor);
void
weston_keyboard_clear_key_intercept(struct weston_keyboard *keyboard);
void
weston_keyboard_clear_key_info_for_resource(
struct weston_keyboard *keyboard, struct wl_resource *resource);
void
weston_keyboard_get_resource_and_key(struct weston_keyboard *keyboard,
struct wl_resource **resource, uint32_t *key);
#endif