Top Description Inners Constructors Methods
org.lwjgl.glfw

public Class GLFWNativeWin32

extends Object
Class Inheritance
Imports
javax.annotation.*, org.lwjgl.system.*

Native bindings to the GLFW library's Win32 native access functions.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
GLFWNativeWin32.Functions

Contains the function pointers loaded from GLFW.getLibrary().

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long

Returns:

the handle of the created window, or NULL if an error occurred
glfwAttachWin32Window
(long
the HWND to attach to the window object
handle
,
long
the window whose context to share resources with, or NULL to not share resources
share
)

Wraps an existing HWND in a new GLFW window object.

public static String

Returns:

the UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`) of the specified monitor, or NULL if an error occurred.

Possible errors include NOT_INITIALIZED.

glfwGetWin32Adapter
(long
the GLFW monitor
monitor
)

Returns the adapter device name of the specified monitor.

public static String

Returns:

the UTF-8 encoded display device name (for example `\\.\DISPLAY1\Monitor0`) of the specified monitor, or NULL if an error occurred.

Possible errors include NOT_INITIALIZED.

glfwGetWin32Monitor
(long
the GLFW monitor
monitor
)

Returns the display device name of the specified monitor.

public static long

Returns:

the HWND of the specified window, or NULL if an error occurred.

Possible errors include NOT_INITIALIZED.

glfwGetWin32Window
(long
the GLFW window
window
)

Returns the HWND of the specified window.

public static long
nglfwGetWin32Adapter(long monitor)

Unsafe version of: GetWin32Adapter

public static long
nglfwGetWin32Monitor(long monitor)

Unsafe version of: GetWin32Monitor

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

GLFWNativeWin32back to summary
protected GLFWNativeWin32()

Method Detail

glfwAttachWin32Windowback to summary
public static long glfwAttachWin32Window(long handle, long share)

Wraps an existing HWND in a new GLFW window object.

This function creates a GLFW window object and its associated OpenGL or OpenGL ES context for an existing HWND. The HWND is not destroyed by GLFW.

This function may be called from any thread.

LWJGL: This functionality is experimental and not officially supported by GLFW yet.

Parameters
handle:long

the HWND to attach to the window object

share:long

the window whose context to share resources with, or NULL to not share resources

Returns:long

the handle of the created window, or NULL if an error occurred

Annotations
@NativeType:GLFWwindow *
Since
version 3.3
glfwGetWin32Adapterback to summary
public static String glfwGetWin32Adapter(long monitor)

Returns the adapter device name of the specified monitor.

Note

This function may be called from any thread. Access is not synchronized.

Parameters
monitor:long

the GLFW monitor

Returns:String

the UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`) of the specified monitor, or NULL if an error occurred.

Possible errors include NOT_INITIALIZED.

Annotations
@Nullable
@NativeType:char const *
Since
version 3.1
glfwGetWin32Monitorback to summary
public static String glfwGetWin32Monitor(long monitor)

Returns the display device name of the specified monitor.

Note

This function may be called from any thread. Access is not synchronized.

Parameters
monitor:long

the GLFW monitor

Returns:String

the UTF-8 encoded display device name (for example `\\.\DISPLAY1\Monitor0`) of the specified monitor, or NULL if an error occurred.

Possible errors include NOT_INITIALIZED.

Annotations
@Nullable
@NativeType:char const *
Since
version 3.1
glfwGetWin32Windowback to summary
public static long glfwGetWin32Window(long window)

Returns the HWND of the specified window.

The HDC associated with the window can be queried with the GetDC function. HDC dc = GetDC(glfwGetWin32Window(window)); This DC is private and does not need to be released.

Note

This function may be called from any thread. Access is not synchronized.

Parameters
window:long

the GLFW window

Returns:long

the HWND of the specified window, or NULL if an error occurred.

Possible errors include NOT_INITIALIZED.

Annotations
@NativeType:HWND
Since
version 3.0
nglfwGetWin32Adapterback to summary
public static long nglfwGetWin32Adapter(long monitor)

Unsafe version of: GetWin32Adapter

nglfwGetWin32Monitorback to summary
public static long nglfwGetWin32Monitor(long monitor)

Unsafe version of: GetWin32Monitor

org.lwjgl.glfw back to summary

public final Class GLFWNativeWin32.Functions

extends Object
Class Inheritance

Contains the function pointers loaded from GLFW.getLibrary().

Field Summary

Modifier and TypeField and Description
public static final long
AttachWin32Window

Function address.

public static final long
GetWin32Adapter

Function address.

public static final long
GetWin32Monitor

Function address.

public static final long
GetWin32Window

Function address.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AttachWin32Windowback to summary
public static final long AttachWin32Window

Function address.

GetWin32Adapterback to summary
public static final long GetWin32Adapter

Function address.

GetWin32Monitorback to summary
public static final long GetWin32Monitor

Function address.

GetWin32Windowback to summary
public static final long GetWin32Window

Function address.

Constructor Detail

Functionsback to summary
private Functions()