Class: Win32::LangID
- Inherits:
-
Object
- Object
- Win32::LangID
- Defined in:
- lib/Win32/Base.rb
Overview
This class encodes and decodes Win32 Language IDs
Constant Summary collapse
- LANG_NEUTRAL =
constsFor: “Languages IDs” (from WinBase.h)
0x00
- SUBLANG_NEUTRAL =
language neutral
0x00
- SUBLANG_DEFAULT =
user default
0x01
- SUBLANG_SYS_DEFAULT =
system default
0x02
Instance Method Summary collapse
-
#initialize(p_primaryLang = LANG_NEUTRAL, p_subLang = SUBLANG_NEUTRAL) ⇒ LangID
constructor
—————————————————————————————– class methodsFor: “initialization”.
- #primary ⇒ Object
- #sub ⇒ Object
- #to_i ⇒ Object
-
#to_s ⇒ Object
—————————————————————————————– methodsFor: “accessing”.
Constructor Details
#initialize(p_primaryLang = LANG_NEUTRAL, p_subLang = SUBLANG_NEUTRAL) ⇒ LangID
class methodsFor: “initialization”
109 110 111 |
# File 'lib/Win32/Base.rb', line 109 def initialize(p_primaryLang = LANG_NEUTRAL, p_subLang = SUBLANG_NEUTRAL) @nLangID = (p_subLang << 10) | p_primaryLang end |
Instance Method Details
#primary ⇒ Object
123 124 125 |
# File 'lib/Win32/Base.rb', line 123 def primary return @nLangID & 0x3FF end |
#sub ⇒ Object
127 128 129 |
# File 'lib/Win32/Base.rb', line 127 def sub return @nLangID >> 10 end |
#to_i ⇒ Object
119 120 121 |
# File 'lib/Win32/Base.rb', line 119 def to_i return @nLangID end |
#to_s ⇒ Object
methodsFor: “accessing”
115 116 117 |
# File 'lib/Win32/Base.rb', line 115 def to_s return @nLangID.to_s end |