Mercurial > sdl-ios-xcode
annotate Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/MyController.h @ 3023:d72a0dd80e8b
DirectFB cleanups & simple window manager
- use SDL_getenv, not getenv ...
- no more support for 0.9.25 - not even mentioned any longer on directfb.org
- fix fullscreen issues
- add a simple window manager unless the directfb team comes up with a working wm.
The driver has support for a very, very basic window manager you may
want to use when runnning with "wm=default". Use
export SDL_DIRECTFB_WM=1
to enable basic window borders including icon support. In order to have the window title rendered,
you need to have the following font installed:
/usr/share/fonts/truetype/freefont/FreeSans.ttf
author | Couriersud <couriersud@arcor.de> |
---|---|
date | Sun, 11 Jan 2009 23:49:23 +0000 |
parents | 4d2d0548f5b2 |
children |
rev | line source |
---|---|
2207
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 // |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 // MyController.h |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 // SDL Custom Cocoa App |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 // |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 // Created by Darrell Walisser on Fri Jul 18 2003. |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved. |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 // |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 #import <Cocoa/Cocoa.h> |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 #import "SDL.h" |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 |
2220
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
12 extern id gController; // instance of this class from nib |
2207
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 |
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 // Declare SDL_QuartzWindowDelegate (defined in SDL.framework) |
2220
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
15 @interface SDL_QuartzWindowDelegate : NSObject |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
16 @end |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
17 |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
18 @interface MyController : NSObject |
2215 | 19 { |
2207
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 // Interface Builder Outlets |
2220
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
21 IBOutlet id _framesPerSecond; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
22 IBOutlet id _numSprites; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
23 IBOutlet id _window; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
24 IBOutlet id _view; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
25 |
2207
d63e9f5944ae
Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 // Private instance variables |
2220
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
27 int _nSprites; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
28 int _max_speed; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
29 int _doFlip; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
30 Uint8* _mem; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
31 |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
32 SDL_Surface* _screen; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
33 SDL_Surface* _sprite; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
34 SDL_Rect* _sprite_rects; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
35 SDL_Rect* _positions; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
36 SDL_Rect* _velocities; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
37 int _sprites_visible; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
38 Uint16 _sprite_w, _sprite_h; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
39 |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
40 int _mouse_x, _mouse_y; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
41 } |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
42 // Interface Builder Actions |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
43 - (IBAction)changeNumberOfSprites:(id)sender; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
44 - (IBAction)selectUpdateMode:(id)sender; |
4d2d0548f5b2
Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents:
2215
diff
changeset
|
45 @end |
2213 | 46 |