File: enter.h

package info (click to toggle)
urlview 1e-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 276 kB
  • sloc: ansic: 876; cpp: 295; sh: 119; makefile: 82
file content (34 lines) | stat: -rw-r--r-- 612 bytes parent folder | download
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
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (C) 1997 Michael R. Elkins <me@cs.hmc.edu>


#include <ncurses.h>


enum {
	OP_EDITOR_CHAR,
	OP_EDITOR_DONE,
	OP_EDITOR_RESIZE,
	OP_EDITOR_IDK,

	OP_EDITOR_BACKSPACE,
	OP_EDITOR_DELETE_CHAR,
	OP_EDITOR_KILL_LINE,
	OP_EDITOR_KILL_EOL,
	OP_EDITOR_KILL_WORD,

	OP_EDITOR_BOL,
	OP_EDITOR_EOL,
	OP_EDITOR_BACKWARD_CHAR,
	OP_EDITOR_FORWARD_CHAR,
};

struct enter_string {
	char * data;
	size_t len;
};
extern struct enter_string enter_string(const char * init, size_t initlen);


extern void km_dokey_load_termios(void);
extern int km_dokey(wint_t * LastKey);