Class: Fidget::Platform

Inherits:
Object
  • Object
show all
Defined in:
lib/fidget/platform/null.rb,
lib/fidget/platform/linux.rb,
lib/fidget/platform/darwin.rb,
lib/fidget/platform/windows.rb

Constant Summary collapse

ES_CONTINUOUS =
0x80000000
ES_SYSTEM_REQUIRED =
0x00000001
ES_DISPLAY_REQUIRED =
0x00000002
ES_AWAYMODE_REQUIRED =
0x00000040
KB_EVENT_KEYPRESS =
0
KB_EVENT_KEYUP =
2
KB_KEY_F24 =
0x87

Class Method Summary collapse

Class Method Details

.allow_sleepObject



16
17
18
# File 'lib/fidget/platform/null.rb', line 16

def self.allow_sleep
  false
end

.current_process(options) ⇒ Object



2
3
4
# File 'lib/fidget/platform/null.rb', line 2

def self.current_process(options)
  false
end

.prevent_sleep(options) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/fidget/platform/null.rb', line 6

def self.prevent_sleep(options)
  return false

  # prevent sleep
  if block_given?
    yield
    # allow sleep
  end
end

.simulateObject



20
21
22
# File 'lib/fidget/platform/null.rb', line 20

def self.simulate
  false
end