Library functions

int LcdDeInitialize()
DescriptionDeinitializes the library.
InformationCalling this function while applets, pixmaps or fonts are still in use may result in undefined behaviour. You should therefore delete all objects using LcdDeleteApplet, LcdDeletePixmap and LcdDeleteFont.
int LcdInitialize()
DescriptionInitializes the library.
InformationYou need to call this function before creating an applet, pixmap or font. If this function does not succeed you should assume that the Logitech software is not installed and therefore disable all LCD-related functionality.
ReturnsLCD_OK if initialization was successful, otherwise LCD_ERROR.
int LcdLastError()
DescriptionReturns the error code after a function failed and returned NULL.
InformationThe return value can be one of the following constants.

LCD_OK
LCD_ERROR
LCD_ERROR_NOT_INITIALIZED
LCD_ERROR_INVALID_PARAMETER
LCD_ERROR_NOT_FOUND

Applet functions

int LcdAppletActive(LCDAPPLET pApplet)
DescriptionChecks if an applet is active.
InformationYou should suspend rendering until the applet is active. You can also use LcdWaitActivation to block the calling thread until the applet gets activated.

[This function is device-specific.]
Returnstrue if the applet is both enabled and opened, otherwise false or LCD_DEVICE_INVALID if the LCD Manager is no longer avaliable.
int LcdAppletEnabled(LCDAPPLET pApplet)
DescriptionChecks if an applet is currently enabled.
Returnstrue if the applet is enabled in the LCD Manager, otherwise false.
int LcdAppletOpened(LCDAPPLET pApplet)
DescriptionChecks if an applet is opened on the currently selected device.
InformationUse LcdSelectDevice to specify the current device.

[This function is device-specific.]
Returnstrue if the applet is opened on the device, otherwise false.
int LcdButtonState(LCDAPPLET pApplet, int nButton)
DescriptionDetermines the button status.
InformationYou can also use LcdSetEventHandler for asynchronous event handling.

[This function is device-specific.]
Returnstrue if nButton is currently pressed, otherwise false.
int LcdConfigState(LCDAPPLET pApplet)
DescriptionDetermines the configuration status.
InformationYou can also use LcdSetEventHandler for asynchronous event handling.
Returnstrue if the user pressed the 'Configure...' button in the LCD Manager since the last call of this method, otherwise false.
LCDAPPLET LcdCreateApplet(const wchar_t *pName, int nDevices, int bConfigurable, bAutostart)
DescriptionCreates a new applet.
InformationParameter nDevices specifies the device types and can be a combination of the following values.

Device typeDescription
LCD_DEVICE_MONOSupport for monochrome displays (G13, G15 and Z-10)
LCD_DEVICE_COLORSupport for color displays (G19)

If the applet supports both device types, all information (e.g. current color, font, render target, etc.) is stored separately for each device. Use the LcdSelectDevice function to select the target device for all subsequent device-specific operations.Functions that affect only the current device are marked as [device-specific] in this documentation.

If bConfigurable is true, the 'Configure...' button in the LCD Manager will be enabled and the applet will receive an LCD_EVENT_CONFIGURE event through its event handler when the user clicks on in. If bAutostart is true, the applet can automatically be launched by the LCD Manager, otherwise the user has to start it manually.

You should delete the applet with LcdDeleteApplet if it is no longer needed and before you call LcdDeInitialize.

Also implemented as ANSI version.
int LcdDeleteApplet(LCDAPPLET pApplet)
DescriptionDeletes the applet.
InformationYou should delete all applets before you call LcdDeInitialize.
int LcdSelectDevice(LCDAPPLET pApplet, int nDevice)
DescriptionDetermines the target of subsequent, device-specific operations.
InformationYou only need to call this function if the applet supports both monochrome and color devices. If only one device type is supported the device will be selected automatically.
int LcdSetEventHandler(LCDAPPLET pApplet, LCDEVENTHANDLER pEventHandler, void *pContext)
DescriptionSets the event handler for configuration and button events.
InformationThe event type is indicated by the nEvent parameter which can be one of the following values.

Event typeDescription
LCD_EVENT_CONFIGUREThe user pressed the 'Configure...' button in the LCD Manager.
LCD_EVENT_BUTTONThe user pressed or released a soft button. Parameter nData contains a bitmask of buttons.

