layer shell and others
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
void layer_surface_map(struct wl_listener *listener, void *data);
|
||||
void layer_surface_unmap(struct wl_listener *listener, void *data);
|
||||
void layer_surface_commit(struct wl_listener *listener, void *data);
|
||||
void layer_surface_new_popup(struct wl_listener *listener, void *data);
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
#include "output.h"
|
||||
#include "types.h"
|
||||
|
||||
void layer_arrange(absn_output *output);
|
||||
void layers_arrange(absn_output *output);
|
||||
|
||||
#endif
|
||||
@@ -11,5 +11,6 @@ void output_destroy(struct wl_listener *listener, void *data);
|
||||
void output_layout_change(struct wl_listener *listener, void *data);
|
||||
|
||||
void update_focused_output(absn_server *server);
|
||||
void output_arrange(absn_output *output);
|
||||
|
||||
#endif
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
absn_toplevel *toplevel_at(absn_server *server, double lx, double ly, struct wlr_surface **surface, double *sx,
|
||||
absn_toplevel *toplevel_at(absn_server *server, double lx, double ly,
|
||||
struct wlr_surface **surface, double *sx,
|
||||
double *sy);
|
||||
|
||||
bool toplevel_is_unmanaged(absn_toplevel *toplevel);
|
||||
|
||||
+14
-8
@@ -28,10 +28,10 @@
|
||||
#define MAX(A, B) (A) > (B) ? (A) : (B)
|
||||
#define MIN(A, B) (A) < (B) ? (A) : (B)
|
||||
/* macro for adding listener for event */
|
||||
#define LISTEN(L, C, E) \
|
||||
do { \
|
||||
(L).notify = (C); \
|
||||
wl_signal_add(&(E), &(L)); \
|
||||
#define LISTEN(L, C, E) \
|
||||
do { \
|
||||
(L).notify = (C); \
|
||||
wl_signal_add(&(E), &(L)); \
|
||||
} while (0);
|
||||
#define UNUSED(X) (void)(X)
|
||||
#define CLEANMASK(M) (M & ~WLR_MODIFIER_CAPS)
|
||||
@@ -74,7 +74,7 @@ static const int layermap[] = {
|
||||
LAYER_BACKGROUND,
|
||||
LAYER_BOTTOM,
|
||||
LAYER_TOP,
|
||||
LAYER_FULLSCREEN,
|
||||
LAYER_OVERLAY,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -150,6 +150,8 @@ typedef struct {
|
||||
struct wl_list focus_stack;
|
||||
absn_toplevel *focused_toplevel;
|
||||
|
||||
void *exclusive_focus;
|
||||
|
||||
absn_output *focused_output;
|
||||
struct wl_list outputs;
|
||||
struct wl_listener new_output;
|
||||
@@ -177,7 +179,7 @@ struct absn_output {
|
||||
struct wl_listener request_state;
|
||||
struct wl_listener destroy;
|
||||
|
||||
struct wl_list layer_surfaces;
|
||||
struct wl_list layers[4];
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -186,9 +188,10 @@ typedef struct {
|
||||
absn_server *server;
|
||||
absn_output *output;
|
||||
|
||||
int type; /* LAYER_SURFACE */
|
||||
bool mapped;
|
||||
struct wlr_scene_tree *scene_tree;
|
||||
struct wlr_scene_layer_surface_v1 *scene_layer;
|
||||
struct wlr_scene_tree *popups;
|
||||
|
||||
struct wlr_layer_surface_v1 *wlr;
|
||||
struct wl_listener map;
|
||||
@@ -249,8 +252,11 @@ struct absn_toplevel {
|
||||
|
||||
typedef struct {
|
||||
struct wlr_xdg_popup *wlr;
|
||||
|
||||
int parent_type;
|
||||
void *parent;
|
||||
|
||||
struct wl_listener commit;
|
||||
struct wl_listener destroy;
|
||||
} absn_popup;
|
||||
|
||||
typedef struct {
|
||||
|
||||
+2
-5
@@ -1,9 +1,6 @@
|
||||
#ifndef __XDG_POPUP_H_
|
||||
#define __XDG_POPUP_H_
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
#ifndef __XDG_POPUP_H
|
||||
#define __XDG_POPUP_H
|
||||
|
||||
void xdg_popup_commit(struct wl_listener *listener, void *data);
|
||||
void xdg_popup_destroy(struct wl_listener *listener, void *data);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user