Skip to content
Open
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
5 changes: 5 additions & 0 deletions pkg/ant.window/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ end
local function newproxy(t, k)
local ServiceWindow = ltask.queryservice "ant.window|window"

local function close()
ltask.send(ServiceWindow, "close")
end

local function reboot(initargs)
ltask.send(ServiceWindow, "reboot", initargs)
end
Expand All @@ -58,6 +62,7 @@ local function newproxy(t, k)
ltask.call(ServiceWindow, "set_fullscreen", fullscreen)
end

t.close = close
t.reboot = reboot
t.set_cursor = set_cursor
t.show_cursor = show_cursor
Expand Down
4 changes: 4 additions & 0 deletions pkg/ant.window/service/window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ function S.msg(messages)
end
end

function S.close()
window.close()
end

function S.set_cursor(cursor)
window.set_cursor(cursor)
end
Expand Down
1 change: 1 addition & 0 deletions pkg/ant.window/src/platform/windows/win32_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ void window_close() {
if (!G.ShowCursor) {
::ShowCursor(TRUE);
}
::SendMessage(G.hWnd, WM_SYSCOMMAND, SC_CLOSE, 1);
}

bool window_peek_message() {
Expand Down