gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot/window.cpp')
-rw-r--r--agg-plot/window.cpp 12
1 files changed, 12 insertions, 0 deletions
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp
index 54abe5c7..d51c5ed4 100644
--- a/agg-plot/window.cpp
+++ b/agg-plot/window.cpp
@@ -32,6 +32,7 @@ static const struct luaL_Reg window_methods[] = {
{"attach", window_attach },
{"split", window_split },
{"update", window_update },
+ {"close", window_close },
{"__gc", window_free },
{NULL, NULL}
};
@@ -505,6 +506,17 @@ window_restore_slot_image (lua_State *L)
return window_generic_oper (L, &window::restore_slot_image);
}
+int
+window_close (lua_State *L)
+{
+ window *win = object_check<window>(L, 1, GS_WINDOW);
+ win->lock();
+ if (win->status == canvas_window::running)
+ win->close_request();
+ win->unlock();
+ return 0;
+}
+
void
window_register (lua_State *L)
{
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月15日 16:42:18 +0000

AltStyle によって変換されたページ (->オリジナル) /