split servicepoint_binding_uniffi into own crate
Some checks failed
Rust / build (push) Has been cancelled
Some checks failed
Rust / build (push) Has been cancelled
This commit is contained in:
parent
2f7a2dfd62
commit
21931f847f
94 changed files with 158 additions and 9856 deletions
3
libraries/ruby/example/Gemfile
Normal file
3
libraries/ruby/example/Gemfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'servicepoint', path: '..'
|
19
libraries/ruby/example/Gemfile.lock
Normal file
19
libraries/ruby/example/Gemfile.lock
Normal file
|
@ -0,0 +1,19 @@
|
|||
PATH
|
||||
remote: ..
|
||||
specs:
|
||||
servicepoint (0.0.0)
|
||||
ffi
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
ffi (1.17.0-x86_64-linux-gnu)
|
||||
|
||||
PLATFORMS
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
servicepoint!
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.27
|
25
libraries/ruby/example/example.rb
Normal file
25
libraries/ruby/example/example.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
require_relative "../lib/servicepoint_binding_uniffi"
|
||||
|
||||
include ServicepointBindingUniffi
|
||||
|
||||
connection = Connection.new("172.23.42.29:2342")
|
||||
|
||||
pixels = Bitmap.new_max_sized
|
||||
x_offset = 0
|
||||
loop do
|
||||
|
||||
pixels.fill(false)
|
||||
|
||||
(0..((pixels.height) -1)).each do |y|
|
||||
pixels.set((y + x_offset) % pixels.width, y, true);
|
||||
end
|
||||
|
||||
command = Command.bitmap_linear_win(0, 0, pixels, CompressionCode::UNCOMPRESSED)
|
||||
|
||||
connection.send(command)
|
||||
sleep 0.0005
|
||||
|
||||
x_offset += 1
|
||||
end
|
||||
|
||||
|
3
libraries/ruby/example/example.sh
Executable file
3
libraries/ruby/example/example.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
LD_LIBRARY_PATH="../../../../../target/release:$LD_LIBRARY_PATH" ruby example.rb
|
2003
libraries/ruby/lib/servicepoint_binding_uniffi.rb
Normal file
2003
libraries/ruby/lib/servicepoint_binding_uniffi.rb
Normal file
File diff suppressed because it is too large
Load diff
13
libraries/ruby/servicepoint.gemspec
Normal file
13
libraries/ruby/servicepoint.gemspec
Normal file
|
@ -0,0 +1,13 @@
|
|||
Gem::Specification.new do |s|
|
||||
s.name = "servicepoint"
|
||||
s.version = "0.13.1"
|
||||
s.summary = ""
|
||||
s.description = ""
|
||||
s.authors = ["kaesaecracker"]
|
||||
s.email = ""
|
||||
s.files = ["lib/servicepoint_binding_uniffi.rb"]
|
||||
s.homepage =
|
||||
"https://rubygems.org/gems/hola"
|
||||
s.license = "MIT"
|
||||
s.add_dependency 'ffi'
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue