Miscellaneous Functions.
[Furnarchy 2API Functions]

This and that. More...

Functions

F2LINK void *F2CALL f2_hookapi (const char *lib, const char *name, void *hook, bool by_ordinal)
 Hooks an API symbol by name or ordinal.
F2LINK HWND F2CALL f2_getwnd ()
 Retrieve the window handle of the main window.
F2LINK void F2CALL f2_setcurdialog (HWND dlg)
 Set the active dialog window.
F2LINK void F2CALL f2_command (const char *command, bool noecho=false)
 Send a command line command through furnarchy.
F2LINK void F2CALL f2_name_push (const char *name)
 Adds/refreshes a name in the autocomplete list.
F2LINK int F2CALL f2_name_complete (char *name, std::size_t size, int iter)
 Completes a name.
F2LINK void F2CALL f2_makeshortname (const char *name, char *buf)
 Converts a player name into a shortname.

Detailed Description

This and that.


Function Documentation

F2LINK void F2CALL furn2::f2_command ( const char *  command,
bool  noecho = false 
)

Send a command line command through furnarchy.

Parameters:
[in] command The command line command (minus the '@' prefix).
[in] noecho Whether or not to echo the command in the chat buffer.
Remarks:
Commands are queued, not processed immediately.
See also:
on_command

F2LINK HWND F2CALL furn2::f2_getwnd (  ) 

Retrieve the window handle of the main window.

Remarks:
This is only valid after the window is created (duh). To know when the window is created, wait for the CL_EVENT_WNDCREATED event.
See also:
CL_EVENT_WNDCREATED

F2LINK void* F2CALL furn2::f2_hookapi ( const char *  lib,
const char *  name,
void *  hook,
bool  by_ordinal 
)

Hooks an API symbol by name or ordinal.

Parameters:
[in] lib The DLL name.
[in] name The symbol/function name.
[in] hook Address to replace the symbol with.
[in] by_ordinal true if name is actually of type int.
Returns:
The previous symbol address.
Remarks:
When intercepting API functions, a well-behaved module should pass the unhandled call to the function returned by f2_hookapi(), because another module might have hooked the same function. To ensure every module gets its opportunity to handle the same hooked function, each must agree to forward unhandled calls to the next.

F2LINK void F2CALL furn2::f2_makeshortname ( const char *  name,
char *  buf 
)

Converts a player name into a shortname.

Shortnames are a character's "true" name. All non-alphanumeric characters are removed and accented characters are converted to their ascii equivalents.

Parameters:
[in] name Long name.
[out] buf Buffer to be filled with the shortname. sizeof( buf ) must be >= sizeof( name ).

F2LINK int F2CALL furn2::f2_name_complete ( char *  name,
std::size_t  size,
int  iter 
)

Completes a name.

Parameters:
[in,out] name String containing the start of the name, also receives the completed name.
[in] size The size of the name buffer, in bytes.
[in] iter An iterator state value that provides for cycling through matching names.
Returns:
The next iter state value, or -1 if the name wasn't matched.
Remarks:
To cycle through all names, start with iter as 0 and use the return value for each successive call.

F2LINK void F2CALL furn2::f2_name_push ( const char *  name  ) 

Adds/refreshes a name in the autocomplete list.

Parameters:
[in] name The name to add or refresh.
Remarks:
If the name already exists in the list, it is refreshed by being promoted to the front of the list.

F2LINK void F2CALL furn2::f2_setcurdialog ( HWND  dlg  ) 

Set the active dialog window.

Parameters:
[in] dlg The active dialog window.
Remarks:
If you want the typical dialog processing to be done for your dialog window, you should pass your window's handle into this function when your window is activated via WM_ACTIVATE.


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