Implementation 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...
Go to the source code of this file.
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. | |
Implementation 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.c.
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().