Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/WINAPI.d @ 120:536e43f63c81
Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
===D2===
* added [Try]Immutable/Const/Shared templates to work with differenses in D1/D2 instead of version statements
used these templates to work with strict type storage rules of dmd-2.053
* com.ibm.icu now also compilable with D2, but not tested yet
* small fixes
Snippet288 - shared data is in TLS
===Phobos===
* fixed critical bugs in Phobos implemention
completely incorrect segfault prone fromStringz (Linux's port ruthless killer)
terrible, incorrect StringBuffer realization (StyledText killer)
* fixed small bugs as well
Snippet72 - misprint in the snippet
* implemented missed functionality for Phobos
ByteArrayOutputStream implemented (image loading available)
formatting correctly works for all DWT's cases
As a result, folowing snippets now works with Phobos (Snippet### - what is fixed):
Snippet24, 42, 111, 115, 130, 235, 276 - bad string formatting
Snippet48, 282 - crash on image loading
Snippet163, 189, 211, 213, 217, 218, 222 - crash on copy/cut in StyledText
Snippet244 - hang-up
===Tango===
* few changes for the latest Tango trunc-r5661
* few small performance improvments
===General===
* implMissing-s for only one version changed to implMissingInTango/InPhobos
* incorrect calls to Format in toString-s fixed
* fixed loading \uXXXX characters in ResourceBundle
* added good UTF-8 support for StyledText, TextLayout (Win32) and friends
UTF functions revised and tested. It is now in java.nonstandard.*Utf modules
StyledText and TextLayout (Win32) modules revised for UTF-8 support
* removed small diferences in most identical files in *.swt.* folders
*.swt.internal.image, *.swt.events and *.swt.custom are identical in Win32/Linux32
now 179 of 576 (~31%) files in *.swt.* folders are fully identical
* Win32: snippets now have right subsystem, pretty icons and native system style controls
* small fixes in snippets
Snippet44 - it's not Snippet44
Snippet212 - functions work with different images and offsets arrays
Win32: Snippet282 - crash on close if the button has an image
Snippet293 - setGrayed is commented
and others
Win32: As a result, folowing snippets now works
Snippet68 - color doesn't change
Snippet163, 189, 211, 213, 217, 218, 222 - UTF-8 issues (see above)
Snippet193 - no tabel headers
author | Denis Shelomovskij <verylonglogin.reg@gmail.com> |
---|---|
date | Sat, 09 Jul 2011 15:50:20 +0300 |
parents | ed96ea2a2764 |
children | 28e25950b068 |
comparison
equal
deleted
inserted
replaced
119:d00e8db0a568 | 120:536e43f63c81 |
---|---|
5 | 5 |
6 | 6 |
7 module org.eclipse.swt.internal.win32.WINAPI; | 7 module org.eclipse.swt.internal.win32.WINAPI; |
8 | 8 |
9 public import org.eclipse.swt.internal.win32.WINTYPES; | 9 public import org.eclipse.swt.internal.win32.WINTYPES; |
10 import java.nonstandard.SafeUtf; | |
10 | 11 |
11 version(Tango){ | 12 version(Tango){ |
12 import tango.sys.win32.Types; | 13 import tango.sys.win32.Types; |
13 static import tango.sys.win32.UserGdi; | 14 static import tango.sys.win32.UserGdi; |
14 public alias tango.sys.win32.UserGdi STDWINAPI; | 15 public alias tango.sys.win32.UserGdi STDWINAPI; |
5151 } | 5152 } |
5152 | 5153 |
5153 // USP methods (Unicode Complex Script processor) | 5154 // USP methods (Unicode Complex Script processor) |
5154 HRESULT ScriptBreak( | 5155 HRESULT ScriptBreak( |
5155 LPCWSTR pwcChars, | 5156 LPCWSTR pwcChars, |
5156 int cChars, | 5157 int cChars, //length of pwcChars |
5157 SCRIPT_ANALYSIS *psa, | 5158 SCRIPT_ANALYSIS *psa, |
5158 SCRIPT_LOGATTR *psla | 5159 SCRIPT_LOGATTR *psla |
5159 ); | 5160 ); |
5160 HRESULT ScriptCPtoX( | 5161 HRESULT ScriptCPtoX( |
5161 int iCP, | 5162 UTF16index iCP,//Logical character position in the run. |
5162 BOOL fTrailing, | 5163 BOOL fTrailing, |
5163 int cChars, | 5164 UTF16shift cChars,//Number of characters in the run. |
5164 int cGlyphs, | 5165 int cGlyphs, |
5165 WORD *pwLogClust, | 5166 WORD *pwLogClust, |
5166 SCRIPT_VISATTR *psva, | 5167 SCRIPT_VISATTR *psva, |
5167 int *piAdvance, | 5168 int *piAdvance, |
5168 SCRIPT_ANALYSIS *psa, | 5169 SCRIPT_ANALYSIS *psa, |
5181 SCRIPT_CACHE *psc, | 5182 SCRIPT_CACHE *psc, |
5182 SCRIPT_FONTPROPERTIES *sfp | 5183 SCRIPT_FONTPROPERTIES *sfp |
5183 ); | 5184 ); |
5184 HRESULT ScriptGetLogicalWidths( | 5185 HRESULT ScriptGetLogicalWidths( |
5185 SCRIPT_ANALYSIS *psa, | 5186 SCRIPT_ANALYSIS *psa, |
5186 int cChars, | 5187 UTF16shift cChars,//Count of the logical code points in the run. |
5187 int cGlyphs, | 5188 int cGlyphs, |
5188 int *piGlyphWidth, | 5189 int *piGlyphWidth, |
5189 WORD *pwLogClust, | 5190 WORD *pwLogClust, |
5190 SCRIPT_VISATTR *psva, | 5191 SCRIPT_VISATTR *psva, |
5191 int *piDx | 5192 int *piDx |
5196 ); | 5197 ); |
5197 HRESULT ScriptGetCMap( | 5198 HRESULT ScriptGetCMap( |
5198 HDC hdc, | 5199 HDC hdc, |
5199 SCRIPT_CACHE* psc, | 5200 SCRIPT_CACHE* psc, |
5200 LPCWSTR pwcInChars, | 5201 LPCWSTR pwcInChars, |
5201 int cChars, | 5202 int cChars, //length of pwcChars |
5202 DWORD dwFlags, | 5203 DWORD dwFlags, |
5203 WORD* pwOutGlyphs | 5204 WORD* pwOutGlyphs |
5204 ); | 5205 ); |
5205 HRESULT ScriptStringAnalyse( | 5206 HRESULT ScriptStringAnalyse( |
5206 HDC hdc, | 5207 HDC hdc, |
5207 LPCVOID pString, | 5208 LPCVOID pString,//It can be a Unicode string or use the character set from a Windows ANSI code page, as specified by the iCharset parameter. |
5208 int cString, | 5209 int cString,//Length of the string to analyze. |
5209 int cGlyphs, | 5210 int cGlyphs, |
5210 int iCharset, | 5211 int iCharset, |
5211 DWORD dwFlags, | 5212 DWORD dwFlags, |
5212 int iReqWidth, | 5213 int iReqWidth, |
5213 SCRIPT_CONTROL* psControl, | 5214 SCRIPT_CONTROL* psControl, |
5221 SCRIPT_STRING_ANALYSIS ssa, | 5222 SCRIPT_STRING_ANALYSIS ssa, |
5222 int iX, | 5223 int iX, |
5223 int iY, | 5224 int iY, |
5224 UINT uOptions, | 5225 UINT uOptions, |
5225 RECT* prc, | 5226 RECT* prc, |
5226 int iMinSel, | 5227 UTF16index iMinSel, //starting pos for substringing output string |
5227 int iMaxSel, | 5228 UTF16index iMaxSel, //ending pos for substringing output string |
5228 BOOL fDisabled | 5229 BOOL fDisabled |
5229 ); | 5230 ); |
5230 HRESULT ScriptStringFree( | 5231 HRESULT ScriptStringFree( |
5231 SCRIPT_STRING_ANALYSIS* pssa | 5232 SCRIPT_STRING_ANALYSIS* pssa |
5232 ); | 5233 ); |
5233 | 5234 |
5234 HRESULT ScriptItemize( | 5235 HRESULT ScriptItemize( |
5235 LPCWSTR pwcInChars, | 5236 LPCWSTR pwcInChars, |
5236 int cInChars, | 5237 int cInChars, //length of pwcChars |
5237 int cMaxItems, | 5238 int cMaxItems, |
5238 SCRIPT_CONTROL *psControl, | 5239 SCRIPT_CONTROL *psControl, |
5239 SCRIPT_STATE *psState, | 5240 SCRIPT_STATE *psState, |
5240 SCRIPT_ITEM *pItems, | 5241 SCRIPT_ITEM *pItems, |
5241 int *pcItems | 5242 int *pcItems |
5259 ); | 5260 ); |
5260 HRESULT ScriptShape( | 5261 HRESULT ScriptShape( |
5261 HDC hdc, // in | 5262 HDC hdc, // in |
5262 SCRIPT_CACHE *psc, // in/out | 5263 SCRIPT_CACHE *psc, // in/out |
5263 LPCWSTR pwcChars, // | 5264 LPCWSTR pwcChars, // |
5264 int cChars, | 5265 int cChars,//length of pwcChars; Number of characters in the Unicode run. |
5265 int cMaxGlyphs, | 5266 int cMaxGlyphs, |
5266 SCRIPT_ANALYSIS *psa, | 5267 SCRIPT_ANALYSIS *psa, |
5267 WORD *pwOutGlyphs, | 5268 WORD *pwOutGlyphs, |
5268 WORD *pwLogClust, | 5269 WORD *pwLogClust, |
5269 SCRIPT_VISATTR *psva, | 5270 SCRIPT_VISATTR *psva, |
5285 int *piJustify, // const | 5286 int *piJustify, // const |
5286 GOFFSET *pGoffset // const | 5287 GOFFSET *pGoffset // const |
5287 ); | 5288 ); |
5288 HRESULT ScriptXtoCP( | 5289 HRESULT ScriptXtoCP( |
5289 int iX, | 5290 int iX, |
5290 int cChars, | 5291 UTF16shift cChars,//Count of logical code points in the run. |
5291 int cGlyphs, | 5292 int cGlyphs, |
5292 WORD *pwLogClust, // | 5293 WORD *pwLogClust, // |
5293 SCRIPT_VISATTR *psva, // | 5294 SCRIPT_VISATTR *psva, // |
5294 int *piAdvance, // | 5295 int *piAdvance, // |
5295 SCRIPT_ANALYSIS *psa, // | 5296 SCRIPT_ANALYSIS *psa, // |
5296 int *piCP, | 5297 UTF16shift *piCP, |
5297 int *piTrailing | 5298 UTF16shift *piTrailing |
5298 ); | 5299 ); |
5299 UINT SendInput( | 5300 UINT SendInput( |
5300 UINT nInputs, | 5301 UINT nInputs, |
5301 LPINPUT pInputs, | 5302 LPINPUT pInputs, |
5302 int cbSize | 5303 int cbSize |