File: viceapplication.h

package info (click to toggle)
vice 2.3.dfsg-4
  • links: PTS
  • area: contrib
  • in suites: wheezy
  • size: 59,228 kB
  • sloc: ansic: 383,974; cpp: 19,069; sh: 12,805; objc: 11,657; makefile: 6,875; perl: 2,492; yacc: 813; lex: 370; asm: 25
file content (119 lines) | stat: -rw-r--r-- 3,757 bytes parent folder | download | duplicates (3)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
 * viceapplication.h - VICEApplication - main application class
 *
 * Written by
 *  Christian Vogelgsang <chris@vogelgsang.org>
 *
 * This file is part of VICE, the Versatile Commodore Emulator.
 * See README for copyright notice.
 *
 *  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., 59 Temple Place, Suite 330, Boston, MA
 *  02111-1307  USA.
 *
 */

#import <Cocoa/Cocoa.h>
#import "viceapplicationprotocol.h"
#import "vicemachineprotocol.h"
#import "consolewindow.h"
#import "controlwindow.h"
#import "registerwindowcontroller.h"
#import "memorywindowcontroller.h"
#import "disassemblywindowcontroller.h"
#import "iotreewindowcontroller.h"

@class VICEAppController;

@interface VICEApplication : NSApplication <VICEApplicationProtocol, LineInputSubmitter>
{
    NSMutableArray *argsArray;
    BOOL postponeAutostart;
    
    id<VICEMachineProtocol> machine;
    BOOL canTerminate;
    
    // log window
    VICEWindowController *consoleWC;
    ConsoleWindow *consoleWindow;
    int canvasCount;
    int currentCanvasId;
    int canvasStartXPos;
    
    // monitor window
    VICEWindowController *monitorWC;
    ConsoleWindow *monitorWindow;
    NSWindow *oldKeyWindow;
    BOOL closeMonitor;
    BOOL inMonitor;
    
    // control window
    VICEWindowController *controlWC;

    // debugger windows
    RegisterWindowController *cpuRegisterWC;    
    MemoryWindowController   *cpuMemoryWC;
    DisassemblyWindowController *cpuDisassemblyWC;
    IOTreeWindowController *cpuIOTreeWC;
    
    IBOutlet VICEAppController *appController;
    IBOutlet NSMenu *debuggerWindowsMenu;
}

// start application with command line arguments
- (void)runWithArgC:(int)argc argV:(char**)argv;
// application is ready with startup
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification;
// open a file on start up or drag file while running
- (BOOL)application:(NSApplication*)app openFile:(NSString*)file;

// ask for quit
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app;
// actually quit and stop machine
- (void)applicationWillTerminate:(NSNotification*)notification;

// access the VICEMachine proxy object in the main thread
- (id<VICEMachineProtocol>)machine;
// convenience class message for querying the proxy machine object
+ (id<VICEMachineProtocol>)theMachine;

// access the VICEMachineController proxy object in the main thread
- (VICEMachineController *)machineController;
//! convenience class message
+ (VICEMachineController *)theMachineController;

// show/hide the console window
- (void)toggleConsoleWindow:(id)sender;
// show/hide the monitor window
- (void)toggleMonitorWindow:(id)sender;
// show/hide the control window
- (void)toggleControlWindow:(id)sender;

// show error message
+ (void)runErrorMessage:(NSString *)message;
// show warning message
+ (void)runWarningMessage:(NSString *)message;

// get the app controller
- (VICEAppController *)appController;
// get the app controller
+ (VICEAppController *)theAppController;

// report current canvas id from VICEGLView
+ (void)setCurrentCanvasId:(int)canvasId;
// get current canvas id
+ (int)currentCanvasId;

@end