aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java7
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/windows/RegisteredClassFactory.java12
2 files changed, 17 insertions, 2 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java b/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
index db61b1efd..38a5b5bc6 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/windows/GDIUtil.java
@@ -60,6 +60,9 @@ public class GDIUtil implements ToolkitProperties {
throw new NativeWindowException("GDI: Could not initialized native stub");
}
dummyWindowClassFactory = new RegisteredClassFactory(dummyWindowClassNameBase, getDummyWndProc0());
+ if(DEBUG) {
+ System.out.println("GDI.initSingleton() dummyWindowClassFactory "+dummyWindowClassFactory);
+ }
isInit = true;
}
}
@@ -91,6 +94,10 @@ public class GDIUtil implements ToolkitProperties {
public static long CreateDummyWindow(int x, int y, int width, int height) {
synchronized(dummyWindowSync) {
dummyWindowClass = dummyWindowClassFactory.getSharedClass();
+ if(DEBUG) {
+ System.out.println("GDI.CreateDummyWindow() dummyWindowClassFactory "+dummyWindowClassFactory);
+ System.out.println("GDI.CreateDummyWindow() dummyWindowClass "+dummyWindowClass);
+ }
return CreateDummyWindow0(dummyWindowClass.getHInstance(), dummyWindowClass.getName(), dummyWindowClass.getName(), x, y, width, height);
}
}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/windows/RegisteredClassFactory.java b/src/nativewindow/classes/jogamp/nativewindow/windows/RegisteredClassFactory.java
index e033a9f66..19a48d3bf 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/windows/RegisteredClassFactory.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/windows/RegisteredClassFactory.java
@@ -29,7 +29,9 @@
package jogamp.nativewindow.windows;
import jogamp.nativewindow.Debug;
+
import java.util.ArrayList;
+
import javax.media.nativewindow.NativeWindowException;
public class RegisteredClassFactory {
@@ -45,14 +47,20 @@ public class RegisteredClassFactory {
registeredFactories = new ArrayList<RegisteredClassFactory>();
}
- private String classBaseName;
- private long wndProc;
+ private final String classBaseName;
+ private final long wndProc;
private RegisteredClass sharedClass = null;
private int classIter = 0;
private int sharedRefCount = 0;
private final Object sync = new Object();
+ private String toHexString(long l) { return "0x"+Long.toHexString(l); }
+
+ @Override
+ public final String toString() { return "RegisteredClassFactory[moduleHandle "+toHexString(hInstance)+", "+classBaseName+
+ ", wndProc "+toHexString(wndProc)+", shared[refCount "+sharedRefCount+", class "+sharedClass+"]]"; }
+
/**
* Release the {@link RegisteredClass} of all {@link RegisteredClassFactory}.
*/