Header Extension Block
About 844 words
- Type ID:
1 - Type: Map
- Optional
Header Extension is the file's "table of contents": it registers which display areas (Device) and which usage scenarios (Workspace) the file contains, and Canvas references them by GUID. A simple file with only one screen and one scenario may omit it.
Levels
- Core: read the registries; create implicit singletons when a registry is missing; list Workspaces in registration order.
- Standard: recognize
workspaceType(screen annotation, whiteboard, PPT),hostIdandcurrentPageIndex. - Full: compositing of multiple Devices and nested Workspaces.
Fields
| Field | Type | Requirement | Level | Description |
|---|---|---|---|---|
type | uint16 | Required | Core | Always 1 |
name | string | Optional | — | Display name of the file |
explanation | string | Optional | — | Description of the file |
devices | Array<Map> | Optional | Core | Device registry, see Device |
workspaces | Array<Map> | Optional | Core | Workspace registry, see below |
extra | Map | Optional | — | App-private fields |
Workspace registry entries
| Field | Type | Requirement | Level | Description |
|---|---|---|---|---|
guid | string(36) | Required | Core | Permanent UUID of the Workspace |
workspaceType | int32 | Required | Standard | Scenario type, see the table below |
name | string | Optional | — | Display name |
parentWorkspaceGuid | string(36) | Optional | Full | UUID of the parent Workspace |
hostId | string | Optional | Standard | Stable identifier of the host (for example, a presentation) |
currentPageIndex | uint32 | Optional | Standard | Page being shown at save time; defaults to 0 |
extra | Map | Optional | — | App-private fields |
workspaceType | Scenario | Description |
|---|---|---|
0 | Screen Annotation | Screen annotation |
1 | Whiteboard | Whiteboard |
2 | Presentation | PPT / presentation |
3–127 | Reserved | Reserved for future versions |
128+ | Private | App-defined |
Rules
Position
- HEXT-1 There is at most one Header Extension. When present, it must immediately follow the Header and may only be followed by the first Canvas or the end of the file.
Registries and implicit singletons
- HEXT-2
guidvalues indevicesand inworkspacesmust not repeat within their own registry. - HEXT-3 Readers create an implicit singleton for each missing or empty registry; when the whole Header Extension is missing, they create one for each of the two registries. The implicit Device is the entire display area of the current render target; the implicit Workspace is a screen annotation with
workspaceType = 0. - HEXT-4 An implicit singleton has no GUID, and Canvas omits the corresponding
deviceGuidorworkspaceGuid. Readers must not generate a UUID for it and write it back to the file. - HEXT-5 Once a registry contains explicit entries, Canvas must write the corresponding GUID, and the GUID must be found in the registry. Explicit entries and the implicit singleton must not be mixed within one registry; one registry being explicit and the other implicit is allowed.
- HEXT-6 When an implicit singleton is used, the corresponding
deviceNumorworkspaceNumin the Header is1.
Scenario recognition
- HEXT-7 A whiteboard is represented only by
workspaceType = 1, and PPT only byworkspaceType = 2; no additional private marker is needed. PPT bound bypageIndexstill usesworkspaceType = 2; the binding method is written in the Canvasbinding. - HEXT-8 For a PPT Workspace, it is recommended to write a stable identifier into the presentation (for example
Presentation.Tags) and store the same value inhostId, to confirm that the opened presentation is the same one. - HEXT-9 Each explicit Workspace should have at least one Canvas; a Canvas with no content represents a created blank first page.
- HEXT-10
currentPageIndexis interpreted against the page order the reader has arranged (including renumbering after page append, SAVE-14). It sits at the start of the file and is updated only on a full save, so during page append it may lag behind. When it is missing or points to a page that does not exist, readers show page 0 and report a warning.
Nesting (Full)
- HEXT-11 A child Workspace follows the display and lifecycle of its parent Workspace and is composited on top of it.
- HEXT-12 Parent and child Workspaces are not required to reference the same Device or Devices that are in a parent-child relationship.
Error tolerance
- HEXT-13 When a registry contains duplicate UUIDs, corrupt entries or parent-reference cycles, readers report a warning and repair them only for the current load (FILE-22); they must not write the repairs back to the source file.
- HEXT-14 If a Workspace has an unknown
workspaceType, readers load the Workspace as an ordinary whiteboard, keep the Canvas and content, and do not perform host binding (FILE-20).
Example
{
"type": 1,
"name": "Physics class",
"devices": [
{ "guid": "11111111-1111-4111-8111-111111111111", "deviceType": 0,
"x": 0, "y": 0, "width": 3840, "height": 2160 }
],
"workspaces": [
{ "guid": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa", "workspaceType": 2,
"name": "Chapter 3: Force", "hostId": "INKEYS-PPT-7B58E2A1", "currentPageIndex": 3 },
{ "guid": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb", "workspaceType": 1,
"name": "Whiteboard opened during the presentation",
"parentWorkspaceGuid": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa" }
]
}Fallback
| Capability the reader lacks | How it is shown |
|---|---|
workspaceType, hostId (Core, Basic) | All Workspaces are shown as ordinary page sequences |
| Nested Workspaces (below Full) | Child Workspaces are treated as independent page sequences, listed in registration order |