GOLMsg Function

Microchip Graphics Library

Microchip Graphics Library
GOLMsg Function
C
void GOLMsg(
    GOL_MSG * pMsg
);
Overview

This function receives a GOL message from user and loops through the active list of objects to check which object is affected by the message. For affected objects the message is translated and GOLMsgCallback() is called. In the call back function, user has the ability to implement action for the message. If the call back function returns non-zero OBJMsgDefault() is called to process message for the object by default. If zero is returned OBJMsgDefault() is not called. Please refer to GOL Messages section for deatils. 

This function should be called when GOL drawing is completed. It can be done when GOLDraw() returns non-zero value or inside GOLDrawCallback() function.

Input Parameters
Input Parameters 
Description 
GOL_MSG * pMsg 
Pointer to the GOL message from user. 
Returns

none

Preconditions

none

Side Effects

none

Example
// Assume objects are created & states are set to draw objects
while(1){
    if(GOLDraw()){
        // GOL drawing is completed here
        // it is safe to change objects
        TouchGetMsg(&msg);         // from user interface module
        GOLMsg(&msg);
    }
}                           
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved