Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,6 @@ Add the following to your ProGuard rules file:
## Quick Start (minimal)

```kotlin
@OptIn(ExperimentalTrayAppApi::class)
application {
val trayAppState = rememberTrayAppState(
initialWindowSize = DpSize(300.dp, 420.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import composenativetray.demo.generated.resources.Res
import composenativetray.demo.generated.resources.icon
import dev.nucleusframework.application.SingleInstanceRestoreEffect
import dev.nucleusframework.application.nucleusApplication
import dev.nucleusframework.composenativetray.tray.api.ExperimentalTrayAppApi
import dev.nucleusframework.composenativetray.tray.api.TrayApp
import dev.nucleusframework.composenativetray.tray.api.TrayWindowDismissMode
import dev.nucleusframework.composenativetray.tray.api.rememberTrayAppState
Expand All @@ -30,7 +29,6 @@ import dev.nucleusframework.window.material.MaterialTitleBar
import kotlinx.coroutines.launch
import org.jetbrains.compose.resources.painterResource

@OptIn(ExperimentalTrayAppApi::class)
fun main() {
allowComposeNativeTrayLogging = true
nucleusApplication(dockIconFollowsWindows = true) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@file:OptIn(
ExperimentalTrayAppApi::class,
ExperimentalTransitionApi::class,
InternalAnimationApi::class,
)
Expand Down Expand Up @@ -51,6 +50,7 @@ import dev.nucleusframework.composenativetray.utils.MenuContentHash
import dev.nucleusframework.composenativetray.utils.PersistentAnimatedVisibility
import dev.nucleusframework.composenativetray.utils.TrayScreenGeometry
import dev.nucleusframework.composenativetray.utils.debugln
import dev.nucleusframework.composenativetray.utils.errorln
import dev.nucleusframework.composenativetray.utils.getTrayWindowPosition
import dev.nucleusframework.composenativetray.utils.getTrayWindowPositionForInstance
import dev.nucleusframework.composenativetray.utils.isMenuBarInDarkMode
Expand Down Expand Up @@ -123,7 +123,6 @@ private val defaultVerticalOffset =

// --------------------- Public API (overloads) ---------------------

@ExperimentalTrayAppApi
@Composable
fun NucleusApplicationScope.TrayApp(
icon: ImageVector,
Expand Down Expand Up @@ -179,7 +178,6 @@ fun NucleusApplicationScope.TrayApp(
)
}

@ExperimentalTrayAppApi
@Composable
fun NucleusApplicationScope.TrayApp(
icon: Painter,
Expand Down Expand Up @@ -227,7 +225,6 @@ fun NucleusApplicationScope.TrayApp(
}

/** Painter on Windows, ImageVector on macOS/Linux */
@ExperimentalTrayAppApi
@Composable
fun NucleusApplicationScope.TrayApp(
windowsIcon: Painter,
Expand Down Expand Up @@ -297,7 +294,6 @@ fun NucleusApplicationScope.TrayApp(
}
}

@ExperimentalTrayAppApi
@Composable
fun NucleusApplicationScope.TrayApp(
icon: DrawableResource,
Expand Down Expand Up @@ -341,7 +337,6 @@ fun NucleusApplicationScope.TrayApp(
)
}

@ExperimentalTrayAppApi
@Composable
fun NucleusApplicationScope.TrayApp(
windowsIcon: DrawableResource,
Expand Down Expand Up @@ -414,17 +409,16 @@ fun NucleusApplicationScope.TrayApp(
// --------------------- Core implementation (Tao backend only) ---------------------

/**
* Tray icon + anchored popup. Runs exclusively on the Nucleus Tao backend
* call it inside `nucleusApplication(backend = NucleusBackend.Tao)` (or
* `Auto` with `decorated-window-tao` on the classpath).
* Tray icon + anchored popup. Runs exclusively on the Nucleus Tao backend,
* which the `Auto` backend selects automatically once the
* `decorated-window-tao` module is on the classpath.
*
* On Windows + macOS the popup body is hosted in a standalone per-pixel
* transparent, non-activating native panel — no backing window exists anywhere
* (nothing in the taskbar/Dock, Alt-Tab or the Start task view). On Linux the
* popup is a regular undecorated Tao window (opaque): no cross-WM transparency
* equivalent exists.
*/
@ExperimentalTrayAppApi
@Composable
fun NucleusApplicationScope.TrayApp(
iconContent: @Composable () -> Unit,
Expand All @@ -446,10 +440,13 @@ fun NucleusApplicationScope.TrayApp(
menu: (TrayMenuBuilder.() -> Unit)? = null,
content: @Composable () -> Unit,
) {
require(backend == NucleusBackend.Tao) {
"TrayApp requires the Tao window backend. Launch with " +
"nucleusApplication(backend = NucleusBackend.Tao) and ship the " +
"nucleus.decorated-window-tao module."
if (backend != NucleusBackend.Tao) {
errorln {
"TrayApp requires the Tao window backend. Launch with " +
"nucleusApplication() and ship the " +
"nucleus.decorated-window-tao module."
}
return
}

// Linux gates on runtime availability: the panel is a raw X11 window,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import kotlinx.coroutines.flow.asStateFlow
* State holder for TrayApp that provides programmatic control over the tray window
* and observability of its state changes, including window dismiss behavior.
*/
@ExperimentalTrayAppApi
class TrayAppState(
initialWindowSize: DpSize = DpSize(300.dp, 200.dp),
initiallyVisible: Boolean = false,
Expand Down Expand Up @@ -87,7 +86,6 @@ class TrayAppState(
}

/** Creates and remembers a TrayAppState instance */
@ExperimentalTrayAppApi
@Composable
fun rememberTrayAppState(
initialWindowSize: DpSize = DpSize(300.dp, 200.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package dev.nucleusframework.composenativetray.tray.api
/**
* Defines how the tray window should be dismissed (hidden)
*/
@ExperimentalTrayAppApi
enum class TrayWindowDismissMode {
/**
* The window automatically hides when it loses focus or when clicking outside.
Expand Down
Loading