Added WinWorkstation>>hdcForGC to obtains a HDC handle for given gcID.
This handle then could be passed to some other code that may need it.
As of now, the only user of this is Cairo which need it in order to
create a surface on a window.
--- a/WinWorkstation.st Tue Feb 23 22:53:06 2016 +0000
+++ b/WinWorkstation.st Tue Feb 23 22:55:32 2016 +0000
@@ -8183,7 +8183,9 @@
given GC"
%{
if (__isExternalAddressLike(gcId)) {
- RETURN ( __MKEXTERNALADDRESS (_getDC ( _GCDATA(gcId) ) ) );
+ HDC dc = _getDC ( _GCDATA(gcId) );
+ _GCDATA(gcId)->doNotCacheOrRelease = 1;
+ RETURN ( __MKEXTERNALADDRESS ( dc ) );
}
%}.
self primitiveFailed.