-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cococry
committed
Aug 17, 2024
1 parent
72cd836
commit 4784732
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#pragma once | ||
|
||
#include <stdbool.h> | ||
#include <stdint.h> | ||
|
||
typedef int32_t RgWindow; | ||
|
||
#define RG_INVALID_WINDOW -1 | ||
|
||
typedef enum { | ||
RgCommandTerminate, | ||
RgCommandGetWindows, | ||
RgCommandKillWindow, | ||
RgCommandFocusWindow, | ||
RgCommandNextWindow, | ||
RgCommandFirstWindow, | ||
RgCommandGetFocus, | ||
RgCommandGetMonitorFocus, | ||
RgCommandGetCursor, | ||
RgCommandGetWindowArea, | ||
} RgCommandType; | ||
|
||
typedef struct { | ||
float x, y; | ||
} Rgv2; | ||
|
||
typedef struct { | ||
Rgv2 pos, size; | ||
} RgArea; | ||
|
||
void rg_set_trace_logging(bool logging); | ||
|
||
int32_t rg_cmd_terminate(uint32_t exitcode); | ||
|
||
int32_t rg_cmd_get_windows(RgWindow** wins, uint32_t* numwins); | ||
|
||
int32_t rg_cmd_kill_window(RgWindow win); | ||
|
||
int32_t rg_cmd_focus_window(RgWindow win); | ||
|
||
int32_t rg_cmd_next_window(RgWindow win, RgWindow* next); | ||
|
||
int32_t rg_cmd_first_window(RgWindow* first); | ||
|
||
int32_t rg_cmd_get_focus(RgWindow* focus); | ||
|
||
int32_t rg_cmd_get_monitor_focus(int32_t* idx); | ||
|
||
int32_t rg_cmd_get_cursor(Rgv2* cursor); | ||
|
||
int32_t rg_cmd_get_window_area(RgWindow win, RgArea* area); | ||
|