Mercurial > vim
annotate src/beval.h @ 14680:ac64c88a6033
Added tag v8.1.0352 for changeset ba010fa2bcba6876a9042e81c21f78904d01aea3
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 08 Sep 2018 15:15:09 +0200 |
parents | 2ad722003b36 |
children | e3dfd25b0679 |
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 { |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 ShS_NEUTRAL, /* nothing showing or pending */ |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 ShS_PENDING, /* data requested from debugger */ |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 ShS_UPDATE_PENDING, /* switching information displayed */ |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 ShS_SHOWING /* the balloon is being displayed */ |
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 |
12871
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 GtkWidget *target; /* widget we are monitoring */ |
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; |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 unsigned int timerID; /* timer for run */ |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 BeState showState; /* tells us whats currently going on */ |
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; |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
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 |
9aacdf8a2425
patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
12871
diff
changeset
|
46 # if !defined(FEAT_GUI_W32) |
12871
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 Widget target; /* widget we are monitoring */ |
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; |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 XtIntervalId timerID; /* timer for run */ |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 BeState showState; /* tells us whats currently going on */ |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 XtAppContext appContext; /* used in event handler */ |
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; |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
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; |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 BeState showState; /* tells us whats 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 |
12875
9aacdf8a2425
patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
12871
diff
changeset
|
66 # if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32) |
9aacdf8a2425
patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
12871
diff
changeset
|
67 Dimension screen_width; /* screen width in pixels */ |
9aacdf8a2425
patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
12871
diff
changeset
|
68 Dimension screen_height; /* screen height in pixels */ |
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); |
9aacdf8a2425
patch 8.0.1314: build fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
12871
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 |
12871
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 char_u *msg; |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 } BalloonEval; |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 #define EVAL_OFFSET_X 15 /* displacement of beval topleft corner from pointer */ |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 #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
|
83 |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 #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
|
85 # 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
|
86 #endif |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 |
1a450ce6980c
patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 #endif /* BEVAL__H and FEAT_BEVAL_GUI */ |