< prev index next >
src/java.desktop/unix/native/common/java2d/x11/X11SurfaceData.c
Print this page
@@ -1392,17 +1392,17 @@
#ifndef HEADLESS
X11SDOps *xsdo;
J2dTraceLn(J2D_TRACE_INFO, "in X11SurfaceData_XCreateGC");
- xsdo = (X11SDOps *) pXSData;
+ xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return 0L;
}
xsdo->javaGC = XCreateGC(awt_display, xsdo->drawable, 0, NULL);
- ret = (jlong) xsdo->javaGC;
+ ret = ptr_to_jlong(xsdo->javaGC);
#else /* !HEADLESS */
ret = 0L;
#endif /* !HEADLESS */
return ret;
@@ -1417,11 +1417,11 @@
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);
+ XSetClipMask(awt_display, (GC) jlong_to_ptr(xgc), None);
#endif /* !HEADLESS */
}
/*
* Class: sun_java2d_x11_X11SurfaceData
@@ -1443,11 +1443,11 @@
numrects = RegionToYXBandedRectangles(env,
x1, y1, x2, y2, complexclip,
&pRect, 256);
- XSetClipRectangles(awt_display, (GC) xgc, 0, 0, pRect, numrects, YXBanded);
+ XSetClipRectangles(awt_display, (GC) jlong_to_ptr(xgc), 0, 0, pRect, numrects, YXBanded);
if (pRect != rects) {
free(pRect);
}
#endif /* !HEADLESS */
@@ -1462,11 +1462,11 @@
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);
+ XSetFunction(awt_display, (GC) jlong_to_ptr(xgc), GXcopy);
#endif /* !HEADLESS */
}
/*
* Class: sun_java2d_x11_X11SurfaceData
@@ -1477,11 +1477,11 @@
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);
+ XSetFunction(awt_display, (GC) jlong_to_ptr(xgc), GXxor);
#endif /* !HEADLESS */
}
/*
* Class: sun_java2d_x11_X11SurfaceData
@@ -1492,11 +1492,11 @@
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);
+ XSetForeground(awt_display, (GC) jlong_to_ptr(xgc), pixel);
#endif /* !HEADLESS */
}
/*
* Class: sun_java2d_x11_X11SurfaceData
@@ -1507,8 +1507,8 @@
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);
+ XSetGraphicsExposures(awt_display, (GC) jlong_to_ptr(xgc), needExposures ? True : False);
#endif /* !HEADLESS */
}
< prev index next >