[Solved]Semantics
Posted: Tue Nov 18, 2014 4:09 am
Code: Select all
require 'Win32API'
module GDI32
ANSI_CHARSET = 0
DEFAULT_CHARSET = 1
SYMBOL_CHARSET = 2
TCI_SRCCHARSET = 1
TCI_SRCCODEPAGE = 2
TCI_SRCFONTSIG = 3
TCI_SRCLOCALE = 0x100
#Declare Function GetTextCharset Lib "gdi32" Alias "GetTextCharset" (ByVal hdc As Long) As Long
GetTextCharset = Win32API.new('gdi32', 'GetTextCharset', 'L', 'I')
def GetTextCharset(hdc)
GetTextCharset.call(hdc)
end
#Declare Function GetTextCharsetInfo Lib "gdi32" Alias "GetTextCharsetInfo" (ByVal hdc As Long, lpSig As FONTSIGNATURE, ByVal dwFlags As Long) As Long
GetTextCharsetInfo = Win32API.new('gdi32', 'GetTextCharsetInfo', 'LPL', 'I')
def GetTextCharsetInfo(hdc, fontsig, flags)
GetTextCharsetInfo.call(hdc, fontsig, flags)
end
#Declare Function TranslateCharsetInfo Lib "gdi32" Alias "TranslateCharsetInfo" (lpSrc As Long, lpcs As CHARSETINFO, ByVal dwFlags As Long) As Long
TranslateCharsetInfo = Win32API.new('gdi32', 'TranslateCharsetInfo', 'PPL', 'I')
def TranslateCharsetInfo(src, chrset, flags)
TranslateCharsetInfo.call(src, chrset, flags) != 0
end
endDoes it really matter if the Definitions are mixed with the Declarations?