ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/EmulatorView.h
Revision: 1.2
Committed: 2002-05-30T12:46:15Z (22 years, 1 month ago) by nigel
Content type: text/plain
Branch: MAIN
Changes since 1.1: +5 -2 lines
Log Message:
New way of storing if emulator is in full screen mode

File Contents

# Content
1 /*
2 * EmulatorView.h - Custom NSView for Basilisk II window input & output
3 *
4 * $Id: EmulatorView.h,v 1.1 2002/03/16 04:00:16 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 bitmap;
34 #endif
35 #ifdef NSBITMAP
36 NSBitmapImageRep *bitmap;
37 #endif
38
39 #ifdef CGDRAWBITMAP
40 void *bitmap;
41 short bps, spp, bpp;
42 int bytesPerRow;
43 BOOL isPlanar, hasAlpha;
44 #endif
45 short x, y;
46
47 BOOL drawView, // Set when the bitmap is all set up
48 // and ready to display
49 fullScreen; // Is this Emulator running in a full screen?
50 }
51
52 - (void) benchmark;
53 - (NSData *) TIFFrep; // Used for snapshot function
54
55 // Enable display of, and drawing into, the view
56 #ifdef NSBITMAP
57 - (void) readyToDraw: (NSBitmapImageRep *) theBitmap
58 imageWidth: (short) width
59 imageHeight: (short) height;
60 #endif
61 #ifdef CGIMAGEREF
62 - (void) readyToDraw: (CGImageRef) image
63 imageWidth: (short) width
64 imageHeight: (short) height;
65 #endif
66 #ifdef CGDRAWBITMAP
67 - (void) readyToDraw: (void *) theBitmap
68 width: (short) width
69 height: (short) height
70 bps: (short) bitsPerSample
71 spp: (short) samplesPerPixel
72 bpp: (short) bitsPerPixel
73 bpr: (int) bpr
74 isPlanar: (BOOL) planar
75 hasAlpha: (BOOL) alpha;
76 #endif
77
78 - (void) disableDrawing;
79 - (void) startedFullScreen;
80
81 - (short) width;
82 - (short) height;
83
84 - (BOOL) isFullScreen;
85 - (BOOL) mouseInView: (NSEvent *) event;
86 - (BOOL) mouseInView;
87 - (BOOL) processMouseMove: (NSEvent *) event;
88
89 #ifdef CGDRAWBITMAP
90 - (void) CGDrawBitmap;
91 #endif
92
93 #ifdef CGIMAGEREF
94 void cgDrawInto(NSRect rect, CGImageRef bitmap);
95 #endif
96
97 @end