1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-07 19:13:20 +00:00

Added 'close' to win-message-pump

This commit is contained in:
Bryan Roe
2019-10-02 14:29:53 -07:00
parent be2f08aac7
commit 357fca53ca
2 changed files with 9 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ limitations under the License.
var WH_CALLWNDPROC = 4;
var WM_QUIT = 0x0012;
var WM_CLOSE = 0x0010;
var GM = require('_GenericMarshal');
function WindowsMessagePump(options)
@@ -173,6 +173,13 @@ function WindowsMessagePump(options)
this._user32.PostMessageA(this._hwnd, WM_QUIT, 0, 0);
}
};
this.close = function close()
{
if (this._hwnd)
{
this._user32.PostMessageA(this._hwnd, WM_CLOSE, 0, 0);
}
};
}
module.exports = WindowsMessagePump;