RubyCocoa/RBRuntime.h

Includes:
<objc/objc.h>

Introduction

RubyCocoa Runtime APIs.



Groups

Runtime API functions

Group members:

RBBundleInit

initialize ruby and rubycocoa for a bundle.

RBApplicationInit

initialize ruby and rubycocoa for an application.

 

Runtime API functions (deprecated)

Group members:

RBRubyCocoaInit

deperecated, use RBBundleInit().

RBApplicationMain

deperecated, use RBApplicationInit() and NSApplicationMain().


Functions

RBBundleInit

initialize ruby and rubycocoa for a bundle.

RBApplicationInit

initialize ruby and rubycocoa for an application.

RBRubyCocoaInit

deperecated, use RBBundleInit().

RBApplicationMain

deperecated, use RBApplicationInit() and NSApplicationMain().


RBBundleInit


initialize ruby and rubycocoa for a bundle.

int RBBundleInit (
    const char *path_to_ruby_program, 
    Class objc_class, 
    id additional_param);  
Parameters
path_to_ruby_program

Name of ruby script that run at load.

objc_class

Class for detecting Bundle to load.

additional_param

An optional object for initializing. It can be nil. see RBApplicationInit().

Return Value

0 when complete, or not 0 when error.


RBApplicationInit


initialize ruby and rubycocoa for an application.

int RBApplicationInit (
    const char *path_to_ruby_program, 
    int argc, 
    const char *argv[], 
    id additional_param);  
Parameters
path_to_ruby_program

Name of ruby script that run at launch.

argc

Count of arguments.

argv

Values of argucments.

additional_param

An optional object for initializing. It can be nil. The value can be taken via OSX::BundleSupport._current_bundle() in initializing ruby script.

Return Value

0 when complete, or not 0 when error.

Discussion

An example of main.m of RubyCocoa applications:

 
      int main(int argc, const char* argv[])
      {
          RBApplicationInit("rb_main.rb", argc, argv, nil);
          return NSApplicationMain(argc, argv);
      }
 
 

RBRubyCocoaInit


deperecated, use RBBundleInit().

void RBRubyCocoaInit (
    void);  

Deprecated

in version 1.0.3


RBApplicationMain


deperecated, use RBApplicationInit() and NSApplicationMain().

int RBApplicationMain (
    const char *path_to_ruby_program, 
    int argc, 
    const char *argv[]);  

Deprecated

in version 1.0.3