comparison 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
comparison
equal deleted inserted replaced
277:1d99147f520c 278:8d560f50ed4c
12 uint8 *p_pixels; 12 uint8 *p_pixels;
13 Texture2D texture; 13 Texture2D texture;
14 int32 texture_width; 14 int32 texture_width;
15 int32 texture_height; 15 int32 texture_height;
16 size_t pixel_capacity; 16 size_t pixel_capacity;
17 char url[128]; 17 char source_url[CANVAS_ENTITY_TEXT_CAPACITY];
18 char url[CANVAS_ENTITY_TEXT_CAPACITY];
19 boolean can_go_back;
20 boolean can_go_forward;
21 boolean color_scheme_applied;
22 boolean applied_dark_mode;
18 boolean active; 23 boolean active;
19 boolean browser_created; 24 boolean browser_created;
20 boolean texture_ready; 25 boolean texture_ready;
21 boolean pixels_dirty; 26 boolean pixels_dirty;
22 } Canvas_Web_View; 27 } Canvas_Web_View;
24 typedef struct { 29 typedef struct {
25 Dowa_Arena *p_arena; 30 Dowa_Arena *p_arena;
26 void *p_native; 31 void *p_native;
27 Canvas_Web_View views[CANVAS_MAX_WEB_VIEWS]; 32 Canvas_Web_View views[CANVAS_MAX_WEB_VIEWS];
28 uint32 focused_entity_id; 33 uint32 focused_entity_id;
34 boolean dark_mode;
29 boolean initialized; 35 boolean initialized;
30 } Canvas_Web_Surface; 36 } Canvas_Web_Surface;
31 37
32 #if defined(__cplusplus) 38 #if defined(__cplusplus)
33 extern "C" { 39 extern "C" {
34 #endif 40 #endif
35 41
36 int32 Canvas_Web_Surface_Execute_Subprocess(int argc, char **p_argv); 42 int32 Canvas_Web_Surface_Execute_Subprocess(int argc, char **p_argv);
37 boolean Canvas_Web_Surface_Init( 43 boolean Canvas_Web_Surface_Init(
38 Canvas_Web_Surface *p_surface, 44 Canvas_Web_Surface *p_surface,
39 Dowa_Arena *p_arena); 45 Dowa_Arena *p_arena,
46 boolean dark_mode);
47 void Canvas_Web_Surface_Set_Dark_Mode(
48 Canvas_Web_Surface *p_surface,
49 boolean dark_mode);
40 boolean Canvas_Web_Surface_Update_Input( 50 boolean Canvas_Web_Surface_Update_Input(
41 Canvas_Web_Surface *p_surface, 51 Canvas_Web_Surface *p_surface,
42 const Canvas_Camera *p_camera, 52 const Canvas_Camera *p_camera,
43 const Canvas_Scene *p_scene); 53 const Canvas_Scene *p_scene);
44 void Canvas_Web_Surface_Sync( 54 void Canvas_Web_Surface_Sync(
47 const Canvas_Scene *p_scene); 57 const Canvas_Scene *p_scene);
48 void Canvas_Web_Surface_Draw( 58 void Canvas_Web_Surface_Draw(
49 const Canvas_Web_Surface *p_surface, 59 const Canvas_Web_Surface *p_surface,
50 const Canvas_Camera *p_camera, 60 const Canvas_Camera *p_camera,
51 const Canvas_Scene *p_scene); 61 const Canvas_Scene *p_scene);
62 void Canvas_Web_Surface_Draw_Entity(
63 const Canvas_Web_Surface *p_surface,
64 const Canvas_Camera *p_camera,
65 const Canvas_Scene *p_scene,
66 size_t entity_index);
67 const char *Canvas_Web_Surface_URL(
68 const Canvas_Web_Surface *p_surface,
69 uint32 entity_id);
70 boolean Canvas_Web_Surface_Can_Go_Back(
71 const Canvas_Web_Surface *p_surface,
72 uint32 entity_id);
73 boolean Canvas_Web_Surface_Can_Go_Forward(
74 const Canvas_Web_Surface *p_surface,
75 uint32 entity_id);
76 void Canvas_Web_Surface_Go_Back(
77 Canvas_Web_Surface *p_surface,
78 uint32 entity_id);
79 void Canvas_Web_Surface_Go_Forward(
80 Canvas_Web_Surface *p_surface,
81 uint32 entity_id);
52 boolean Canvas_Web_Surface_Is_Focused(const Canvas_Web_Surface *p_surface); 82 boolean Canvas_Web_Surface_Is_Focused(const Canvas_Web_Surface *p_surface);
53 void Canvas_Web_Surface_Shutdown(Canvas_Web_Surface *p_surface); 83 void Canvas_Web_Surface_Shutdown(Canvas_Web_Surface *p_surface);
54 84
55 #if defined(__cplusplus) 85 #if defined(__cplusplus)
56 } 86 }