diff options
author | Ken Moore <moorekou@gmail.com> | 2015-09-04 09:29:29 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-09-04 09:29:29 -0400 |
commit | e75014ec60c937d42f09852d7d0e833f96ee7093 (patch) | |
tree | a4d1ee2df38b61b8c0ccd6aa79de304d4c3f2884 /lumina-wm-INCOMPLETE/LWindow.h | |
parent | Clean out all the old XLib functions which were commented out, and start addi... (diff) | |
download | lumina-e75014ec60c937d42f09852d7d0e833f96ee7093.tar.gz lumina-e75014ec60c937d42f09852d7d0e833f96ee7093.tar.bz2 lumina-e75014ec60c937d42f09852d7d0e833f96ee7093.zip |
Commit some more work on lumina-wm:
1) The LWindow class seems to function properly for embedding/controlling a window now.
2) Add a "testwin" CLI flag to simply run a text of the window class (with a sample window). This allows testing without having to stop the currently running WM.
3) Setup the XCB access class so it is globally accessible to the individual classes in the WM (no need to constantly be passing the structure around).
4) Already include built-in support for simple window animations/effects (3-lines per effect is all that is needed). Will need to define animation flags/settings for use later, probably with an abstracted function to "performAnimation(type, size)"
Diffstat (limited to 'lumina-wm-INCOMPLETE/LWindow.h')
-rw-r--r-- | lumina-wm-INCOMPLETE/LWindow.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/lumina-wm-INCOMPLETE/LWindow.h b/lumina-wm-INCOMPLETE/LWindow.h index af5a8054..61345736 100644 --- a/lumina-wm-INCOMPLETE/LWindow.h +++ b/lumina-wm-INCOMPLETE/LWindow.h @@ -4,16 +4,10 @@ // Available under the 3-clause BSD license // See the LICENSE file for full details //=========================================== -#ifndef _LUMINA_DESKTOP_SCREEN_SAVER_H -#define _LUMINA_DESKTOP_SCREEN_SAVER_H +#ifndef _LUMINA_DESKTOP_WINDOW_FRAME_H +#define _LUMINA_DESKTOP_WINDOW_FRAME_H -#include <QFrame> -#include <QLabel> -#include <QToolButton> -#include <QMenu> -#include <QMouseEvent> -#include <QAction> -#include <QPoint> +#include "GlobalDefines.h" class LWindow : public QFrame{ Q_OBJECT @@ -28,25 +22,35 @@ private: void InitWindow(); //Initialize all the internal widgets //Window status - enum ModStatus{Normal, Move, ResizeTop, ResizeTopRight, ResizeRight, ResizeBottomRight, ResizeBottom, ResizeBottomLeft, ResizeLeft, ResizeTopLeft}; - ModStatus activeState; + enum ModState{Normal, Move, ResizeTop, ResizeTopRight, ResizeRight, ResizeBottomRight, ResizeBottom, ResizeBottomLeft, ResizeLeft, ResizeTopLeft}; + ModState activeState; + QPoint offset; //needed for movement calculations (offset from mouse click to movement point) //Functions for getting/setting state - ModStatus getStateAtPoint(QPoint); //generally used for mouse location detection - void setMouseCursor(ModStatus); //Update the mouse cursor based on state + ModState getStateAtPoint(QPoint pt, bool setoffset = false); //generally used for mouse location detection + void setMouseCursor(ModState, bool override = false); //Update the mouse cursor based on state - //General Properties + //General Properties/Modifications WId CID; //Client ID + QWindow *WIN; //Embedded window container + //QBackingStore *WINBACK; + void SyncSize(); //sync the window/frame geometries + void SyncText(); //Window Frame Widgets/Items QLabel *titleBar, *title, *icon; QToolButton *minB, *maxB, *closeB, *otherB; QMenu *otherM; //menu of "other" actions for the window - + QRect normalGeom; //used for restoring back to original size after maximization/fullscreen + + //Animations + QPropertyAnimation *anim; //used for appear/disappear animations + QRect lastGeom; //used for appear/disappear animations + void showAnimation(LWM::WindowAction); + public slots: - //These slots are generally used for the outside event watcher to + //These slots are generally used for the outside event watcher to prod for changes void updateAppearance(); //reload the theme and change styling as necessary - void propertiesChanged(); - void + void windowChanged(LWM::WindowAction); private slots: void closeClicked(); |