/usr/include/cdk/curdefs.h is in libcdk5-dev 5.0.20161210-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | #ifndef CDKINCLUDES
#ifndef CURDEF_H
#define CURDEF_H
#ifndef CDK_H
#define CDKINCLUDES
#include <cdk.h>
#undef CDKINCLUDES
#endif
/*
* $Id: curdefs.h,v 1.16 2009/02/16 00:33:50 tom Exp $
*
* Changes 1999-2004,2009 copyright Thomas E. Dickey
* Copyright 1999, Mike Glover
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* This product includes software developed by Mike Glover
* and contributors.
* 4. Neither the name of Mike Glover, nor the names of contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY MIKE GLOVER AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL MIKE GLOVER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* This header file adds some useful curses-style definitions.
*/
#undef CTRL
#define CTRL(c) ((c)&0x1f)
#undef CDK_REFRESH
#define CDK_REFRESH CTRL('L')
#undef CDK_PASTE
#define CDK_PASTE CTRL('V')
#undef CDK_COPY
#define CDK_COPY CTRL('Y')
#undef CDK_ERASE
#define CDK_ERASE CTRL('U')
#undef CDK_CUT
#define CDK_CUT CTRL('X')
#undef CDK_BEGOFLINE
#define CDK_BEGOFLINE CTRL('A')
#undef CDK_ENDOFLINE
#define CDK_ENDOFLINE CTRL('E')
#undef CDK_BACKCHAR
#define CDK_BACKCHAR CTRL('B')
#undef CDK_FORCHAR
#define CDK_FORCHAR CTRL('F')
#undef CDK_TRANSPOSE
#define CDK_TRANSPOSE CTRL('T')
#undef CDK_NEXT
#define CDK_NEXT CTRL('N')
#undef CDK_PREV
#define CDK_PREV CTRL('P')
#undef SPACE
#define SPACE ' '
#undef DELETE
#define DELETE '\177' /* Delete key */
#undef TAB
#define TAB '\t' /* Tab key. */
#undef KEY_ESC
#define KEY_ESC '\033' /* Escape Key. */
#undef KEY_RETURN
#define KEY_RETURN '\012' /* Return key */
#undef KEY_TAB
#define KEY_TAB '\t' /* Tab key */
#undef KEY_F1
#define KEY_F1 KEY_F(1)
#undef KEY_F2
#define KEY_F2 KEY_F(2)
#undef KEY_F3
#define KEY_F3 KEY_F(3)
#undef KEY_F4
#define KEY_F4 KEY_F(4)
#undef KEY_F5
#define KEY_F5 KEY_F(5)
#undef KEY_F6
#define KEY_F6 KEY_F(6)
#undef KEY_F7
#define KEY_F7 KEY_F(7)
#undef KEY_F8
#define KEY_F8 KEY_F(8)
#undef KEY_F9
#define KEY_F9 KEY_F(9)
#undef KEY_F10
#define KEY_F10 KEY_F(10)
#undef KEY_F11
#define KEY_F11 KEY_F(11)
#undef KEY_F12
#define KEY_F12 KEY_F(12)
#define KEY_ERROR ((chtype)ERR)
/* these definitions may work for antique versions of curses */
#if !defined(HAVE_GETBEGYX) && !defined(getbegyx)
#define getbegyx(win,y,x) (y = (win)?(win)->_begy:ERR, x = (win)?(win)->_begx:ERR)
#endif
#if !defined(HAVE_GETMAXYX) && !defined(getmaxyx)
#define getmaxyx(win,y,x) (y = (win)?(win)->_maxy:ERR, x = (win)?(win)->_maxx:ERR)
#endif
/* these definitions may be needed for bleeding-edge curses implementations */
#if !(defined(CDK_HAVE_GETBEGX) && defined(CDK_HAVE_GETBEGY))
#undef getbegx
#undef getbegy
#define getbegx(win) cdk_getbegx(win)
#define getbegy(win) cdk_getbegy(win)
extern int cdk_getbegx(WINDOW *);
extern int cdk_getbegy(WINDOW *);
#endif
#if !(defined(CDK_HAVE_GETMAXX) && defined(CDK_HAVE_GETMAXY))
#undef getmaxx
#undef getmaxy
#define getmaxx(win) cdk_getmaxx(win)
#define getmaxy(win) cdk_getmaxy(win)
extern int cdk_getmaxx(WINDOW *);
extern int cdk_getmaxy(WINDOW *);
#endif
/*
* Derived macros
*/
#define getendx(a) (getbegx(a) + getmaxx(a))
#define getendy(a) (getbegy(a) + getmaxy(a))
#endif /* CURDEF_H */
#endif /* CDKINCLUDES */
|