gosu 0.7.33 → 0.7.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/Gosu/Async.hpp +10 -8
  2. data/Gosu/Audio.hpp +6 -4
  3. data/Gosu/AutoLink.hpp +0 -0
  4. data/Gosu/Bitmap.hpp +4 -5
  5. data/Gosu/ButtonsX.hpp +1 -1
  6. data/Gosu/Color.hpp +8 -8
  7. data/Gosu/Font.hpp +2 -2
  8. data/Gosu/Graphics.hpp +4 -6
  9. data/Gosu/IO.hpp +11 -4
  10. data/Gosu/Image.hpp +9 -7
  11. data/Gosu/ImageData.hpp +10 -4
  12. data/Gosu/Input.hpp +4 -5
  13. data/Gosu/Sockets.hpp +10 -12
  14. data/Gosu/TR1.hpp +44 -0
  15. data/Gosu/TextInput.hpp +2 -2
  16. data/Gosu/Version.hpp +2 -2
  17. data/Gosu/WinUtility.hpp +5 -6
  18. data/Gosu/Window.hpp +5 -6
  19. data/GosuImpl/Async.cpp +4 -3
  20. data/GosuImpl/Audio/ALChannelManagement.hpp +23 -11
  21. data/GosuImpl/Audio/AudioFile.hpp +11 -3
  22. data/GosuImpl/Audio/AudioOpenAL.cpp +613 -0
  23. data/GosuImpl/Audio/AudioOpenAL.mm +1 -605
  24. data/GosuImpl/Audio/AudioSDL.cpp +12 -14
  25. data/GosuImpl/Audio/AudioToolboxFile.hpp +0 -1
  26. data/GosuImpl/Audio/OggFile.hpp +2 -0
  27. data/GosuImpl/Audio/SndFile.hpp +158 -0
  28. data/GosuImpl/DirectoriesWin.cpp +18 -18
  29. data/GosuImpl/Graphics/BitmapApple.mm +17 -19
  30. data/GosuImpl/Graphics/BitmapBMP.cpp +7 -2
  31. data/GosuImpl/Graphics/BitmapFreeImage.cpp +11 -12
  32. data/GosuImpl/Graphics/BitmapGDIplus.cpp +35 -31
  33. data/GosuImpl/Graphics/BitmapUtils.cpp +1 -1
  34. data/GosuImpl/Graphics/BlockAllocator.cpp +7 -8
  35. data/GosuImpl/Graphics/BlockAllocator.hpp +3 -4
  36. data/GosuImpl/Graphics/Common.hpp +3 -2
  37. data/GosuImpl/Graphics/DrawOp.hpp +2 -3
  38. data/GosuImpl/Graphics/DrawOpQueue.hpp +28 -20
  39. data/GosuImpl/Graphics/Font.cpp +13 -13
  40. data/GosuImpl/Graphics/FormattedString.hpp +93 -86
  41. data/GosuImpl/Graphics/Graphics.cpp +16 -14
  42. data/GosuImpl/Graphics/Image.cpp +7 -3
  43. data/GosuImpl/Graphics/LargeImageData.hpp +4 -5
  44. data/GosuImpl/Graphics/Macro.hpp +11 -11
  45. data/GosuImpl/Graphics/RenderState.hpp +5 -4
  46. data/GosuImpl/Graphics/TexChunk.cpp +3 -3
  47. data/GosuImpl/Graphics/TexChunk.hpp +4 -4
  48. data/GosuImpl/Graphics/Text.cpp +29 -30
  49. data/GosuImpl/Graphics/TextMac.cpp +9 -7
  50. data/GosuImpl/Graphics/TextTTFWin.cpp +3 -1
  51. data/GosuImpl/Graphics/TextTouch.mm +0 -1
  52. data/GosuImpl/Graphics/TextUnix.cpp +12 -4
  53. data/GosuImpl/Graphics/TextWin.cpp +4 -2
  54. data/GosuImpl/Graphics/Texture.cpp +7 -6
  55. data/GosuImpl/Graphics/Texture.hpp +3 -4
  56. data/GosuImpl/InputMac.mm +12 -15
  57. data/GosuImpl/InputTouch.mm +3 -3
  58. data/GosuImpl/InputWin.cpp +149 -159
  59. data/GosuImpl/InputX.cpp +0 -0
  60. data/GosuImpl/MacUtility.hpp +9 -4
  61. data/GosuImpl/RubyGosu.swg +38 -43
  62. data/GosuImpl/RubyGosu_wrap.cxx +89 -96
  63. data/GosuImpl/Sockets/CommSocket.cpp +5 -5
  64. data/GosuImpl/Sockets/Sockets.hpp +4 -4
  65. data/GosuImpl/TimingApple.cpp +2 -3
  66. data/GosuImpl/Utility.cpp +18 -0
  67. data/GosuImpl/WinMain.cpp +0 -1
  68. data/GosuImpl/WinUtility.cpp +2 -2
  69. data/GosuImpl/WindowMac.mm +20 -17
  70. data/GosuImpl/WindowTouch.mm +8 -7
  71. data/GosuImpl/WindowWin.cpp +12 -7
  72. data/GosuImpl/WindowX.cpp +67 -18
  73. data/lib/gosu.rb +14 -12
  74. data/linux/extconf.rb +11 -6
  75. metadata +8 -7
  76. data/GosuImpl/Audio/AudioAudiere.cpp +0 -448
  77. data/GosuImpl/RubyGosu_DllMain.cxx +0 -31
