gosu 0.9.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/Gosu/Bitmap.hpp +3 -3
  3. data/Gosu/Directories.hpp +6 -3
  4. data/Gosu/Gosu.hpp +0 -1
  5. data/Gosu/GraphicsBase.hpp +12 -8
  6. data/Gosu/Input.hpp +5 -16
  7. data/Gosu/Platform.hpp +1 -0
  8. data/Gosu/Version.hpp +3 -5
  9. data/Gosu/Window.hpp +7 -8
  10. data/README.txt +3 -3
  11. data/ext/gosu/extconf.rb +17 -16
  12. data/ext/gosu/gosu_wrap.cxx +59 -58
  13. data/ext/gosu/gosu_wrap.h +1 -1
  14. data/rdoc/gosu.rb +285 -283
  15. data/src/{MacUtility.hpp → AppleUtility.hpp} +24 -42
  16. data/src/Audio/ALChannelManagement.hpp +1 -1
  17. data/src/Audio/{AudioOpenAL.cpp → Audio.cpp} +6 -7
  18. data/src/Audio/Audio.mm +1 -0
  19. data/src/Audio/AudioFile.hpp +2 -2
  20. data/src/Audio/AudioToolboxFile.hpp +5 -20
  21. data/src/Audio/OggFile.hpp +44 -56
  22. data/src/Audio/SndFile.hpp +2 -2
  23. data/src/Bitmap/Bitmap.cpp +98 -2
  24. data/src/Bitmap/BitmapIO.cpp +156 -0
  25. data/src/DirectoriesApple.mm +76 -0
  26. data/src/DirectoriesUnix.cpp +5 -12
  27. data/src/DirectoriesWin.cpp +5 -0
  28. data/src/Graphics/BlockAllocator.hpp +2 -2
  29. data/src/Graphics/ClipRectStack.hpp +2 -2
  30. data/src/Graphics/Common.hpp +2 -2
  31. data/src/Graphics/DrawOp.hpp +2 -2
  32. data/src/Graphics/DrawOpQueue.hpp +2 -2
  33. data/src/Graphics/Graphics.cpp +7 -2
  34. data/src/Graphics/LargeImageData.cpp +6 -6
  35. data/src/Graphics/LargeImageData.hpp +3 -3
  36. data/src/Graphics/Macro.hpp +2 -2
  37. data/src/Graphics/RenderState.hpp +2 -2
  38. data/src/Graphics/Resolution.cpp +1 -1
  39. data/src/Graphics/TexChunk.hpp +2 -2
  40. data/src/Graphics/Texture.cpp +21 -16
  41. data/src/Graphics/Texture.hpp +7 -5
  42. data/src/Graphics/TransformStack.hpp +2 -2
  43. data/src/Iconv.hpp +2 -2
  44. data/src/Input/Input.cpp +3 -1
  45. data/src/Input/{InputTouch.mm → InputUIKit.mm} +32 -26
  46. data/src/Input/TextInput.cpp +1 -1
  47. data/src/Text/FormattedString.hpp +2 -2
  48. data/src/Text/TextApple.mm +8 -8
  49. data/src/Text/TextMac.cpp +1 -1
  50. data/src/Text/TextUnix.cpp +1 -1
  51. data/src/UIKit/GosuAppDelegate.h +8 -0
  52. data/src/UIKit/GosuAppDelegate.mm +24 -0
  53. data/src/UIKit/GosuGLView.h +8 -0
  54. data/src/UIKit/GosuGLView.mm +130 -0
  55. data/src/UIKit/GosuViewController.h +13 -0
  56. data/src/UIKit/GosuViewController.mm +214 -0
  57. data/src/UtilityApple.mm +5 -18
  58. data/src/Window.cpp +1 -3
  59. data/src/WindowUIKit.mm +124 -0
  60. data/src/stb_image.h +6437 -0
  61. data/src/stb_image_write.h +730 -0
  62. data/src/stb_vorbis.c +5459 -0
  63. metadata +18 -26
  64. data/Gosu/Sockets.hpp +0 -156
  65. data/src/Audio/AudioOpenAL.mm +0 -1
  66. data/src/Bitmap/BitmapApple.mm +0 -226
  67. data/src/Bitmap/BitmapBMP.cpp +0 -79
  68. data/src/Bitmap/BitmapColorKey.cpp +0 -50
  69. data/src/Bitmap/BitmapFreeImage.cpp +0 -174
  70. data/src/Bitmap/BitmapGDIplus.cpp +0 -212
  71. data/src/Bitmap/BitmapUtils.cpp +0 -76
  72. data/src/DirectoriesMac.mm +0 -38
  73. data/src/DirectoriesTouch.mm +0 -38
  74. data/src/GosuView.hpp +0 -15
  75. data/src/GosuView.mm +0 -208
  76. data/src/Input/AccelerometerReader.hpp +0 -10
  77. data/src/Input/AccelerometerReader.mm +0 -31
  78. data/src/Sockets/CommSocket.cpp +0 -305
  79. data/src/Sockets/ListenerSocket.cpp +0 -59
  80. data/src/Sockets/MessageSocket.cpp +0 -128
  81. data/src/Sockets/Socket.cpp +0 -145
  82. data/src/Sockets/Socket.hpp +0 -66
  83. data/src/WindowTouch.mm +0 -243
  84. data/src/X11vroot.h +0 -118
@@ -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_ */