Design Pattern Examples
Overview of object-oriented design patterns
Flyweight_Display.h
Go to the documentation of this file.
1
6
7#pragma once
8#ifndef __FLYWEIGHT_DISPLAY_H__
9#define __FLYWEIGHT_DISPLAY_H__
10
11#include <stdbool.h>
12
18typedef struct
19{
20 char** area;
21 int width;
22 int height;
23} Display;
24
33bool Display_Create(Display* display, int width, int height);
34
41void Display_Destroy(Display* display);
42
43#endif // __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.
void Display_Destroy(Display *display)
Destroy the "display" window in the given Display object by releasing the memory associated with it....
Represents a "display" window, in which to render Flyweight images. This "display" window is then pri...
int width
Width of each row.
int height
Height of each row.
char ** area
2-dimensional array of strings, representing rows. Each row is zero-terminated.