@@ -1,12 +1,13 @@
1
1
  // Undocumented for the first few iterations. Interface may change rapidly.
2
2
  // This is mainly a proof of concept. Stability will be the highest on OS X.
3
3
 
4
+ #if 0
4
5
  #ifndef GOSU_ASYNC_HPP
5
6
  #define GOSU_ASYNC_HPP
6
7
 
7
8
  #include <Gosu/Fwd.hpp>
8
- #include <boost/shared_ptr.hpp>
9
- #include <boost/thread.hpp>
9
+ #include <Gosu/TR1.hpp>
10
+ #include <thread>
10
11
  #include <memory>
11
12
  #include <string>
12
13
 
@@ -15,25 +16,25 @@ namespace Gosu
15
16
  template<typename Result>
16
17
  class AsyncResult
17
18
  {
18
- boost::shared_ptr<boost::try_mutex> mutex;
19
- boost::shared_ptr<std::auto_ptr<Result> > result;
19
+ std::tr1::shared_ptr<std::tr1::try_mutex> mutex;
20
+ std::tr1::shared_ptr<std::auto_ptr<Result> > result;
20
21
 
21
22
  public:
22
- AsyncResult(const boost::shared_ptr<boost::try_mutex>& mutex,
23
- const boost::shared_ptr<std::auto_ptr<Result> >& result)
23
+ AsyncResult(const std::tr1::shared_ptr<std::tr1::try_mutex>& mutex,
24
+ const std::tr1::shared_ptr<std::auto_ptr<Result> >& result)
24
25
  : mutex(mutex), result(result)
25
26
  {
26
27
  }
27
28
 
28
29
  bool hasValue() const
29
30
  {
30
- boost::try_mutex::scoped_try_lock lock(*mutex);
31
+ std::tr1::try_mutex::scoped_try_lock lock(*mutex);
31
32
  return lock && result->get();
32
33
  }
33
34
 
34
35
  std::auto_ptr<Result> takeValue()
35
36
  {
36
- boost::try_mutex::scoped_lock lock(*mutex);
37
+ std::tr1::try_mutex::scoped_lock lock(*mutex);
37
38
  return *result;
38
39
  }
39
40
  };
@@ -46,3 +47,4 @@ namespace Gosu
46
47
  }
47
48
 
48
49
  #endif
50
+ #endif
@@ -13,8 +13,8 @@
13
13
  #include <Gosu/Fwd.hpp>
14
14
  #include <Gosu/IO.hpp>
15
15
  #include <Gosu/Platform.hpp>
16
- #include <boost/scoped_ptr.hpp>
17
- #include <boost/shared_ptr.hpp>
16
+ #include <Gosu/TR1.hpp>
17
+ #include <memory>
18
18
  #include <string>
19
19
 
20
20
  namespace Gosu
@@ -64,7 +64,7 @@ namespace Gosu
64
64
  class Sample
