| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_CPP_INSTANCE_H_ | 5 #ifndef PPAPI_CPP_INSTANCE_H_ |
| 6 #define PPAPI_CPP_INSTANCE_H_ | 6 #define PPAPI_CPP_INSTANCE_H_ |
| 7 | 7 |
| 8 /// @file | 8 /// @file |
| 9 /// Defines the C++ wrapper for an instance. | 9 /// Defines the C++ wrapper for an instance. |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
| 15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
| 17 | 17 |
| 18 struct PP_InputEvent; | 18 struct PP_InputEvent; |
| 19 | 19 |
| 20 /// The C++ interface to the Pepper API. | 20 /// The C++ interface to the Pepper API. |
| 21 namespace pp { | 21 namespace pp { |
| 22 | 22 |
| 23 class Graphics2D; | 23 class Graphics2D; |
| 24 class Graphics3D; | 24 class Graphics3D_Dev; |
| 25 class InputEvent; | 25 class InputEvent; |
| 26 class ImageData; | 26 class ImageData; |
| 27 class Point; | 27 class Point; |
| 28 class Rect; | 28 class Rect; |
| 29 class Rect; | 29 class Rect; |
| 30 class Resource; | 30 class Resource; |
| 31 class Surface3D_Dev; | 31 class Surface3D_Dev; |
| 32 class URLLoader; | 32 class URLLoader; |
| 33 class Var; | 33 class Var; |
| 34 | 34 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 /// | 268 /// |
| 269 /// @return true if bind was successful or false if the device was not the | 269 /// @return true if bind was successful or false if the device was not the |
| 270 /// correct type. On success, a reference to the device will be held by the | 270 /// correct type. On success, a reference to the device will be held by the |
| 271 /// instance, so the caller can release its reference if it chooses. | 271 /// instance, so the caller can release its reference if it chooses. |
| 272 bool BindGraphics(const Graphics2D& graphics); | 272 bool BindGraphics(const Graphics2D& graphics); |
| 273 | 273 |
| 274 /// Binds the given Graphics3D as the current display surface. | 274 /// Binds the given Graphics3D as the current display surface. |
| 275 /// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for | 275 /// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for |
| 276 /// further information. | 276 /// further information. |
| 277 /// | 277 /// |
| 278 /// @param[in] graphics A <code>Graphics3D</code> to bind. | 278 /// @param[in] graphics A <code>Graphics3D_Dev</code> to bind. |
| 279 /// | 279 /// |
| 280 /// @return true if bind was successful or false if the device was not the | 280 /// @return true if bind was successful or false if the device was not the |
| 281 /// correct type. On success, a reference to the device will be held by the | 281 /// correct type. On success, a reference to the device will be held by the |
| 282 /// instance, so the caller can release its reference if it chooses. | 282 /// instance, so the caller can release its reference if it chooses. |
| 283 bool BindGraphics(const Graphics3D& graphics); | 283 bool BindGraphics(const Graphics3D_Dev& graphics); |
| 284 | 284 |
| 285 /// Binds the given Surface3D as the current display surface. | 285 /// Binds the given Surface3D as the current display surface. |
| 286 /// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for | 286 /// Refer to <code>BindGraphics(const Graphics2D& graphics)</code> for |
| 287 /// further information. | 287 /// further information. |
| 288 /// | 288 /// |
| 289 /// @param[in] graphics A <code>Surface3D_Dev</code> to bind. | 289 /// @param[in] graphics A <code>Surface3D_Dev</code> to bind. |
| 290 /// | 290 /// |
| 291 /// @return true if bind was successful or false if the device was not the | 291 /// @return true if bind was successful or false if the device was not the |
| 292 /// correct type. On success, a reference to the device will be held by the | 292 /// correct type. On success, a reference to the device will be held by the |
| 293 /// instance, so the caller can release its reference if it chooses. | 293 /// instance, so the caller can release its reference if it chooses. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 private: | 511 private: |
| 512 PP_Instance pp_instance_; | 512 PP_Instance pp_instance_; |
| 513 | 513 |
| 514 typedef std::map<std::string, void*> InterfaceNameToObjectMap; | 514 typedef std::map<std::string, void*> InterfaceNameToObjectMap; |
| 515 InterfaceNameToObjectMap interface_name_to_objects_; | 515 InterfaceNameToObjectMap interface_name_to_objects_; |
| 516 }; | 516 }; |
| 517 | 517 |
| 518 } // namespace pp | 518 } // namespace pp |
| 519 | 519 |
| 520 #endif // PPAPI_CPP_INSTANCE_H_ | 520 #endif // PPAPI_CPP_INSTANCE_H_ |
| OLD | NEW |