Comparing version 5.1.0 to 5.2.0
@@ -141,2 +141,9 @@ import { EventEmitter } from 'events'; | ||
title: string; | ||
/** | ||
* This callback is called right before the window creation. | ||
* | ||
* `window` - a reference to the Window object (`this`). | ||
* `glfw` - is a reference to GLFW module, just in case if needed. | ||
*/ | ||
onBeforeWindow: (window: Window, glfw: unknown) => void; | ||
}>>; | ||
@@ -143,0 +150,0 @@ |
@@ -36,2 +36,3 @@ 'use strict'; | ||
this._onBeforeWindow = opts.onBeforeWindow; | ||
this._display = opts.display; | ||
@@ -495,2 +496,7 @@ this._monitors = glfw.getMonitors(); | ||
glfw.windowHint(glfw.DECORATED, this._decorated ? glfw.TRUE : glfw.FALSE); | ||
if (this._onBeforeWindow) { | ||
this._onBeforeWindow(this, glfw); | ||
} | ||
this._window = glfw.createWindow( | ||
@@ -508,2 +514,6 @@ this._width, | ||
if (this._onBeforeWindow) { | ||
this._onBeforeWindow(this, glfw); | ||
} | ||
this._window = glfw.createWindow( | ||
@@ -518,2 +528,6 @@ this._width, | ||
if (this._onBeforeWindow) { | ||
this._onBeforeWindow(this, glfw); | ||
} | ||
this._window = glfw.createWindow( | ||
@@ -520,0 +534,0 @@ this._width, |
{ | ||
"author": "Luis Blanco <luisblanco1337@gmail.com>", | ||
"name": "glfw-raub", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "GLFW for Node.js", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
59905
1638