grgbrb 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/grgbrb.rb +24 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c59a2e4c43b03fda2e4762156c066979763edb2c
4
+ data.tar.gz: 1005cb97947e10a6a8ea1f78553fe8d55bbc26db
5
+ SHA512:
6
+ metadata.gz: 6baccdd2224fbd640641897bd8e02dec7d870c67f4d3fc15e0bae1bc2d1336096f9c0de06f4722fe17e2437c10c1855b9287c7489f20b30bae63045892ff03b7
7
+ data.tar.gz: 74b7da2a65d467793174cafd8ce5c41a3f5333cd6ac331ca7a2c8f2316396b97e0199b9034f98fd8dcf3d2e1cf14e3c962a3a1038c40afa1be14f95e0af18999
@@ -0,0 +1,24 @@
1
+ require 'fiddle'
2
+
3
+ # Allows control of Logitech G LEDs. Call GLed.init before use.
4
+ module GLed
5
+ # Initialises the library. The parameter should be the Ruby
6
+ # installation's bitness architecture, either 86 or 64.
7
+ def self.init(installation_type = '64')
8
+ @lib = Fiddle.dlopen('C:\Program Files\Logitech Gaming Software\SDK\LED' \
9
+ "\\x#{installation_type}\\LogitechLed.dll")
10
+
11
+ Fiddle::Function.new(@lib['LogiLedInit'], [], Fiddle::TYPE_VOID).call
12
+ end
13
+
14
+ # Sets the RGB values of the mouse color. Each value is out of 100.
15
+ def self.set_color(red, green, blue)
16
+ fiddle_fun = Fiddle::Function.new(
17
+ @lib['LogiLedSetLighting'],
18
+ [Fiddle::TYPE_INT] * 3,
19
+ Fiddle::TYPE_VOID
20
+ )
21
+
22
+ fiddle_fun.call(red, green, blue)
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: grgbrb
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Aaron Christiansen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-05-29 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: aaronc20000@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/grgbrb.rb
20
+ homepage:
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.6.14
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Control Logitech G hardware's RGB from Ruby
44
+ test_files: []