cfgvar.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef CSOUND_CFGVAR_H
00025 #define CSOUND_CFGVAR_H
00026
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030
00031
00032
00033 typedef struct csCfgVariableHead_s {
00034 union csCfgVariable_u *nxt;
00035 unsigned char *name;
00036 void *p;
00037 int type;
00038 int flags;
00039 unsigned char *shortDesc;
00040 unsigned char *longDesc;
00041 } csCfgVariableHead_t;
00042
00043
00044
00045 typedef struct csCfgVariableInt_s {
00046 union csCfgVariable_u *nxt;
00047 unsigned char *name;
00048 int *p;
00049 int type;
00050 int flags;
00051 unsigned char *shortDesc;
00052 unsigned char *longDesc;
00053 int min;
00054 int max;
00055 } csCfgVariableInt_t;
00056
00057
00058
00059 typedef struct csCfgVariableBoolean_s {
00060 union csCfgVariable_u *nxt;
00061 unsigned char *name;
00062 int *p;
00063 int type;
00064 int flags;
00065 unsigned char *shortDesc;
00066 unsigned char *longDesc;
00067 } csCfgVariableBoolean_t;
00068
00069
00070
00071 typedef struct csCfgVariableFloat_s {
00072 union csCfgVariable_u *nxt;
00073 unsigned char *name;
00074 float *p;
00075 int type;
00076 int flags;
00077 unsigned char *shortDesc;
00078 unsigned char *longDesc;
00079 float min;
00080 float max;
00081 } csCfgVariableFloat_t;
00082
00083
00084
00085 typedef struct csCfgVariableDouble_s {
00086 union csCfgVariable_u *nxt;
00087 unsigned char *name;
00088 double *p;
00089 int type;
00090 int flags;
00091 unsigned char *shortDesc;
00092 unsigned char *longDesc;
00093 double min;
00094 double max;
00095 } csCfgVariableDouble_t;
00096
00097
00098
00099 typedef struct csCfgVariableMYFLT_s {
00100 union csCfgVariable_u *nxt;
00101 unsigned char *name;
00102 MYFLT *p;
00103 int type;
00104 int flags;
00105 unsigned char *shortDesc;
00106 unsigned char *longDesc;
00107 MYFLT min;
00108 MYFLT max;
00109 } csCfgVariableMYFLT_t;
00110
00111
00112
00113 typedef struct csCfgVariableString_s {
00114 union csCfgVariable_u *nxt;
00115 unsigned char *name;
00116 char *p;
00117 int type;
00118 int flags;
00119 unsigned char *shortDesc;
00120 unsigned char *longDesc;
00121 int maxlen;
00122 } csCfgVariableString_t;
00123
00124
00125
00126 typedef union csCfgVariable_u {
00127 csCfgVariableHead_t h;
00128 csCfgVariableInt_t i;
00129 csCfgVariableBoolean_t b;
00130 csCfgVariableFloat_t f;
00131 csCfgVariableDouble_t d;
00132 csCfgVariableMYFLT_t m;
00133 csCfgVariableString_t s;
00134 } csCfgVariable_t;
00135
00136
00137
00138 #define CSOUNDCFG_INTEGER 1
00139 #define CSOUNDCFG_BOOLEAN 2
00140 #define CSOUNDCFG_FLOAT 3
00141 #define CSOUNDCFG_DOUBLE 4
00142 #define CSOUNDCFG_MYFLT 5
00143 #define CSOUNDCFG_STRING 6
00144
00145
00146
00147 #define CSOUNDCFG_POWOFTWO 0x00000001
00148
00149
00150
00151 #define CSOUNDCFG_SUCCESS 0
00152 #define CSOUNDCFG_INVALID_NAME -1
00153 #define CSOUNDCFG_INVALID_TYPE -2
00154 #define CSOUNDCFG_INVALID_FLAG -3
00155 #define CSOUNDCFG_NULL_POINTER -4
00156 #define CSOUNDCFG_TOO_HIGH -5
00157 #define CSOUNDCFG_TOO_LOW -6
00158 #define CSOUNDCFG_NOT_POWOFTWO -7
00159 #define CSOUNDCFG_INVALID_BOOLEAN -8
00160 #define CSOUNDCFG_MEMORY -9
00161 #define CSOUNDCFG_STRING_LENGTH -10
00162
00163 #define CSOUNDCFG_LASTERROR -10
00164
00165
00166
00167
00168 #if (defined(macintosh) && defined(__MWERKS__))
00169 # pragma export on
00170 #endif
00171
00212 #if 0
00213 PUBLIC int
00214 csoundCreateGlobalConfigurationVariable(const char *name,
00215 void *p, int type, int flags,
00216 void *min, void *max,
00217 const char *shortDesc,
00218 const char *longDesc);
00219 #endif
00220
00229 PUBLIC int
00230 csoundCreateConfigurationVariable(CSOUND *csound, const char *name,
00231 void *p, int type, int flags,
00232 void *min, void *max,
00233 const char *shortDesc,
00234 const char *longDesc);
00235
00241 #if 0
00242 PUBLIC int csoundCopyGlobalConfigurationVariable(CSOUND *csound,
00243 const char *name, void *p);
00244 #endif
00245
00251 #if 0
00252 PUBLIC int csoundCopyGlobalConfigurationVariables(CSOUND *csound);
00253 #endif
00254
00274 #if 0
00275 PUBLIC int csoundSetGlobalConfigurationVariable(const char *name,
00276 void *value);
00277 #endif
00278
00284 PUBLIC int csoundSetConfigurationVariable(CSOUND *csound, const char *name,
00285 void *value);
00286
00306 #if 0
00307 PUBLIC int csoundParseGlobalConfigurationVariable(const char *name,
00308 const char *value);
00309 #endif
00310
00317 PUBLIC int csoundParseConfigurationVariable(CSOUND *csound, const char *name,
00318 const char *value);
00319
00325 #if 0
00326 PUBLIC csCfgVariable_t
00327 *csoundQueryGlobalConfigurationVariable(const char *name);
00328 #endif
00329
00335 PUBLIC csCfgVariable_t
00336 *csoundQueryConfigurationVariable(CSOUND *csound, const char *name);
00337
00346 #if 0
00347 PUBLIC csCfgVariable_t **csoundListGlobalConfigurationVariables(void);
00348 #endif
00349
00359 PUBLIC csCfgVariable_t **csoundListConfigurationVariables(CSOUND *csound);
00360
00366 PUBLIC void csoundDeleteCfgVarList(csCfgVariable_t **lst);
00367
00375 #if 0
00376 PUBLIC int csoundDeleteGlobalConfigurationVariable(const char *name);
00377 #endif
00378
00386 PUBLIC int csoundDeleteConfigurationVariable(CSOUND *csound,
00387 const char *name);
00388
00395 #if 0
00396 PUBLIC int csoundDeleteAllGlobalConfigurationVariables(void);
00397 #endif
00398
00403 PUBLIC const char *csoundCfgErrorCodeToString(int errcode);
00404
00405
00406 #if (defined(macintosh) && defined(__MWERKS__))
00407 # pragma export off
00408 #endif
00409
00410 #ifdef __cplusplus
00411 }
00412 #endif
00413
00414 #endif
00415