ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/EmulatorView.h
Revision: 1.5
Committed: 2003-03-11T11:27:20Z (21 years, 8 months ago) by nigel
Content type: text/plain
Branch: MAIN
Changes since 1.4: +4 -2 lines
Log Message:
Corrected mouse co-ordinate processing after full screen resizing,
simplified mouse movement processing for full screen, added a few comments.

File Contents

# Content
1 /*
2 * EmulatorView.h - Custom NSView for Basilisk II window input & output
3 *
4 * $Id: EmulatorView.h,v 1.4 2002/12/18 11:53:11 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
54 int screen_height; // Height of the screen with the key window
55 }
56
57 - (void) benchmark;
58 - (NSData *) TIFFrep; // Used for snapshot function
59
60 // Enable display of, and drawing into, the view
61 #ifdef NSBITMAP
62 - (void) readyToDraw: (NSBitmapImageRep *) theBitmap
63 imageWidth: (short) width
64 imageHeight: (short) height;
65 #endif
66 #ifdef CGIMAGEREF
67 - (void) readyToDraw: (CGImageRef) image
68 imageWidth: (short) width
69 imageHeight: (short) height;
70 #endif
71 #ifdef CGDRAWBITMAP
72 - (void) readyToDraw: (void *) theBitmap
73 width: (short) width
74 height: (short) height
75 bps: (short) bitsPerSample
76 spp: (short) samplesPerPixel
77 bpp: (short) bitsPerPixel
78 bpr: (int) bpr
79 isPlanar: (BOOL) planar
80 hasAlpha: (BOOL) alpha;
81 #endif
82
83 - (void) disableDrawing;
84 - (void) startedFullScreen: (CGDirectDisplayID) theDisplay;
85
86 - (short) width;
87 - (short) height;
88
89 - (BOOL) isFullScreen;
90 - (BOOL) mouseInView: (NSEvent *) event;
91 - (BOOL) mouseInView;
92 - (void) fullscreenMouseMove;
93 - (BOOL) processMouseMove: (NSEvent *) event;
94
95 #ifdef CGDRAWBITMAP
96 - (void) CGDrawBitmap;
97 #endif
98
99 #ifdef CGIMAGEREF
100 void cgDrawInto(NSRect rect, CGImageRef bitmap);
101 #endif
102
103 @end