Link here

GUI Function Summary

Subject ordered list of the PDQ Screen's GUI Toolkit functions.

The GUI function library provides detailed descriptions of all of the library routines that comprise the PDQ Screen's GUI Toolkit. These GUI library routines are defined and declared in … FIXME. This page contains a categorized list of the functions. In most browsers, if you click on the name of the function, a popup box containing its glossary definition will appear. You can of course find the complete definitions for all the functions listed in alphabetic order in the GUI glossary.

The GUI Toolkit contains object oriented functions for controlling all aspects of the LCD display and touchscreen: button event recognition, press, hold and release events, menu generation, displaying graphic images, plotting graphs, controlling font type size and color, generating textboxes, and controlling the LCD display's backlight and beeper.

The GUI Toolkit is organized as a collection of objects with defined methods and properties.

 

Interpreting glossary definitions

Each entry in the GUI glossary includes the following elements:

  • A declaration of the routine. If it is a constant or a macro that does not require any arguments, then the name of the routine is simply presented. If it is a function, or a macro that behaves like a function, then the declaration looks like an ANSI-C function prototype, such as:

    void Emit(uchar c)

    where void tells us that there is no return value, and uchar c tells us that there is a single input parameter that is an unsigned character.

    Declarations are provided for both the C (denoted C:) and Forth (denoted 4th:) languages.

  • A detailed definition of what the routine does.
  • Examples of usage in the C and Forth languages.

 

Type abbreviations used in function declarations

Standard type specifiers such as char, int, long, and float are used in the glossary declarations. In addition, we use six convenient typedefs that are defined in the TYPES.h header file:

typedef unsigned char uchar;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned long xaddr;
typedef int wchar;
typedef unsigned int uwchar;

The meanings of the first three typedefs are obvious; they are abbreviations for unsigned types. The xaddr typedef means extended address, and is used when a 32-bit address parameter is passed. The wchar and uwchar stand for wide-char and unsigned wide-char. These types must be used when passing char types to any libraries or kernel functions.

 

Categorized list of GUI Toolkit functions

The GUI glossary presents definitions of all of the functions, constants and macros that are defined and declared by the GUI Toolkit. For convenience in finding useful functions, they are organized into the following subject sorted tables:

 

Object types

These constants representing object types are passed to New_Object() to create new objects:

BUTTON DISPLAY_SCREEN FONT GRAPHIC
PALETTE PLOT SCREEN TEXTBOX
 

Pre-instantiated objects

The GUI Toolkit contains the following pre-instantiated objects for your use:

GUI_BUZZER() GUI_DISPLAY() GUI_ERROR() GUI_FONT() GUI_PALETTE()
GUI_PEN() GUI_PWM_DAC() GUI_SCREEN() GUI_TOOLKIT() GUI_TOUCHSCREEN()
 

GUI methods

Add_Character Add_Data Buzz
Calibrate Clear Clear_Error
Copy_Screen Delete_Character Draw
Get_Property Graphic_To_Image Has_Screen_Changed
Initialize_GUI Load New_Object
Read_Error Redraw Refresh
Screen_Has_Changed Screen_To_Image Service_GUI_Events
Set_Property Simulate_Touch Simulated_Touch_To_Image
STRING_TO_TEXTBOX String_To_Textbox Textbox_To_String
Un_Load
 

Debug method

GUI_Show_All
 

Errors

The following constants represent errors that may be returned by GUI methods. They are returned by the method Read_Error().

BIT_DEPTH_DOES_NOT_MATCH BUFFER_SIZE_OUT_OF_RANGE
BUFFER_SIZE_TOO_SMALL DATA_OUT_OF_RANGE
DISPLAY_INITIALIZATION_FAILURE FLASH_NOT_PROGRAMMABLE
HEAP_FULL HEIGHT_OUT_OF_RANGE
INVALID_BIT_DEPTH INVALID_DISPLAY_TYPE
INVALID_FONT INVALID_GRAPHIC
INVALID_IMAGE INVALID_IMAGE_FORMAT
INVALID_OBJECT INVALID_PALETTE
INVALID_PEN_SHAPE INVALID_PEN_TYPE
INVALID_PLOT INVALID_PROPERTY
INVALID_SCREEN INVALID_TEXTBOX
NO_ERROR PLOT_FULL
TEXTBOX_SIZE_OUT_OF_RANGE TOUCHSCREEN_INITIALIZATION_FAILURE
WIDTH_OUT_OF_RANGE X_OUT_OF_RANGE
Y_OUT_OF_RANGE
 

Properties

GUI objects are modified by setting their properties. The following tables show the properties of each of the GUI objects as named constants. You can send a property to an object using the method Set_Property(), and read it using Get_Property().

 

GUI_TOOLKIT() properties

