-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from heuer/issue_155
Added support for the Single-pixel buffer protocol.
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from pywayland.server import Display | ||
|
||
from wlroots import Ptr, lib | ||
|
||
|
||
class SinglePixelBufferManagerV1(Ptr): | ||
"""Global factory for single-pixel buffers. | ||
This protocol extension allows clients to create single-pixel buffers. | ||
Compositors supporting this protocol extension should also support the | ||
viewporter protocol extension (see wlr_types.viewporter.Viewporter). | ||
Clients may use viewporter to scale a single-pixel buffer to a desired size. | ||
""" | ||
|
||
def __init__(self, display: Display) -> None: | ||
"""Binds the manager to the provided display. | ||
:param display: The wayland display | ||
""" | ||
self._ptr = lib.wlr_single_pixel_buffer_manager_v1_create(display._ptr) |