Expose file-dropping functions symbols
This commit is contained in:
parent
ca5f7ebd10
commit
ada6668b24
34
src/core.c
34
src/core.c
@ -84,9 +84,8 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************************************/
|
**********************************************************************************************/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h" // Defines module configuration flags
|
||||||
|
#include "raylib.h" // Declares module functions
|
||||||
#include "raylib.h"
|
|
||||||
|
|
||||||
#if (defined(__linux__) || defined(PLATFORM_WEB)) && _POSIX_C_SOURCE < 199309L
|
#if (defined(__linux__) || defined(PLATFORM_WEB)) && _POSIX_C_SOURCE < 199309L
|
||||||
#undef _POSIX_C_SOURCE
|
#undef _POSIX_C_SOURCE
|
||||||
@ -96,8 +95,8 @@
|
|||||||
#define RAYMATH_IMPLEMENTATION // Define external out-of-line implementation of raymath here
|
#define RAYMATH_IMPLEMENTATION // Define external out-of-line implementation of raymath here
|
||||||
#include "raymath.h" // Required for: Vector3 and Matrix functions
|
#include "raymath.h" // Required for: Vector3 and Matrix functions
|
||||||
|
|
||||||
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
|
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
|
||||||
#include "utils.h" // Required for: fopen() Android mapping
|
#include "utils.h" // Required for: fopen() Android mapping
|
||||||
|
|
||||||
#if defined(SUPPORT_GESTURES_SYSTEM)
|
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||||
#define GESTURES_IMPLEMENTATION
|
#define GESTURES_IMPLEMENTATION
|
||||||
@ -111,7 +110,7 @@
|
|||||||
|
|
||||||
#if defined(SUPPORT_GIF_RECORDING)
|
#if defined(SUPPORT_GIF_RECORDING)
|
||||||
#define RGIF_IMPLEMENTATION
|
#define RGIF_IMPLEMENTATION
|
||||||
#include "external/rgif.h" // Support GIF recording
|
#include "external/rgif.h" // Support GIF recording
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h> // Standard input / output lib
|
#include <stdio.h> // Standard input / output lib
|
||||||
@ -295,8 +294,6 @@ static bool cursorHidden = false; // Track if cursor is hidden
|
|||||||
static bool cursorOnScreen = false; // Tracks if cursor is inside client area
|
static bool cursorOnScreen = false; // Tracks if cursor is inside client area
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP)
|
||||||
static int screenshotCounter = 0; // Screenshots counter
|
|
||||||
|
|
||||||
// Register mouse states
|
// Register mouse states
|
||||||
static char previousMouseState[3] = { 0 }; // Registers previous mouse button state
|
static char previousMouseState[3] = { 0 }; // Registers previous mouse button state
|
||||||
static char currentMouseState[3] = { 0 }; // Registers current mouse button state
|
static char currentMouseState[3] = { 0 }; // Registers current mouse button state
|
||||||
@ -345,9 +342,13 @@ static double targetTime = 0.0; // Desired time for one frame, if 0
|
|||||||
static unsigned char configFlags = 0; // Configuration flags (bit based)
|
static unsigned char configFlags = 0; // Configuration flags (bit based)
|
||||||
static bool showLogo = false; // Track if showing logo at init is enabled
|
static bool showLogo = false; // Track if showing logo at init is enabled
|
||||||
|
|
||||||
|
#if defined(SUPPORT_SCREEN_CAPTURE)
|
||||||
|
static int screenshotCounter = 0; // Screenshots counter
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SUPPORT_GIF_RECORDING)
|
#if defined(SUPPORT_GIF_RECORDING)
|
||||||
static int gifFramesCounter = 0;
|
static int gifFramesCounter = 0; // GIF frames counter
|
||||||
static bool gifRecording = false;
|
static bool gifRecording = false; // GIF recording state
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
@ -748,7 +749,6 @@ void SetWindowSize(int width, int height)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get current screen width
|
// Get current screen width
|
||||||
int GetScreenWidth(void)
|
int GetScreenWidth(void)
|
||||||
{
|
{
|
||||||
@ -1376,24 +1376,32 @@ bool ChangeDirectory(const char *dir)
|
|||||||
return (CHDIR(dir) == 0);
|
return (CHDIR(dir) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP)
|
|
||||||
// Check if a file has been dropped into window
|
// Check if a file has been dropped into window
|
||||||
bool IsFileDropped(void)
|
bool IsFileDropped(void)
|
||||||
{
|
{
|
||||||
|
#if defined(PLATFORM_DESKTOP)
|
||||||
if (dropFilesCount > 0) return true;
|
if (dropFilesCount > 0) return true;
|
||||||
else return false;
|
else return false;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get dropped files names
|
// Get dropped files names
|
||||||
char **GetDroppedFiles(int *count)
|
char **GetDroppedFiles(int *count)
|
||||||
{
|
{
|
||||||
|
#if defined(PLATFORM_DESKTOP)
|
||||||
*count = dropFilesCount;
|
*count = dropFilesCount;
|
||||||
return dropFilesPath;
|
return dropFilesPath;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear dropped files paths buffer
|
// Clear dropped files paths buffer
|
||||||
void ClearDroppedFiles(void)
|
void ClearDroppedFiles(void)
|
||||||
{
|
{
|
||||||
|
#if defined(PLATFORM_DESKTOP)
|
||||||
if (dropFilesCount > 0)
|
if (dropFilesCount > 0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < dropFilesCount; i++) free(dropFilesPath[i]);
|
for (int i = 0; i < dropFilesCount; i++) free(dropFilesPath[i]);
|
||||||
@ -1402,8 +1410,8 @@ void ClearDroppedFiles(void)
|
|||||||
|
|
||||||
dropFilesCount = 0;
|
dropFilesCount = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Save integer value to storage file (to defined position)
|
// Save integer value to storage file (to defined position)
|
||||||
// NOTE: Storage positions is directly related to file memory layout (4 bytes each integer)
|
// NOTE: Storage positions is directly related to file memory layout (4 bytes each integer)
|
||||||
|
Loading…
Reference in New Issue
Block a user