xref: /vim-8.2.3635/src/proto.h (revision ed37d9b3)
1 /* vi:set ts=8 sts=4 sw=4 noet:
2  *
3  * VIM - Vi IMproved	by Bram Moolenaar
4  *
5  * Do ":help uganda"  in Vim to read copying and usage conditions.
6  * Do ":help credits" in Vim to see a list of people who contributed.
7  */
8 
9 /*
10  * proto.h: include the (automatically generated) function prototypes
11  */
12 
13 /*
14  * Don't include these while generating prototypes.  Prevents problems when
15  * files are missing.
16  */
17 #if !defined(PROTO) && !defined(NOPROTO)
18 
19 /*
20  * Machine-dependent routines.
21  */
22 // avoid errors in function prototypes
23 # if !defined(FEAT_X11) && !defined(FEAT_GUI_GTK)
24 #  define Display int
25 #  define Widget int
26 # endif
27 # ifndef FEAT_GUI_GTK
28 #  define GdkEvent int
29 #  define GdkEventKey int
30 # endif
31 # ifndef FEAT_X11
32 #  define XImage int
33 # endif
34 
35 # ifdef AMIGA
36 #  include "os_amiga.pro"
37 # endif
38 # if defined(UNIX) || defined(VMS)
39 #  include "os_unix.pro"
40 # endif
41 # ifdef MSWIN
42 #  include "os_win32.pro"
43 #  include "os_mswin.pro"
44 #  include "winclip.pro"
45 #  if (defined(__GNUC__) && !defined(__MINGW32__))
46 extern int _stricoll(char *a, char *b);
47 #  endif
48 # endif
49 # ifdef VMS
50 #  include "os_vms.pro"
51 # endif
52 # ifdef __BEOS__
53 #  include "os_beos.pro"
54 # endif
55 # ifdef __QNX__
56 #  include "os_qnx.pro"
57 # endif
58 
59 # ifdef FEAT_CRYPT
60 #  include "blowfish.pro"
61 #  include "crypt.pro"
62 #  include "crypt_zip.pro"
63 # endif
64 # include "arglist.pro"
65 # include "autocmd.pro"
66 # include "buffer.pro"
67 # include "bufwrite.pro"
68 # include "change.pro"
69 # include "charset.pro"
70 # include "cindent.pro"
71 # include "clientserver.pro"
72 # include "clipboard.pro"
73 # include "cmdexpand.pro"
74 # include "cmdhist.pro"
75 # include "if_cscope.pro"
76 # include "debugger.pro"
77 # include "dict.pro"
78 # include "diff.pro"
79 # include "digraph.pro"
80 # include "drawline.pro"
81 # include "drawscreen.pro"
82 # include "edit.pro"
83 # include "eval.pro"
84 # include "evalbuffer.pro"
85 # include "evalfunc.pro"
86 # include "evalvars.pro"
87 # include "evalwindow.pro"
88 # include "ex_cmds.pro"
89 # include "ex_cmds2.pro"
90 # include "ex_docmd.pro"
91 # include "ex_eval.pro"
92 # include "ex_getln.pro"
93 # include "fileio.pro"
94 # include "filepath.pro"
95 # include "findfile.pro"
96 # include "fold.pro"
97 # include "getchar.pro"
98 # include "hardcopy.pro"
99 # include "hashtab.pro"
100 # include "highlight.pro"
101 # include "indent.pro"
102 # include "insexpand.pro"
103 # include "json.pro"
104 # include "list.pro"
105 # include "blob.pro"
106 # include "main.pro"
107 # include "map.pro"
108 # include "mark.pro"
109 # include "memfile.pro"
110 # include "memline.pro"
111 # ifdef FEAT_MENU
112 #  include "menu.pro"
113 # endif
114 # ifdef FEAT_ARABIC
115 #  include "arabic.pro"
116 # endif
117 # ifdef FEAT_VIMINFO
118 #  include "viminfo.pro"
119 # endif
120 
121 // These prototypes cannot be produced automatically.
122 int smsg(const char *, ...)
123 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
124     __attribute__((format(printf, 1, 2)))
125 # endif
126     ;
127 
128 int smsg_attr(int, const char *, ...)
129 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
130     __attribute__((format(printf, 2, 3)))
131 # endif
132     ;
133 
134 int smsg_attr_keep(int, const char *, ...)
135 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
136     __attribute__((format(printf, 2, 3)))
137 # endif
138     ;
139 
140 // These prototypes cannot be produced automatically.
141 int semsg(const char *, ...)
142 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
143     __attribute__((format(printf, 1, 2)))
144 # endif
145     ;
146 
147 // These prototypes cannot be produced automatically.
148 void siemsg(const char *, ...)
149 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
150     __attribute__((format(printf, 1, 2)))
151 # endif
152     ;
153 
154 int vim_snprintf_add(char *, size_t, const char *, ...)
155 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
156     __attribute__((format(printf, 3, 4)))
157 # endif
158     ;
159 
160 int vim_snprintf(char *, size_t, const char *, ...)
161 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
162     __attribute__((format(printf, 3, 4)))
163 # endif
164     ;
165 
166 int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
167 int vim_vsnprintf_typval(char *str, size_t str_m, const char *fmt, va_list ap, typval_T *tvs);
168 
169 # include "message.pro"
170 # include "misc1.pro"
171 # include "misc2.pro"
172 # ifndef HAVE_STRPBRK	    // not generated automatically from misc2.c
173 char_u *vim_strpbrk(char_u *s, char_u *charset);
174 # endif
175 # ifndef HAVE_QSORT
176 // Use our own qsort(), don't define the prototype when not used.
177 void qsort(void *base, size_t elm_count, size_t elm_size, int (*cmp)(const void *, const void *));
178 # endif
179 # include "mouse.pro"
180 # include "move.pro"
181 # include "mbyte.pro"
182 # ifdef VIMDLL
183 // Function name differs when VIMDLL is defined
184 int mbyte_im_get_status(void);
185 void mbyte_im_set_active(int active_arg);
186 # endif
187 # include "normal.pro"
188 # include "ops.pro"
189 # include "option.pro"
190 # include "optionstr.pro"
191 # include "popupmenu.pro"
192 # if defined(FEAT_PROFILE) || defined(FEAT_RELTIME)
193 #  include "profiler.pro"
194 # endif
195 # include "quickfix.pro"
196 # include "regexp.pro"
197 # include "register.pro"
198 # include "scriptfile.pro"
199 # include "screen.pro"
200 # include "session.pro"
201 # if defined(FEAT_CRYPT) || defined(FEAT_PERSISTENT_UNDO)
202 #  include "sha256.pro"
203 # endif
204 # include "search.pro"
205 # ifdef FEAT_SIGNS
206 #  include "sign.pro"
207 # endif
208 # include "sound.pro"
209 # include "spell.pro"
210 # include "spellfile.pro"
211 # include "spellsuggest.pro"
212 # include "syntax.pro"
213 # include "tag.pro"
214 # include "term.pro"
215 # ifdef FEAT_TERMINAL
216 #  include "terminal.pro"
217 # endif
218 # if defined(HAVE_TGETENT) && (defined(AMIGA) || defined(VMS))
219 #  include "termlib.pro"
220 # endif
221 # ifdef FEAT_PROP_POPUP
222 #  include "popupwin.pro"
223 #  include "textprop.pro"
224 # endif
225 # include "testing.pro"
226 # include "textobject.pro"
227 # include "textformat.pro"
228 # include "time.pro"
229 # include "ui.pro"
230 # include "undo.pro"
231 # include "usercmd.pro"
232 # include "userfunc.pro"
233 # include "version.pro"
234 # ifdef FEAT_EVAL
235 #  include "vim9compile.pro"
236 #  include "vim9execute.pro"
237 #  include "vim9script.pro"
238 # endif
239 # include "window.pro"
240 
241 # ifdef FEAT_LUA
242 #  include "if_lua.pro"
243 # endif
244 
245 # ifdef FEAT_MZSCHEME
246 #  include "if_mzsch.pro"
247 # endif
248 
249 # ifdef FEAT_PYTHON
250 #  include "if_python.pro"
251 # endif
252 
253 # ifdef FEAT_PYTHON3
254 #  include "if_python3.pro"
255 # endif
256 
257 # ifdef FEAT_TCL
258 #  include "if_tcl.pro"
259 # endif
260 
261 # ifdef FEAT_RUBY
262 #  include "if_ruby.pro"
263 # endif
264 
265 // Ugly solution for "BalloonEval" not being defined while it's used in some
266 // .pro files.
267 # ifndef FEAT_BEVAL
268 #  define BalloonEval int
269 # endif
270 # if defined(FEAT_BEVAL) || defined(FEAT_PROP_POPUP)
271 #  include "beval.pro"
272 # endif
273 
274 # ifdef FEAT_NETBEANS_INTG
275 #  include "netbeans.pro"
276 # endif
277 # ifdef FEAT_JOB_CHANNEL
278 #  include "channel.pro"
279 
280 // Not generated automatically, to add extra attribute.
281 void ch_log(channel_T *ch, const char *fmt, ...)
282 #  ifdef USE_PRINTF_FORMAT_ATTRIBUTE
283     __attribute__((format(printf, 2, 3)))
284 #  endif
285     ;
286 
287 # endif
288 
289 # if defined(FEAT_GUI) || defined(FEAT_JOB_CHANNEL)
290 #  if defined(UNIX) || defined(MACOS_X) || defined(VMS)
291 #   include "pty.pro"
292 #  endif
293 # endif
294 
295 # ifdef FEAT_GUI
296 #  include "gui.pro"
297 #  if !defined(HAVE_SETENV) && !defined(HAVE_PUTENV) && !defined(VMS)
298 extern int putenv(const char *string);			// in misc2.c
299 #   ifdef USE_VIMPTY_GETENV
300 extern char_u *vimpty_getenv(const char_u *string);	// in misc2.c
301 #   endif
302 #  endif
303 #  ifdef FEAT_GUI_MSWIN
304 #   include "gui_w32.pro"
305 #  endif
306 #  ifdef FEAT_GUI_GTK
307 #   include "gui_gtk.pro"
308 #   include "gui_gtk_x11.pro"
309 #  endif
310 #  ifdef FEAT_GUI_MOTIF
311 #   include "gui_motif.pro"
312 #   include "gui_xmdlg.pro"
313 #  endif
314 #  ifdef FEAT_GUI_ATHENA
315 #   include "gui_athena.pro"
316 #   ifdef FEAT_BROWSE
317 extern char *vim_SelFile(Widget toplevel, char *prompt, char *init_path, int (*show_entry)(), int x, int y, guicolor_T fg, guicolor_T bg, guicolor_T scroll_fg, guicolor_T scroll_bg);
318 #   endif
319 #  endif
320 #  ifdef FEAT_GUI_HAIKU
321 #   include "gui_haiku.pro"
322 #  endif
323 #  ifdef FEAT_GUI_MAC
324 #   include "gui_mac.pro"
325 #  endif
326 #  ifdef FEAT_GUI_X11
327 #   include "gui_x11.pro"
328 #  endif
329 #  ifdef FEAT_GUI_PHOTON
330 #   include "gui_photon.pro"
331 #  endif
332 # endif	// FEAT_GUI
333 
334 # ifdef FEAT_OLE
335 #  include "if_ole.pro"
336 # endif
337 # if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11)
338 #  include "if_xcmdsrv.pro"
339 # endif
340 
341 /*
342  * The perl include files pollute the namespace, therefore proto.h must be
343  * included before the perl include files.  But then CV is not defined, which
344  * is used in if_perl.pro.  To get around this, the perl prototype files are
345  * not included here for the perl files.  Use a dummy define for CV for the
346  * other files.
347  */
348 # if defined(FEAT_PERL) && !defined(IN_PERL_FILE)
349 #  define CV void
350 #  include "if_perl.pro"
351 #  include "if_perlsfio.pro"
352 # endif
353 
354 # ifdef MACOS_CONVERT
355 #  include "os_mac_conv.pro"
356 # endif
357 # if defined(MACOS_X_DARWIN) && defined(FEAT_CLIPBOARD) && !defined(FEAT_GUI)
358 // functions in os_macosx.m
359 void clip_mch_lose_selection(Clipboard_T *cbd);
360 int clip_mch_own_selection(Clipboard_T *cbd);
361 void clip_mch_request_selection(Clipboard_T *cbd);
362 void clip_mch_set_selection(Clipboard_T *cbd);
363 # endif
364 #endif // !PROTO && !NOPROTO
365