equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 |
26 |
27 #import "PrinterSurfaceData.h" |
27 #import "PrinterSurfaceData.h" |
|
28 #import "jni_util.h" |
28 #import <JavaNativeFoundation/JavaNativeFoundation.h> |
29 #import <JavaNativeFoundation/JavaNativeFoundation.h> |
29 |
30 |
30 |
31 |
31 //#define DEBUG 1 |
32 //#define DEBUG 1 |
32 #if defined DEBUG |
33 #if defined DEBUG |
85 JNF_COCOA_ENTER(env); |
86 JNF_COCOA_ENTER(env); |
86 |
87 |
87 PRINT("Java_sun_lwawt_macosx_CPrinterSurfaceData_initOps") |
88 PRINT("Java_sun_lwawt_macosx_CPrinterSurfaceData_initOps") |
88 |
89 |
89 PrintSDOps *psdo = (PrintSDOps*)SurfaceData_InitOps(env, jthis, sizeof(PrintSDOps)); |
90 PrintSDOps *psdo = (PrintSDOps*)SurfaceData_InitOps(env, jthis, sizeof(PrintSDOps)); |
|
91 if (psdo == NULL) { |
|
92 JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed."); |
|
93 return; |
|
94 } |
|
95 |
90 psdo->nsRef = (NSGraphicsContext*)jlong_to_ptr(nsRef); |
96 psdo->nsRef = (NSGraphicsContext*)jlong_to_ptr(nsRef); |
91 psdo->width = width; |
97 psdo->width = width; |
92 psdo->height = height; |
98 psdo->height = height; |
93 |
99 |
94 QuartzSDOps *qsdo = (QuartzSDOps*)psdo; |
100 QuartzSDOps *qsdo = (QuartzSDOps*)psdo; |