81 lines
3.7 KiB
C
81 lines
3.7 KiB
C
/* NO ES RAYLIB. Cabecera mínima escrita a mano con SOLO las declaraciones de la API de raylib 5.x
|
|
* que usa la interfaz de Tahgibu. Sirve únicamente para comprobar la sintaxis y los tipos del
|
|
* código de src/ui/ en máquinas sin raylib (gcc -fsyntax-only). No genera nada ejecutable.
|
|
* Las firmas están escritas de memoria: la compilación REAL contra raylib sigue pendiente. */
|
|
#ifndef RAYLIB_STUB_H
|
|
#define RAYLIB_STUB_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
typedef struct Vector2 { float x, y; } Vector2;
|
|
typedef struct Rectangle { float x, y, width, height; } Rectangle;
|
|
typedef struct Color { unsigned char r, g, b, a; } Color;
|
|
typedef struct Image { void *data; int width, height, mipmaps, format; } Image;
|
|
typedef struct Texture { unsigned int id; int width, height, mipmaps, format; } Texture;
|
|
typedef Texture Texture2D;
|
|
typedef struct GlyphInfo { int value, offsetX, offsetY, advanceX; Image image; } GlyphInfo;
|
|
typedef struct Font { int baseSize, glyphCount, glyphPadding; Texture2D texture; Rectangle *recs; GlyphInfo *glyphs; } Font;
|
|
|
|
enum { FLAG_VSYNC_HINT = 0x40, FLAG_WINDOW_RESIZABLE = 0x04 };
|
|
enum { MOUSE_BUTTON_LEFT = 0, MOUSE_BUTTON_RIGHT = 1, MOUSE_BUTTON_MIDDLE = 2 };
|
|
enum { TEXTURE_FILTER_POINT = 0 };
|
|
enum { PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7 };
|
|
enum {
|
|
KEY_NULL = 0, KEY_SPACE = 32, KEY_COMMA = 44, KEY_PERIOD = 46,
|
|
KEY_B = 66, KEY_C = 67, KEY_E = 69, KEY_F = 70, KEY_I = 73, KEY_L = 76, KEY_N = 78, KEY_O = 79, KEY_P = 80,
|
|
KEY_R = 82, KEY_S = 83, KEY_V = 86, KEY_Y = 89, KEY_Z = 90,
|
|
KEY_LEFT_BRACKET = 91, KEY_RIGHT_BRACKET = 93,
|
|
KEY_ESCAPE = 256, KEY_ENTER = 257, KEY_BACKSPACE = 259, KEY_DELETE = 261,
|
|
KEY_LEFT_SHIFT = 340, KEY_LEFT_CONTROL = 341, KEY_RIGHT_CONTROL = 345, KEY_RIGHT_SHIFT = 344
|
|
};
|
|
|
|
void SetConfigFlags(unsigned int flags);
|
|
void InitWindow(int width, int height, const char *title);
|
|
void CloseWindow(void);
|
|
bool WindowShouldClose(void);
|
|
void SetWindowMinSize(int width, int height);
|
|
void SetTargetFPS(int fps);
|
|
void SetExitKey(int key);
|
|
int GetScreenWidth(void);
|
|
int GetScreenHeight(void);
|
|
float GetFrameTime(void);
|
|
double GetTime(void);
|
|
void BeginDrawing(void);
|
|
void EndDrawing(void);
|
|
void ClearBackground(Color color);
|
|
void BeginScissorMode(int x, int y, int width, int height);
|
|
void EndScissorMode(void);
|
|
|
|
void DrawRectangle(int posX, int posY, int width, int height, Color color);
|
|
void DrawRectangleRec(Rectangle rec, Color color);
|
|
void DrawRectangleLines(int posX, int posY, int width, int height, Color color);
|
|
void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color);
|
|
void DrawCircleLines(int centerX, int centerY, float radius, Color color);
|
|
void DrawText(const char *text, int posX, int posY, int fontSize, Color color);
|
|
int MeasureText(const char *text, int fontSize);
|
|
Font GetFontDefault(void);
|
|
Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount);
|
|
void UnloadFont(Font font);
|
|
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint);
|
|
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing);
|
|
|
|
Texture2D LoadTextureFromImage(Image image);
|
|
void UpdateTexture(Texture2D texture, const void *pixels);
|
|
void UnloadTexture(Texture2D texture);
|
|
void SetTextureFilter(Texture2D texture, int filter);
|
|
void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint);
|
|
|
|
Vector2 GetMousePosition(void);
|
|
bool IsMouseButtonPressed(int button);
|
|
bool IsMouseButtonDown(int button);
|
|
bool IsMouseButtonReleased(int button);
|
|
float GetMouseWheelMove(void);
|
|
bool IsKeyPressed(int key);
|
|
bool IsKeyPressedRepeat(int key);
|
|
bool IsKeyDown(int key);
|
|
int GetCharPressed(void);
|
|
const char *GetClipboardText(void);
|
|
bool CheckCollisionPointRec(Vector2 point, Rectangle rec);
|
|
|
|
#endif
|