libs/neuronet: Implemented the new function NNet_GetMaster.
[neuro.git] / include / neuro / neuro_main.h
blobfa4d78448ab513bbc473459f64ba933902b3f3b4
2 /*
3 * libneuro, a light weight abstraction of high or lower libraries
4 * and toolkit for applications.
5 * Copyright (C) 2005-2006 Nicholas Niro, Robert Lemay
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 /* neuro.h */
24 #ifndef __NEURO_H
25 #define __NEURO_H
27 #include "neuro_engine.h"
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
33 /**
34 * @name
35 * Neuro_Library
37 * @description
38 * <p>
39 * Neuro is a library that combines enough tools to abstract
40 * a broad array of uses for applications. It was primarily coded
41 * for providing a light renderer which can handle which images have
42 * to be drawn first according to their level.
43 * (a painter's algorithm if you prefer) but
44 * it later started to include much more tools that were useful
45 * for way more than just graphical applications.
46 * </p>
48 * <p>
49 * Libneuro has 6 sections :
50 * <ul>
51 * <li><b>extlib</b></li>
52 * <li>debugging --> Neuro_Debug(3)</li>
53 * <li>memory --> Neuro_EBuf(3) </li>
54 * <li>video --> Neuro_Graphics(3) </li>
55 * <li>events --> Neuro_Events(3)</li>
56 * <li>misc</li>
57 * </ul>
58 * <p>
59 * Additionnal optionally embedded Projects (documentation not included)
60 * <ul>
61 * <li>libneuronet --> network interface abstraction layer</li>
62 * <li>libneurogui --> graphical user interface implementation</li>
63 * </ul>
64 * </p>
65 * </p>
66 * <p>
67 * Libneuro was previously fully dependant on SDL but then some
68 * functionalities of SDL weren't perfect and thus it was decided
69 * to make libneuro have it's own abstraction for low level graphical
70 * libraries in order to permit the implementation for other low
71 * level libraries. And that's how the extlib (external library) section
72 * of libneuro was done. The module currently contains 3 main drivers.
73 * X11, SDL and none(or dummy). The X11 driver now being the main driver
74 * for libneuro. The functions in the extlib module are primarily of the Lib_
75 * prefix but they aren't exported to external functions so they can't be used
76 * directly. The misc/other.c module contains Neuro_ bindings for all the
77 * Lib_ functions.
78 * </p>
80 * <p>
81 * memory
82 * </p>
84 * <p>
85 * video
86 * </p>
88 * @examples
90 * -- this is used so external/internal functions can actually
91 * -- stop the main loop from looping. Used to stop the program
92 * -- from running basicly.
93 * static u32 running = 1;
95 * void
96 * main_loop()
97 * {
98 * while (running)
99 * {
100 * -- This function is an absolute necessity for using
101 * -- libneuro as it actually make everything happen internally
102 * Neuro_Poll();
104 * ... -- your own module's polls come here
106 * -- To avoid having the CPU hit high levels from this program
107 * -- due to this loop going endlessly.
108 * Neuro_Sleep(5000);
112 * ...
114 * int _err; -- used to keep the error state of libneuro
116 * _err = Neuro_Init();
117 * if (_err)
118 * return 1;
120 * main_loop();
123 * Neuro_Quit();
127 * @related
128 * Neuro_SetNeuroDebugFilter(3), Neuro_Poll(3), Neuro_Init(3), Neuro_Quit(3)
133 /**
134 * @sdescri
135 * Function which sets which debugging channels will be output or not
137 * @param[in]
138 * see Neuro_Debug(3) for details on the filter format
141 extern void Neuro_SetNeuroDebugFilter(const char *filter);
144 * @sdescri
145 * An alternate way to clean just the debug part of neuro
146 * without having to call Neuro_Quit();
148 extern void Neuro_CleanDebug(void);
150 /** */
151 extern int Neuro_Poll();
153 /** */
154 extern int Neuro_Init();
156 /** */
157 extern void Neuro_Quit();
159 #ifdef __cplusplus
161 #endif
163 #endif /* __MODULE_H */