39 #include <dlfcn.h>
40
41 #ifndef HEADLESS
42 static JDgaLibInfo DgaLibInfoStub;
43 static JDgaLibInfo theJDgaInfo;
44 static JDgaLibInfo *pJDgaInfo = &DgaLibInfoStub;
45
46
47 /**
48 * This file contains support code for loops using the SurfaceData
49 * interface to talk to an X11 drawable from native code.
50 */
51
52 typedef struct _X11RIPrivate {
53 jint lockType;
54 jint lockFlags;
55 XImage *img;
56 int x, y;
57 } X11RIPrivate;
58
59 #define MAX(a,b) ((a) > (b) ? (a) : (b))
60 #define MIN(a,b) ((a) < (b) ? (a) : (b))
61
62 static LockFunc X11SD_Lock;
63 static GetRasInfoFunc X11SD_GetRasInfo;
64 static UnlockFunc X11SD_Unlock;
65 static DisposeFunc X11SD_Dispose;
66 static GetPixmapBgFunc X11SD_GetPixmapWithBg;
67 static ReleasePixmapBgFunc X11SD_ReleasePixmapWithBg;
68 extern AwtGraphicsConfigDataPtr
69 getGraphicsConfigFromComponentPeer(JNIEnv *env, jobject this);
70 extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs;
71
72 static int X11SD_FindClip(SurfaceDataBounds *b, SurfaceDataBounds *bounds,
73 X11SDOps *xsdo);
74 static int X11SD_ClipToRoot(SurfaceDataBounds *b, SurfaceDataBounds *bounds,
75 X11SDOps *xsdo);
76 static void X11SD_SwapBytes(X11SDOps *xsdo, XImage *img, int depth, int bpp);
77 static XImage * X11SD_GetImage(JNIEnv *env, X11SDOps *xsdo,
78 SurfaceDataBounds *bounds,
79 jint lockFlags);
80
|
39 #include <dlfcn.h>
40
41 #ifndef HEADLESS
42 static JDgaLibInfo DgaLibInfoStub;
43 static JDgaLibInfo theJDgaInfo;
44 static JDgaLibInfo *pJDgaInfo = &DgaLibInfoStub;
45
46
47 /**
48 * This file contains support code for loops using the SurfaceData
49 * interface to talk to an X11 drawable from native code.
50 */
51
52 typedef struct _X11RIPrivate {
53 jint lockType;
54 jint lockFlags;
55 XImage *img;
56 int x, y;
57 } X11RIPrivate;
58
59 #ifndef MAX
60 #define MAX(a,b) ((a) > (b) ? (a) : (b))
61 #endif
62 #ifndef MIN
63 #define MIN(a,b) ((a) < (b) ? (a) : (b))
64 #endif
65
66 static LockFunc X11SD_Lock;
67 static GetRasInfoFunc X11SD_GetRasInfo;
68 static UnlockFunc X11SD_Unlock;
69 static DisposeFunc X11SD_Dispose;
70 static GetPixmapBgFunc X11SD_GetPixmapWithBg;
71 static ReleasePixmapBgFunc X11SD_ReleasePixmapWithBg;
72 extern AwtGraphicsConfigDataPtr
73 getGraphicsConfigFromComponentPeer(JNIEnv *env, jobject this);
74 extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs;
75
76 static int X11SD_FindClip(SurfaceDataBounds *b, SurfaceDataBounds *bounds,
77 X11SDOps *xsdo);
78 static int X11SD_ClipToRoot(SurfaceDataBounds *b, SurfaceDataBounds *bounds,
79 X11SDOps *xsdo);
80 static void X11SD_SwapBytes(X11SDOps *xsdo, XImage *img, int depth, int bpp);
81 static XImage * X11SD_GetImage(JNIEnv *env, X11SDOps *xsdo,
82 SurfaceDataBounds *bounds,
83 jint lockFlags);
84
|