Files
Dawn/src/ui/frame.h

54 lines
1.3 KiB
C

/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include <dawn/dawn.h>
#include "../display/shader.h"
#include "../display/primitive.h"
#include "../display/primitives/quad.h"
#include "../display/font.h"
/**
* Initialize a GUI Frame.
*
* @param frame Frame to initialize.
*/
void frameInit(frame_t *frame);
/**
* Set the size of the frame (including the size of the border).
*
* @param frame Frame to set the size of.
* @param width Width of the frame.
* @param height Height of the frame
*/
void frameSetSize(frame_t *frame, float width, float height);
/**
* Set the size of the frame's innards (size excluding the borders).
*
* @param frame Frame to set the size of
* @param width Width of the inner frame.
* @param height Height of the inner frame.
*/
void frameSetInnerSize(frame_t *frame, float width, float height);
/**
* Render a game frame.
*
* @param frame Frame to render.
* @param shader Shader to use while rendering.
* @param x X position.
* @param y Y position.
*/
void frameRender(frame_t *frame, shader_t *shader, float x, float y);
/**
* Cleanup a previously initialized frame.
*
* @param frame Frame to dispose.
*/
void frameDispose(frame_t *frame);