ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/EmulatorView.h
Revision: 1.4
Committed: 2002-12-18T11:53:11Z (21 years, 6 months ago) by nigel
Content type: text/plain
Branch: MAIN
Changes since 1.3: +4 -3 lines
Log Message:
Allow randomise to work with different drawing strategies

File Contents

# Content
1 /*
2 * EmulatorView.h - Custom NSView for Basilisk II window input & output
3 *
4 * $Id: EmulatorView.h,v 1.3 2002/06/05 10:18:51 nigel Exp $
5 *
6 * Basilisk II (C) 1997-2002 Christian Bauer
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23 #ifdef NSBITMAP
24 #import <AppKit/NSBitmapImageRep.h>
25 #endif
26
27 #import <AppKit/NSView.h>
28
29
30 @interface EmulatorView : NSView
31 {
32 #ifdef CGIMAGEREF
33 CGImageRef cgImgRep;
34 #endif
35 #ifdef NSBITMAP
36 NSBitmapImageRep *bitmap;
37 #endif
38 #ifdef CGDRAWBITMAP
39 void *bitmap;
40 short bps, spp, bpp;
41 int bytesPerRow;
42 BOOL isPlanar, hasAlpha;
43 #endif
44 float numBytes;
45
46 short x, y;
47
48 BOOL drawView, // Set when the bitmap is all set up
49 // and ready to display
50 fullScreen; // Is this Emulator using the whole screen?
51
52 NSRect displayBox; // Cached dimensions of the screen
53 int screen_height;
54 }
55
56 - (void) benchmark;
57 - (NSData *) TIFFrep; // Used for snapshot function
58
59 // Enable display of, and drawing into, the view
60 #ifdef NSBITMAP
61 - (void) readyToDraw: (NSBitmapImageRep *) theBitmap
62 imageWidth: (short) width
63 imageHeight: (short) height;
64 #endif
65 #ifdef CGIMAGEREF
66 - (void) readyToDraw: (CGImageRef) image
67 imageWidth: (short) width
68 imageHeight: (short) height;
69 #endif
70 #ifdef CGDRAWBITMAP
71 - (void) readyToDraw: (void *) theBitmap
72 width: (short) width
73 height: (short) height
74 bps: (short) bitsPerSample
75 spp: (short) samplesPerPixel
76 bpp: (short) bitsPerPixel
77 bpr: (int) bpr
78 isPlanar: (BOOL) planar
79 hasAlpha: (BOOL) alpha;
80 #endif
81
82 - (void) disableDrawing;
83 - (void) startedFullScreen: (CGDirectDisplayID) theDisplay;
84
85 - (short) width;
86 - (short) height;
87
88 - (BOOL) isFullScreen;
89 - (BOOL) mouseInView: (NSEvent *) event;
90 - (BOOL) mouseInView;
91 - (BOOL) processMouseMove: (NSEvent *) event;
92
93 #ifdef CGDRAWBITMAP
94 - (void) CGDrawBitmap;
95 #endif
96
97 #ifdef CGIMAGEREF
98 void cgDrawInto(NSRect rect, CGImageRef bitmap);
99 #endif
100
101 @end