| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef UI_NACL_H | 7 #ifndef UI_NACL_H |
| 8 | 8 |
| 9 #include "ppapi/c/ppb_input_event.h" | 9 #include "ppapi/c/ppb_input_event.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 struct PpapiEvent { | 23 struct PpapiEvent { |
| 24 PP_InputEvent_Type type; | 24 PP_InputEvent_Type type; |
| 25 PP_InputEvent_MouseButton button; | 25 PP_InputEvent_MouseButton button; |
| 26 struct PP_Point position; | 26 struct PP_Point position; |
| 27 int clicks; | 27 int clicks; |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 /* get next ppapi event to process, may block if wait == 1 */ | 30 /* get next ppapi event to process, may block if wait == 1 */ |
| 31 struct PpapiEvent* GetEvent(int wait); | 31 struct PpapiEvent* GetEvent(int wait); |
| 32 | 32 |
| 33 /* these headers need an sdk update before they can be used */ | 33 #define CHECK(cond) do { \ |
| 34 #if 0 | 34 if (!(cond)) { fputs("ABORT: " #cond "\n", stderr); abort(); } \ |
| 35 #include <nacl/nacl_check.h> | 35 } while(0) |
| 36 #include <nacl/nacl_log.h> | 36 |
| 37 #else | 37 #define LOG_TRACE 3 |
| 38 #define CHECK(cond) do { if (!(cond)) {puts("ABORT: " #cond "\n"); abort();}} wh
ile(0) | 38 #define LOG_INFO 2 |
| 39 #define NaClLog(lev, ...) fprintf(stderr, __VA_ARGS__) | 39 #define LOG_ERROR 1 |
| 40 #endif | 40 #define LOG_FATAL 0 |
| 41 |
| 42 void NaClLog(int level, char* fmt, ...); |
| 41 | 43 |
| 42 #endif /* UI_NACL_H */ | 44 #endif /* UI_NACL_H */ |
| OLD | NEW |