forked from malisipi/mui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch Tinyfd, support multi-thread calls, add functions
* Patch Tinyfd again -> To fix zenity inputbox behavior (it behaves like passwordbox before fix) * Add multi-thread call support for webview * Add functions into window library for linux (will be added for Window asap)
- Loading branch information
Showing
6 changed files
with
44 additions
and
12 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module window | ||
|
||
fn C.gtk_widget_hide(win voidptr) | ||
fn C.gtk_widget_show(win voidptr) | ||
fn C.putenv(&char) int |
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,6 @@ | ||
module window | ||
|
||
fn C.FreeConsole() | ||
fn C.AllocConsole() | ||
fn C.GetConsoleWindow() voidptr | ||
fn C.ShowWindow(voidptr, bool) |
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 |
---|---|---|
@@ -1,15 +1,28 @@ | ||
module window | ||
|
||
fn C.FreeConsole() | ||
fn C.AllocConsole() | ||
fn C.GetConsoleWindow() voidptr | ||
fn C.ShowWindow(voidptr, bool) | ||
|
||
pub fn hide_console_window(){ | ||
pub fn hide_console(){ // only windows | ||
$if windows { | ||
C.FreeConsole() | ||
C.AllocConsole() | ||
hwnd:=C.GetConsoleWindow() | ||
C.ShowWindow(hwnd, false) | ||
} | ||
} | ||
} | ||
|
||
pub fn prefer_x11(){ // only linux (if display server is wayland, try to use x11 [xwayland]) | ||
$if linux { | ||
C.putenv(c"GDK_BACKEND=x11,wayland") | ||
} | ||
} | ||
|
||
pub fn hide(window voidptr){ | ||
$if linux { | ||
C.gtk_widget_hide(window) | ||
} | ||
} | ||
|
||
pub fn show(window voidptr){ | ||
$if linux { | ||
C.gtk_widget_show(window) | ||
} | ||
} |