ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/EmulatorView.h
Revision: 1.1
Committed: 2002-03-16T04:00:16Z (22 years, 3 months ago) by nigel
Content type: text/plain
Branch: MAIN
CVS Tags: nigel-build-10
Log Message:
Initial revision of Mac OS X port code. Uses Objective-C++. Needs Mac OS 10.1

File Contents

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