mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 18:54:02 +00:00
[client] app: implement new overlay rendering framework
This change set implements a framework for overlays to be registered that make use of ImGui. See `overlay/fps` for a simple implementation example.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "common/ringbuffer.h"
|
||||
#include "common/types.h"
|
||||
#include "interface/displayserver.h"
|
||||
#include "interface/overlay.h"
|
||||
|
||||
typedef enum LG_MsgAlert
|
||||
{
|
||||
@@ -79,10 +80,15 @@ void app_glSetSwapInterval(int interval);
|
||||
void app_glSwapBuffers(void);
|
||||
#endif
|
||||
|
||||
typedef struct ImGuiGraph * GraphHandle;
|
||||
void app_registerOverlay(const struct LG_OverlayOps * ops, void * params);
|
||||
int app_renderOverlay(struct Rect * rects, int maxRects);
|
||||
void app_freeOverlays(void);
|
||||
|
||||
struct OverlayGraph;
|
||||
typedef struct OverlayGraph * GraphHandle;
|
||||
|
||||
GraphHandle app_registerGraph(const char * name, RingBuffer buffer);
|
||||
void app_unregisterGraph(GraphHandle handle);
|
||||
bool app_renderImGui(void);
|
||||
|
||||
void app_clipboardRelease(void);
|
||||
void app_clipboardNotifyTypes(const LG_ClipboardData types[], int count);
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#define _H_I_OVERLAY_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "common/types.h"
|
||||
|
||||
enum LG_OverlayFlags
|
||||
@@ -57,7 +59,8 @@ struct LG_OverlayOps
|
||||
* mode.
|
||||
*
|
||||
* The caller provides `windowRects` to be populated by the callee and is sized
|
||||
* according to the return value of `getWindowCount`
|
||||
* according to the return value of `getWindowCount`. Note, `windowRects` may
|
||||
* be NULL if the caller does not want this information.
|
||||
*/
|
||||
void (*render)(void * udata, bool interactive, struct Rect windowRects[]);
|
||||
|
||||
|
Reference in New Issue
Block a user