name a few anon structs

This commit is contained in:
Kovid Goyal 2025-08-22 11:20:23 +05:30
parent c2a5af19b0
commit 3483f99d09
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -24,7 +24,7 @@ typedef enum { LEFT_EDGE = 1, TOP_EDGE = 2, RIGHT_EDGE = 4, BOTTOM_EDGE = 8 } Ed
typedef enum { REPEAT_MIRROR, REPEAT_CLAMP, REPEAT_DEFAULT } RepeatStrategy;
typedef enum { WINDOW_NORMAL, WINDOW_FULLSCREEN, WINDOW_MAXIMIZED, WINDOW_MINIMIZED, WINDOW_HIDDEN } WindowState;
typedef struct {
typedef struct UrlPrefix {
char_type string[16];
size_t len;
} UrlPrefix;
@ -38,7 +38,7 @@ struct MenuItem {
const char *definition;
};
typedef struct {
typedef struct Options {
monotonic_t visual_bell_duration, cursor_blink_interval, cursor_stop_blinking_after, click_interval;
struct {
monotonic_t hide_wait, unhide_wait;
@ -146,13 +146,13 @@ typedef struct {
unsigned int left, top, right, bottom;
} WindowGeometry;
typedef struct {
typedef struct WindowRenderData {
ssize_t vao_idx;
WindowGeometry geometry;
Screen *screen;
} WindowRenderData;
typedef struct {
typedef struct Click {
monotonic_t at;
int button, modifiers;
double x, y;
@ -160,7 +160,7 @@ typedef struct {
} Click;
#define CLICK_QUEUE_SZ 3
typedef struct {
typedef struct ClickQueue {
Click clicks[CLICK_QUEUE_SZ];
unsigned int length;
} ClickQueue;
@ -190,7 +190,7 @@ typedef struct WindowBarData {
bool needs_render;
} WindowBarData;
typedef struct {
typedef struct Window {
id_type id;
bool visible;
float cursor_opacity_at_last_render;
@ -218,19 +218,19 @@ typedef struct {
} pending_clicks;
} Window;
typedef struct {
typedef struct BorderRect {
float left, top, right, bottom;
uint32_t color;
} BorderRect;
typedef struct {
typedef struct BorderRects {
BorderRect *rect_buf;
unsigned int num_border_rects, capacity;
bool is_dirty;
ssize_t vao_idx;
} BorderRects;
typedef struct {
typedef struct CursorTrail {
bool needs_render;
monotonic_t updated_at;
float opacity;
@ -240,7 +240,7 @@ typedef struct {
float cursor_edge_y[2];
} CursorTrail;
typedef struct {
typedef struct Tab {
id_type id;
unsigned int active_window, num_windows, capacity;
Window *windows;
@ -251,7 +251,7 @@ typedef struct {
enum RENDER_STATE { RENDER_FRAME_NOT_REQUESTED, RENDER_FRAME_REQUESTED, RENDER_FRAME_READY };
typedef enum { NO_CLOSE_REQUESTED, CONFIRMABLE_CLOSE_REQUESTED, CLOSE_BEING_CONFIRMED, IMPERATIVE_CLOSE_REQUESTED } CloseRequest;
typedef struct {
typedef struct LiveResizeInfo {
monotonic_t last_resize_event_at;
bool in_progress;
bool from_os_notification;
@ -278,7 +278,7 @@ typedef struct BackgroundImageRenderSettings {
bool linear; uint32_t bgcolor; float opacity;
} BackgroundImageRenderSettings;
typedef struct {
typedef struct OSWindow {
void *handle;
id_type id;
monotonic_t created_at;
@ -328,7 +328,7 @@ typedef struct {
} OSWindow;
typedef struct {
typedef struct GlobalState {
Options opts;
id_type os_window_id_counter, tab_id_counter, window_id_counter;