@@ -106,7 +106,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardText(const char *text);
106106/**
107107 * Get UTF-8 text from the clipboard.
108108 *
109- * This functions returns an empty string if there was not enough memory left
109+ * This function returns an empty string if there is not enough memory left
110110 * for a copy of the clipboard's content.
111111 *
112112 * \returns the clipboard text on success or an empty string on failure; call
@@ -155,7 +155,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetPrimarySelectionText(const char *text);
155155/**
156156 * Get UTF-8 text from the primary selection.
157157 *
158- * This functions returns an empty string if there was not enough memory left
158+ * This function returns an empty string if there is not enough memory left
159159 * for a copy of the primary selection's content.
160160 *
161161 * \returns the primary selection text on success or an empty string on
@@ -194,15 +194,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasPrimarySelectionText(void);
194194 * clipboard is cleared or new data is set. The clipboard is automatically
195195 * cleared in SDL_Quit().
196196 *
197- * \param userdata a pointer to provided user data.
197+ * \param userdata a pointer to the provided user data.
198198 * \param mime_type the requested mime-type.
199199 * \param size a pointer filled in with the length of the returned data.
200200 * \returns a pointer to the data for the provided mime-type. Returning NULL
201- * or setting length to 0 will cause no data to be sent to the
202- * "receiver". It is up to the receiver to handle this. Essentially
203- * returning no data is more or less undefined behavior and may cause
204- * breakage in receiving applications. The returned data will not be
205- * freed so it needs to be retained and dealt with internally.
201+ * or setting the length to 0 will cause zero length data to be sent
202+ * to the "receiver", which should be able to handle this. The
203+ * returned data will not be freed, so it needs to be retained and
204+ * dealt with internally.
206205 *
207206 * \since This function is available since SDL 3.2.0.
208207 *
@@ -211,10 +210,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasPrimarySelectionText(void);
211210typedef const void * (SDLCALL * SDL_ClipboardDataCallback )(void * userdata , const char * mime_type , size_t * size );
212211
213212/**
214- * Callback function that will be called when the clipboard is cleared, or new
215- * data is set.
213+ * Callback function that will be called when the clipboard is cleared, or
214+ * when new data is set.
216215 *
217- * \param userdata a pointer to provided user data.
216+ * \param userdata a pointer to the provided user data.
218217 *
219218 * \since This function is available since SDL 3.2.0.
220219 *
@@ -231,15 +230,16 @@ typedef void (SDLCALL *SDL_ClipboardCleanupCallback)(void *userdata);
231230 * respond with the data for the requested mime-type.
232231 *
233232 * The size of text data does not include any terminator, and the text does
234- * not need to be null terminated (e.g. you can directly copy a portion of a
233+ * not need to be null- terminated (e.g., you can directly copy a portion of a
235234 * document).
236235 *
237236 * \param callback a function pointer to the function that provides the
238237 * clipboard data.
239238 * \param cleanup a function pointer to the function that cleans up the
240239 * clipboard data.
241240 * \param userdata an opaque pointer that will be forwarded to the callbacks.
242- * \param mime_types a list of mime-types that are being offered.
241+ * \param mime_types a list of mime-types that are being offered. SDL copies
242+ * the given list.
243243 * \param num_mime_types the number of mime-types in the mime_types list.
244244 * \returns true on success or false on failure; call SDL_GetError() for more
245245 * information.
@@ -269,10 +269,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetClipboardData(SDL_ClipboardDataCallback
269269extern SDL_DECLSPEC bool SDLCALL SDL_ClearClipboardData (void );
270270
271271/**
272- * Get the data from clipboard for a given mime type.
272+ * Get the data from the clipboard for a given mime type.
273273 *
274274 * The size of text data does not include the terminator, but the text is
275- * guaranteed to be null terminated.
275+ * guaranteed to be null- terminated.
276276 *
277277 * \param mime_type the mime type to read from the clipboard.
278278 * \param size a pointer filled in with the length of the returned data.
@@ -292,8 +292,8 @@ extern SDL_DECLSPEC void * SDLCALL SDL_GetClipboardData(const char *mime_type, s
292292/**
293293 * Query whether there is data in the clipboard for the provided mime type.
294294 *
295- * \param mime_type the mime type to check for data for .
296- * \returns true if there exists data in clipboard for the provided mime type,
295+ * \param mime_type the mime type to check for data.
296+ * \returns true if data exists in the clipboard for the provided mime type,
297297 * false if it does not.
298298 *
299299 * \threadsafety This function should only be called on the main thread.
@@ -310,7 +310,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_HasClipboardData(const char *mime_type);
310310 *
311311 * \param num_mime_types a pointer filled with the number of mime types, may
312312 * be NULL.
313- * \returns a null terminated array of strings with mime types, or NULL on
313+ * \returns a null- terminated array of strings with mime types, or NULL on
314314 * failure; call SDL_GetError() for more information. This should be
315315 * freed with SDL_free() when it is no longer needed.
316316 *
0 commit comments