Subversion Repositories Kolibri OS

Rev

Rev 2099 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2006 jaeger 1
#include "tp.h"
2
 
3
extern tp_obj kolibri_open(TP);
2099 jaeger 4
extern tp_obj kolibri_mainwindow(TP);
8475 superturbo 5
extern tp_obj kolibri_debug_print(TP);
2099 jaeger 6
extern tp_obj kolibri_socket_module(TP);
2006 jaeger 7
extern tp_obj tp_dict(TP);
8
extern tp_obj tp_fnc(TP,tp_obj v(TP));
9
 
10
void kolibri_init(TP)
11
{
12
    tp_obj kolibri_mod = tp_dict(tp);
2099 jaeger 13
    tp_obj socket_mod = kolibri_socket_module(tp);
2006 jaeger 14
 
15
    tp_set(tp, kolibri_mod, tp_string("open"), tp_fnc(tp, kolibri_open));
2099 jaeger 16
    tp_set(tp, kolibri_mod, tp_string("window"), tp_fnc(tp, kolibri_mainwindow));
8475 superturbo 17
    /* debug */
18
    tp_set(tp, kolibri_mod, tp_string("debug_print"), tp_fnc(tp, kolibri_debug_print));
2099 jaeger 19
    /* socket is a separated module. */
20
    tp_set(tp, kolibri_mod, tp_string("socket"), socket_mod);
2006 jaeger 21
 
22
    /* Bind module attributes. */
23
    tp_set(tp, kolibri_mod, tp_string("__doc__"),
24
        tp_string("KolibriOS system specific functions."));
25
    tp_set(tp, kolibri_mod, tp_string("__name__"), tp_string("kolibri"));
26
    tp_set(tp, kolibri_mod, tp_string("__file__"), tp_string(__FILE__));
27
    /* Bind to tiny modules[] */
28
    tp_set(tp, tp->modules, tp_string("kolibri"), kolibri_mod);
29
}