| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
#ifndef __ULIB_STD_H__ |
| 34 |
#define __ULIB_STD_H__ |
| 35 |
|
| 36 |
#include "chuck_dl.h" |
| 37 |
#include "chuck_oo.h" |
| 38 |
|
| 39 |
|
| 40 |
DLL_QUERY libstd_query( Chuck_DL_Query * QUERY ); |
| 41 |
|
| 42 |
|
| 43 |
CK_DLL_SFUN( abs_impl ); |
| 44 |
CK_DLL_SFUN( fabs_impl ); |
| 45 |
CK_DLL_SFUN( rand_impl ); |
| 46 |
CK_DLL_SFUN( randf_impl ); |
| 47 |
CK_DLL_SFUN( rand2f_impl ); |
| 48 |
CK_DLL_SFUN( rand2_impl ); |
| 49 |
CK_DLL_SFUN( srand_impl ); |
| 50 |
CK_DLL_SFUN( sgn_impl ); |
| 51 |
CK_DLL_SFUN( system_impl ); |
| 52 |
CK_DLL_SFUN( atoi_impl ); |
| 53 |
CK_DLL_SFUN( atof_impl ); |
| 54 |
CK_DLL_SFUN( itoa_impl ); |
| 55 |
CK_DLL_SFUN( ftoa_impl ); |
| 56 |
CK_DLL_SFUN( ftoi_impl ); |
| 57 |
CK_DLL_SFUN( getenv_impl ); |
| 58 |
CK_DLL_SFUN( getenv2_impl ); |
| 59 |
CK_DLL_SFUN( setenv_impl ); |
| 60 |
|
| 61 |
CK_DLL_SFUN( mtof_impl ); |
| 62 |
CK_DLL_SFUN( ftom_impl ); |
| 63 |
CK_DLL_SFUN( powtodb_impl ); |
| 64 |
CK_DLL_SFUN( rmstodb_impl ); |
| 65 |
CK_DLL_SFUN( dbtopow_impl ); |
| 66 |
CK_DLL_SFUN( dbtorms_impl ); |
| 67 |
CK_DLL_SFUN( dbtolin_impl ); |
| 68 |
CK_DLL_SFUN( lintodb_impl ); |
| 69 |
CK_DLL_SFUN( clamp_impl ); |
| 70 |
CK_DLL_SFUN( clampf_impl ); |
| 71 |
CK_DLL_SFUN( scalef_impl ); |
| 72 |
CK_DLL_SFUN( range1_impl ); |
| 73 |
CK_DLL_SFUN( range2_impl ); |
| 74 |
CK_DLL_SFUN( range3_impl ); |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
class CBufferAdvance; |
| 81 |
struct ChucK_Object; |
| 82 |
struct XThread; |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
class KBHit : public Chuck_Event |
| 92 |
{ |
| 93 |
public: |
| 94 |
KBHit(); |
| 95 |
~KBHit(); |
| 96 |
|
| 97 |
public: |
| 98 |
t_CKBOOL open(); |
| 99 |
t_CKBOOL close(); |
| 100 |
void on(); |
| 101 |
void off(); |
| 102 |
t_CKBOOL good() { return m_valid; } |
| 103 |
t_CKBOOL state() { return m_onoff; } |
| 104 |
|
| 105 |
public: |
| 106 |
void set_echo( t_CKBOOL echo ) { m_echo = echo; } |
| 107 |
t_CKBOOL get_echo() { return m_echo; } |
| 108 |
|
| 109 |
public: |
| 110 |
t_CKBOOL empty(); |
| 111 |
t_CKINT getch(); |
| 112 |
|
| 113 |
public: |
| 114 |
CBufferAdvance * m_buffer; |
| 115 |
t_CKUINT m_read_index; |
| 116 |
t_CKBOOL m_valid; |
| 117 |
t_CKBOOL m_onoff; |
| 118 |
t_CKBOOL m_echo; |
| 119 |
Chuck_Object * SELF; |
| 120 |
}; |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
class KBHitManager |
| 130 |
{ |
| 131 |
public: |
| 132 |
static t_CKBOOL init(); |
| 133 |
static void shutdown(); |
| 134 |
static void on(); |
| 135 |
static void off(); |
| 136 |
static t_CKBOOL open( KBHit * kb ); |
| 137 |
static t_CKBOOL close( KBHit * kb ); |
| 138 |
|
| 139 |
public: |
| 140 |
static CBufferAdvance * the_buf; |
| 141 |
static t_CKINT the_onoff; |
| 142 |
static t_CKBOOL the_init; |
| 143 |
static XThread * the_thread; |
| 144 |
}; |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
#endif |