mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Move Win32API to Reline::Win32API
This commit is contained in:
parent
319eee0f4a
commit
3be5907e73
1 changed files with 38 additions and 40 deletions
|
@ -1,6 +1,7 @@
|
|||
require 'fiddle/import'
|
||||
|
||||
class Win32API
|
||||
module Reline
|
||||
class Win32API
|
||||
DLL = {}
|
||||
TYPEMAP = {"0" => Fiddle::TYPE_VOID, "S" => Fiddle::TYPE_VOIDP, "I" => Fiddle::TYPE_LONG}
|
||||
POINTER_TYPE = Fiddle::SIZEOF_VOIDP == Fiddle::SIZEOF_LONG_LONG ? 'q*' : 'l!*'
|
||||
|
@ -36,11 +37,8 @@ class Win32API
|
|||
ret, = @func.call(*args)
|
||||
return ret || 0
|
||||
end
|
||||
end
|
||||
|
||||
alias Call call
|
||||
end
|
||||
|
||||
module Reline
|
||||
VK_LMENU = 0xA4
|
||||
STD_OUTPUT_HANDLE = -11
|
||||
@@getwch = Win32API.new('msvcrt', '_getwch', [], 'I')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue