src/java.desktop/macosx/native/libawt_lwawt/awt/PrinterSurfaceData.m
changeset 59166 51673a0b6df0
parent 47216 71c04702a3d5
equal deleted inserted replaced
59165:2c55c2fc08f5 59166:51673a0b6df0
    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;