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 EMiniDisplayAutoDetect=0, /*Not yet implemented*/
31 EMiniDisplayFutabaGP1212A01,
32 EMiniDisplayFutabaGP1212A02
38 EMiniDisplayRequestNone,
39 EMiniDisplayRequestDeviceId,
40 EMiniDisplayRequestFirmwareRevision,
41 EMiniDisplayRequestPowerSupplyStatus
45 //Open & Close functions
46 extern "C" MDAPI MiniDisplayDevice MiniDisplayOpen(TMiniDisplayType aType);
47 extern "C" MDAPI void MiniDisplayClose(MiniDisplayDevice aDevice);
50 Clear our MiniDisplay.
51 @param [IN] The device to apply this command to.
53 extern "C" MDAPI void MiniDisplayClear(MiniDisplayDevice aDevice);
57 @param [IN] The device to apply this command to.
59 extern "C" MDAPI void MiniDisplayFill(MiniDisplayDevice aDevice);
62 Swap our MiniDisplay buffers committing our back buffer content to the screen.
63 @param [IN] The device to apply this command to.
65 extern "C" MDAPI void MiniDisplaySwapBuffers(MiniDisplayDevice aDevice);
68 Provide maximum brightness level for the given device.
69 @param [IN] The device to apply this command to.
70 @return Maximum brightness level.
72 extern "C" MDAPI int MiniDisplayMaxBrightness(MiniDisplayDevice aDevice);
75 Provide minimum brightness level for the given device.
76 @param [IN] The device to apply this command to.
77 @return Minimum brightness level.
79 extern "C" MDAPI int MiniDisplayMinBrightness(MiniDisplayDevice aDevice);
82 Set device brightness level.
83 @param [IN] The device to apply this command to.
84 @param [IN] Brightness level
86 extern "C" MDAPI void MiniDisplaySetBrightness(MiniDisplayDevice aDevice, int aBrightness);
89 Provide pixels width of our display.
90 @param [IN] The device to apply this command to.
91 @return Width in pixels.
93 extern "C" MDAPI int MiniDisplayWidthInPixels(MiniDisplayDevice aDevice);
96 Provide pixels height of our display.
97 @param [IN] The device to apply this command to.
98 @return Height in pixels.
100 extern "C" MDAPI int MiniDisplayHeightInPixels(MiniDisplayDevice aDevice);
104 @param [IN] The device to apply this command to.
105 @param [IN] Pixel X coordinate.
106 @param [IN] Pixel Y coordinate.
107 @param [IN] Pixel value.
109 extern "C" MDAPI void MiniDisplaySetPixel(MiniDisplayDevice aDevice, int aX, int aY, int aValue);
111 //TODO: Have an API to specify pixel depth
115 @param [IN] The device to apply this command to.
118 extern "C" MDAPI wchar_t* MiniDisplayVendor(MiniDisplayDevice aDevice);
121 Provide product name.
122 @param [IN] The device to apply this command to.
123 @return Product name.
125 extern "C" MDAPI wchar_t* MiniDisplayProduct(MiniDisplayDevice aDevice);
128 Provide Serial number.
129 @param [IN] The device to apply this command to.
130 @return Serial number name.
132 extern "C" MDAPI wchar_t* MiniDisplaySerialNumber(MiniDisplayDevice aDevice);
136 @param [IN] The device to apply this command to.
138 extern "C" MDAPI void MiniDisplayRequest(MiniDisplayDevice aDevice, TMiniDisplayRequest aRequest);
141 Tell whether or not a request is pending.
142 @param [IN] The device to apply this command to.
143 @return true if we have a request pending, false otherwise.
145 extern "C" MDAPI bool MiniDisplayRequestPending(MiniDisplayDevice aDevice);
149 Provide the current request if any.
150 @param [IN] The device to apply this command to.
151 @return The current request if any.
153 extern "C" MDAPI TMiniDisplayRequest MiniDisplayCurrentRequest(MiniDisplayDevice aDevice);
157 Cancel any pending request.
158 @param [IN] The device to apply this command to.
160 extern "C" MDAPI void MiniDisplayCancelRequest(MiniDisplayDevice aDevice);
163 Attempt request completion.
164 @param [IN] The device to apply this command to.
166 extern "C" MDAPI TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(MiniDisplayDevice aDevice);
170 @param [IN] The device to apply this command to.
171 @return Device ID name.
173 extern "C" MDAPI char* MiniDisplayDeviceId(MiniDisplayDevice aDevice);
176 Provide firmware revision.
177 @param [IN] The device to apply this command to.
178 @return Firmware revision name.
180 extern "C" MDAPI char* MiniDisplayFirmwareRevision(MiniDisplayDevice aDevice);
183 Get power supply status.
184 @param [IN] The device to apply this command to.
186 extern "C" MDAPI bool MiniDisplayPowerSupplyStatus(MiniDisplayDevice aDevice);