--
--	sdlraster.inc -- constants/types for dynamic X raster thing
--	Copyright (C) 2005 Fred Barnes  <frmb@kent.ac.uk>
--
--	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., 675 Mass Ave, Cambridge, MA 02139, USA.
--

DATA TYPE RASTER IS MOBILE [][]INT:

-- FIXME: this is incomplete..

-- button press and release event data are encoded as:
--    ((x /\ #FFF) << 20) \/ ((y /\ #FFF) << 8) \/ (button /\ #FF)
--
-- key press and release event data are encoded as:
--    (unicode-char /\ #FFFF)
--
-- motion event is encoded as:
--    ((x /\ #FFF) << 20) \/ ((y /\ #FFF) << 8) \/ (state /\ #FF)
--

DATA TYPE SDLEVENT
  RECORD
    INT type:
    INT data:
:

VAL EVENT.UNKNOWN IS 0:
VAL EVENT.EXPOSE IS 1:
VAL EVENT.BUTTON.PRESS IS 2:
VAL EVENT.BUTTON.RELEASE IS 3:
VAL EVENT.KEY.PRESS IS 4:
VAL EVENT.KEY.RELEASE IS 5:
VAL EVENT.QUIT IS 6:
VAL EVENT.MOTION IS 7:
VAL EVENT.CKEY.PRESS IS 8:
VAL EVENT.CKEY.RELEASE IS 9:

VAL CKEY.UNKNOWN IS 0:
VAL CKEY.BACKSPACE IS 1:
VAL CKEY.NUMLOCK IS 2:
VAL CKEY.CAPSLOCK IS 3:
VAL CKEY.SCROLLOCK IS 4:
VAL CKEY.RSHIFT IS 5:
VAL CKEY.LSHIFT IS 6:
VAL CKEY.RCTRL IS 7:
VAL CKEY.LCTRL IS 8:
VAL CKEY.RALT IS 9:
VAL CKEY.LALT IS 10:
VAL CKEY.RMETA IS 11:
VAL CKEY.LMETA IS 12:
VAL CKEY.RSUPER IS 13:
VAL CKEY.LSUPER IS 14:
VAL CKEY.SYSREQ IS 15:
VAL CKEY.MENU IS 16:
VAL CKEY.MODE IS 17:
VAL CKEY.UP IS 18:
VAL CKEY.DOWN IS 19:
VAL CKEY.LEFT IS 20:
VAL CKEY.RIGHT IS 21:
VAL CKEY.HOME IS 22:
VAL CKEY.END IS 23:
VAL CKEY.PAGEUP IS 24:
VAL CKEY.PAGEDOWN IS 25:
VAL CKEY.INSERT IS 26:
VAL CKEY.DELETE IS 27:


VAL CTL.UNKNOWN IS 0:
VAL CTL.SHUTDOWN IS 1:


