wlmaker
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
xwl.c File Reference
#include "xwl.h"
#include <wlr/xwayland/xwayland.h>
#include <libbase/libbase.h>
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <wayland-server-core.h>
#include <xcb/xcb.h>
#include "backend/backend.h"
#include "toolkit/toolkit.h"
#include "xwl_content.h"
#include "x11_cursor.xpm"
Include dependency graph for xwl.c:

Classes

struct  _wlmaker_xwl_t
 

Functions

static void handle_ready (struct wl_listener *listener_ptr, void *data_ptr)
 
static void handle_new_surface (struct wl_listener *listener_ptr, void *data_ptr)
 
wlmaker_xwl_twlmaker_xwl_create (wlmaker_server_t *server_ptr)
 
void wlmaker_xwl_destroy (wlmaker_xwl_t *xwl_ptr)
 
bool xwl_is_window_type (wlmaker_xwl_t *xwl_ptr, struct wlr_xwayland_surface *wlr_xwayland_surface_ptr, const xwl_atom_identifier_t *atom_identifiers)
 
const char * xwl_atom_name (wlmaker_xwl_t *xwl_ptr, xcb_atom_t atom)
 

Variables

static const char * xwl_atom_name_map [XWL_MAX_ATOM_ID]
 

Detailed Description

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ handle_new_surface()

void handle_new_surface ( struct wl_listener *  listener_ptr,
void *  data_ptr 
)
static

Event handler for the new_surface signal raised by wlr_xwayland.

Parameters
listener_ptr
data_ptr

◆ handle_ready()

void handle_ready ( struct wl_listener *  listener_ptr,
void *  data_ptr 
)
static

Event handler for the ready signal raised by wlr_xwayland.

Parameters
listener_ptr
data_ptr

◆ wlmaker_xwl_create()

wlmaker_xwl_t * wlmaker_xwl_create ( wlmaker_server_t server_ptr)

Creates the XWayland interface.

Parameters
server_ptr
Returns
NULL on error, or a pointer to a wlmaker_xwl_t. Must be free-d by calling wlmaker_xwl_destroy.

◆ wlmaker_xwl_destroy()

void wlmaker_xwl_destroy ( wlmaker_xwl_t xwl_ptr)

Destroys the XWayland interface.

Parameters
xwl_ptr

◆ xwl_atom_name()

const char * xwl_atom_name ( wlmaker_xwl_t xwl_ptr,
xcb_atom_t  atom 
)

Returns a human-readable name for the atom.

◆ xwl_is_window_type()

bool xwl_is_window_type ( wlmaker_xwl_t xwl_ptr,
struct wlr_xwayland_surface *  wlr_xwayland_surface_ptr,
const xwl_atom_identifier_t atom_identifiers 
)

Returns whether the XWayland surface has any of the window types.

Parameters
xwl_ptr
wlr_xwayland_surface_ptr
atom_identifiersNULL-terminated set of window type we're looking for.
Returns
Whether atom_identifiers is in any of the window types.

Variable Documentation

◆ xwl_atom_name_map

const char* xwl_atom_name_map[XWL_MAX_ATOM_ID]
static
Initial value:
= {
[NET_WM_WINDOW_TYPE_NORMAL] = "_NET_WM_WINDOW_TYPE_NORMAL",
[NET_WM_WINDOW_TYPE_DIALOG] = "_NET_WM_WINDOW_TYPE_DIALOG",
[NET_WM_WINDOW_TYPE_UTILITY] = "_NET_WM_WINDOW_TYPE_UTILITY",
[NET_WM_WINDOW_TYPE_TOOLBAR] = "_NET_WM_WINDOW_TYPE_TOOLBAR",
[NET_WM_WINDOW_TYPE_SPLASH] = "_NET_WM_WINDOW_TYPE_SPLASH",
[NET_WM_WINDOW_TYPE_MENU] = "_NET_WM_WINDOW_TYPE_MENU",
[NET_WM_WINDOW_TYPE_DROPDOWN_MENU] = "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
[NET_WM_WINDOW_TYPE_POPUP_MENU] = "_NET_WM_WINDOW_TYPE_POPUP_MENU",
[NET_WM_WINDOW_TYPE_TOOLTIP] = "_NET_WM_WINDOW_TYPE_TOOLTIP",
[NET_WM_WINDOW_TYPE_NOTIFICATION] = "_NET_WM_WINDOW_TYPE_NOTIFICATION",
}

Lookup map for some of XCB atom identifiers.