| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /*
- * category: [misc]
- * apply status:
- * edit status:
- * build status:
- * description:
- */
- #ifndef __TOOLKIT_GLOBAL_H__
- #define __TOOLKIT_GLOBAL_H__
- #include "config.h"
- #include <stdint.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct tk_process_s tk_process_t;
- typedef struct tk_process_option_s tk_process_option_t;
- typedef void (*tk_exit_cb)(tk_process_t*, int64_t);
-
- struct tk_process_s
- {
- int pid;
- HANDLE handle;
- };
- struct tk_process_option_s
- {
- tk_exit_cb exit_cb;
- const char* file;
- char* params;
- uint32_t flags;
- };
- TOOLKIT_API int process_init(tk_process_t* proc);
- TOOLKIT_API int process_spawn(const tk_process_option_t* option, tk_process_t** proc);
- TOOLKIT_API int process_compare(const tk_process_t* proc1, const tk_process_t* proc2);
- TOOLKIT_API void process_close(tk_process_t* proc);
- TOOLKIT_API bool process_exist_or_not(int pid);
- TOOLKIT_API unsigned int toolkit_version(void);
- TOOLKIT_API const char* toolkit_version_string(void);
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //__TOOLKIT_GLOBAL_H__
|