PtHold () PtRelease ()
PtHold prevents all Photon events from being issued to the Photon server. This is useful when a program makes a large number of changes to either overlapping widgets or widgets contained in the same container. Using PtHold can prevent the container from being re-drawn after each change. Normally, PhEventNext is called within the Gamma next_event function, allowing events to be processed. Using PtHold prevents PhEventNext from being executed within next_event.
PtHold will not stop all Photon events from being submitted to the Photon server indefinitly. Once the application's draw buffer is full, the events will be sent to the Photon server, regardless of PtHold.
Each time PtHold is called, the global hold count increases by one. This hold count is decreased by one each time PtRelease is called. When the global hold count decreases to 0, the held Photon events are submitted to the Photon server through the event loop once again. Thus PtHold and PtRelease are typically called conjointly.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.