Note that the event handler is executed in the context of the LCD Manager and is therefore running in a different thread. You need to ensure thread safety if the event handler shares resources with threads in your application.
int LcdSetPriority(LCDAPPLET pApplet, int nPriority, int bForeground)
DescriptionSets an applets' priority and foreground status.
InformationParameter nPriority can be one of the following values.

LCD_PRIORITY_LOW
LCD_PRIORITY_NORMAL
LCD_PRIORITY_HIGH

Specify true for bForeground to stop the LCD Manager from automatically switching between all running applets or false to continue with automatic switching. Note that an applet can easily lose its foreground status when the user manually switches between different applets or returns to the applet menu.
int LcdUpdate(LCDAPPLET pApplet, int bSync)
DescriptionShows the content of the back-buffer render target on the LCD.
InformationNote that the applet only becomes visible after the first call to this function. That way you can do applet-specific initializations without the applet being displayed on the device. If bSync is true this method will return immediately after sending the buffer data to the LCD Manager, otherwise it will wait until the data is actually displayed which takes about 30 milliseconds or more.

[This function is device-specific.]
int LcdWaitActivation(LCDAPPLET pApplet)
DescriptionWaits until an applet gets activated.
InformationIf the return value is LCD_DEVICE_INVALID the connection to the LCD Manager is lost and cannot be restored. In this case, the applet should stop all of its LCD-related functionality or exit.
ReturnsThe devices that are currently active or LCD_DEVICE_INVALID if the LCD Manager is no longer avaliable.

Graphics functions

int LcdClear(LCDAPPLET pApplet, int nColor)
DescriptionDeletes the content of the current render target.
InformationParameter nColor specifies the color in RGB format. Note that any alpha component of the color will be ignored.

[This function is device-specific.]
int LcdDrawLine(LCDAPPLET pApplet, int nX1, int nY1, int nX2, int nY2)
DescriptionDraws a line.
Information[This function is device-specific.]
int LcdDrawOval(LCDAPPLET pApplet, int nX, int nY, int nWidth, int nHeight, int bFill)
DescriptionDraws an oval.
InformationSet bFill to false in order to draw only the outline of the oval.

[This function is device-specific.]
int LcdDrawRect(LCDAPPLET pApplet, int nX, int nY, int nWidth, int nHeight, int bFill)
DescriptionDraws a rectangle.
InformationSet bFill to false in order to draw only the outline of the rectangle.

[This function is device-specific.]
int LcdEnableAntiAlias(LCDAPPLET pApplet, int bEnable)
DescriptionEnables or disables anti-aliasing.
InformationNote that anti-aliasing is only avaliable for color devices.

[This function is device-specific.]
int LcdSetColor(int nColor)
DescriptionSets the current drawing color.
InformationParameter nColor specifies the color in RGB format. Note that any alpha component of the color will be ignored. You can also use the following color constants for monochrome displays.

ConstantDescription
LCD_COLOR_VISIBLEMakes pixels visible (similar to white on color displays).
LCD_COLOR_INVISIBLEMakes pixels invisible (similar to black on color displays).

The default color is white or LCD_COLOR_VISIBLE.

[This function is device-specific.]
int LcdSetLineWidth(LCDAPPLET pApplet, float fWidth)
DescriptionSets the current line width.
InformationThe line width affects the LcdDrawLine function as well as LcdDrawRect and LcdDrawOval if the bFill parameter is false.

[This function is device-specific.]
int LcdSetRotation(LCDAPPLET pApplet, float fRotation, int nCenterX, int nCenterY)
DescriptionSets the current rotation.
InformationYou can also specify the center of the rotation using nX and nY. This function affects all subsequent calls to LcdDrawLine, LcdDrawRect and LcdDrawOval. Note that pixmaps and text cannot be rotated.

[This function is device-specific.]
int LcdSetTarget(LCDAPPLET pApplet, LCDPIXMAP pPixmap)
DescriptionSets the current render target.
InformationParameter pPixmap specifies the pixmap that will be used as render target. Note that only pixmaps created by LcdCreatePixmap are suitable render targets. Drawing to pixmaps that are loaded from image files is not supported. Specify NULL for pPixmap to reset the render target.

