John Klehm : wintab32: Implement WTSetA/W.
Alexandre Julliard
julliard at winehq.org
Mon Apr 14 07:14:22 CDT 2008
Module: wine
Branch: master
Commit: 352c98d7d57103b7a5f1bef03eb77ac8a6c98039
URL: http://source.winehq.org/git/wine.git/?a=commit;h=352c98d7d57103b7a5f1bef03eb77ac8a6c98039
Author: John Klehm <xixsimplicityxix at gmail.com>
Date: Wed Apr 9 18:44:36 2008 -0500
wintab32: Implement WTSetA/W.
---
dlls/wintab32/context.c | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c
index 3147ec0..9551d87 100644
--- a/dlls/wintab32/context.c
+++ b/dlls/wintab32/context.c
@@ -692,11 +692,21 @@ BOOL WINAPI WTGetW(HCTX hCtx, LPLOGCONTEXTW lpLogCtx)
*/
BOOL WINAPI WTSetA(HCTX hCtx, LPLOGCONTEXTA lpLogCtx)
{
- FIXME("(%p, %p): stub\n", hCtx, lpLogCtx);
+ LPOPENCONTEXT context;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ TRACE("hCtx=%p, lpLogCtx=%p\n", hCtx, lpLogCtx);
- return FALSE;
+ if (!hCtx || !lpLogCtx) return FALSE;
+
+ /* TODO: if cur process not owner of hCtx only modify
+ * attribs not locked by owner */
+
+ EnterCriticalSection(&csTablet);
+ context = TABLET_FindOpenContext(hCtx);
+ LOGCONTEXTAtoW(lpLogCtx, &context->context);
+ LeaveCriticalSection(&csTablet);
+
+ return TRUE;
}
/***********************************************************************
@@ -704,11 +714,21 @@ BOOL WINAPI WTSetA(HCTX hCtx, LPLOGCONTEXTA lpLogCtx)
*/
BOOL WINAPI WTSetW(HCTX hCtx, LPLOGCONTEXTW lpLogCtx)
{
- FIXME("(%p, %p): stub\n", hCtx, lpLogCtx);
+ LPOPENCONTEXT context;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ TRACE("hCtx=%p, lpLogCtx=%p\n", hCtx, lpLogCtx);
- return FALSE;
+ if (!hCtx || !lpLogCtx) return FALSE;
+
+ /* TODO: if cur process not hCtx owner only modify
+ * attribs not locked by owner */
+
+ EnterCriticalSection(&csTablet);
+ context = TABLET_FindOpenContext(hCtx);
+ memmove(&context->context, lpLogCtx, sizeof(LOGCONTEXTW));
+ LeaveCriticalSection(&csTablet);
+
+ return TRUE;
}
/***********************************************************************
More information about the wine-cvs
mailing list