Mercurial > pub > dyncall > bindings
view ruby/rbdc/examples/win32screenres.rb @ 28:edbbd467f50a
python binding:
- update to dyncall 1.1
- Python 3 support (supports both, Python 2 and 3)
- using the Capsule API over PyCObject, when available
- support for python unicode strings (for both, Python 2 and 3)
- doc cleanup
ruby binding:
- doc cleanup
author | Tassilo Philipp |
---|---|
date | Tue, 07 Apr 2020 21:16:37 +0200 |
parents | 5e159be89d73 |
children |
line wrap: on
line source
#////////////////////////////////////////////////////////////////////// # # win32screeninfo.rb # Copyright 2015 Tassilo Philipp # # Dyncall sample loading user32.dll on windows and displaying a # native windows message box by calling MessageBoxA(...). # #/////////////////////////////////////////////////////////////////////// require 'rbdc' l = Dyncall::ExtLib.new if l.load('user32') != nil puts 'width: ' + l.call(:GetSystemMetrics, 'i)i', 0).to_s puts 'height: ' + l.call(:GetSystemMetrics, 'i)i', 1).to_s puts 'number of monitors: ' + l.call(:GetSystemMetrics, 'i)i', 80).to_s end