[This function is device-specific.]

Pixmap functions

LCDPIXMAP LcdCreatePixmap(int nWidth, int nHeight, int nDevice)
DescriptionCreates a new render target pixmap.
InformationParameter nDevice indicates the device type of the pixmap. You should use the pixmap only with the device type that it was created for. See LcdCreateApplet for valid device types. You should delete the pixmap with LcdDeletePixmap if it is no longer needed and before you call LcdDeInitialize.
int LcdDeletePixmap(LCDPIXMAP pPixmap)
DescriptionDeletes a pixmap.
InformationYou should delete all pixmaps before you call LcdDeInitialize.
int LcdDrawPixmap(LCDAPPLET pApplet, LCDPIXMAP pPixmap, int nX, int nY, int nFrame)
DescriptionDraws a pixmap.
InformationParameter nFrame specifies the frame number if the pixmap was created with the LcdLoadAnimPixmap function.

[This function is device-specific.]
int LcdDrawPixmapRect(LCDAPPLET pApplet, LCDPIXMAP pPixmap, int nX, int nY, int nSx, int nSy, int nWidth, int nHeight, int nFrame)
DescriptionDraws a rectangular area of a pixmap.
InformationParameters nSx, nSy, nWidth and nHeight specify the source rectangle of pPixmap to be drawn.

[This function is device-specific.]
LCDPIXMAP LcdLoadAnimPixmap(const wchar_t *pFile, int nFrameWidth, int nFrameHeight, int nFrames)
DescriptionLoads an animated pixmap from an image file.
InformationSupported file formats are PNG, JPEG, BMP, TIFF, GIF.Parameters nFrameWidth and nFrameHeight indicate the size of a single frame in the pixmap. The pixmap has to be nFrameWidth * nFrame pixels wide and nFrameHeight pixels high, because the size of all frames has to be equal.

You should delete the pixmap with #LcdDeletePixmap if it is no longer needed and before you call LcdDeInitialize.

Also implemented as ANSI version.
LCDPIXMAP LcdLoadPixmap(const wchar_t *pFile)
DescriptionLoads a pixmap from an image file.
InformationSupported file formats are PNG, JPEG, BMP, TIFF and GIF.

You should delete the pixmap with LcdDeletePixmap if it is no longer needed and before you call LcdDeInitialize.
int LcdPixmapWidth(LCDPIXMAP pPixmap)
DescriptionReturns the width of a pixmap.
int LcdPixmapHeight(LCDPIXMAP pPixmap)
DescriptionReturns the height of a pixmap.

Font functions

int LcdDeleteFont(LCDFONT pFont)
DescriptionDeletes a font.
InformationYou should delete all fonts before you call LcdDeInitialize.
int LcdDrawText(LCDAPPLET pApplet, const wchar_t *pString, int nX, int nY)
DescriptionDraws a text string.
Information[This function is device-specific.]

Also implemented as ANSI version.
LCDFONT LcdLoadFont(const wchar_t *pFamily, int nHeight, int nFlags, const wchar_t *pFile)
DescriptionLoads a font from the system or a font file.
InformationThe font is loaded from the system by default. If you want to load it from a TTF or OTF file, specify the relative path and filename for parameter pFile.

Parameter nFlags can be LCD_FONT_DEFAULT or a combination of the following values.

LCD_FONT_BOLD
LCD_FONT_ITALIC
LCD_FONT_UNDERLINE

You should delete the font with LcdDeleteFont if it is no longer needed and before you call LcdDeInitialize.

Also implemented as ANSI version.
int LcdSetFont(LCDAPPLET pApplet, LCDFONT pFont)
DescriptionSets the current font.
InformationThis function affects all subsequent calls to LcdDrawText.

[This function is device-specific.]
int LcdStringHeight(LCDAPPLET pApplet, const wchar_t *pString)
DescriptionCalculates the height of a string.
InformationThis function uses the currently selected font to measure the string's height.

[This function is device-specific.]

Also implemented as ANSI version.
int LcdStringWidth(LCDAPPLET pApplet, const wchar_t *pString)
DescriptionCalculates the width of a string.
InformationThis function uses the currently selected font to measure the string's width.

[This function is device-specific.]

Also implemented as ANSI version.