Debian Codegraph @

gtk/shell_main.h

raw
1 /*****************************************************************************
2 * Free42 -- an HP-42S calculator simulator
3 * Copyright (C) 2004-2026 Thomas Okken
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, version 2,
7 * as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see http://www.gnu.org/licenses/.
16 *****************************************************************************/
17
18 #ifndef SHELL_MAIN_H
19 #define SHELL_MAIN_H 1
20
21 #include <gtk/gtk.h>
22
23 #define FILENAMELEN 256
24
25 extern GtkWidget *calc_widget;
26 extern GtkWidget *mainwindow;
27 extern bool allow_paint;
28
29 #define SHELL_VERSION 11
30
31 struct state_type {
32 int extras;
33 int printerToTxtFile;
34 int printerToGifFile;
35 char printerTxtFileName[FILENAMELEN];
36 char printerGifFileName[FILENAMELEN];
37 int printerGifMaxLength;
38 char mainWindowKnown, printWindowKnown, printWindowMapped;
39 int mainWindowX, mainWindowY;
40 int printWindowX, printWindowY, printWindowHeight;
41 char skinName[FILENAMELEN];
42 int singleInstance;
43 char coreName[FILENAMELEN];
44 bool matrix_singularmatrix;
45 bool matrix_outofrange;
46 bool auto_repeat;
47 bool old_repaint;
48 bool allow_big_stack;
49 bool localized_copy_paste;
50 int mainWindowWidth, mainWindowHeight;
51 };
52
53 extern state_type state;
54
55 extern char free42dirname[FILENAMELEN];
56
57
58 #define KEYMAP_MAX_MACRO_LENGTH 31
59 struct keymap_entry {
60 bool ctrl;
61 bool alt;
62 bool shift;
63 bool cshift;
64 guint keyval;
65 unsigned char macro[KEYMAP_MAX_MACRO_LENGTH + 1];
66 };
67
68 keymap_entry *parse_keymap_entry(char *line, int lineno);
69
70 extern int ckey;
71 extern int skey;
72
73 extern int ann_updown;
74 extern int ann_shift;
75 extern int ann_print;
76 extern int ann_run;
77 extern int ann_battery;
78 extern int ann_g;
79 extern int ann_rad;
80
81 extern int menu_bar_height;
82
83 void get_keymap(keymap_entry **map, int *length);
84
85
86 #endif