Mercurial
diff infinite_canvas/web_surface.h @ 278:8d560f50ed4c
Improve infinite canvas interactions and browser chrome
Render Lucide icons directly with Raylib, add searchable icon browsing, robust text editing, entity lifecycle animations, z-order-safe input, semantic themes, and animated editable browser controls. Document rendering, pinning, context, and component extension for future agents.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 22:16:14 -0700 |
| parents | b55c22cff335 |
| children | 49e9e591c9bb |
line wrap: on
line diff
--- a/infinite_canvas/web_surface.h Mon Aug 17 17:01:40 2026 -0700 +++ b/infinite_canvas/web_surface.h Mon Aug 17 22:16:14 2026 -0700 @@ -14,7 +14,12 @@ int32 texture_width; int32 texture_height; size_t pixel_capacity; - char url[128]; + char source_url[CANVAS_ENTITY_TEXT_CAPACITY]; + char url[CANVAS_ENTITY_TEXT_CAPACITY]; + boolean can_go_back; + boolean can_go_forward; + boolean color_scheme_applied; + boolean applied_dark_mode; boolean active; boolean browser_created; boolean texture_ready; @@ -26,6 +31,7 @@ void *p_native; Canvas_Web_View views[CANVAS_MAX_WEB_VIEWS]; uint32 focused_entity_id; + boolean dark_mode; boolean initialized; } Canvas_Web_Surface; @@ -36,7 +42,11 @@ int32 Canvas_Web_Surface_Execute_Subprocess(int argc, char **p_argv); boolean Canvas_Web_Surface_Init( Canvas_Web_Surface *p_surface, - Dowa_Arena *p_arena); + Dowa_Arena *p_arena, + boolean dark_mode); +void Canvas_Web_Surface_Set_Dark_Mode( + Canvas_Web_Surface *p_surface, + boolean dark_mode); boolean Canvas_Web_Surface_Update_Input( Canvas_Web_Surface *p_surface, const Canvas_Camera *p_camera, @@ -49,6 +59,26 @@ const Canvas_Web_Surface *p_surface, const Canvas_Camera *p_camera, const Canvas_Scene *p_scene); +void Canvas_Web_Surface_Draw_Entity( + const Canvas_Web_Surface *p_surface, + const Canvas_Camera *p_camera, + const Canvas_Scene *p_scene, + size_t entity_index); +const char *Canvas_Web_Surface_URL( + const Canvas_Web_Surface *p_surface, + uint32 entity_id); +boolean Canvas_Web_Surface_Can_Go_Back( + const Canvas_Web_Surface *p_surface, + uint32 entity_id); +boolean Canvas_Web_Surface_Can_Go_Forward( + const Canvas_Web_Surface *p_surface, + uint32 entity_id); +void Canvas_Web_Surface_Go_Back( + Canvas_Web_Surface *p_surface, + uint32 entity_id); +void Canvas_Web_Surface_Go_Forward( + Canvas_Web_Surface *p_surface, + uint32 entity_id); boolean Canvas_Web_Surface_Is_Focused(const Canvas_Web_Surface *p_surface); void Canvas_Web_Surface_Shutdown(Canvas_Web_Surface *p_surface);