GOLAddObject Function

Microchip Graphics Library

Microchip Graphics Library
GOLAddObject Function
C
void GOLAddObject(
    OBJ_HEADER * object
);
Overview

This function adds an object to the tail of the active list pointed to by _pGolObjects. The new list tail is set to point to NULL.

Input Parameters
Input Parameters 
Description 
pObj 
Pointer to the object to be added on the current active list. 
Returns

none

Preconditions

none

Side Effects

none

Example
void MoveObject(OBJ_HEADER *pSrcList, OBJ_HEADER *pDstList,
    OBJ_HEADER *pObjtoMove) {
    OBJ_HEADER *pTemp = pSrcList;
    
    if(pTemp != pObjtoMove) {
        while(pTemp->pNxtObj != pObjtoMove)
            pTemp = pTemp->pNxtObj;
    }

    pTemp->pNxtObj = pObjtoMove ->pNxt; // remove object from list
    GOLSetList(pDstList);               // destination as active list
    GOLAddObject(pObjtoMove);           // add object to active list
}
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved