[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/gnuplot/gnuplot-old/gnuplot-4-4-alpha/src/mousecmn.h [Back]  [Original]

/*
 * $Id: mousecmn.h,v 1.16 2007/05/18 06:15:31 sfeam Exp $
 */

/* GNUPLOT - mousecnm.h */

/*[
 * 
 * Copyright: Petr Mikulik , since 1999
 *
 * Permission to use, copy, and distribute this software and its
 * documentation for any purpose with or without fee is hereby granted
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.
 *
 * Permission to modify the software is granted, but not the right to
 * distribute the complete modified source code.  Modifications are to
 * be distributed as patches to the released version.  Permission to
 * distribute binaries produced by compiling modified sources is granted,
 * provided you
 *   1. distribute the corresponding source modifications from the
 *    released version in the form of a patch file along with the binaries,
 *   2. add special version identification to distinguish your version
 *    in addition to the base release version number,
 *   3. provide your name and address as the primary contact for the
 *    support of your modified version, and
 *   4. retain our contact information in regard to use of the base
 *    software.
 * Permission to distribute the released version of the source code along
 * with corresponding source modifications in the form of a patch file is
 * granted with same provisions 2 through 4 for binary distributions.
 *
 * This software is provided "as is" without express or implied warranty
 * to the extent permitted by applicable law.
]*/

#ifndef MOUSECMN_H
# define MOUSECMN_H

/*
 * Definitions that are used by both gnuplot core and standalone terminals.
 */


/*
 * Structure for reporting mouse events to the main program
 */
struct gp_event_t {
    int type;		/* see below */
    int mx, my;		/* current mouse coordinates */
    int par1, par2;	/* other parameters, depending on the event type */
    int winid;		/* ID of window in which the event occurred */
};


/* event types:
*/
enum {
    GE_motion,          /* mouse has moved */
    GE_buttonpress,     /* mouse button has been pressed; par1 = number of the button (1, 2, 3...) */
    GE_buttonrelease,   /* mouse button has been released; par1 = number of the button (1, 2, 3...); par2 = time (ms) since previous button release */
    GE_keypress,        /* keypress; par1 = keycode (either ASCII, or one of the GP_ enums defined below); par2 = ( |1 .. don't pass through bindings )*/
    GE_buttonpress_old,	/* same as GE_buttonpress but triggered from inactive window */
    GE_buttonrelease_old,	/* same as GE_buttonrelease but triggered from inactive window */
    GE_keypress_old,	/* same as GE_keypress but triggered from inactive window */
    GE_modifier,        /* shift/ctrl/alt key pressed or released; par1 = is new mask, see Mod_ enums below */
    GE_plotdone,        /* acknowledgement of plot completion (for synchronization) */
    GE_replot,          /* used only by ggi.trm */
    GE_reset            /* reset to a well-defined state
			   (e.g.  after an X11 error occured) */
    , GE_fontprops	/* par1 = hchar par2 = vchar */
#if defined(PIPE_IPC) || defined(WIN_IPC)
    , GE_pending        /* signal gp_exec_event() to send pending events */
#endif
};


/* the status of the shift, ctrl and alt keys
*/
enum { Mod_Shift = (1), Mod_Ctrl = (1 

Web Proxy Viewer  |  New URL  |  Original Page