Mercurial
comparison infinite_canvas/canvas.h @ 280:49e9e591c9bb
Add persistent dictation, prewarmed WebRTC speech input, Copilot SDK routing, animated conversation lifecycle controls, parking, and architecture coverage.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 18 Aug 2026 19:14:53 -0700 |
| parents | 8d560f50ed4c |
| children | c57149ad216e |
comparison
equal
deleted
inserted
replaced
| 279:b3b547563ec7 | 280:49e9e591c9bb |
|---|---|
| 29 CANVAS_ENTITY_TABLE, | 29 CANVAS_ENTITY_TABLE, |
| 30 CANVAS_ENTITY_NOTIFICATION, | 30 CANVAS_ENTITY_NOTIFICATION, |
| 31 CANVAS_ENTITY_SCROLL_AREA, | 31 CANVAS_ENTITY_SCROLL_AREA, |
| 32 CANVAS_ENTITY_IMAGE, | 32 CANVAS_ENTITY_IMAGE, |
| 33 CANVAS_ENTITY_WEB_CONTENT, | 33 CANVAS_ENTITY_WEB_CONTENT, |
| 34 CANVAS_ENTITY_CONVERSATION, | |
| 34 CANVAS_ENTITY_LUCIDE_GALLERY, | 35 CANVAS_ENTITY_LUCIDE_GALLERY, |
| 35 CANVAS_ENTITY_TYPE_COUNT, | 36 CANVAS_ENTITY_TYPE_COUNT, |
| 36 } Canvas_Entity_Type; | 37 } Canvas_Entity_Type; |
| 37 | 38 |
| 38 typedef struct { | 39 typedef struct { |
| 39 uint32 id; | 40 uint32 id; |
| 40 Canvas_Entity_Type type; | 41 Canvas_Entity_Type type; |
| 41 Vector2 position; | 42 Vector2 position; |
| 42 Vector2 size; | 43 Vector2 size; |
| 43 Color color; | 44 Color color; |
| 45 char label[128]; | |
| 44 char text[CANVAS_ENTITY_TEXT_CAPACITY]; | 46 char text[CANVAS_ENTITY_TEXT_CAPACITY]; |
| 45 int32 value; | 47 int32 value; |
| 46 int32 text_cursor; | 48 int32 text_cursor; |
| 47 int32 text_selection_anchor; | 49 int32 text_selection_anchor; |
| 48 float text_scroll_y; | 50 float text_scroll_y; |
| 49 float visibility_amount; | 51 float visibility_amount; |
| 50 boolean active; | 52 boolean active; |
| 51 boolean pinned; | 53 boolean pinned; |
| 52 boolean removing; | 54 boolean removing; |
| 55 boolean agent_working; | |
| 56 boolean text_muted; | |
| 57 boolean parked; | |
| 53 boolean screen_space_initialized; | 58 boolean screen_space_initialized; |
| 54 float hover_amount; | 59 float hover_amount; |
| 55 float animation_amount; | 60 float animation_amount; |
| 56 float web_chrome_amount; | 61 float web_chrome_amount; |
| 57 Vector2 pinned_screen_position; | 62 Vector2 pinned_screen_position; |
| 58 Vector2 pinned_screen_size; | 63 Vector2 pinned_screen_size; |
| 64 Vector2 parked_restore_position; | |
| 59 } Canvas_Entity; | 65 } Canvas_Entity; |
| 60 | 66 |
| 61 typedef struct { | 67 typedef struct { |
| 62 Vector2 target; | 68 Vector2 target; |
| 63 float zoom; | 69 float zoom; |
| 131 const char *p_current_url); | 137 const char *p_current_url); |
| 132 boolean Canvas_Web_Chrome_Is_Editing(const Canvas_Scene *p_scene); | 138 boolean Canvas_Web_Chrome_Is_Editing(const Canvas_Scene *p_scene); |
| 133 | 139 |
| 134 void Canvas_Scene_Init(Canvas_Scene *p_scene, Dowa_Arena *p_arena); | 140 void Canvas_Scene_Init(Canvas_Scene *p_scene, Dowa_Arena *p_arena); |
| 135 boolean Canvas_Scene_Add(Canvas_Scene *p_scene, Canvas_Entity_Type type, Vector2 position); | 141 boolean Canvas_Scene_Add(Canvas_Scene *p_scene, Canvas_Entity_Type type, Vector2 position); |
| 142 void Canvas_Text_Area_Set_Content( | |
| 143 Canvas_Entity *p_entity, | |
| 144 Font font, | |
| 145 const char *p_text, | |
| 146 boolean muted); | |
| 147 uint32 Canvas_Scene_Add_Conversation( | |
| 148 Canvas_Scene *p_scene, | |
| 149 const char *p_title, | |
| 150 const char *p_prompt, | |
| 151 const char *p_response, | |
| 152 Vector2 position); | |
| 153 boolean Canvas_Scene_Append_Conversation( | |
| 154 Canvas_Scene *p_scene, | |
| 155 uint32 entity_id, | |
| 156 const char *p_prompt, | |
| 157 const char *p_response); | |
| 158 void Canvas_Conversation_Scroll_To_End( | |
| 159 Canvas_Entity *p_entity, | |
| 160 Font font); | |
| 161 void Canvas_Conversation_Set_Collapsed( | |
| 162 Canvas_Entity *p_entity, | |
| 163 boolean collapsed); | |
| 164 size_t Canvas_Scene_Parked_Conversation_Count( | |
| 165 const Canvas_Scene *p_scene); | |
| 166 boolean Canvas_Scene_Set_Conversation_Parked( | |
| 167 Canvas_Scene *p_scene, | |
| 168 uint32 entity_id, | |
| 169 boolean parked); | |
| 170 boolean Canvas_Scene_Show_Parking_Lot( | |
| 171 Canvas_Scene *p_scene, | |
| 172 Canvas_Camera *p_camera); | |
| 136 void Canvas_Scene_Clear(Canvas_Scene *p_scene); | 173 void Canvas_Scene_Clear(Canvas_Scene *p_scene); |
| 137 void Canvas_Scene_Fade_Out_All(Canvas_Scene *p_scene); | 174 void Canvas_Scene_Fade_Out_All(Canvas_Scene *p_scene); |
| 138 void Canvas_Scene_Fade_Out_Selected(Canvas_Scene *p_scene); | 175 void Canvas_Scene_Fade_Out_Selected(Canvas_Scene *p_scene); |
| 139 void Canvas_Scene_Add_Demo(Canvas_Scene *p_scene); | 176 void Canvas_Scene_Add_Demo(Canvas_Scene *p_scene); |
| 140 void Canvas_Scene_Add_Browser_Grid(Canvas_Scene *p_scene); | 177 void Canvas_Scene_Add_Browser_Grid(Canvas_Scene *p_scene); |