diff infinite_canvas/web_surface.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
line wrap: on
line diff
--- a/infinite_canvas/web_surface.h	Mon Aug 17 22:22:36 2026 -0700
+++ b/infinite_canvas/web_surface.h	Tue Aug 18 19:14:53 2026 -0700
@@ -5,6 +5,13 @@
 
 #define CANVAS_MAX_WEB_VIEWS 12
 
+typedef enum {
+    CANVAS_DICTATION_EVENT_NONE = 0,
+    CANVAS_DICTATION_EVENT_STATUS,
+    CANVAS_DICTATION_EVENT_PARTIAL,
+    CANVAS_DICTATION_EVENT_FINAL,
+} Canvas_Dictation_Event;
+
 typedef struct {
     uint32 entity_id;
     Canvas_Entity_Type entity_type;
@@ -16,6 +23,12 @@
     size_t pixel_capacity;
     char source_url[CANVAS_ENTITY_TEXT_CAPACITY];
     char url[CANVAS_ENTITY_TEXT_CAPACITY];
+    char dictation_text[CANVAS_ENTITY_TEXT_CAPACITY];
+    uint32 dictation_sequence;
+    uint32 consumed_dictation_sequence;
+    int32 dictation_command;
+    Canvas_Dictation_Event dictation_event;
+    boolean is_dictation_transport;
     boolean can_go_back;
     boolean can_go_forward;
     boolean color_scheme_applied;
@@ -31,6 +44,7 @@
     void *p_native;
     Canvas_Web_View views[CANVAS_MAX_WEB_VIEWS];
     uint32 focused_entity_id;
+    int32 pending_dictation_command;
     boolean dark_mode;
     boolean initialized;
 } Canvas_Web_Surface;
@@ -79,6 +93,15 @@
 void Canvas_Web_Surface_Go_Forward(
     Canvas_Web_Surface *p_surface,
     uint32 entity_id);
+void Canvas_Web_Surface_Set_Dictation_Active(
+    Canvas_Web_Surface *p_surface,
+    boolean active);
+void Canvas_Web_Surface_Commit_Dictation(
+    Canvas_Web_Surface *p_surface);
+Canvas_Dictation_Event Canvas_Web_Surface_Consume_Dictation(
+    Canvas_Web_Surface *p_surface,
+    char *p_text,
+    size_t text_capacity);
 boolean Canvas_Web_Surface_Is_Focused(const Canvas_Web_Surface *p_surface);
 void Canvas_Web_Surface_Shutdown(Canvas_Web_Surface *p_surface);