Declaration of the Display_Create() and Display_Destroy() functions for managing the Display structure that represents a "display" windows as used in the Flyweight Pattern. More...
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | Display |
Represents a "display" window, in which to render Flyweight images. This "display" window is then printed to the console window at a specified coordinate to render a "frame" of motion in the "display". More... | |
Macros | |
#define | __FLYWEIGHT_DISPLAY_H__ |
Functions | |
bool | Display_Create (Display *display, int width, int height) |
Create a "display" window in the given Display object, with the given width and height. | |
void | Display_Destroy (Display *display) |
Destroy the "display" window in the given Display object by releasing the memory associated with it. After this function returns, the Display object is no longer usable without calling Display_Create() again. | |
Declaration of the Display_Create() and Display_Destroy() functions for managing the Display structure that represents a "display" windows as used in the Flyweight Pattern.
Definition in file Flyweight_Display.h.
#define __FLYWEIGHT_DISPLAY_H__ |
Definition at line 9 of file Flyweight_Display.h.
bool Display_Create | ( | Display * | display, |
int | width, | ||
int | height | ||
) |
Create a "display" window in the given Display object, with the given width and height.
display | The Display object in which to construct the "display" window. |
width | The width of the window, in characters. |
height | The height of the window, in character. |
Definition at line 14 of file Flyweight_Display.c.
References Display::area, Display_Destroy(), Display::height, and Display::width.
Referenced by _Flyweight_GenerateDisplay().
void Display_Destroy | ( | Display * | display | ) |
Destroy the "display" window in the given Display object by releasing the memory associated with it. After this function returns, the Display object is no longer usable without calling Display_Create() again.
display | The Display object to free. |
Definition at line 50 of file Flyweight_Display.c.
References Display::area, Display::height, and Display::width.
Referenced by Display_Create(), and Flyweight_Exercise().