MDM166AA: Improved icon APIs.
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,
31 EMiniDisplayFutabaGP1212A01,
32 EMiniDisplayFutabaGP1212A02,
33 EMiniDisplayFutabaMDM166AA,
34 EMiniDisplayAutoDetectFailed
40 EMiniDisplayRequestNone=0,
41 EMiniDisplayRequestDeviceId,
42 EMiniDisplayRequestFirmwareRevision,
43 EMiniDisplayRequestPowerSupplyStatus
48 Define the various type of icons we support.
49 For binary compatibility new entries must be added at the end.
53 EMiniDisplayIconNetwork=0,
54 EMiniDisplayIconEmail,
56 EMiniDisplayIconVolume,
57 EMiniDisplayIconVolumeLabel,
59 EMiniDisplayIconPause,
60 EMiniDisplayIconRecording
65 Attempt to establish a connection to with a display of the given type.
66 Supports display auto-detection too.
68 @param [IN] The display type we want to connect to.
69 @return Handle to the device we connected to on success, null otherwise.
71 extern "C" MDAPI MiniDisplayDevice MiniDisplayOpen(TMiniDisplayType aType);
74 Close the connection with the given display device.
76 @param [IN] The device to apply this command to.
78 extern "C" MDAPI void MiniDisplayClose(MiniDisplayDevice aDevice);
81 Provides the number of display types supported.
82 That includes the pseudo 'Auto-Detect' display.
83 @return The number of display type supported.
85 extern "C" MDAPI int MiniDisplayTypeCount();
88 Provides the human readable name of the given display type.
90 @param [IN] The display type we want to get the name for.
91 @return The name of the given display type.
93 extern "C" MDAPI wchar_t* MiniDisplayTypeName(TMiniDisplayType aType);
96 Clear our MiniDisplay.
97 @param [IN] The device to apply this command to.
99 extern "C" MDAPI void MiniDisplayClear(MiniDisplayDevice aDevice);
102 Fill our MiniDisplay.
103 @param [IN] The device to apply this command to.
105 extern "C" MDAPI void MiniDisplayFill(MiniDisplayDevice aDevice);
108 Swap our MiniDisplay buffers committing our back buffer content to the screen.
109 @param [IN] The device to apply this command to.
111 extern "C" MDAPI void MiniDisplaySwapBuffers(MiniDisplayDevice aDevice);
114 Provide maximum brightness level for the given device.
115 @param [IN] The device to apply this command to.
116 @return Maximum brightness level.
118 extern "C" MDAPI int MiniDisplayMaxBrightness(MiniDisplayDevice aDevice);
121 Provide minimum brightness level for the given device.
122 @param [IN] The device to apply this command to.
123 @return Minimum brightness level.
125 extern "C" MDAPI int MiniDisplayMinBrightness(MiniDisplayDevice aDevice);
128 Set device brightness level.
129 @param [IN] The device to apply this command to.
130 @param [IN] Brightness level
132 extern "C" MDAPI void MiniDisplaySetBrightness(MiniDisplayDevice aDevice, int aBrightness);
135 Provide pixels width of our display.
136 @param [IN] The device to apply this command to.
137 @return Width in pixels.
139 extern "C" MDAPI int MiniDisplayWidthInPixels(MiniDisplayDevice aDevice);
142 Provide pixels height of our display.
143 @param [IN] The device to apply this command to.
144 @return Height in pixels.
146 extern "C" MDAPI int MiniDisplayHeightInPixels(MiniDisplayDevice aDevice);
150 @param [IN] The device to apply this command to.
151 @param [IN] Pixel X coordinate.
152 @param [IN] Pixel Y coordinate.
153 @param [IN] Pixel value.
155 extern "C" MDAPI void MiniDisplaySetPixel(MiniDisplayDevice aDevice, int aX, int aY, unsigned int aPixel);
157 //TODO: Have an API to specify pixel depth
161 @param [IN] The device to apply this command to.
164 extern "C" MDAPI wchar_t* MiniDisplayVendor(MiniDisplayDevice aDevice);
167 Provide product name.
168 @param [IN] The device to apply this command to.
169 @return Product name.
171 extern "C" MDAPI wchar_t* MiniDisplayProduct(MiniDisplayDevice aDevice);
174 Provide Serial number.
175 @param [IN] The device to apply this command to.
176 @return Serial number name.
178 extern "C" MDAPI wchar_t* MiniDisplaySerialNumber(MiniDisplayDevice aDevice);
182 @param [IN] The device to apply this command to.
184 extern "C" MDAPI void MiniDisplayRequest(MiniDisplayDevice aDevice, TMiniDisplayRequest aRequest);
187 Tell whether or not a request is pending.
188 @param [IN] The device to apply this command to.
189 @return true if we have a request pending, false otherwise.
191 extern "C" MDAPI bool MiniDisplayRequestPending(MiniDisplayDevice aDevice);
195 Provide the current request if any.
196 @param [IN] The device to apply this command to.
197 @return The current request if any.
199 extern "C" MDAPI TMiniDisplayRequest MiniDisplayCurrentRequest(MiniDisplayDevice aDevice);
203 Cancel any pending request.
204 @param [IN] The device to apply this command to.
206 extern "C" MDAPI void MiniDisplayCancelRequest(MiniDisplayDevice aDevice);
209 Attempt request completion.
210 @param [IN] The device to apply this command to.
212 extern "C" MDAPI TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(MiniDisplayDevice aDevice);
216 @param [IN] The device to apply this command to.
217 @return Device ID name.
219 extern "C" MDAPI char* MiniDisplayDeviceId(MiniDisplayDevice aDevice);
222 Provide firmware revision.
223 @param [IN] The device to apply this command to.
224 @return Firmware revision name.
226 extern "C" MDAPI char* MiniDisplayFirmwareRevision(MiniDisplayDevice aDevice);
229 Get power supply status.
230 @param [IN] The device to apply this command to.
232 extern "C" MDAPI bool MiniDisplayPowerSupplyStatus(MiniDisplayDevice aDevice);
235 Turn device Power ON.
236 @param [IN] The device to apply this command to.
238 extern "C" MDAPI void MiniDisplayPowerOn(MiniDisplayDevice aDevice);
241 Turn device Power OFF.
242 @param [IN] The device to apply this command to.
244 extern "C" MDAPI void MiniDisplayPowerOff(MiniDisplayDevice aDevice);
247 Specifies whether or not this display supports power ON/OFF functions.
248 @param [IN] The device to apply this command to.
249 @return True if one can turn display power on and off, false otherwise.
251 extern "C" MDAPI bool MiniDisplaySupportPowerOnOff(MiniDisplayDevice aDevice);
255 @param [IN] The device to apply this command to.
257 extern "C" MDAPI void MiniDisplayShowClock(MiniDisplayDevice aDevice);
261 @param [IN] The device to apply this command to.
263 extern "C" MDAPI void MiniDisplayHideClock(MiniDisplayDevice aDevice);
266 Specifies whether or not this display supports clock functions.
267 @param [IN] The device to apply this command to.
268 @return True if this display supports built-in clock, false otherwise.
270 extern "C" MDAPI bool MiniDisplaySupportClock(MiniDisplayDevice aDevice);
273 Tells how many icons of the given are supported by the specified device.
274 Typically icons on a VFD hardware have several segments that can be light up separately.
275 @param [IN] The device to apply this command to.
276 @param [IN] The type of icon we are interested in.
277 @return The number of icons of this kind this display supports.
279 extern "C" MDAPI int MiniDisplayIconCount(MiniDisplayDevice aDevice, TMiniDisplayIconType aIcon);
282 Tells how many status the icon of the specified type supports for the given device.
283 Status are typically brightness level on VFD hardware.
284 Most icon will just support 2 status: 0 for Off and 1 for On.
285 @param [IN] The device to apply this command to.
286 @param [IN] The type of icon we are interested in.
287 @return The number of icons of this kind this display supports.
289 extern "C" MDAPI int MiniDisplayIconStatusCount(MiniDisplayDevice aDevice, TMiniDisplayIconType aIcon);
292 Set the status of the given icon for the specified device.
293 @param [IN] The device to apply this command to.
294 @param [IN] The type of icon we are interested in.
295 @param [IN] The index of the icon of the given type.
296 @param [IN] The status the icon is to assume.
298 extern "C" MDAPI void MiniDisplaySetIconStatus(MiniDisplayDevice aDevice, TMiniDisplayIconType aIcon, int aIndex, int aStatus);