gonzui


Format: Advanced Search

tkernel_2/driver/tef_em1d/kbpd/src/innevt.hbare sourcepermlink (0.01 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    T-Kernel 2.0 Software Package
    4:  *
    5:  *    Copyright 2011 by Ken Sakamura.
    6:  *    This software is distributed under the latest version of T-License 2.x.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17.
   10:  *    Modified by TRON Forum(http://www.tron.org/) at 2015/06/01.
   11:  *
   12:  *----------------------------------------------------------------------
   13:  */
   14: 
   15: /*
   16:  *      innevt.h
   17:  *
   18:  *       KB/PD device manager
   19:  *       definitions of additional events used only inside manager
   20:  */
   21: 
   22: /*
   23:  * internal event type
   24:  */
   25: typedef enum {
   26:         IE_NULL                = 0x0000,     /* no event */
   27:         IE_KEYDOWN     = 0x0001,   /* key down */
   28:         IE_KEYUP       = 0x0002,     /* key up */
   29:         IE_S_PRESS     = 0x0010,   /* shift press */
   30:         IE_S_REL       = 0x0020,     /* shift release */
   31:         IE_S_SCLK      = 0x0030,    /* shift single click */
   32:         IE_S_DCLK      = 0x0040,    /* shift double click */
   33:         IE_KEYERR      = 0x0009,    /* key input error */
   34:                                 /* following events can be generated simultaneously */
   35:         IE_MBUTDOWN    = 0x0100,  /* PD main button down */
   36:         IE_MBUTUP      = 0x0200,    /* PD main button up */
   37:         IE_SBUTDOWN    = 0x0400,  /* PD subbutton down */
   38:         IE_SBUTUP      = 0x0800,    /* PD subbutton up */
   39:         IE_PDMOVE      = 0x1000,    /* move PD */
   40: 
   41:         IE_MBUT                = IE_MBUTDOWN | IE_MBUTUP,
   42:         IE_SBUT                = IE_SBUTDOWN | IE_SBUTUP,
   43:         IE_BUTDOWN     = IE_MBUTDOWN | IE_SBUTDOWN,
   44:         IE_BUTUP       = IE_MBUTUP   | IE_SBUTUP,
   45:         IE_PDBUT       = IE_MBUT | IE_SBUT
   46: } InnEvtType;
   47: 
   48: /*
   49:  * internal event structure
   50:  */
   51: typedef struct {
   52:         InnEvtType     type;
   53:         union {
   54:                 struct {
   55:                         KeyTop               keytop;      /* key top information */
   56:                         KpMetaBut    meta;      /* meta key status */
   57:                 } key;
   58:                 struct {
   59:                         ShiftKeyKind kind;   /* type of shift key */
   60:                 } sft;
   61:                 struct {
   62:                         KpPdInStat   stat;     /* PD status */
   63:                         H            x;        /* PD postion / displacement */
   64:                         H            y;
   65:                 } pd;
   66:         } i;
   67: } InnerEvent;