<meta http-equiv="Content-Type" content="text/html; charset=GB18030"><div>Hi,</div><div>   That's cool, thank you!</div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From:</b>                                                                                                                        "M Stoeckl"                                                                                    <wayl@mstoeckl.com>;</div><div><b>Date:</b> Mon, Oct 25, 2021 12:43 PM</div><div><b>To:</b> "mx"<mxmxmx0429@qq.com>;<wbr></div><div><b>Cc:</b> "wayland-devel"<wayland-devel@lists.freedesktop.org>;<wbr></div><div><b>Subject:</b> Re: Is there any example to write a wayland desktop app?</div></div><div><br></div>> I just want to write a library. Qt is good enough to be<br>> used to write an excellent app, but that's not my purpose. I now<br>> study wayland at "https://wayland-book.com/introduction.html". And I<br>> need a good example to get start. Even though the menu, popup and mdi<br>> are basic elements, they are the foundation of almost every apps.<br><br>Weston does have a fairly simple toolkit that it uses for its test<br>clients, which supports popup menus, but doesn't provide much more<br>than a window frame, and an abstract widget framework; definitely not<br>a multiple-document interface. Because I haven't actually used it<br>myself, or looked very much at its source code, I cannot say whether<br>this "Toytoolkit" would be a _good_ example for your purposes.<br><br>Toytoolkit uses Cairo for rendering, and much of its source code<br>is spread over the following files.<br><br>https://gitlab.freedesktop.org/wayland/weston/-/blob/main/clients/window.c<br>https://gitlab.freedesktop.org/wayland/weston/-/blob/main/shared/cairo-util.c<br>https://gitlab.freedesktop.org/wayland/weston/-/blob/main/shared/frame.c<br><br>Some of the more interesting clients that use this toolkit:<br><br>https://gitlab.freedesktop.org/wayland/weston/-/blob/main/clients/terminal.c<br>https://gitlab.freedesktop.org/wayland/weston/-/blob/main/clients/editor.c</div>