ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/EmulatorView.h
Revision: 1.10
Committed: 2008-01-01T09:40:32Z (16 years, 5 months ago) by gbeauche
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +2 -2 lines
Log Message:
Happy New Year!

File Contents

# User Rev Content
1 nigel 1.1 /*
2     * EmulatorView.h - Custom NSView for Basilisk II window input & output
3     *
4 gbeauche 1.10 * $Id: EmulatorView.h,v 1.9 2005/01/30 21:42:13 gbeauche Exp $
5 nigel 1.1 *
6 gbeauche 1.10 * Basilisk II (C) 1997-2008 Christian Bauer
7 nigel 1.1 *
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 nigel 1.4 CGImageRef cgImgRep;
34 nigel 1.1 #endif
35     #ifdef NSBITMAP
36     NSBitmapImageRep *bitmap;
37 nigel 1.6 #else
38     void *bitmap;
39 nigel 1.1 #endif
40     #ifdef CGDRAWBITMAP
41     short bps, spp, bpp;
42     int bytesPerRow;
43     BOOL isPlanar, hasAlpha;
44     #endif
45 nigel 1.4 float numBytes;
46    
47 nigel 1.1 short x, y;
48    
49 nigel 1.2 BOOL drawView, // Set when the bitmap is all set up
50 nigel 1.1 // and ready to display
51 nigel 1.3 fullScreen; // Is this Emulator using the whole screen?
52    
53     NSRect displayBox; // Cached dimensions of the screen
54 nigel 1.5
55     int screen_height; // Height of the screen with the key window
56 nigel 1.1 }
57    
58     - (void) benchmark;
59     - (NSData *) TIFFrep; // Used for snapshot function
60    
61     // Enable display of, and drawing into, the view
62     #ifdef NSBITMAP
63     - (void) readyToDraw: (NSBitmapImageRep *) theBitmap
64     imageWidth: (short) width
65     imageHeight: (short) height;
66     #endif
67     #ifdef CGIMAGEREF
68     - (void) readyToDraw: (CGImageRef) image
69 nigel 1.6 bitmap: (void *) theBitmap
70 nigel 1.1 imageWidth: (short) width
71     imageHeight: (short) height;
72     #endif
73     #ifdef CGDRAWBITMAP
74     - (void) readyToDraw: (void *) theBitmap
75     width: (short) width
76     height: (short) height
77     bps: (short) bitsPerSample
78     spp: (short) samplesPerPixel
79     bpp: (short) bitsPerPixel
80     bpr: (int) bpr
81     isPlanar: (BOOL) planar
82     hasAlpha: (BOOL) alpha;
83     #endif
84    
85     - (void) disableDrawing;
86 nigel 1.3 - (void) startedFullScreen: (CGDirectDisplayID) theDisplay;
87 nigel 1.7
88     - (void) blacken;
89     - (void) clear;
90 nigel 1.1
91     - (short) width;
92     - (short) height;
93    
94 nigel 1.2 - (BOOL) isFullScreen;
95 nigel 1.1 - (BOOL) mouseInView: (NSEvent *) event;
96     - (BOOL) mouseInView;
97 nigel 1.5 - (void) fullscreenMouseMove;
98 nigel 1.1 - (BOOL) processMouseMove: (NSEvent *) event;
99    
100     #ifdef CGDRAWBITMAP
101     - (void) CGDrawBitmap;
102     #endif
103    
104     #ifdef CGIMAGEREF
105     void cgDrawInto(NSRect rect, CGImageRef bitmap);
106     #endif
107    
108     @end