cmd.h
Go to the documentation of this file.00001
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00035 void Cbuf_Init(void);
00036
00039
00040 void Cbuf_AddText(const char *text);
00041
00044
00045
00046 void Cbuf_InsertText(const char *text);
00047
00050 void Cbuf_AddEarlyCommands(qboolean clear);
00051
00057 qboolean Cbuf_AddLateCommands(void);
00058
00065 void Cbuf_Execute(void);
00066
00071 void Cbuf_CopyToDefer(void);
00072 void Cbuf_InsertFromDefer(void);
00073
00074 #ifdef DEBUG
00075 void Cmd_PrintDebugCommands(void);
00076 #endif
00077
00078
00079
00080
00081
00082 typedef void (*xcommand_t) (void);
00083
00084 typedef struct cmdList_s {
00085 const char *name;
00086 xcommand_t function;
00087 const char *description;
00088 } cmdList_t;
00089
00090 void Cmd_Init(void);
00091 void Cmd_Shutdown(void);
00092
00100 void Cmd_AddCommand(const char *cmd_name, xcommand_t function, const char *desc);
00101
00102 void Cmd_RemoveCommand(const char *cmd_name);
00103
00104 #define MAX_COMPLETE 128
00105 extern void Cmd_AddParamCompleteFunction(const char *cmd_name, int (*function)(const char *partial, const char **match));
00106
00107 void Cmd_AddParamCompleteFunction(const char *cmd_name, int (*function)(const char *partial, const char **match));
00108
00109 void Cmd_AddUserdata(const char *cmd_name, void* userdata);
00110 void* Cmd_GetUserdata (const char *cmd_name);
00111
00112 int Cmd_GenericCompleteFunction(size_t len, const char **match, int matches, const char **list);
00113
00117 qboolean Cmd_Exists(const char *cmd_name);
00118
00123 int Cmd_CompleteCommandParameters(const char *command, const char *partial, const char **match);
00124 int Cmd_CompleteCommand(const char *partial, const char **match);
00125
00131 int Cmd_Argc(void);
00132 const char *Cmd_Argv(int arg);
00133 const char *Cmd_Args(void);
00134 void *Cmd_Userdata(void);
00135
00140 void Cmd_TokenizeString(const char *text, qboolean macroExpand);
00141
00146 void Cmd_ExecuteString(const char *text);
00147
00153 void Cmd_ForwardToServer(void);
00154
00158 const char* Cmd_GetCommandDesc(const char* command);
00159
00163 void Cmd_BufClear(void);
00164
00169 void Cmd_WriteAliases(qFILE *f);
00170
00174 void Cmd_Dummy_f(void);