How to use the cefpython3.cefpython.MessageLoopWork function in cefpython3

To help you get started, we’ve selected a few cefpython3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cztomczak / cefpython / unittests / _common.py View on Github external
def run_message_loop():
    # Run message loop for some time.
    # noinspection PyTypeChecker
    for i in range(MESSAGE_LOOP_RANGE):
        cef.MessageLoopWork()
        time.sleep(0.01)
    subtest_message("cef.MessageLoopWork() ok")
github cztomczak / cefpython / unittests / _common.py View on Github external
def do_message_loop_work(work_loops):
    # noinspection PyTypeChecker
    for i in range(work_loops):
        cef.MessageLoopWork()
        time.sleep(0.01)
github cztomczak / cefpython / src / windows / deprecated_32bit / pygtk_.py View on Github external
def OnTimer(self):
        if self.exiting:
            return False
        cefpython.MessageLoopWork()
        return True
github cztomczak / cefpython / cefpython / wx / chromectrl.py View on Github external
def MessageLoopTimer(event):
    cefpython.MessageLoopWork()
github cztomczak / cefpython / src / linux / binaries_64bit / wxpython-response.py View on Github external
def OnTimer(self, event):
        self.timerCount += 1
        # print("wxpython.py: OnTimer() %d" % self.timerCount)
        cefpython.MessageLoopWork()
github cztomczak / cefpython / examples / pysdl2.py View on Github external
"unmodified_character": keycode,
                            "modifiers": cef.EVENTFLAG_NONE
                        }
                        browser.SendKeyEvent(key_event)
        # Clear the renderer
        sdl2.SDL_SetRenderDrawColor(
            renderer,
            backgroundColour.r,
            backgroundColour.g,
            backgroundColour.b,
            255
        )
        sdl2.SDL_RenderClear(renderer)
        # Tell CEF to update which will trigger the OnPaint
        # method of the RenderHandler instance
        cef.MessageLoopWork()
        # Update display
        sdl2.SDL_RenderCopy(
            renderer,
            renderHandler.texture,
            None,
            sdl2.SDL_Rect(0, headerHeight, browserWidth, browserHeight)
        )
        sdl2.SDL_RenderPresent(renderer)
        # FPS debug code
        frames += 1
        if sdl2.timer.SDL_GetTicks() - fpsTime > 1000:
            logging.debug("FPS: %d" % frames)
            frames = 0
            resetFpsTime = True
        # regulate frame rate
        if sdl2.timer.SDL_GetTicks() - startTime < 1000.0 / frameRate:
github dzikoysk / cefstream / src / cef / cef_manager.py View on Github external
def message_loop(self):
        self.cefstream.get_logger().info("Calling message loop")

        while self.running:
            cef.MessageLoopWork()

        self.shutdown_cef()
github cztomczak / cefpython / src / linux / binaries_64bit / kivy_.py View on Github external
def _message_loop_work(self, *_):
        """Get called every frame."""
        self.count += 1
        # print(self.count)
        cef.MessageLoopWork()
        self.on_mouse_move_emulate()

        # From Kivy docs:
        # Clock.schedule_once(my_callback, 0) # call after the next frame
        # Clock.schedule_once(my_callback, -1) # call before the next frame

        # When scheduling "after the next frame" Kivy calls _message_loop_work
        # in about 13ms intervals. We use a small trick to make this 6ms
        # interval by scheduling it alternately before and after the next
        # frame. This gives better User Experience when scrolling.
        # See Issue #240 for more details on OSR performance.
        if self.count % 2 == 0:
            Clock.schedule_once(self._message_loop_work, 0)
        else:
            Clock.schedule_once(self._message_loop_work, -1)
github Srinivas11789 / PcapXray / Source / Module / interactive_gui.py View on Github external
def message_loop_work(self):
        cef.MessageLoopWork()
        self.after(10, self.message_loop_work)