annotate src/integration.h @ 6022:f9ec944e4474 v7.4.351

updated for version 7.4.351 Problem: sort() is not stable. Solution: When the items are identical, compare the pointers.
author Bram Moolenaar <bram@vim.org>
date Wed, 02 Jul 2014 19:06:18 +0200
parents 073ff46fe397
children 4aead6a9b7a9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 * Visual Workshop integration by Gordon Prieur
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 * Do ":help uganda" in Vim to read copying and usage conditions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 * Do ":help credits" in Vim to see a list of people who contributed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 THIS IS AN UNSTABLE INTERFACE! It is unsupported and will likely
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 change in future releases, possibly breaking compatibility!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 #ifndef _INTEGRATION_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 #define _INTEGRATION_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 #include <X11/Intrinsic.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 #include <Xm/Xm.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 #ifdef __cplusplus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 extern "C" {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 /* Enable NoHands test support functions. Define this only if you want to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 compile in support in the editor such that it can be run under
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 the WorkShop test suite. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 #ifndef NOHANDS_SUPPORT_FUNCTIONS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 #define NOHANDS_SUPPORT_FUNCTIONS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 /* This header file has three parts.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 * 1. Functions you need to implement; these are called by the integration
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 * library
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 * 2. Functions you need to call when certain events happen in the editor;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 * these are implemented by the integration library
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 * 3. Utility functions provided by the integration library; these make
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 * task 1 a bit easier.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 * The following functions need to be implemented by the editor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 * integration code (and will be editor-specific). Please see the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 * sample workshop.c file for comments explaining what each functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 * needs to do, what the arguments mean, etc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 * This string is recognized by eserve and should be all lower case.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 * This is how the editor detects that it is talking to NEdit instead
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 * of Vim, for example, when the connection is initiated from the editor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 * Examples: "nedit", "gvim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 char *workshop_get_editor_name();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 * Version number of the editor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 * This number is communicated along with the protocol
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 * version to the application.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 * Examples: "5.0.2", "19.3"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 char *workshop_get_editor_version();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 /* Goto a given line in a given file */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 void workshop_goto_line(char *filename, int lineno);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 /* Set mark in a given file */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 void workshop_set_mark(char *filename, int lineno, int markId, int type);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 /* Change mark type (for example from current-pc to pc-and-breakpoint) */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 void workshop_change_mark_type(char *filename, int markId, int type);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 * Goto the given mark in a file (e.g. show it).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 * If message is not null, display it in the footer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 void workshop_goto_mark(char *filename, int markId, char *message);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 /* Delete mark */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 void workshop_delete_mark(char *filename, int markId);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 /* Begin/end pair of messages indicating that a series of _set_mark and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 * _delete_mark messages will be sent. This can/should be used to suppress gui
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 * redraws between the begin and end messages. For example, if you switch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 * to a headerfile that has a class breakpoint set, there may be hundreds
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 * of marks that need to be added. You don't want to refresh the gui for each
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 * added sign, you want to wait until the final end message.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 void workshop_mark_batch_begin();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 void workshop_mark_batch_end();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 /* Load a given file into the WorkShop buffer. "frameid" is a token string
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 * that identifies which frame the file would like to be loaded into. This
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 * will usually be null, in which case you should use the default frame.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 * However, if frameid is not null, you need to find a frame that has this
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 * frameid, and replace the file in that frame. Finally, if the frameid is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 * one you haven't seen before, you should create a new frame for this file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 * Note that "frameid" is a string value, not just an opaque pointer, so
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 * you should use strcmp rather than == when testing for equality.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 void workshop_load_file(char *filename, int line, char *frameid);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 /* Reload the WorkShop buffer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 void workshop_reload_file(char *filename, int line);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 /* Show the given file */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 void workshop_show_file(char *filename);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 /* Front the given file */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 void workshop_front_file(char *filename);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 /* Save the given file */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 void workshop_save_file(char *filename);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 /* Save all WorkShop edited files. You can ask user about modified files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 * and skip saving any files the user doesn't want to save.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 * This function is typically called when the user issues a build, a fix,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 * etc. (and also if you select "Save All" from the File menu :-)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 void workshop_save_files();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 /* Show a message in all footers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 Severity currently is not defined. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 void workshop_footer_message(char *message, int severity);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 /* Minimize all windows */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 void workshop_minimize();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 /* Maximize all windows */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 void workshop_maximize();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 * Create a new mark type, assign it a given index, a given textbackground
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 * color, and a given left-margin sign (where sign is a filename to an
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 * .xpm file)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 void workshop_add_mark_type(int idx, char *colorspec, char *sign);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 /* Get mark line number */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 int workshop_get_mark_lineno(char *filename, int markId);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 /* Exit editor; save confirmation dialogs are okay */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 void workshop_quit();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 /* Set an editor option.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 * For example, name="syntax",value="on" would enable syntax highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 * The currently defined options are:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 * lineno {on,off} show line numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 * syntax {on,off} highlight syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 * parentheses {on,off} show matching parentheses
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 * The following options are interpreted by the library for you (so you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 * will never see the message. However, the implementation requires you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 * to provide certain callbacks, like restore hotkeys or save all files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 * These are documented separately).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 * workshopkeys {on,off} set workshop hotkeys
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 * savefiles {on,off} save all files before issuing a build
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 * balloon {on,off} enable/disable balloon evaluate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 * IGNORE an option if you do not recognize it.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 void workshop_set_option(char *name, char *value);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 * (See workshop_add_frame first.) This function notifies the editor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 * that the frame for the given window (indicated by "frame", which
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 * was supplied by the editor in workshop_add_frame) has been created.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 * This can happen much later than the workshop_add_frame message, since
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 * often a window is created on editor startup, while the frame description
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 * is passed over from eserve much later, when the connection is complete.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 * This gives the editor a chance to kick its GUI to show the frame
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 * properly; typically you'll unmanage and remanage the parent widget to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 * force a geometry recalculation.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 void workshop_reconfigure_frame(void *frame);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 /* Are there any moved marks? If so, call workshop_move_mark on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 * each of them now. This is how eserve can find out if for example
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 * breakpoints have moved when a program has been recompiled and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 * reloaded into dbx.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 void workshop_moved_marks(char *filename);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 /* A button in the toolbar has been pushed. "frame" is provided
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 * which should let you determine which toolbar had a button pushed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 * (you supplied this clientData when you created a toolbar). From
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 * this you should be able to figure out which file the operation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 * applies to, and for that window the cursor line and column,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 * selection begin line and column, selection end line and column,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 * selection text and selection text length. The column numbers are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 * currently unused but implement it anyway in case we decide to use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 * them in the future.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 * Note that frame can be NULL. In this case, you should pick
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 * a default window to translate coordinates for (ideally, the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 * last window the user has operated on.) This will be the case when
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 * the user clicks on a Custom Button programmed to take the current
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 * line number as an argument. Here it's ambiguous which buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 * to use, so you need to pick one.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 * (Interface consideration: Perhaps we instead should add smarts
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 * into the library such that we remember which frame pointer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 * we last noticed (e.g. last call to get_positions, or perhaps
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 * last add_frame) and then pass that instead? For example, we could
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 * have all workshop operations return the clientData when passed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 * the filename (or add a filename-to-clientData converter?) and then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 * remember the last filename/clientData used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 int workshop_get_positions(void *frame,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 char **filename,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 int *curLine,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 int *curCol,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 int *selStartLine,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 int *selStartCol,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 int *selEndLine,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 int *selEndCol,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 int *selLength,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 char **selection);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 /* The following function should return the height of a character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 * in the text display. This is used to pick out a suitable size
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 * for the signs to match the text (currently available in three
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 * sizes). If you just return 0, WorkShop will use the default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 * sign size. (Use XmStringExtent on character "A" to get the height.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 int workshop_get_font_height(void);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 /* The following function requests that you register the given
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 * hotkey as a keyboard accelerator for all frames. Whenever the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 * hotkey is pressed, you should invoke workshop_hotkey_pressed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 * and pass the current frame pointer as an argument as well as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 * the clientData pointer passed in to this function.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 * The remove function unregisters the hotkey.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 void workshop_register_hotkey(Modifiers modifiers, KeySym keysym,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 void *clientData);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 void workshop_unregister_hotkey(Modifiers modifiers, KeySym keysym,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 void *clientData);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 * The following functions notify eserve of important editor events,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 * such as files being modified, files being saved, etc. You must
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 * sprinkle your editor code with calls to these. For example, whenever
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 * a file is modified (well, when its read-only status changes to modified),
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 * call workshop_file_modified().
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 /* Connect with eserve. Add this call after you editor initialization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 * is done, right before entering the event loop or blocking on input.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 * This will set up a socket connection with eserve.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 void workshop_connect(XtAppContext context);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 /* A file has been opened. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 void workshop_file_opened(char *filename, int readOnly);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 /* A file has been saved. Despite its name, eserve also uses this
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 * message to mean a file has been reverted or unmodified.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 void workshop_file_saved(char *filename);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285
2154
7c8c7c95a865 First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
286 #if 0
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 /* A file has been closed */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 void workshop_file_closed(char *filename);
2154
7c8c7c95a865 First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
289 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 /* Like workshop_file_closed, but also inform eserve what line the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 cursor was on when you left the file. That way eserve can put you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 back where you left off when you return to this file. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 void workshop_file_closed_lineno(char *filename, int line);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295
2154
7c8c7c95a865 First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
296 #if 0
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 /* A file has been modified */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 void workshop_file_modified(char *filename);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301 * A mark has been moved. Only call this as a response to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 * a workshop_moved_marks request call.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304 void workshop_move_mark(char *filename, int markId, int newLineno);
2154
7c8c7c95a865 First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
305 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 /* Tell the integration library about a new frame being added.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308 * Supply a form for the toolbar, a label for the footer, and an
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 * XmPulldown menu for the WorkShop menu to attach to. Top and bottom
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310 * are the widgets above and below the toolbar form widget, if
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 * any. Call this function when you create a new window. It returns a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 * void *, a handle which you should keep and return when you delete
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 * the window with workshop_delete_toolbar. The "footer" argument
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 * points to a Label widget that is going to be used as a status
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 * message area, and "menu" (if any) points to an Menu widget that
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 * should contain a WorkShop menu. Clientdata is a pointer which is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317 * only used by the editor. It will typically be a pointer to the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 * window object that the toolbar is placed in. If you have multiple
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 * windows, you need to use this pointer to figure out which window
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 * (and thus corresponding buffer) the user has clicked on to respond
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 * to the workshop_get_positions message.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 * Each frame's clientData ("frame") should be unique.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 void *workshop_add_frame(void *frame, Widget form,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325 Widget top, Widget bottom, Widget footer,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 Widget menu);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 /* Delete a window/frame. Call this when an editor window is being deleted. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329 void workshop_delete_frame(void *handle);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 /* Add a balloon evaluate text area. "frame" is used the same way
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332 * as in workshop_add_frame. This call is not part of workshop_add_frame because
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 * a frame can have multiple tooltip areas (typically, an editor frame that
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334 * is split showing multiple buffers will have a separate tooltip area for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 * each text widget. Each such area is called a "window" (consistent with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 * XEmacs terminology). Separate these by the window argument if necessary.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 * You will need to implement workshop_get_balloon_text such that it uses
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 * these two arguments to derive the file, line etc. for the tip.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 * Call the remove function if you delete this area such that the integration
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 * library can update itself. You must call workshop_add_frame before you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 * call add_balloon_eval_area, and you must pass the same frame pointer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 void workshop_add_balloon_eval_area(void *frame, void *window, Widget widget);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344 void workshop_remove_balloon_eval_area(void *frame, void *window, Widget widget);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 /* For a given mouse position inside the balloon area (passed as x,y),
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348 * return the balloon text to be evaluated. There are two scenarios:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 * If the position is inside the selection, return the selection
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350 * string. Else, return the full line (or possibly the full line up
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351 * to the last semicolon (that's TBD), along with an index pointing to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 * where which character the mouse is over.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353 * If we have the selection-scenario, set mouseIndex to -1 to indicate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354 * that no autoexpansion should occur but that the selection should
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 * be evaluated as is.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 * XXX Does dbx need more information here, like the filename and line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358 * number in order to determine the correct language and scope to be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359 * used during evaluation?? Or should it just work like the p= button
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 * (where the current scope and language is used, even if you are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361 * pointing at a different file with a different scope) ?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 int workshop_get_balloon_text(Position x, Position y,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 void *frame,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 void *window,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 char **filename,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367 int *line,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 char **text,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 int *mouseIndex);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372 /* Window size and location
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 * WorkShop will attempt to restore the size and location of a single
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374 * editor frame. For vi, this window is designated as the "reusable" one.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 * You can implement your own scheme for determining which window you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376 * want to associate with WorkShop. Whenever the size and location of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377 * this window is changed, call the following function to notify eserve.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378 * Like workshop_invoked, this can be called before the workshop_connect()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 * call.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381 void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 Boolean workshop_get_width_height(int *, int *);
2154
7c8c7c95a865 First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
383 #if 0
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384 Boolean workshop_get_rows_cols(int *, int *);
2154
7c8c7c95a865 First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
385 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387 /* This function should be invoked when you press a hotkey
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 * set up by workshop_register_hotkey. Pass the clientData
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389 * to it that was given to you with workshop_register_hotkey.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 void workshop_hotkey_pressed(void *frame, void *clientData);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398 * Utility functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399 * These provide convenience functions to simplify implementing some
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400 * of the above functions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403
2154
7c8c7c95a865 First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
404 #if 0
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 /* Were we invoked by WorkShop? This function can be used early during startup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 * if you want to do things differently if the editor is started standalone
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407 * or in WorkShop mode. For example, in standalone mode you may not want to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 * add a footer/message area or a sign gutter.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410 int workshop_invoked(void);
2154
7c8c7c95a865 First step in the Vim 7.3 branch. Changed version numbers.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
411 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
413
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
414 /* Minimize (iconify) the given shell */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
415 void workshop_minimize_shell(Widget shell);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417 /* Maximize (deiconify) the given shell */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418 void workshop_maximize_shell(Widget shell);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
419
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420 /* Called by frame.cc -- editor shouldn't call this directly.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421 * Perhaps we need an integrationP.h file ? */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 void workshop_perform_verb(char *verb, void *clientData);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 void workshop_send_message(char *buf);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 #ifdef NOHANDS_SUPPORT_FUNCTIONS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 /* The following functions are needed to run the WorkShop testsuite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 * with this editor. You don't need to implement these unless you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429 * intend for your editor to be run by Workshop's testsuite.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 * getcursorrow should return the number of lines from the top of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 * the window the cursor is; similarly for getcursorcol.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 char *workshop_test_getcurrentfile();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 int workshop_test_getcursorrow();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 int workshop_test_getcursorcol();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 char *workshop_test_getcursorrowtext();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 char *workshop_test_getselectedtext();
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 * Struct used to set/unset the sensitivity of verbs.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 typedef struct {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 char *verb;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445 Boolean sense;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446 } VerbSense;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 #ifdef __cplusplus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 #endif /* _INTEGRATION_H */