#ifndef keytab_h
#define keytab_h
/*
* Copyright (c) 2000, 2001, 2002, 2003, 2004 by Martin C. Shepherd.
*
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* to whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale, use
* or other dealings in this Software without prior written authorization
* of the copyright holder.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "libtecla.h"
/*-----------------------------------------------------------------------*
* This module defines a binary-search symbol table of key-bindings. *
*-----------------------------------------------------------------------*/
/*
* All key-binding functions are defined as follows.
*
* Input:
* gl GetLine * The resource object of this library.
* count int A positive repeat count specified by the user,
* or 1. Action functions should ignore this if
* repeating the action multiple times isn't
* appropriate.
* data void * A pointer to action-specific data,
* cast to (void *).
* Output:
* return int 0 - OK.
* 1 - Error.
*/
/*
* Allow the association of arbitrary callback data with each action
* function.
*/
typedef struct {
/* fn() whenever it is called. */
} KtAction;
/*
* Enumerate the possible sources of key-bindings in order of decreasing
* priority.
*/
typedef enum {
/* The following entry must always be last */
} KtBinder;
/*
* Define an entry of a key-binding binary symbol table.
*/
typedef struct {
/* of actions[] that has been assigned an */
/* action function, or -1 if none have. */
} KeySym;
/*
* Provide an opaque type alias to the symbol table container.
*/
/*
* Create a new symbol table.
*/
KeyTab *_new_KeyTab(void);
/*
* Delete the symbol table.
*/
/*
* Lookup the function that implements a given action.
*/
typedef enum {
} KtKeyMatch;
/*
* Remove all key bindings that came from a specified source.
*/
/*
* When installing an array of keybings each binding is defined by
* an element of the following type:
*/
typedef struct {
} KtKeyBinding;
/*
* Merge an array of bindings with existing bindings.
*/
unsigned n);
/*
* Get information about the last error in this module.
*/
#endif