| OLD | NEW |
| 1 // Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2012 The Native Client 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 EXAMPLES_GAMEPAD_GAMEPAD_H_ | 5 #ifndef EXAMPLES_GAMEPAD_GAMEPAD_H_ |
| 6 #define EXAMPLES_GAMEPAD_GAMEPAD_H_ | 6 #define EXAMPLES_GAMEPAD_GAMEPAD_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "ppapi/c/dev/ppb_gamepad_dev.h" | 10 #include "ppapi/c/ppb_gamepad.h" |
| 11 #include "ppapi/cpp/graphics_2d.h" | 11 #include "ppapi/cpp/graphics_2d.h" |
| 12 #include "ppapi/cpp/image_data.h" | 12 #include "ppapi/cpp/image_data.h" |
| 13 #include "ppapi/cpp/instance.h" | 13 #include "ppapi/cpp/instance.h" |
| 14 #include "ppapi/cpp/rect.h" | 14 #include "ppapi/cpp/rect.h" |
| 15 #include "ppapi/cpp/size.h" | 15 #include "ppapi/cpp/size.h" |
| 16 | 16 |
| 17 namespace gamepad { | 17 namespace gamepad { |
| 18 | 18 |
| 19 // The Instance class. One of these exists for each instance of your NaCl | 19 // The Instance class. One of these exists for each instance of your NaCl |
| 20 // module on the web page. The browser will ask the Module object to create | 20 // module on the web page. The browser will ask the Module object to create |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // there is a pending flush on the 2D context, then update the pixels only | 63 // there is a pending flush on the 2D context, then update the pixels only |
| 64 // and do not flush. | 64 // and do not flush. |
| 65 void FlushPixelBuffer(); | 65 void FlushPixelBuffer(); |
| 66 | 66 |
| 67 bool IsContextValid() const { | 67 bool IsContextValid() const { |
| 68 return graphics_2d_context_ != NULL; | 68 return graphics_2d_context_ != NULL; |
| 69 } | 69 } |
| 70 | 70 |
| 71 pp::Graphics2D* graphics_2d_context_; | 71 pp::Graphics2D* graphics_2d_context_; |
| 72 pp::ImageData* pixel_buffer_; | 72 pp::ImageData* pixel_buffer_; |
| 73 const PPB_Gamepad_Dev* gamepad_; | 73 const PPB_Gamepad* gamepad_; |
| 74 bool flush_pending_; | 74 bool flush_pending_; |
| 75 bool quit_; | 75 bool quit_; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace gamepad | 78 } // namespace gamepad |
| 79 | 79 |
| 80 #endif // EXAMPLES_GAMEPAD_GAMEPAD_H_ | 80 #endif // EXAMPLES_GAMEPAD_GAMEPAD_H_ |
| OLD | NEW |