Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / mojo / public / python / mojo / c_environment.pxd
1 # Copyright 2014 The Chromium 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 # distutils: language = c++
6
7 from libc.stdint cimport int64_t, intptr_t, uint32_t, uint64_t
8
9
10 cdef extern from "mojo/public/c/system/core.h" nogil:
11   ctypedef uint32_t MojoHandle
12   ctypedef uint64_t MojoDeadline
13   ctypedef uint32_t MojoHandleSignals
14
15
16 cdef extern from "mojo/public/cpp/bindings/callback.h" nogil:
17   cdef cppclass CClosure "mojo::Callback<void()>":
18     CClosure()
19
20
21 cdef extern from "mojo/public/c/environment/async_waiter.h"  nogil:
22   ctypedef intptr_t MojoAsyncWaitID
23
24
25 cdef extern from "mojo/public/python/src/python_system_helper.h" \
26     namespace "mojo::python" nogil:
27   cdef CClosure BuildClosure(object)
28   cdef cppclass PythonAsyncWaiter "mojo::python::PythonAsyncWaiter":
29     PythonAsyncWaiter()
30     MojoAsyncWaitID AsyncWait(MojoHandle,
31                               MojoHandleSignals,
32                               MojoDeadline,
33                               object)
34     void CancelWait(MojoAsyncWaitID)
35
36
37 cdef extern from "mojo/public/cpp/utility/run_loop.h" nogil:
38   cdef cppclass CRunLoop "mojo::RunLoop":
39     CRunLoop()
40     void Run() except *
41     void RunUntilIdle() except *
42     void Quit()
43     void PostDelayedTask(CClosure&, int64_t)
44   cdef CRunLoop CRunLoopCurrent "mojo::RunLoop::current"()
45
46
47 cdef extern from "mojo/public/cpp/environment/environment.h" nogil:
48   cdef cppclass CEnvironment "mojo::Environment":
49     CEnvironment()