OSDN Git Service

first
[psychlops/cpp.git] / psychlops / platform / osx / psychlops_app_init_OSX.cpp
1 /*
2  *  psychlops_app_init.h
3  *  Psychlops Standard Library (Universal)
4  *
5  *  Last Modified 2005/12/17 by Kenchi HOSOKAWA
6  *  (C) 2005 Kenchi HOSOKAWA, Kazushi MARUYA, Takao SATO
7  */
8
9
10
11 #include "psychlops_app_init.h"
12 #include "../../psychlops_lib.h"
13 #include <Carbon/Carbon.h>
14
15 namespace Psychlops {
16
17         bool is_initialized = false;
18
19         void initialize() {
20                 if(!is_initialized) {
21                         randomize();
22                         AppState::initialize();
23                         HumanInterfaceDevice::initialize();
24                         File::initialize();
25                 }
26                 is_initialized = true;
27         }
28
29         void finalize() {
30                 if(is_initialized) {
31                         HumanInterfaceDevice::finalize();
32                 }
33                 is_initialized = false;
34         }
35
36
37 }