Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN1368 Datasheet(PDF) 24 Page - Microchip Technology

Part # AN1368
Description  Developing Embedded Graphics Applications using PIC짰Microcontrollers with Integrated Graphics Controller
PDF  34 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

AN1368 Datasheet(HTML) 24 Page - Microchip Technology

Back Button AN1368 Datasheet HTML 20Page - Microchip Technology AN1368 Datasheet HTML 21Page - Microchip Technology AN1368 Datasheet HTML 22Page - Microchip Technology AN1368 Datasheet HTML 23Page - Microchip Technology AN1368 Datasheet HTML 24Page - Microchip Technology AN1368 Datasheet HTML 25Page - Microchip Technology AN1368 Datasheet HTML 26Page - Microchip Technology AN1368 Datasheet HTML 27Page - Microchip Technology AN1368 Datasheet HTML 28Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 24 / 34 page
background image
AN1368
DS01368A-page 24
 2011 Microchip Technology Inc.
USER MESSAGE INTERFACE
The user message interface is a sublayer of the GOL
which is enabled if the GOL is used. This sublayer is
used to facilitate the message passing between
widgets and user input. For example, if the user
presses a button, then a message is sent to a call back
function, called GOLMsgCallback(), where the
message indicating that the button is pressed is
checked and an action is taken. This callback function
must be present in the application code if the GOL is
being used, no matter if message passing is being
used or not. If the message passing is not used, the
function body must return a ‘1’.
Similar to GOLDraw(), GOLMsg() must be called
continuously in a loop inside the application code to
facilitate message collection and passing.
The usage of GOLDraw(), GOLDrawCallback(),
GOLMsg()
and GOLMsgCallback() are explained in
Example 4, Example 5 and Example 6.
APPLICATION LAYER
In this layer, the user has full control of the application.
Initially, the user must initialize the Microchip Graphics
Library. The initialization is done by calling GOLInit() if
all the layers are being used, InitGraph() if the GOL
is not being used but the Primitive and Display Driver
layers are being used, or by calling ResetDevice() if
only the Display Driver layer is being used. After the
initialization routine, the Primitive and Driver layers’ APIs
can be called to achieve the required draw functionality.
To use GOL objects (like buttons), the widgets must be
created by calling the widget’s create function (e.g.,
BtnCreate()
), one by one, until all of the widgets are
created. This step will not display the widgets. The
created widgets are drawn on the screen when the
GOLDraw()
function is called repeatedly in a while loop.
The messages are processed by calling the GOLMsg()
inside the same loop, as shown in Example 5.
After GOLDraw() is done, messages are received
from the touch screen driver and hard buttons driver.
The obtained message is passed to GOLMsg() to
process and to output a widget-specific message. For
example, it converts a “USER TOUCHED POSITION
100, 100” message to BUTTON1_PRESSED.
Additionally, the application must possess the
GOLDrawCallback()
and
GOLMsgCallback()
functions.
If custom drawing is not done, then the draw callback is
used, as shown in Example 4.
EXAMPLE 4:
The message callback handles the processed
message sent out by the widgets, as shown in
Example 6.
If the application already uses a main loop,
GOLDraw()
and GOLMsg() can be called within the
loop (see Example 5).
Note 1:
Refer to the application note, AN1136, “How
to Use Widgets in Microchip Graphics
Library
” for creating a simple application.
2:
Refer to the Microchip Graphics Library
Help file for the list of related application
notes.
WORD GOLDrawCallback(void)
{
return (1);
}



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com