2023-03-20 16:23:25 +01:00
|
|
|
#pragma once
|
|
|
|
|
2023-11-04 18:27:21 +01:00
|
|
|
#include "helpers/Vector2D.hpp"
|
|
|
|
|
2023-12-06 23:54:56 +01:00
|
|
|
enum eIcons {
|
2023-03-20 16:23:25 +01:00
|
|
|
ICON_WARNING = 0,
|
|
|
|
ICON_INFO,
|
|
|
|
ICON_HINT,
|
|
|
|
ICON_ERROR,
|
|
|
|
ICON_CONFUSED,
|
2023-03-20 16:49:46 +01:00
|
|
|
ICON_OK,
|
2023-03-20 16:23:25 +01:00
|
|
|
ICON_NONE
|
2023-04-18 00:45:03 +02:00
|
|
|
};
|
|
|
|
|
2023-12-06 23:54:56 +01:00
|
|
|
enum eRenderStage {
|
2023-04-18 00:45:03 +02:00
|
|
|
RENDER_PRE = 0, /* Before binding the gl context */
|
|
|
|
RENDER_BEGIN, /* Just when the rendering begins, nothing has been rendered yet. Damage, current render data in opengl valid. */
|
|
|
|
RENDER_PRE_WINDOWS, /* Pre windows, post bottom and overlay layers */
|
|
|
|
RENDER_POST_WINDOWS, /* Post windows, pre top/overlay layers, etc */
|
|
|
|
RENDER_LAST_MOMENT, /* Last moment to render with the gl context */
|
|
|
|
RENDER_POST, /* After rendering is finished, gl context not available anymore */
|
|
|
|
RENDER_POST_MIRROR, /* After rendering a mirror */
|
2023-05-26 13:07:45 +02:00
|
|
|
RENDER_PRE_WINDOW, /* Before rendering a window (any pass) Note some windows (e.g. tiled) may have 2 passes (main & popup) */
|
|
|
|
RENDER_POST_WINDOW, /* After rendering a window (any pass) */
|
2023-10-21 15:52:43 +02:00
|
|
|
};
|
|
|
|
|
2023-12-29 10:24:56 +01:00
|
|
|
enum eInputType {
|
|
|
|
INPUT_TYPE_AXIS = 0,
|
|
|
|
INPUT_TYPE_BUTTON,
|
|
|
|
INPUT_TYPE_DRAG_START,
|
|
|
|
INPUT_TYPE_DRAG_END,
|
|
|
|
INPUT_TYPE_MOTION
|
|
|
|
};
|
|
|
|
|
2023-10-21 15:52:43 +02:00
|
|
|
struct SCallbackInfo {
|
|
|
|
bool cancelled = false; /* on cancellable events, will cancel the event. */
|
2023-11-04 18:03:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SWindowDecorationExtents {
|
|
|
|
Vector2D topLeft;
|
|
|
|
Vector2D bottomRight;
|
|
|
|
|
|
|
|
//
|
|
|
|
SWindowDecorationExtents operator*(const double& scale) const {
|
|
|
|
return SWindowDecorationExtents{topLeft * scale, bottomRight * scale};
|
|
|
|
}
|
|
|
|
|
2023-11-11 15:37:17 +01:00
|
|
|
SWindowDecorationExtents round() {
|
|
|
|
return {topLeft.round(), bottomRight.round()};
|
2023-11-04 18:03:05 +01:00
|
|
|
}
|
2023-11-11 16:18:04 +01:00
|
|
|
|
|
|
|
bool operator==(const SWindowDecorationExtents& other) const {
|
|
|
|
return topLeft == other.topLeft && bottomRight == other.bottomRight;
|
|
|
|
}
|
2023-03-20 16:23:25 +01:00
|
|
|
};
|