ProcessEvent

Far Manager

ProcessEvent

The ProcessEvent function informs plugin about different FAR events and allows to process some of them.
int WINAPI ProcessEvent(
  HANDLE hPlugin,
  int Event,
  void *Param
);

Parameters

hPlugin
Plugin handle returned by OpenPlugin or OpenFilePlugin.
Event
Event type. Can be one of the following values (FAR_EVENTS enum):
EventDescription
FE_CHANGEVIEWMODE Panel view mode is changed.
Param points to a null-terminated string specifying column types, for example N,S,D,T. Return value must be FALSE.
FE_REDRAW The panel is about to redraw.
Param is equal to NULL.
Return FALSE to use the FAR redraw routine or TRUE to disable it. In the latter case the plugin must redraw the panel itself.
FE_IDLE Sent every few seconds. A plugin can use this event to request panel updating and redrawing, if necessary.
Param is equal to NULL.
Return value must be FALSE.
FE_CLOSE The panel is about to close.
Param is equal to NULL.
Return FALSE to close the panel or TRUE to cancel it.
FE_BREAK Ctrl-Break is pressed.
Param currently can be only (int)CTRL_BREAK_EVENT
Return value must be FALSE.
Processing of this event is performed in separate thread, so the plugin must be careful when performing console input or output and must not use FAR service functions.
FE_COMMAND About to execute a command from the FAR command line.
Param points to the command text.
he plugin should return FALSE to allow standard command execution or TRUE if it is going to process the command internally.
FE_KILLFOCUS Panel has lost keyboard focus.
Param = NULL.
Return value must be FALSE.
FE_GOTFOCUS Panel received keyboard focus.
The active panel receives the FE_GOTFOCUS event immediately after its creation.
Param = NULL.
Return value must be FALSE.
Param
Points to data dependent on event type. Read events description for concrete information.

Return value

Return value depends on event type. Read events description for concrete information.
Return FALSE for unknown event types