Hyprland/src/events/Events.hpp

173 lines
3.9 KiB
C++
Raw Normal View History

2022-03-16 21:37:21 +01:00
#pragma once
#include "../defines.hpp"
2022-03-27 17:25:20 +02:00
//
// LISTEN_NAME -> the wl_listener
//
// LISTENER_NAME -> the wl_listener.notify function
//
2022-03-16 21:37:21 +01:00
namespace Events {
2022-03-18 20:03:39 +01:00
// Monitor events
2022-03-16 21:37:21 +01:00
LISTENER(change);
LISTENER(newOutput);
2022-03-17 20:22:29 +01:00
// DRM events
LISTENER(leaseRequest);
2022-03-18 20:03:39 +01:00
// Layer events
2022-03-16 21:37:21 +01:00
LISTENER(newLayerSurface);
2022-03-28 22:31:39 +02:00
DYNLISTENFUNC(destroyLayerSurface);
DYNLISTENFUNC(mapLayerSurface);
DYNLISTENFUNC(unmapLayerSurface);
DYNLISTENFUNC(commitLayerSurface);
2022-03-17 20:22:29 +01:00
2022-03-21 16:13:43 +01:00
// Subsurfaces
2022-03-28 22:31:39 +02:00
DYNLISTENFUNC(newSubsurfaceNode);
DYNLISTENFUNC(destroySubsurfaceNode);
DYNLISTENFUNC(mapSubsurface);
DYNLISTENFUNC(unmapSubsurface);
DYNLISTENFUNC(destroySubsurface);
DYNLISTENFUNC(commitSubsurface);
2022-03-21 16:13:43 +01:00
2022-03-20 12:11:57 +01:00
// Popups
DYNLISTENFUNC(newPopup); // LayerSurface
2022-03-20 12:11:57 +01:00
2022-03-28 22:31:39 +02:00
DYNLISTENFUNC(newPopupXDG);
DYNLISTENFUNC(mapPopupXDG);
DYNLISTENFUNC(unmapPopupXDG);
DYNLISTENFUNC(destroyPopupXDG);
DYNLISTENFUNC(commitPopupXDG);
DYNLISTENFUNC(newPopupFromPopupXDG);
2022-03-20 12:11:57 +01:00
2022-03-18 20:03:39 +01:00
// Surface XDG (window)
2022-03-16 21:37:21 +01:00
LISTENER(newXDGSurface);
2022-10-22 17:43:47 +02:00
LISTENER(activateXDG);
2022-03-16 21:37:21 +01:00
2022-03-18 20:03:39 +01:00
// Window events
2022-03-28 22:31:39 +02:00
DYNLISTENFUNC(commitWindow);
DYNLISTENFUNC(mapWindow);
DYNLISTENFUNC(unmapWindow);
DYNLISTENFUNC(destroyWindow);
DYNLISTENFUNC(setTitleWindow);
DYNLISTENFUNC(fullscreenWindow);
DYNLISTENFUNC(activateX11);
DYNLISTENFUNC(configureX11);
2022-07-08 11:24:07 +02:00
DYNLISTENFUNC(unmanagedSetGeometry);
2022-07-16 00:11:21 +02:00
DYNLISTENFUNC(requestMove);
DYNLISTENFUNC(requestResize);
DYNLISTENFUNC(requestMinimize);
DYNLISTENFUNC(requestMaximize);
DYNLISTENFUNC(setOverrideRedirect);
2023-06-03 12:20:23 +02:00
DYNLISTENFUNC(associateX11);
DYNLISTENFUNC(dissociateX11);
2022-03-17 20:22:29 +01:00
2022-03-21 16:13:43 +01:00
// Window subsurfaces
// LISTENER(newSubsurfaceWindow);
2022-03-21 16:13:43 +01:00
2022-03-18 20:03:39 +01:00
// Input events
2022-03-16 21:37:21 +01:00
LISTENER(mouseMove);
LISTENER(mouseMoveAbsolute);
LISTENER(mouseButton);
LISTENER(mouseAxis);
LISTENER(mouseFrame);
2022-09-25 20:07:48 +02:00
2022-03-16 21:37:21 +01:00
LISTENER(newInput);
2022-03-17 20:55:04 +01:00
2022-05-12 12:13:02 +02:00
// Virt Ptr
LISTENER(newVirtPtr);
DYNLISTENFUNC(destroyMouse);
2022-03-28 22:31:39 +02:00
DYNLISTENFUNC(keyboardKey);
DYNLISTENFUNC(keyboardMod);
DYNLISTENFUNC(keyboardDestroy);
2022-09-25 20:07:48 +02:00
DYNLISTENFUNC(commitConstraint);
LISTENER(newConstraint);
DYNLISTENFUNC(setConstraintRegion);
DYNLISTENFUNC(destroyConstraint);
2022-03-16 21:37:21 +01:00
2022-03-18 20:03:39 +01:00
// Various
2022-03-16 21:37:21 +01:00
LISTENER(requestMouse);
LISTENER(requestSetSel);
LISTENER(requestSetPrimarySel);
2022-03-18 20:03:39 +01:00
// outputMgr
2022-03-16 21:37:21 +01:00
LISTENER(outputMgrApply);
LISTENER(outputMgrTest);
2022-03-17 16:56:33 +01:00
2022-03-18 20:03:39 +01:00
// Monitor part 2 the sequel
2022-03-28 22:31:39 +02:00
DYNLISTENFUNC(monitorFrame);
DYNLISTENFUNC(monitorDestroy);
2022-11-19 17:28:04 +01:00
DYNLISTENFUNC(monitorStateRequest);
DYNLISTENFUNC(monitorDamage);
2023-04-07 18:25:56 +02:00
DYNLISTENFUNC(monitorNeedsFrame);
2023-04-12 22:40:51 +02:00
DYNLISTENFUNC(monitorCommit);
2022-03-18 20:03:39 +01:00
// XWayland
LISTENER(readyXWayland);
LISTENER(surfaceXWayland);
// Drag & Drop
LISTENER(requestDrag);
LISTENER(startDrag);
2022-03-31 17:25:23 +02:00
DYNLISTENFUNC(destroyDrag);
DYNLISTENFUNC(mapDragIcon);
DYNLISTENFUNC(unmapDragIcon);
DYNLISTENFUNC(destroyDragIcon);
DYNLISTENFUNC(commitDragIcon);
2022-03-22 18:29:13 +01:00
// Inhibit
LISTENER(InhibitActivate);
LISTENER(InhibitDeactivate);
// Deco XDG
LISTENER(NewXDGDeco);
// Renderer destroy
LISTENER(RendererDestroy);
LISTENER(newIdleInhibitor);
2022-07-07 11:52:12 +02:00
2022-07-16 16:12:31 +02:00
// session
LISTENER(sessionActive);
// Touchpad shit
2022-07-07 11:52:12 +02:00
LISTENER(swipeBegin);
LISTENER(swipeEnd);
LISTENER(swipeUpdate);
2022-07-16 16:12:31 +02:00
LISTENER(pinchBegin);
LISTENER(pinchUpdate);
LISTENER(pinchEnd);
2022-07-30 22:41:24 +02:00
// Power
LISTENER(powerMgrSetMode);
2022-08-05 13:03:37 +02:00
// IME
LISTENER(newIME);
LISTENER(newTextInput);
2022-08-05 16:21:08 +02:00
LISTENER(newVirtualKeyboard);
2022-08-05 17:07:01 +02:00
// IME Popups
DYNLISTENFUNC(mapInputPopup);
DYNLISTENFUNC(unmapInputPopup);
DYNLISTENFUNC(commitInputPopup);
DYNLISTENFUNC(destroyInputPopup);
2022-08-07 21:17:03 +02:00
// Touch
LISTENER(touchBegin);
LISTENER(touchEnd);
LISTENER(touchUpdate);
2022-09-22 22:14:02 +02:00
LISTENER(touchFrame);
LISTENER(holdBegin);
LISTENER(holdEnd);
2023-02-03 12:58:55 +01:00
// Session Lock
LISTENER(newSessionLock);
// Gamma control
LISTENER(setGamma);
2022-09-25 20:07:48 +02:00
};