Register a callback function that will be called while waiting for input in the idle state.

Syntax

bool AM_SetIdleCallback(
  MENU_HANDLE menu,
  bool( *IdleCallback)(MENU_HANDLE menu, void *param),
  void *param
);

Parameters

menu
[in] Menu handle
IdleCallback
[in] A pointer to the callback function.
param
[in] A pointer to a parameter to pass as an argument to the callback function.

Return value

Returns true if the function succeeds, false otherwise.

Remarks

If you register a callback function with this function, the callback function will be called repeatedly while the AM_ExecMenu function is idle and waiting for input.
To unregister the callback function, call AM_RemoveIdleCallback function.

The specifications of the callback function are as follows.

Syntax

  bool MyCallbackFunction(
    MENU_HANDLE menu,
    void *param
  );
  

Parameters

menu
[in] Menu handle specified by menu parameter of the AM_SetIdleCallback function.
param
[in] Pointer specified by param parameter of the AM_SetIdleCallback function.

Return value

Returns true if you want to continue waiting for input.
Returns false to stop waiting for input. In this case, the AM_ExecMenu will stop waiting and return the AMENU_CALLBACK_BREAK event.

Requirements

Header file:
lib.h
AdvancedMenu.h
Library file:
libAdvancedMenu.a
libSTARTUPOPH5000.a

Last updated: 2020/10/09