1
0
Fork 0
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:
aycabta 2019-04-30 12:47:40 +09:00
parent 319eee0f4a
commit 3be5907e73

View file

@ -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')