| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright 2010 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /* | 7 /* |
| 8 * Concrete implemenatation of IMultimedia interface using SDL | 8 * Concrete implemenatation of IMultimedia interface using SDL |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <SDL/SDL.h> | 11 #include <SDL/SDL.h> |
| 12 #include <SDL/SDL_timer.h> | 12 #include <SDL/SDL_timer.h> |
| 13 | 13 |
| 14 #include <string.h> | 14 #include <string.h> |
| 15 | 15 |
| 16 #include <functional> | 16 #include <functional> |
| 17 #include <queue> | 17 #include <queue> |
| 18 #include "ppapi/c/pp_input_event.h" | 18 #include "ppapi/c/pp_input_event.h" |
| 19 | 19 |
| 20 #include "native_client/src/shared/platform/nacl_log.h" | 20 #include "native_client/src/shared/platform/nacl_log.h" |
| 21 #include "native_client/src/shared/platform/nacl_sync.h" | 21 #include "native_client/src/shared/platform/nacl_sync.h" |
| 22 #include "native_client/src/shared/platform/nacl_sync_checked.h" | 22 #include "native_client/src/shared/platform/nacl_sync_checked.h" |
| 23 | 23 |
| 24 // TODO(robertm): the next include file should be moved to src/untrusted | 24 // TODO(robertm): the next include file should be moved to src/untrusted |
| 25 #include "native_client/src/trusted/sel_universal/multimedia.h" | 25 #include "native_client/src/trusted/sel_universal/primitives.h" |
| 26 #include "native_client/src/trusted/sel_universal/workqueue.h" | 26 #include "native_client/src/trusted/sel_universal/workqueue.h" |
| 27 | 27 |
| 28 // from sdl_ppapi_event_translator.cc | 28 // from sdl_ppapi_event_translator.cc |
| 29 // TODO(robertm): add header when this becomes more complex | 29 // TODO(robertm): add header when this becomes more complex |
| 30 /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */ | 30 /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */ |
| 31 extern bool ConvertSDLEventToPPAPI( | 31 extern bool ConvertSDLEventToPPAPI( |
| 32 const SDL_Event& sdl_event, PP_InputEvent* pp_event); | 32 const SDL_Event& sdl_event, PP_InputEvent* pp_event); |
| 33 | 33 |
| 34 // This file implements a IMultimedia interface using SDL | 34 // This file implements a IMultimedia interface using SDL |
| 35 | 35 |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 state->mm->PushUserEvent(0, state->code, state->data1, state->data2); | 414 state->mm->PushUserEvent(0, state->code, state->data1, state->data2); |
| 415 delete state; | 415 delete state; |
| 416 // stop timer | 416 // stop timer |
| 417 return 0; | 417 return 0; |
| 418 } | 418 } |
| 419 | 419 |
| 420 // Factor, so we can hide class MultimediaSDL from the outside world | 420 // Factor, so we can hide class MultimediaSDL from the outside world |
| 421 IMultimedia* MakeMultimediaSDL(int width, int heigth, const char* title) { | 421 IMultimedia* MakeMultimediaSDL(int width, int heigth, const char* title) { |
| 422 return new MultimediaSDL(width, heigth, title); | 422 return new MultimediaSDL(width, heigth, title); |
| 423 } | 423 } |
| OLD | NEW |