Loading...
Searching...
No Matches
view.h File Reference
`#include "arc/graphics/renderer.h"`
`#include "arc/math/rectangle.h"`

Go to the source code of this file.

## Data Structures

struct | ARC_View

## Typedefs

typedef struct ARC_View | ARC_View
typedef void(* | ARC_View_RenderFn) (void *data)
| a function for ARC_View where contents of the function will be rendered within a view

## Functions

void | ARC_View_Create (ARC_View **view, ARC_Renderer *renderer, ARC_Rect bounds)
| creates ARC_View type
void | ARC_View_Destroy (ARC_View *view)
| destroys ARC_View type
void | ARC_View_Render (ARC_View *view, ARC_View_RenderFn renderFn, void *data)
| renders callbacks contents within an ARC_View
ARC_Rect | ARC_View_GetBounds (ARC_View *view)
| gets bounds from ARC_View type

## Typedef Documentation

## ARC_View

typedef struct ARC_View ARC_View

## ARC_View_RenderFn

typedef void(* ARC_View_RenderFn) (void *data)

a function for ARC_View where contents of the function will be rendered within a view

Parameters

  data | data to be used within ARC_View_RenderFn

Definition at line 21 of file view.h.

## Function Documentation

## ARC_View_Create()

void ARC_View_Create | ( | ARC_View ** | view,
|  | ARC_Renderer * | renderer,
|  | ARC_Rect | bounds )

creates ARC_View type

Parameters

  view | ARC_View to initialize
  renderer | ARC_Renderer the view will render to
  bounds | ARC_Rect bounds of the view within the renderer

## ARC_View_Destroy()

void ARC_View_Destroy | ( | ARC_View * | view | ) |

destroys ARC_View type

## ARC_View_GetBounds()

ARC_Rect ARC_View_GetBounds | ( | ARC_View * | view | ) |

gets bounds from ARC_View type

Parameters

  view | ARC_View to get bounds from

Returns
  bounds of the view

## ARC_View_Render()

void ARC_View_Render | ( | ARC_View * | view,
|  | ARC_View_RenderFn | renderFn,
|  | void * | data )

renders callbacks contents within an ARC_View

Parameters

  view | ARC_View to be renedered to
  renderFn | function which contents will render to given ARC_View
  data | data to be used in renderFn