2016-08-29 22:49:24 +02:00
|
|
|
/* vi:set ts=8 sts=4 sw=4 noet:
|
2004-06-13 20:20:40 +00:00
|
|
|
*
|
|
|
|
* VIM - Vi IMproved by Bram Moolenaar
|
|
|
|
* Visual Workshop integration by Gordon Prieur
|
|
|
|
*
|
|
|
|
* Do ":help uganda" in Vim to read copying and usage conditions.
|
|
|
|
* Do ":help credits" in Vim to see a list of people who contributed.
|
|
|
|
*/
|
|
|
|
|
2017-11-18 22:13:31 +01:00
|
|
|
#if !defined(BEVAL__H) && (defined(FEAT_BEVAL) || defined(PROTO))
|
|
|
|
#define BEVAL__H
|
2004-06-13 20:20:40 +00:00
|
|
|
|
|
|
|
#ifdef FEAT_GUI_GTK
|
2016-02-23 17:14:37 +01:00
|
|
|
# ifdef USE_GTK3
|
|
|
|
# include <gtk/gtk.h>
|
|
|
|
# else
|
|
|
|
# include <gtk/gtkwidget.h>
|
|
|
|
# endif
|
2004-06-13 20:20:40 +00:00
|
|
|
#else
|
|
|
|
# if defined(FEAT_GUI_X11)
|
|
|
|
# include <X11/Intrinsic.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2019-11-30 19:44:38 +01:00
|
|
|
ShS_NEUTRAL, // nothing showing or pending
|
|
|
|
ShS_PENDING, // data requested from debugger
|
|
|
|
ShS_UPDATE_PENDING, // switching information displayed
|
|
|
|
ShS_SHOWING // the balloon is being displayed
|
2004-06-13 20:20:40 +00:00
|
|
|
} BeState;
|
|
|
|
|
|
|
|
typedef struct BalloonEvalStruct
|
|
|
|
{
|
2017-11-18 22:49:58 +01:00
|
|
|
#ifdef FEAT_BEVAL_GUI
|
|
|
|
# ifdef FEAT_GUI_GTK
|
2019-11-30 19:44:38 +01:00
|
|
|
GtkWidget *target; // widget we are monitoring
|
2004-06-13 20:20:40 +00:00
|
|
|
GtkWidget *balloonShell;
|
|
|
|
GtkWidget *balloonLabel;
|
2019-11-30 19:44:38 +01:00
|
|
|
unsigned int timerID; // timer for run
|
2020-01-26 22:00:26 +01:00
|
|
|
BeState showState; // tells us what's currently going on
|
2004-06-13 20:20:40 +00:00
|
|
|
int x;
|
|
|
|
int y;
|
2019-11-30 19:44:38 +01:00
|
|
|
unsigned int state; // Button/Modifier key state
|
2017-11-18 22:49:58 +01:00
|
|
|
# else
|
2019-02-17 17:44:42 +01:00
|
|
|
# if !defined(FEAT_GUI_MSWIN)
|
2019-11-30 19:44:38 +01:00
|
|
|
Widget target; // widget we are monitoring
|
2004-06-13 20:20:40 +00:00
|
|
|
Widget balloonShell;
|
|
|
|
Widget balloonLabel;
|
2019-11-30 19:44:38 +01:00
|
|
|
XtIntervalId timerID; // timer for run
|
2020-01-26 22:00:26 +01:00
|
|
|
BeState showState; // tells us what's currently going on
|
2019-11-30 19:44:38 +01:00
|
|
|
XtAppContext appContext; // used in event handler
|
2004-06-13 20:20:40 +00:00
|
|
|
Position x;
|
|
|
|
Position y;
|
|
|
|
Position x_root;
|
|
|
|
Position y_root;
|
2019-11-30 19:44:38 +01:00
|
|
|
int state; // Button/Modifier key state
|
2017-11-18 22:49:58 +01:00
|
|
|
# else
|
2004-06-13 20:20:40 +00:00
|
|
|
HWND target;
|
|
|
|
HWND balloon;
|
|
|
|
int x;
|
|
|
|
int y;
|
2020-01-26 22:00:26 +01:00
|
|
|
BeState showState; // tells us what's currently going on
|
2017-11-18 22:49:58 +01:00
|
|
|
# endif
|
2004-06-13 20:20:40 +00:00
|
|
|
# endif
|
2019-02-17 17:44:42 +01:00
|
|
|
# if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MSWIN)
|
2019-11-30 19:44:38 +01:00
|
|
|
Dimension screen_width; // screen width in pixels
|
|
|
|
Dimension screen_height; // screen height in pixels
|
2017-11-18 22:49:58 +01:00
|
|
|
# endif
|
|
|
|
void (*msgCB)(struct BalloonEvalStruct *, int);
|
2019-11-30 19:44:38 +01:00
|
|
|
void *clientData; // For callback
|
2004-06-13 20:20:40 +00:00
|
|
|
#endif
|
2017-11-18 22:49:58 +01:00
|
|
|
|
2018-06-23 19:23:02 +02:00
|
|
|
int ts; // tabstop setting for this buffer
|
|
|
|
#ifdef FEAT_VARTABS
|
|
|
|
int *vts; // vartabstop setting for this buffer
|
|
|
|
#endif
|
2019-05-09 13:50:16 +02:00
|
|
|
char_u *msg; // allocated: current text
|
2019-02-17 17:44:42 +01:00
|
|
|
#ifdef FEAT_GUI_MSWIN
|
2018-12-28 19:13:34 +01:00
|
|
|
void *tofree;
|
|
|
|
#endif
|
2020-04-23 15:41:49 +02:00
|
|
|
#ifdef FEAT_GUI_HAIKU
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
#endif
|
2004-06-13 20:20:40 +00:00
|
|
|
} BalloonEval;
|
|
|
|
|
2019-11-30 19:44:38 +01:00
|
|
|
#define EVAL_OFFSET_X 15 // displacement of beval topleft corner from pointer
|
2004-06-13 20:20:40 +00:00
|
|
|
#define EVAL_OFFSET_Y 10
|
|
|
|
|
2017-11-18 22:13:31 +01:00
|
|
|
#ifdef FEAT_BEVAL_GUI
|
|
|
|
# include "gui_beval.pro"
|
|
|
|
#endif
|
2004-06-13 20:20:40 +00:00
|
|
|
|
2019-11-30 19:44:38 +01:00
|
|
|
#endif // BEVAL__H and FEAT_BEVAL_GUI
|