Is there any example to write a wayland desktop app?

mx mxmxmx0429 at qq.com
Mon Oct 25 05:48:03 UTC 2021


Hi,
   That's cool, thank you!




------------------ Original ------------------
From:                                                                                                                        "M Stoeckl"                                                                                    <wayl at mstoeckl.com>;
Date: Mon, Oct 25, 2021 12:43 PM
To: "mx"<mxmxmx0429 at qq.com>;
Cc: "wayland-devel"<wayland-devel at lists.freedesktop.org>;
Subject: Re: Is there any example to write a wayland desktop app?



> I just want to write a library. Qt is good enough to be
> used to write an excellent app, but that's not my purpose. I now
> study wayland at "https://wayland-book.com/introduction.html". And I
> need a good example to get start. Even though the menu, popup and mdi
> are basic elements, they are the foundation of almost every apps.

Weston does have a fairly simple toolkit that it uses for its test
clients, which supports popup menus, but doesn't provide much more
than a window frame, and an abstract widget framework; definitely not
a multiple-document interface. Because I haven't actually used it
myself, or looked very much at its source code, I cannot say whether
this "Toytoolkit" would be a _good_ example for your purposes.

Toytoolkit uses Cairo for rendering, and much of its source code
is spread over the following files.

https://gitlab.freedesktop.org/wayland/weston/-/blob/main/clients/window.c
https://gitlab.freedesktop.org/wayland/weston/-/blob/main/shared/cairo-util.c
https://gitlab.freedesktop.org/wayland/weston/-/blob/main/shared/frame.c

Some of the more interesting clients that use this toolkit:

https://gitlab.freedesktop.org/wayland/weston/-/blob/main/clients/terminal.c
https://gitlab.freedesktop.org/wayland/weston/-/blob/main/clients/editor.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20211025/35d82643/attachment.htm>


More information about the wayland-devel mailing list