Difference between revisions of "XPLMCommandCallback f"

From X-Plane SDK
Jump to: navigation, search
m (1 revision)
(No difference)

Latest revision as of 19:51, 20 April 2009


typedef int (* XPLMCommandCallback_f)(
                                   XPLMCommandRef       inCommand,    
                                   XPLMCommandPhase     inPhase,    
                                   void *               inRefcon);    

A command callback is a function in your plugin that is called when a command is pressed. Your callback receives the commadn reference for the particular command, the phase of the command that is executing, and a reference pointer that you specify when registering the callback.

Your command handler should return 1 to let processing of the command continue to other plugins and X-Plane, or 0 to halt processing, potentially bypassing X-Plane code.