 
#ifndef keystate_DEFINED
#define keystate_DEFINED 1
 
#ifndef class_DEFINED
#include <class.h>
#endif /* class_DEFINED */
/* 
 * This file was generated by the Andrew class system preprocessor.
 * Don't make changes to this file as it is created from keystate.ch and will be
 * overwritten.  Make changes to keystate.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from keystate.ch.
 */ 
 
/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
*/


 

/* keystate.ch -- A class that keep track of partially evaluated sequences of keystrokes.
December, 1986 */


#define keystate_VERSION	1

/* Return values from ApplyKey: */

enum keystate_ApplyKeyValues  {
    keystate_ProcFound,		/* pe has an entry */
    keystate_NoBinding,		/* key is undefined */
    keystate_Pending		/* keep feeding chars */
};

/* Return values from DoProc: */

enum keystate_DoProcValues {
    keystate_ProcCalled,	/* success */
    keystate_TypeMismatch,	/* couldn't find object of correc type */
    keystate_NoProc		/* couldn't load proc */
};

#include <keymap.ih>







/* 
 * End of information copied from keystate.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
/* keystate has no super class */ 
 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for keystate 
 */ 
struct keystate { 
    struct {
	struct basicobject_methods *keystate_methods;
    } header;
    struct keystate *next;	/* links together keymaps */
    struct keymap *orgMap;	/* keymap to use */
    struct keymap *curMap;	/* where we are in traversal */
    struct basicobject *object;	/* first argument to function */
    enum keymap_Types (*function)(); /* Override function to trap keystrokes. */
    long functionData; /* Rock for the override function. */

};

 
/* 
 * End of data structure for keystate.
 */ 
 

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef keystate_PROGRAMMERVERSION
#define keystate_PROGRAMMERVERSION 1
#endif /* keystate_PROGRAMMERVERSION */

#ifdef keystate_VERSION
#undef keystate_VERSION
#endif /* keystate_VERSION */
#define keystate_VERSION ((((keystate_PROGRAMMERVERSION << 16) ^ (9 << 8) ^ sizeof(struct keystate)) & 0x7ffff) + 0x80000 + (128 << 20))


#endif /* class_StaticInfoOnly */
#define keystate_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *keystate__GetClassInfo(); \
 extern struct classheader *keystate_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, keystate_classheader_StaticExport->name, keystate__GetClassInfo, NULL, keystate_classheader_StaticExport->namekey); } 
 
#define keystate_StaticLoad()  \
    { \
    keystate_StaticLoadOnlyThisClass();  \
    } 
 
#define keystate_StaticEntry  {keystate_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader keystate_classheader = {
    keystate_VERSION,
    "keystate",
    "keystate",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define keystate_CLASSPROCEDURES (keystate_classheader.classprocedures)
int keystate_classref_;
#endif /* class_StaticInfoOnly */

#endif /* keystate_DEFINED */

#if !defined(keystate_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_keystate) && !defined(class_StaticEntriesOnly)
#define keystate_ROUTINESDEFINED

#define keystate_GetObject(self) \
 ((self)->object)
#define keystate_SetObject(self,object) \
    ((* ((void (*)())((self)->header.keystate_methods->routines[0]))) (self,object))
#define keystate_AddBefore(self,ks) \
    ((* ((struct keystate * (*)())((self)->header.keystate_methods->routines[1]))) (self,ks))
#define keystate_AddAfter(self,ks) \
    ((* ((struct keystate * (*)())((self)->header.keystate_methods->routines[2]))) (self,ks))
#define keystate_Reset(self) \
    ((* ((void (*)())((self)->header.keystate_methods->routines[3]))) (self))
#define keystate_ApplyKey(self,key,ppe,rockP,pobject) \
    ((* ((enum keystate_ApplyKeyValues (*)())((self)->header.keystate_methods->routines[4]))) (self,key,ppe,rockP,pobject))
#define keystate_DoProc(self,pe,rock,object) \
    ((* ((enum keystate_DoProcValues (*)())((self)->header.keystate_methods->routines[5]))) (self,pe,rock,object))
#define keystate_FreeChain(self) \
    ((* ((void (*)())((self)->header.keystate_methods->routines[6]))) (self))
#define keystate_SetOverride(self,function,functionData) \
    ((* ((void (*)())((self)->header.keystate_methods->routines[7]))) (self,function,functionData))
#define keystate_GetOverride(self,function,functionData) \
    ((* ((void (*)())((self)->header.keystate_methods->routines[8]))) (self,function,functionData))

#define keystate_NewFromObject(self) \
    ((* ((struct keystate * (*)())((self)->header.keystate_methods->info->procs->routines[0]))) (&keystate_classheader, (self)->header.keystate_methods->info->versionnumber))
#define keystate_New() \
    (*((struct keystate * (*)()) (keystate_CLASSPROCEDURES->routines[0])))(&keystate_classheader,keystate_VERSION)
#define keystate_Initialize(self) \
    (*((void (*)()) (keystate_CLASSPROCEDURES->routines[2])))(&keystate_classheader,self, keystate_VERSION)

#define keystate_Destroy(self) \
    ((* ((void (*)()) ((self)->header.keystate_methods->info->procs->routines[1]))) (&keystate_classheader, self))
#define keystate_Finalize(self) \
    (*((void (*)()) (keystate_CLASSPROCEDURES->routines[3])))(&keystate_classheader,self)

#define keystate_Create(object,keymap) \
    (*((struct keystate * (*)()) (keystate_CLASSPROCEDURES->routines[5])))(&keystate_classheader,object,keymap)
#define keystate_Allocate() \
    (*((struct keystate * (*)()) (keystate_CLASSPROCEDURES->routines[6])))(&keystate_classheader)
#define keystate_Deallocate(ks) \
    (*((void (*)()) (keystate_CLASSPROCEDURES->routines[7])))(&keystate_classheader,ks)


#endif /* !defined(keystate_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_keystate ) && !defined(class_StaticEntriesOnly)*/

