@@ -21,56 +21,56 @@ namespace raylib {
2121/* *
2222 * Initialize window and OpenGL context
2323 */
24- [[maybe_unused]] RLCPPAPI inline void InitWindow (int width, int height, const std::string& title = " raylib" ) {
24+ [[maybe_unused]] RLCPPAPI inline void InitWindow (int width, int height, const std::string& title = " raylib" ) {
2525 ::InitWindow (width, height, title.c_str());
2626}
2727
2828/* *
2929 * Set title for window
3030 */
31- [[maybe_unused]] RLCPPAPI inline void SetWindowTitle (const std::string& title) {
31+ [[maybe_unused]] RLCPPAPI inline void SetWindowTitle (const std::string& title) {
3232 ::SetWindowTitle (title.c_str());
3333}
3434
3535/* *
3636 * Get the human-readable, UTF-8 encoded name of the primary monitor
3737 */
38- [[maybe_unused]] RLCPPAPI inline std::string GetMonitorName (int monitor = 0 ) {
38+ [[maybe_unused]] RLCPPAPI inline std::string GetMonitorName (int monitor = 0 ) {
3939 return ::GetMonitorName (monitor);
4040}
4141
4242/* *
4343 * Set clipboard text content
4444 */
45- [[maybe_unused]] RLCPPAPI inline void SetClipboardText (const std::string& text) {
45+ [[maybe_unused]] RLCPPAPI inline void SetClipboardText (const std::string& text) {
4646 ::SetClipboardText (text.c_str());
4747}
4848
4949/* *
5050 * Get clipboard text content
5151 */
52- [[maybe_unused]] RLCPPAPI inline std::string GetClipboardText () {
52+ [[maybe_unused]] RLCPPAPI inline std::string GetClipboardText () {
5353 return ::GetClipboardText ();
5454}
5555
5656/* *
5757 * Takes a screenshot of current screen (saved a .png)
5858 */
59- [[maybe_unused]] RLCPPAPI inline void TakeScreenshot (const std::string& fileName) {
59+ [[maybe_unused]] RLCPPAPI inline void TakeScreenshot (const std::string& fileName) {
6060 ::TakeScreenshot (fileName.c_str());
6161}
6262
6363/* *
6464 * Get gamepad internal name id
6565 */
66- [[maybe_unused]] RLCPPAPI inline std::string GetGamepadName (int gamepad) {
66+ [[maybe_unused]] RLCPPAPI inline std::string GetGamepadName (int gamepad) {
6767 return ::GetGamepadName (gamepad);
6868}
6969
7070/* *
7171 * Load text data from file (read)
7272 */
73- [[maybe_unused]] RLCPPAPI std::string LoadFileText (const std::string& fileName) {
73+ [[maybe_unused]] RLCPPAPI std::string LoadFileText (const std::string& fileName) {
7474 char * text = ::LoadFileText (fileName.c_str ());
7575 std::string output (text);
7676 ::UnloadFileText (text);
@@ -80,77 +80,77 @@ namespace raylib {
8080/* *
8181 * Save text data to file (write)
8282 */
83- [[maybe_unused]] RLCPPAPI inline bool SaveFileText (const std::string& fileName, const std::string& text) {
83+ [[maybe_unused]] RLCPPAPI inline bool SaveFileText (const std::string& fileName, const std::string& text) {
8484 return ::SaveFileText (fileName.c_str (), const_cast <char *>(text.c_str ()));
8585}
8686
8787/* *
8888 * Check if file exists
8989 */
90- [[maybe_unused]] RLCPPAPI inline bool FileExists (const std::string& fileName) {
90+ [[maybe_unused]] RLCPPAPI inline bool FileExists (const std::string& fileName) {
9191 return ::FileExists (fileName.c_str ());
9292}
9393
9494/* *
9595 * Check if directory path exists
9696 */
97- [[maybe_unused]] RLCPPAPI inline bool DirectoryExists (const std::string& dirPath) {
97+ [[maybe_unused]] RLCPPAPI inline bool DirectoryExists (const std::string& dirPath) {
9898 return ::DirectoryExists (dirPath.c_str ());
9999}
100100
101101/* *
102102 * Check file extension (including point: .png, .wav)
103103 */
104- [[maybe_unused]] RLCPPAPI inline bool IsFileExtension (const std::string& fileName, const std::string& ext) {
104+ [[maybe_unused]] RLCPPAPI inline bool IsFileExtension (const std::string& fileName, const std::string& ext) {
105105 return ::IsFileExtension (fileName.c_str (), ext.c_str ());
106106}
107107
108108/* *
109109 * Get pointer to extension for a filename string (including point: ".png")
110110 */
111- [[maybe_unused]] RLCPPAPI inline std::string GetFileExtension (const std::string& fileName) {
111+ [[maybe_unused]] RLCPPAPI inline std::string GetFileExtension (const std::string& fileName) {
112112 return ::GetFileExtension (fileName.c_str ());
113113}
114114
115115/* *
116116 * Get pointer to filename for a path string
117117 */
118- [[maybe_unused]] RLCPPAPI inline std::string GetFileName (const std::string& filePath) {
118+ [[maybe_unused]] RLCPPAPI inline std::string GetFileName (const std::string& filePath) {
119119 return ::GetFileName (filePath.c_str ());
120120}
121121
122122/* *
123123 * Get filename string without extension
124124 */
125- [[maybe_unused]] RLCPPAPI inline std::string GetFileNameWithoutExt (const std::string& filePath) {
125+ [[maybe_unused]] RLCPPAPI inline std::string GetFileNameWithoutExt (const std::string& filePath) {
126126 return ::GetFileNameWithoutExt (filePath.c_str ());
127127}
128128
129129/* *
130130 * Get full path for a given fileName with path
131131 */
132- [[maybe_unused]] RLCPPAPI inline std::string GetDirectoryPath (const std::string& filePath) {
132+ [[maybe_unused]] RLCPPAPI inline std::string GetDirectoryPath (const std::string& filePath) {
133133 return ::GetDirectoryPath (filePath.c_str ());
134134}
135135
136136/* *
137137 * Get previous directory path for a given path
138138 */
139- [[maybe_unused]] RLCPPAPI inline std::string GetPrevDirectoryPath (const std::string& dirPath) {
139+ [[maybe_unused]] RLCPPAPI inline std::string GetPrevDirectoryPath (const std::string& dirPath) {
140140 return ::GetPrevDirectoryPath (dirPath.c_str ());
141141}
142142
143143/* *
144144 * Get current working directory
145145 */
146- [[maybe_unused]] RLCPPAPI inline std::string GetWorkingDirectory () {
146+ [[maybe_unused]] RLCPPAPI inline std::string GetWorkingDirectory () {
147147 return ::GetWorkingDirectory ();
148148}
149149
150150/* *
151151 * Get filenames in a directory path
152152 */
153- [[maybe_unused]] RLCPPAPI std::vector<std::string> LoadDirectoryFiles (const std::string& dirPath) {
153+ [[maybe_unused]] RLCPPAPI std::vector<std::string> LoadDirectoryFiles (const std::string& dirPath) {
154154 FilePathList files = ::LoadDirectoryFiles (dirPath.c_str ());
155155 std::vector<std::string> output (files.paths , files.paths + files.count );
156156 ::UnloadDirectoryFiles (files);
@@ -160,14 +160,14 @@ namespace raylib {
160160/* *
161161 * Change working directory, return true on success
162162 */
163- [[maybe_unused]] RLCPPAPI inline bool ChangeDirectory (const std::string& dir) {
163+ [[maybe_unused]] RLCPPAPI inline bool ChangeDirectory (const std::string& dir) {
164164 return ::ChangeDirectory (dir.c_str ());
165165}
166166
167167/* *
168168 * Get dropped files names
169169 */
170- [[maybe_unused]] RLCPPAPI std::vector<std::string> LoadDroppedFiles () {
170+ [[maybe_unused]] RLCPPAPI std::vector<std::string> LoadDroppedFiles () {
171171 if (!::IsFileDropped ()) {
172172 return std::vector<std::string>();
173173 }
@@ -180,28 +180,28 @@ namespace raylib {
180180/* *
181181 * Get file modification time (last write time)
182182 */
183- [[maybe_unused]] RLCPPAPI inline long GetFileModTime (const std::string& fileName) { // NOLINT
183+ [[maybe_unused]] RLCPPAPI inline long GetFileModTime (const std::string& fileName) { // NOLINT
184184 return ::GetFileModTime (fileName.c_str ());
185185}
186186
187187/* *
188188 * Open URL with default system browser (if available)
189189 */
190- [[maybe_unused]] RLCPPAPI inline void OpenURL (const std::string& url) {
190+ [[maybe_unused]] RLCPPAPI inline void OpenURL (const std::string& url) {
191191 return ::OpenURL (url.c_str ());
192192}
193193
194194/* *
195195 * Load an image.
196196 */
197- [[maybe_unused]] RLCPPAPI inline ::Image LoadImage (const std::string& fileName) {
197+ [[maybe_unused]] RLCPPAPI inline ::Image LoadImage (const std::string& fileName) {
198198 return ::LoadImage (fileName.c_str ());
199199}
200200
201201/* *
202202 * Load an image from RAW file data
203203 */
204- [[maybe_unused]] RLCPPAPI inline ::Image LoadImageRaw (const std::string& fileName,
204+ [[maybe_unused]] RLCPPAPI inline ::Image LoadImageRaw (const std::string& fileName,
205205 int width, int height,
206206 int format, int headerSize) {
207207 return ::LoadImageRaw (fileName.c_str (), width, height, format, headerSize);
@@ -210,14 +210,14 @@ namespace raylib {
210210/* *
211211 * Load animated image data
212212 */
213- [[maybe_unused]] RLCPPAPI inline ::Image LoadImageAnim (const std::string& fileName, int *frames) {
213+ [[maybe_unused]] RLCPPAPI inline ::Image LoadImageAnim (const std::string& fileName, int *frames) {
214214 return ::LoadImageAnim (fileName.c_str (), frames);
215215}
216216
217217/* *
218218 * Load image from memory buffer, fileType refers to extension like "png"
219219 */
220- [[maybe_unused]] RLCPPAPI inline ::Image LoadImageFromMemory (const std::string& fileType,
220+ [[maybe_unused]] RLCPPAPI inline ::Image LoadImageFromMemory (const std::string& fileType,
221221 const unsigned char *fileData,
222222 int dataSize) {
223223 return ::LoadImageFromMemory (fileType.c_str (), fileData, dataSize);
@@ -226,14 +226,14 @@ namespace raylib {
226226/* *
227227 * Export image data to file
228228 */
229- [[maybe_unused]] RLCPPAPI inline bool ExportImage (const Image& image, const std::string& fileName) {
229+ [[maybe_unused]] RLCPPAPI inline bool ExportImage (const Image& image, const std::string& fileName) {
230230 return ::ExportImage (image, fileName.c_str ());
231231}
232232
233233/* *
234234 * Export image as code file (.h) defining an array of bytes
235235 */
236- [[maybe_unused]] RLCPPAPI inline bool ExportImageAsCode (const Image& image, const std::string& fileName) {
236+ [[maybe_unused]] RLCPPAPI inline bool ExportImageAsCode (const Image& image, const std::string& fileName) {
237237 return ::ExportImageAsCode (image, fileName.c_str ());
238238}
239239
@@ -247,7 +247,11 @@ namespace raylib {
247247/* *
248248 * Draw text (using default font)
249249 */
250- [[maybe_unused]] RLCPPAPI inline void DrawText (const std::string& text, int posX, int posY, int fontSize, ::Color color) {
250+ [[maybe_unused]] RLCPPAPI inline void DrawText (
251+ const std::string& text,
252+ int posX, int posY,
253+ int fontSize,
254+ ::Color color) {
251255 ::DrawText (text.c_str(), posX, posY, fontSize, color);
252256}
253257
@@ -278,22 +282,25 @@ namespace raylib {
278282/* *
279283 * Draw text using Font and pro parameters (rotation)
280284 */
281- [[maybe_unused]] RLCPPAPI inline void DrawTextPro (const Font& font, const std::string& text, Vector2 position,
285+ [[maybe_unused]] RLCPPAPI inline void DrawTextPro (const Font& font, const std::string& text, Vector2 position,
282286 Vector2 origin, float rotation, float fontSize, float spacing, ::Color tint) {
283287 ::DrawTextPro (font, text.c_str(), position, origin, rotation, fontSize, spacing, tint);
284288}
285289
286290/* *
287291 * Load font from file (filename must include file extension)
288292 */
289- [[maybe_unused]] RLCPPAPI inline ::Font LoadFont (const std::string& fileName) {
293+ [[maybe_unused]] RLCPPAPI inline ::Font LoadFont (const std::string& fileName) {
290294 return ::LoadFont (fileName.c_str ());
291295}
292296
293297/* *
294298 * Load font from file (filename must include file extension)
295299 */
296- [[maybe_unused]] RLCPPAPI inline ::Font LoadFontEx (const std::string& fileName, int fontSize, int *fontChars, int charsCount) {
300+ [[maybe_unused]] RLCPPAPI inline ::Font LoadFontEx (
301+ const std::string& fileName,
302+ int fontSize, int *fontChars,
303+ int charsCount) {
297304 return ::LoadFontEx (fileName.c_str (), fontSize, fontChars, charsCount);
298305}
299306
@@ -342,14 +349,16 @@ namespace raylib {
342349/* *
343350 * Get text length, checks for '\0' ending
344351 */
345- [[maybe_unused]] RLCPPAPI inline std::string TextSubtext (const std::string& text, int position, int length) {
352+ [[maybe_unused]] RLCPPAPI inline std::string TextSubtext (const std::string& text, int position, int length) {
346353 return ::TextSubtext (text.c_str (), position, length);
347354}
348355
349356/* *
350357 * Replace text string
351358 */
352- [[maybe_unused]] RLCPPAPI std::string TextReplace (const std::string& text, const std::string& replace, const std::string& by) {
359+ [[maybe_unused]] RLCPPAPI std::string TextReplace (
360+ const std::string& text, const std::string& replace,
361+ const std::string& by) {
353362 const char * input = text.c_str ();
354363 char * output = ::TextReplace (const_cast <char *>(input), replace.c_str (), by.c_str ());
355364 if (output != NULL ) {
@@ -363,7 +372,7 @@ namespace raylib {
363372/* *
364373 * Insert text in a position
365374 */
366- [[maybe_unused]] RLCPPAPI std::string TextInsert (const std::string& text, const std::string& insert, int position) {
375+ [[maybe_unused]] RLCPPAPI std::string TextInsert (const std::string& text, const std::string& insert, int position) {
367376 char * output = ::TextInsert (text.c_str (), insert.c_str (), position);
368377 if (output != NULL ) {
369378 std::string stringOutput (output);
@@ -376,7 +385,7 @@ namespace raylib {
376385/* *
377386 * Split text into multiple strings
378387 */
379- [[maybe_unused]] RLCPPAPI std::vector<std::string> TextSplit (const std::string& text, char delimiter) {
388+ [[maybe_unused]] RLCPPAPI std::vector<std::string> TextSplit (const std::string& text, char delimiter) {
380389 int count;
381390 const char ** split = ::TextSplit (text.c_str (), delimiter, &count);
382391 return std::vector<std::string>(split, split + count);
@@ -385,35 +394,35 @@ namespace raylib {
385394/* *
386395 * Find first text occurrence within a string
387396 */
388- [[maybe_unused]] RLCPPAPI inline int TextFindIndex (const std::string& text, const std::string& find) {
397+ [[maybe_unused]] RLCPPAPI inline int TextFindIndex (const std::string& text, const std::string& find) {
389398 return ::TextFindIndex (text.c_str (), find.c_str ());
390399}
391400
392401/* *
393402 * Get upper case version of provided string
394403 */
395- [[maybe_unused]] RLCPPAPI inline std::string TextToUpper (const std::string& text) {
404+ [[maybe_unused]] RLCPPAPI inline std::string TextToUpper (const std::string& text) {
396405 return ::TextToUpper (text.c_str ());
397406}
398407
399408/* *
400409 * Get lower case version of provided string
401410 */
402- [[maybe_unused]] RLCPPAPI inline std::string TextToLower (const std::string& text) {
411+ [[maybe_unused]] RLCPPAPI inline std::string TextToLower (const std::string& text) {
403412 return ::TextToLower (text.c_str ());
404413}
405414
406415/* *
407416 * Get Pascal case notation version of provided string
408417 */
409- [[maybe_unused]] RLCPPAPI inline std::string TextToPascal (const std::string& text) {
418+ [[maybe_unused]] RLCPPAPI inline std::string TextToPascal (const std::string& text) {
410419 return ::TextToPascal (text.c_str ());
411420}
412421
413422/* *
414423 * Get integer value from text (negative values not supported)
415424 */
416- [[maybe_unused]] RLCPPAPI inline int TextToInteger (const std::string& text) {
425+ [[maybe_unused]] RLCPPAPI inline int TextToInteger (const std::string& text) {
417426 return ::TextToInteger (text.c_str ());
418427}
419428
0 commit comments