-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnaclcontext.h
68 lines (54 loc) · 1.56 KB
/
naclcontext.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef NACL_CONTEXT_H
#define NACL_CONTEXT_H
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_graphics_3d.h"
#include "ppapi/c/ppp.h"
#include "ppapi/c/ppp_instance.h"
#include "ppapi/c/ppp_messaging.h"
#include "ppapi/c/ppp_input_event.h"
#include "ppapi/c/ppb.h"
#include "ppapi/c/ppb_instance.h"
#include "ppapi/c/ppb_messaging.h"
#include "ppapi/c/ppb_var.h"
#include "ppapi/c/ppb_input_event.h"
#include "ppapi/c/ppb_core.h"
#include "ppapi/c/ppb_view.h"
#include "ppapi/c/ppb_graphics_3d.h"
#include "ppapi/c/ppp_graphics_3d.h"
#include "ppapi/c/ppb_url_request_info.h"
#include "ppapi/c/ppb_url_loader.h"
#include "ppapi/gles2/gl2ext_ppapi.h"
typedef struct NaCLContext_TAG
{
int32_t i32PluginWidth;
int32_t i32PluginHeight;
//Handles
PP_Resource hRenderContext;
PP_Instance hModule;
//Interfaces to pepper systems.
PPB_Messaging* psMessagingInterface;
PPB_Var* psVarInterface;
PPB_OpenGLES2* psGL;
PPB_Graphics3D* psG3D;
PPB_Instance* psInstanceInterface;
PPB_View* psView;
PPB_Core* psCore;
PPB_Var* psVar;
PPB_InputEvent* psInputEventInterface;
PPB_KeyboardInputEvent* psKeyboard;
PPB_URLRequestInfo* psURLRequest;
PPB_URLLoader* psURLLoader;
} NaCLContext;
#define DEBUG_MESSAGES
#define DBG_LOG_PREFIX "DBG: "
#ifdef DEBUG_MESSAGES
#define DBG_LOG(MSG) SendString(MSG);
#else
#define DBG_LOG(MSG)
#endif
extern void SendString(const char* str);
extern void SendInteger(int val);
#endif