Problem to lock the surface of the target component
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   uotmi_em
Posted On:   Wednesday, May 7, 2003 11:33 AM

I am having a problem locking a surface in jawt with the following code: JAWT awt; JAWT_DrawingSurface* ds; JAWT_DrawingSurfaceInfo* dsi; JAWT_Win32DrawingSurfaceInfo* dsi_win; JAWT_Info(JNIEnv *env, jobject canvas) { jboolean result; jint lock; // Get the AWT awt.version = JAWT_VERSION_1_3; result = JAWT_GetAWT(env, &awt); assert(result != JNI_FALSE); // Get the drawing surface ds = awt.GetDrawingSurface(env, panel); if(ds == NULL) return; // Lock the drawing surface lock   More>>


I am having a problem locking a surface in jawt with the following code:

JAWT awt;

JAWT_DrawingSurface* ds;

JAWT_DrawingSurfaceInfo* dsi;

JAWT_Win32DrawingSurfaceInfo* dsi_win;

JAWT_Info(JNIEnv *env, jobject canvas) {

jboolean result;

jint lock;

// Get the AWT

awt.version = JAWT_VERSION_1_3;

result = JAWT_GetAWT(env, &awt);

assert(result != JNI_FALSE);

// Get the drawing surface

ds = awt.GetDrawingSurface(env, panel);

if(ds == NULL)

return;

// Lock the drawing surface
lock = ds->Lock(ds);
assert((lock & JAWT_LOCK_ERROR) == 0);

// Get the drawing surface info

dsi = ds->GetDrawingSurfaceInfo(ds);

// Get the platform-specific drawing info

dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi>platformInfo;

}

   <<Less
About | Sitemap | Contact