OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // Defines helper functions for all interfaces supported by the Native Client |
| 6 // proxy. |
| 7 |
| 8 #ifndef NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_GET_BROWSER_INTERFACE_H |
| 9 #define NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_GET_BROWSER_INTERFACE_H |
| 10 |
| 11 // The definition of scrollbar depends on the interface version. |
| 12 // TODO(brettw) either move all interfaces to this method, or encode all |
| 13 // versions explicitly in all interfaces. |
| 14 #include "ppapi/c/dev/ppb_scrollbar_dev.h" |
| 15 |
| 16 struct PPB_Context3D_Dev; |
| 17 struct PPB_Core; |
| 18 struct PPB_CursorControl_Dev; |
| 19 struct PPB_FileIO; |
| 20 struct PPB_FileRef; |
| 21 struct PPB_FileSystem; |
| 22 struct PPB_Font_Dev; |
| 23 struct PPB_Graphics2D; |
| 24 struct PPB_Graphics3D_Dev; |
| 25 struct PPB_ImageData; |
| 26 struct PPB_InputEvent; |
| 27 struct PPB_Instance; |
| 28 struct PPB_KeyboardInputEvent; |
| 29 struct PPB_Memory_Dev; |
| 30 struct PPB_Messaging; |
| 31 struct PPB_MouseInputEvent; |
| 32 struct PPB_OpenGLES2_Dev; |
| 33 struct PPB_Surface3D_Dev; |
| 34 struct PPB_Testing_Dev; |
| 35 struct PPB_URLLoader; |
| 36 struct PPB_URLRequestInfo; |
| 37 struct PPB_URLResponseInfo; |
| 38 struct PPB_Var; |
| 39 struct PPB_WheelInputEvent; |
| 40 struct PPB_Widget_Dev; |
| 41 |
| 42 // Looks up the interface and returns its pointer or NULL. |
| 43 const void* GetBrowserInterface(const char* interface_name); |
| 44 // Uses GetBrowserInterface() and CHECKs for NULL. |
| 45 const void* GetBrowserInterfaceSafe(const char* interface_name); |
| 46 |
| 47 // |
| 48 // Stable interfaces. |
| 49 // Lookup guarantees that the interface is available by using NULL CHECKs. |
| 50 // |
| 51 |
| 52 const PPB_Core* PPBCore(); |
| 53 const PPB_FileIO* PPBFileIO(); |
| 54 const PPB_FileRef* PPBFileRef(); |
| 55 const PPB_FileSystem* PPBFileSystem(); |
| 56 const PPB_Graphics2D* PPBGraphics2D(); |
| 57 const PPB_ImageData* PPBImageData(); |
| 58 const PPB_InputEvent* PPBInputEvent(); |
| 59 const PPB_Instance* PPBInstance(); |
| 60 const PPB_KeyboardInputEvent* PPBKeyboardInputEvent(); |
| 61 const PPB_Messaging* PPBMessaging(); |
| 62 const PPB_MouseInputEvent* PPBMouseInputEvent(); |
| 63 const PPB_URLLoader* PPBURLLoader(); |
| 64 const PPB_URLRequestInfo* PPBURLRequestInfo(); |
| 65 const PPB_URLResponseInfo* PPBURLResponseInfo(); |
| 66 const PPB_Var* PPBVar(); |
| 67 const PPB_WheelInputEvent* PPBWheelInputEvent(); |
| 68 |
| 69 // |
| 70 // Experimental (aka Dev) interfaces. |
| 71 // Lookup returns NULL if the interface is not available. |
| 72 // |
| 73 |
| 74 const PPB_Context3D_Dev* PPBContext3DDev(); |
| 75 const PPB_CursorControl_Dev* PPBCursorControlDev(); |
| 76 const PPB_Font_Dev* PPBFontDev(); |
| 77 const PPB_Graphics3D_Dev* PPBGraphics3DDev(); |
| 78 const PPB_Memory_Dev* PPBMemoryDev(); |
| 79 const PPB_OpenGLES2_Dev* PPBOpenGLES2Dev(); |
| 80 const PPB_Scrollbar_Dev* PPBScrollbarDev(); |
| 81 const PPB_Surface3D_Dev* PPBSurface3DDev(); |
| 82 const PPB_Testing_Dev* PPBTestingDev(); |
| 83 const PPB_Widget_Dev* PPBWidgetDev(); |
| 84 |
| 85 #endif // NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_GET_BROWSER_INTERFACE_H |
OLD | NEW |