SDL Visual Test: C:/Users/DELL/Work/sdlvisualtest/visualtest/include/SDL_visualtest_process.h Source File

SDL Visual Test

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SDL_visualtest_process.h
Go to the documentation of this file.
1 /* See COPYING.txt for the full license governing this code. */
8 #include <SDL_platform.h>
9
10 #if defined(__WIN32__)
11 #include <Windows.h>
12 #include <Shlwapi.h>
13 #elif defined(__LINUX__)
14 #include <unistd.h>
15 #else
16 #error "Unsupported platform."
17 #endif
18
19 #ifndef _SDL_visualtest_process_h
20 #define _SDL_visualtest_process_h
21
22 /* Set up for C function definitions, even when using C++ */
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
30 typedef struct SDL_ProcessInfo
31 {
32 //#if defined(_WIN32) || defined(__WIN32__)
33 #if defined(__WIN32__)
34 PROCESS_INFORMATION pi;
35 //#elif defined(__linux__)
36 #elif defined(__LINUX__)
37 int pid;
38 #endif
39 } SDL_ProcessInfo;
40
45 typedef struct SDL_ProcessExitStatus
46 {
47 int exit_success;
48 int exit_status;
49 } SDL_ProcessExitStatus;
50
61 int SDL_LaunchProcess(char* file, char* args, SDL_ProcessInfo* pinfo);
62
72 int SDL_IsProcessRunning(SDL_ProcessInfo* pinfo);
73
83 int SDL_KillProcess(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps);
84
91 int SDL_QuitProcess(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps);
92
103 int SDL_GetProcessExitStatus(SDL_ProcessInfo* pinfo, SDL_ProcessExitStatus* ps);
104
105 /* Ends C function definitions when using C++ */
106 #ifdef __cplusplus
107 }
108 #endif
109
110 #endif /* _SDL_visualtest_process_h */
111