view infinite_canvas/theme.h @ 279:b3b547563ec7

Add Google connector service and agent wiki Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code. Co-authored-by: Copilot <[email protected]> Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:22:36 -0700
parents 8d560f50ed4c
children
line wrap: on
line source

#ifndef INFINITE_CANVAS_THEME_H
#define INFINITE_CANVAS_THEME_H

#include "dowa/dowa.h"
#include "third_party/raylib/include/raylib.h"

typedef enum {
    CANVAS_THEME_AUTO = 0,
    CANVAS_THEME_LIGHT,
    CANVAS_THEME_DARK,
} Canvas_Theme_Mode;

typedef struct {
    Canvas_Theme_Mode requested_mode;
    Canvas_Theme_Mode resolved_mode;
    Color background;
    Color surface;
    Color surface_muted;
    Color border;
    Color text;
    Color text_muted;
    Color accent;
    Color accent_soft;
    Color on_accent;
    Color selection;
    Color entity_outline;
    Color button;
    Color button_hover;
    Color button_active;
    Color button_active_hover;
    Color switch_track_off;
    Color switch_track_off_hover;
    Color switch_track_on;
    Color switch_track_on_hover;
    Color switch_thumb;
    Color pin;
    Color danger;
    Color shadow;
    Color toast_surface;
    Color toast_border;
} Canvas_Theme;

Canvas_Theme_Mode Canvas_Theme_Mode_From_String(const char *p_value);
boolean Canvas_System_Prefers_Dark(void);
void Canvas_Theme_Resolve(Canvas_Theme *p_theme, Canvas_Theme_Mode mode);
void Canvas_Theme_Toggle(Canvas_Theme *p_theme);
void Canvas_Theme_Draw_Shadow(
    const Canvas_Theme *p_theme,
    Rectangle bounds,
    float roundness,
    int32 segments,
    float zoom,
    float opacity);

#endif