1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
/* Copyright 2000 Kjetil S. Matheussen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef TRACKER_EVENTS_DEFINE
#define TRACKER_EVENTS_DEFINE 1
#include "keyboard_sub_ids.h"
/* Event IDs: */
#define TR_MOUSEMOVE 0
#define TR_LEFTMOUSEDOWN 1
#define TR_LEFTMOUSEUP 2
#define TR_MIDDLEMOUSEDOWN 3
#define TR_MIDDLEMOUSEUP 4
#define TR_RIGHTMOUSEDOWN 5
#define TR_RIGHTMOUSEUP 6
#define TR_KEYBOARD 7
#define TR_WINDOWMOVE 8
#define TR_WINDOWRESIZE 9
#define TR_WINDOWVISIBLE 10
#define TR_WINDOWNOTVISIBLE 11
#define TR_WINDOWCLOSE 12
#define TR_KEYBOARDUP 13
/* KEYSWITCHes: */
#define EVENT_LEFTCTRL (1<<EVENT_CTRL_L)
#define EVENT_RIGHTCTRL (1<<EVENT_CTRL_R)
#define EVENT_CAPSLOCK (1<<EVENT_CAPS)
#define EVENT_LEFTSHIFT (1<<EVENT_SHIFT_L)
#define EVENT_RIGHTSHIFT (1<<EVENT_SHIFT_R)
#define EVENT_LEFTALT (1<<EVENT_ALT_L)
#define EVENT_RIGHTALT (1<<EVENT_ALT_R)
#define EVENT_LEFTEXTRA1 (1<<EVENT_EXTRA_L) /*Amiga: Amiga, PC: "Meta"/Windows key */
#define EVENT_RIGHTEXTRA1 (1<<EVENT_EXTRA_R) /*Amiga: Amiga, PC: "Meta"/Windows key */
#define EVENT_UP2 (1<<EVENT_UP) /* Up key, i.e. key is released. */
#define NoSwitch(a) (a==0)
#define LeftCtrl(a) (a&EVENT_LEFTCTRL)
#define RightCtrl(a) (a&EVENT_RIGHTCTRL)
#define CapsLock(a) (a&EVENT_CAPSLOCK)
#define LeftShift(a) (a&EVENT_LEFTSHIFT)
#define RightShift(a) (a&EVENT_RIGHTSHIFT)
#define AnyShift(a) (LeftShift(a) | RightShift(a))
#define LeftAlt(a) (a&EVENT_LEFTALT)
#define RightAlt(a) (a&EVENT_RIGHTALT)
#define LeftExtra(a) (a&EVENT_LEFTEXTRA1)
#define RightExtra(a) (a&EVENT_RIGHTEXTRA1)
#define OnlyLeftShift(a) (a==EVENT_LEFTSHIFT)
#define OnlyLeftAlt(a) (a==EVENT_LEFTALT)
struct TEvent{
int ID;
int SubID;
uint32_t keyswitch;
int x;
int y;
};
struct TEventFIFO{
struct TEventFIFO *next;
struct TEvent t;
};
struct WrapFuncList{
char *funcname;
void *func;
};
#endif
|