annotate src/beval.h @ 33004:50e7d33c40f9 v9.0.1794

patch 9.0.1794: autoconf: not correctly detecing include dirs Commit: https://github.com/vim/vim/commit/74e1dada4199b2d9e68ccaafdb7895c85b4b08f1 Author: Illia Bobyr <illia.bobyr@gmail.com> Date: Sun Aug 27 18:26:54 2023 +0200 patch 9.0.1794: autoconf: not correctly detecing include dirs Problem: autoconf: not correctly detecing include dirs Solution: make use of python3 to generate includedirs configure: Python3: Use sysconfig for -I It seems better to use tools provided by Python for determining the include directories, rather than construct them "manually". Current system is broken when using virtual environments for python 3.11.4. It used to work before, but now it detects a incorrect value for `-I`. It would probably make sense to switch to a similar logic for lib folders, that is for the `-l` switch. There are also `sysconfig.get_config_h_filename()` and `sysconfig.get_makefile_filename()`, that could replace more Python specific logic in the current `configure{.ac,}`. sysconfig provides the necessary tools since Python 2.7. closes: #12889 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
author Christian Brabandt <cb@256bit.org>
date Sun, 27 Aug 2023 18:45:03 +0200
parents 352701a626ed
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4 noet:
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 *
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 * Visual Workshop integration by Gordon Prieur
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 *
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 * Do ":help uganda" in Vim to read copying and usage conditions.
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 * Do ":help credits" in Vim to see a list of people who contributed.
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 */
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 #if !defined(BEVAL__H) && (defined(FEAT_BEVAL) || defined(PROTO))
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 #define BEVAL__H
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 #ifdef FEAT_GUI_GTK
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 # ifdef USE_GTK3
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 # include <gtk/gtk.h>
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 # else
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 # include <gtk/gtkwidget.h>
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 # endif
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 #else
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 # if defined(FEAT_GUI_X11)
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 # include <X11/Intrinsic.h>
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 # endif
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 #endif
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 typedef enum
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 {
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
27 ShS_NEUTRAL, // nothing showing or pending
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
28 ShS_PENDING, // data requested from debugger
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
29 ShS_UPDATE_PENDING, // switching information displayed
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
30 ShS_SHOWING // the balloon is being displayed
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 } BeState;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 typedef struct BalloonEvalStruct
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 {
12875
9aacdf8a2425 patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents: 12871
diff changeset
35 #ifdef FEAT_BEVAL_GUI
9aacdf8a2425 patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents: 12871
diff changeset
36 # ifdef FEAT_GUI_GTK
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
37 GtkWidget *target; // widget we are monitoring
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 GtkWidget *balloonShell;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 GtkWidget *balloonLabel;
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
40 unsigned int timerID; // timer for run
19195
2ef19eed524a patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
41 BeState showState; // tells us what's currently going on
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 int x;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 int y;
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
44 unsigned int state; // Button/Modifier key state
12875
9aacdf8a2425 patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents: 12871
diff changeset
45 # else
15868
7fad90423bd2 patch 8.1.0941: macros for MS-Windows are inconsistent
Bram Moolenaar <Bram@vim.org>
parents: 15288
diff changeset
46 # if !defined(FEAT_GUI_MSWIN)
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
47 Widget target; // widget we are monitoring
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 Widget balloonShell;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 Widget balloonLabel;
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
50 XtIntervalId timerID; // timer for run
19195
2ef19eed524a patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
51 BeState showState; // tells us what's currently going on
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
52 XtAppContext appContext; // used in event handler
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 Position x;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 Position y;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 Position x_root;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 Position y_root;
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
57 int state; // Button/Modifier key state
12875
9aacdf8a2425 patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents: 12871
diff changeset
58 # else
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 HWND target;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 HWND balloon;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 int x;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 int y;
19195
2ef19eed524a patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
63 BeState showState; // tells us what's currently going on
12875
9aacdf8a2425 patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents: 12871
diff changeset
64 # endif
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 # endif
15868
7fad90423bd2 patch 8.1.0941: macros for MS-Windows are inconsistent
Bram Moolenaar <Bram@vim.org>
parents: 15288
diff changeset
66 # if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
67 Dimension screen_width; // screen width in pixels
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
68 Dimension screen_height; // screen height in pixels
12875
9aacdf8a2425 patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents: 12871
diff changeset
69 # endif
9aacdf8a2425 patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents: 12871
diff changeset
70 void (*msgCB)(struct BalloonEvalStruct *, int);
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
71 void *clientData; // For callback
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 #endif
12875
9aacdf8a2425 patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents: 12871
diff changeset
73
14175
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 12889
diff changeset
74 int ts; // tabstop setting for this buffer
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 12889
diff changeset
75 #ifdef FEAT_VARTABS
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 12889
diff changeset
76 int *vts; // vartabstop setting for this buffer
2ad722003b36 patch 8.1.0105: all tab stops are the same
Christian Brabandt <cb@256bit.org>
parents: 12889
diff changeset
77 #endif
16600
ff3c99bd1038 patch 8.1.1303: not possible to hide a balloon
Bram Moolenaar <Bram@vim.org>
parents: 15868
diff changeset
78 char_u *msg; // allocated: current text
15868
7fad90423bd2 patch 8.1.0941: macros for MS-Windows are inconsistent
Bram Moolenaar <Bram@vim.org>
parents: 15288
diff changeset
79 #ifdef FEAT_GUI_MSWIN
15288
e3dfd25b0679 patch 8.1.0652: freeing memory for balloon eval too early
Bram Moolenaar <Bram@vim.org>
parents: 14175
diff changeset
80 void *tofree;
e3dfd25b0679 patch 8.1.0652: freeing memory for balloon eval too early
Bram Moolenaar <Bram@vim.org>
parents: 14175
diff changeset
81 #endif
20134
352701a626ed patch 8.2.0622: Haiku: GUI does not compile
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
82 #ifdef FEAT_GUI_HAIKU
352701a626ed patch 8.2.0622: Haiku: GUI does not compile
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
83 int x;
352701a626ed patch 8.2.0622: Haiku: GUI does not compile
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
84 int y;
352701a626ed patch 8.2.0622: Haiku: GUI does not compile
Bram Moolenaar <Bram@vim.org>
parents: 19195
diff changeset
85 #endif
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 } BalloonEval;
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
88 #define EVAL_OFFSET_X 15 // displacement of beval topleft corner from pointer
12871
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 #define EVAL_OFFSET_Y 10
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 #ifdef FEAT_BEVAL_GUI
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 # include "gui_beval.pro"
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 #endif
1a450ce6980c patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 16600
diff changeset
95 #endif // BEVAL__H and FEAT_BEVAL_GUI