-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSEAPI.h
More file actions
36 lines (36 loc) · 1.59 KB
/
CSEAPI.h
File metadata and controls
36 lines (36 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
/********** CSE Interface API ****************************************************
* Interface object passed through the OBSE messaging system. A pointer to the
* object will be dispatched to plugins that pass an arbitrary message of type
* 'CSEI' post post-plugin load (reply will be of the same type).
*
* All other interfaces need to be initialized by calling InitializeInterface().
*********************************************************************************/
struct CSEInterface
{
enum
{
kCSEInterface_Console = 0,
kCSEInterface_IntelliSense
};
// Used to initialize CSE's interface objects. Similar to OBSE's QueryInterface.
void* (* InitializeInterface)(UInt8 InterfaceType);
};
struct CSEIntelliSenseInterface
{
// Registers an arbitrary URL to a script command. Registered URLs will be displayed in the
// script editor's context menu when the corresponding command is selected.
void (* RegisterCommandURL)(const char* CommandName, const char* URL);
};
struct CSEConsoleInterface
{
typedef void (* ConsolePrintCallback)(const char* Message, const char* Prefix);
// Prints a message to the console. Prefix can be an abbreviated string of any kind.
// Printed messages will be of the following format: [<Prefix>]\t\t<Message>
// Mustn't be called inside a callback.
//
// Reserved Prefixes: CMD, CSE, SE, CS, BSAV, USE, BE
void (* PrintToConsole)(const char* Prefix, const char* FormatString, ...);
// Registers a handler that gets called whenever a message is printed to the console.
void (* RegisterCallback)(ConsolePrintCallback Handler);
};