Struct logitech_lcd::Lcd [] [src]

pub struct Lcd { /* fields omitted */ }

Main LCD interface

Initialize at start of your program. Can Be initialized with color support, monochrome support and both. Will automatically disconnect when the Lcd is dropped.

Methods

impl Lcd
[src]

[src]

Initialize and connect to a monochrome lcd device.

Parameters:

  • app_name: The name of your applet.

Panics:

  • If another Lcd instance is alive.

[src]

Initialize and connect to a color lcd device.

Parameters:

  • app_name: The name of your applet.

Panics:

  • If another Lcd instance is alive.

[src]

Initialize and connect to either a monochrome or color lcd device.

Parameters:

  • app_name: The name of your applet.

Panics:

  • If another Lcd instance is alive.

[src]

Checks if the device is connected.

Return value: If a device supporting the lcd type specified is found, it returns true, otherwise false

[src]

Updates the lcd display.

You have to call this function every frame of your main loop, to keep the lcd updated.

[src]

Checks if the buttons specified by the parameter are being pressed.

If the buttons specified are being pressed it returns true, otherwise false. The button will be considered pressed only if your applet is the one currently in the foreground.

[src]

Sets the specified image as background for the monochrome lcd device.

Parameters:

  • mono_bitmap: The image data is organized as a rectangular area, 160 bytes wide and 43 bytes high. Despite the display being monochrome, 8 bits per pixel are used here for simple manipulation of individual pixels. A pixel will turn on the if the value assigned to that byte is >= 128, it will remain off if the value is < 128.

Panics:

  • If mono_bitmap's length is not 160x43 bytes.
  • If Lcd was initialized without mono support.

[src]

Sets the specified text in the requested line on the monochrome lcd device.

Parameters:

  • line_number: The line on the screen you want the text to appear. The monochrome lcd display has 4 lines, so this parameter can be any number from 0 to 3.
  • text: Defines the text you want to display

Panics:

  • If line_number larger than or equal to 4.
  • If Lcd was initialized without mono support.

[src]

Sets the specified image as background for the color lcd device connected.

Parameters:

  • color_bitmap: ARGB color bitmap, full RGB gamma, 8-bit per channel, 320 pixels wide and 240 pixels high, 32 bits per pixel(4 bytes).

Panics:

  • If color_bitmap's length is not 320x240x4 bytes.
  • If Lcd was initialized without color support.

[src]

Sets the specified text in the first line on the color lcd device connected. The font size that will be displayed is bigger than the one used in the other lines, so you can use this function to set the title of your applet/page.

Parameters:

  • text: Defines the text you want to display as title.
  • red, green, blue: The LCD can display a full RGB color, you can define the color of your title using these parameters.

Panics:

  • If Lcd was initialized without color support.

[src]

Sets the specified text in the requested line on the color lcd device connected.

Parameters:

  • line_number: The line on the screen you want the text to appear. The color lcd display has 8 lines, or standard text, so this parameter can be any number from 0 to 7
  • text: Defines the text you want to display as title.
  • red, green, blue: The LCD can display a full RGB color, you can define the color of your title using these parameters.

Panics:

  • If line_number larger than or equal to 8.
  • If Lcd was initialized without color support.

Trait Implementations

impl Drop for Lcd
[src]

[src]

Kills the applet and frees memory used by the SDK

Auto Trait Implementations

impl Send for Lcd

impl Sync for Lcd