Upgrades to prepare the ground for online keyconfig
Specifically, removal of identifiers that start with underscores, and adding API routines to check the "last interesting event" and to interrogate the current configuration. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1359 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* specially, and we cannot treat them as normal keys. Pain,
|
||||
* tragedy. */
|
||||
|
||||
typedef struct _keyname {
|
||||
typedef struct vcontrol_keyname {
|
||||
/* const */ char *name;
|
||||
int code;
|
||||
} keyname;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,7 @@ void VControl_ResetInput (void);
|
||||
* Only one name table may be registered at a time; subsequent calls
|
||||
* replace the previous values. */
|
||||
|
||||
typedef struct _vcontrol_namebinding {
|
||||
typedef struct vcontrol_namebinding {
|
||||
char *name;
|
||||
int *target;
|
||||
} VControl_NameBinding;
|
||||
@@ -61,4 +61,18 @@ int VControl_ReadConfiguration (uio_Stream *in);
|
||||
int VControl_GetErrorCount (void);
|
||||
int VControl_GetValidCount (void);
|
||||
|
||||
/* Iterator control. Start an iteration with StartIter or
|
||||
StartIterByName; then call NextBindingName with a char array of at
|
||||
least 40 bytes in size until it returns 0. Produces names. */
|
||||
|
||||
void VControl_StartIter (int *target);
|
||||
void VControl_StartIterByName (char *targetname);
|
||||
int VControl_NextBindingName (char *buffer);
|
||||
|
||||
/* Tracking the "last interesting event." Used to poll to find new
|
||||
control keys. */
|
||||
|
||||
void VControl_ClearEvent (void);
|
||||
int VControl_GetLastEvent (SDL_Event *e);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user