Merge branch 'hack/autopaste'
[vim-kana.git] / src / gui_beval.h
blob75d5a18fc2c9f0bc8b9772eebd5b02f904428b32
1 /* vi:set ts=8 sts=4 sw=4:
3 * VIM - Vi IMproved by Bram Moolenaar
4 * Visual Workshop integration by Gordon Prieur
6 * Do ":help uganda" in Vim to read copying and usage conditions.
7 * Do ":help credits" in Vim to see a list of people who contributed.
8 */
10 #if !defined(GUI_BEVAL_H) && (defined(FEAT_BEVAL) || defined(PROTO))
11 #define GUI_BEVAL_H
13 #ifdef FEAT_GUI_GTK
14 # include <gtk/gtkwidget.h>
15 #else
16 # if defined(FEAT_GUI_X11)
17 # include <X11/Intrinsic.h>
18 # endif
19 #endif
21 typedef enum
23 ShS_NEUTRAL, /* nothing showing or pending */
24 ShS_PENDING, /* data requested from debugger */
25 ShS_UPDATE_PENDING, /* switching information displayed */
26 ShS_SHOWING /* the balloon is being displayed */
27 } BeState;
29 typedef struct BalloonEvalStruct
31 #ifdef FEAT_GUI_GTK
32 GtkWidget *target; /* widget we are monitoring */
33 GtkWidget *balloonShell;
34 GtkWidget *balloonLabel;
35 unsigned int timerID; /* timer for run */
36 BeState showState; /* tells us whats currently going on */
37 int x;
38 int y;
39 unsigned int state; /* Button/Modifier key state */
40 #else
41 # if !defined(FEAT_GUI_W32)
42 Widget target; /* widget we are monitoring */
43 Widget balloonShell;
44 Widget balloonLabel;
45 XtIntervalId timerID; /* timer for run */
46 BeState showState; /* tells us whats currently going on */
47 XtAppContext appContext; /* used in event handler */
48 Position x;
49 Position y;
50 Position x_root;
51 Position y_root;
52 int state; /* Button/Modifier key state */
53 # else
54 HWND target;
55 HWND balloon;
56 int x;
57 int y;
58 BeState showState; /* tells us whats currently going on */
59 # endif
60 #endif
61 int ts; /* tabstop setting for this buffer */
62 char_u *msg;
63 void (*msgCB)__ARGS((struct BalloonEvalStruct *, int));
64 void *clientData; /* For callback */
65 #if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32)
66 Dimension screen_width; /* screen width in pixels */
67 Dimension screen_height; /* screen height in pixels */
68 #endif
69 } BalloonEval;
71 #define EVAL_OFFSET_X 15 /* displacement of beval topleft corner from pointer */
72 #define EVAL_OFFSET_Y 10
74 #include "gui_beval.pro"
76 #endif /* GUI_BEVAL_H and FEAT_BEVAL */