REVIEWED: API functions specifiers

This commit is contained in:
raysan5
2021-10-05 18:33:02 +02:00
parent 8993f07c94
commit f822fb1468
2 changed files with 15 additions and 19 deletions

View File

@ -39,6 +39,8 @@
#define RAYGUI_IMPLEMENTATION #define RAYGUI_IMPLEMENTATION
#include "../../src/raygui.h" #include "../../src/raygui.h"
#include <string.h> // Required for: strcpy()
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Program main entry point // Program main entry point
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
/******************************************************************************************* /*******************************************************************************************
* *
* raygui v3.0-dev - A simple and easy-to-use immediate-mode gui library * raygui v3.0 - A simple and easy-to-use immediate-mode gui library
* *
* DESCRIPTION: * DESCRIPTION:
* *
@ -159,7 +159,7 @@
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
* Copyright (c) 2014-2020 Ramon Santamaria (@raysan5) * Copyright (c) 2014-2021 Ramon Santamaria (@raysan5)
* *
* This software is provided "as-is", without any express or implied warranty. In no event * This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software. * will the authors be held liable for any damages arising from the use of this software.
@ -181,31 +181,27 @@
#ifndef RAYGUI_H #ifndef RAYGUI_H
#define RAYGUI_H #define RAYGUI_H
#define RAYGUI_VERSION "3.0-dev" #define RAYGUI_VERSION "3.0"
#if !defined(RAYGUI_STANDALONE) #if !defined(RAYGUI_STANDALONE)
#include "raylib.h" #include "raylib.h"
#endif #endif
// Functions qualifiers/attributes definition // Function specifiers definition
#ifndef RAYGUIAPI #ifndef RAYGUIAPI
#define RAYGUIAPI // We are defining our functions as 'extern' by default (implicit attribute) #define RAYGUIAPI // Functions defined as 'extern' by default (implicit specifiers)
#endif #endif
// Function qualifiers in case library is build/used as a shared library // Function specifiers in case library is build/used as a shared library (Windows)
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
#if defined(_WIN32) #if defined(_WIN32)
// Microsoft attributes to tell compiler that symbols are imported/exported from a .dll
#if defined(BUILD_LIBTYPE_SHARED) #if defined(BUILD_LIBTYPE_SHARED)
#define RAYGUIAPI __declspec(dllexport) // We are building this library as a Win32 shared library (.dll) #define RAYGUIAPI __declspec(dllexport) // We are building the library as a Win32 shared library (.dll)
#elif defined(USE_LIBTYPE_SHARED) #elif defined(USE_LIBTYPE_SHARED)
#define RAYGUIAPI __declspec(dllimport) // We are using this library as a Win32 shared library (.dll) #define RAYGUIAPI __declspec(dllimport) // We are using the library as a Win32 shared library (.dll)
#endif #endif
#endif #endif
#if !defined(RAYGUI_MALLOC) && !defined(RAYGUI_CALLOC) && !defined(RAYGUI_FREE)
#include <stdlib.h> // Required for: malloc(), calloc(), free()
#endif
// Allow custom memory allocators // Allow custom memory allocators
#ifndef RAYGUI_MALLOC #ifndef RAYGUI_MALLOC
#define RAYGUI_MALLOC(sz) malloc(sz) #define RAYGUI_MALLOC(sz) malloc(sz)
@ -561,14 +557,12 @@ RAYGUIAPI bool GuiCheckIconPixel(int iconId, int x, int y); // Check icon pi
#if defined(RAYGUI_IMPLEMENTATION) #if defined(RAYGUI_IMPLEMENTATION)
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() #include <stdio.h> // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
#include <string.h> // Required for: strlen() [GuiTextBox()] #include <stdlib.h> // Required for: malloc(), calloc(), free() [GuiLoadStyle(), GuiLoadIcons()]
#include <string.h> // Required for: strlen() [GuiTextBox(), GuiTextBoxMulti(), GuiValueBox()], memset(), memcpy()
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end() [TextFormat()]
#include <math.h> // Required for: roundf() [GuiColorPicker()] #include <math.h> // Required for: roundf() [GuiColorPicker()]
#if defined(RAYGUI_STANDALONE)
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
#endif
#ifdef __cplusplus #ifdef __cplusplus
#define RAYGUI_CLITERAL(name) name #define RAYGUI_CLITERAL(name) name
#else #else