Event Handlers

To receive event notifications from Furnarchy, simply define any of the following event handlers anywhere in your project. More...

Functions

F2EXPORT intptr_t F2CALL on_module (Module_Event e, intptr_t param)
 The module events handler.
F2EXPORT intptr_t F2CALL on_client (Client_Event e, intptr_t param)
 The client event handler.
F2EXPORT bool F2CALL on_wndproc (WNDPROCPARAMS *params)
 The windows message events handler.
F2EXPORT intptr_t F2CALL on_world (World_Event e, intptr_t param)
 The world events handler.
F2EXPORT bool F2CALL on_command (int argc, char *argv[])
 The Furnarchy command events handler.
F2EXPORT void F2CALL on_inet (Revision pass, const char *line, int from, size_t num)
 The Server-to-Client network line handler.
F2EXPORT void F2CALL on_onet (Revision pass, const char *line, int from, size_t num)
 The Client-to-Server network line handler.

Detailed Description

To receive event notifications from Furnarchy, simply define any of the following event handlers anywhere in your project.


Function Documentation

F2EXPORT intptr_t F2CALL on_client ( Client_Event  e,
intptr_t  param 
)

The client event handler.

Various events that relate to the client come through here. The type and meaning of param depends on the value of e.

Parameters:
[in] e The client event.
[in,out] param Event-specific parameter.
Returns:
Depends on the message.
See also:
Client Events

F2EXPORT bool F2CALL on_command ( int  argc,
char *  argv[] 
)

The Furnarchy command events handler.

These are the '@' prefixed commands, but without the '@' prefix.

Parameters:
[in] argc Number of strings in argv.
[in] argv Array of command line parameters.
Returns:
Return true to tell Furnarchy you've handled the message. Return false otherwise.
Remarks:
Commands are sent to all modules/scripts/etc. The command line parameters are tokenized by whitespace, unless enclosed in backticks, apostrophes, or double quotes.
See also:
f2_command()

F2EXPORT void F2CALL on_inet ( Revision  pass,
const char *  line,
int  from,
size_t  num 
)

The Server-to-Client network line handler.

Allows for inspecting or manipulating of inbound network data.

Parameters:
[in] pass The revision pass.
[in] line Null-terminated server-to-client line.
[in] from Where the line originated from. from will be set to FROM_SERVER if the line originated from the server (i.e., wasn't genereted by an f2_netinline() or equivalent).
[in] num The line number. Every network line that passes through furnarchy gets tagged with an identifying number.
Remarks:
Network lines are sent to modules in 3 passes. For more information, check the section on Handling Network Events.
See also:
Handling Network Events f2_netin() f2_netinline()

F2EXPORT intptr_t F2CALL on_module ( Module_Event  e,
intptr_t  param 
)

The module events handler.

Various events that relate to the module come through here. The type and meaning of param depends on the value of e.

Parameters:
[in] e The module event.
[in,out] param Event-specific parameter.
Returns:
Depends on the message.
See also:
Module Events

F2EXPORT void F2CALL on_onet ( Revision  pass,
const char *  line,
int  from,
size_t  num 
)

The Client-to-Server network line handler.

Allows for inspecting or manipulating of outbound network data.

Parameters:
[in] pass The revision pass.
[in] line Null-terminated client-to-server line.
[in] from Where the line originated from. from will be set to FROM_CLIENT if the line originated from the client (i.e., wasn't genereted by an f2_netoutline() or equivalent).
[in] num The line number. Every network line that passes through furnarchy gets tagged with an identifying number.
Remarks:
Network lines are sent to modules in 3 passes. For more information, check the section on Handling Network Events.
See also:
Handling Network Events f2_netout() f2_netoutline()

F2EXPORT bool F2CALL on_wndproc ( WNDPROCPARAMS *  params  ) 

The windows message events handler.

About Everything that goes through the client's WindowProcedure goes through here.

Parameters:
[in] params* Message parameters.
Returns:
Return true to indicate you've handled the message and to use the return value in params->retval. Otherwise, the message will continue on to the other modules in the pipeline (and eventually to the client).
See also:
furn2::WNDPROCPARAMS

F2EXPORT intptr_t F2CALL on_world ( World_Event  e,
intptr_t  param 
)

The world events handler.

World event messages come through here. The type and meaning of param depends on the value of e.

Parameters:
[in] e Message parameters.
[in,out] param Event-specific parameter.
Returns:
Depends on the message.
See also:
World Events


Generated on Tue Jun 24 12:24:08 2008 for Furnarchy Module by  doxygen 1.5.5