Use built-in Win32API on JRuby

It's fixed for JRuby dedicatedly.
This commit is contained in:
aycabta 2019-10-05 23:46:16 +09:00
parent 309f6a7726
commit 136116819e

View File

@ -11,6 +11,9 @@ class Reline::Windows
[224, 79] => :ed_move_to_end, # End
}.each_key(&:freeze).freeze
if defined? JRUBY_VERSION
require 'win32api'
else
class Win32API
DLL = {}
TYPEMAP = {"0" => Fiddle::TYPE_VOID, "S" => Fiddle::TYPE_VOIDP, "I" => Fiddle::TYPE_LONG}
@ -48,6 +51,7 @@ class Reline::Windows
return ret || 0
end
end
end
VK_MENU = 0x12
VK_SHIFT = 0x10