32 lines
1.2 KiB
C
32 lines
1.2 KiB
C
/*
|
|
* Interfaz entre el núcleo de FnixLib y cada sistema operativo.
|
|
*
|
|
* Cada plataforma (src/platform/linux, y en el futuro src/platform/windows)
|
|
* implementa estas funciones. El núcleo no incluye cabeceras del sistema.
|
|
*
|
|
* Uso interno de FnixLib. No forma parte de la API pública.
|
|
*/
|
|
#ifndef FNIX_PLATFORM_H
|
|
#define FNIX_PLATFORM_H
|
|
|
|
#include "fnix/types.h"
|
|
|
|
typedef struct FnixPlatformWindow FnixPlatformWindow;
|
|
|
|
/* Crea y muestra una ventana de tamaño fijo. `surface` apunta al búfer de
|
|
* width*height píxeles 0x00RRGGBB que se mostrará; debe seguir válido hasta
|
|
* fnix_platform_window_destroy(). Devuelve NULL y registra el error si falla. */
|
|
FnixPlatformWindow *fnix_platform_window_create(const char *title, int width,
|
|
int height, uint32_t *surface);
|
|
|
|
void fnix_platform_window_destroy(FnixPlatformWindow *window);
|
|
|
|
/* Copia la superficie a la ventana. */
|
|
void fnix_platform_window_present(FnixPlatformWindow *window);
|
|
|
|
/* Lee los eventos pendientes del sistema y los entrega a `owner` con
|
|
* fnix_window_dispatch_event(). No bloquea. */
|
|
void fnix_platform_pump_events(FnixPlatformWindow *window, FnixWindow *owner);
|
|
|
|
#endif /* FNIX_PLATFORM_H */
|