Gooey GUI Library
|
Header file for the GooeyDropSurface module. More...
#include "common/gooey_common.h"
Go to the source code of this file.
Functions | |
GooeyDropSurface * | GooeyDropSurface_Create (int x, int y, int width, int height, char *default_message, void(*callback)(char *mime, char *file_path)) |
Adds a file drop surface. | |
void | GooeyDropSurface_Clear (GooeyDropSurface *drop_surface) |
Clears the content of a drop surface. | |
Header file for the GooeyDropSurface module.
Provides functionality for creating file drop surfaces, handling file drops, and rendering drop surfaces within a GooeyWindow.
void GooeyDropSurface_Clear | ( | GooeyDropSurface * | drop_surface | ) |
Clears the content of a drop surface.
Resets the drop surface, removing any dropped file information and restoring the default message.
drop_surface | The drop surface to clear. |
GooeyDropSurface * GooeyDropSurface_Create | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
char * | default_message, | ||
void(*)(char *mime, char *file_path) | callback | ||
) |
Adds a file drop surface.
Creates a new GooeyDropSurface that allows users to drop files onto it. When a file is dropped, the provided callback function is triggered with the MIME type and file path.
x | The x-coordinate of the drop surface's position. |
y | The y-coordinate of the drop surface's position. |
width | The width of the drop surface. |
height | The height of the drop surface. |
default_message | The default text displayed on the drop surface. |
callback | The function to call when a file is dropped. It receives the file's MIME type and path. |