File: cmdlist.h

package info (click to toggle)
kcemu 0.5.2%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 13,004 kB
  • sloc: cpp: 48,526; ansic: 27,053; makefile: 1,731; sh: 1,340; asm: 376; yacc: 291; xml: 64; sed: 16
file content (71 lines) | stat: -rw-r--r-- 2,197 bytes parent folder | download | duplicates (6)
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
/*
 *  KCemu -- The emulator for the KC85 homecomputer series and much more.
 *  Copyright (C) 1997-2010 Torsten Paul
 *
 *  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.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef __cmd_cmdlist_h
#define __cmd_cmdlist_h

#define __CMD_COMMAND_SHIFT	(16)
#define __CMD_VALUE_MASK	(0xffff)
#define __CMD_TYPE		unsigned int

#include "cmd/cmdargs.h"

#define KCCMD(name,val)	  (new CMD_Val((__CMD_TYPE)(((KCCMD_##name##_##val) & __CMD_VALUE_MASK) | \
                            (KCCMD_##name << __CMD_COMMAND_SHIFT)), this))

#define KCCMD_0(name,val) (new CMD_Val((__CMD_TYPE)(((KCCMD_##name##_##val) & __CMD_VALUE_MASK) | \
                            (KCCMD_##name << __CMD_COMMAND_SHIFT)), 0))

class CMD_Val
{
 public:
  __CMD_TYPE _type;
  CMD_Caller *_caller;

  CMD_Val(__CMD_TYPE type, CMD_Caller *caller)
    {
      _type = type;
      _caller = caller;
    }
};

#define KCCMD_RESET	     (0x0001)
#define KCCMD_RESET_0          (0x0000)
#define KCCMD_RESET_RESET      (0x0001)
#define KCCMD_RESET_POWER_ON   (0x0002)
#define KCCMD_QUIT	     (0x0002)
#define KCCMD_QUIT_0	       (0x0000)

#define KCCMD_LOAD           (0x0003)
#define KCCMD_LOAD_0           (0x0000)
#define KCCMD_LOAD_IMAGE       (0x0001)
#define KCCMD_LOAD_IMAGE_OK    (0x0002)

/*
 *  User Interface Callbacks
 */

/*****
 *  this one is used to fetch a filename from the user interface
 *  by setting the 'file-name' argument
 */
#define KCCMD_UI_BROWSE      (0x0101)
#define KCCMD_UI_BROWSE_0      (0x0000)

#endif /* __cmd_list_h */