1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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