author | francesco-ST <francesco.abbate@st.com> | 2010年09月23日 18:18:07 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年09月23日 18:18:07 +0200 |
commit | 16800ab30b0f9c2ef352fa0509ddfd6091917270 (patch) | |
tree | 2f1dbdb78c7d9c0041c532a984e6986cea89cdb4 /agg-plot/window.cpp | |
parent | e82a04315810be635ccb66840fab5de8a5138556 (diff) | |
download | gsl-shell-16800ab30b0f9c2ef352fa0509ddfd6091917270.tar.gz |
-rw-r--r-- | agg-plot/window.cpp | 12 |
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) { |