XPLMCommandCallback f

From X-Plane SDK
Revision as of 19:51, 20 April 2009 by Admin (Talk | contribs) (1 revision)

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

XPLMCommandCallback_f

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.