Class: Vigilem::Win32API::PINPUT_RECORD

Inherits:
Object
  • Object
show all
Includes:
FFI::ArrayPointerSync
Defined in:
lib/vigilem/win32_api/p_input__record.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_len_or_ptr, *init_values) ⇒ PINPUT_RECORD

Returns a new instance of PINPUT_RECORD.

Parameters:

  • max_len_or_ptr (Integer || FFI::Pointer)
  • (Array)

See Also:

  • ArrayPointerSync#initialize_array_sync


14
15
16
# File 'lib/vigilem/win32_api/p_input__record.rb', line 14

def initialize(max_len_or_ptr, *init_values)
  initialize_ary_ptr_sync(max_len_or_ptr, *init_values)
end

Class Method Details

.ary_typeClass || Symbol

Returns:

  • (Class || Symbol)


29
30
31
# File 'lib/vigilem/win32_api/p_input__record.rb', line 29

def ary_type
  INPUT_RECORD
end

.from_native(value, ctx) ⇒ PINPUT_RECORD

Converts the specified value from the native type.

Parameters:

  • value
  • ctx

Returns:



37
38
39
# File 'lib/vigilem/win32_api/p_input__record.rb', line 37

def from_native(value, ctx)
  new(value)
end

.from_pointer(pointer) ⇒ self

Parameters:

  • (FFI::Pointer)

Returns:

  • (self)


23
24
25
# File 'lib/vigilem/win32_api/p_input__record.rb', line 23

def from_pointer(pointer)
  new(pointer)
end

.to_native(value, ctx) ⇒ FFI::Pointer

Converts the specified value to the native type.

Parameters:

  • value
  • ctx

Returns:

  • (FFI::Pointer)


45
46
47
# File 'lib/vigilem/win32_api/p_input__record.rb', line 45

def to_native(value, ctx)
  value.ptr
end