gosu 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gosu/Bitmap.hpp +3 -3
- data/Gosu/Directories.hpp +6 -3
- data/Gosu/Gosu.hpp +0 -1
- data/Gosu/GraphicsBase.hpp +12 -8
- data/Gosu/Input.hpp +5 -16
- data/Gosu/Platform.hpp +1 -0
- data/Gosu/Version.hpp +3 -5
- data/Gosu/Window.hpp +7 -8
- data/README.txt +3 -3
- data/ext/gosu/extconf.rb +17 -16
- data/ext/gosu/gosu_wrap.cxx +59 -58
- data/ext/gosu/gosu_wrap.h +1 -1
- data/rdoc/gosu.rb +285 -283
- data/src/{MacUtility.hpp → AppleUtility.hpp} +24 -42
- data/src/Audio/ALChannelManagement.hpp +1 -1
- data/src/Audio/{AudioOpenAL.cpp → Audio.cpp} +6 -7
- data/src/Audio/Audio.mm +1 -0
- data/src/Audio/AudioFile.hpp +2 -2
- data/src/Audio/AudioToolboxFile.hpp +5 -20
- data/src/Audio/OggFile.hpp +44 -56
- data/src/Audio/SndFile.hpp +2 -2
- data/src/Bitmap/Bitmap.cpp +98 -2
- data/src/Bitmap/BitmapIO.cpp +156 -0
- data/src/DirectoriesApple.mm +76 -0
- data/src/DirectoriesUnix.cpp +5 -12
- data/src/DirectoriesWin.cpp +5 -0
- data/src/Graphics/BlockAllocator.hpp +2 -2
- data/src/Graphics/ClipRectStack.hpp +2 -2
- data/src/Graphics/Common.hpp +2 -2
- data/src/Graphics/DrawOp.hpp +2 -2
- data/src/Graphics/DrawOpQueue.hpp +2 -2
- data/src/Graphics/Graphics.cpp +7 -2
- data/src/Graphics/LargeImageData.cpp +6 -6
- data/src/Graphics/LargeImageData.hpp +3 -3
- data/src/Graphics/Macro.hpp +2 -2
- data/src/Graphics/RenderState.hpp +2 -2
- data/src/Graphics/Resolution.cpp +1 -1
- data/src/Graphics/TexChunk.hpp +2 -2
- data/src/Graphics/Texture.cpp +21 -16
- data/src/Graphics/Texture.hpp +7 -5
- data/src/Graphics/TransformStack.hpp +2 -2
- data/src/Iconv.hpp +2 -2
- data/src/Input/Input.cpp +3 -1
- data/src/Input/{InputTouch.mm → InputUIKit.mm} +32 -26
- data/src/Input/TextInput.cpp +1 -1
- data/src/Text/FormattedString.hpp +2 -2
- data/src/Text/TextApple.mm +8 -8
- data/src/Text/TextMac.cpp +1 -1
- data/src/Text/TextUnix.cpp +1 -1
- data/src/UIKit/GosuAppDelegate.h +8 -0
- data/src/UIKit/GosuAppDelegate.mm +24 -0
- data/src/UIKit/GosuGLView.h +8 -0
- data/src/UIKit/GosuGLView.mm +130 -0
- data/src/UIKit/GosuViewController.h +13 -0
- data/src/UIKit/GosuViewController.mm +214 -0
- data/src/UtilityApple.mm +5 -18
- data/src/Window.cpp +1 -3
- data/src/WindowUIKit.mm +124 -0
- data/src/stb_image.h +6437 -0
- data/src/stb_image_write.h +730 -0
- data/src/stb_vorbis.c +5459 -0
- metadata +18 -26
- data/Gosu/Sockets.hpp +0 -156
- data/src/Audio/AudioOpenAL.mm +0 -1
- data/src/Bitmap/BitmapApple.mm +0 -226
- data/src/Bitmap/BitmapBMP.cpp +0 -79
- data/src/Bitmap/BitmapColorKey.cpp +0 -50
- data/src/Bitmap/BitmapFreeImage.cpp +0 -174
- data/src/Bitmap/BitmapGDIplus.cpp +0 -212
- data/src/Bitmap/BitmapUtils.cpp +0 -76
- data/src/DirectoriesMac.mm +0 -38
- data/src/DirectoriesTouch.mm +0 -38
- data/src/GosuView.hpp +0 -15
- data/src/GosuView.mm +0 -208
- data/src/Input/AccelerometerReader.hpp +0 -10
- data/src/Input/AccelerometerReader.mm +0 -31
- data/src/Sockets/CommSocket.cpp +0 -305
- data/src/Sockets/ListenerSocket.cpp +0 -59
- data/src/Sockets/MessageSocket.cpp +0 -128
- data/src/Sockets/Socket.cpp +0 -145
- data/src/Sockets/Socket.hpp +0 -66
- data/src/WindowTouch.mm +0 -243
- data/src/X11vroot.h +0 -118
data/src/X11vroot.h
DELETED
@@ -1,118 +0,0 @@
|
|
1
|
-
/*****************************************************************************/
|
2
|
-
/** Copyright 1991 by Andreas Stolcke **/
|
3
|
-
/** Copyright 1990 by Solbourne Computer Inc. **/
|
4
|
-
/** Longmont, Colorado **/
|
5
|
-
/** **/
|
6
|
-
/** All Rights Reserved **/
|
7
|
-
/** **/
|
8
|
-
/** Permission to use, copy, modify, and distribute this software and **/
|
9
|
-
/** its documentation for any purpose and without fee is hereby **/
|
10
|
-
/** granted, provided that the above copyright notice appear in all **/
|
11
|
-
/** copies and that both that copyright notice and this permis- **/
|
12
|
-
/** sion notice appear in supporting documentation, and that the **/
|
13
|
-
/** name of Solbourne not be used in advertising **/
|
14
|
-
/** in publicity pertaining to distribution of the software without **/
|
15
|
-
/** specific, written prior permission. **/
|
16
|
-
/** **/
|
17
|
-
/** ANDREAS STOLCKE AND SOLBOURNE COMPUTER INC. DISCLAIMS ALL WARRANTIES **/
|
18
|
-
/** WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF **/
|
19
|
-
/** MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ANDREAS STOLCKE **/
|
20
|
-
/** OR SOLBOURNE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL **/
|
21
|
-
/** DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
|
22
|
-
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
|
23
|
-
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
|
24
|
-
/** OR PERFORMANCE OF THIS SOFTWARE. **/
|
25
|
-
/*****************************************************************************/
|
26
|
-
/*
|
27
|
-
* vroot.h -- Virtual Root Window handling header file
|
28
|
-
*
|
29
|
-
* This header file redefines the X11 macros RootWindow and DefaultRootWindow,
|
30
|
-
* making them look for a virtual root window as provided by certain `virtual'
|
31
|
-
* window managers like swm and tvtwm. If none is found, the ordinary root
|
32
|
-
* window is returned, thus retaining backward compatibility with standard
|
33
|
-
* window managers.
|
34
|
-
* The function implementing the virtual root lookup remembers the result of
|
35
|
-
* its last invocation to avoid overhead in the case of repeated calls
|
36
|
-
* on the same display and screen arguments.
|
37
|
-
* The lookup code itself is taken from Tom LaStrange's ssetroot program.
|
38
|
-
*
|
39
|
-
* Most simple root window changing X programs can be converted to using
|
40
|
-
* virtual roots by just including
|
41
|
-
*
|
42
|
-
* #include <X11/vroot.h>
|
43
|
-
*
|
44
|
-
* after all the X11 header files. It has been tested on such popular
|
45
|
-
* X clients as xphoon, xfroot, xloadimage, and xaqua.
|
46
|
-
* It also works with the core clients xprop, xwininfo, xwd, and editres
|
47
|
-
* (and is necessary to get those clients working under tvtwm).
|
48
|
-
* It does NOT work with xsetroot; get the xsetroot replacement included in
|
49
|
-
* the tvtwm distribution instead.
|
50
|
-
*
|
51
|
-
* Andreas Stolcke <stolcke@ICSI.Berkeley.EDU>, 9/7/90
|
52
|
-
* - replaced all NULL's with properly cast 0's, 5/6/91
|
53
|
-
* - free children list (suggested by Mark Martin <mmm@cetia.fr>), 5/16/91
|
54
|
-
* - include X11/Xlib.h and support RootWindowOfScreen, too 9/17/91
|
55
|
-
*/
|
56
|
-
|
57
|
-
#ifndef _VROOT_H_
|
58
|
-
#define _VROOT_H_
|
59
|
-
|
60
|
-
#include <X11/X.h>
|
61
|
-
#include <X11/Xatom.h>
|
62
|
-
#include <X11/Xlib.h>
|
63
|
-
|
64
|
-
static Window
|
65
|
-
VirtualRootWindowOfScreen(Screen* screen)
|
66
|
-
{
|
67
|
-
static Screen *save_screen = (Screen *)0;
|
68
|
-
static Window root = (Window)0;
|
69
|
-
|
70
|
-
if (screen != save_screen) {
|
71
|
-
Display *dpy = DisplayOfScreen(screen);
|
72
|
-
Atom __SWM_VROOT = None;
|
73
|
-
int i;
|
74
|
-
Window rootReturn, parentReturn, *children;
|
75
|
-
unsigned int numChildren;
|
76
|
-
|
77
|
-
root = RootWindowOfScreen(screen);
|
78
|
-
|
79
|
-
/* go look for a virtual root */
|
80
|
-
__SWM_VROOT = XInternAtom(dpy, "__SWM_VROOT", False);
|
81
|
-
if (XQueryTree(dpy, root, &rootReturn, &parentReturn,
|
82
|
-
&children, &numChildren)) {
|
83
|
-
for (i = 0; i < numChildren; i++) {
|
84
|
-
Atom actual_type;
|
85
|
-
int actual_format;
|
86
|
-
unsigned long nitems, bytesafter;
|
87
|
-
Window *newRoot = (Window *)0;
|
88
|
-
|
89
|
-
if (XGetWindowProperty(dpy, children[i],
|
90
|
-
__SWM_VROOT, 0, 1, False, XA_WINDOW,
|
91
|
-
&actual_type, &actual_format,
|
92
|
-
&nitems, &bytesafter,
|
93
|
-
(unsigned char **) &newRoot) == Success
|
94
|
-
&& newRoot) {
|
95
|
-
root = *newRoot;
|
96
|
-
break;
|
97
|
-
}
|
98
|
-
}
|
99
|
-
if (children)
|
100
|
-
XFree((char *)children);
|
101
|
-
}
|
102
|
-
|
103
|
-
save_screen = screen;
|
104
|
-
}
|
105
|
-
|
106
|
-
return root;
|
107
|
-
}
|
108
|
-
|
109
|
-
#undef RootWindowOfScreen
|
110
|
-
#define RootWindowOfScreen(s) VirtualRootWindowOfScreen(s)
|
111
|
-
|
112
|
-
#undef RootWindow
|
113
|
-
#define RootWindow(dpy,screen) VirtualRootWindowOfScreen(ScreenOfDisplay(dpy,screen))
|
114
|
-
|
115
|
-
#undef DefaultRootWindow
|
116
|
-
#define DefaultRootWindow(dpy) VirtualRootWindowOfScreen(DefaultScreenOfDisplay(dpy))
|
117
|
-
|
118
|
-
#endif /* _VROOT_H_ */
|