-
Notifications
You must be signed in to change notification settings - Fork 3
/
ui.h
76 lines (56 loc) · 1.79 KB
/
ui.h
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
/*
* Copyright (c) 2021 Justin Meiners
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UI_H
#define UI_H
#include <X11/Xlib.h>
#include "config.h"
#include <assert.h>
#include <Xm/Xm.h>
#include <Xm/RowColumn.h>
#include <Xm/Label.h>
#include <Xm/DialogS.h>
#include <Xm/MessageB.h>
#include <Xm/PushB.h>
#include <Xm/Frame.h>
#include <Xm/Command.h>
#include <Xm/Paned.h>
#include <Xm/TextF.h>
#include <Xm/Text.h>
#include <Xm/Separator.h>
#include "paint.h"
#define UI_ARGS_MAX 32
#define UI_NAME_MAX 1024
// https://www.ibiblio.org/pub/X11/contrib/faqs/Motif-FAQ.html
extern PaintContext g_paint_ctx;
extern Widget g_main_w;
extern XtAppContext g_app;
extern int g_ready;
void ui_setup_file_menu(Widget menubar);
void ui_setup_edit_menu(Widget menubar);
void ui_setup_image_menu(Widget menubar);
void ui_setup_view_menu(Widget menubar);
Widget ui_setup_tool_area(Widget parent);
Widget ui_setup_command_area(Widget parent);
void ui_refresh_drawing(int clear);
void ui_drawing_cleanup(void);
Widget ui_start_editing_text(void);
void ui_disable_editing_text(void);
void ui_set_color(Widget window, uint32_t color, int fg);
Widget ui_setup_scroll_area(Widget parent);
void ui_refresh_tool(void);
void ui_refresh_title(void);
XtAppContext ui_app();
#endif