class GirFFI::Struct

Public Class Methods

copy_value_to_pointer(value, pointer, offset=0) click to toggle source

TODO: Find method to directly copy bytes, rather than reading and putting them.

# File lib/gir_ffi-base/gir_ffi/struct.rb, line 19
def self.copy_value_to_pointer value, pointer, offset=0
  pointer.put_bytes offset, value.to_ptr.read_bytes(size), 0, size
end
from_native(value, context) click to toggle source
# File lib/gir_ffi-base/gir_ffi/struct.rb, line 13
def self.from_native value, context
  value
end
get_value_from_pointer(pointer) click to toggle source
# File lib/gir_ffi-base/gir_ffi/struct.rb, line 23
def self.get_value_from_pointer pointer
  pointer.to_ptr
end
native_type() click to toggle source
# File lib/gir_ffi-base/gir_ffi/struct.rb, line 5
def self.native_type
  FFI::Type::Struct.new(self)
end
to_native(value, context) click to toggle source
# File lib/gir_ffi-base/gir_ffi/struct.rb, line 9
def self.to_native value, context
  value
end