Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | /* vi:set ts=8 sts=4 sw=4: |
| 2 | * |
| 3 | * VIM - Vi IMproved by Bram Moolenaar |
| 4 | * Visual Workshop integration by Gordon Prieur |
| 5 | * |
| 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 | */ |
| 9 | |
| 10 | #if !defined(GUI_BEVAL_H) && (defined(FEAT_BEVAL) || defined(PROTO)) |
| 11 | #define GUI_BEVAL_H |
| 12 | |
| 13 | #ifdef FEAT_GUI_GTK |
Bram Moolenaar | 9892189 | 2016-02-23 17:14:37 +0100 | [diff] [blame] | 14 | # ifdef USE_GTK3 |
| 15 | # include <gtk/gtk.h> |
| 16 | # else |
| 17 | # include <gtk/gtkwidget.h> |
| 18 | # endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 19 | #else |
| 20 | # if defined(FEAT_GUI_X11) |
| 21 | # include <X11/Intrinsic.h> |
| 22 | # endif |
| 23 | #endif |
| 24 | |
| 25 | typedef enum |
| 26 | { |
| 27 | ShS_NEUTRAL, /* nothing showing or pending */ |
| 28 | ShS_PENDING, /* data requested from debugger */ |
| 29 | ShS_UPDATE_PENDING, /* switching information displayed */ |
| 30 | ShS_SHOWING /* the balloon is being displayed */ |
| 31 | } BeState; |
| 32 | |
| 33 | typedef struct BalloonEvalStruct |
| 34 | { |
| 35 | #ifdef FEAT_GUI_GTK |
| 36 | GtkWidget *target; /* widget we are monitoring */ |
| 37 | GtkWidget *balloonShell; |
| 38 | GtkWidget *balloonLabel; |
| 39 | unsigned int timerID; /* timer for run */ |
| 40 | BeState showState; /* tells us whats currently going on */ |
| 41 | int x; |
| 42 | int y; |
| 43 | unsigned int state; /* Button/Modifier key state */ |
| 44 | #else |
| 45 | # if !defined(FEAT_GUI_W32) |
| 46 | Widget target; /* widget we are monitoring */ |
| 47 | Widget balloonShell; |
| 48 | Widget balloonLabel; |
| 49 | XtIntervalId timerID; /* timer for run */ |
| 50 | BeState showState; /* tells us whats currently going on */ |
| 51 | XtAppContext appContext; /* used in event handler */ |
| 52 | Position x; |
| 53 | Position y; |
| 54 | Position x_root; |
| 55 | Position y_root; |
| 56 | int state; /* Button/Modifier key state */ |
| 57 | # else |
| 58 | HWND target; |
| 59 | HWND balloon; |
| 60 | int x; |
| 61 | int y; |
| 62 | BeState showState; /* tells us whats currently going on */ |
| 63 | # endif |
| 64 | #endif |
| 65 | int ts; /* tabstop setting for this buffer */ |
| 66 | char_u *msg; |
Bram Moolenaar | d99df42 | 2016-01-29 23:20:40 +0100 | [diff] [blame] | 67 | void (*msgCB)(struct BalloonEvalStruct *, int); |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 68 | void *clientData; /* For callback */ |
| 69 | #if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_W32) |
| 70 | Dimension screen_width; /* screen width in pixels */ |
| 71 | Dimension screen_height; /* screen height in pixels */ |
| 72 | #endif |
| 73 | } BalloonEval; |
| 74 | |
| 75 | #define EVAL_OFFSET_X 15 /* displacement of beval topleft corner from pointer */ |
| 76 | #define EVAL_OFFSET_Y 10 |
| 77 | |
| 78 | #include "gui_beval.pro" |
| 79 | |
| 80 | #endif /* GUI_BEVAL_H and FEAT_BEVAL */ |