[Solved]Semantics

For general discussion related FlowStone
Post Reply
User avatar
JB_AU
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

[Solved]Semantics

Post by JB_AU »

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
      end


Does it really matter if the Definitions are mixed with the Declarations?
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
Post Reply