maclight 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b24508bb26e8dd38759e7ac95fa0ff03f6526a08
4
- data.tar.gz: f97b6d155204e429e3c869bd16ec2dc8ccc8cc76
2
+ SHA256:
3
+ metadata.gz: b1a237281b1268ddb97f94efe87643bea60824e0d9ab755a6f34d2f6bfa95bbd
4
+ data.tar.gz: 574ea4d5ff4894f90c1f9c5956b1a94a69a50658c39c8c99c9f85314c3dcf9a0
5
5
  SHA512:
6
- metadata.gz: 168125dcb91528fbeeaa03f4861e73a3e3a82265067cfc368a2e221d6fb6f083f2a9777b3d45a43e678bb64c62d3b268f357d46c5a7249758e2f20d1621f0137
7
- data.tar.gz: ac5f80babb1f27b4addb159fb95b0ae31cefa2aecbf820d3870499eca7d69cb9ebb4cfbdbf0e10e2d78ee21cbc136aee09e6df0509238ed071cf4805696cb814
6
+ metadata.gz: 2fa1f7fa955b4ad9a86abf502f98f858295eb0cfd7529fea95eb8aacef1779608d04be4b3e7be3c26256d5e2ded386ea37f21ddd1055b3af2532d614f6160c05
7
+ data.tar.gz: 56286f016f6d943e1e388936dcabd0941e43c8a31af124775e7774eafe81146060a1b5a8aad21b9cae564ddf0d4a5c652bd1477c95fa58a6be74dfd23744b356
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # MacLight [![Dependency Status](https://gemnasium.com/busyloop/maclight.png)](https://gemnasium.com/busyloop/maclight)
1
+ # MacLight [![Dependency Status](https://gemnasium.com/busyloop/maclight.png)](https://gemnasium.com/busyloop/maclight) [![Gem Version](https://badge.fury.io/rb/maclight.svg)](https://badge.fury.io/rb/maclight)
2
2
 
3
3
  MacLight lets you control the keyboard LEDs on your Mac or Macbook.
4
4
 
@@ -127,13 +127,13 @@ int manipulate_led( int which_led, int led_value )
127
127
 
128
128
  // create a IO HID Manager reference
129
129
  IOHIDManagerRef tIOHIDManagerRef = IOHIDManagerCreate( kCFAllocatorDefault, kIOHIDOptionsTypeNone );
130
- require( tIOHIDManagerRef, Oops );
130
+ __Require( tIOHIDManagerRef, Oops );
131
131
 
132
132
  // Create a device matching dictionary
133
133
  CFDictionaryRef matchingCFDictRef = hu_CreateMatchingDictionaryUsagePageUsage( TRUE,
134
134
  kHIDPage_GenericDesktop,
135
135
  kHIDUsage_GD_Keyboard );
136
- require( matchingCFDictRef, Oops );
136
+ __Require( matchingCFDictRef, Oops );
137
137
 
138
138
  // set the HID device matching dictionary
139
139
  IOHIDManagerSetDeviceMatching( tIOHIDManagerRef, matchingCFDictRef );
@@ -144,11 +144,11 @@ int manipulate_led( int which_led, int led_value )
144
144
 
145
145
  // Now open the IO HID Manager reference
146
146
  IOReturn tIOReturn = IOHIDManagerOpen( tIOHIDManagerRef, kIOHIDOptionsTypeNone );
147
- require_noerr( tIOReturn, Oops );
147
+ __Require_noErr( tIOReturn, Oops );
148
148
 
149
149
  // and copy out its devices
150
150
  CFSetRef deviceCFSetRef = IOHIDManagerCopyDevices( tIOHIDManagerRef );
151
- require( deviceCFSetRef, Oops );
151
+ __Require( deviceCFSetRef, Oops );
152
152
 
153
153
  // how many devices in the set?
154
154
  CFIndex deviceIndex, deviceCount = CFSetGetCount( deviceCFSetRef );
@@ -168,7 +168,7 @@ int manipulate_led( int which_led, int led_value )
168
168
 
169
169
  // before we get into the device loop we'll setup our element matching dictionary
170
170
  matchingCFDictRef = hu_CreateMatchingDictionaryUsagePageUsage( FALSE, kHIDPage_LEDs, 0 );
171
- require( matchingCFDictRef, Oops );
171
+ __Require( matchingCFDictRef, Oops );
172
172
 
173
173
  int pass; // do 256 passes
174
174
  //for ( pass = 0; pass < 256; pass++ ) {
@@ -188,7 +188,7 @@ int manipulate_led( int which_led, int led_value )
188
188
  CFArrayRef elementCFArrayRef = IOHIDDeviceCopyMatchingElements( tIOHIDDeviceRefs[deviceIndex],
189
189
  matchingCFDictRef,
190
190
  kIOHIDOptionsTypeNone );
191
- require( elementCFArrayRef, next_device );
191
+ __Require( elementCFArrayRef, next_device );
192
192
 
193
193
  // for each device on the system these values are divided by the value ranges of all LED elements found
194
194
  // for example, if the first four LED element have a range of 0-1 then the four least significant bits of
@@ -199,7 +199,7 @@ int manipulate_led( int which_led, int led_value )
199
199
  CFIndex elementIndex, elementCount = CFArrayGetCount( elementCFArrayRef );
200
200
  for ( elementIndex = 0; elementIndex < elementCount; elementIndex++ ) {
201
201
  IOHIDElementRef tIOHIDElementRef = ( IOHIDElementRef ) CFArrayGetValueAtIndex( elementCFArrayRef, elementIndex );
202
- require( tIOHIDElementRef, next_element );
202
+ __Require( tIOHIDElementRef, next_element );
203
203
 
204
204
  uint32_t usagePage = IOHIDElementGetUsagePage( tIOHIDElementRef );
205
205
 
@@ -234,7 +234,7 @@ int manipulate_led( int which_led, int led_value )
234
234
  // now set it on the device
235
235
  tIOReturn = IOHIDDeviceSetValue( tIOHIDDeviceRefs[deviceIndex], tIOHIDElementRef, tIOHIDValueRef );
236
236
  CFRelease( tIOHIDValueRef );
237
- require_noerr( tIOReturn, next_element );
237
+ __Require_noErr( tIOReturn, next_element );
238
238
  delayFlag = TRUE; // set this TRUE so we'll delay before changing our LED values again
239
239
  }
240
240
  next_element: ;
@@ -1,3 +1,3 @@
1
1
  module MacLight
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maclight
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-28 00:00:00.000000000 Z
11
+ date: 2018-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: optix
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.5.1
82
+ rubygems_version: 2.7.3
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Control your Mac keyboard LEDs (capslock, numlock)