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:
mcmartin
2004-04-15 03:15:42 +00:00
parent ba04f8ac18
commit 1c4321d246
3 changed files with 346 additions and 137 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
* specially, and we cannot treat them as normal keys. Pain, * specially, and we cannot treat them as normal keys. Pain,
* tragedy. */ * tragedy. */
typedef struct _keyname { typedef struct vcontrol_keyname {
/* const */ char *name; /* const */ char *name;
int code; int code;
} keyname; } keyname;
File diff suppressed because it is too large Load Diff
+15 -1
View File
@@ -43,7 +43,7 @@ void VControl_ResetInput (void);
* Only one name table may be registered at a time; subsequent calls * Only one name table may be registered at a time; subsequent calls
* replace the previous values. */ * replace the previous values. */
typedef struct _vcontrol_namebinding { typedef struct vcontrol_namebinding {
char *name; char *name;
int *target; int *target;
} VControl_NameBinding; } VControl_NameBinding;
@@ -61,4 +61,18 @@ int VControl_ReadConfiguration (uio_Stream *in);
int VControl_GetErrorCount (void); int VControl_GetErrorCount (void);
int VControl_GetValidCount (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 #endif