~ubuntu-branches/ubuntu/raring/vice/raring

« back to all changes in this revision

Viewing changes to src/arch/amigaos/mui/uimouse.c

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2009-03-31 00:37:15 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20090331003715-mzclchtl0dp7fcl0
Tags: upstream-2.1.dfsg
ImportĀ upstreamĀ versionĀ 2.1.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * uimouse.c
 
3
 *
 
4
 * Written by
 
5
 *  Marco van den Heuvel <blackystardust68@yahoo.com>
 
6
 *
 
7
 * This file is part of VICE, the Versatile Commodore Emulator.
 
8
 * See README for copyright notice.
 
9
 *
 
10
 *  This program is free software; you can redistribute it and/or modify
 
11
 *  it under the terms of the GNU General Public License as published by
 
12
 *  the Free Software Foundation; either version 2 of the License, or
 
13
 *  (at your option) any later version.
 
14
 *
 
15
 *  This program is distributed in the hope that it will be useful,
 
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 *  GNU General Public License for more details.
 
19
 *
 
20
 *  You should have received a copy of the GNU General Public License
 
21
 *  along with this program; if not, write to the Free Software
 
22
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 
23
 *  02111-1307  USA.
 
24
 *
 
25
 */
 
26
 
 
27
#include "vice.h"
 
28
#ifdef AMIGA_M68K
 
29
#define _INLINE_MUIMASTER_H
 
30
#endif
 
31
#include "mui.h"
 
32
 
 
33
#include "uimouse.h"
 
34
#include "intl.h"
 
35
#include "translate.h"
 
36
 
 
37
static int ui_mouse_type_translate[] = {
 
38
  IDS_MOUSE_1351,
 
39
  IDS_MOUSE_NEOS,
 
40
  IDS_MOUSE_AMIGA,
 
41
  0
 
42
};
 
43
 
 
44
static char *ui_mouse_type[countof(ui_mouse_type_translate)];
 
45
 
 
46
static const int ui_mouse_type_values[] = {
 
47
  0,
 
48
  1,
 
49
  2,
 
50
  -1
 
51
};
 
52
 
 
53
static int ui_mouse_port_translate[] = {
 
54
  IDS_JOY_PORT_1,
 
55
  IDS_JOY_PORT_2,
 
56
  0
 
57
};
 
58
 
 
59
static char *ui_mouse_port[countof(ui_mouse_port_translate)];
 
60
 
 
61
static const int ui_mouse_port_values[] = {
 
62
  1,
 
63
  2,
 
64
  -1
 
65
};
 
66
 
 
67
static ui_to_from_t ui_to_from[] = {
 
68
  { NULL, MUI_TYPE_CYCLE, "Mousetype", ui_mouse_type, ui_mouse_type_values },
 
69
  { NULL, MUI_TYPE_CYCLE, "Mouseport", ui_mouse_port, ui_mouse_port_values },
 
70
  UI_END /* mandatory */
 
71
};
 
72
 
 
73
static APTR build_gui(void)
 
74
{
 
75
  return GroupObject,
 
76
    CYCLE(ui_to_from[0].object, translate_text(IDS_MOUSE_TYPE), ui_mouse_type)
 
77
    CYCLE(ui_to_from[1].object, translate_text(IDS_MOUSE_PORT), ui_mouse_port)
 
78
  End;
 
79
}
 
80
 
 
81
void ui_mouse_settings_dialog(void)
 
82
{
 
83
  intl_convert_mui_table(ui_mouse_type_translate, ui_mouse_type);
 
84
  intl_convert_mui_table(ui_mouse_port_translate, ui_mouse_port);
 
85
  mui_show_dialog(build_gui(), translate_text(IDS_MOUSE_SETTINGS), ui_to_from);
 
86
}