home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume34
/
vms_rtl_kbd
/
part02
/
kbd$routines.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-12-19
|
6KB
|
217 lines
#ifndef __KBD$ROUTINES_LOADED
#define __KBD$ROUTINES_LOADED 1
/*
------------------ Distribution and Copyright -----------------
--
-- This software is copyright by the CENA/DGAC/FRANCE
-- All rights reserved.
--
-- No part of the material protected by this copyright notice
-- may be reproduced or utilized for commercial use in any form
-- without written permission of the copyright owner.
--
-- It may be reproduced or utilized for R&D use in Non Profit
-- Organization
--
---------------------------------------------------------------
------------------ Disclaimer ---------------------------------
--
-- This software and its documentation are provided "AS IS" and
-- without any expressed or implied warranties whatsoever.
-- No warranties as to performance, merchantability, or fitness
-- for a particular purpose exist.
--
-- Because of the diversity of conditions and hardware under
-- which this software may be used, no warranty of fitness for
-- a particular purpose is offered. The user is advised to
-- test the software thoroughly before relying on it. The user
-- must assume the entire risk and liability of using this
-- software.
--
-- In no event shall any person or organization of people be
-- held responsible for any direct, indirect, consequential
-- or inconsequential damages or lost profits.
--
-------------------END-PROLOGUE--------------------------------
*/
/*****************************************************************************
*****************************************************************************
** **
** D E M O D E S R O U T I N E S K B D $ **
** **
******* Copyright (C) 1992 Centre d'Etudes de la Navigation Aerienne ********
*****************************************************************************/
/*
* Titre: HEADER KBD$ROUTINES
*
* Sujet: Fichier d'en-tete pour le module KBD$ROUTINES.
*
* Version: 1.0
*
* Description: Ce module contient la declaration de la fonction
* kbd$read_keystroke permettant d'attendre une action au
* clavier et renvoyant la sequence ANSI correspondant a la
* touche actionnee.
*
* Pour utiliser kbd$read_keystroke, il necessaire
* d'appeler au prealable la fonction kbd$open_keyboard et de
* terminer par kbd$close_keyboard.
* La routine kbd$open_keyboard permet, entre autres, de ne
* creer le tampon clavier que si l'on desire reellement
* utiliser kbd$read_keystroke.
*
* Lorsque le tampon est plein, l'utilisateur est prevenu
* par un beep sonore.
*
* La fonction kbd$flush_keyboard permet de vider le
* tampon clavier.
*
* Afin de pouvoir recuperer les codes emis par CTRL/C,
* CTRL/O, CTRL/Q, CTRL/S, CTRL/T, CTRL/X, CTRL/Y et F6, il est
* necessaire d'entrer la commande DCL "SET TERMINAL/PASTHRU
* /NOTTSYNC".
*
* Langage: C ANSI
*
* Fichier: KBD$ROUTINES.H
*
* Environnement: Machine cible: VAX
* Systeme d'exploitation: VAX/VMS Version 5.4-3
* Compilateur: VAX C Version 3.2-044
*
* Auteur: Martin VICENTE (DGAC/CENA/SID)
*
* E-mail: vicente@cenaath.cena.dgac.fr
*
* Mail: C.E.N.A.
* Div. Support Informatique & Developpement
* Orly Sud 205
* 94 542 ORLY AEROGARE CEDEX, FRANCE
*
* Creation: 23/05/92
*
* Modification: 26/05/92
*
*/
/*****************************************************************************
* TYPE DEFINITIONS *
*****************************************************************************/
typedef unsigned char kbd$t_escape_overflow_buffer[4];
typedef struct {
unsigned char ascii;
kbd$t_escape_overflow_buffer escOverBuffer;
} kbd$t_ansi_sequence;
/*****************************************************************************
*****************************************************************************
** KBD$ FUNCTION DECLARATION **
*****************************************************************************
*****************************************************************************/
/*
* kbd$close_keyboard
*
* Libere la memoire des structures de donnees associees a ce module.
*/
unsigned kbd$close_keyboard();
/*
* kbd$cvt_ansi_smg
*
* Convertit la sequence ANSI d'une touche en un code SMG.
*
* Liste des codes pouvant etre renvoyes (ils sont definis dans
* SYS$LIBRARY:SMGDEF.H):
*
* ascii (0 - 255) SMG$K_TRM_UP SMG$K_TRM_DOWN
* SMG$K_TRM_RIGHT SMG$K_TRM_LEFT SMG$K_TRM_ENTER
* SMG$K_TRM_PF1 SMG$K_TRM_PF2 SMG$K_TRM_PF3
* SMG$K_TRM_PF4 SMG$K_TRM_COMMA SMG$K_TRM_MINUS
* SMG$K_TRM_PERIOD SMG$K_TRM_KP0 SMG$K_TRM_KP1
* SMG$K_TRM_KP2 SMG$K_TRM_KP3 SMG$K_TRM_KP4
* SMG$K_TRM_KP5 SMG$K_TRM_KP6 SMG$K_TRM_KP7
* SMG$K_TRM_KP8 SMG$K_TRM_KP9 SMG$K_TRM_FIND
* SMG$K_TRM_INSERT_HERE SMG$K_TRM_REMOVE SMG$K_TRM_SELECT
* SMG$K_TRM_PREV_SCREEN SMG$K_TRM_NEXT_SCREEN SMG$K_TRM_F6
* SMG$K_TRM_F7 SMG$K_TRM_F8 SMG$K_TRM_F9
* SMG$K_TRM_F10 SMG$K_TRM_F11 SMG$K_TRM_F12
* SMG$K_TRM_F13 SMG$K_TRM_F14 SMG$K_TRM_HELP
* SMG$K_TRM_DO SMG$K_TRM_F17 SMG$K_TRM_F18
* SMG$K_TRM_F19 SMG$K_TRM_F20 SMG$K_TRM_UP
* SMG$K_TRM_DOWN SMG$K_TRM_RIGHT SMG$K_TRM_LEFT
* SMG$K_TRM_UNKNOWN
*/
unsigned kbd$cvt_ansi_smg();
/*
* kbd$flush_keyboard
*
* Vide le tampon clavier.
*/
unsigned kbd$flush_keyboard();
/*
* kbd$key_pressed
*
* Indique si au moins une touche est presente dans le tampon.
*/
unsigned kbd$key_pressed();
/*
* kbd$open_keyboard
*
* Creation et initialisation des structures de donnees associees au module.
*/
unsigned kbd$open_keyboard();
/*
* kbd$read_keystroke
*
* Extrait la touche suivante du tampon; si ce dernier est vide, se met en
* attente d'une action au clavier.
*/
unsigned kbd$read_keystroke();
/*****************************************************************************/
#endif /* __KBD$ROUTINES_LOADED */