.TH "app_main.h" 3 "Bark" \" -*- nroff -*- .ad l .nh .SH NAME app_main.h \- Single-header isomorphic native + WebAssembly application harness\&. .SH SYNOPSIS .br .PP .SS "Classes" .in +1c .ti -1c .RI "struct \fBbark_app_ctx\fP" .br .RI "Runtime context passed to all Bark application callbacks\&. " .ti -1c .RI "struct \fBbark_app_hooks\fP" .br .RI "Application lifecycle hooks supplied to \fBBARK_APP_DEFINE()\fP\&. " .in -1c .SS "Macros" .in +1c .ti -1c .RI "#define \fBBARK_APP_DEFINE\fP(HOOKS_SYM)" .br .RI "Generate isomorphic native and WebAssembly entrypoints for a Bark app\&. " .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef struct \fBbark_app_ctx\fP \fBbark_app_ctx_t\fP" .br .RI "Runtime context passed to all Bark application callbacks\&. " .ti -1c .RI "typedef struct \fBbark_app_hooks\fP \fBbark_app_hooks_t\fP" .br .RI "Application lifecycle hooks supplied to \fBBARK_APP_DEFINE()\fP\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBbark_app_ctx_t\fP * \fBbark_app_current\fP (void)" .br .RI "Return the active Bark application context (or NULL before init)\&. " .ti -1c .RI "int \fBbark_app_upgrade\fP (\fBbark_app_ctx_t\fP *ctx, const char *bearer_token)" .br .RI "Request a live session upgrade using an authenticated user token\&. " .ti -1c .RI "void \fBbark_app_logout\fP (\fBbark_app_ctx_t\fP *ctx)" .br .RI "Clear active user credentials and revert to guest/logged-out state\&. " .ti -1c .RI "const void * \fBbark_app_get_slice\fP (uint32_t iface_id, uint32_t abi_ver)" .br .RI "Resolve an entitled runtime library slice interface (native only; NULL on web)\&. " .in -1c .SH "Detailed Description" .PP Single-header isomorphic native + WebAssembly application harness\&. Define your application lifecycle callbacks in a \fR\fBbark_app_hooks_t\fP\fP struct and invoke \fR\fBBARK_APP_DEFINE(my_hooks)\fP\fP once in your entry translation unit\&. The same C code compiles untouched into both a protected native desktop package and a protected browser WebAssembly package\&. .SH "Macro Definition Documentation" .PP .SS "#define BARK_APP_DEFINE( HOOKS_SYM)" .PP Generate isomorphic native and WebAssembly entrypoints for a Bark app\&. .PP \fBParameters\fP .RS 4 \fIHOOKS_SYM\fP Static \fBbark_app_hooks_t\fP instance defining application callbacks\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Bark from the source code\&.