XPLMCommandCallback f

From X-Plane SDK
Revision as of 13:15, 15 April 2009 by Bsupnik (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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.