issue #358: rename ole32-error -> check-ole32-error
parent
7c77597b09
commit
3dd30d2f49
|
@ -21,8 +21,8 @@ IN: io.files.temp.windows
|
||||||
0
|
0
|
||||||
MAX_PATH 1 + WCHAR <c-array>
|
MAX_PATH 1 + WCHAR <c-array>
|
||||||
[ SHGetFolderPath ] keep
|
[ SHGetFolderPath ] keep
|
||||||
swap ole32-error
|
swap check-ole32-error
|
||||||
alien>native-string ;
|
utf16n alien>native-string ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ FUNCTION: void ReleaseStgMedium ( LPSTGMEDIUM pmedium ) ;
|
||||||
|
|
||||||
: com-query-interface ( interface iid -- interface' )
|
: com-query-interface ( interface iid -- interface' )
|
||||||
{ void* }
|
{ void* }
|
||||||
[ IUnknown::QueryInterface ole32-error ]
|
[ IUnknown::QueryInterface check-ole32-error ]
|
||||||
with-out-parameters ;
|
with-out-parameters ;
|
||||||
|
|
||||||
: com-add-ref ( interface -- interface )
|
: com-add-ref ( interface -- interface )
|
||||||
|
|
|
@ -122,11 +122,11 @@ TUPLE: ole32-error code message ;
|
||||||
: <ole32-error> ( code -- error )
|
: <ole32-error> ( code -- error )
|
||||||
dup n>win32-error-string \ ole32-error boa ;
|
dup n>win32-error-string \ ole32-error boa ;
|
||||||
|
|
||||||
: ole32-error ( hresult -- )
|
: check-ole32-error ( hresult -- )
|
||||||
dup succeeded? [ drop ] [ <ole32-error> throw ] if ;
|
dup succeeded? [ drop ] [ <ole32-error> throw ] if ;
|
||||||
|
|
||||||
: ole-initialize ( -- )
|
: ole-initialize ( -- )
|
||||||
f OleInitialize ole32-error ;
|
f OleInitialize check-ole32-error ;
|
||||||
|
|
||||||
: guid= ( a b -- ? )
|
: guid= ( a b -- ? )
|
||||||
[ 16 memory>byte-array ] bi@ = ;
|
[ 16 memory>byte-array ] bi@ = ;
|
||||||
|
|
|
@ -20,12 +20,12 @@ TUPLE: script-string < disposable font string metrics ssa size image ;
|
||||||
swap ! icp
|
swap ! icp
|
||||||
FALSE ! fTrailing
|
FALSE ! fTrailing
|
||||||
] if
|
] if
|
||||||
{ int } [ ScriptStringCPtoX ole32-error ] with-out-parameters ;
|
{ int } [ ScriptStringCPtoX check-ole32-error ] with-out-parameters ;
|
||||||
|
|
||||||
: x>line-offset ( x script-string -- n trailing )
|
: x>line-offset ( x script-string -- n trailing )
|
||||||
ssa>> ! ssa
|
ssa>> ! ssa
|
||||||
swap ! iX
|
swap ! iX
|
||||||
{ int int } [ ScriptStringXtoCP ole32-error ] with-out-parameters ;
|
{ int int } [ ScriptStringXtoCP check-ole32-error ] with-out-parameters ;
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ TUPLE: script-string < disposable font string metrics ssa size image ;
|
||||||
f ! pbInClass
|
f ! pbInClass
|
||||||
f void* <ref> ! pssa
|
f void* <ref> ! pssa
|
||||||
[ ScriptStringAnalyse ] keep
|
[ ScriptStringAnalyse ] keep
|
||||||
[ ole32-error ] [ |ScriptStringFree void* deref ] bi* ;
|
[ check-ole32-error ] [ |ScriptStringFree void* deref ] bi* ;
|
||||||
|
|
||||||
: set-dc-colors ( dc font -- )
|
: set-dc-colors ( dc font -- )
|
||||||
[ background>> color>RGB SetBkColor drop ]
|
[ background>> color>RGB SetBkColor drop ]
|
||||||
|
@ -65,7 +65,7 @@ TUPLE: script-string < disposable font string metrics ssa size image ;
|
||||||
! iMinSel
|
! iMinSel
|
||||||
! iMaxSel
|
! iMaxSel
|
||||||
FALSE ! fDisabled
|
FALSE ! fDisabled
|
||||||
ScriptStringOut ole32-error ;
|
ScriptStringOut check-ole32-error ;
|
||||||
|
|
||||||
: draw-script-string ( dc script-string -- )
|
: draw-script-string ( dc script-string -- )
|
||||||
[ font>> set-dc-colors ] keep (draw-script-string) ;
|
[ font>> set-dc-colors ] keep (draw-script-string) ;
|
||||||
|
@ -103,7 +103,7 @@ TUPLE: script-string < disposable font string metrics ssa size image ;
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
M: script-string dispose*
|
M: script-string dispose*
|
||||||
ssa>> void* <ref> ScriptStringFree ole32-error ;
|
ssa>> void* <ref> ScriptStringFree check-ole32-error ;
|
||||||
|
|
||||||
SYMBOL: cached-script-strings
|
SYMBOL: cached-script-strings
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue