2 * $Id: mousecmn.h,v 1.15 2006/06/16 19:55:56 mikulik Exp $
5 /* GNUPLOT - mousecnm.h */
9 * Copyright: Petr Mikulik <mikulik@physics.muni.cz>, since 1999
11 * Permission to use, copy, and distribute this software and its
12 * documentation for any purpose with or without fee is hereby granted
13 * provided that the above copyright notice appear in all copies and
14 * that both that copyright notice and this permission notice appear
15 * in supporting documentation.
17 * Permission to modify the software is granted, but not the right to
18 * distribute the complete modified source code. Modifications are to
19 * be distributed as patches to the released version. Permission to
20 * distribute binaries produced by compiling modified sources is granted,
22 * 1. distribute the corresponding source modifications from the
23 * released version in the form of a patch file along with the binaries,
24 * 2. add special version identification to distinguish your version
25 * in addition to the base release version number,
26 * 3. provide your name and address as the primary contact for the
27 * support of your modified version, and
28 * 4. retain our contact information in regard to use of the base
30 * Permission to distribute the released version of the source code along
31 * with corresponding source modifications in the form of a patch file is
32 * granted with same provisions 2 through 4 for binary distributions.
34 * This software is provided "as is" without express or implied warranty
35 * to the extent permitted by applicable law.
42 * Definitions that are used by both gnuplot core and standalone terminals.
47 * Structure for reporting mouse events to the main program
50 int type; /* see below */
51 int mx, my; /* current mouse coordinates */
52 int par1, par2; /* other parameters, depending on the event type */
53 int winid; /* ID of window in which the event occurred */
60 GE_motion, /* mouse has moved */
61 GE_buttonpress, /* mouse button has been pressed; par1 = number of the button (1, 2, 3...) */
62 GE_buttonrelease, /* mouse button has been released; par1 = number of the button (1, 2, 3...); par2 = time (ms) since previous button release */
63 GE_keypress, /* keypress; par1 = keycode (either ASCII, or one of the GP_ enums defined below); par2 = ( |1 .. don't pass through bindings )*/
64 GE_buttonpress_old, /* same as GE_buttonpress but triggered from inactive window */
65 GE_buttonrelease_old, /* same as GE_buttonrelease but triggered from inactive window */
66 GE_keypress_old, /* same as GE_keypress but triggered from inactive window */
67 GE_modifier, /* shift/ctrl/alt key pressed or released; par1 = is new mask, see Mod_ enums below */
68 GE_plotdone, /* acknowledgement of plot completion (for synchronization) */
69 GE_replot, /* used only by ggi.trm */
70 GE_reset /* reset to a well-defined state
71 (e.g. after an X11 error occured) */
72 , GE_fontprops /* par1 = hchar par2 = vchar */
73 #if defined(PIPE_IPC) || defined(WIN_IPC)
74 , GE_pending /* signal gp_exec_event() to send pending events */
79 /* the status of the shift, ctrl and alt keys
81 enum { Mod_Shift = (1), Mod_Ctrl = (1 << 1), Mod_Alt = (1 << 2) };
84 /* the below depends on the ascii character set lying in the
85 * range from 0 to 255 (below 1000) */
86 enum { /* special keys with "usual well-known" keycodes */
95 enum { /* other special keys */
119 GP_KP_Insert, /* ~ KP_0 */
120 GP_KP_End, /* ~ KP_1 */
121 GP_KP_Down, /* ~ KP_2 */
122 GP_KP_Page_Down, /* ~ KP_3 */
123 GP_KP_Left, /* ~ KP_4 */
124 GP_KP_Begin, /* ~ KP_5 */
125 GP_KP_Right, /* ~ KP_6 */
126 GP_KP_Home, /* ~ KP_7 */
127 GP_KP_Up, /* ~ KP_8 */
128 GP_KP_Page_Up, /* ~ KP_9 */
165 /* Pass information necessary for (un)checking menu items in the
166 Presentation Manager terminal.
167 Thus this structure is required by pm.trm and gclient.c.
171 int where_zoom_queue;
172 /* logical or: 1..unzoom, 2..unzoom back, 4..zoom next */
179 #endif /* MOUSECMN_H */