Module: SDL::Mac::ObjC
- Extended by:
- NiceFFI::Library
- Defined in:
- lib/ruby-sdl-ffi/sdl/mac.rb
Defined Under Namespace
Classes: NSClass, NSObject, NSString
Class Method Summary
collapse
-
.msgSend(id, selector, *args) ⇒ Object
-
.msgSend_bool(id, selector, *args) ⇒ Object
-
.msgSend_int(id, selector, *args) ⇒ Object
-
.msgSend_ptr(id, selector, *args) ⇒ Object
-
.msgSend_str(id, selector, *args) ⇒ Object
-
.NSClass(*args) ⇒ Object
-
.NSObject(*args) ⇒ Object
-
.NSString(*args) ⇒ Object
-
.sel(name) ⇒ Object
Class Method Details
.msgSend(id, selector, *args) ⇒ Object
230
231
232
233
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 230
def self.msgSend( id, selector, *args )
selector = self.sel(selector) if selector.is_a? String
NSObject.new( __msgSend( id, selector, *args ) )
end
|
.msgSend_bool(id, selector, *args) ⇒ Object
246
247
248
249
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 246
def self.msgSend_bool( id, selector, *args )
selector = self.sel(selector) if selector.is_a? String
( __msgSend_int( id, selector, *args ) == 0 ) ? false : true
end
|
.msgSend_int(id, selector, *args) ⇒ Object
242
243
244
245
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 242
def self.msgSend_int( id, selector, *args )
selector = self.sel(selector) if selector.is_a? String
__msgSend_int( id, selector, *args )
end
|
.msgSend_ptr(id, selector, *args) ⇒ Object
234
235
236
237
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 234
def self.msgSend_ptr( id, selector, *args )
selector = self.sel(selector) if selector.is_a? String
__msgSend( id, selector, *args )
end
|
.msgSend_str(id, selector, *args) ⇒ Object
238
239
240
241
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 238
def self.msgSend_str( id, selector, *args )
selector = self.sel(selector) if selector.is_a? String
NSString.new( __msgSend( id, selector, *args ) )
end
|
.NSClass(*args) ⇒ Object
200
201
202
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 200
def self.NSClass( *args )
NSClass.new( *args )
end
|
.NSObject(*args) ⇒ Object
185
186
187
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 185
def self.NSObject( *args )
NSObject.new( *args )
end
|
.NSString(*args) ⇒ Object
222
223
224
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 222
def self.NSString( *args )
NSString.new( *args )
end
|
.sel(name) ⇒ Object
261
262
263
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 261
def self.sel( name )
sel_registerName( name.to_s )
end
|