65
65
  {
66
66
  struct SampleData;
67
- boost::shared_ptr<SampleData> data;
67
+ std::tr1::shared_ptr<SampleData> data;
68
68
 
69
69
  public:
70
70
  //! Constructs a sample that can be played on the specified audio
@@ -109,7 +109,9 @@ namespace Gosu
109
109
  class BaseData;
110
110
  class ModuleData;
111
111
  class StreamData;
112
- boost::scoped_ptr<BaseData> data;
112
+ Song(const Song&);
113
+ Song& operator=(const Song&);
114
+ std::auto_ptr<BaseData> data;
113
115
 
114
116
  public:
115
117
  //! Constructs a song that can be played on the provided audio system
File without changes
@@ -8,7 +8,6 @@
8
8
  #include <Gosu/Fwd.hpp>
9
9
  #include <Gosu/GraphicsBase.hpp>
10
10
  #include <Gosu/Platform.hpp>
11
- #include <boost/scoped_ptr.hpp>
12
11
  #include <string>
13
12
  #include <vector>
14
13
 
@@ -63,10 +62,10 @@ namespace Gosu
63
62
  GOSU_DEPRECATED void replace(Color oldColor, Color newColor);
64
63
  };
65
64
 
66
- //! Loads any supported image into a Bitmap.
67
- Bitmap loadImageFile(const std::wstring& filename);
68
- //! Loads any supported image into a Bitmap.
69
- Bitmap loadImageFile(Reader input);
65
+ //! Loads any supported image into a Bitmap.
66
+ void loadImageFile(Bitmap& bitmap, const std::wstring& filename);
67
+ //! Loads any supported image into a Bitmap.
68
+ void loadImageFile(Bitmap& bitmap, Reader input);
70
69
 
71
70
  //! Saves a Bitmap to a file.
72
71
  void saveImageFile(const Bitmap& bitmap, const std::wstring& filename);
@@ -133,7 +133,7 @@ namespace Gosu
133
133
  gpNum = gpRangeEnd - gpRangeBegin + 1,
134
134
 
135
135
  numButtons = gpRangeEnd,
136
- noButton = 0xffffffff
136
+ noButton = 0xffffffff
137
137
  };
138
138
  }
139
139
 
@@ -4,8 +4,8 @@
4
4
  #ifndef GOSU_COLOR_HPP
5
5
  #define GOSU_COLOR_HPP
6
6
 
7
- #include <boost/cstdint.hpp>
8
7
  #include <Gosu/Platform.hpp>
8
+ #include <Gosu/TR1.hpp>
9
9
 
10
10
  namespace Gosu
