< prev index next >

src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 1547,1563 **** #ifndef HEADLESS X11SDOps *xsdo; J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XCreateGC"); ! xsdo = (X11SDOps *) pXSData; if (xsdo == NULL) { return 0L; } xsdo->javaGC = XCreateGC(awt_display, xsdo->drawable, 0, NULL); ! ret = (jlong) xsdo->javaGC; #else /* !HEADLESS */ ret = 0L; #endif /* !HEADLESS */ return ret; --- 1547,1563 ---- #ifndef HEADLESS X11SDOps *xsdo; J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XCreateGC"); ! xsdo = (X11SDOps *) jlong_to_ptr(pXSData); if (xsdo == NULL) { return 0L; } xsdo->javaGC = XCreateGC(awt_display, xsdo->drawable, 0, NULL); ! ret = ptr_to_jlong(xsdo->javaGC); #else /* !HEADLESS */ ret = 0L; #endif /* !HEADLESS */ return ret;
*** 1572,1582 **** Java_sun_java2d_x11_XSurfaceData_XResetClip (JNIEnv *env, jclass xsd, jlong xgc) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XResetClip"); ! XSetClipMask(awt_display, (GC) xgc, None); #endif /* !HEADLESS */ } /* * Class: sun_java2d_x11_X11SurfaceData --- 1572,1582 ---- Java_sun_java2d_x11_XSurfaceData_XResetClip (JNIEnv *env, jclass xsd, jlong xgc) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XResetClip"); ! XSetClipMask(awt_display, (GC) jlong_to_ptr(xgc), None); #endif /* !HEADLESS */ } /* * Class: sun_java2d_x11_X11SurfaceData
*** 1598,1608 **** numrects = RegionToYXBandedRectangles(env, x1, y1, x2, y2, complexclip, &pRect, 256); ! XSetClipRectangles(awt_display, (GC) xgc, 0, 0, pRect, numrects, YXBanded); if (pRect != rects) { free(pRect); } #endif /* !HEADLESS */ --- 1598,1608 ---- numrects = RegionToYXBandedRectangles(env, x1, y1, x2, y2, complexclip, &pRect, 256); ! XSetClipRectangles(awt_display, (GC) jlong_to_ptr(xgc), 0, 0, pRect, numrects, YXBanded); if (pRect != rects) { free(pRect); } #endif /* !HEADLESS */
*** 1617,1627 **** Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode (JNIEnv *env, jclass xsd, jlong xgc) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XSetCopyMode"); ! XSetFunction(awt_display, (GC) xgc, GXcopy); #endif /* !HEADLESS */ } /* * Class: sun_java2d_x11_X11SurfaceData --- 1617,1627 ---- Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode (JNIEnv *env, jclass xsd, jlong xgc) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XSetCopyMode"); ! XSetFunction(awt_display, (GC) jlong_to_ptr(xgc), GXcopy); #endif /* !HEADLESS */ } /* * Class: sun_java2d_x11_X11SurfaceData
*** 1632,1642 **** Java_sun_java2d_x11_X11SurfaceData_XSetXorMode (JNIEnv *env, jclass xr, jlong xgc) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XSetXorMode"); ! XSetFunction(awt_display, (GC) xgc, GXxor); #endif /* !HEADLESS */ } /* * Class: sun_java2d_x11_X11SurfaceData --- 1632,1642 ---- Java_sun_java2d_x11_X11SurfaceData_XSetXorMode (JNIEnv *env, jclass xr, jlong xgc) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XSetXorMode"); ! XSetFunction(awt_display, (GC) jlong_to_ptr(xgc), GXxor); #endif /* !HEADLESS */ } /* * Class: sun_java2d_x11_X11SurfaceData
*** 1647,1657 **** Java_sun_java2d_x11_X11SurfaceData_XSetForeground (JNIEnv *env, jclass xsd, jlong xgc, jint pixel) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XSetForeground"); ! XSetForeground(awt_display, (GC) xgc, pixel); #endif /* !HEADLESS */ } /* * Class: sun_java2d_x11_X11SurfaceData --- 1647,1657 ---- Java_sun_java2d_x11_X11SurfaceData_XSetForeground (JNIEnv *env, jclass xsd, jlong xgc, jint pixel) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XSetForeground"); ! XSetForeground(awt_display, (GC) jlong_to_ptr(xgc), pixel); #endif /* !HEADLESS */ } /* * Class: sun_java2d_x11_X11SurfaceData
*** 1662,1669 **** Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures (JNIEnv *env, jclass xsd, jlong xgc, jboolean needExposures) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XSetGraphicsExposures"); ! XSetGraphicsExposures(awt_display, (GC) xgc, needExposures ? True : False); #endif /* !HEADLESS */ } --- 1662,1669 ---- Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures (JNIEnv *env, jclass xsd, jlong xgc, jboolean needExposures) { #ifndef HEADLESS J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XSetGraphicsExposures"); ! XSetGraphicsExposures(awt_display, (GC) jlong_to_ptr(xgc), needExposures ? True : False); #endif /* !HEADLESS */ }
< prev index next >