1/*
2 * Copyright (c) 2006-2008, The RubyCocoa Project.
3 * Copyright (c) 2001-2006, FUJIMOTO Hisakuni.
4 * All Rights Reserved.
5 *
6 * RubyCocoa is free software, covered under either the Ruby's license or the
7 * LGPL. See the COPYRIGHT file for more information.
8 */
9
10#ifndef _RBRUNTIME_H_
11#define _RBRUNTIME_H_
12
13#import <objc/objc.h>
14
15/** [API] RBBundleInit
16 *
17 * initialize ruby and rubycocoa for a bundle.
18 * return not 0 when something error.
19 */
20int RBBundleInit (const char* path_to_ruby_program,
21                  Class       objc_class,
22                  id          additional_param);
23
24
25/** [API] RBApplicationInit
26 *
27 * initialize ruby and rubycocoa for a command/application
28 * return 0 when complete, or return not 0 when error.
29 */
30int RBApplicationInit (const char* path_to_ruby_program,
31                       int         argc,
32                       const char* argv[],
33                       id          additional_param);
34
35
36/** [API] RBRubyCocoaInit (for compatibility)
37 *
38 * initialize rubycocoa for a ruby extention library
39 */
40void RBRubyCocoaInit (void);
41
42
43/** [API] RBApplicationMain (for compatibility)
44 *
45 * launch rubycocoa application
46 */
47int
48RBApplicationMain (const char* path_to_ruby_program,
49                   int         argc,
50                   const char* argv[]);
51
52/** [API] RBIsRubyThreadingSupported
53 *
54 * verify if this environment supports the Ruby threading
55 */
56BOOL RBIsRubyThreadingSupported (void);
57
58#endif  // _RBRUNTIME_H_
59