- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
Window Functions
Graphics

Window creation, modification and destruction functions. More...

## Functions
AFAPI af_err | af_set_position (const af_window wind, const unsigned x, const unsigned y)
| C Interface wrapper for setting the start position when window is displayed. More...
AFAPI af_err | af_set_title (const af_window wind, const char *const title)
| C Interface wrapper for setting window title. More...
AFAPI af_err | af_set_size (const af_window wind, const unsigned w, const unsigned h)
| C Interface wrapper for setting window position. More...
AFAPI af_err | af_grid (const af_window wind, const int rows, const int cols)
| C Interface wrapper for grid setup in a window. More...
AFAPI af_err | af_show (const af_window wind)
| C Interface wrapper for showing a window. More...
AFAPI af_err | af_is_window_closed (bool *out, const af_window wind)
| C Interface wrapper for checking if window is marked for close. More...
AFAPI af_err | af_destroy_window (const af_window wind)
| C Interface wrapper for destroying a window handle. More...

## Detailed Description

Window creation, modification and destruction functions.

## Function Documentation

AFAPI af_err af_destroy_window | ( | const af_window | wind | ) |

C Interface wrapper for destroying a window handle.

Parameters

  [in] | wind | is the window handle

Returns
  AF_SUCCESS if window destroy is successful, otherwise an appropriate error code is returned.

AFAPI af_err af_grid | ( | const af_window | wind,
|  | const int | rows,
|  | const int | cols
| ) |  |

C Interface wrapper for grid setup in a window.

Parameters

  [in] | wind | is the window handle
  [in] | rows | is number of rows you want to show in a window
  [in] | cols | is number of coloumns you want to show in a window

Returns
  AF_SUCCESS if grid setup for window is successful, otherwise an appropriate error code is returned.

AFAPI af_err af_is_window_closed | ( | bool * | out,
|  | const af_window | wind
| ) |  |

C Interface wrapper for checking if window is marked for close.

Parameters

  [out] | out | is a boolean which indicates whether window is marked for close. This usually happens when user presses ESC key while the window is in focus.
  [in] | wind | is the window handle

Returns
  AF_SUCCESS if `wind` show is successful, otherwise an appropriate error code is returned.

AFAPI af_err af_set_position | ( | const af_window | wind,
|  | const unsigned | x,
|  | const unsigned | y
| ) |  |

C Interface wrapper for setting the start position when window is displayed.

Parameters

  [in] | wind | is the window handle
  [in] | x | is horizontal start coordinate
  [in] | y | is vertical start coordinate

Returns
  AF_SUCCESS if set position for window is successful, otherwise an appropriate error code is returned.

AFAPI af_err af_set_size | ( | const af_window | wind,
|  | const unsigned | w,
|  | const unsigned | h
| ) |  |

C Interface wrapper for setting window position.

Parameters

  [in] | wind | is the window handle
  [in] | w | is target width of the window
  [in] | h | is target height of the window

Returns
  AF_SUCCESS if set size for window is successful, otherwise an appropriate error code is returned.

AFAPI af_err af_set_title | ( | const af_window | wind,
|  | const char *const | title
| ) |  |

C Interface wrapper for setting window title.

Parameters

  [in] | wind | is the window handle
  [in] | title | is title of the window

Returns
  AF_SUCCESS if set title for window is successful, otherwise an appropriate error code is returned.

AFAPI af_err af_show | ( | const af_window | wind | ) |

C Interface wrapper for showing a window.

Parameters

  [in] | wind | is the window handle

Returns
  AF_SUCCESS if window show is successful, otherwise an appropriate error code is returned.