💾 Archived View for gemini.rmf-dev.com › repo › Vaati › mz › files › 07c6c4e3e6fb95b74c27b25c2068412… captured on 2023-03-20 at 18:35:12. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
0 /*
1 * Copyright (c) 2023 RMF <rawmonk@firemail.cc>
2 *
3 * Permission to use, copy, modify, and distribute this software for any
4 * purpose with or without fee is hereby granted, provided that the above
5 * copyright notice and this permission notice appear in all copies.
6 *
7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 */
15
16 #define TABS (client.view->next || client.view->prev)
17 #define HEIGHT (TABS ? (client.height - 4) : (client.height - 3))
18
19 enum {
20 MODE_NORMAL,
21 MODE_COMMAND,
22 MODE_SEARCH,
23 MODE_VISUAL
24 };
25
26 struct client {
27 struct view *view;
28 struct entry *copy;
29 char copy_path[1024];
30 size_t copy_length;
31 size_t width;
32 size_t height;
33 int counter;
34 int mode;
35 int error;
36 int g;
37 int y;
38 int trash;
39 int cut;
40 char field[1024];
41 char info[1024];
42 char search[1024];
43 };
44 extern struct client client;
45
46 int client_init();
47 int client_clean();
48 int client_update();
49 int client_input();
50