style: format app-capture README code examples

Add blank lines between function definitions per PEP 8.
This commit is contained in:
sankalp committed 2026-07-28 10:01:18 +05:45
1 parent f0c0e27e82
commit 1b4c319fdb
1 file changed
+4
@@ -38,9 +38,11 @@ Once compiled, you can easily load the library into any Python script using PyGO
```python
import gi
gi.require_version("AppCapture", "1.0")
from gi.repository import AppCapture
def on_frame_ready(capture, address, data, width, height, stride):
# 'data' is a GLib.Bytes object containing the raw ARGB32 pixel data
# Convert it to a Cairo Surface or GdkPixbuf
@@ -49,9 +51,11 @@ def on_frame_ready(capture, address, data, width, height, stride):
# Example: Request the next frame, but wait for damage (0% CPU idle)
capture.capture_by_handle(address, 300, 168, True)
def on_frame_failed(capture, address, reason):
print(f"Failed to capture {address}: {reason}")
# 1. Initialize the capture module
capture = AppCapture.Capture()
capture.connect("frame-ready", on_frame_ready)