kiba-engine
Data Structures | Typedefs | Functions
window.h File Reference

Interface to access platform specific windowing functionality. More...

#include <kiba/allocators/allocator.h>
#include <kiba/defines.h>
#include <kiba/gpu/surface.h>
Include dependency graph for window.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  platform_window
 Structure holding information about a window. More...
 

Typedefs

typedef struct platform_window platform_window
 Structure holding information about a window.
 

Functions

KB_API b8 window_create (platform_window *window, const char *title, u32 x, u32 y, u32 w, u32 h, allocator *alloc)
 Create a platform window. More...
 
KB_API void window_destroy (platform_window *window)
 Destroy platform window and clean up internal state. More...
 
KB_API b8 window_poll_events (platform_window *window)
 Poll for events emited by the window. More...
 

Detailed Description

Interface to access platform specific windowing functionality.

Definition in file window.h.

Function Documentation

◆ window_create()

KB_API b8 window_create ( platform_window window,
const char *  title,
u32  x,
u32  y,
u32  w,
u32  h,
allocator alloc 
)

Create a platform window.

Parameters
windowthe window to populate with data
titlethe text to display as the window title
xinitial horizontal position on the screen
yinitial vertical position on the screen
winitial width of the window
hinitial height of the window
Returns
false if any error occurs during creation, true if successful

Definition at line 17 of file window.c.

Here is the call graph for this function:

◆ window_destroy()

KB_API void window_destroy ( platform_window window)

Destroy platform window and clean up internal state.

Parameters
windowthe window to destroy and clean up

Definition at line 165 of file window.c.

Here is the call graph for this function:

◆ window_poll_events()

KB_API b8 window_poll_events ( platform_window window)

Poll for events emited by the window.

Will call into the input and event system.

Parameters
windowthe window to poll events from

Definition at line 197 of file window.c.

Here is the call graph for this function: