Skip to content

Themes ​

Inspect themes, preview a prepared theme and commit or revert it through Host appearance ownership. Preview is a temporary visible effect, not merely a query.

Contract: nexa.themes/100. API index.

Typical sequence ​

Prepare the selected theme, preview the returned plan if desired, then commit it or revert the preview registration. Edit theme options using the current revision.

Behavior and limits ​

A failed candidate should not erase the last valid appearance. Resource and migration routes remain unmapped where listed; Theme.ReleaseResource must not be used as a generic blob-release mechanism.

The recorded Host maps 15 of 15 operations in this group. A mapping is subject to permission, phase, scope, platform and business preconditions. Host snapshot identifies the source revision; negotiate against the actual installed Host.

Operations ​

List · Read · Prepare · Preview · Commit · Revert · ReadOptions · SaveOptions · ResetOptions · ImportOptions · ExportOptions · MigrateOptions · ListResources · ReadResource · ReleaseResource

List ​

PageRequest → Page<ThemeSummary> (wrapper, item)

PropertyContract
Local SDK method ID1
KindQuery
Permissionnexa.themes.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
Cursorstring?Opaque continuation or observation cursor. Reuse only in the issuing query/scope; absence and invalidity are different. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
LimitlongRequested bound on returned items. The Host may impose a smaller domain-specific limit.

Successful result

Read Items and continue with NextCursor while preserving the original query. An absent cursor ends the sequence; an invalid cursor is an error.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_List(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_List_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Read ​

EntityRequest → ThemeSummary

PropertyContract
Local SDK method ID2
KindQuery
Permissionnexa.themes.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_Read(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_Read_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Prepare ​

EntityRequest → ThemePreparation

PropertyContract
Local SDK method ID3
KindQuery
Permissionnexa.themes.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_Prepare(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_Prepare_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Preview ​

PlanRequest → RegistrationRef

PropertyContract
Local SDK method ID4
KindMutation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Returns a registration for the temporary preview. Retain it for Revert; the preview itself does not mean the theme is durably selected.

Request fields

FieldTypeMeaning
PlanEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.
ConfirmationTokenstring?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Retain the registration identity for the permitted update/release operation. Staged registrations become visible only at group activation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_Preview(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_Preview_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Commit ​

PlanRequest → OperationRef

PropertyContract
Local SDK method ID5
KindOperation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
PlanEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.
ConfirmationTokenstring?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_Commit(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_Commit_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Revert ​

RegistrationRequest → Empty

PropertyContract
Local SDK method ID6
KindMutation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
RegistrationRegistrationRefStructured RegistrationRef value; follow its linked field contract.

Successful result

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_Revert(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_Revert_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ReadOptions ​

EntityRequest → ThemeOptions

PropertyContract
Local SDK method ID7
KindQuery
Permissionnexa.themes.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_ReadOptions(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_ReadOptions_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

SaveOptions ​

ThemeOptionChange → ThemeOptions

PropertyContract
Local SDK method ID8
KindMutation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
OptionsThemeOptionsStructured ThemeOptions value; follow its linked field contract.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_SaveOptions(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_SaveOptions_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ResetOptions ​

EntityRequest → ThemeOptions

PropertyContract
Local SDK method ID9
KindMutation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_ResetOptions(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_ResetOptions_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ImportOptions ​

ThemeTransfer → OperationRef

PropertyContract
Local SDK method ID10
KindOperation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
ThemeEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
FileFileRefStructured FileRef value; follow its linked field contract.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_ImportOptions(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_ImportOptions_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ExportOptions ​

ThemeTransfer → OperationRef

PropertyContract
Local SDK method ID11
KindOperation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
ThemeEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
FileFileRefStructured FileRef value; follow its linked field contract.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_ExportOptions(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_ExportOptions_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

MigrateOptions ​

ThemeOptionChange → OperationRef

PropertyContract
Local SDK method ID12
KindOperation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Validate and persist the supplied typed option values against the current theme manifest’s options schema and version. The operation uses the same owner revision and renderer-effect path as SaveOptions; it does not translate legacy configuration key names. Unknown or incompatible options are rejected and missing options retain compatible existing values/defaults. A successful Tasks result contains current ThemeOptions.

Request fields

FieldTypeMeaning
OptionsThemeOptionsStructured ThemeOptions value; follow its linked field contract.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_MigrateOptions(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_MigrateOptions_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ListResources ​

EntityRequest → Page<ThemeResource> (wrapper, item)

PropertyContract
Local SDK method ID13
KindQuery
Permissionnexa.themes.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Copy resources explicitly declared as asset(...) in the current theme appearance. User-granted external files are not delegated to plugins. The owner verifies the source revision, containment and resource format, with limits of 128 resources, 16 MiB per item and 32 MiB total. Returned ThemeResource values and blobs belong to the calling load.

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Read Items and continue with NextCursor while preserving the original query. An absent cursor ends the sequence; an invalid cursor is an error.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_ListResources(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_ListResources_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ReadResource ​

ThemeResource → BlobRef

PropertyContract
Local SDK method ID14
KindQuery
Permissionnexa.themes.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Resolve an exact ThemeResource returned by ListResources to its owned BlobRef. A forged resource, another caller’s blob or a released resource is rejected. The returned bytes are an immutable copy, independent of a later theme reload.

Request fields

FieldTypeMeaning
ThemeEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
NamestringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
DataBlobRefStructured BlobRef value; follow its linked field contract.

Successful result

The Host retains bytes under an opaque, owned blob handle. It is not the bytes themselves and is not portable across loads.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_ReadResource(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_ReadResource_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ReleaseResource ​

BlobRef → Empty

PropertyContract
Local SDK method ID15
KindMutation
Permissionnexa.themes.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Release an owned theme blob and zero its retained bytes. Release is explicit and single-use; reads after release fail. Plugin retirement also releases retained application blobs.

Request fields

FieldTypeMeaning
TokenGuidOpaque Host-issued handle token. Keep it with its owner and resource type.
LoadInstanceIdGuidIdentity of the admitted load that owns this handle; it is not portable to a replacement load.
SizelongDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
Sha256stringDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.

Successful result

There is no result payload beyond the encoded Empty model. Check Success; an empty failure value is not successful completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Themes_ReleaseResource(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Themes_ReleaseResource_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.


Source: NexaCL-Plugin-SDK · Apache-2.0.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.