blob: da795cc5658bcc67d6a5b8596120b81886f4a715 [file] [log] [blame]
leng.fangdbaf6fa2024-06-20 19:31:04 +08001/*
2 * If not stated otherwise in this file or this component's Licenses.txt file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2016 RDK Management
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19#ifndef _WESTEROS_SIMPLESHELL_H
20#define _WESTEROS_SIMPLESHELL_H
21
22#include "wayland-server.h"
23
24struct wl_simple_shell;
25
26struct wayland_simple_shell_callbacks {
27 void (*set_name)( void* userData, uint32_t surfaceId, const char *name );
28 void (*set_visible)( void* userData, uint32_t surfaceId, bool visible );
29 void (*set_geometry)( void* userData, uint32_t surfaceId, int x, int y, int width, int height );
30 void (*set_opacity)( void* userData, uint32_t surfaceId, float opacity );
31 void (*set_zorder)( void* userData, uint32_t surfaceId, float zorder );
32 void (*get_name)( void* userData, uint32_t surfaceId, const char **name );
33 void (*get_status)( void *userData, uint32_t surfaceId, bool *visible,
34 int32_t *x, int32_t *y, int32_t *width, int32_t *height,
35 float *opacity, float *zorder );
36 void (*set_focus)( void *userData, uint32_t surfaceId);
37 void (*set_scale)( void *userData, uint32_t surfaceId, float scaleX, float scaleY );
38 void (*set_key_intercept) (void * userData, uint32_t surfaceId, uint32_t keyCode, uint32_t modifiers);
39 void (*remove_key_intercept)(void * userData, uint32_t surfaceId, uint32_t keyCode, uint32_t modifiers);
40 void (*send_key)(void * userData, uint32_t surfaceId, uint32_t keyCode, uint32_t modifiers);
41};
42
43struct wl_simple_shell* WstSimpleShellInit( struct wl_display *display,
44 struct wayland_simple_shell_callbacks *callbacks,
45 void *userData );
46void WstSimpleShellUninit( struct wl_simple_shell *shell );
47
48void WstSimpleShellNotifySurfaceCreated( struct wl_simple_shell *shell, struct wl_client *client,
49 struct wl_resource *surface_resource, uint32_t surfaceId );
50
51void WstSimpleShellNotifySurfaceDestroyed( struct wl_simple_shell *shell, struct wl_client *client, uint32_t surfaceId );
52
53#endif