From 5597b2a289a8bea9ddae94b699afa370f3b0300c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 3 Feb 2017 13:40:36 -0500 Subject: Commit my work-in-progress on a new NativeWindowSystem class. This will be a replacement for the current LuminaX11 class usage in the desktop, with a generic Qt5 API that talks to the X11/Wayland subsystems in the background. --- src-qt5/core/libLumina/NativeWindow.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src-qt5/core/libLumina/NativeWindow.h') diff --git a/src-qt5/core/libLumina/NativeWindow.h b/src-qt5/core/libLumina/NativeWindow.h index c4fdbb47..59b955c3 100644 --- a/src-qt5/core/libLumina/NativeWindow.h +++ b/src-qt5/core/libLumina/NativeWindow.h @@ -24,21 +24,29 @@ class NativeWindow : public QObject{ Q_OBJECT public: + enum State{ S_MODAL, S_STICKY, S_MAX_VERT, S_MAX_HORZ, S_SHADED, S_SKIP_TASKBAR, S_SKIP_PAGER, S_HIDDEN, S_FULLSCREEN, S_ABOVE, S_BELOW, S_ATTENTION }; + enum Type{T_DESKTOP, T_DOCK, T_TOOLBAR, T_MENU, T_UTILITY, T_SPLASH, T_DIALOG, T_DROPDOWN_MENU, T_POPUP_MENU, T_TOOLTIP, T_NOTIFICATION, T_COMBO, T_DND, T_NORMAL }; + enum Action {A_MOVE, A_RESIZE, A_MINIMIZE, A_SHADE, A_STICK, A_MAX_VERT, A_MAX_HORZ, A_FULLSCREEN, A_CHANGE_DESKTOP, A_CLOSE, A_ABOVE, A_BELOW}; + enum Property{ /*QVariant Type*/ None, /*null*/ MinSize, /*QSize*/ MaxSize, /*QSize*/ - Size, /*int*/ + Size, /*QSize*/ + GlobalPos, /*QPoint*/ Title, /*QString*/ ShortTitle, /*QString*/ Icon, /*QIcon*/ Name, /*QString*/ Workspace, /*int*/ - WindowFlags, /*Qt::WindowFlags*/ + States, /*QList : Current state of the window */ + WinTypes, /*QList : Current type of window (typically does not change)*/ + WinActions, /*QList : Current actions that the window allows (Managed/set by the WM)*/ Active, /*bool*/ Visible /*bool*/ }; + NativeWindow(WId id); ~NativeWindow(); @@ -58,11 +66,14 @@ signals: void PropertyChanged(NativeWindow::Property, QVariant); void WindowClosed(WId); - //Action Requests (not automatically emitted) + //Action Requests (not automatically emitted - typically used to ask the WM to do something) //Note: "WId" should be the NativeWindow id() - void RequestActivate(WId); - void RequestClose(WId); - + void RequestActivate(WId); //Activate the window + void RequestClose(WId); //Close the window + void RequestSetVisible(WId, bool); //Minimize/restore visiblility + void RequestSetGeometry(WId, QRect); //Register the location/size of the window + void RequestSetFrameExtents(WId, QList); //Register the size of the frame around the window [Left,Right, Top,Bottom] in pixels + // System Tray Icon Embed/Unembed Requests //void RequestEmbed(WId, QWidget*); //void RequestUnEmbed(WId, QWidget*); -- cgit