~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/arch/riscos/plus4ui.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2005-03-27 13:06:04 UTC
  • mfrom: (4 hoary)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050327130604-zodmv0i60dbbmcik
Tags: 1.16-3
Apply patch from Andreas Jochens <aj@andaco.de> to correct building on
AMD64 and GCC 4.x (closes: #300936)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * plus4ui.c - Implementation of the Plus4-specific part of the UI.
3
3
 *
4
4
 * Written by
5
 
 *  Andreas Dehmel <dehmel@forwiss.tu-muenchen.de>
 
5
 *  Andreas Dehmel <zarquon@t-online.de>
6
6
 *
7
7
 * This file is part of VICE, the Versatile Commodore Emulator.
8
8
 * See README for copyright notice.
26
26
 
27
27
#include "vice.h"
28
28
 
 
29
#include <wimp.h>
 
30
 
29
31
#include "ui.h"
30
32
#include "plus4ui.h"
31
33
#include "kbd.h"
32
34
#include "resources.h"
33
 
 
34
 
 
35
 
 
36
 
char *WimpTaskName = "Vice Plus4";
 
35
#include "uisharedef.h"
 
36
 
 
37
 
37
38
 
38
39
 
39
40
static unsigned char Plus4norm[KEYMAP_ENTRIES] = {
75
76
static unsigned char Plus4norm_sflag[KEYMAP_ENTRIES/8];
76
77
static unsigned char Plus4shift_sflag[KEYMAP_ENTRIES/8];
77
78
 
 
79
static const char IBarIconName[] = "!viceplus4";
78
80
static const char Plus4keyfile[] = "Vice:PLUS4.ROdflt/vkm";
79
81
 
80
 
static keymap_t Plus4keys = {
 
82
static kbd_keymap_t Plus4keys = {
81
83
  Plus4keyfile,
82
84
  Plus4norm,
83
85
  Plus4shifted,
85
87
  Plus4shift_sflag
86
88
};
87
89
 
88
 
 
89
 
 
90
 
int plus4_ui_init(void)
91
 
{
92
 
  return ui_init_named_app("VicePlus4", "!viceplus4");
 
90
static const conf_iconid_t conf_grey_xplus4[] = {
 
91
  ICON_LIST_CART64
 
92
  ICON_LIST_VIC
 
93
  ICON_LIST_SYSTEM
 
94
  ICON_LIST_SID
 
95
  ICON_LIST_PET
 
96
  {0xff, 0xff}
 
97
};
 
98
 
 
99
 
 
100
static const char Rsrc_TEDCache[] = "TEDVideoCache";
 
101
 
 
102
static struct MenuVideoCache {
 
103
  RO_MenuHead head;
 
104
  RO_MenuItem item[1];
 
105
} MenuVideoCache = {
 
106
  MENU_HEADER("\\MenVCaT", 200),
 
107
  {
 
108
    MENU_ITEM_LAST("\\MenVCaTED")
 
109
  }
 
110
};
 
111
 
 
112
static struct MenuDisplayVideoCache {
 
113
  disp_desc_t dd;
 
114
  const char *values[1];
 
115
} MenuDisplayVideoCache = {
 
116
  {NULL, {CONF_WIN_VIDEO, 0},
 
117
    (RO_MenuHead*)&MenuVideoCache, 1, DISP_DESC_BITFIELD, 0},
 
118
  {Rsrc_TEDCache}
 
119
};
 
120
 
 
121
 
 
122
static void plus4ui_grey_out_machine_icons(void)
 
123
{
 
124
  ui_set_icons_grey(NULL, conf_grey_xplus4, 0);
 
125
}
 
126
 
 
127
static void plus4ui_bind_video_cache_menu(void)
 
128
{
 
129
  ConfigMenus[CONF_MENU_VIDCACHE].menu = (RO_MenuHead*)&MenuVideoCache;
 
130
  ConfigMenus[CONF_MENU_VIDCACHE].desc = (disp_desc_t*)&MenuDisplayVideoCache;
 
131
}
 
132
 
 
133
static const char *plus4ui_get_machine_ibar_icon(void)
 
134
{
 
135
  return IBarIconName;
 
136
}
 
137
 
 
138
 
 
139
int plus4ui_init(void)
 
140
{
 
141
  wimp_msg_desc *msg;
 
142
 
 
143
  WimpTaskName = "Vice Plus4";
 
144
  plus4ui_bind_video_cache_menu();
 
145
  msg = ui_emulator_init_prologue(plus4ui_get_machine_ibar_icon());
 
146
  if (msg != NULL)
 
147
  {
 
148
    ui_emulator_init_epilogue(msg);
 
149
    plus4ui_grey_out_machine_icons();
 
150
    return 0;
 
151
  }
 
152
  return -1;
 
153
}
 
154
 
 
155
void plus4ui_shutdown(void)
 
156
{
93
157
}
94
158
 
95
159
int plus4_kbd_init(void)
100
164
  kbd_load_keymap(NULL, 0);
101
165
  return kbd_init();
102
166
}
103
 
 
104
 
 
105
 
 
106
 
/* dummy stubs for linker */
107
 
char *pet_get_keyboard_name(void)
108
 
{
109
 
  return NULL;
110
 
}
111
 
 
112
 
int pet_set_model(const char *name, void *extra)
113
 
{
114
 
  return 0;
115
 
}
116
 
 
117
 
char *cbm2_get_keyboard_name(void)
118
 
{
119
 
  return NULL;
120
 
}
121
 
 
122
 
int cbm2_set_model(const char *name, void *extra)
123
 
{
124
 
  return 0;
125
 
}