summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/context
diff options
context:
space:
mode:
Diffstat (limited to 'packages/app/src/context')
-rw-r--r--packages/app/src/context/platform.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/app/src/context/platform.tsx b/packages/app/src/context/platform.tsx
index 3fca502ba..7aa6c6554 100644
--- a/packages/app/src/context/platform.tsx
+++ b/packages/app/src/context/platform.tsx
@@ -57,6 +57,12 @@ export type Platform = {
/** Set the default server URL to use on app startup (platform-specific) */
setDefaultServerUrl?(url: string | null): Promise<void> | void
+ /** Get the preferred display backend (desktop only) */
+ getDisplayBackend?(): Promise<DisplayBackend | null> | DisplayBackend | null
+
+ /** Set the preferred display backend (desktop only) */
+ setDisplayBackend?(backend: DisplayBackend): Promise<void>
+
/** Parse markdown to HTML using native parser (desktop only, returns unprocessed code blocks) */
parseMarkdown?(markdown: string): Promise<string>
@@ -70,6 +76,8 @@ export type Platform = {
readClipboardImage?(): Promise<File | null>
}
+export type DisplayBackend = "auto" | "wayland"
+
export const { use: usePlatform, provider: PlatformProvider } = createSimpleContext({
name: "Platform",
init: (props: { value: Platform }) => {