Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Unified Diff: mojo/public/python/mojo/c_environment.pxd

Issue 552783004: mojo: Add a runloop utility in python (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not acquire GIL when called from python. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/python/BUILD.gn ('k') | mojo/public/python/mojo/system.pyx » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/python/mojo/c_environment.pxd
diff --git a/mojo/public/python/mojo/c_environment.pxd b/mojo/public/python/mojo/c_environment.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..d720da6184a32427958c0388e087944e6b20d66c
--- /dev/null
+++ b/mojo/public/python/mojo/c_environment.pxd
@@ -0,0 +1,31 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# distutils: language = c++
+
+from libc.stdint cimport int64_t
+
+
+cdef extern from "mojo/public/cpp/bindings/callback.h" nogil:
+ cdef cppclass CClosure "mojo::Callback<void()>":
+ CClosure()
+ CClosure(CRunnable)
+
+
+cdef extern from "mojo/public/python/src/python_system_helper.h" \
+ namespace "mojo" nogil:
+ cdef CClosure BuildClosure(object)
+
+
+cdef extern from "mojo/public/cpp/utility/run_loop.h" nogil:
+ cdef cppclass CRunLoop "mojo::RunLoop":
+ CRunLoop()
+ void Run() except *
+ void RunUntilIdle() except *
+ void Quit()
+ void PostDelayedTask(CClosure& task, int64_t delay)
+
+cdef extern from "mojo/public/cpp/environment/environment.h" nogil:
+ cdef cppclass CEnvironment "mojo::Environment":
+ CEnvironment()
« no previous file with comments | « mojo/public/python/BUILD.gn ('k') | mojo/public/python/mojo/system.pyx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698