ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/EmulatorView.h
Revision: 1.3
Committed: 2002-06-05T10:18:51Z (22 years ago) by nigel
Content type: text/plain
Branch: MAIN
Changes since 1.2: +6 -3 lines
Log Message:
Better mouse event control for full screen mode

File Contents

# User Rev Content
1 nigel 1.1 /*
2     * EmulatorView.h - Custom NSView for Basilisk II window input & output
3     *
4 nigel 1.3 * $Id: EmulatorView.h,v 1.2 2002/05/30 12:46:15 nigel Exp $
5 nigel 1.1 *
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 nigel 1.2 BOOL drawView, // Set when the bitmap is all set up
48 nigel 1.1 // and ready to display
49 nigel 1.3 fullScreen; // Is this Emulator using the whole screen?
50    
51     NSRect displayBox; // Cached dimensions of the screen
52     int screen_height;
53 nigel 1.1 }
54    
55     - (void) benchmark;
56     - (NSData *) TIFFrep; // Used for snapshot function
57    
58     // Enable display of, and drawing into, the view
59     #ifdef NSBITMAP
60     - (void) readyToDraw: (NSBitmapImageRep *) theBitmap
61     imageWidth: (short) width
62     imageHeight: (short) height;
63     #endif
64     #ifdef CGIMAGEREF
65     - (void) readyToDraw: (CGImageRef) image
66     imageWidth: (short) width
67     imageHeight: (short) height;
68     #endif
69     #ifdef CGDRAWBITMAP
70     - (void) readyToDraw: (void *) theBitmap
71     width: (short) width
72     height: (short) height
73     bps: (short) bitsPerSample
74     spp: (short) samplesPerPixel
75     bpp: (short) bitsPerPixel
76     bpr: (int) bpr
77     isPlanar: (BOOL) planar
78     hasAlpha: (BOOL) alpha;
79     #endif
80    
81     - (void) disableDrawing;
82 nigel 1.3 - (void) startedFullScreen: (CGDirectDisplayID) theDisplay;
83 nigel 1.1
84     - (short) width;
85     - (short) height;
86    
87 nigel 1.2 - (BOOL) isFullScreen;
88 nigel 1.1 - (BOOL) mouseInView: (NSEvent *) event;
89     - (BOOL) mouseInView;
90     - (BOOL) processMouseMove: (NSEvent *) event;
91    
92     #ifdef CGDRAWBITMAP
93     - (void) CGDrawBitmap;
94     #endif
95    
96     #ifdef CGIMAGEREF
97     void cgDrawInto(NSRect rect, CGImageRef bitmap);
98     #endif
99    
100     @end