-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 The jna window interface requires active 32 and 64 bit compatibility
- Loading branch information
1 parent
5136e35
commit e248290
Showing
5 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
composeApp/src/commonMain/kotlin/com/clipevery/utils/ToolUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.clipevery.utils | ||
|
||
class OnceFunction<T>(private val function: () -> T) { | ||
private var hasRun = false | ||
private var result: T? = null | ||
|
||
fun run(): T { | ||
if (!hasRun) { | ||
result = function() | ||
hasRun = true | ||
} | ||
return result!! | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
composeApp/src/desktopMain/kotlin/com/clipevery/platform/CurrentPlatform.desktop.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters