X11workbench Toolkit  1.0
X11workbench.h
1 // __ __ _ _ _ _ _ _ //
3 // \ \/ // |/ |__ __ ___ _ __ | | __| |__ ___ _ __ ___ | |__ | |__ //
4 // \ / | || |\ \ /\ / // _ \ | '__|| |/ /| '_ \ / _ \| '_ \ / __|| '_ \ | '_ \ //
5 // / \ | || | \ V V /| (_) || | | < | |_) || __/| | | || (__ | | | | _ | | | | //
6 // /_/\_\|_||_| \_/\_/ \___/ |_| |_|\_\|_.__/ \___||_| |_| \___||_| |_|(_)|_| |_| //
7 // //
8 // 'main' source for X11workbench //
9 // //
11 
12 /*****************************************************************************
13 
14  X11workbench - X11 programmer's 'work bench' application and toolkit
15  Copyright (c) 2010-2019 by Bob Frazier (aka 'Big Bad Bombastic Bob')
16  all rights reserved
17 
18  DISCLAIMER: The X11workbench application and toolkit software are supplied
19  'as-is', with no warranties, either implied or explicit.
20 
21  BSD-like license:
22 
23  There is no restriction as to what you can do with this software, so long
24  as you include the above copyright notice and DISCLAIMER for any distributed
25  work that is linked with, equivalent to, or derived from any portion of this
26  software, along with this paragraph that explains the terms of the license if
27  the source is also being made available. "Linked with" includes the use of a
28  portion of any of the source and/or header files, or their compiled binary
29  output, as a part of your application or library. A "derived work"
30  describes a work that uses a significant portion of the source files or the
31  algorithms that are included with this software.
32 
33  EXCLUSIONS
34 
35  Specifically excluded from this requirement are files that were generated by
36  the software, or anything that is included with the software that is part of
37  another package (such as files that were created or added during the
38  'configure' process).
39 
40  DISTRIBUTION
41 
42  The license also covers the use of part or all of any of the X11 workbench
43  toolkit source or header files in your distributed application, in source or
44  binary form. If you do not ship the source, the above copyright statement
45  and DISCLAIMER is still required to be placed in a reasonably prominent
46  place, such as documentation, splash screens, and/or 'about the application'
47  dialog boxes.
48 
49  Use and distribution are in accordance with GPL, LGPL, and/or the above
50  BSD-like license. See COPYING and README.md files for more information.
51 
52  Additionally, this software, in source or binary form, and in whole or in
53  part, may be used by explicit permission from the author, without the need
54  of a license.
55 
56  Additional information at http://sourceforge.net/projects/X11workbench
57  and http://bombasticbob.github.io/X11workbench/
58 
59 ******************************************************************************/
60 
61 
62 // common includes (this also includes 'X' headers)
63 #include "window_helper.h"
64 
65 
66 #define APP_NAME "X11workbench" /* for dialog boxes and similar things */
67 
68 
69 typedef enum __WBFILE_TYPE__
70 {
71  WBFILE_TYPE_NONE = 0,
72  WBFILE_TYPE_TEXT = 1,
73  WBFILE_TYPE_CPROG = 2,
74  WBFILE_TYPE_CPP = 3,
75  WBFILE_TYPE_CHEADER = 4,
76  WBFILE_TYPE_MAKEFILE = 5,
77  WBFILE_TYPE_AUTOCONF = 6,
78  WBFILE_TYPE_PROJECT = 7,
79  WBFILE_TYPE_RESOURCE = 8,
80  WBFILE_TYPE_PIXMAP = 9,
81  WBFILE_TYPE_DIALOG = 10,
82  WBFILE_TYPE_MENU = 11,
83  WBFILE_TYPE_TOOLBAR = 12,
84  WBFILE_TYPE_SHELL = 13,
85  WBFILE_TYPE_PYTHON = 14,
86  WBFILE_TYPE_PERL = 15,
87  WBFILE_TYPE_ASM = 16,
88  WBFILE_TYPE_HTML = 17,
89  WBFILE_TYPE_XML = 18,
90  WBFILE_TYPE_JAVA = 19,
91  WBFILE_TYPE_JS = 20,
92  WBFILE_TYPE_PHP = 21,
93  WBFILE_TYPE_ARDUINO = 22, // PDE or INO file for Arduino script
94 
95  WBFILE_TYPE_LAST = 22 // update this if I add more types
96 } WBFILE_TYPE;
97 
98 
100 // //
101 // _____ _ _ _ _ ____ ___ //
102 // | ____|__ __| |_ ___ _ __ _ __ __ _ | | ___ __ _ _ __ __| | / \ | _ \|_ _| ___ //
103 // | _| \ \/ /| __|/ _ \| '__|| '_ \ / _` || |/ __| / _` || '_ \ / _` | / _ \ | |_) || | / __| //
104 // | |___ > < | |_| __/| | | | | || (_| || |\__ \ | (_| || | | || (_| | / ___ \ | __/ | | \__ \ //
105 // |_____|/_/\_\ \__|\___||_| |_| |_| \__,_||_||___/ \__,_||_| |_| \__,_| /_/ \_\|_| |___||___/ //
106 // //
107 // //
109 
110 // external types (prototype definitions for functions)
111 typedef struct tagWB_FRAME_WINDOW WBFrameWindow; // see frame_window.h [TODO: remove the need for this line of code]
112 
113 
114 // global variables
115 
116 // TODO: any globals? get/set methods are better, like GetFrameWindowID() below
117 
118 
119 Window GetFrameWindowID(); // get the frame window's window ID (for dialog boxen and such)
120 
121 // general purpose utilities to be called by external things
122 
123 int DoFileOpen(WBFrameWindow *pMainFrame, const char *szFileName);
124 WBFILE_TYPE GetFileType(const char *szFileName);
125 const char *GetFileTypeDesc(WBFILE_TYPE nFileType);
126 int GetDefaultTabSetting(WBFILE_TYPE nFileType);
127 int GetDefaultLineEnding(WBFILE_TYPE nFileType);
128 const char *GetFileTypeHighlightInfo(WBFILE_TYPE nFileType);
129 
130 
131 
132 
133 
'window helper' main header file for the X11workbench Toolkit API
main controlling structure for frame windows
Definition: frame_window.h:274