Module: OS::Mac::FFI::ObjectiveC Private

Extended by:
NativeLibrary
Defined in:
os/mac/ffi/objective_c.rb

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Class Method Summary collapse

Class Method Details

.class_get(name) ⇒ Fiddle::Pointer

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

Returns:

  • (Fiddle::Pointer)


15
16
17
# File 'os/mac/ffi/objective_c.rb', line 15

def self.class_get(name)
  function("objc_getClass", [Fiddle::TYPE_CONST_STRING], Fiddle::TYPE_VOIDP).call(name)
end

.message_send(receiver, selector_name, argument_types, return_type, *arguments) ⇒ T.untyped

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

Returns:

  • (T.untyped)


33
34
35
36
# File 'os/mac/ffi/objective_c.rb', line 33

def self.message_send(receiver, selector_name, argument_types, return_type, *arguments)
  function("objc_msgSend", [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP, *argument_types], return_type)
    .call(receiver, selector(selector_name), *arguments)
end

.selector(name) ⇒ Fiddle::Pointer

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

Returns:

  • (Fiddle::Pointer)


20
21
22
# File 'os/mac/ffi/objective_c.rb', line 20

def self.selector(name)
  function("sel_registerName", [Fiddle::TYPE_CONST_STRING], Fiddle::TYPE_VOIDP).call(name)
end