Class: Boxed
- Inherits:
-
Object
- Object
- Boxed
- Defined in:
- lib/accessibility/core.rb
Overview
AXElements extensions to the Boxed class. The Boxed class is
simply an abstract base class for structs that MacRuby can use
via bridge support.
Class Method Summary collapse
-
.ax_value ⇒ Number
Returns the number that AXAPI uses in order to know how to wrap a struct.
Instance Method Summary collapse
-
#to_ax ⇒ AXValueRef
Create an
AXValueReffrom theBoxedinstance.
Class Method Details
.ax_value ⇒ Number
Returns the number that AXAPI uses in order to know how to wrap a struct.
840 841 842 |
# File 'lib/accessibility/core.rb', line 840 def self.ax_value raise NotImplementedError, "#{self.class} cannot be wraped" end |
Instance Method Details
#to_ax ⇒ AXValueRef
Create an AXValueRef from the Boxed instance. This will only
work if for the most common boxed types, you will need to check
the AXAPI documentation for an up to date list.
855 856 857 858 859 860 |
# File 'lib/accessibility/core.rb', line 855 def to_ax klass = self.class ptr = Pointer.new klass.type ptr.assign self AXValueCreate(klass.ax_value, ptr) end |