@@ -87,15 +87,29 @@ pub struct C.SDL_AsyncIO {
87
87
// NOTE: Opaque type
88
88
}
89
89
90
+ // The asynchronous I/O operation structure.
91
+ //
92
+ // This operates as an opaque handle. One can then request read or write
93
+ // operations on it.
94
+ //
95
+ // NOTE: This struct is available since SDL 3.2.0.
96
+ //
97
+ // See also: SDL_AsyncIOFromFile
90
98
pub type AsyncIO = C.SDL_AsyncIO
91
99
100
+ // Types of asynchronous I/O tasks.
101
+ //
102
+ // NOTE: This enum is available since SDL 3.2.0.
92
103
// AsyncIOTaskType is C.SDL_AsyncIOTaskType
93
104
pub enum AsyncIOTaskType {
94
105
read = C.SDL_ASYNCIO_TASK_READ // `read` A read operation.
95
106
write = C.SDL_ASYNCIO_TASK_WRITE // `write` A write operation.
96
107
close = C.SDL_ASYNCIO_TASK_CLOSE // `close` A close operation.
97
108
}
98
109
110
+ // Possible outcomes of an asynchronous I/O task.
111
+ //
112
+ // NOTE: This enum is available since SDL 3.2.0.
99
113
// AsyncIOResult is C.SDL_AsyncIOResult
100
114
pub enum AsyncIOResult {
101
115
complete = C.SDL_ASYNCIO_COMPLETE // `complete` request was completed without error
@@ -116,13 +130,29 @@ pub mut:
116
130
userdata voidptr // pointer provided by the app when starting the task
117
131
}
118
132
133
+ // Information about a completed asynchronous I/O request.
134
+ //
135
+ // NOTE: This struct is available since SDL 3.2.0.
119
136
pub type AsyncIOOutcome = C.SDL_AsyncIOOutcome
120
137
121
138
@[noinit; typedef]
122
139
pub struct C.SDL_AsyncIOQueue {
123
140
// NOTE: Opaque type
124
141
}
125
142
143
+ // A queue of completed asynchronous I/O tasks.
144
+ //
145
+ // When starting an asynchronous operation, you specify a queue for the new
146
+ // task. A queue can be asked later if any tasks in it have completed,
147
+ // allowing an app to manage multiple pending tasks in one place, in whatever
148
+ // order they complete.
149
+ //
150
+ // NOTE: This struct is available since SDL 3.2.0.
151
+ //
152
+ // See also: SDL_CreateAsyncIOQueue
153
+ // See also: SDL_ReadAsyncIO
154
+ // See also: SDL_WriteAsyncIO
155
+ // See also: SDL_GetAsyncIOResult
126
156
pub type AsyncIOQueue = C.SDL_AsyncIOQueue
127
157
128
158
// C.SDL_AsyncIOFromFile [official documentation](https://wiki.libsdl.org/SDL3/SDL_AsyncIOFromFile)
0 commit comments