mirror of
https://github.com/swaywm/sway.git
synced 2026-02-06 04:06:25 -05:00
Merge a7a7660a49 into 845cdb190f
This commit is contained in:
commit
400bcf4dbc
17 changed files with 1499 additions and 22 deletions
|
|
@ -33,6 +33,7 @@ struct swaybar {
|
|||
struct zxdg_output_manager_v1 *xdg_output_manager;
|
||||
struct wp_cursor_shape_manager_v1 *cursor_shape_manager;
|
||||
struct wl_shm *shm;
|
||||
struct xdg_wm_base *wm_base;
|
||||
|
||||
struct swaybar_config *config;
|
||||
struct status_line *status;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
struct swaybar;
|
||||
struct swaybar_output;
|
||||
struct swaybar_seat;
|
||||
|
||||
struct swaybar_pointer {
|
||||
struct wl_pointer *pointer;
|
||||
|
|
@ -48,8 +49,8 @@ struct swaybar_hotspot {
|
|||
struct wl_list link; // swaybar_output::hotspots
|
||||
int x, y, width, height;
|
||||
enum hotspot_event_handling (*callback)(struct swaybar_output *output,
|
||||
struct swaybar_hotspot *hotspot, double x, double y, uint32_t button,
|
||||
bool released, void *data);
|
||||
struct swaybar_hotspot *hotspot, struct swaybar_seat *seat, uint32_t serial,
|
||||
double x, double y, uint32_t button, bool released, void *data);
|
||||
void (*destroy)(void *data);
|
||||
void *data;
|
||||
};
|
||||
|
|
|
|||
29
include/swaybar/tray/dbusmenu.h
Normal file
29
include/swaybar/tray/dbusmenu.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef _SWAYBAR_TRAY_DBUSMENU_H
|
||||
#define _SWAYBAR_TRAY_DBUSMENU_H
|
||||
|
||||
#include "swaybar/bar.h"
|
||||
#include "swaybar/tray/item.h"
|
||||
|
||||
void swaybar_dbusmenu_open(struct swaybar_sni *sni,
|
||||
struct swaybar_output *output, struct swaybar_seat *seat, uint32_t serial,
|
||||
int x, int y);
|
||||
|
||||
void swaybar_dbusmenu_destroy(struct swaybar_dbusmenu *menu);
|
||||
|
||||
bool sway_dbusmenu_pointer_button(void *data, struct wl_pointer *wl_pointer,
|
||||
uint32_t serial, uint32_t time_, uint32_t button, uint32_t state);
|
||||
|
||||
bool sway_dbusmenu_pointer_motion(struct swaybar_seat *seat, struct wl_pointer *wl_pointer,
|
||||
uint32_t time_, wl_fixed_t surface_x, wl_fixed_t surface_y);
|
||||
|
||||
bool sway_dbusmenu_pointer_enter(void *data, struct wl_pointer *wl_pointer, uint32_t serial,
|
||||
struct wl_surface *surface, wl_fixed_t surface_x, wl_fixed_t surface_y);
|
||||
|
||||
bool sway_dbusmenu_pointer_leave(void *data, struct wl_pointer *wl_pointer, uint32_t serial,
|
||||
struct wl_surface *surface);
|
||||
|
||||
bool sway_dbusmenu_pointer_frame(struct swaybar_seat *data, struct wl_pointer *wl_pointer);
|
||||
|
||||
bool sway_dbusmenu_pointer_axis(struct swaybar_seat *data, struct wl_pointer *wl_pointer);
|
||||
|
||||
#endif
|
||||
|
|
@ -18,6 +18,7 @@ struct swaybar_pixmap {
|
|||
struct swaybar_sni_slot {
|
||||
struct wl_list link; // swaybar_sni::slots
|
||||
struct swaybar_sni *sni;
|
||||
int menu_id;
|
||||
const char *prop;
|
||||
const char *type;
|
||||
void *dest;
|
||||
|
|
@ -48,6 +49,7 @@ struct swaybar_sni {
|
|||
char *icon_theme_path; // non-standard KDE property
|
||||
|
||||
struct wl_list slots; // swaybar_sni_slot::link
|
||||
char **menu_icon_theme_paths;
|
||||
};
|
||||
|
||||
struct swaybar_sni *create_sni(char *id, struct swaybar_tray *tray);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ struct swaybar_tray {
|
|||
|
||||
list_t *basedirs; // char *
|
||||
list_t *themes; // struct swaybar_theme *
|
||||
|
||||
struct swaybar_dbusmenu *menu;
|
||||
struct swaybar_dbusmenu_menu *menu_pointer_focus;
|
||||
};
|
||||
|
||||
struct swaybar_tray *create_tray(struct swaybar *bar);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue