-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_darwin.c.v
46 lines (34 loc) · 875 Bytes
/
ui_darwin.c.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2020-2022 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by a GPL license
// that can be found in the LICENSE file.
module ui
#include "@VROOT/ui_darwin.m"
fn C.vui_message_box(s string)
fn C.vui_notify(title string, msg string)
fn C.vui_wait_events()
fn C.vui_bundle_path() string
fn C.vui_take_screenshot(string)
fn C.vui_screenshot(voidptr, string)
// fn C.darwin_draw_string(s string)
pub fn message_box(s string) {
C.vui_message_box(s)
}
pub fn notify(title string, msg string) {
C.vui_notify(title, msg)
}
/*
pub fn text_width(s string) int {
return 0
}
*/
pub fn bundle_path() string {
return C.vui_bundle_path()
}
pub fn wait_events() {
C.vui_wait_events()
}
// pub fn take_snapshot(s string) {
// win := sapp.macos_get_window()
// // C.vui_take_screenshot( s)
// C.vui_screenshot(win, s)
// }