~ubuntu-branches/ubuntu/hardy/vice/hardy

« back to all changes in this revision

Viewing changes to src/arch/beos/petui.cc

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2007-10-07 07:05:46 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071007070546-81yy0twlka7p2t0e
Tags: 1.22-1
* New upstream version (closes: #428280).
* Correct link to HTML documentation in manpage (closes: #409567).
* Fix most packaging mistakes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "vice.h"
28
28
 
29
 
#include <Message.h>
 
29
#include <Alert.h>
 
30
#include <Application.h>
 
31
#include <FilePanel.h>
 
32
#include <Menu.h>
 
33
#include <MenuBar.h>
 
34
#include <MenuItem.h>
 
35
#include <ScrollView.h>
 
36
#include <TextView.h>
 
37
#include <View.h>
 
38
#include <Window.h>
 
39
#include <signal.h>
30
40
#include <stdio.h>
 
41
#include <stdlib.h>
 
42
 
 
43
#if defined(__BEOS__) && defined(WORDS_BIGENDIAN)
 
44
#include <string.h>
 
45
#endif
31
46
 
32
47
extern "C" {
 
48
#include "archdep.h"
33
49
#include "constants.h"
34
 
#include "petui.h"
 
50
#include "resources.h"
 
51
#include "statusbar.h"
 
52
#include "types.h"
35
53
#include "ui.h"
 
54
#include "ui_file.h"
36
55
#include "ui_pet.h"
 
56
#include "util.h"
 
57
#include "viceapp.h"
 
58
#include "vicewindow.h"
37
59
}
38
60
 
 
61
extern ViceWindow *windowlist[];
 
62
 
39
63
ui_menu_toggle  pet_ui_menu_toggles[]={
40
64
    { "CrtcDoubleSize", MENU_TOGGLE_DOUBLESIZE },
41
65
    { "CrtcDoubleScan", MENU_TOGGLE_DOUBLESCAN },
42
66
    { "CrtcVideoCache", MENU_TOGGLE_VIDEOCACHE },
43
67
    { "PETREU", MENU_TOGGLE_PETREU },
 
68
    { "SidCart", MENU_TOGGLE_SIDCART },
 
69
    { "SidFilters", MENU_TOGGLE_SIDCART_FILTERS },
44
70
    { NULL, 0 }
45
71
};
46
72
 
47
73
ui_res_possible_values PETREUSize[] = {
48
74
        {128, MENU_PETREU_SIZE_128},
 
75
        {512, MENU_PETREU_SIZE_512},
 
76
        {1024, MENU_PETREU_SIZE_1024},
 
77
        {2048, MENU_PETREU_SIZE_2048},
 
78
        {-1, 0}
 
79
};
 
80
 
 
81
ui_res_possible_values pet_SIDCARTModel[] = {
 
82
        {0, MENU_SIDCART_MODEL_6581},
 
83
        {1, MENU_SIDCART_MODEL_8580},
 
84
        {-1, 0}
 
85
};
 
86
 
 
87
ui_res_possible_values pet_SIDCARTAddress[] = {
 
88
        {0, MENU_SIDCART_ADDRESS_1},
 
89
        {1, MENU_SIDCART_ADDRESS_2},
 
90
        {-1, 0}
 
91
};
 
92
 
 
93
ui_res_possible_values pet_SIDCARTClock[] = {
 
94
        {0, MENU_SIDCART_CLOCK_C64},
 
95
        {1, MENU_SIDCART_CLOCK_NATIVE},
49
96
        {-1, 0}
50
97
};
51
98
 
52
99
void pet_ui_specific(void *msg, void *window)
53
100
{
54
101
    switch (((BMessage*)msg)->what) {
55
 
      case MENU_PET_SETTINGS:
56
 
        ui_pet();
57
 
        break;
58
 
      default: ;
 
102
        case MENU_PET_SETTINGS:
 
103
            ui_pet();
 
104
            break;
 
105
        case MENU_PETREU_FILE:
 
106
            ui_select_file(windowlist[0]->savepanel,PETREU_FILE,(void*)0);
 
107
            break;
 
108
 
 
109
        default: ;
59
110
    }
60
111
}
61
112
 
62
113
ui_res_value_list pet_ui_res_values[] = {
63
114
    {"PETREUsize", PETREUSize},
 
115
    {"SidModel", pet_SIDCARTModel},
 
116
    {"SidAddress", pet_SIDCARTAddress},
 
117
    {"SidClock", pet_SIDCARTClock},
64
118
    {NULL,NULL}
65
119
};
66
120
 
 
121
extern "C" {
67
122
int petui_init(void)
68
123
{
69
124
    ui_register_machine_specific(pet_ui_specific);
77
132
{
78
133
}
79
134
 
 
135
}
 
136