11
11
  {
@@ -17,7 +17,7 @@ namespace Gosu
17
17
  //! it is 0xaabbggrr.
18
18
  class Color
19
19
  {
20
- boost::uint32_t rep;
20
+ std::tr1::uint32_t rep;
21
21
  #ifdef GOSU_IS_LITTLE_ENDIAN
22
22
  enum { RED_OFFSET = 0, GREEN_OFFSET = 8, BLUE_OFFSET = 16, ALPHA_OFFSET = 24 };
23
23
  #else
@@ -25,7 +25,7 @@ namespace Gosu
25
25
  #endif
26
26
 
27
27
  public:
28
- typedef boost::uint8_t Channel;
28
+ typedef std::tr1::uint8_t Channel;
29
29
  static const unsigned GL_FORMAT = 0x1908; // GL_RGBA
30
30
 
31
31
  //! The default constructor does not initialize the color to any value.
@@ -34,7 +34,7 @@ namespace Gosu
34
34
  }
35
35
 
36
36
  //! Conversion constructor for literals of the form 0xaarrggbb.
37
- Color(boost::uint32_t argb)
37
+ Color(unsigned argb)
38
38
  {
39
39
  *this = Color((argb >> 24) & 0xff, (argb >> 16) & 0xff,
40
40
  (argb >> 8) & 0xff, (argb >> 0) & 0xff);
@@ -121,25 +121,25 @@ namespace Gosu
121
121
  void setValue(double v);
122
122
 
123
123
  //! Returns the color in 0xaarrggbb representation.
124
- boost::uint32_t argb() const
124
+ std::tr1::uint32_t argb() const
125
125
  {
126
126
  return alpha() << 24 | red() << 16 | green() << 8 | blue();
127
127
  }
128
128
 
129
129
  //! Returns the color in 0x00bbggrr representation.
130
- boost::uint32_t bgr() const
130
+ std::tr1::uint32_t bgr() const
131
131
  {
132
132
  return blue() << 16 | green() << 8 | red();
133
133
  }
134
134
 
135
135
  //! Returns the color in 0xaabbggrr representation.
136
- boost::uint32_t abgr() const
136
+ std::tr1::uint32_t abgr() const
137
137
  {
138
138
  return alpha() << 24 | blue() << 16 | green() << 8 | red();
139
139
  }
140
140
 
141
141
  //! Returns the internal representation of the color (RGBA in memory).
142
- boost::uint32_t gl() const
142
+ std::tr1::uint32_t gl() const
143
143
  {
144
144
  return rep;
145
145
  }
@@ -8,7 +8,7 @@
8
8
  #include <Gosu/Color.hpp>
9
9
  #include <Gosu/GraphicsBase.hpp>
10
10
  #include <Gosu/Platform.hpp>
11
- #include <boost/shared_ptr.hpp>
11
+ #include <Gosu/TR1.hpp>
12
12
  #include <string>
13
13
 
14
14
  namespace Gosu
@@ -20,7 +20,7 @@ namespace Gosu
20
20
  class Font
21
21
  {
22
22
  struct Impl;
23
- boost::shared_ptr<Impl> pimpl;
23
+ std::tr1::shared_ptr<Impl> pimpl;
24
24
 
25
25
  public:
26
26
  //! Constructs a font that can be drawn onto the graphics object.
@@ -7,9 +7,7 @@
7
7
  #include <Gosu/Fwd.hpp>
8
8
  #include <Gosu/Color.hpp>
9
9
  #include <Gosu/GraphicsBase.hpp>
10
- #include <boost/array.hpp>
11
- #include <boost/function.hpp>
12
- #include <boost/scoped_ptr.hpp>
10
+ #include <Gosu/TR1.hpp>
13
11
  #include <memory>
14
12
 
15
13
  namespace Gosu
@@ -25,7 +23,7 @@ namespace Gosu
25
23
  //! Useful when extending Gosu using OpenGL.
26
24
  unsigned const MAX_TEXTURE_SIZE = 1024;
27
25
 
28
- typedef boost::array<double, 16> Transform;
26
+ typedef std::tr1::array<double, 16> Transform;
29
27
  Transform translate(double x, double y);
30
28
  Transform rotate(double angle, double aroundX = 0, double aroundY = 0);
31
29
  Transform scale(double factor);
@@ -37,7 +35,7 @@ namespace Gosu
37
35
  class Graphics
38
36
  {
39
37
  struct Impl;
40
- boost::scoped_ptr<Impl> pimpl;
38
+ const std::auto_ptr<Impl> pimpl;
41
39
 
42
40
  public:
43
41
  Graphics(unsigned physicalWidth, unsigned physicalHeight, bool fullscreen);
@@ -73,7 +71,7 @@ namespace Gosu
73
71
  //! of custom GL functors is NOT DEFINED.
74
72
  //! Note: You may not call any Gosu rendering functions from within the
75
73
  //! functor, and you must schedule it from within Window::draw's call tree.
76
- void scheduleGL(const boost::function<void()>& functor, ZPos z);
74
+ void scheduleGL(const std::tr1::function<void()>& functor, ZPos z);
77
75
 
78
76
  //! Enables clipping to a specified rectangle.
79
77
  void beginClipping(double x, double y, double width, double height);
@@ -4,10 +4,9 @@
4
4
  #ifndef GOSU_IO_HPP
5
5
  #define GOSU_IO_HPP
6
6
 
7
- #include <boost/utility.hpp>
8
- #include <boost/scoped_ptr.hpp>
9
7
  #include <cstddef>
10
8
  #include <algorithm>
9
+ #include <memory>
11
10
  #include <string>
12
11
  #include <vector>
13
12
 
@@ -139,9 +138,17 @@ namespace Gosu
139
138
  //! or simply areas of allocated memory.
140
139
  //! A resource always knows its size and can resize itself, thereby either
141
140
  //! truncating its content or allocating room for more data.
142
- class Resource : boost::noncopyable
141
+ class Resource
143
142
  {
143
+ // Non-copyable
144
+ Resource(const Resource&);
145
+ Resource& operator=(const Resource&);
146
+
144
147
  public:
148
+ Resource()
149
+ {
150
+ }
151
+
145
152
  virtual ~Resource()
146
153
  {
147
154
  }
@@ -229,7 +236,7 @@ namespace Gosu
229
236
  class File : public Resource
230
237
  {
231
238
  struct Impl;
232
- boost::scoped_ptr<Impl> pimpl;
239
+ const std::auto_ptr<Impl> pimpl;
233
240
 
234
241
  public:
235
242
  explicit File(const std::wstring& filename, FileMode mode = fmRead);
@@ -6,7 +6,7 @@
6
6
 
7
7
  #include <Gosu/Fwd.hpp>
8
8
  #include <Gosu/Bitmap.hpp>
9
- #include <boost/shared_ptr.hpp>
9
+ #include <Gosu/TR1.hpp>
10
10
  #include <memory>
11
11
 
12
12
  namespace Gosu
@@ -14,7 +14,7 @@ namespace Gosu
14
14
  //! Provides functionality for drawing rectangular images.
15
15
  class Image
16
16
  {
17
- boost::shared_ptr<ImageData> data;
17
+ std::tr1::shared_ptr<ImageData> data;
18
18
 
19
19
  public:
20
20
  //! Loads an image from a given filename that can be drawn onto
@@ -86,13 +86,15 @@ namespace Gosu
86
86
  //! pixels. If negative, the bitmap is divided into -tileWidth rows.
87
87
  //! \param tileHeight See tileWidth.
88
88
  //! \param appendTo STL container to which the images will be appended.
89
- //! Must provide a push_back member function; std::vector<boost::shared_ptr<Image>>
90
- //! or boost::ptr_vector<Image> are good choices.
89
+ //! Must provide a push_back member function; vector<tr1::shared_ptr<Image>>
90
+ //! or std::tr1::ptr_vector<Image> are good choices.
91
91
  template<typename Container>
92
92
  void imagesFromTiledBitmap(Graphics& graphics, const std::wstring& filename,
93
93
  int tileWidth, int tileHeight, bool tileable, Container& appendTo)
94
94
  {
95
- imagesFromTiledBitmap(graphics, loadImageFile(filename), tileWidth, tileHeight, tileable, appendTo);
95
+ Bitmap bmp;
96
+ loadImageFile(bmp, filename);
97
+ imagesFromTiledBitmap(graphics, bmp, tileWidth, tileHeight, tileable, appendTo);
96
98
  }
97
99
 
98
100
  //! Convenience function that splits a bitmap into an area of array
@@ -101,8 +103,8 @@ namespace Gosu
101
103
  //! pixels. If negative, the bitmap is divided into -tileWidth rows.
102
104
  //! \param tileHeight See tileWidth.
103
105
  //! \param appendTo STL container to which the images will be appended.
104
- //! Must provide a push_back member function; std::vector<boost::shared_ptr<Image>>
105
- //! or boost::ptr_vector<Image> are good choices.
106
+ //! Must provide a push_back member function; std::vector<std::tr1::shared_ptr<Image>>
107
+ //! or std::tr1::ptr_vector<Image> are good choices.
106
108
  template<typename Container>
107
109
  void imagesFromTiledBitmap(Graphics& graphics, const Bitmap& bmp,
108
110
  int tileWidth, int tileHeight, bool tileable, Container& appendTo)
@@ -6,8 +6,6 @@
6
6
 
7
7
  #include <Gosu/Color.hpp>
8
8
  #include <Gosu/GraphicsBase.hpp>
9
- #include <boost/optional.hpp>
10
- #include <boost/utility.hpp>
11
9
 
12
10
  namespace Gosu
13
11
  {
@@ -25,9 +23,17 @@ namespace Gosu
25
23
  //! Graphics::createImage and usually only used to implement drawing
26
24
  //! primitives like Image, which then provide a more specialized and
27
25
  //! intuitive drawing interface.
28
- class ImageData : boost::noncopyable
26
+ class ImageData
29
27
  {
28
+ // Non-copyable
29
+ ImageData(const ImageData&);
30
+ ImageData& operator=(const ImageData&);
31
+
30
32
  public:
33
+ ImageData()
34
+ {
35
+ }
36
+
31
37
  virtual ~ImageData()
32
38
  {
33
39
  }
@@ -41,7 +47,7 @@ namespace Gosu
41
47
  double x4, double y4, Color c4,
42
48
  ZPos z, AlphaMode mode) const = 0;
43
49
 
44
- virtual boost::optional<GLTexInfo> glTexInfo() const = 0;
50
+ virtual const GLTexInfo* glTexInfo() const = 0;
45
51
  virtual Bitmap toBitmap() const = 0;
46
52
 
47
53
  //! Experimental and undocumented for now.
@@ -28,8 +28,7 @@
28
28
 
29
29
  #include <Gosu/Platform.hpp>
30
30
  #include <Gosu/Fwd.hpp>
31
- #include <boost/function.hpp>
32
- #include <boost/scoped_ptr.hpp>
31
+ #include <Gosu/TR1.hpp>
33
32
  #include <vector>
34
33
 
35
34
  namespace Gosu
@@ -84,7 +83,7 @@ namespace Gosu
84
83
  class Input
85
84
  {
86
85
  struct Impl;
87
- boost::scoped_ptr<Impl> pimpl;
86
+ const std::auto_ptr<Impl> pimpl;
88
87
 
89
88
  public:
90
89
  #ifdef GOSU_IS_WIN
@@ -146,11 +145,11 @@ namespace Gosu
146
145
 
147
146
  //! Assignable events that are called by update. You can bind these to your own functions.
148
147
  //! If you use the Window class, it will assign forward these to its own methods.
149
- boost::function<void (Button)> onButtonDown, onButtonUp;
148
+ std::tr1::function<void (Button)> onButtonDown, onButtonUp;
150
149
 
151
150
  //! Assignable events that are called by update. You can bind these to your own functions.
152
151
  //! If you use the Window class, it will assign forward these to its own methods.
153
- boost::function<void (Touch)> onTouchBegan, onTouchMoved, onTouchEnded;
152
+ std::tr1::function<void (Touch)> onTouchBegan, onTouchMoved, onTouchEnded;
154
153
 
155
154
  //! Returns the currently active TextInput instance, or 0.
156
155
  TextInput* textInput() const;
@@ -4,19 +4,17 @@
4
4
  #ifndef GOSU_SOCKETS_HPP
5
5
  #define GOSU_SOCKETS_HPP
6
6
 
7
- #include <boost/cstdint.hpp>
8
- #include <boost/function.hpp>
9
- #include <boost/scoped_ptr.hpp>
7
+ #include <Gosu/TR1.hpp>
10
8
  #include <cstddef>
11
9
  #include <string>
12
10
 
13
11
  namespace Gosu
14
12
  {
15
13
  //! Addresses are returned from and given to Gosu functions in host byte order.
16
- typedef boost::uint32_t SocketAddress;
14
+ typedef std::tr1::uint32_t SocketAddress;
17
15
 
18
16
  //! Ports are returned from and given to Gosu functions in host byte order.
19
- typedef boost::uint16_t SocketPort;
17
+ typedef std::tr1::uint16_t SocketPort;
20
18
 
21
19
  //! Constant that can be used as a placeholder for an arbitrary port, e.g. when
22
20
  //! starting to listen.
@@ -37,7 +35,7 @@ namespace Gosu
37
35
  class MessageSocket
38
36
  {
39
37
  struct Impl;
40
- boost::scoped_ptr<Impl> pimpl;
38
+ const std::auto_ptr<Impl> pimpl;
41
39
 
42
40
  public:
43
41
  //! Opens a message socket for listening at the specified port.
@@ -66,7 +64,7 @@ namespace Gosu
66
64
  std::size_t size);*/
67
65
 
68
66
  //! If assigned, will be called by update for every packet received.
69
- boost::function<void (SocketAddress, SocketPort, const void*,
67
+ std::tr1::function<void (SocketAddress, SocketPort, const void*,
70
68
  std::size_t)> onReceive;
71
69
  };
72
70
 
@@ -86,7 +84,7 @@ namespace Gosu
86
84
  class CommSocket
87
85
  {
88
86
  struct Impl;
89
- boost::scoped_ptr<Impl> pimpl;
87
+ const std::auto_ptr<Impl> pimpl;
90
88
 
91
89
  public:
92
90
  CommSocket(CommMode mode, SocketAddress targetAddress,
@@ -110,8 +108,8 @@ namespace Gosu
110
108
  void sendPendingData();
111
109
  std::size_t pendingBytes() const;
112
110
 
113
- boost::function<void (const void*, std::size_t)> onReceive;
114
- boost::function<void ()> onDisconnection;
111
+ std::tr1::function<void (const void*, std::size_t)> onReceive;
112
+ std::tr1::function<void ()> onDisconnection;
115
113
  };
116
114
 
117
115
  //! Wraps a TCP socket that waits on a specific port and can create
@@ -119,7 +117,7 @@ namespace Gosu
119
117
  class ListenerSocket
120
118
  {
121
119
  struct Impl;
122
- boost::scoped_ptr<Impl> pimpl;
120
+ const std::auto_ptr<Impl> pimpl;
123
121
 
124
122
  public:
125
123
  ListenerSocket(SocketPort port);
@@ -132,7 +130,7 @@ namespace Gosu
132
130
 
133
131
  //! This signal is fired by update() whenever someone connects
134
132
  //! to the port which is currently listened on.
135
- boost::function<void (Socket&)> onConnection;
133
+ std::tr1::function<void (Socket&)> onConnection;
136
134
  };
137
135
  }
138
136