# -*-Perl-*-
# generic converters with associative lookup
# each converter is defined by the pair <Type, Converter>
# if Converter starts with "%" either fprintf or sscanf is used.
# Converter is supposed to take only on argument and returns the
# requested type.

%stringTo = (
	     "Widget","name2Widget",
	     "TextSink","name2Sink",
	     "TextSource","name2Source",
	     "XtTranslations","XtParseTranslationTable",
	     "XtAccelerators", "XtParseAcceleratorTable",
	     "XawTextPosition", "%ld",
	     "Dimension", "%hu",
	     "Position", "%hd",
	     "int", "%d",
	     "float", "%f",
	     "double", "%lf",
	     "char *", "%s",
	     );

%toString = (
	     "Widget","XtName",
	     "XawTextPosition", "%ld",
	     "Dimension", "%hu",
	     "Position", "%hd",
	     "char *", "%s",
	     "int", "%d",
	     );

#
# if-then-else cascaded converters; 
# each conversion definiton of a type consists of a pair <string, TookitType>
# order in the array determines the ordering of the cascade
#
@XtGrabKind = (
	       "none", "XtGrabNone",
	       "nonexclusive","XtGrabNonexclusive",
	       "exclusive","XtGrabExclusive",
	       );    

@GrabReturns = (
		"success", "GrabSuccess",
		"alreadyGrabbed","AlreadyGrabbed",
		"notViewable","GrabNotViewable", 
		"frozen","GrabFrozen",
		);

@SyncAsync = (
              "sync", "GrabModeSync",
	      "async", "GrabModeAsync",
	      );

@Boolean = (
	 "true",1,
	 "false",0,
	       );

@NULL = (
	 "NULL",NULL,
	        );

@Boolean = (
	 "true",1,
	 "false",0,
	         );

@TranslationModifier = (       
	 "override", 1,
	 "augment", 2,
         "replace", 3,
		);

@XawTextScanDirection = (
	"left", XawsdLeft,
	"right", XawsdRight,
	"Left", XawsdLeft,
	"Right", XawsdRight,
		);

@XawTextScanType = (
	 "position", XawstPositions,
	 "whiteSpace", XawstWhiteSpace,
	 "EOL", XawstEOL,
	 "paragraph", XawstParagraph,
	 "all", XawstAll
		  );

@XtCallbackProc = (
	 "exec", "(XtCallbackProc)execCallbackProc",
	 "none", "XtCallbackNone",
	 "exclusive", "XtCallbackExclusive",
	    "nonexclusive", "XtCallbackNonexclusive",
	    "popdown", "XtCallbackPopdown",
	    "position", "(XtCallbackProc)positionCallbackProc",
	    "positionCursor", "(XtCallbackProc)positionCursorCallbackProc",
                );

@XawTextSelectType = (
	    "selectAll", XawselectAll,
	    "selectChar", XawselectChar,
	    "selectLine", XawselectLine,
	    "selectNull", XawselectNull,
	    "selectParagraph", XawselectParagraph,
	    "selectPosition", XawselectPosition,
	    "selectWord",XawselectWord,
               );

@Atom = (
	 "0", XA_CUT_BUFFER0,
	 "1", XA_CUT_BUFFER1,
	 "2", XA_CUT_BUFFER2,
	 "3", XA_CUT_BUFFER3,
	 "4", XA_CUT_BUFFER4,
	 "5", XA_CUT_BUFFER5,
	 "6", XA_CUT_BUFFER6,
	 );

@ReplaceVal = (
	    "editDone", XawEditDone,
	    "positionError", XawPositionError,
	    "editError", XawEditError,
	       );

@XcToggleState = (
	    "on", XcOn,
	    "off", XcOff,
		  );



%Structure = (
	    "XawTextBlock" , "(int) firstPos, (int) length, (char *) ptr, *(Atom) format",
	    "XawListReturnStruct", "(char *) string, (int) list_index",
	    "XedwListReturnStruct", "(char *) string, (int) xedwList_index",
)


