annotate src/gui_beval.h @ 12206:bd8d767fb36f v8.0.0983

patch 8.0.0983: unnecessary check for NULL pointer commit https://github.com/vim/vim/commit/3f9a1ff141412e9e85f7dff47d02946cb9be9228 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 21 22:06:02 2017 +0200 patch 8.0.0983: unnecessary check for NULL pointer Problem: Unnecessary check for NULL pointer. Solution: Remove the NULL check in dialog_changed(), it already happens in dialog_msg(). (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Mon, 21 Aug 2017 22:15:06 +0200
parents 4aead6a9b7a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10042
4aead6a9b7a9 commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents: 8218
diff changeset
1 /* vi:set ts=8 sts=4 sw=4 noet:
7
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 #if !defined(GUI_BEVAL_H) && (defined(FEAT_BEVAL) || defined(PROTO))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 #define GUI_BEVAL_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 #ifdef FEAT_GUI_GTK
8218
3456e2ebebd4 commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
14 # ifdef USE_GTK3
3456e2ebebd4 commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
15 # include <gtk/gtk.h>
3456e2ebebd4 commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
16 # else
3456e2ebebd4 commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
17 # include <gtk/gtkwidget.h>
3456e2ebebd4 commit https://github.com/vim/vim/commit/9892189d2e7ab94b750f99e6da4cbfc3c8014517
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
18 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 # if defined(FEAT_GUI_X11)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 # include <X11/Intrinsic.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 typedef enum
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 ShS_NEUTRAL, /* nothing showing or pending */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 ShS_PENDING, /* data requested from debugger */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 ShS_UPDATE_PENDING, /* switching information displayed */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 ShS_SHOWING /* the balloon is being displayed */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 } BeState;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 typedef struct BalloonEvalStruct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 #ifdef FEAT_GUI_GTK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 GtkWidget *target; /* widget we are monitoring */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 GtkWidget *balloonShell;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 GtkWidget *balloonLabel;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 unsigned int timerID; /* timer for run */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 BeState showState; /* tells us whats currently going on */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 int x;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 int y;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 unsigned int state; /* Button/Modifier key state */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 # if !defined(FEAT_GUI_W32)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 Widget target; /* widget we are monitoring */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 Widget balloonShell;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 Widget balloonLabel;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 XtIntervalId timerID; /* timer for run */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 BeState showState; /* tells us whats currently going on */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 XtAppContext appContext; /* used in event handler */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 Position x;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 Position y;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 Position x_root;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 Position y_root;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 int state; /* Button/Modifier key state */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HWND target;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HWND balloon;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 int x;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 int y;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 BeState showState; /* tells us whats currently going on */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 int ts; /* tabstop setting for this buffer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 char_u *msg;
7807
1a5d34492798 commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
67 void (*msgCB)(struct BalloonEvalStruct *, int);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 void *clientData; /* For callback */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 #if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 Dimension screen_width; /* screen width in pixels */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 Dimension screen_height; /* screen height in pixels */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 } BalloonEval;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 #define EVAL_OFFSET_X 15 /* displacement of beval topleft corner from pointer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 #define EVAL_OFFSET_Y 10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 #include "gui_beval.pro"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 #endif /* GUI_BEVAL_H and FEAT_BEVAL */