Display can now be opened, closed and reopened thanks to the following fixes.
Fixing issue with non-virtual destructor.
Fixing issue with deletion of void pointer.
8 /* Cmake will define MyLibrary_EXPORTS on Windows when it
9 configures to build a shared library. If you are going to use
10 another build system on windows or create the visual studio
11 projects by hand you need to define MyLibrary_EXPORTS when
12 building a DLL on windows.
14 // We are using the Visual Studio Compiler and building Shared libraries
17 #if defined(MiniDisplay_EXPORTS)
18 #define MDAPI __declspec(dllexport)
20 #define MDAPI __declspec(dllimport)
21 #endif /* MyLibrary_EXPORTS */
22 #else /* defined (_WIN32) */
26 typedef void* MiniDisplayDevice;
30 EMiniDisplayRequestNone,
31 EMiniDisplayRequestDeviceId,
32 EMiniDisplayRequestFirmwareRevision,
33 EMiniDisplayRequestPowerSupplyStatus
37 //Open & Close functions
38 extern "C" MDAPI MiniDisplayDevice MiniDisplayOpen();
39 extern "C" MDAPI void MiniDisplayClose(MiniDisplayDevice aDevice);
42 Clear our MiniDisplay.
43 @param [IN] The device to apply this command to.
45 extern "C" MDAPI void MiniDisplayClear(MiniDisplayDevice aDevice);
49 @param [IN] The device to apply this command to.
51 extern "C" MDAPI void MiniDisplayFill(MiniDisplayDevice aDevice);
54 Swap our MiniDisplay buffers committing our back buffer content to the screen.
55 @param [IN] The device to apply this command to.
57 extern "C" MDAPI void MiniDisplaySwapBuffers(MiniDisplayDevice aDevice);
60 Provide maximum brightness level for the given device.
61 @param [IN] The device to apply this command to.
62 @return Maximum brightness level.
64 extern "C" MDAPI int MiniDisplayMaxBrightness(MiniDisplayDevice aDevice);
67 Provide minimum brightness level for the given device.
68 @param [IN] The device to apply this command to.
69 @return Minimum brightness level.
71 extern "C" MDAPI int MiniDisplayMinBrightness(MiniDisplayDevice aDevice);
74 Set device brightness level.
75 @param [IN] The device to apply this command to.
76 @param [IN] Brightness level
78 extern "C" MDAPI void MiniDisplaySetBrightness(MiniDisplayDevice aDevice, int aBrightness);
81 Provide pixels width of our display.
82 @param [IN] The device to apply this command to.
83 @return Width in pixels.
85 extern "C" MDAPI int MiniDisplayWidthInPixels(MiniDisplayDevice aDevice);
88 Provide pixels height of our display.
89 @param [IN] The device to apply this command to.
90 @return Height in pixels.
92 extern "C" MDAPI int MiniDisplayHeightInPixels(MiniDisplayDevice aDevice);
96 @param [IN] The device to apply this command to.
97 @param [IN] Pixel X coordinate.
98 @param [IN] Pixel Y coordinate.
99 @param [IN] Pixel value.
101 extern "C" MDAPI void MiniDisplaySetPixel(MiniDisplayDevice aDevice, int aX, int aY, int aValue);
103 //TODO: Have an API to specify pixel depth
107 @param [IN] The device to apply this command to.
110 extern "C" MDAPI wchar_t* MiniDisplayVendor(MiniDisplayDevice aDevice);
113 Provide product name.
114 @param [IN] The device to apply this command to.
115 @return Product name.
117 extern "C" MDAPI wchar_t* MiniDisplayProduct(MiniDisplayDevice aDevice);
120 Provide Serial number.
121 @param [IN] The device to apply this command to.
122 @return Serial number name.
124 extern "C" MDAPI wchar_t* MiniDisplaySerialNumber(MiniDisplayDevice aDevice);
128 @param [IN] The device to apply this command to.
130 extern "C" MDAPI void MiniDisplayRequestDeviceId(MiniDisplayDevice aDevice);
133 Request power status.
134 @param [IN] The device to apply this command to.
136 extern "C" MDAPI void MiniDisplayRequestPowerSupplyStatus(MiniDisplayDevice aDevice);
139 Request firmware version.
140 @param [IN] The device to apply this command to.
142 extern "C" MDAPI void MiniDisplayRequestFirmwareRevision(MiniDisplayDevice aDevice);
145 Tell whether or not a request is pending.
146 @param [IN] The device to apply this command to.
147 @return true if we have a request pending, false otherwise.
149 extern "C" MDAPI bool MiniDisplayRequestPending(MiniDisplayDevice aDevice);
153 Provide the current request if any.
154 @param [IN] The device to apply this command to.
155 @return The current request if any.
157 extern "C" MDAPI TMiniDisplayRequest MiniDisplayCurrentRequest(MiniDisplayDevice aDevice);
161 Cancel any pending request.
162 @param [IN] The device to apply this command to.
164 extern "C" MDAPI void MiniDisplayCancelRequest(MiniDisplayDevice aDevice);
167 Attempt request completion.
168 @param [IN] The device to apply this command to.
170 extern "C" MDAPI TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(MiniDisplayDevice aDevice);
174 @param [IN] The device to apply this command to.
175 @return Device ID name.
177 extern "C" MDAPI char* MiniDisplayDeviceId(MiniDisplayDevice aDevice);
180 Provide firmware revision.
181 @param [IN] The device to apply this command to.
182 @return Firmware revision name.
184 extern "C" MDAPI char* MiniDisplayFirmwareRevision(MiniDisplayDevice aDevice);
187 Get power supply status.
188 @param [IN] The device to apply this command to.
190 extern "C" MDAPI bool MiniDisplayPowerSupplyStatus(MiniDisplayDevice aDevice);