AVAILABLE_HEAP_SPACE COMMUNICATIONS_TIMEOUT
DEFAULT_FONT DEFAULT_PALETTE
GUI_FALSE GUI_TRUE
HORIZONTAL_SNAP_TO_GRID SERVICE_EVENTS
VERTICAL_SNAP_TO_GRID
 

GUI_DISPLAY() properties

DISPLAY_TYPE BACKLIGHT_ON BIT_DEPTH
BLANK_DISPLAY CONTRAST DIM_DISPLAY
HEIGHT_IN_PIXELS INVERT_DISPLAY WIDTH_IN_PIXELS

The following constants are used in conjunction with the DISPLAY_TYPE property:

COLOR_STN COLOR_TFT MONO_STN
 

Screen properties

These properties apply to the GUI's SCREEN and DISPLAY_SCREEN objects.

HEIGHT_IN_PIXELS IN_DISPLAY NUM_OBJECTS
SCREEN_ADDRESS SCREEN_BACKGROUND SCREEN_UNCHANGED
VISIBLE WIDTH_IN_PIXELS XY_NOT_IN_BUTTON
 

GUI_TOUCHSCREEN() properties

CAL_COORDS LAST_EVENT RAW_COORDS

The following touchscreen event constants may be read from the LAST_EVENT property:

HELD_EVENT NO_EVENT PRESS_EVENT RELEASE_EVENT
 

GUI_PEN() properties

DRAW_COLOR LAST_COORDS PEN_TYPE SHAPE TARGET_SCREEN

The following pen constants are used in conjunction with the PEN_TYPE and SHAPE properties.

LINE POINT SET UNSET
 

GUI_BUZZER() properties

BEEP_DUTY_PERIOD BEEP_NOTE BEEP_TIME BUZZER_ON
 

GUI_PWM_DAC() properties

DAC_COUNT_CH0 DAC_COUNT_CH1 DAC_COUNT_CH2
DAC_COUNT_CH3 PWM_DUTY_PERIOD_CH0 PWM_DUTY_PERIOD_CH1
PWM_DUTY_PERIOD_CH2 PWM_DUTY_PERIOD_CH3
 

Graphic properties

BMP_FORMAT HEIGHT_IN_PIXELS IMAGE WIDTH_IN_PIXELS
 

Font properties

FONT_WIDTH_DATA HEIGHT_IN_PIXELS IMAGE WIDTH_IN_PIXELS
 

Textbox properties

BORDER FIRST_VISIBLE_LINE FONT_COLOR
HEIGHT_IN_PIXELS RENDER STRING_LENGTH
STRING_LINES TEXTBOX_BACKGROUND TEXTBOX_FONT
TEXTBOX_ROWS WIDTH_IN_PIXELS
 

Button properties

BEEP_ON_HOLD BEEP_ON_PRESS BEEP_ON_RELEASE
BLOCK_ON_HOLD BLOCK_ON_PRESS BLOCK_ON_RELEASE
BUTTON_REFRESH BUTTON_TEXTBOX DRAW_GRAPHIC
HEIGHT_IN_PIXELS HELD_EVENT_PROCEDURE PRESS_EVENT_PROCEDURE
PRESS_GRAPHIC RELEASE_EVENT_PROCEDURE RELEASE_GRAPHIC
WIDTH_IN_PIXELS
 

Plot properties

BORDER BUFFER_SIZE HEIGHT_IN_PIXELS
PLOT_ERASE_WIDTH WIDTH_IN_PIXELS
 

Palette properties

PALETTE_DATA
 

Color constants

These constants may be used to set the background color of a screen or textbox, the pixel or line color of the GUI_PEN(), or the color of a font if the default color palette is used.

BLACK                          WHITE                         
DARK_GREY                          LIGHT_GREY                         
MAGENTA                          LIGHT_MAGENTA                         
BLUE                          LIGHT_BLUE                         
CYAN                          LIGHT_CYAN                         
GREEN                          LIGHT_GREEN                         
BROWN                          YELLOW                         
RED                          LIGHT_RED                         
 
 
Page title: GUI Function Summary
This page is about gnu-c gui function summary | function summary | c library gui tools | freescale 9s12 microcontrollers | gui user interface | c functions for the pdq screen's graphic user interface (gui) -- lcd touch screen | plotting and graphing | menus | button press hold and release events | for real time control of scientific instruments and automation | lcd screen coordinates | pixels | buttons menus | touch screen control | textboxes | character graphics display | bar graphs. plot | pen | backlight | beeper | color | events | press hold release
DocWeb Contents
 
Navigation
 
Registration on or use of this site constitutes acceptance of our User Agreement and Privacy Policy. Purchase of Mosaic's products constitutes acceptance of the End User License Agreement, Sales Terms and Conditions, and Life Support policy. Mosaic’s products are not authorized for use as components in life support or medical devices. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Mosaic Industries, Inc. Mosaic and other product names are trademarked and should be capitalized when reproduced. You are encouraged to link to pages of this site.
© Mosaic Industries, Inc. All rights reserved.