wlmaker-0.7.1/0000755000175100017510000000000015144077706012602 5ustar runnerrunnerwlmaker-0.7.1/libcairo-fontconfig.supp0000644000175100017510000000206515144077706017434 0ustar runnerrunner{ Memcheck:Leak match-leak-kinds: definite fun:malloc obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 fun:FcPatternDuplicate obj:/usr/lib/x86_64-linux-gnu/libcairo.so.2.11600.0 obj:/usr/lib/x86_64-linux-gnu/libcairo.so.2.11600.0 fun:cairo_toy_font_face_create fun:cairo_select_font_face fun:* } { Memcheck:Leak match-leak-kinds: definite fun:malloc obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 obj:/usr/lib/x86_64-linux-gnu/libexpat.so.1.8.10 obj:/usr/lib/x86_64-linux-gnu/libexpat.so.1.8.10 obj:/usr/lib/x86_64-linux-gnu/libexpat.so.1.8.10 fun:XML_ParseBuffer obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 obj:/usr/lib/x86_64-linux-gnu/libfontconfig.so.1.12.0 } wlmaker-0.7.1/README.md0000644000175100017510000000770715144077706014074 0ustar runnerrunner# WaylandMaker - wlmaker A [Wayland](https://wayland.freedesktop.org/) compositor inspired by [Window Maker](https://www.windowmaker.org/). Key features: * Compositor for windows in stacking mode. * Supports multiple workspaces. * Appearance inspired by Window Maker, following the look and feel of NeXTSTEP. * Easy to use, lightweight, low gimmicks and fast. * Dock and clip, to be extended for dockable apps. How it looks, running in a window using the default theme: ![Screenshot of wlmaker running in a window](doc/wlmaker-default-screenshot.png) ### Current status **Early access**: Wayland Maker covers elementary compositor functionality on single-monitor output. Please report what's missing or broken! See [here](doc/FEATURES.md) for a detailed list of implemented or planned features, or the [roadmap](doc/ROADMAP.md) for what's planned for the upcoming versions. Highlights for current version ([0.7.1](https://github.com/phkaeser/wlmaker/releases/tag/v0.7.1)): * *new* Support for copy-paste and middle-click paste. * *new* Read keyboard configuration from `/etc/default/keyboard`. * *new* DockApps for monitoring CPU, Memory and Network. * *new* `wlmtool`, eliminating the need for depending on `wmmenugen`. * *new* Various bug fixes ([#438](https://github.com/phkaeser/wlmaker/issues/438), [#439](https://github.com/phkaeser/wlmaker/issues/439), [#444](https://github.com/phkaeser/wlmaker/issues/444)). * *new* Builds with [wlroots 0.18, 0.19 and 0.20](https://gitlab.freedesktop.org/wlroots/wlroots/-/tags). * Support for multiple outputs, configuable through `wlr-output-management-unstable-v1` protocol (eg. `wlr-randr`, `wdisplays`). * [Root menu](https://phkaeser.github.io/wlmaker/root_menu.html) can be generated from XDG repository ([#90](https://github.com/phkaeser/wlmaker/issues/90), eg. `wmmenugen`), and can be navigated by keyboard. * Screen saver support, through `ext-session-lock-v1` and `idle-inhibit-unstable-v1` protocols. * Hot corners with configurable actions, default to 'lock' or 'inhibit' locking. * Configurable through plist text files: [base configuration](etc/wlmaker.plist), [style](etc/style.plist), [root menu](etc/root-menu.plist) and [docks & workspaces](etc/wlmaker-state.plist). * wlr layer shell support (`wlr-layer-shell-unstable-v1`), fully implemented & tested. * Appearance matches Window Maker: Decorations, dock, clip. * Support for Wayland XDG shell (mostly complete. Bug reports welcome). * Initial support for X11 applications (positioning and specific modes are missing). Use `--start_xwayland` argument to enable XWayland, it's off by default. * Prototype DockApps (`apps/wlmclock`, `apps/wlmeyes`). ### All the details? See http://phkaeser.github.io/wlmaker for: * How to configure wlmaker. * Startup options. * Supported Wayland protocols. ### Build & use it! * From source: Please follow the [detailed build instructions](doc/BUILD.md) for a step-by-step guide. * Once compiled, see the [these instructions](doc/RUN.md) on how to run Wayland Maker in a window or standalone, and to configure it for your needs. * Alternatively, use a pre-built package: [![Packaging status](https://repology.org/badge/vertical-allrepos/wlmaker.svg)](https://repology.org/project/wlmaker/versions) ## Contributing Contributions, help and bug reports are highly welcome! See [`CONTRIBUTING.md`](CONTRIBUTING.md) for details, and [code of conduct](CODE_OF_CONDUCT.md) for more. ## License Apache 2.0; see [`LICENSE`](LICENSE) for details. ## Disclaimer This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose. [#147](https://github.com/phkaeser/wlmaker/issues/147): Why is every file copyrighted by Google, then? Google happens to be the primary author's employer, and the copyright note is default recommended Open Source procedure. wlmaker-0.7.1/tests/0000755000175100017510000000000015144077706013744 5ustar runnerrunnerwlmaker-0.7.1/tests/wlmaker_test.c0000644000175100017510000000461215144077706016614 0ustar runnerrunner/* ========================================================================= */ /** * @file wlmaker_test.c * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include "action.h" #include "action_item.h" #include "backtrace.h" #include "clip.h" #include "config.h" #include "corner.h" #include "dock.h" #include "files.h" #include "keyboard.h" #include "launcher.h" #include "layer_panel.h" #include "lock_mgr.h" #include "root_menu.h" #include "server.h" #include "xdg_decoration.h" #include "xdg_toplevel.h" #if defined(WLMAKER_HAVE_XWAYLAND) #include "xwl_surface.h" #endif // defined(WLMAKER_HAVE_XWAYLAND) #if !defined(TEST_DATA_DIR) /** Directory root for looking up test data. See `bs_test_resolve_path`. */ #define TEST_DATA_DIR "./" #endif // TEST_DATA_DIR /** Main program, runs the unit tests. */ int main(int argc, const char **argv) { if (!wlmaker_backtrace_setup(argv[0])) return EXIT_FAILURE; const bs_test_param_t params = { .test_data_dir_ptr = TEST_DATA_DIR }; const bs_test_set_t* sets[] = { &wlmaker_action_item_test_set, &wlmaker_action_test_set, &wlmaker_clip_test_set, &wlmaker_config_test_set, &wlmaker_corner_test_set, &wlmaker_dock_test_set, &wlmaker_files_test_set, &wlmaker_keyboard_test_set, &wlmaker_launcher_test_set, &wlmaker_layer_panel_test_set, &wlmaker_lock_mgr_test_set, &wlmaker_root_menu_test_set, &wlmaker_server_test_set, &wlmaker_xdg_decoration_test_set, &wlmaker_xdg_toplevel_test_set, #if defined(WLMAKER_HAVE_XWAYLAND) &wlmaker_xwl_surface_test_set, #endif // defined(WLMAKER_HAVE_XWAYLAND) NULL }; return bs_test_sets(sets, argc, argv, ¶ms); } /* == End of wlmaker_test.c ================================================ */ wlmaker-0.7.1/tests/toolkit_test.c0000644000175100017510000000601415144077706016635 0ustar runnerrunner/* ========================================================================= */ /** * @file toolkit_test.c * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #include "toolkit/toolkit.h" /** Toolkit unit tests. */ const bs_test_set_t toolkit_tests[] = { BS_TEST_SET(true, "base", wlmtk_base_test_cases), BS_TEST_SET(true, "bordered", wlmtk_bordered_test_cases), BS_TEST_SET(true, "box", wlmtk_box_test_cases), BS_TEST_SET(true, "buffer", wlmtk_buffer_test_cases), BS_TEST_SET(true, "button", wlmtk_button_test_cases), BS_TEST_SET(true, "container", wlmtk_container_test_cases), BS_TEST_SET(true, "dock", wlmtk_dock_test_cases), BS_TEST_SET(true, "element", wlmtk_element_test_cases), BS_TEST_SET(true, "fsm", wlmtk_fsm_test_cases), BS_TEST_SET(true, "image", wlmtk_image_test_cases), BS_TEST_SET(true, "layer", wlmtk_layer_test_cases), BS_TEST_SET(true, "menu", wlmtk_menu_test_cases), BS_TEST_SET(true, "menu_item", wlmtk_menu_item_test_cases), BS_TEST_SET(true, "output_tracker", wlmtk_output_tracker_test_cases), BS_TEST_SET(true, "panel", wlmtk_panel_test_cases), BS_TEST_SET(true, "primitives", wlmaker_primitives_test_cases), BS_TEST_SET(true, "rectangle", wlmtk_rectangle_test_cases), BS_TEST_SET(true, "resizebar", wlmtk_resizebar_test_cases), BS_TEST_SET(true, "resizebar_area", wlmtk_resizebar_area_test_cases), BS_TEST_SET(true, "root", wlmtk_root_test_cases), BS_TEST_SET(true, "surface", wlmtk_surface_test_cases), BS_TEST_SET(true, "tile", wlmtk_tile_test_cases), BS_TEST_SET(true, "titlebar", wlmtk_titlebar_test_cases), BS_TEST_SET(true, "titlebar_button", wlmtk_titlebar_button_test_cases), BS_TEST_SET(true, "titlebar_title", wlmtk_titlebar_title_test_cases), BS_TEST_SET(true, "util", wlmtk_util_test_cases), BS_TEST_SET(true, "window", wlmtk_window_test_cases), BS_TEST_SET(true, "workspace", wlmtk_workspace_test_cases), BS_TEST_SET(0, NULL, NULL) }; #if !defined(TEST_DATA_DIR) /** Directory root for looking up test data. See `bs_test_resolve_path`. */ #define TEST_DATA_DIR "./" #endif // TEST_DATA_DIR /** Main program, runs the unit tests. */ int main(int argc, const char **argv) { const bs_test_param_t params = { .test_data_dir_ptr = TEST_DATA_DIR }; return bs_test(toolkit_tests, argc, argv, ¶ms); } /* == End of toolkit_test.c ================================================ */ wlmaker-0.7.1/tests/CMakeLists.txt0000644000175100017510000000411715144077706016507 0ustar runnerrunner# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ADD_EXECUTABLE(backend_test backend_test.c) ADD_DEPENDENCIES(backend_test backend) TARGET_LINK_LIBRARIES(backend_test backend) ADD_TEST(NAME backend_test COMMAND backend_test) ADD_EXECUTABLE(toolkit_test toolkit_test.c) TARGET_LINK_LIBRARIES(toolkit_test toolkit) TARGET_INCLUDE_DIRECTORIES( toolkit_test PRIVATE ${PROJECT_SOURCE_DIR}/include/toolkit) TARGET_COMPILE_DEFINITIONS( toolkit_test PUBLIC TEST_DATA_DIR="${PROJECT_SOURCE_DIR}/tests/data") ADD_TEST(NAME toolkit_test COMMAND toolkit_test) ADD_EXECUTABLE(wlmaker_test wlmaker_test.c) ADD_DEPENDENCIES(wlmaker_test wlmaker_lib) TARGET_INCLUDE_DIRECTORIES( wlmaker_test PRIVATE ${PROJECT_SOURCE_DIR}/src) TARGET_LINK_LIBRARIES(wlmaker_test PRIVATE wlmaker_lib) TARGET_COMPILE_DEFINITIONS( wlmaker_test PUBLIC TEST_DATA_DIR="${PROJECT_SOURCE_DIR}/tests/data") ADD_TEST(NAME wlmaker_test COMMAND wlmaker_test) ADD_EXECUTABLE(desktop_parser_test desktop_parser_test.c) ADD_DEPENDENCIES(desktop_parser_test libbase desktop-parser) TARGET_LINK_LIBRARIES( desktop_parser_test desktop-parser libbase) TARGET_COMPILE_DEFINITIONS( desktop_parser_test PUBLIC TEST_DATA_DIR="${PROJECT_SOURCE_DIR}/tests/data") IF(iwyu_path_and_options) SET_TARGET_PROPERTIES( backend_test PROPERTIES C_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}") SET_TARGET_PROPERTIES( toolkit_test PROPERTIES C_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}") SET_TARGET_PROPERTIES( wlmaker_test PROPERTIES C_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}") ENDIF(iwyu_path_and_options) wlmaker-0.7.1/tests/data/0000755000175100017510000000000015144077706014655 5ustar runnerrunnerwlmaker-0.7.1/tests/data/clip_pressed.png0000644000175100017510000000311115144077706020033 0ustar runnerrunnerPNG  IHDR@@% bKGDIDATh՚[oE:HCNNlp-M+Ԫ~Tp$hA9\ !v|HlvC%w7nbv7TMf}+yOTM:|w ^;pd^rqp*}|jcWl ?X*~7NTM'F!jj'cg2ܬcozF8ٹiriI]޾^Ndm{nnD\#3;{s!|ێ^FEڶNT'TuWG镨כ,,fm˙ΐ*UϽučpB7FTCu JlW\Y['#ygӫ:D ^ɕe;w2A '+esYJQR ^z%*:)O,V%-WCT* Jw{ӫ!5kbb#ӡW\եѢW\xuuqp X("J>`L%hSEDLՁ{1QzSopӻQZ(t, z7 FޭKAIu"H ,Iz¯*!EKGnzoY(p@D1r;Az E!*=$/)zB<~,5MvڔLD Gѣ2Żfډ=_hhfv t=0|j 7I_29R]C=Z ~nxוr AEwG_n|S:n-47!HHoR(HY[GwUSu $gW>DsLJR4 M5%'csAf[mߣdBO3kk.xo;hj^ۻsdz@';{M|J_~R޽q fK9IENDB`wlmaker-0.7.1/tests/data/toolkit/0000755000175100017510000000000015144077706016342 5ustar runnerrunnerwlmaker-0.7.1/tests/data/toolkit/primitive_fill_adgradient.png0000644000175100017510000000021315144077706024244 0ustar runnerrunnerPNG  IHDRbKGD@IDATcRdbfcdf#deafab"J)FP+~ 4`QKN(E@R vJBIENDB`wlmaker-0.7.1/tests/data/toolkit/primitive_close_icon_large.png0000644000175100017510000000050015144077706024422 0ustar runnerrunnerPNG  IHDR22?bKGDIDAThK EIcҝQ?Ӊ&/1< "B!P -PU5fuf s$XrfhWBDlHW8A 2 8v }ށ>K%`2f%OisH؝);elI$ؔ! Úx]9GDgqσ/gϘ Q¦LXܱ#;31^䳙9 -J9SŪn1e< !B+7sIENDB`wlmaker-0.7.1/tests/data/toolkit/title_blurred.png0000644000175100017510000000105715144077706021713 0ustar runnerrunnerPNG  IHDRZPBbKGDIDATXߪ@LbET/ *utd]D!R!Pb@8sS{jXp%ah4`8Z[1f^(Pؑ#58!d2 Naum۞[Ώ;vA<pq!^$UU%Ir]cj ][y"ݝft(  |ܱ:BjZ7vw) 1 ۘlB&~qLP8$8vLך!EkcL.=~Y,A D:$ 2B(!ttB\hh Bv0WfBr,Ȩ(9Ӑt&)@!# ڍ'XJ-}<'dntT$D4=ͩ[<7X-퍭__K8 %ӆZZ,DAL4mziZH^[.bZk:WTV{cWCLS^k',z iɁ(c4v fI`hmP]SMj!uf,B\DM @@nT]C78fM+6xSn–3_<9jEע}]<)ZaВ!}^YSd!&:'Ԃ;$ݞo3!>PJ9b[l(L;ۼw$*)*mֱ7$k9W +wwO4W8:ALU^=5ܒ?ŭn|p \24mW 6 є\1}9wm[ȷ rb_ef/btrR3M9G^>lBzϬ &kI\az;fDEL#]%+Qe'lRG֟Tbx`zt,mỻpcZQi™KtZo<~OツҦv>UŒV 4/ZD{y\ǑSlnl,31FJD",VB9YhnlT7'U߼ADJT"_k DQ֎jHO;z<tB)v_f1M02(.-(ܲjU<&- Ez8YDĝviY'H&!w OCk,{Ҿugh4Oͧoth%5a"" *m\oc~]3'n= vT[biW^d %s˻O ̞|5*P^؄QW}޺ˆ8q4x7179V.Wy .3εtti2kX`H }).Au購Zf9*LӰ3/fن 9:?7³qWw.-jDˡG WݿhJa5;SE^D oʚJ`A<8jmP@t7o ѵ,u\&s6.uZw/4ey-;.gr,حL($4\YQe"ՖXĂ+ ELY.aY'@]%1>fUѬ鶙I%\~UabBR,cN_.β9Ԃ8MAXeX֕= #}e4HaK!@FTa#NN '}#_$L r, ZũI/)z_c|;N>Wz_k7:Z.;\OdJ}S׼8}U88Jpwoir>߮b pHYs.#.#x?vtIME.DtEXtCommentCreated with GIMPW IDATcph8tIENDB`wlmaker-0.7.1/tests/data/toolkit/primitive_window_title.png0000644000175100017510000000066315144077706023655 0ustar runnerrunnerPNG  IHDRPWbKGDhIDATX햭KA &~p6Ѧ(l^m6M/LA$pA fAA_9ܭ坙gv@ LՕtIےF+UIt'䞁wקǵ)8LMt76 $ݹ|مgȸ20WI{%J:4VK˒*/T[ IJ>$e\ KlfXoT$"s1'I\mf,෋i,`-{jߺefy3Og=^7W%q, \7KAW|-ēfV& Lg]y@k9.`IENDB`wlmaker-0.7.1/tests/data/toolkit/title_focussed.png0000644000175100017510000000104515144077706022064 0ustar runnerrunnerPNG  IHDRZPBbKGDIDATX혿KqRI̥+jjp)ZAȱI B)p !C$i;:J_ ɕDuw{/{~xxi3w@0X:::afg\Z6OOLLpw(ZCJH`ah  Z-\. Y?:"{{Ύ|zxxx'F%D <VyNO"Qs{ pxH2hY,B|TJ 15.iO#\]cc1Jc~,?af7i=Fi.:mKnn:ZMQL+@I*E*#N'ŧxyX^N=aeEj5h% tt"LN*꯯DlnvcˑHP, FI:!擓$ecPxЧq=IENDB`wlmaker-0.7.1/tests/data/toolkit/primitive_close_icon.png0000644000175100017510000000030615144077706023254 0ustar runnerrunnerPNG  IHDRĴl;bKGD{IDAT8A W}11/<`D(A &J'\<'Ct']X՛݁'ؓ$s% *P+|^q+ ٕ0G:$IENDB`wlmaker-0.7.1/tests/data/toolkit/primitive_fill_vgradient.png0000644000175100017510000000014615144077706024132 0ustar runnerrunnerPNG  IHDRbKGDIDATcVa H > 4;AtIENDB`wlmaker-0.7.1/tests/data/toolkit/title_blurred_short.png0000644000175100017510000000104015144077706023122 0ustar runnerrunnerPNG  IHDRF}$bKGDIDATXߪ@LbET/ *utd]D!R!Pb@>]ڛ~W}y3 ~~h%wcl6,꺞G,k( R(yʒ%qqa!4 $c0 nJQ@V;>۶]UU!rLmVqz-"ByJǦiZ-IqDzo x71ƏqO<+QhIENDB`wlmaker-0.7.1/tests/data/toolkit/menu_item_submenu_disabled.png0000644000175100017510000000343115144077706024420 0ustar runnerrunnerPNG  IHDRPxbKGDIDATXW]lW=knvn\;I4Q6BPU> oE"UT@6׭J_^;;Rwws^&  I?`W5HY? .B>/.4 |{?$hB R ܆B%`(se uaDVӆ綳 S6,^XO |:Qmh7TF!pqh;\ٽG,jf%QXtTK2":E,@ P* яHX$+j,72/OMA+ʗ϶۟ S iHHR>i;-H!+%) մcEHQF14T0A~bibz>j9,^o'Rq! w*h1wmZu`lM ݱɍKOdn $GY0\C̮' A!Ah9(moɱp&s.`xr͹ӏ;\ܲ ;Fꃍ=]>PVzDg2}~vԚ689ܽj_EW%gq4+漀[K[_|W?`IqlʵLRnLzҫS^e!cT-?kN U zsm$61m6f'Yw-NU\iݖ؟:]Ֆ#6j毦󑛠)ҪΤ ,ZpUq^T(L!}/L>KV/'m"O!%J8Phѝ/'rȥdS"ZiM` Y6[:H2F9!^^ctV$АʗZXJ VỚdW/J,mUkBH19R4,%]T!M[Ŕ-fVNbh`JԄea깔3 %l˜°$^rDjkG~glzg8Sݙ 0Xf}aֹg7zo}`RNƳ z2RLU]: (ؑw^Ա_Τ/J#g3)K<{j iijT`^/~?{v>iHt`@.~jx/pve| qojr\Fxxygw^]s\Fx-f]z%I^RB\T`>5%5:/XjZQ; J肪ð}δbve!jaGz/XVg!jx= ;aADO\qG\2l;`*jzyLNAHqA@H ;/*. wj7K(P0ס!DBDjoh0IENDB`wlmaker-0.7.1/tests/data/toolkit/title_button_blurred.png0000644000175100017510000000057315144077706023310 0ustar runnerrunnerPNG  IHDRKlbKGD0IDAT8SJ@n+ 6B'. 8:{+ o?!6rXyrŕٽbaML472{ 2`@0(dYo ι3D|/i~vyQ-+p&JzQ.%4;ޥYoZH49?=>;9x!%exʋJ&BZu */*#μqZ\袈pvuBRJ&qr"=^?FKsZT(,Jf=2Ƭc}ߚ眷Eܝ?ckв,9C(>y%^jIENDB`wlmaker-0.7.1/tests/data/toolkit/title_button_focussed_released.png0000644000175100017510000000060515144077706025324 0ustar runnerrunnerPNG  IHDRKlbKGD:IDAT8͓=0m CH>鑕$' is 蓂#D,P\ =vdo݈&KWf`>BsZ0z[!!A~Q}R(<)#]@lwPꦩg'4]P,[,$1\tM K%,HJ00k;9/'X c4,Z !z<7¶JJeY0lnAe?|:UE%@LBk:}Y,>cj5 F7Mo*p8r^A|jPIENDB`wlmaker-0.7.1/tests/data/toolkit/menu_item_highlighted.png0000644000175100017510000000203215144077706023367 0ustar runnerrunnerPNG  IHDRPxbKGDIDATXc|3Èga``@N3LzQwKKYG  /:H#|3`??Mlÿzȹˏi 6V o#vvͧ.<-8=,/z#8>QV# UvV0004HOncbbb``s;o?! >}lɫ7hihϿEyNKמ`j8?jWL`e``sƙ *r}a``sqQ[J A99e27kB23sH 6i 3~o"-B LF:r.?:w!rzf``XvY{Z;4)>yǑm@e+wݧ>jH#++ˋNw?]?sX3?s ?~*=-5oiIbVNK֞螾P)9̌ɑ66{4Rڸ·ᅡ< I `|3=?afbba6h۬nHF=<0cO&C3tIENDB`wlmaker-0.7.1/tests/data/toolkit/resizebar_area_released.png0000644000175100017510000000017315144077706023673 0ustar runnerrunnerPNG  IHDR ;sbKGD0IDATcܿy^y Uxz 1@gE,[֯3~E M#3IENDB`wlmaker-0.7.1/tests/data/toolkit/menu_item_submenu_highlighted.png0000644000175100017510000000225015144077706025127 0ustar runnerrunnerPNG  IHDRPxbKGD]IDATXWmL[U> ^hRUXdKLh25N8b ..cEh,FfiD_,ӍYXIR]Ki{{sQeۖ }|q8g::vםdkDtˍU+ aߡST5mN44Dޙ 2 , Kˠ#o$Yz\ cI#I:* 0&]U$I2"q?v+vפ=qEkB(`OBgSQAw>|[ًBGFpeܶ>"HDB #~*W!r>AQ.߬]F^"mi:rYsXD!=\I-x)a JǪΞޔ4]_IENDB`wlmaker-0.7.1/tests/data/toolkit/primitive_text.png0000644000175100017510000000163415144077706022130 0ustar runnerrunnerPNG  IHDRPغbKGDQIDATXOhe?M9-2/h40lC"2'caYċ<z|Rh Po`WAH:\0cKmØĸ5矖_ 4J6lDfGvoT:7^PM~RV /.oG2NoN!] 9Xc5 s20p)訂w< GN6 )Yu@ׁsR|yl'b'~a841}V 4hРAU LɈn'IENDB`wlmaker-0.7.1/tests/data/toolkit/title_button_focussed_pressed.png0000644000175100017510000000066415144077706025212 0ustar runnerrunnerPNG  IHDRKlbKGDiIDAT8͓n@Ǐ+wKOIh;0!q"}} > w1:Х`Pz[w|?Wp Z#t]XuQDQ^Ey+rR)) 0#JCc|!j\ji al1cfr^WUREۏiu`Suc$iYT= L3L!Щ?gȕYp'ɤO9ۖ+3PXFp!mUePuOi4YV{,{e 䗧iNY|e}|QA3 *0z.݂v^cIENDB`wlmaker-0.7.1/tests/data/toolkit/menu_item_submenu_enabled.png0000644000175100017510000000357715144077706024256 0ustar runnerrunnerPNG  IHDRPxbKGD4IDATXWklTE>g-]B J PQTBTd(>P,! EABD0/ P*﷥ȣ@+iK;wI}D_3;3swsv~ _XHL!rd[Y7A1P@$@"$ ADk:@`֪ `ٍ_{kdf\w 1Xml+@_DyT7gNׇ挡>ed4Q`ðeG9G$5H L/@q$AXp6) ȱ>Zr4ٙ,G+KZ̏c,S"嫷z"HEBo'xNfR fCfD0VŠ6?%. [-$,]dkaq7a _>fЅ8Zn. eaÉcA պؑ QB`0 bXA$բHT\}PD4$^/eo{%#,fL9ESA0'٣*+s ˎ"wYFQpHs-WU]/&ʱ==9( 䱵c?x ˂+9흭_kѓ23{tofFcᖁ^Ow߁^iɡGP)VTGOC 2lc=ftlK_l$ͤ NUц&[ku]~dm(\=ĪuoJx7Rc!?W))'D3:^^NJ+w^w/UI:]0~\邍MMjzuLmZ!{Ÿ|{WI}sūsui+{[ɾi:ڋ5Jwe `쎲LƍTi7)).sCpB ի^tuESȔ[xM)ΖnT?;x:kC;kCHvG* iƎb\5O;|$ ؾ16jqk &9 lUW`X䝾dsUID0ʟӡCa]x* ( cGJi9УKTvk9}hW.[r5ap%+AfF6X_ªi[4Ӌz\$4nw?+hZvVG%pxڻu@`3ⱓҲ }zDGθVsQbCElؽRуpbCLk$zBjeMקfe\oRٯWdFf$еc=^A:⣑Ţ\8ٓ:}!ghᙂf]zE\+{m.X4% Wg?0ẴakYz62%n&OqEe&w=HQpѬe5fwۡ@ Hĸ"16=*`x:R1)]͇t?4qpL/^#Ks E@hZ۸jcΚ1NK#_fl-f""$B(\`I%f~,X@Q6 [c!ņ9jE Pyh։> Yւ;,n+ V,X jەnkX`#E\JtY།Kf ȢϿ ]戨 jSvBD Z/HXDˍ1r01!}CBb}&@IENDB`wlmaker-0.7.1/tests/data/toolkit/primitive_minimize_icon.png0000644000175100017510000000021115144077706023763 0ustar runnerrunnerPNG  IHDRĴl;bKGD>IDAT8c`0 `dj."hf0N@LPS3b`8`'Il&8wBIENDB`wlmaker-0.7.1/tests/data/toolkit/primitive_minimize_icon_large.png0000644000175100017510000000034315144077706025143 0ustar runnerrunnerPNG  IHDR22?bKGDIDATh1 1@џn^e"x7aX Z)Y $ImΡ]έBE˙4dG!Rͦ8e,mҬ\ęW_ ǐj Ɛj oBz_cq92)$IuyɅ*SIENDB`wlmaker-0.7.1/tests/data/toolkit/primitive_fill_dgradient.png0000644000175100017510000000025015144077706024104 0ustar runnerrunnerPNG  IHDRbKGD]IDAT @ ޱ/3CvHqa|)"%{zdKj7n2WIENDB`wlmaker-0.7.1/tests/data/toolkit/menu_item_disabled.png0000644000175100017510000000321415144077706022661 0ustar runnerrunnerPNG  IHDRPxbKGDAIDATXWoU33n)]"-l"jD#Dm 'cbbol|4cbT$ƈpr1m¶eanΒDݧ9}7g$PT!P-Dϫ⛐wё&xA A P(H}(grOl5!M C_Dm?y3"d>5?jE= k"`rzT6W&C5ZP 3 WF" :xZj$uMP2пHX:! ,Qj,Lc2ȃO5FƂnXypF$$)ĂfxʹVFԐAzjHْFږnZ[UGl zsjŴq1uTAZ^ª׃+ F1ޝpd6:0/ֶҌܱPdL%H.3ACPH,J"me,wtp?k\90zoצiÞo*TV2y~/^}u GT,ag3vȚGNe*ꏤC?9exAg3IJqwσ.k=WK7tfiE.eF_gas }9޷/c}oㅅP}o:$(w#g f;w:z~!{:BXmɥ9cz{X(fqKg5޿,Q'ҍq[z}݉uRwl:9Y֞Y{9H__i5EჂ C걦;D'2?sԀuĊE1\3rdO45&01+{.3)ŊlڵLR.6Mzb1S ]iT-6uRZ\UlZ}Zi+pGF]؜]զ#̏c7AS ڥUIZZw.0H俩P(L/ 9]DK!%'J@;YADn2v ؽ1& MY aӍ :NF4 vkIQżli`i涍{Q6TJLۺao6F JRS%Ҵx 76$KBȲ=ooxhθ=).2Q ui50 FkLLt _]Vڟn.XPJqj׆ņk^)+AV2x9a_84=sbwo:×{4G{D+?t7IlF!Ӂ>M|_~~Tץn+p?`9 2q&ya m9u=BZV{ͤRORI#U.X"8_)]mj,hi$@y*k劋ٖ%vRax4mmY6;, Ѽh q, O Jw5,z1T+tOCE?'1IDpOL "@M^PP7 oPpCDBĠ?l֨2IENDB`wlmaker-0.7.1/tests/data/menu-include.plist0000644000175100017510000000006615144077706020321 0ustar runnerrunner("Include", IncludePlistMenu, "tests/data/menu.plist")wlmaker-0.7.1/tests/data/subdir/0000755000175100017510000000000015144077706016145 5ustar runnerrunnerwlmaker-0.7.1/tests/data/subdir/wlmaker/0000755000175100017510000000000015144077706017607 5ustar runnerrunnerwlmaker-0.7.1/tests/data/subdir/wlmaker/a.txt0000644000175100017510000000000015144077706020556 0ustar runnerrunnerwlmaker-0.7.1/tests/data/menu.plist0000644000175100017510000000006715144077706016701 0ustar runnerrunner("Menu Title", ("Item 1", None), ("Item 2", None) )wlmaker-0.7.1/tests/data/clip_raised.png0000644000175100017510000000273715144077706017652 0ustar runnerrunnerPNG  IHDR@@% bKGDIDATh՚[oEߘ?9v<323/!%{B$JC$VxƓ8r0Hᢺ=ƎGuxVU:1J_=|f^g3Ϥe%1ӂM'ċ/QKergg?rx{~kk˳7o @6H>eŋJx1kt-g =b:;Hq#KCq́ކӻ8Po,?ۻwD8\?׉ /U.6N#~)b0ɅJm<ʧf?˝;;2y0QϽ]r$Q}m0(s]W3=HҡAȃ;;@AQ1ҙ]ՁwX>MoO&=+Coҙ2ʟ=~)cjqlG'-&@m0."j>|TBeu(/PES-{pTB DonzP6'U$:j- S0}?R*#%+ w~\bV ,Ťh{_(aZܞ[WKohLףeR*F)F>"=y<= V1ܞ V=f Oopy+ Л=AFB%!"T.iR }t.Ԝ-TRz\iKIc%T|zQ*}R`-#}ne;JH缾*%=J -GVZlz׉$T|z$@I58]Bz< $.+wkkkZ8Y*D7ީS0x,W^P0y"=i 畷Z` Kn=@+o%`JoV[-z入Gy!<ۭ՗j- KCJH߻};+oT6 Fop@U W땷M jQ zweh#^eD+/fz;$I]m땷[M a8*rO2} Bgs>L40`+Ϗg%I76?uW^i" sG BɈ֍$w.X|e0O3O޻M 4ڞ~s{dv Coң$gڰ^k$A`De=V/^_on}vdFKp!H1˩֓#ܺuӏyK'rm4IENDB`wlmaker-0.7.1/tests/data/menu-generate.plist0000644000175100017510000000007315144077706020466 0ustar runnerrunner("Include", GeneratePlistMenu, "cat tests/data/menu.plist")wlmaker-0.7.1/tests/data/wlmaker.desktop0000644000175100017510000000047415144077706017717 0ustar runnerrunner# Made-up entry, used as input for desting the .desktop parser. [Desktop Entry] Name=WaylandMaker Comment=A Wayland compositor inspired by Window Maker Exec=/usr/local/bin/wlmaker TryExec=./wlmaker Path=/usr/local Type=Application Icon=wlmaker Hidden=false NoDisplay=false Terminal=true Categories=System;Compositor;wlmaker-0.7.1/tests/data/keyboard0000644000175100017510000000025715144077706016404 0ustar runnerrunner# -*- conf -*- -- Keyboard configuration file, for wlmaker test. XKBMODEL="pc105" XKBLAYOUT= "us,ch" XKBVARIANT="intl," XKBOPTIONS="grp:shift_caps_toggle" BACKSPACE="guess" wlmaker-0.7.1/tests/desktop_parser_test.c0000644000175100017510000000251515144077706020177 0ustar runnerrunner/* ========================================================================= */ /** * @file desktop_parser_test.c * * @copyright * Copyright (c) 2025 Google LLC and Philipp Kaeser * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #if !defined(TEST_DATA_DIR) /** Directory root for looking up test data. See `bs_test_resolve_path`. */ #define TEST_DATA_DIR "./" #endif // TEST_DATA_DIR /** Main program, runs the unit tests. */ int main(int argc, const char **argv) { const bs_test_param_t params = { .test_data_dir_ptr = TEST_DATA_DIR }; const bs_test_set_t *sets[] = { &desktop_parser_test_set, NULL }; return bs_test_sets(sets, argc, argv, ¶ms); } /* == End of desktop_parser_test.c ========================================= */ wlmaker-0.7.1/tests/backend_test.c0000644000175100017510000000250115144077706016534 0ustar runnerrunner/* ========================================================================= */ /** * @file backend_test.c * * @copyright * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #include "backend/backend.h" #include "backend/output_config.h" /** Backend unit tests. */ const bs_test_set_t backend_tests[] = { BS_TEST_SET(true, "backend", wlmbe_backend_test_cases), BS_TEST_SET(true, "output_config", wlmbe_output_config_test_cases), BS_TEST_SET(0, NULL, NULL), }; /** Main program, runs the unit tests. */ int main(int argc, const char **argv) { const bs_test_param_t params = {}; return bs_test(backend_tests, argc, argv, ¶ms); } /* == End of backend_test.c ================================================ */ wlmaker-0.7.1/dependencies/0000755000175100017510000000000015144077707015231 5ustar runnerrunnerwlmaker-0.7.1/dependencies/pixman/0000755000175100017510000000000015144077707016525 5ustar runnerrunnerwlmaker-0.7.1/dependencies/libxkbcommon/0000755000175100017510000000000015144077707017715 5ustar runnerrunnerwlmaker-0.7.1/dependencies/README.md0000644000175100017510000000031715144077707016511 0ustar runnerrunner# wlmaker-dependencies - Dependencies for Wayland Maker Wayland Maker dependencies, when building on systems without pre-packaged versions. See https://github.com/phkaeser/wlmaker for further information. wlmaker-0.7.1/dependencies/LICENSE0000644000175100017510000002613515144077707016245 0ustar runnerrunner Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. wlmaker-0.7.1/dependencies/wayland-protocols/0000755000175100017510000000000015144077707020712 5ustar runnerrunnerwlmaker-0.7.1/dependencies/CMakeLists.txt0000644000175100017510000001043615144077707017775 0ustar runnerrunner# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Default arguments: # cmake -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/.local -B build CMAKE_MINIMUM_REQUIRED(VERSION 3.13) PROJECT(wlmaker VERSION 0.1 DESCRIPTION "Wayland Maker - Dependencies" LANGUAGES C) # TODO(kaeser@gubbe.ch): Add a target for refreshing all submodules. # See https://cliutils.gitlab.io/modern-cmake/chapters/projects/submodule.html # If not found: Try 'pip3 install --user meson' FIND_PROGRAM(MESON_EXECUTABLE NAMES meson REQUIRED) FIND_PROGRAM(NINJA_EXECUTABLE NAMES ninja REQUIRED) FIND_PACKAGE(PkgConfig REQUIRED) # https://github.com/phkaeser/libbase # Initialize: git submodule update --init --recursive --merge # Checkout: git submodule update --checkout --recursive --merge # Update: git submodule update --remote --merge # Update: (cd libbase && git pull) # ADD_SUBDIRECTORY(libbase) # wlroots -- build and configure from the git submodule. # Note: This will *NOT* automatically install the library. INCLUDE(ExternalProject) ExternalProject_Add(dep-libbacktrace SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libbacktrace" INSTALL_DIR ${CMAKE_INSTALL_PREFIX} CONFIGURE_COMMAND /configure --prefix= --datadir=/share --datarootdir=/share BUILD_COMMAND make INSTALL_COMMAND make install ) # Wayland # Packages needed: xsltproc xmlto ExternalProject_Add(wayland SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/wayland" INSTALL_DIR ${CMAKE_INSTALL_PREFIX} CONFIGURE_COMMAND ${MESON_EXECUTABLE} --prefix= -Ddocumentation=false BUILD_COMMAND ${NINJA_EXECUTABLE} -C INSTALL_COMMAND ${NINJA_EXECUTABLE} -C install ) # libdrm - libdrm-2.4.129 ExternalProject_Add(libdrm SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libdrm" INSTALL_DIR ${CMAKE_INSTALL_PREFIX} CONFIGURE_COMMAND ${MESON_EXECUTABLE} --prefix= BUILD_COMMAND ${NINJA_EXECUTABLE} -C INSTALL_COMMAND ${NINJA_EXECUTABLE} -C install ) # xkbcommon - xkbcommon-1.8.0 # Packages needed: libxcb-xkb-dev ExternalProject_Add(libxkbcommon SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libxkbcommon" INSTALL_DIR ${CMAKE_INSTALL_PREFIX} CONFIGURE_COMMAND ${MESON_EXECUTABLE} --prefix= -Denable-bash-completion=false BUILD_COMMAND ${NINJA_EXECUTABLE} -C INSTALL_COMMAND ${NINJA_EXECUTABLE} -C install ) # wayland-protocols - 1.47 ExternalProject_Add(wayland-protocols SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/wayland-protocols" INSTALL_DIR ${CMAKE_INSTALL_PREFIX} CONFIGURE_COMMAND ${MESON_EXECUTABLE} --prefix= BUILD_COMMAND ${NINJA_EXECUTABLE} -C INSTALL_COMMAND ${NINJA_EXECUTABLE} -C install ) # pixman - pixman-0.46.0 ExternalProject_Add(pixman SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pixman" INSTALL_DIR ${CMAKE_INSTALL_PREFIX} CONFIGURE_COMMAND ${MESON_EXECUTABLE} --prefix= BUILD_COMMAND ${NINJA_EXECUTABLE} -C INSTALL_COMMAND ${NINJA_EXECUTABLE} -C install ) # XWayland as optional dependency, configure wlroots accordingly. PKG_CHECK_MODULES(XWAYLAND xwayland>=22.1.9) IF(XWAYLAND_FOUND) SET(WLROOTS_XWAYLAND "-Dxwayland=enabled") ELSE(XWAYLAND_FOUND) SET(WLROOTS_XWAYLAND "-Dxwayland=disabled") ENDIF(XWAYLAND_FOUND) ExternalProject_Add(wlroots SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/wlroots" INSTALL_DIR ${CMAKE_INSTALL_PREFIX} CONFIGURE_COMMAND ${MESON_EXECUTABLE} --prefix= -Dexamples=true -Dbackends=drm,libinput,x11 ${WLROOTS_XWAYLAND} BUILD_COMMAND ${NINJA_EXECUTABLE} -C INSTALL_COMMAND ${NINJA_EXECUTABLE} -C install ) wlmaker-0.7.1/dependencies/libdrm/0000755000175100017510000000000015144077707016502 5ustar runnerrunnerwlmaker-0.7.1/dependencies/wayland/0000755000175100017510000000000015144077707016670 5ustar runnerrunnerwlmaker-0.7.1/dependencies/.gitmodules0000644000175100017510000000137715144077707017416 0ustar runnerrunner[submodule "wlroots"] path = wlroots url = https://gitlab.freedesktop.org/wlroots/wlroots.git branch = main update = rebase [submodule "libbacktrace"] path = libbacktrace url = https://github.com/ianlancetaylor/libbacktrace.git [submodule "wayland"] path = wayland url = https://gitlab.freedesktop.org/wayland/wayland.git [submodule "libdrm"] path = libdrm url = https://gitlab.freedesktop.org/mesa/libdrm.git [submodule "libxkbcommon"] path = libxkbcommon url = https://github.com/xkbcommon/libxkbcommon.git [submodule "wayland-protocols"] path = wayland-protocols url = https://gitlab.freedesktop.org/wayland/wayland-protocols.git [submodule "pixman"] path = pixman url = https://gitlab.freedesktop.org/pixman/pixman.git wlmaker-0.7.1/dependencies/.gitignore0000644000175100017510000000006315144077707017220 0ustar runnerrunner**/*~ **/CMakeFiles/* **/CMakeCache.txt **/build/* wlmaker-0.7.1/dependencies/wlroots/0000755000175100017510000000000015144077707016742 5ustar runnerrunnerwlmaker-0.7.1/dependencies/.git0000644000175100017510000000004515144077706016013 0ustar runnerrunnergitdir: ../.git/modules/dependencies wlmaker-0.7.1/dependencies/libbacktrace/0000755000175100017510000000000015144077707017637 5ustar runnerrunnerwlmaker-0.7.1/build-cscope-index.sh0000755000175100017510000000103415144077706016615 0ustar runnerrunner#! /bin/sh # Generates Cscope index for wlmaker and all dependencies. set -o errexit SUBPATHS="\ dependencies \ include \ src \ submodules" base_path="$(readlink -f "$(dirname "${0}")")" rm -f "${base_path}/cscope.files" for p in ${SUBPATHS} ; do echo "Processing ${base_path}/${p} ..." find "${base_path}/${p}" -name "*.h" -o -name "*.c" -o -name "*.cpp" | xargs etags find "${base_path}/${p}" -name "*.h" -o -name "*.c" -o -name "*.cpp" >> cscope.files done cscope -Rbkq -i cscope.files 2>/dev/null echo "Done." exit 0 wlmaker-0.7.1/LICENSE0000644000175100017510000002613515144077706013616 0ustar runnerrunner Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.wlmaker-0.7.1/include/0000755000175100017510000000000015144077706014225 5ustar runnerrunnerwlmaker-0.7.1/include/toolkit/0000755000175100017510000000000015144077706015712 5ustar runnerrunnerwlmaker-0.7.1/include/toolkit/input.h0000644000175100017510000000624715144077706017233 0ustar runnerrunner/* ========================================================================= */ /** * @file input.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_INPUT_H__ #define __WLMTK_INPUT_H__ #include struct wlr_cursor; struct wlr_xcursor_manager; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Forward declaration: Button event. */ typedef struct _wlmtk_button_event_t wlmtk_button_event_t; /** Forward declaration: Pointer. */ typedef struct _wlmtk_pointer_t wlmtk_pointer_t; /** Button state. */ typedef enum { WLMTK_BUTTON_DOWN, WLMTK_BUTTON_UP, WLMTK_BUTTON_CLICK, WLMTK_BUTTON_DOUBLE_CLICK, } wlmtk_button_event_type_t; /** Cursor types. */ typedef enum { /** Default. */ WLMTK_POINTER_CURSOR_DEFAULT = 0, /** Resizing, southern border. */ WLMTK_POINTER_CURSOR_RESIZE_S, /** Resizing, south-eastern corner. */ WLMTK_POINTER_CURSOR_RESIZE_SE, /** Resizing, south-western corner. */ WLMTK_POINTER_CURSOR_RESIZE_SW, /** Sentinel: Maximum value. */ WLMTK_POINTER_CURSOR_MAX, } wlmtk_pointer_cursor_t; /** Button events. */ struct _wlmtk_button_event_t { /** Button for which the event applies: linux/input-event-codes.h */ uint32_t button; /** Type of the event: DOWN, UP, ... */ wlmtk_button_event_type_t type; /** Time of the button event, in milliseconds. */ uint32_t time_msec; /** Modifiers that were active when the button event happened. */ uint32_t keyboard_modifiers; }; /** Motion event. */ typedef struct { /** X position. */ double x; /** Y position. */ double y; /** Time of the motion event, in milliseconds. */ uint32_t time_msec; /** Pointer that's associated with this motion event. */ wlmtk_pointer_t *pointer_ptr; } wlmtk_pointer_motion_event_t; /** * Creates the pointer handler. * * @param wlr_cursor_ptr * @param wlr_xcursor_manager_ptr * * @return A @ref wlmtk_pointer_t or NULL on error. */ wlmtk_pointer_t *wlmtk_pointer_create( struct wlr_cursor *wlr_cursor_ptr, struct wlr_xcursor_manager *wlr_xcursor_manager_ptr); /** * Destroys the pointer handler. * * @param pointer_ptr */ void wlmtk_pointer_destroy(wlmtk_pointer_t *pointer_ptr); /** * Sets the cursor for the pointer. */ void wlmtk_pointer_set_cursor( wlmtk_pointer_t *pointer_ptr, wlmtk_pointer_cursor_t cursor); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_INPUT_H__ */ /* == End of input.h ======================================================= */ wlmaker-0.7.1/include/toolkit/rectangle.h0000644000175100017510000000476015144077706020036 0ustar runnerrunner/* ========================================================================= */ /** * @file rectangle.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_RECTANGLE_H__ #define __WLMTK_RECTANGLE_H__ #include #include #include "element.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Forward declaration: Rectangle state. */ typedef struct _wlmtk_rectangle_t wlmtk_rectangle_t; /** * Creates a rectangle. Useful for margins and borders. * * @param width * @param height * @param color * * @return Pointer to the rectangle state or NULL on error. */ wlmtk_rectangle_t *wlmtk_rectangle_create( int width, int height, uint32_t color); /** * Destroys the rectangle. * * @param rectangle_ptr */ void wlmtk_rectangle_destroy(wlmtk_rectangle_t *rectangle_ptr); /** * Sets (or updates) the size of the rectangle. * * @param rectangle_ptr * @param width * @param height */ void wlmtk_rectangle_set_size( wlmtk_rectangle_t *rectangle_ptr, int width, int height); /** * Sets (or updates) the color of the rectangle. * * @param rectangle_ptr * @param color */ void wlmtk_rectangle_set_color( wlmtk_rectangle_t *rectangle_ptr, uint32_t color); /** Returns the superclass @ref wlmtk_element_t of the rectangle. */ wlmtk_element_t *wlmtk_rectangle_element(wlmtk_rectangle_t *rectangle_ptr); /** * Gets the @ref wlmtk_rectangle_t instance from it's element superclass. * * Requires `element_ptr` as pointer to @ref wlmtk_rectangle_t::super_element. * * @param element_ptr * * @return The pointer to the @ref wlmtk_rectangle_t instance. */ wlmtk_rectangle_t *wlmtk_rectangle_from_element(wlmtk_element_t *element_ptr); /** Unit tests. */ extern const bs_test_case_t wlmtk_rectangle_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_RECTANGLE_H__ */ /* == End of rectangle.h =================================================== */ wlmaker-0.7.1/include/toolkit/menu.h0000644000175100017510000001204615144077706017032 0ustar runnerrunner/* ========================================================================= */ /** * @file menu.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_MENU_H__ #define __WLMTK_MENU_H__ /** Forward declaration: Menu handle. */ typedef struct _wlmtk_menu_t wlmtk_menu_t; enum wlmtk_menu_mode; // IWYU pragma: keep #include #include #include #include #include "base.h" #include "box.h" // IWYU pragma: keep #include "element.h" #include "menu_item.h" // IWYU pragma: keep #include "style.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Style definition for the menu. */ typedef struct { /** Margin. */ wlmtk_margin_style_t margin; /** Border. */ wlmtk_margin_style_t border; /** Item's style. */ wlmtk_menu_item_style_t item; } wlmtk_menu_style_t; /** Modes of the menu. */ enum wlmtk_menu_mode { /** Normal (window) mode of a menu: Left button click triggers items. */ WLMTK_MENU_MODE_NORMAL, /** * Right-click mode of menu: Menu is invoked while right button is pressed. * Releasing the right button triggers items. */ WLMTK_MENU_MODE_RIGHTCLICK }; /** Events of the popup menu. */ typedef struct { /** * The menu was opened or closed. Check through @ref wlmtk_menu_is_open. * The signal's argument is a pointer to the menu that opened/closed. */ struct wl_signal open_changed; /** Popup menu requests to be closed. */ struct wl_signal request_close; /** The dtor has been called. */ struct wl_signal destroy; } wlmtk_menu_events_t; /** * Creates a menu. * * @param style_ptr * * @return Pointer to the menu state or NULL on error. */ wlmtk_menu_t *wlmtk_menu_create( const wlmtk_menu_style_t *style_ptr); /** * Destroys the menu. * * @param menu_ptr */ void wlmtk_menu_destroy(wlmtk_menu_t *menu_ptr); /** @return pointer to the menu's @ref wlmtk_element_t superclass. */ wlmtk_element_t *wlmtk_menu_element(wlmtk_menu_t *menu_ptr); /** @return pointer to the menu's @ref wlmtk_base_t superclass. */ wlmtk_base_t *wlmtk_menu_base(wlmtk_menu_t *menu_ptr); /** @return a pointer to @ref wlmtk_menu_t::events. */ wlmtk_menu_events_t *wlmtk_menu_events(wlmtk_menu_t *menu_ptr); /** * Opens the menu: Makes it visible or invisible, and resets state * if needed. * * @param menu_ptr * @param opened */ void wlmtk_menu_set_open(wlmtk_menu_t *menu_ptr, bool opened); /** @return whether the menu is open, ie. visible. */ bool wlmtk_menu_is_open(wlmtk_menu_t *menu_ptr); /** * Sets the mode of the menu. * * @param menu_ptr * @param mode */ void wlmtk_menu_set_mode(wlmtk_menu_t *menu_ptr, enum wlmtk_menu_mode mode); /** @return mode of the menu. @see wlmtk_menu_set_mode. */ enum wlmtk_menu_mode wlmtk_menu_get_mode(wlmtk_menu_t *menu_ptr); /** * Adds a menu item to the menu. * * @param menu_ptr * @param menu_item_ptr */ void wlmtk_menu_add_item(wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr); /** * Removes a menu item from the menu. * * @param menu_ptr * @param menu_item_ptr */ void wlmtk_menu_remove_item(wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr); /** * Registers `menu_item_ptr` as this submenu's parent item. * * @protected Must be called only from @ref wlmtk_menu_item_set_submenu. * * @param menu_ptr * @param menu_item_ptr */ void wlmtk_menu_set_parent_item(wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr); /** @return the parent menu item, if this is a submenu. NULL otherwise. */ wlmtk_menu_item_t *wlmtk_menu_get_parent_item(wlmtk_menu_t *menu_ptr); /** * Requests that menu_item_ptr be highlighted. * * @param menu_ptr * @param menu_item_ptr */ void wlmtk_menu_request_item_highlight( wlmtk_menu_t *menu_ptr, wlmtk_menu_item_t *menu_item_ptr); /** * @param menu_ptr * * @return the size of @ref wlmtk_menu_t::items. */ size_t wlmtk_menu_items_size(wlmtk_menu_t *menu_ptr); /** * @param menu_ptr * @param i * * @return the i-th element of @ref wlmtk_menu_t::items, or NULL if i is out * of bounds. */ wlmtk_menu_item_t *wlmtk_menu_item_at(wlmtk_menu_t *menu_ptr, size_t i); /** Unit test cases. */ extern const bs_test_case_t wlmtk_menu_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_MENU_H__ */ /* == End of menu.h ======================================================== */ wlmaker-0.7.1/include/toolkit/titlebar_button.h0000644000175100017510000000570315144077706021271 0ustar runnerrunner/* ========================================================================= */ /** * @file titlebar_button.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_TITLEBAR_BUTTON_H__ #define __WLMTK_TITLEBAR_BUTTON_H__ #include #include #include #include #include "element.h" #include "style.h" #include "window.h" /** Forward declaration. */ typedef struct _wlmtk_titlebar_button_t wlmtk_titlebar_button_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Function pointer to method for drawing the button contents. */ typedef void (*wlmtk_titlebar_button_draw_t)( cairo_t *cairo_ptr, int siye, uint32_t color); /** * Creates a button for the titlebar. * * @param click_handler * @param window_ptr * @param draw * * @return Pointer to the titlebar button, or NULL on error. */ wlmtk_titlebar_button_t *wlmtk_titlebar2_button_create( void (*click_handler)(wlmtk_window_t *window_ptr), wlmtk_window_t *window_ptr, wlmtk_titlebar_button_draw_t draw); /** * Destroys the titlebar button. * * @param titlebar_button_ptr */ void wlmtk_titlebar_button_destroy( wlmtk_titlebar_button_t *titlebar_button_ptr); /** * Sets the activation status (focussed / blurred) of the titlebar button. * * @param titlebar_button_ptr * @param activated */ void wlmtk_titlebar_button_set_activated( wlmtk_titlebar_button_t *titlebar_button_ptr, bool activated); /** * Redraws the titlebar button for given textures, position and style. * * @param titlebar_button_ptr * @param focussed_gfxbuf_ptr * @param blurred_gfxbuf_ptr * @param position * @param style_ptr * * @return true on success. */ bool wlmtk_titlebar_button_redraw( wlmtk_titlebar_button_t *titlebar_button_ptr, bs_gfxbuf_t *focussed_gfxbuf_ptr, bs_gfxbuf_t *blurred_gfxbuf_ptr, int position, const wlmtk_titlebar_style_t *style_ptr); /** * Returns the titlebar button's super element. * * @param titlebar_button_ptr * * @return Pointer to the superclass @ref wlmtk_element_t. */ wlmtk_element_t *wlmtk_titlebar_button_element( wlmtk_titlebar_button_t *titlebar_button_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_titlebar_button_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_TITLEBAR_BUTTON_H__ */ /* == End of titlebar_button.h ============================================= */ wlmaker-0.7.1/include/toolkit/button.h0000644000175100017510000000614515144077706017404 0ustar runnerrunner/* ========================================================================= */ /** * @file button.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_BUTTON_H__ #define __WLMTK_BUTTON_H__ #include #include #include #include "buffer.h" #include "element.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Forward declaration: State of a button. */ typedef struct _wlmtk_button_t wlmtk_button_t; /** Virtual method table of the button. */ typedef struct { /** Optional: Called when the button has been clicked. */ void (*clicked)(wlmtk_button_t *button_ptr); } wlmtk_button_vmt_t; /** State of a button. */ struct _wlmtk_button_t { /** Super class of the button: A buffer. */ wlmtk_buffer_t super_buffer; /** Original virtual method table of the superclass element. */ wlmtk_element_vmt_t orig_super_element_vmt; /** The virtual method table. */ wlmtk_button_vmt_t vmt; /** WLR buffer holding the button in released state. */ struct wlr_buffer *released_wlr_buffer_ptr; /** WLR buffer holding the button in pressed state. */ struct wlr_buffer *pressed_wlr_buffer_ptr; /** Listens to when we obtain pointer focus. */ struct wl_listener pointer_enter_listener; /** Listens to when we lose pointer focus. */ struct wl_listener pointer_leave_listener; /** Whether the button is currently pressed. */ bool pressed; }; /** * Initializes the button. * * @param button_ptr * * @return true on success. */ bool wlmtk_button_init(wlmtk_button_t *button_ptr); /** * Extends the button's virtual methods. * * @param button_ptr * @param button_vmt_ptr * * @return The original virtual method table. */ wlmtk_button_vmt_t wlmtk_button_extend( wlmtk_button_t *button_ptr, const wlmtk_button_vmt_t *button_vmt_ptr); /** * Cleans up the button. * * @param button_ptr */ void wlmtk_button_fini(wlmtk_button_t *button_ptr); /** * Sets (or updates) the button textures. * * @param button_ptr * @param released_wlr_buffer_ptr * @param pressed_wlr_buffer_ptr */ void wlmtk_button_set( wlmtk_button_t *button_ptr, struct wlr_buffer *released_wlr_buffer_ptr, struct wlr_buffer *pressed_wlr_buffer_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_button_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_BUTTON_H__ */ /* == End of button.h ====================================================== */ wlmaker-0.7.1/include/toolkit/buffer.h0000644000175100017510000000557315144077706017346 0ustar runnerrunner/* ========================================================================= */ /** * @file buffer.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_BUFFER_H__ #define __WLMTK_BUFFER_H__ #include #include #include #include "element.h" #include "input.h" /** Forward declaration: Buffer state. */ typedef struct _wlmtk_buffer_t wlmtk_buffer_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** State of a texture-backed buffer. */ struct _wlmtk_buffer_t { /** Super class of the buffer: An element. */ wlmtk_element_t super_element; /** Virtual method table of the super element before extending it. */ wlmtk_element_vmt_t orig_super_element_vmt; /** Cursor to set when we have pointer focus. */ wlmtk_pointer_cursor_t pointer_cursor; /** WLR buffer holding the contents. */ struct wlr_buffer *wlr_buffer_ptr; /** Scene graph API node. Only set after calling `create_scene_node`. */ struct wlr_scene_buffer *wlr_scene_buffer_ptr; /** Listener for the `destroy` signal of `wlr_scene_buffer_ptr->node`. */ struct wl_listener wlr_scene_buffer_node_destroy_listener; /** Listener for @ref wlmtk_element_events_t::pointer_enter. */ struct wl_listener element_pointer_enter_listener; }; /** * Initializes the buffer. * * @param buffer_ptr * * @return true on success. */ bool wlmtk_buffer_init(wlmtk_buffer_t *buffer_ptr); /** * Cleans up the buffer. * * @param buffer_ptr */ void wlmtk_buffer_fini(wlmtk_buffer_t *buffer_ptr); /** * Sets (or updates) buffer contents. * * @param buffer_ptr * @param wlr_buffer_ptr A WLR buffer to use for the update. That buffer * will get locked by @ref wlmtk_buffer_t for the * duration of it's use. */ void wlmtk_buffer_set( wlmtk_buffer_t *buffer_ptr, struct wlr_buffer *wlr_buffer_ptr); /** @return the superclass' @ref wlmtk_element_t of `buffer_ptr`. */ wlmtk_element_t *wlmtk_buffer_element(wlmtk_buffer_t *buffer_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_buffer_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_BUFFER_H__ */ /* == End of buffer.h ====================================================== */ wlmaker-0.7.1/include/toolkit/util.h0000644000175100017510000001134715144077706017046 0ustar runnerrunner/* ========================================================================= */ /** * @file util.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_UTIL_H__ #define __WLMTK_UTIL_H__ #include #include #include #include #include #include struct wl_list; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Information regarding a client. Drawn from `struct wl_client`. */ typedef struct { /** Process ID. */ pid_t pid; /** User ID. */ uid_t uid; /** Group ID. */ gid_t gid; } wlmtk_util_client_t; /** Record for recording a signal, suitable for unit testing. */ typedef struct { /** Listener that will get connected to the signal. */ struct wl_listener listener; /** Counts number of calls since connect or last clear. */ size_t calls; /** The |data_ptr| argument of the most recent call. */ void *last_data_ptr; } wlmtk_util_test_listener_t; /** For recording a signal taking a struct wlr_box arg. For unit testing. */ typedef struct { /** Listener that will get connected to the signal. */ struct wl_listener listener; /** Counts number of calls since connect or last clear. */ size_t calls; /** Value of the last call. */ struct wlr_box box; } wlmtk_util_test_wlr_box_listener_t; /** * Iterates over `list_ptr` and calls func() for each element. * * Permits removal of `link_ptr` in `func()`. Similar to wl_list_for_each_safe, * but not as a macro, and returning true if all invocations succeeded. * * @return true if none of the `func()` invocations returned false. */ bool wlmtk_util_wl_list_for_each( struct wl_list *list_ptr, bool (*func)(struct wl_list *link_ptr, void *ud_ptr), void *ud_ptr); /** * Sets |notifier_func| as the notifier for |listener_ptr|, and registers it * with |signal_ptr|. * * This is merely a convenience helper for the usual two-liner of boilerplate. * To disconnect from the listener signal, call `wl_list_remove` on a reference * to the `link` element of `*listener_ptr`. * * @param signal_ptr * @param listener_ptr * @param notifier_func */ // TODO(kaeser@gubbe.ch): Either swap arguments (listener first) or rename, // eg. . wlm_util_connect_signal_to_listener(...). void wlmtk_util_connect_listener_signal( struct wl_signal *signal_ptr, struct wl_listener *listener_ptr, void (*notifier_func)(struct wl_listener *, void *)); /** * Disconnects a listener from the signal. * * Does that in a safe way: Will only disconnect, if the `link` is set. * * @param listener_ptr */ void wlmtk_util_disconnect_listener( struct wl_listener *listener_ptr); /** * Connects test listener to signal. @see wlmtk_util_connect_listener_signal. * * @param signal_ptr * @param test_listener_ptr */ void wlmtk_util_connect_test_listener( struct wl_signal *signal_ptr, wlmtk_util_test_listener_t *test_listener_ptr); /** * Clears @ref wlmtk_util_test_listener_t::calls and * @ref wlmtk_util_test_listener_t::last_data_ptr. * * @param test_listener_ptr */ void wlmtk_util_clear_test_listener( wlmtk_util_test_listener_t *test_listener_ptr); /** * Disconnects a test listener. * * @param test_listener_ptr */ void wlmtk_util_disconnect_test_listener( wlmtk_util_test_listener_t *test_listener_ptr); /** * Connects the wlr_box test listener to signal. * * @param signal_ptr * @param test_wlr_box_listener_ptr */ void wlmtk_util_connect_test_wlr_box_listener( struct wl_signal *signal_ptr, wlmtk_util_test_wlr_box_listener_t *test_wlr_box_listener_ptr); /** * Clears @ref wlmtk_util_test_wlr_box_listener_t::calls and box. * * @param test_wlr_box_listener_ptr */ void wlmtk_util_clear_test_wlr_box_listener( wlmtk_util_test_wlr_box_listener_t *test_wlr_box_listener_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_util_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_UTIL_H__ */ /* == End of util.h ======================================================== */ wlmaker-0.7.1/include/toolkit/root.h0000644000175100017510000001563515144077706017060 0ustar runnerrunner/* ========================================================================= */ /** * @file root.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_ROOT_H__ #define __WLMTK_ROOT_H__ /** Forward declaration: Root element (technically: container). */ typedef struct _wlmtk_root_t wlmtk_root_t; /** Forward declaration: wlr output layout. */ #include #include #include #include #include "element.h" #include "input.h" #include "surface.h" // IWYU pragma: keep #include "workspace.h" // IWYU pragma: keep struct wlr_output_layout; /** Forward declaration: Wlroots scene. */ struct wlr_scene; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Signals available for the @ref wlmtk_root_t class. */ typedef struct { /** * Signal: Raised when the current workspace is changed. * Data: Pointer to the new `wlmaker_workspace_t`, or NULL. */ struct wl_signal workspace_changed; /** Triggers whenever @ref wlmtk_root_unlock succeeds. */ struct wl_signal unlock_event; /** Triggers when a window is mapped to a workspace. */ struct wl_signal window_mapped; /** Triggers when a window is unmapped from a workspace. */ struct wl_signal window_unmapped; /** An unclaimed pointer event. Arg: @ref wlmtk_button_event_t. */ struct wl_signal unclaimed_button_event; } wlmtk_root_events_t; /** * Creates the root element. * * @param wlr_scene_ptr * @param wlr_output_layout_ptr * * @return Handle of the root element or NULL on error. */ wlmtk_root_t *wlmtk_root_create( struct wlr_scene *wlr_scene_ptr, struct wlr_output_layout *wlr_output_layout_ptr); /** * Destroys the root element. * * @param root_ptr */ void wlmtk_root_destroy(wlmtk_root_t *root_ptr); /** * Gets the set of events available in root. To bind listeners to. * * @param root_ptr * * @return Pointer to @ref wlmtk_root_t::events. */ wlmtk_root_events_t *wlmtk_root_events(wlmtk_root_t *root_ptr); /** * Handles a pointer motion event. * * @param root_ptr * @param x * @param y * @param time_msec * @param pointer_ptr * * @return Whether there was an element under the pointer. */ bool wlmtk_root_pointer_motion( wlmtk_root_t *root_ptr, double x, double y, uint32_t time_msec, wlmtk_pointer_t *pointer_ptr); /** * Handles a button event: Translates to button down/up/click/dblclick events. * * Each button activity (button pressed or released) will directly trigger a * corresponding BUTTON_DOWN or BUTTON_UP event. Depending on timing and * motion, a "released" event may also triccer a CLICK, DOUBLE_CLICK or * DRAG event. * These events will be forwarded to the event currently having pointer focus. * * TODO(kaeser@gubbe.ch): Implement DOUBLE_CLICK and DRAG events, and make it * well tested. * * @param root_ptr * @param event_ptr * @param modifiers * * @return Whether the button was consumed. */ bool wlmtk_root_pointer_button( wlmtk_root_t *root_ptr, const struct wlr_pointer_button_event *event_ptr, uint32_t modifiers); /** * Handles a pointer axis event. * * @param root_ptr * @param wlr_pointer_axis_event_ptr * * @return Whether the axis event was consumed. */ bool wlmtk_root_pointer_axis( wlmtk_root_t *root_ptr, struct wlr_pointer_axis_event *wlr_pointer_axis_event_ptr); /** * Adds a workspace. * * @param root_ptr * @param workspace_ptr */ void wlmtk_root_add_workspace( wlmtk_root_t *root_ptr, wlmtk_workspace_t *workspace_ptr); /** * Removes the workspace. * * @param root_ptr * @param workspace_ptr */ void wlmtk_root_remove_workspace( wlmtk_root_t *root_ptr, wlmtk_workspace_t *workspace_ptr); /** * Returns a pointer to the currently-active workspace. * * @param root_ptr */ wlmtk_workspace_t *wlmtk_root_get_current_workspace(wlmtk_root_t *root_ptr); /** * Destroys the last workspace -- if it's not the only remaining workspace, not * the current workspace, and if there's no windows contained in it. * * @param root_ptr */ void wlmtk_root_destroy_last_workspace(wlmtk_root_t *root_ptr); /** * Switches to the next workspace. * * @param root_ptr */ void wlmtk_root_switch_to_next_workspace(wlmtk_root_t *root_ptr); /** * Switches to the previous workspace. * * @param root_ptr */ void wlmtk_root_switch_to_previous_workspace(wlmtk_root_t *root_ptr); /** * Runs |func()| for each workspace. * * @param root_ptr * @param func * @param ud_ptr */ void wlmtk_root_for_each_workspace( wlmtk_root_t *root_ptr, void (*func)(bs_dllist_node_t *dlnode_ptr, void *ud_ptr), void *ud_ptr); /** * Locks the root, using the provided element. * * The root must not be locked already. If locked successfully, the root will * keep a reference to `element_ptr`. The lock must call @ref wlmtk_root_unlock * to unlock root, and for releasing the reference. * * @param root_ptr * @param element_ptr * * @return Whether the lock was established. */ bool wlmtk_root_lock( wlmtk_root_t *root_ptr, wlmtk_element_t *element_ptr); /** * Unlocks the root, and releases the reference from @ref wlmtk_root_lock. * * Unlocking can only be done with `element_ptr` matching the `element_ptr` * argument from @ref wlmtk_root_lock. * * @param root_ptr * @param element_ptr * * @return Whether the lock was lifted. */ bool wlmtk_root_unlock( wlmtk_root_t *root_ptr, wlmtk_element_t *element_ptr); /** @return Whether root is locked. */ bool wlmtk_root_locked(wlmtk_root_t *root_ptr); /** * Releases the lock reference, but keeps the root locked. * * This is in accordance with the session lock protocol specification [1], * stating the session should remain locked if the client dies. * This call is a no-op if `element_ptr` is not currently the lock of * `root_ptr`. * * [1] https://wayland.app/protocols/ext-session-lock-v1 * * @param root_ptr * @param element_ptr */ void wlmtk_root_lock_unreference( wlmtk_root_t *root_ptr, wlmtk_element_t *element_ptr); /** @returns pointer to the root's @ref wlmtk_element_t. (Temporary) */ wlmtk_element_t *wlmtk_root_element(wlmtk_root_t *root_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_root_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_ROOT_H__ */ /* == End of root.h ======================================================== */ wlmaker-0.7.1/include/toolkit/menu_item.h0000644000175100017510000001217615144077706020054 0ustar runnerrunner/* ========================================================================= */ /** * @file menu_item.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_MENU_ITEM_H__ #define __WLMTK_MENU_ITEM_H__ #include #include #include #include "element.h" #include "style.h" /** Forward declaration: State of the menu item. */ typedef struct _wlmtk_menu_item_t wlmtk_menu_item_t; #include "menu.h" // IWYU pragma: keep /** Forward declaration: Virtual method table of the menu item. */ typedef struct _wlmtk_menu_item_vmt_t wlmtk_menu_item_vmt_t; /** States a menu item can be in. */ typedef enum { WLMTK_MENU_ITEM_ENABLED, WLMTK_MENU_ITEM_HIGHLIGHTED, WLMTK_MENU_ITEM_DISABLED } wlmtk_menu_item_state_t; /** Events of the menu item. */ typedef struct { /** The menu item was triggered, by a click or key action. */ struct wl_signal triggered; /** The menu item is being destroyed. */ struct wl_signal destroy; } wlmtk_menu_item_events_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates a menu item. * * Note: Menu items are created as 'visible' elements. * * @param style_ptr * * @return Pointer to the menu item state, or NULL on failure. */ wlmtk_menu_item_t *wlmtk_menu_item_create( const wlmtk_menu_item_style_t *style_ptr); /** * Destroys the menu item. * * @param menu_item_ptr */ void wlmtk_menu_item_destroy(wlmtk_menu_item_t *menu_item_ptr); /** Returns pointer to the menu item's @ref wlmtk_menu_item_t::events. */ wlmtk_menu_item_events_t *wlmtk_menu_item_events( wlmtk_menu_item_t *menu_item_ptr); /** * Sets the menu this item belongs to. * * Private: Should only be called by @ref wlmtk_menu_add_item. * * @param menu_item_ptr * @param menu_ptr May be NULL, to detach from menu. */ void wlmtk_menu_item_set_parent_menu( wlmtk_menu_item_t *menu_item_ptr, wlmtk_menu_t *menu_ptr); /** * Sets the submenu for this menu item. * * @param menu_item_ptr * @param submenu_ptr The submenu to set for the item. The item will * take ownership of `submenu_ptr`, and destroy it * when the item ist destroyed. Unless the submenu * is detached again, by calling with a NULL * argument. */ void wlmtk_menu_item_set_submenu( wlmtk_menu_item_t *menu_item_ptr, wlmtk_menu_t *submenu_ptr); /** * Returns the submenu for this menu item. * * @param menu_item_ptr * * @return the submenu of the item, or NULL. */ wlmtk_menu_t *wlmtk_menu_item_get_submenu( wlmtk_menu_item_t *menu_item_ptr); /** * Sets the menu's mode for this item. * * @param menu_item_ptr * @param mode */ void wlmtk_menu_item_set_mode( wlmtk_menu_item_t *menu_item_ptr, enum wlmtk_menu_mode mode); /** @return the mode of this item. */ enum wlmtk_menu_mode wlmtk_menu_item_get_mode( wlmtk_menu_item_t *menu_item_ptr); /** @return The state of the item, @ref wlmtk_menu_item_t::state. */ wlmtk_menu_item_state_t wlmtk_menu_item_get_state( wlmtk_menu_item_t *menu_item_ptr); /** * Sets or updates the text for the menu item. * * @param menu_item_ptr * @param text_ptr */ bool wlmtk_menu_item_set_text( wlmtk_menu_item_t *menu_item_ptr, const char *text_ptr); /** * Sets whether the menu item is enabled or disabled. * * @param menu_item_ptr * @param enabled */ void wlmtk_menu_item_set_enabled( wlmtk_menu_item_t *menu_item_ptr, bool enabled); /** * Sets the menu item as highlighted. * * @param menu_item_ptr * @param highlighted * * @return false if the menu was not enabled, ie. could not be highlighted. */ bool wlmtk_menu_item_set_highlighted( wlmtk_menu_item_t *menu_item_ptr, bool highlighted); /** * Triggers the menu item's action. * * @param menu_item_ptr */ void wlmtk_menu_item_trigger(wlmtk_menu_item_t *menu_item_ptr); /** Returns pointer to @ref wlmtk_menu_item_t::dlnode. */ bs_dllist_node_t *wlmtk_dlnode_from_menu_item( wlmtk_menu_item_t *menu_item_ptr); /** Returns the base @ref wlmtk_menu_item_t from `dlnode_ptr`. */ wlmtk_menu_item_t *wlmtk_menu_item_from_dlnode(bs_dllist_node_t *dlnode_ptr); /** Returns a pointer to the superclass @ref wlmtk_element_t. */ wlmtk_element_t *wlmtk_menu_item_element(wlmtk_menu_item_t *menu_item_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_menu_item_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_MENU_ITEM_H__ */ /* == End of menu_item.h =================================================== */ wlmaker-0.7.1/include/toolkit/popup.h0000644000175100017510000000445715144077706017240 0ustar runnerrunner/* ========================================================================= */ /** * @file popup.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_POPUP_H__ #define __WLMTK_POPUP_H__ #include /** Forward declaration: Popup. */ typedef struct _wlmtk_popup_t wlmtk_popup_t; #include "container.h" // IWYU pragma: keep #include "element.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * State of a popup. * * A popup contains a @ref wlmtk_element_t, and may contain further popups. * These further popups will be stacked above the principal element, in order * of them being added. */ struct _wlmtk_popup_t { /** Super class of the panel. */ wlmtk_container_t super_container; /** And the popup container. Popups can contain child popups. */ wlmtk_container_t popup_container; /** The contained element. */ wlmtk_element_t *element_ptr; }; /** * Initializes the popup. * * @param popup_ptr * @param element_ptr * * @return true on success. */ bool wlmtk_popup_init( wlmtk_popup_t *popup_ptr, wlmtk_element_t *element_ptr); /** * Un-initializes the popup. Will remove it from the parent container. * * @param popup_ptr */ void wlmtk_popup_fini(wlmtk_popup_t *popup_ptr); /** Returns the base @ref wlmtk_element_t. */ wlmtk_element_t *wlmtk_popup_element(wlmtk_popup_t *popup_ptr); /** * Adds a further popup to `popup_ptr`. * * @param popup_ptr * @param further_popup_ptr */ void wlmtk_popup_add_popup(wlmtk_popup_t *popup_ptr, wlmtk_popup_t *further_popup_ptr); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_POPUP_H__ */ /* == End of popup.h ======================================================= */ wlmaker-0.7.1/include/toolkit/element.h0000644000175100017510000004134715144077706017525 0ustar runnerrunner/* ========================================================================= */ /** * @file element.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_ELEMENT_H__ #define __WLMTK_ELEMENT_H__ #include #include #include #include #include #define WLR_USE_UNSTABLE #include #undef WLR_USE_UNSTABLE struct wlr_scene_tree; /** Forward declaration: Element. */ typedef struct _wlmtk_element_t wlmtk_element_t; /** Forward declaration: Element virtual method table. */ typedef struct _wlmtk_element_vmt_t wlmtk_element_vmt_t; /** Forward declaration: Container. */ typedef struct _wlmtk_container_t wlmtk_container_t; /** Forward declaration: Wlroots keyboard event. */ struct wlr_keyboard_key_event; #include "input.h" #define WLR_USE_UNSTABLE #include #undef WLR_USE_UNSTABLE #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Events of the element. */ typedef struct { /** Pointer entered the element. Arg: @ref wlmtk_pointer_t. */ struct wl_signal pointer_enter; /** Pointer left the element: Pointer focus lost. */ struct wl_signal pointer_leave; /** Pointer motion within element. @ref wlmtk_pointer_motion_event_t. */ struct wl_signal pointer_motion; } wlmtk_element_events_t; /** Virtual method table for the element. */ struct _wlmtk_element_vmt_t { /** Abstract: Destroys the implementation of the element. */ void (*destroy)(wlmtk_element_t *element_ptr); /** Abstract: Creates element's scene graph API node, child to wlr_scene_tree_ptr. */ struct wlr_scene_node *(*create_scene_node)( wlmtk_element_t *element_ptr, struct wlr_scene_tree *wlr_scene_tree_ptr); /** Abstract: Gets dimensions of the element, relative to the element's position. */ void (*get_dimensions)( wlmtk_element_t *element_ptr, int *x1_ptr, int *y1_ptr, int *x2_ptr, int *y2_ptr); /** * Offers the pointer motion to this element. * * @pure This method is called from @ref wlmtk_element_pointer_motion. * * @param element_ptr * @param motion_event_ptr * * @return Whether the motion is accepted by this element (or any of it's * children). In that case, the caller should accept this element as * having pointer focus. */ bool (*pointer_accepts_motion)( wlmtk_element_t *element_ptr, wlmtk_pointer_motion_event_t *motion_event_ptr); /** * Cancels a held pointer grab. * * Required to have an implementation by any element that requests a * pointer grab through @ref wlmtk_container_pointer_grab. * * Private: Must only to be called by the parent container. * * @param element_ptr */ void (*pointer_grab_cancel)(wlmtk_element_t *element_ptr); /** * Indicates pointer button event. * * @param element_ptr * @param button_event_ptr * * @return true If the button event was consumed. */ bool (*pointer_button)( wlmtk_element_t *element_ptr, const wlmtk_button_event_t *button_event_ptr); /** * Indicates a pointer axis event. * * @param element_ptr * @param wlr_pointer_axis_event_ptr * * @return true If the axis event was consumed. */ bool (*pointer_axis)( wlmtk_element_t *element_ptr, struct wlr_pointer_axis_event *wlr_pointer_axis_event_ptr); /** * Blurs (de-activates) keyboard focus for the element. Propagates to child * elements, where available. * * @param element_ptr */ void (*keyboard_blur)(wlmtk_element_t *element_ptr); /** * Handler for keyboard events. * * This handler is suitable for passing keyboard events on to Wayland * clients, which may have their own keymap and state tracking. * * @param element_ptr * @param wlr_keyboard_key_event_ptr * * @return true if the key was handled. */ bool (*keyboard_event)( wlmtk_element_t *element_ptr, struct wlr_keyboard_key_event *wlr_keyboard_key_event_ptr); /** * Handler for already-translated keys. * * This handler is intended for toolkit elements reacting on key strokes, * and expects the parent to have translated the key event into (a series * of) keysym events. * * @param element_ptr * @param keysym * @param direction * @param modifiers * * @return true if the key was processed. */ bool (*keyboard_sym)( wlmtk_element_t *element_ptr, xkb_keysym_t keysym, enum xkb_key_direction direction, uint32_t modifiers); /** * Redraws this element. For containers, will (re)arrange children. * * @param element_ptr */ void (*layout)(wlmtk_element_t *element_ptr); }; /** State of an element. */ struct _wlmtk_element_t { /** The node of elements. */ bs_dllist_node_t dlnode; /** Virtual method table for the element. */ wlmtk_element_vmt_t vmt; /** Events available from the element. */ wlmtk_element_events_t events; /** The container this element belongs to, if any. */ wlmtk_container_t *parent_container_ptr; /** Points to the wlroots scene graph API node, if attached. */ struct wlr_scene_node *wlr_scene_node_ptr; /** Listener for the `destroy` signal of `wlr_scene_node_ptr`. */ struct wl_listener wlr_scene_node_destroy_listener; /** Details of last @ref wlmtk_element_pointer_motion call. */ wlmtk_pointer_motion_event_t last_pointer_motion_event; /** * X position of the element in pixels, relative to parent container. * * This value may be stale, if @ref wlmtk_element_t::wlr_scene_node_ptr is * set and had been updated directly. Therefore, consider the value as * "private", and access only through @ref wlmtk_element_get_position. */ int x; /** * Y position of the element, relative to the container. * * Same observations apply as for @ref wlmtk_element_t::x. */ int y; /** Whether the element is visible (drawn, when part of a scene graph). */ bool visible; /** Whether the pointer is currently within the element's bounds. */ bool pointer_inside; /** Whether to inhibit blurring in @ref wlmtk_element_pointer_blur. */ bool inhibit_pointer_blur; }; /** * Initializes the element. * * @param element_ptr * * @return true on success. */ bool wlmtk_element_init(wlmtk_element_t *element_ptr); /** * Extends the element's virtual methods. * * @param element_ptr * @param element_vmt_ptr * * @return The previous virtual method table. */ wlmtk_element_vmt_t wlmtk_element_extend( wlmtk_element_t *element_ptr, const wlmtk_element_vmt_t *element_vmt_ptr); /** * Cleans up the element. * * @param element_ptr */ void wlmtk_element_fini( wlmtk_element_t *element_ptr); /** Gets the dlnode from the element. */ bs_dllist_node_t *wlmtk_dlnode_from_element( wlmtk_element_t *element_ptr); /** Gets the element from the dlnode. */ wlmtk_element_t *wlmtk_element_from_dlnode( bs_dllist_node_t *dlnode_ptr); /** * Sets the parent container for the element. * * Will call @ref wlmtk_element_attach_to_scene_graph to align the scene graph * with the new (or deleted) parent. * * Private: Should only be called by wlmtk_container_add_element, respectively * wlmtk_container_remove_element ("friends"). * * @param element_ptr * @param parent_container_ptr Pointer to the parent container, or NULL if * the parent should be cleared. */ void wlmtk_element_set_parent_container( wlmtk_element_t *element_ptr, wlmtk_container_t *parent_container_ptr); /** * Attaches or detaches the element to the parent's wlroots scene tree. * * If the element has a parent, and that parent is itself attached to the * wlroots scene tree, this will either re-parent an already existing node, * or invoke @ref wlmtk_element_vmt_t::create_scene_node to create and attach a * new node to the paren'ts tree. * Otherwise, it will clear any existing node. * * The function is idempotent. * * Private: Should only called by wlmtk_container_t methods, when there are * changes to wlmtk_container_t::wlr_scene_tree. * * @param element_ptr */ void wlmtk_element_attach_to_scene_graph( wlmtk_element_t *element_ptr); /** * Sets the element's visibility. * * @param element_ptr * @param visible */ void wlmtk_element_set_visible(wlmtk_element_t *element_ptr, bool visible); /** * Returns the position of the element. * * @param element_ptr * @param x_ptr Optional, may be NULL. * @param y_ptr Optional, may be NULL. */ void wlmtk_element_get_position( wlmtk_element_t *element_ptr, int *x_ptr, int *y_ptr); /** * Sets the position of the element. * * @param element_ptr * @param x * @param y */ void wlmtk_element_set_position( wlmtk_element_t *element_ptr, int x, int y); /** * Gets the dimensions of the element in pixels, relative to the position. * * @param element_ptr * @param left_ptr Leftmost position. May be NULL. * @param top_ptr Topmost position. May be NULL. * @param right_ptr Rightmost position. Ma be NULL. * @param bottom_ptr Bottommost position. May be NULL. */ static inline void wlmtk_element_get_dimensions( wlmtk_element_t *element_ptr, int *left_ptr, int *top_ptr, int *right_ptr, int *bottom_ptr) { element_ptr->vmt.get_dimensions( element_ptr, left_ptr, top_ptr, right_ptr, bottom_ptr); } /** * Gets the element's dimensions in pixel as wlr_box, relative to the position. * * @param element_ptr * * @return A struct wlr_box that specifies the top-left corner of the element * relative to it's position, and the element's total width and height. */ static inline struct wlr_box wlmtk_element_get_dimensions_box( wlmtk_element_t *element_ptr) { struct wlr_box box; element_ptr->vmt.get_dimensions( element_ptr, &box.x, &box.y, &box.width, &box.height); box.width -= box.x; box.height -= box.y; return box; } /** * Moves the pointer to the new position. * * Calls @ref wlmtk_element_vmt_t::pointer_accepts_motion, if the element is * visible. Triggers @ref wlmtk_element_events_t::pointer_enter or * @ref wlmtk_element_events_t::pointer_leave if the motion is accepted. * * @return true if the element is visible and the motion is within the * element's "pointer focus area", ie. in the area it accepts pointer events. */ bool wlmtk_element_pointer_motion( wlmtk_element_t *element_ptr, wlmtk_pointer_motion_event_t *pointer_motion_ptr); /** * Processes the button event. Calls @ref wlmtk_element_vmt_t::pointer_button. * * @param element_ptr * @param button_event_ptr * * @return true if the button event was consumed. */ bool wlmtk_element_pointer_button( wlmtk_element_t *element_ptr, const wlmtk_button_event_t *button_event_ptr); /** * Processes the axis event. Calls @ref wlmtk_element_vmt_t::pointer_axis. * * @param element_ptr * @param wlr_pointer_axis_event_ptr * * @return true if the axis event was consumed. */ bool wlmtk_element_pointer_axis( wlmtk_element_t *element_ptr, struct wlr_pointer_axis_event *wlr_pointer_axis_event_ptr); /** * Sets pointer focus for the element. * * If not focussed already: Request pointer focus from the parent through * @ref wlmtk_container_request_pointer_focus. If that succeeds, will * raise @ref wlmtk_element_events_t::pointer_enter. * * @param element_ptr * @param motion_event_ptr * * @return true if the element obtained focus. */ bool wlmtk_element_pointer_focus( wlmtk_element_t *element_ptr, wlmtk_pointer_motion_event_t *motion_event_ptr); /** * Informs the element that it does not (or no longer) have pointer focus. * * Raises @ref wlmtk_element_events_t::pointer_leave, if it had pointer focus, * and calls @ref wlmtk_element_pointer_blur on the parent (if available). * * @param element_ptr */ void wlmtk_element_pointer_blur(wlmtk_element_t *element_ptr); /** * Cancels pointer grab. Calls @ref wlmtk_element_vmt_t::pointer_grab_cancel. * * @param element_ptr */ void wlmtk_element_pointer_grab_cancel(wlmtk_element_t *element_ptr); /** Calls @ref wlmtk_element_vmt_t::keyboard_blur. */ static inline void wlmtk_element_keyboard_blur( wlmtk_element_t *element_ptr) { element_ptr->vmt.keyboard_blur(element_ptr); } /** Calls @ref wlmtk_element_vmt_t::keyboard_event. */ static inline bool wlmtk_element_keyboard_event( wlmtk_element_t *element_ptr, struct wlr_keyboard_key_event *wlr_keyboard_key_event_ptr) { return element_ptr->vmt.keyboard_event( element_ptr, wlr_keyboard_key_event_ptr); } /** Calls @ref wlmtk_element_vmt_t::keyboard_sym. */ static inline bool wlmtk_element_keyboard_sym( wlmtk_element_t *element_ptr, xkb_keysym_t keysym, enum xkb_key_direction direction, uint32_t modifiers) { return element_ptr->vmt.keyboard_sym( element_ptr, keysym, direction, modifiers); } /** Calls @ref wlmtk_element_vmt_t::layout, if given. */ static inline void wlmtk_element_layout(wlmtk_element_t *element_ptr) { element_ptr->vmt.layout(element_ptr); } /** * Virtual method: Calls the dtor of the element's implementation. * * The implementation is required to call @ref wlmtk_element_fini(). * * @param element_ptr */ static inline void wlmtk_element_destroy( wlmtk_element_t *element_ptr) { element_ptr->vmt.destroy(element_ptr); } /** Unit tests for the element. */ extern const bs_test_case_t wlmtk_element_test_cases[]; /** Fake element, useful for unit test. */ typedef struct { /** State of the element. */ wlmtk_element_t element; /** Original VMT. */ wlmtk_element_vmt_t orig_vmt; /** Dimensions of the fake element, in pixels. */ struct wlr_box dimensions; /** @ref wlmtk_element_vmt_t::pointer_accepts_motion() was called. */ bool pointer_accepts_motion_called; /** Indicates @ref wlmtk_element_vmt_t::pointer_button() was called. */ bool pointer_button_called; /** Last button event received. */ wlmtk_button_event_t pointer_button_event; /** Indicates @ref wlmtk_element_vmt_t::pointer_axis() was called. */ bool pointer_axis_called; /** Indicates @ref wlmtk_element_vmt_t::pointer_grab_cancel() was called. */ bool pointer_grab_cancel_called; /** Whether the fake element has keyboare focus. */ bool has_keyboard_focus; /** Indicates that @ref wlmtk_element_vmt_t::keyboard_event() was called. */ bool keyboard_event_called; /** Indicates that @ref wlmtk_element_vmt_t::keyboard_sym() was called. */ bool keyboard_sym_called; /** Indicates that @ref wlmtk_element_vmt_t::layout() was called. */ bool layout_called; /** Last axis event received. */ struct wlr_pointer_axis_event wlr_pointer_axis_event; } wlmtk_fake_element_t; /** * Ctor for the fake element, useful for tests. * * @return A pointer to @ref wlmtk_fake_element_t. Should be destroyed via * @ref wlmtk_element_destroy, by passing the pointer to * @ref wlmtk_fake_element_t::element as argument. */ wlmtk_fake_element_t *wlmtk_fake_element_create(void); /** * Updates @ref wlmtk_fake_element_t::dimensions and propagates the layout * changes to the parent (if set). * * @param fake_element_ptr * @param width * @param height */ void wlmtk_fake_element_set_dimensions( wlmtk_fake_element_t *fake_element_ptr, int width, int height); /** * Sets @ref wlmtk_fake_element_t::has_keyboard_focus and calls @ref * wlmtk_container_set_keyboard_focus_element for the parent (if set). * * @param fake_element_ptr */ void wlmtk_fake_element_grab_keyboard(wlmtk_fake_element_t *fake_element_ptr); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_ELEMENT_H__ */ /* == End of element.h ===================================================== */ wlmaker-0.7.1/include/toolkit/layer.h0000644000175100017510000000733615144077706017210 0ustar runnerrunner/* ========================================================================= */ /** * @file layer.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_LAYER_H__ #define __WLMTK_LAYER_H__ #include #include /** Forward declaration: Layer state. */ typedef struct _wlmtk_layer_t wlmtk_layer_t; /** Forward declaration: Layer state. */ typedef struct _wlmtk_layer_output_t wlmtk_layer_output_t; #include "element.h" #include "panel.h" // IWYU pragma: keep #include "workspace.h" // IWYU pragma: keep /** Forward declaration: wlr output layout. */ struct wlr_output_layout; /** Forward declaration: wlr output. */ struct wlr_output; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates a layer. Layers contain panels, such as layer shells. * * @param wlr_output_layout_ptr The output layout. * * @return Pointer to the layer handle or NULL on error. */ wlmtk_layer_t *wlmtk_layer_create( struct wlr_output_layout *wlr_output_layout_ptr); /** * Destroys the layer. * * @param layer_ptr */ void wlmtk_layer_destroy(wlmtk_layer_t *layer_ptr); /** @return Pointer to super @ref wlmtk_element_t of the layer. */ wlmtk_element_t *wlmtk_layer_element(wlmtk_layer_t *layer_ptr); /** * Adds the panel to the output within the specified layer. This will trigger * an update to the layer's layout, and a call to request_size of each panel * of that output. * * @param layer_ptr * @param panel_ptr * @param wlr_output_ptr */ bool wlmtk_layer_add_panel( wlmtk_layer_t *layer_ptr, wlmtk_panel_t *panel_ptr, struct wlr_output *wlr_output_ptr); /** * Removes the panel from the layer. * * @param layer_ptr * @param panel_ptr */ void wlmtk_layer_remove_panel(wlmtk_layer_t *layer_ptr, wlmtk_panel_t *panel_ptr); /** * Calls @ref wlmtk_panel_compute_dimensions for each contained panel. * * The Wayland protocol spells it is 'undefined' how panels (layer shells) * are stacked and configured within a layer. For wlmaker, we'll configure * the panels in sequence as they were added (found in the container, back * to front). * * @param layer_ptr */ void wlmtk_layer_reconfigure(wlmtk_layer_t *layer_ptr); /** * Calls @ref wlmtk_panel_compute_dimensions for each contained panel. * * The Wayland protocol spells it is 'undefined' how panels (layer shells) * are stacked and configured within a layer. For wlmaker, we'll configure * the panels in sequence as they were added (found in the container, back * to front). * * @param layer_output_ptr */ void wlmtk_layer_output_reconfigure(wlmtk_layer_output_t *layer_output_ptr); /** * Sets the parent workspace for the layer. * * Should only be called from @ref wlmtk_workspace_t methods. * * @param layer_ptr * @param workspace_ptr NULL to clear the workspace reference. */ void wlmtk_layer_set_workspace(wlmtk_layer_t *layer_ptr, wlmtk_workspace_t *workspace_ptr); /** Layer unit test. */ extern const bs_test_case_t wlmtk_layer_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_LAYER_H__ */ /* == End of layer.h ======================================================= */ wlmaker-0.7.1/include/toolkit/titlebar_title.h0000644000175100017510000000553715144077706021104 0ustar runnerrunner/* ========================================================================= */ /** * @file titlebar_title.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_TITLEBAR_TITLE_H__ #define __WLMTK_TITLEBAR_TITLE_H__ /** Forward declaration. */ typedef struct _wlmtk_titlebar_title_t wlmtk_titlebar_title_t; #include #include #include "element.h" #include "style.h" #include "window.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates a title bar title. * * @param window_ptr * * @return Title handle. */ wlmtk_titlebar_title_t *wlmtk_titlebar2_title_create( wlmtk_window_t *window_ptr); /** * Destroys the titlebar title. * * @param titlebar_title_ptr */ void wlmtk_titlebar_title_destroy( wlmtk_titlebar_title_t *titlebar_title_ptr); /** * Redraws the title section of the title bar. * * @param titlebar_title_ptr * @param focussed_gfxbuf_ptr Titlebar background when focussed. * @param blurred_gfxbuf_ptr Titlebar background when blurred. * @param position Position of title telative to titlebar. * @param width Width of title. * @param activated Whether the title bar should start focussed. * @param title_ptr Title, or NULL. * @param style_ptr * * @return true on success. */ bool wlmtk_titlebar_title_redraw( wlmtk_titlebar_title_t *titlebar_title_ptr, bs_gfxbuf_t *focussed_gfxbuf_ptr, bs_gfxbuf_t *blurred_gfxbuf_ptr, int position, int width, bool activated, const char *title_ptr, const wlmtk_titlebar_style_t *style_ptr); /** * Sets activation status of the titlebar's title. * * @param titlebar_title_ptr * @param activated */ void wlmtk_titlebar_title_set_activated( wlmtk_titlebar_title_t *titlebar_title_ptr, bool activated); /** * Returns the superclass @ref wlmtk_element_t for the titlebar title. * * @param titlebar_title_ptr * * @return Pointer to the super element. */ wlmtk_element_t *wlmtk_titlebar_title_element( wlmtk_titlebar_title_t *titlebar_title_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_titlebar_title_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_TITLEBAR_TITLE_H__ */ /* == End of titlebar_title.h ============================================== */ wlmaker-0.7.1/include/toolkit/fsm.h0000644000175100017510000000555315144077706016660 0ustar runnerrunner/* ========================================================================= */ /** * @file fsm.h * Event-driven finite state machine. * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_FSM_H__ #define __WLMTK_FSM_H__ #include #include #include #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Forward declaration. */ typedef struct _wlmtk_fsm_t wlmtk_fsm_t; /** State machine definition. */ typedef struct { /** State before receiving the event. */ int state; /** Event. */ int event; /** Upon having (state, event): State to transition to. */ int to_state; /** Handler for the activity at (state, event). */ bool (*handler)(wlmtk_fsm_t *fsm_ptr, void *ud_ptr); } wlmtk_fsm_transition_t; /** Finite state machine. State. */ struct _wlmtk_fsm_t { /** The transitions table. */ const wlmtk_fsm_transition_t *transitions; /** Current state. */ int state; }; /** Sentinel element for state transition table. */ #define WLMTK_FSM_TRANSITION_SENTINEL { \ .state = -1, \ .event = -1, \ .to_state = -1, \ .handler = NULL, \ } /** * Initializes the finite-state machine. * * @param fsm_ptr * @param transitions * @param initial_state */ void wlmtk_fsm_init( wlmtk_fsm_t *fsm_ptr, const wlmtk_fsm_transition_t *transitions, int initial_state); /** * Handles an event for the finite-state machine. * * Will search for the transition matching (current state, event) and call the * associate handler. * * @param fsm_ptr * @param event * @param ud_ptr * * @return If a matching transition was found: The return value of the * associated handler (or true, if no handler was given). Otherwise, * returns false. */ bool wlmtk_fsm_event( wlmtk_fsm_t *fsm_ptr, int event, void *ud_ptr); /** Unit tests for the finite-state machine. */ extern const bs_test_case_t wlmtk_fsm_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_FSM_H__ */ /* == End of fsm.h ====================================================== */ wlmaker-0.7.1/include/toolkit/style.h0000644000175100017510000001532615144077706017232 0ustar runnerrunner/* ========================================================================= */ /** * @file style.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_STYLE_H__ #define __WLMTK_STYLE_H__ #include #include #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Specifies the type of coloring to use for the fill. */ typedef enum { /** Horizontal color gradient. */ WLMTK_STYLE_COLOR_SOLID, /** Horizontal color gradient. */ WLMTK_STYLE_COLOR_HGRADIENT, /** Vertical color gradient. */ WLMTK_STYLE_COLOR_VGRADIENT, /** * Diagonal color gradient, Cairo style. * * Colors are interpolated from top-left to bottom-right corner. Areas of * equal color value are arranged perpendicular to that diagonal. * This produces a smooth color flow across all rectangle edges. */ WLMTK_STYLE_COLOR_DGRADIENT, /** * Alternative diagonal color gradient, Window Maker style. * * Colors are interpolated from top-left to bottom-right corner. Areas of * equal color value are aligned with the other diagonal -- from top-right * to bottom-left. * This may produce a steep gradient along the thin axis of long & thin * rectangles, but is similar to what Window Maker uses. */ WLMTK_STYLE_COLOR_ADGRADIENT, } wlmtk_style_fill_type_t; /** Specifies the color for a solid fill. */ typedef struct { /** Color to start from, as ARGB 8888. Left, for the HGRADIENT type. */ uint32_t color; } wlmtk_style_color_solid_data_t; /** Specifies the two colors to span a gradient between. */ typedef struct { /** Color to start from, as ARGB 8888. Left, for the HGRADIENT type. */ uint32_t from; /** Color to end with, as ARGB 8888. Right, for the HGRADIENT type. */ uint32_t to; } wlmtk_style_color_gradient_data_t; /** Specification for the fill of the titlebar. */ typedef struct { /** The type of fill to apply. */ wlmtk_style_fill_type_t type; /** Parameters for the fill. */ union { /** Solid color. */ wlmtk_style_color_solid_data_t solid; /** Horizontal color gradient. */ wlmtk_style_color_gradient_data_t hgradient; /** Vertical color gradient. */ wlmtk_style_color_gradient_data_t vgradient; /** Diagonal color gradient. */ wlmtk_style_color_gradient_data_t dgradient; /** Alternative diagonal color gradient. */ wlmtk_style_color_gradient_data_t adgradient; } param; } wlmtk_style_fill_t; /** Hardcoded max length of the font face name. */ #define WLMTK_STYLE_FONT_FACE_LENGTH 128 /** Weight of a font. */ typedef enum { WLMTK_FONT_WEIGHT_NORMAL, WLMTK_FONT_WEIGHT_BOLD, } wlmtk_style_font_weight_t; /** Style of font. */ typedef struct { /** Font face family name. */ char face[WLMTK_STYLE_FONT_FACE_LENGTH]; /** Weight. */ wlmtk_style_font_weight_t weight; /** Size of the font, in pixels per "em" square side. */ uint64_t size; } wlmtk_style_font_t; /** Specifies color and width of a margin. */ typedef struct { /** Width of the margin. */ uint64_t width; /** Color of the margin. */ uint32_t color; } wlmtk_margin_style_t; /** Styling information for the dock. */ typedef struct { /** The margin's style of the dock's box. */ wlmtk_margin_style_t margin; } wlmtk_dock_style_t; /** Menu item style. */ typedef struct { /** Fill style. */ wlmtk_style_fill_t fill; /** Fill style when disabled. */ wlmtk_style_fill_t highlighted_fill; /** Style of the font used in the menu item. */ wlmtk_style_font_t font; /** Height of the menu item, in pixels. */ uint64_t height; /** Width of the bezel, in pixels. */ uint64_t bezel_width; /** Text color. */ uint32_t enabled_text_color; /** Text color when highlighted. */ uint32_t highlighted_text_color; /** Text color when disabled. */ uint32_t disabled_text_color; /** Width of the item. */ uint64_t width; } wlmtk_menu_item_style_t; /** Style options for the resizebar. */ typedef struct { /** Fill style for the complete resizebar. */ wlmtk_style_fill_t fill; /** Height of the resize bar. */ uint64_t height; /** Width of the corners. */ uint64_t corner_width; /** Width of the bezel. */ uint64_t bezel_width; } wlmtk_resizebar_style_t; /** Style options for the titlebar. */ typedef struct { /** Fill style for when the titlebar is focussed (activated). */ wlmtk_style_fill_t focussed_fill; /** Fill style for when the titlebar is blurred (not activated). */ wlmtk_style_fill_t blurred_fill; /** Color of the title text when focussed. */ uint32_t focussed_text_color; /** Color of the title text when blurred. */ uint32_t blurred_text_color; /** Height of the title bar, in pixels. */ uint64_t height; /** Width of the bezel. */ uint64_t bezel_width; /** Style of the margin within the resizebar. */ wlmtk_margin_style_t margin; /** Font style for the titlebar's title. */ wlmtk_style_font_t font; } wlmtk_titlebar_style_t; /** Style options for the window. */ typedef struct { /** The titlebar's style. */ wlmtk_titlebar_style_t titlebar; /** The resizebar's style. */ wlmtk_resizebar_style_t resizebar; /** Style of the window border. */ wlmtk_margin_style_t border; /** Style of the margins between titlebar, window and resizebar. */ wlmtk_margin_style_t margin; } wlmtk_window_style_t; /** Translates the font weight from toolkit into cairo enum. */ cairo_font_weight_t wlmtk_style_font_weight_cairo_from_wlmtk( wlmtk_style_font_weight_t weight); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_STYLE_H__ */ /* == End of style.h ================================================== */ wlmaker-0.7.1/include/toolkit/panel.h0000644000175100017510000001710315144077706017164 0ustar runnerrunner/* ========================================================================= */ /** * @file panel.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_PANEL_H__ #define __WLMTK_PANEL_H__ #include #include #include #include "container.h" // IWYU pragma: keep #include "element.h" /** Forward declaration: An element of a layer, we call it: Panel. */ typedef struct _wlmtk_panel_t wlmtk_panel_t; /** Forward declaration: The panel's virtual method table. */ typedef struct _wlmtk_panel_vmt_t wlmtk_panel_vmt_t; /** Forward declaration: The panel's positioning parameters. */ typedef struct _wlmtk_panel_positioning_t wlmtk_panel_positioning_t; #include "layer.h" // IWYU pragma: keep #ifdef __cplusplus extern "C" { #endif // __cplusplus /** The panel's virtual method table. */ struct _wlmtk_panel_vmt_t { /** * Requests the panel to change to the specified size. * * This may be implemented as an asynchronous implementation. Once the * panel has committed the adapted size, @ref wlmtk_panel_commit should * be called with the corresponding serial. * * @param content_ptr * @param width_ptr * @param height * * @return WLR Layer Shell configuration serial. */ uint32_t (*request_size)( wlmtk_panel_t *panel_ptr, int width, int height); }; /** The panel's positioning parameters. */ struct _wlmtk_panel_positioning_t { /** Desired width of the panel. */ int desired_width; /** Desired height of the panel. */ int desired_height; /** Edges the panel is anchored to. See `enum wlr_edges`. */ uint32_t anchor; /** Margin on the left of the panel. */ int margin_left; /** Margin on the right of the panel. */ int margin_right; /** Margin on the top of the panel. */ int margin_top; /** Margin on the bottom of the panel. */ int margin_bottom; /** Size of the exclusive zone, in pixels. -1 to request all. */ int exclusive_zone; }; /** State of the panel. */ struct _wlmtk_panel_t { /** Super class of the panel. */ wlmtk_container_t super_container; /** The panel's virtual method table. */ wlmtk_panel_vmt_t vmt; /** Popup container. Panels may contain popups. */ wlmtk_container_t popup_container; /** The layer that this panel belongs to. NULL if none. */ wlmtk_layer_t *layer_ptr; /** The layer output this panel is associated with. */ wlmtk_layer_output_t *layer_output_ptr; /** Node of @ref wlmtk_layer_output_t::panels. */ bs_dllist_node_t dlnode; /** Positioning parameters. */ wlmtk_panel_positioning_t positioning; }; /** * Initializes the panel. * * @param panel_ptr * @param positioning_ptr * * @return true on success. */ bool wlmtk_panel_init( wlmtk_panel_t *panel_ptr, const wlmtk_panel_positioning_t *positioning_ptr); /** * Un-initializes the panel. * * @param panel_ptr */ void wlmtk_panel_fini(wlmtk_panel_t *panel_ptr); /** * Extends the panel by the specified virtual methods. * * @param panel_ptr * @param panel_vmt_ptr * * @return The original virtual method table. */ wlmtk_panel_vmt_t wlmtk_panel_extend( wlmtk_panel_t *panel_ptr, const wlmtk_panel_vmt_t *panel_vmt_ptr); /** @return pointer to the super @ref wlmtk_element_t of the panel. */ wlmtk_element_t *wlmtk_panel_element(wlmtk_panel_t *panel_ptr); /** @return Pointer to @ref wlmtk_panel_t::dlnode. */ bs_dllist_node_t *wlmtk_dlnode_from_panel(wlmtk_panel_t *panel_ptr); /** @return Pointer to @ref wlmtk_panel_t for the given dlnode. */ wlmtk_panel_t *wlmtk_panel_from_dlnode(bs_dllist_node_t *dlnode_ptr); /** * Sets the layer for the `panel_ptr`. * * @protected This method must only be called from @ref wlmtk_layer_t. * * @param panel_ptr * @param layer_ptr */ void wlmtk_panel_set_layer(wlmtk_panel_t *panel_ptr, wlmtk_layer_t *layer_ptr); /** @return the wlmtk_layer_t this panel belongs to. Or NULL, if unmapped. */ wlmtk_layer_t *wlmtk_panel_get_layer(wlmtk_panel_t *panel_ptr); /** * Sets the layer output for the `panel_ptr`. * * @protected This method must only be called from @ref wlmtk_layer_output_t. * * @param panel_ptr * @param layer_output_ptr */ void wlmtk_panel_set_layer_output( wlmtk_panel_t *panel_ptr, wlmtk_layer_output_t *layer_output_ptr); /** @return the wlmtk_layer_output_t the panel belongs to. NULL if unmapped. */ wlmtk_layer_output_t *wlmtk_panel_get_layer_output(wlmtk_panel_t *panel_ptr); /** Requests new size. See @ref wlmtk_panel_vmt_t::request_size. */ static inline uint32_t wlmtk_panel_request_size( wlmtk_panel_t *panel_ptr, int width, int height) { return panel_ptr->vmt.request_size(panel_ptr, width, height); } /** * Reports a commit for the given serial, and updates positioning. * * @param panel_ptr * @param serial * @param positioning_ptr */ void wlmtk_panel_commit( wlmtk_panel_t *panel_ptr, uint32_t serial, const wlmtk_panel_positioning_t *positioning_ptr); /** * Computes the requested dimension for the panel. * * @param panel_ptr * @param full_area_ptr * @param usable_area_ptr Are that remains usable from the output and layer * after factoring in other panels. *usable_area_ptr * will be updated with this panel's exclusive area * (if any) subtracted. * * @return A wlr_box with the requested position and size for this panel. The * caller is advised to issue a call to @ref wlmtk_panel_request_size call and * update the panel element's position with the box' information. */ struct wlr_box wlmtk_panel_compute_dimensions( const wlmtk_panel_t *panel_ptr, const struct wlr_box *full_area_ptr, struct wlr_box *usable_area_ptr); /** Unit test cases of panel. */ extern const bs_test_case_t wlmtk_panel_test_cases[]; /** Forward declaration: Fake panel, for tests. */ typedef struct _wlmtk_fake_panel_t wlmtk_fake_panel_t; /** State of fake panel. */ struct _wlmtk_fake_panel_t { /** Superclass: panel. */ wlmtk_panel_t panel; /** Serial to return on next request_size call. */ uint32_t serial; /** `width` argument eof last @ref wlmtk_panel_vmt_t::request_size call. */ int requested_width; /** `height` argument of last @ref wlmtk_panel_vmt_t::request_size call. */ int requested_height; }; /** Creates a fake panel, for tests. */ wlmtk_fake_panel_t *wlmtk_fake_panel_create( const wlmtk_panel_positioning_t *positioning_ptr); /** Destroys the fake panel. */ void wlmtk_fake_panel_destroy(wlmtk_fake_panel_t *fake_panel_ptr); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_PANEL_H__ */ /* == End of panel.h ======================================================= */ wlmaker-0.7.1/include/toolkit/container.h0000644000175100017510000002023215144077706020044 0ustar runnerrunner/* ========================================================================= */ /** * @file container.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_CONTAINER_H__ #define __WLMTK_CONTAINER_H__ #include #include #include "libbase/libbase.h" struct wlr_scene_tree; /** Forward declaration: Container. */ typedef struct _wlmtk_container_t wlmtk_container_t; /** Forward declaration: Container virtual method table. */ typedef struct _wlmtk_container_vmt_t wlmtk_container_vmt_t; #include "element.h" #include "input.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** State of the container. */ struct _wlmtk_container_t { /** Super class of the container. */ wlmtk_element_t super_element; /** Virtual method table of the super element before extending it. */ wlmtk_element_vmt_t orig_super_element_vmt; /** * Elements contained here. * * `head_ptr` is the topmost element, and `tail_ptr` the bottom-most one. */ bs_dllist_t elements; /** Scene tree. */ struct wlr_scene_tree *wlr_scene_tree_ptr; /** Listener for the `destroy` signal of `wlr_scene_tree_ptr->node`. */ struct wl_listener wlr_scene_tree_node_destroy_listener; /** Listener for @ref wlmtk_element_events_t::pointer_leave. */ struct wl_listener element_pointer_leave_listener; /** Stores the element with current pointer focus. May be NULL. */ wlmtk_element_t *pointer_focus_element_ptr; /** Stores the element with current pointer grab. May be NULL. */ wlmtk_element_t *pointer_grab_element_ptr; /** Stores the element which received WLMTK_BUTTON_DOWN for BTN_LEFT. */ wlmtk_element_t *left_button_element_ptr; /** Stores the element with current keyboard focus. May be NULL. */ wlmtk_element_t *keyboard_focus_element_ptr; /** @private Stores whether the layout had been invalidated. */ bool invalidated_layout; }; /** * Initializes the container with the provided virtual method table. * * @param container_ptr * * @return true on success. */ bool wlmtk_container_init(wlmtk_container_t *container_ptr); /** * Initializes the container, and attach to WLR sene graph. * * @param container_ptr * @param root_wlr_scene_tree_ptr * * @return true on success. */ bool wlmtk_container_init_attached( wlmtk_container_t *container_ptr, struct wlr_scene_tree *root_wlr_scene_tree_ptr); /** * Un-initializes the container. * * Any element still in `elements` will be destroyed. * * @param container_ptr */ void wlmtk_container_fini( wlmtk_container_t *container_ptr); /** * Adds `element_ptr` to the container. * * Requires that `element_ptr` is not added to a container yet. The element * will be added at the top of the container. * * @param container_ptr * @param element_ptr */ void wlmtk_container_add_element( wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr); /** * Adds `element_ptr` to the container atop the reference's position. * * If reference_element_ptr is NULL, the element will be added at the back. * * @param container_ptr * @param reference_element_ptr Must be an element of this container. * @param element_ptr */ void wlmtk_container_add_element_atop( wlmtk_container_t *container_ptr, wlmtk_element_t *reference_element_ptr, wlmtk_element_t *element_ptr); /** * Removes `element_ptr` from the container. * * Expects that `container_ptr` is `element_ptr`'s parent container. In case * `element_ptr` holds a pointer grab, @ref wlmtk_element_pointer_grab_cancel * will be called. * * @param container_ptr * @param element_ptr */ void wlmtk_container_remove_element( wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr); /** * Places `element_ptr` at the top (head) of the container. * * Expects that `container_ptr` is `element_ptr`'s parent container. * * @param container_ptr * @param element_ptr */ void wlmtk_container_raise_element_to_top( wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr); /** * Requests that `element_ptr` be given pointer focus from `container_ptr`. * * @param container_ptr * @param element_ptr Must be in @ref wlmtk_container_t::elements. * @param motion_event_ptr The motion event (in particular: pointer) that * led to request pointer focus. * FIXME -> Must change to pointer! * * @return false if the request fails. */ // TODO(kaeser@gubbe.ch): Unify handling with pointer grab. bool wlmtk_container_request_pointer_focus( wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr, wlmtk_pointer_motion_event_t *motion_event_ptr); /** * Requests a pointer grab from `container_ptr` for `element_ptr`. * * Will cancel any existing grab held by elements other than `element_ptr`, and * propagates the grab to the parent container. * When a pointer grab is held, pointer events will be routed exclusively to * the element holding the pointer grab. * * @param container_ptr * @param element_ptr Must be a child of this container. * */ // TODO(kaeser@gubbe.ch): Merge with @ref wlmtk_container_request_pointer_focus. void wlmtk_container_pointer_grab( wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr); /** * Releases a pointer grab in `container_ptr` held by `element_ptr`. * * If the grab is held by an element other than `element_ptr`, nothing is done. * Otherwise, the pointer grab is released, and the release is propagated to * the parent container. * * @param container_ptr * @param element_ptr Must be a child of this container. */ void wlmtk_container_pointer_grab_release( wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr); /** * Sets or disables keyboard focus for `element_ptr` for the container. * * If `enabled`, calls @ref wlmtk_element_keyboard_blur for the element * currently having keyboard focus, and updates * @ref wlmtk_container_t::keyboard_focus_element_ptr to `element_ptr`. * Otherwise, evaluates whether the focus is currently held by `element_ptr`, * and (if yes) clears this container's focus. * Propagates the event to the container's parent. * * @param container_ptr * @param element_ptr * @param enabled */ void wlmtk_container_set_keyboard_focus_element( wlmtk_container_t *container_ptr, wlmtk_element_t *element_ptr, bool enabled); /** * Informs the container (and parents) that the layout needs to be recomputed. * * Must be called if an element is added or removed, or if any of the child * elements changes visibility or dimensions. Propagates to the parent * container(s). * * @param container_ptr */ void wlmtk_container_invalidate_layout(wlmtk_container_t *container_ptr); /** * Returns the wlroots scene graph tree for this node. * * Private: Should be called only by wlmtk_element_t. * * @param container_ptr * * @return The scene tree, or NULL if not attached to a scene graph. */ struct wlr_scene_tree *wlmtk_container_wlr_scene_tree( wlmtk_container_t *container_ptr); /** Unit tests for the container. */ extern const bs_test_case_t wlmtk_container_test_cases[]; /** Constructor for a fake container with a scene tree. */ wlmtk_container_t *wlmtk_container_create_fake_parent(void); /** Destructor for that fake container. */ void wlmtk_container_destroy_fake_parent(wlmtk_container_t *container_ptr); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_CONTAINER_H__ */ /* == End of container.h =================================================== */ wlmaker-0.7.1/include/toolkit/box.h0000644000175100017510000000624415144077706016661 0ustar runnerrunner/* ========================================================================= */ /** * @file box.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_BOX_H__ #define __WLMTK_BOX_H__ #include #include "libbase/libbase.h" #include "container.h" // IWYU pragma: keep #include "element.h" #include "style.h" /** Forward declaration: Box. */ typedef struct _wlmtk_box_t wlmtk_box_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Orientation of the box. */ typedef enum { /** Horizontal box layout. The container's "front" is on the left. */ WLMTK_BOX_HORIZONTAL, /** Vertical box layout. The container's "front" is the top. */ WLMTK_BOX_VERTICAL, } wlmtk_box_orientation_t; /** State of the box. */ struct _wlmtk_box_t { /** Super class of the box. */ wlmtk_container_t super_container; /** Virtual method table of the superclass' element. */ wlmtk_element_vmt_t orig_super_element_vmt; /** Orientation of the box. */ wlmtk_box_orientation_t orientation; /** Container for the box's elements. */ wlmtk_container_t element_container; /** Container for margin elements. */ wlmtk_container_t margin_container; /** Margin style. */ wlmtk_margin_style_t style; }; /** * Initializes the box with the provided virtual method table. * * @param box_ptr * @param orientation * @param style_ptr * * @return true on success. */ bool wlmtk_box_init( wlmtk_box_t *box_ptr, wlmtk_box_orientation_t orientation, const wlmtk_margin_style_t *style_ptr); /** * Un-initializes the box. * * @param box_ptr */ void wlmtk_box_fini(wlmtk_box_t *box_ptr); /** * Adds `element_ptr` to the front of the box. * * @param box_ptr * @param element_ptr */ void wlmtk_box_add_element_front(wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr); /** * Adds `element_ptr` to the back of the box. * * @param box_ptr * @param element_ptr */ void wlmtk_box_add_element_back(wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr); /** * Removes `element_ptr` from the box. * * Requires that element_ptr is an element of the box. * * @param box_ptr * @param element_ptr */ void wlmtk_box_remove_element(wlmtk_box_t *box_ptr, wlmtk_element_t *element_ptr); /** @return Pointer to the superclass' @ref wlmtk_element_t of `box_ptr`. */ wlmtk_element_t *wlmtk_box_element(wlmtk_box_t *box_ptr); /** Unit tests. */ extern const bs_test_case_t wlmtk_box_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_BOX_H__ */ /* == End of box.h ========================================================= */ wlmaker-0.7.1/include/toolkit/dock.h0000644000175100017510000000534315144077706017010 0ustar runnerrunner/* ========================================================================= */ /** * @file dock.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_DOCK_H__ #define __WLMTK_DOCK_H__ #include #define WLR_USE_UNSTABLE #include #undef WLR_USE_UNSTABLE #include "element.h" #include "panel.h" #include "style.h" #include "tile.h" /** Forward declaration: Dock handle. */ typedef struct _wlmtk_dock_t wlmtk_dock_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Positioning options for the dock. */ typedef struct { /** Principal edge the dock aligns to. Must not be WLR_EDGE_NONE. */ enum wlr_edges edge; /** Dock anchor, along @ref wlmtk_dock_positioning_t::edge. */ enum wlr_edges anchor; } wlmtk_dock_positioning_t; /** * Creates a dock. A dock contains icons, launchers and the likes. * * The dock is an implementation of a @ref wlmtk_panel_t. * * @param dock_positioning_ptr * @param style_ptr * * @return The dock handle, or NULL on error. Must be destroyed calling * @ref wlmtk_dock_destroy. */ wlmtk_dock_t *wlmtk_dock_create( const wlmtk_dock_positioning_t *dock_positioning_ptr, const wlmtk_dock_style_t *style_ptr); /** * Destroys the dock. * * @param dock_ptr */ void wlmtk_dock_destroy(wlmtk_dock_t *dock_ptr); /** * Adds the tile to the dock. * * @param dock_ptr * @param tile_ptr */ void wlmtk_dock_add_tile( wlmtk_dock_t *dock_ptr, wlmtk_tile_t *tile_ptr); /** * Removes the tile from the dock. * * @param dock_ptr * @param tile_ptr */ void wlmtk_dock_remove_tile( wlmtk_dock_t *dock_ptr, wlmtk_tile_t *tile_ptr); /** @return Pointer to the superclass @ref wlmtk_panel_t of `dock_ptr`. */ wlmtk_panel_t *wlmtk_dock_panel(wlmtk_dock_t *dock_ptr); /** @return Pointer to the superclass @ref wlmtk_element_t of `dock_ptr`. */ wlmtk_element_t *wlmtk_dock_element(wlmtk_dock_t *dock_ptr); /** Unit tests for @ref wlmtk_dock_t. */ extern const bs_test_case_t wlmtk_dock_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_DOCK_H__ */ /* == End of dock.h ======================================================== */ wlmaker-0.7.1/include/toolkit/image.h0000644000175100017510000000367115144077706017154 0ustar runnerrunner/* ========================================================================= */ /** * @file image.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_IMAGE_H__ #define __WLMTK_IMAGE_H__ #include #include "element.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Forward declaration: State of a toolkit image. */ typedef struct _wlmtk_image_t wlmtk_image_t; /** * Creates a toolkit image: An element showing the image. * * @param image_path_ptr * * @return Pointer to the toolkit image, or NULL on error. */ wlmtk_image_t *wlmtk_image_create( const char *image_path_ptr); /** * Creates a toolkit image, scaled while preserving aspect ratio. * * @param image_path_ptr * @param width * @param height * * @return Pointer to the toolkit image or NULL on error. */ wlmtk_image_t *wlmtk_image_create_scaled( const char *image_path_ptr, int width, int height); /** * Destroys the toolkit image. * * @param image_ptr */ void wlmtk_image_destroy(wlmtk_image_t *image_ptr); /** @return the parent @ref wlmtk_element_t of `image_ptr`. */ wlmtk_element_t *wlmtk_image_element(wlmtk_image_t *image_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_image_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __IMAGE_H__ */ /* == End of image.h ================================================== */ wlmaker-0.7.1/include/toolkit/window.h0000644000175100017510000003001615144077706017372 0ustar runnerrunner/* ========================================================================= */ /** * @file window.h * * @copyright * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_WINDOW2_H__ #define __WLMTK_WINDOW2_H__ #include #include #include #include struct wlr_output; /** Forward declaration: Window. */ typedef struct _wlmtk_window_t wlmtk_window_t; #include "element.h" #include "menu.h" #include "style.h" #include "util.h" #include "workspace.h" // IWYU pragma: keep #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Signals available for the @ref wlmtk_window_t class. */ typedef struct { /** * Signals that the window state (maximize, iconify, ...) changed. * * Window state can be retrieved from: * - @ref wlmtk_window_is_maximized * - @ref wlmtk_window_is_fullscreen * - @ref wlmtk_window_is_shaded * * The signal is also raised when the window's workspace is changed. * Retrieve through @ref wlmtk_window_get_workspace. * * data_ptr points to the window state (@ref wlmtk_window_t). */ struct wl_signal state_changed; /** Signals that @ref wlmtk_window_t::activated changed. */ struct wl_signal set_activated; /** * Signals that the window was requested to be closed. * * Applies only to windows with @ref WLMTK_WINDOW_PROPERTY_CLOSABLE. */ struct wl_signal request_close; /** * Signals that the window's size is requested to change. * * Takes a `struct wlr_box*` as argument. */ struct wl_signal request_size; /** * Signals that the window is desiring to switch to fullscreen. * * Takes a `bool` as argument, specifying whether to enable fullscreen. */ struct wl_signal request_fullscreen; /** * Signals that the window is desiring to switch to maximized. * * Takes a `bool` as argument, specifying whether to enable maximized. */ struct wl_signal request_maximized; } wlmtk_window_events_t; /** Window properties. */ typedef enum { /** Can be resized. Server-side decorations will show resize-bar. */ WLMTK_WINDOW_PROPERTY_RESIZABLE = UINT32_C(1) << 0, /** Can be iconified. Server-side decorations include icnonify button. */ WLMTK_WINDOW_PROPERTY_ICONIFIABLE = UINT32_C(1) << 1, /** Can be closed. Server-side decorations include close button. */ WLMTK_WINDOW_PROPERTY_CLOSABLE = UINT32_C(1) << 2, /** * Kludge: a window that closes on right-click-release. * The window's element must pointer_grab. * TODO(kaeser@gubbe.ch): This should be... better. */ WLMTK_WINDOW_PROPERTY_RIGHTCLICK = UINT32_C(1) << 3 } wlmtk_window_property_t; /** * Creates a window. * * @param content_element_ptr * @param style_ptr * @param menu_style_ptr * * @return The window handle, or NULL on error. */ wlmtk_window_t *wlmtk_window_create( wlmtk_element_t *content_element_ptr, const wlmtk_window_style_t *style_ptr, const wlmtk_menu_style_t *menu_style_ptr); /** * Destroys the window. * * @param window_ptr */ void wlmtk_window_destroy(wlmtk_window_t *window_ptr); /** * Gets the set of events available to a window, for binding listeners. * * @param window_ptr * * @return Pointer to this window's @ref wlmtk_window_t::events. */ wlmtk_window_events_t *wlmtk_window_events(wlmtk_window_t *window_ptr); /** * Returns the element for adding the window into a container. * * @param window_ptr * * @return Pointer to the super element of @ref wlmtk_window_t::bordered. */ wlmtk_element_t *wlmtk_window_element(wlmtk_window_t *window_ptr); /** * Returns the window, where `element_ptr` is @ref wlmtk_window_element. * * @param element_ptr * * @return the @ref wlmtk_window_t from the element pointer. */ wlmtk_window_t *wlmtk_window_from_element(wlmtk_element_t *element_ptr); /** * Returns the bounding box for the window. * * @param window_ptr * * @return the box. */ struct wlr_box wlmtk_window_get_bounding_box(wlmtk_window_t *window_ptr); /** Helper: Indicates that the position has changed. */ void wlmtk_window_position_changed(wlmtk_window_t *window_ptr); /** * Sets properties for the window. * * @param window_ptr * @param properties @see wlmtk_window_property_t. */ void wlmtk_window_set_properties( wlmtk_window_t *window_ptr, uint32_t properties); /** * Sets client information for the window. * * @param window_ptr * @param client_ptr The client's information will be copied into * @ref wlmtk_window_t::client, and does not need * to outlive this call. */ void wlmtk_window_set_client( wlmtk_window_t *window_ptr, const wlmtk_util_client_t *client_ptr); /** * Returns a pointer to @ref wlmtk_window_t::client. * * @param window_ptr * * @return Client information. Remains walid until `window_ptr` is destroyed. */ const wlmtk_util_client_t *wlmtk_window_get_client_ptr( wlmtk_window_t *window_ptr); /** * Sets the WLR output for the window. Used for fullscreen requests. * * @param window_ptr * @param wlr_output_ptr Output to consider when requesting a window as * fullscreen. Can be NULL to indicate no preference. */ void wlmtk_window_set_wlr_output( wlmtk_window_t *window_ptr, struct wlr_output *wlr_output_ptr); /** * Gets the struct wlr_output that the window prefers, or is on. * * @param window_ptr * * @return Pointer to the struct wlr_output the center of the window is placed * on, or NULL if none is available or the window is not mapped. */ struct wlr_output *wlmtk_window_get_wlr_output( wlmtk_window_t *window_ptr); /** * Sets the title for the window. * * If `title_ptr` is NULL, a generic name is set. * * @param window_ptr * @param title_ptr May be NULL. * * @return true on success. */ bool wlmtk_window_set_title( wlmtk_window_t *window_ptr, const char *title_ptr); /** * Returns the title of the window. * * @param window_ptr * * @returns Pointer to the window title. Will remain valid until the next call * to @ref wlmtk_window_set_title, or until the window is destroyed. Will * never be NULL. */ const char *wlmtk_window_get_title(wlmtk_window_t *window_ptr); /** * Sets the window as activated, depending on the argument's value. * * An activated window will have keyboard focus and would have distinct * decorations to indicate state. * * @param window_ptr * @param activated */ void wlmtk_window_set_activated( wlmtk_window_t *window_ptr, bool activated); /** @return whether the window is currently activated. */ bool wlmtk_window_is_activated(wlmtk_window_t *window_ptr); /** * Requests the window's size to be updated. * * @param window_ptr * @param box_ptr Only the `width` and `height` are considered. */ void wlmtk_window_request_size( wlmtk_window_t *window_ptr, const struct wlr_box *box_ptr); /** * Sets the window's committed size. Should be called when the content size * is changed, eg. on surface commit. * * @param window_ptr * @param width * @param height */ void wlmtk_window_commit_size( wlmtk_window_t *window_ptr, int width, int height); /** * Returns the window's (committed) size. That may be different than the * dimensions of the window's @ref wlmtk_window_t::content_element_ptr. * * @param window_ptr * * @return The size box. Only `width` and `height` will be used. */ struct wlr_box wlmtk_window_get_size(wlmtk_window_t *window_ptr); /** * Sets the resizing edges. Keeps the opposite edges firm when resizing. * * @param window_ptr * @param edges */ void wlmtk_window_set_resize_edges( wlmtk_window_t *window_ptr, uint32_t edges); /** @return resizing edges. */ uint32_t wlmtk_window_get_resize_edges(wlmtk_window_t *window_ptr); /** * Requests to close the window. * * @param window_ptr */ void wlmtk_window_request_close(wlmtk_window_t *window_ptr); /** * Requests to minimize (iconify) the window. * * @param window_ptr */ void wlmtk_window_request_minimize(wlmtk_window_t *window_ptr); /** * Requests the window to be fullscreen (or end fullscreen). * * @param window_ptr * @param fullscreen */ void wlmtk_window_request_fullscreen(wlmtk_window_t *window_ptr, bool fullscreen); /** @return whether the window currently is in fullscreen mode. */ bool wlmtk_window_is_fullscreen(wlmtk_window_t *window_ptr); /** * Commits the window as fullscreen: Client has comitted the surface in * fullscreen state. * * @param window_ptr * @param fullscreen */ void wlmtk_window_commit_fullscreen( wlmtk_window_t *window_ptr, bool fullscreen); /** * Requests the window to be maximized (or end maximized). * * Guarantees to emit a @ref wlmtk_window_events_t::request_maximized signal, * either with the provided `maximized` value, or with what the compositor * deems acceptable. * * @param window_ptr * @param maximized */ void wlmtk_window_request_maximized( wlmtk_window_t *window_ptr, bool maximized); /** @return whether the window currently is in maximized mode. */ bool wlmtk_window_is_maximized(wlmtk_window_t *window_ptr); /** * Commits the `maximized` mode for the window. * * The call is idempotent: Once the window is committed, further calls with * the same `maximized` value will return straight away. * * @param window_ptr * @param maximized */ void wlmtk_window_commit_maximized( wlmtk_window_t *window_ptr, bool maximized); /** * Requests the window to be shaded (rolled up) or not. * * @param window_ptr * @param shaded */ void wlmtk_window_request_shaded(wlmtk_window_t *window_ptr, bool shaded); /** @return whether the window currently is shaded. */ bool wlmtk_window_is_shaded(wlmtk_window_t *window_ptr); /** * En-/Disables the window menu. * * @param window_ptr * @param enabled */ void wlmtk_window_menu_set_enabled(wlmtk_window_t *window_ptr, bool enabled); /** * Returns a pointer to the window menu's state. * * @param window_ptr * * @return A pointer to the @ref wlmtk_menu_t of the window menu. */ wlmtk_menu_t *wlmtk_window_menu(wlmtk_window_t *window_ptr); /** * Sets whether to have server-side decorations for this window. * * @param window_ptr * @param decorated */ void wlmtk_window_set_server_side_decorated( wlmtk_window_t *window_ptr, bool decorated); /** * Sets @ref wlmtk_window_t::workspace_ptr. * * Protected method, to be called only from @ref wlmtk_workspace_t. * * @param window_ptr * @param workspace_ptr */ void wlmtk_window_set_workspace( wlmtk_window_t *window_ptr, wlmtk_workspace_t *workspace_ptr); /** @return The value of @ref wlmtk_window_t::workspace_ptr. */ wlmtk_workspace_t *wlmtk_window_get_workspace(wlmtk_window_t *window_ptr); /** @return pointer to @ref wlmtk_window_t::dlnode. */ bs_dllist_node_t *wlmtk_dlnode_from_window(wlmtk_window_t *window_ptr); /** @return the @ref wlmtk_window_t for @ref wlmtk_window_t::dlnode. */ wlmtk_window_t *wlmtk_window_from_dlnode(bs_dllist_node_t *dlnode_ptr); /** Window unit test cases. */ extern const bs_test_case_t wlmtk_window_test_cases[]; /** * Creates a window, with default styles, for testing. * * @param content_element_ptr * * @return See @ref wlmtk_window_create. */ wlmtk_window_t *wlmtk_test_window_create(wlmtk_element_t *content_element_ptr); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_WINDOW2_H__ */ /* == End of window.h ===================================================== */ wlmaker-0.7.1/include/toolkit/titlebar.h0000644000175100017510000000667315144077706017705 0ustar runnerrunner/* ========================================================================= */ /** * @file titlebar.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_TITLEBAR_H__ #define __WLMTK_TITLEBAR_H__ #include #include #include /** Forward declaration: Title bar. */ typedef struct _wlmtk_titlebar_t wlmtk_titlebar_t; #include "element.h" #include "style.h" #include "window.h" // IWYU pragma: keep /** Properties of the titlebar: Which buttons to show. */ typedef enum { /** Whether the 'iconify' button is shown. */ WLMTK_TITLEBAR_PROPERTY_ICONIFY = UINT32_C(1) << 0, /** Whether the 'close' button is shown. */ WLMTK_TITLEBAR_PROPERTY_CLOSE = UINT32_C(1) << 1 } wlmtk_titlebar_property_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates a title bar, suitable as a window title. * * @param window_ptr * @param style_ptr * * @return Pointer to the title bar state, or NULL on error. Must be free'd * by calling @ref wlmtk_titlebar_destroy. */ wlmtk_titlebar_t *wlmtk_titlebar2_create( wlmtk_window_t *window_ptr, const wlmtk_titlebar_style_t *style_ptr); /** * Destroys the title bar. * * @param titlebar_ptr */ void wlmtk_titlebar_destroy(wlmtk_titlebar_t *titlebar_ptr); /** * Sets the width of the title bar. * * @param titlebar_ptr * @param width * * @return Whether the operation was successful. */ bool wlmtk_titlebar_set_width( wlmtk_titlebar_t *titlebar_ptr, unsigned width); /** * Sets the properties of the title bar. * * @param titlebar_ptr * @param properties See @ref wlmtk_titlebar_property_t. */ void wlmtk_titlebar_set_properties( wlmtk_titlebar_t *titlebar_ptr, uint32_t properties); /** * Sets whether the title bar is activated. * * @param titlebar_ptr * @param activated */ void wlmtk_titlebar_set_activated( wlmtk_titlebar_t *titlebar_ptr, bool activated); /** Returns whether the title bar is activated. */ bool wlmtk_titlebar_is_activated(wlmtk_titlebar_t *titlebar_ptr); /** * Updates the title text of the titlebar. * * @param titlebar_ptr * @param title_ptr Expected to remain valid until the next call of * @ref wlmtk_titlebar_set_title or until the * `titlebar_ptr` is destroyed. */ void wlmtk_titlebar_set_title( wlmtk_titlebar_t *titlebar_ptr, const char *title_ptr); /** * Returns the super Element of the titlebar. * * @param titlebar_ptr * * @return Pointer to the @ref wlmtk_element_t base instantiation to * titlebar_ptr. */ wlmtk_element_t *wlmtk_titlebar_element(wlmtk_titlebar_t *titlebar_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_titlebar_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_TITLEBAR_H__ */ /* == End of titlebar.h ==================================================== */ wlmaker-0.7.1/include/toolkit/tile.h0000644000175100017510000001027515144077706017025 0ustar runnerrunner/* ========================================================================= */ /** * @file tile.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_TILE_H__ #define __WLMTK_TILE_H__ /** Forward declaration: State of a tile. */ typedef struct _wlmtk_tile_t wlmtk_tile_t; #include #include #include #include "buffer.h" #include "container.h" #include "element.h" #include "style.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Style options for the tile. */ typedef struct { /** Fill style for the tile's background. */ wlmtk_style_fill_t fill; /** Size of the tile, in pixels. Tiles are of quadratic shape. */ uint64_t size; /** Content size of what's in the tile, in pixels. */ uint64_t content_size; /** Width of the bezel. */ uint64_t bezel_width; } wlmtk_tile_style_t; /** State of a tile. */ struct _wlmtk_tile_t { /** A tile is a container. Holds a background and contents. */ wlmtk_container_t super_container; /** The tile background is modelled as @ref wlmtk_buffer_t. */ wlmtk_buffer_t buffer; /** Style to be used for this tile. */ wlmtk_tile_style_t style; /** Holds the tile's background, used in @ref wlmtk_tile_t::buffer. */ struct wlr_buffer *background_wlr_buffer_ptr; /** References the content element from @ref wlmtk_tile_set_content. */ wlmtk_element_t *content_element_ptr; /** References the content element from @ref wlmtk_tile_set_overlay. */ wlmtk_element_t *overlay_element_ptr; }; /** * Initializes the tile. * * @param tile_ptr * @param style_ptr * * @return true on success. */ bool wlmtk_tile_init( wlmtk_tile_t *tile_ptr, const wlmtk_tile_style_t *style_ptr); /** * Un-initializes the tile. * * @param tile_ptr */ void wlmtk_tile_fini(wlmtk_tile_t *tile_ptr); /** * Sets (overwrites) the default tile's background buffer. * * This permits specific tiles, eg. a Dock Clip to include active elements in * the background, or change the bezel or texture. * * @param tile_ptr * @param wlr_buffer_ptr Points to a `struct wlr_buffer`. The tile will * add a buffer lock, so the caller may safely * drop or unlock the buffer. * The buffer must match the tile's size. * * @return false if the buffer did not match the tile size. */ bool wlmtk_tile_set_background_buffer( wlmtk_tile_t *tile_ptr, struct wlr_buffer *wlr_buffer_ptr); /** * Sets `element_ptr` as the content of `tile_ptr`. * * TODO(kaeser@gubbe.ch): Flesh out the behaviour -- permit only 1 content? * Does the tile claim ownerwhip? How to reset the content? * * @param tile_ptr * @param element_ptr */ void wlmtk_tile_set_content( wlmtk_tile_t *tile_ptr, wlmtk_element_t *element_ptr); /** * Sets `element_ptr` as the overlay of `tile_ptr`. * * TODO(kaeser@gubbe.ch): Flesh out the behaviour -- permit only 1 overlay? * Does the tile claim ownerwhip? How to reset the overlay? * * @param tile_ptr * @param element_ptr */ void wlmtk_tile_set_overlay( wlmtk_tile_t *tile_ptr, wlmtk_element_t *element_ptr); /** @return the superclass' @ref wlmtk_element_t of `tile_ptr`. */ wlmtk_element_t *wlmtk_tile_element(wlmtk_tile_t *tile_ptr); /** Unit test cases for @ref wlmtk_tile_t. */ extern const bs_test_case_t wlmtk_tile_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_TILE_H__ */ /* == End of tile.h ======================================================== */ wlmaker-0.7.1/include/toolkit/output_tracker.h0000644000175100017510000000747615144077706021154 0ustar runnerrunner/* ========================================================================= */ /** * @file output_tracker.h * * @copyright * Copyright (c) 2026 Google LLC and Philipp Kaeser * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMAKER_OUTPUT_TRACKER_H__ #define __WLMAKER_OUTPUT_TRACKER_H__ #include struct wlr_output; struct wlr_output_layout; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** State of the output tracker. */ typedef struct _wlmtk_output_tracker_t wlmtk_output_tracker_t; /** * Called when `wlr_output_ptr` got added to the layout. * * @param wlr_output_ptr * @param ud_ptr The `userdata_ptr` of @ref wlmtk_output_tracker_create. * * @return NULL for error, or a pointer that will be passed to * @ref wlmtk_output_tracker_output_update_callback_t, respectively to * @ref wlmtk_output_tracker_output_destroy_callback_t. */ typedef void *(*wlmtk_output_tracker_output_create_callback_t)( struct wlr_output *wlr_output_ptr, void *ud_ptr); /** * Called on layout updates, when `wlr_output_ptr` remains in layout. * * That can happen eg. when resolution or position changes; or when an * unrelated output is added or removed. * * @param wlr_output_ptr * @param ud_ptr * @param output_ptr */ typedef void (*wlmtk_output_tracker_output_update_callback_t)( struct wlr_output *wlr_output_ptr, void *ud_ptr, void *output_ptr); /** * Called when `wlr_output_ptr` got removed from the layout. * * @param wlr_output_ptr * @param ud_ptr * @param output_ptr */ typedef void (*wlmtk_output_tracker_output_destroy_callback_t)( struct wlr_output *wlr_output_ptr, void *ud_ptr, void *output_ptr); /** * Creates an output tracker. * * @param wlr_output_layout_ptr * @param userdata_ptr Will be passed to the callbacks below. * @param create_fn * @param update_fn * @param destroy_fn * * @return A tracker handle, or NULL on error. */ wlmtk_output_tracker_t *wlmtk_output_tracker_create( struct wlr_output_layout *wlr_output_layout_ptr, void *userdata_ptr, wlmtk_output_tracker_output_create_callback_t create_fn, wlmtk_output_tracker_output_update_callback_t update_fn, wlmtk_output_tracker_output_destroy_callback_t destroy_fn); /** * Destroys the output tracker. * * @ref wlmtk_output_tracker_output_destroy_callback_t will be called for any * yet-remaining output. * * @param tracker_ptr */ void wlmtk_output_tracker_destroy(wlmtk_output_tracker_t *tracker_ptr); /** * Returns the "created output" for `wlr_output_ptr`. * * @param tracker_ptr * @param wlr_output_ptr * * @return Return value of @ref wlmtk_output_tracker_output_create_callback_t * that was called for the value of `wlr_output_ptr`. Or NULL, if * `wlr_output_ptr` is not tracked. */ void *wlmtk_output_tracker_get_output( wlmtk_output_tracker_t *tracker_ptr, struct wlr_output *wlr_output_ptr); /** Returns @ref wlmtk_output_tracker_t::wlr_output_layout_ptr. */ struct wlr_output_layout *wlmtk_output_tracker_get_layout( wlmtk_output_tracker_t *tracker_ptr); /** Output tracker unit test. */ extern const bs_test_case_t wlmtk_output_tracker_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif // __WLMAKER_OUTPUT_TRACKER_H__ /* == End of output_tracker.h ============================================== */ wlmaker-0.7.1/include/toolkit/test.h0000644000175100017510000000425215144077706017045 0ustar runnerrunner/* ========================================================================= */ /** * @file test.h * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_TEST_H__ #define __WLMTK_TEST_H__ #include // IWYU pragma: keep #include /** Forward declaration. */ struct wlr_output; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Unit test comparator: Whether _box matches expected dimensions. */ #define WLMTK_TEST_VERIFY_WLRBOX_EQ(_test, _x, _y, _width, _height, _box) \ do { \ struct wlr_box __box = (_box); \ int __x = (_x), __y = (_y), __width = (_width), __height = (_height); \ if (__x != __box.x || __y != __box.y || \ __height != __box.height || __width != __box.width) { \ bs_test_fail_at( \ (_test), __FILE__, __LINE__, \ "Expecting {%d, %d, %d, %d}, got '%s' {%d, %d, %d, %d}", \ __x, __y, __width, __height, \ #_box, __box.x, __box.y, __box.width, __box.height); \ } \ } while (false) /** Initializes a struct wlr_output sufficient for testing. */ void wlmtk_test_wlr_output_init(struct wlr_output *wlr_output_ptr); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_TEST_H__ */ /* == End of test.h ================================================== */ wlmaker-0.7.1/include/toolkit/resizebar.h0000644000175100017510000000410415144077706020050 0ustar runnerrunner/* ========================================================================= */ /** * @file resizebar.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_RESIZEBAR_H__ #define __WLMTK_RESIZEBAR_H__ /** Forward declaration: Title bar. */ typedef struct _wlmtk_resizebar_t wlmtk_resizebar_t; #include #include #include "element.h" #include "style.h" #include "window.h" // IWYU pragma: keep #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates the resize bar. * * @param window_ptr * @param style_ptr * * @return Pointer to the resizebar state, or NULL on error. */ wlmtk_resizebar_t *wlmtk_resizebar2_create( wlmtk_window_t *window_ptr, const wlmtk_resizebar_style_t *style_ptr); /** * Destroys the resize bar. * * @param resizebar_ptr */ void wlmtk_resizebar_destroy(wlmtk_resizebar_t *resizebar_ptr); /** * Sets the width of the resize bar. * * @param resizebar_ptr * @param width * * @return true on success. */ bool wlmtk_resizebar_set_width( wlmtk_resizebar_t * resizebar_ptr, unsigned width); /** * Returns the super Element of the resizebar. * * @param resizebar_ptr * * @return Pointer to the element. */ wlmtk_element_t *wlmtk_resizebar_element(wlmtk_resizebar_t *resizebar_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_resizebar_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_RESIZEBAR_H__ */ /* == End of resizebar.h ================================================== */ wlmaker-0.7.1/include/toolkit/bordered.h0000644000175100017510000000620515144077706017654 0ustar runnerrunner/* ========================================================================= */ /** * @file bordered.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_BORDERED_H__ #define __WLMTK_BORDERED_H__ #include #include "libbase/libbase.h" #include "element.h" #include "container.h" #include "rectangle.h" #include "style.h" /** Forward declaration: Bordered container state. */ typedef struct _wlmtk_bordered_t wlmtk_bordered_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** State of the bordered container. */ struct _wlmtk_bordered_t { /** Super class of the bordered. */ wlmtk_container_t super_container; /** Virtual method table of the super element before extending it. */ wlmtk_element_vmt_t orig_super_element_vmt; /** Points to the element that will be enclosed by the border. */ wlmtk_element_t *element_ptr; /** Style of the border. */ wlmtk_margin_style_t style; /** Border element at the northern side. Includes east + west corners. */ wlmtk_rectangle_t *northern_border_rectangle_ptr; /** Border element at the eastern side. */ wlmtk_rectangle_t *eastern_border_rectangle_ptr; /** Border element at the southern side. Includes east + west corners. */ wlmtk_rectangle_t *southern_border_rectangle_ptr; /** Border element at the western side. */ wlmtk_rectangle_t *western_border_rectangle_ptr; }; /** * Initializes the bordered element. * * The bordered element positions the element within such that north-western * corner is at (0, 0). * * @param bordered_ptr * @param element_ptr * @param style_ptr * * @return true on success. */ bool wlmtk_bordered_init(wlmtk_bordered_t *bordered_ptr, wlmtk_element_t *element_ptr, const wlmtk_margin_style_t *style_ptr); /** * Un-initializes the bordered element. * * @param bordered_ptr */ void wlmtk_bordered_fini(wlmtk_bordered_t *bordered_ptr); /** * Updates the style. * * @param bordered_ptr * @param style_ptr */ void wlmtk_bordered_set_style(wlmtk_bordered_t *bordered_ptr, const wlmtk_margin_style_t *style_ptr); /** Returns the superclass @ref wlmtk_element_t for `bordered_ptr`. */ wlmtk_element_t *wlmtk_bordered_element(wlmtk_bordered_t *bordered_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_bordered_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_BORDERED_H__ */ /* == End of bordered.h ==================================================== */ wlmaker-0.7.1/include/toolkit/gfxbuf.h0000644000175100017510000000545715144077706017357 0ustar runnerrunner/* ========================================================================= */ /** * @file gfxbuf.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_GFXBUF_H__ #define __WLMTK_GFXBUF_H__ #include #include #define WLR_USE_UNSTABLE #include #undef WLR_USE_UNSTABLE struct wlr_buffer; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates a wlroots buffer tied to a libbase graphics buffer. * * This creates a libbase graphics buffer, and wraps it as `struct wlr_buffer`. * * @param width * @param height * * @return A struct wlr_buffer. Must be released using wlr_buffer_drop(). */ struct wlr_buffer *bs_gfxbuf_create_wlr_buffer( unsigned width, unsigned height); /** * Drops a WLR buffer, and sets the pointer to NULL. * * @param wlr_buffer_ptr_ptr Points to a pointer to a WLR buffer. The pointer * to the WLR buffer may be NULL; in that case, the * call is a no-op. */ void wlr_buffer_drop_nullify(struct wlr_buffer **wlr_buffer_ptr_ptr); /** * Returns the libbase graphics buffer for the `struct wlr_buffer`. * * @param wlr_buffer_ptr Pointer to a `struct wlr_buffer`. Must be a * `wlr_buffer` that was previously created by * @ref bs_gfxbuf_create_wlr_buffer. * * @return Pointer to the libbase graphics buffer. The `wlr_buffer_ptr` must * outlive the `bs_gfxbuf_t*`. Must not be destroyed. */ bs_gfxbuf_t *bs_gfxbuf_from_wlr_buffer(struct wlr_buffer *wlr_buffer_ptr); /** * Returns a `cairo_t` for the WLR buffer backed by a libbase graphics buffer. * * @param wlr_buffer_ptr Pointer to a `struct wlr_buffer`. Must be a * `wlr_buffer` that was previously created by * @ref bs_gfxbuf_create_wlr_buffer. * * @return Pointer to the the cairo. The `wlr_buffer_ptr` must outlive the * `cairo_t*`. It must be destroyed using `cairo_destroy`. */ cairo_t *cairo_create_from_wlr_buffer(struct wlr_buffer *wlr_buffer_ptr); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_GFXBUF_H__ */ /* == End of gfxbuf.h ====================================================== */ wlmaker-0.7.1/include/toolkit/surface.h0000644000175100017510000000707715144077706017526 0ustar runnerrunner/* ========================================================================= */ /** * @file surface.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_SURFACE_H__ #define __WLMTK_SURFACE_H__ #include #include #include /** Forward declaration: State of a toolkit's WLR surface. */ typedef struct _wlmtk_surface_t wlmtk_surface_t; /** Forward declaration: Virtual method table of the toolkit's WLR surface. */ typedef struct _wlmtk_surface_vmt_t wlmtk_surface_vmt_t; #include "element.h" /** Forward declaration. */ struct wlr_seat; struct wlr_surface; struct wlr_xdg_surface; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates a toolkit surface from the `wlr_surface_ptr`. * * @param wlr_surface_ptr * @param wlr_seat_ptr * * @return A pointer to the @ref wlmtk_surface_t. Must be destroyed by calling * @ref wlmtk_surface_destroy. */ wlmtk_surface_t *wlmtk_surface_create( struct wlr_surface *wlr_surface_ptr, struct wlr_seat *wlr_seat_ptr); /** * Creates a toolkit surface from the XDG surface `wlr_xdg_surface_ptr`. * * TODO(kaeser@gubbe.ch): Merge with @ref wlmtk_surface_create. * * @param wlr_xdg_surface_ptr * @param wlr_seat_ptr * * @return A pointer to the @ref wlmtk_surface_t. Must be destroyed by calling * @ref wlmtk_surface_destroy. */ wlmtk_surface_t *wlmtk_xdg_surface_create( struct wlr_xdg_surface *wlr_xdg_surface_ptr, struct wlr_seat *wlr_seat_ptr); /** * Destroys the toolkit surface. * * @param surface_ptr */ void wlmtk_surface_destroy(wlmtk_surface_t *surface_ptr); /** * Returns a pointer to the surface's element superclass instance. * * @param surface_ptr * * @return Pointer to the corresponding @ref wlmtk_element_t. */ wlmtk_element_t *wlmtk_surface_element(wlmtk_surface_t *surface_ptr); /** * Returns committed size of the surface. * * @param surface_ptr * @param width_ptr * @param height_ptr */ void wlmtk_surface_get_size( wlmtk_surface_t *surface_ptr, int *width_ptr, int *height_ptr); /** * Activates the surface. * * @param surface_ptr * @param activated */ void wlmtk_surface_set_activated( wlmtk_surface_t *surface_ptr, bool activated); /** @return Whether the surface is activated. */ bool wlmtk_surface_is_activated(wlmtk_surface_t *surface_ptr); /** Connects a listener and handler to the `map` signal of `wlr_surface`. */ void wlmtk_surface_connect_map_listener_signal( wlmtk_surface_t *surface_ptr, struct wl_listener *listener_ptr, wl_notify_func_t handler); /** Connects a listener and handler to the `unmap` signal of `wlr_surface`. */ void wlmtk_surface_connect_unmap_listener_signal( wlmtk_surface_t *surface_ptr, struct wl_listener *listener_ptr, wl_notify_func_t handler); /** Unit test cases. */ extern const bs_test_case_t wlmtk_surface_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_SURFACE_H__ */ /* == End of surface.h ===================================================== */ wlmaker-0.7.1/include/toolkit/primitives.h0000644000175100017510000001052015144077706020254 0ustar runnerrunner/* ========================================================================= */ /** * @file primitives.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_PRIMITIVES_H__ #define __WLMTK_PRIMITIVES_H__ #include #include #include #include #include "style.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Completely fills the cairo with the specified style. * * @param cairo_ptr A cairo, backed by an image surface. * @param fill_ptr */ void wlmaker_primitives_cairo_fill( cairo_t *cairo_ptr, const wlmtk_style_fill_t *fill_ptr); /** * Fills the cairo with the specified style at the specified rectangle. * * @param cairo_ptr A cairo, backed by an image surface. * @param x * @param y * @param width * @param height * @param fill_ptr */ void wlmaker_primitives_cairo_fill_at( cairo_t *cairo_ptr, int x, int y, unsigned width, unsigned height, const wlmtk_style_fill_t *fill_ptr); /** * Sets the bezel color. * * Note: Window Maker draws the bezel by adding 80 (0x50) to each R, G, B of * the underlying title for the illuminated side; respectively by subtracting * 40 (0x28) on the non-illuminated side. * We are using cairo's overlaying with the respective "alpha" values below, * which leads to different results. * * @param cairo_ptr * @param illuminated */ void wlmaker_primitives_set_bezel_color( cairo_t *cairo_ptr, bool illuminated); /** * Draws a bezel into the cairo. * * @param cairo_ptr A cairo, backed by an image surface. * @param bezel_width * @param raised Whether the bezel is to highlight a raised (true) * or pressed (false) state. */ void wlmaker_primitives_draw_bezel( cairo_t *cairo_ptr, double bezel_width, bool raised); /** * Draws a bezel into the cairo, at specified position and width/height. * * @param cairo_ptr A cairo, backed by an image surface. * @param x * @param y * @param width * @param height * @param bezel_width * @param raised Whether the bezel is to highlight a raised (true) * or pressed (false) state. */ void wlmaker_primitives_draw_bezel_at( cairo_t *cairo_ptr, int x, int y, unsigned width, unsigned height, double bezel_width, bool raised); /** * Draws the "minimize" icon, as used in the title bar. * * @param cairo_ptr * @param size * @param color */ void wlmaker_primitives_draw_minimize_icon( cairo_t *cairo_ptr, int size, uint32_t color); /** * Draws the "close" icon, as used in the title bar. * * @param cairo_ptr * @param size * @param color */ void wlmaker_primitives_draw_close_icon( cairo_t *cairo_ptr, int size, uint32_t color); /** * Draws the window title into the `cairo_t`. * * @param cairo_ptr * @param font_style_ptr The font style to use. * @param title_ptr Title string, or NULL. * @param color As an ARGB 8888 value. */ void wlmaker_primitives_draw_window_title( cairo_t *cairo_ptr, const wlmtk_style_font_t *font_style_ptr, const char *title_ptr, uint32_t color); /** * Draws the text with given parameters into the `cairo_t` at (x, y). * * @param cairo_ptr * @param x * @param y * @param font_style_ptr * @param color * @param text_ptr */ void wlmaker_primitives_draw_text( cairo_t *cairo_ptr, int x, int y, const wlmtk_style_font_t *font_style_ptr, uint32_t color, const char *text_ptr); /** Unit tests. */ extern const bs_test_case_t wlmaker_primitives_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_PRIMITIVES_H__ */ /* == End of primitives.h ================================================== */ wlmaker-0.7.1/include/toolkit/base.h0000644000175100017510000000550715144077706017004 0ustar runnerrunner/* ========================================================================= */ /** * @file base.h * * @copyright * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_BASE_H__ #define __WLMTK_BASE_H__ /** Forward declaration: State of a base element. */ typedef struct _wlmtk_base_t wlmtk_base_t; #include #include #include "container.h" // IWYU pragma: keep #include "element.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** Base: Holds a base element with stacked & floating elements on top. */ struct _wlmtk_base_t { /** Super class of the base. Holds element and popups. */ wlmtk_container_t super_container; /** Virtual method table of the superclass' element. */ wlmtk_element_vmt_t orig_super_element_vmt; /** Points to the element contained at the base. */ wlmtk_element_t *content_element_ptr; }; /** * Initializes the base with the given element. * * @param base_ptr * @param element_ptr is added to @ref wlmtk_base_t::super_container * until @ref wlmtk_base_fini is called. Will take * ownership. May be NULL. * * @return true on success. */ bool wlmtk_base_init( wlmtk_base_t *base_ptr, wlmtk_element_t *element_ptr); /** * Un-initializes the base. * * @param base_ptr */ void wlmtk_base_fini(wlmtk_base_t *base_ptr); /** @return Pointer to the superclass @ref wlmtk_element_t of the base. */ wlmtk_element_t *wlmtk_base_element(wlmtk_base_t *base_ptr); /** * Sets @ref wlmtk_base_t::content_element_ptr. Any earlier content element * will be destroyed. * * @param base_ptr * @param content_element_ptr */ void wlmtk_base_set_content_element( wlmtk_base_t *base_ptr, wlmtk_element_t *content_element_ptr); /** Adds a stacked element (eg. a popup) */ void wlmtk_base_push_element( wlmtk_base_t *base_ptr, wlmtk_element_t *element_ptr); /** Removes a stacked element. */ void wlmtk_base_pop_element( wlmtk_base_t *base_ptr, wlmtk_element_t *element_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_base_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_BASE_H__ */ /* == End of base.h ======================================================== */ wlmaker-0.7.1/include/toolkit/resizebar_area.h0000644000175100017510000000450115144077706021041 0ustar runnerrunner/* ========================================================================= */ /** * @file resizebar_area.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_RESIZEBAR_AREA_H__ #define __WLMTK_RESIZEBAR_AREA_H__ #include #include // for bool #include // for uint32_t /** Forward declaration: Element of the resizebar. */ typedef struct _wlmtk_resizebar_area_t wlmtk_resizebar_area_t ; #include "element.h" #include "style.h" #include "window.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates a resizebar button. * * @param window_ptr * @param edges * * @return Pointer to the resizebar button. */ wlmtk_resizebar_area_t *wlmtk_resizebar2_area_create( wlmtk_window_t *window_ptr, uint32_t edges); /** * Destroys the resizebar element. * * @param resizebar_area_ptr */ void wlmtk_resizebar_area_destroy( wlmtk_resizebar_area_t *resizebar_area_ptr); /** * Redraws the element, with updated position and width. * * @param resizebar_area_ptr * @param gfxbuf_ptr * @param position * @param width * @param style_ptr * * @return true on success. */ bool wlmtk_resizebar_area_redraw( wlmtk_resizebar_area_t *resizebar_area_ptr, bs_gfxbuf_t *gfxbuf_ptr, unsigned position, unsigned width, const wlmtk_resizebar_style_t *style_ptr); /** Returns the button's super_buffer.super_element address. */ wlmtk_element_t *wlmtk_resizebar_area_element( wlmtk_resizebar_area_t *resizebar_area_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmtk_resizebar_area_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_RESIZEBAR_AREA_H__ */ /* == End of resizebar_area.h ============================================== */ wlmaker-0.7.1/include/toolkit/toolkit.h0000644000175100017510000000340015144077706017545 0ustar runnerrunner/* ========================================================================= */ /** * @file toolkit.h * * See @ref toolkit_page for documentation. * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_TOOLKIT_H__ #define __WLMTK_TOOLKIT_H__ // IWYU pragma: begin_exports #include "base.h" #include "bordered.h" #include "box.h" #include "buffer.h" #include "button.h" #include "container.h" #include "dock.h" #include "element.h" #include "fsm.h" #include "gfxbuf.h" #include "image.h" #include "input.h" #include "layer.h" #include "menu.h" #include "menu_item.h" #include "output_tracker.h" #include "panel.h" #include "popup.h" #include "primitives.h" #include "rectangle.h" #include "resizebar.h" #include "resizebar_area.h" #include "root.h" #include "style.h" #include "surface.h" #include "test.h" #include "tile.h" #include "titlebar.h" #include "titlebar_button.h" #include "titlebar_title.h" #include "util.h" #include "window.h" #include "workspace.h" // IWYU pragma: end_exports #ifdef __cplusplus extern "C" { #endif // __cplusplus #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_TOOLKIT_H__ */ /* == End of toolkit.h ===================================================== */ wlmaker-0.7.1/include/toolkit/workspace.h0000644000175100017510000002157315144077706020071 0ustar runnerrunner/* ========================================================================= */ /** * @file workspace.h * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMTK_WORKSPACE_H__ #define __WLMTK_WORKSPACE_H__ #include #include #include /** State of the workspace. */ typedef struct _wlmtk_workspace_t wlmtk_workspace_t; #include "element.h" #include "layer.h" // IWYU pragma: keep #include "root.h" // IWYU pragma: keep #include "tile.h" #include "window.h" // IWYU pragma: keep /** Forward declaration: wlr output layout. */ struct wlr_output; struct wlr_output_layout; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Indicates which layer the view shall be rendered in. * * See `enum layer` at: * https://wayland.app/protocols/wlr-layer-shell-unstable-v1. */ typedef enum { WLMTK_WORKSPACE_LAYER_BACKGROUND = 0, WLMTK_WORKSPACE_LAYER_BOTTOM = 1, WLMTK_WORKSPACE_LAYER_TOP = 3, WLMTK_WORKSPACE_LAYER_OVERLAY = 4, } wlmtk_workspace_layer_t; /** * Creates a workspace. * * @param wlr_output_layout_ptr Output layout. Must outlive the workspace. * @param name_ptr * @param tile_style_ptr * * @return Pointer to the workspace state, or NULL on error. Must be free'd * via @ref wlmtk_workspace_destroy. */ wlmtk_workspace_t *wlmtk_workspace_create( struct wlr_output_layout *wlr_output_layout_ptr, const char *name_ptr, const wlmtk_tile_style_t *tile_style_ptr); /** * Destroys the workspace. Will destroy any stil-contained element. * * @param workspace_ptr */ void wlmtk_workspace_destroy(wlmtk_workspace_t *workspace_ptr); /** * Sets or updates workspace details. * * @param workspace_ptr * @param index */ void wlmtk_workspace_set_details( wlmtk_workspace_t *workspace_ptr, int index); /** * Retrieves the naming details of this workspace. * * @param workspace_ptr * @param name_ptr_ptr * @param index_ptr */ void wlmtk_workspace_get_details( wlmtk_workspace_t *workspace_ptr, const char **name_ptr_ptr, int *index_ptr); /** * Returns the workspace'soutput extents available for maximized windows. * * @param workspace_ptr * @param wlr_output_ptr Output to lookup the extents for. May be NULL, * in which case the primary output is used. * * @return A `struct wlr_box` that lines out the available space and position. */ struct wlr_box wlmtk_workspace_get_maximize_extents( wlmtk_workspace_t *workspace_ptr, struct wlr_output *wlr_output_ptr); /** * Returns the extents of the workspace available for fullscreen windows. * * @param workspace_ptr * @param wlr_output_ptr Output to lookup the extents for. May be NULL, * in which case the primary output is used. * * @return A `struct wlr_box` that lines out the available space and position. */ struct wlr_box wlmtk_workspace_get_fullscreen_extents( wlmtk_workspace_t *workspace_ptr, struct wlr_output *wlr_output_ptr); /** * Confines the window to remain entirely within workspace extents. * * A no-op if window_ptr is not mapped to workspace_ptr. * * @param workspace_ptr * @param window_ptr */ void wlmtk_workspace_confine_within( wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr); /** Returns @ref wlmtk_workspace_t::wlr_output_layout_ptr. */ struct wlr_output_layout *wlmtk_workspace_get_wlr_output_layout( wlmtk_workspace_t *workspace_ptr); /** * Enabled or disables the workspace. * * An enabled workspace can have keyboard focus and activated windows. When * re-enabling a workspace, the formerly activated window will get re-activated * and re-gains keyboard focus. * * @param workspace_ptr * @param enabled */ void wlmtk_workspace_enable(wlmtk_workspace_t *workspace_ptr, bool enabled); /** @return whether this workspace is enabled. */ bool wlmtk_workspace_enabled(wlmtk_workspace_t *workspace_ptr); /** * Maps the window: Adds it to the workspace container and makes it visible. * * @param workspace_ptr * @param window_ptr */ void wlmtk_workspace_map_window(wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr); /** * Unmaps the window: Sets it as invisible and removes it from the container. * * @param workspace_ptr * @param window_ptr */ void wlmtk_workspace_unmap_window(wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr); /** * Sets the window's position. * * @param workspace_ptr * @param window_ptr * @param x * @param y */ void wlmtk_workspace_set_window_position( wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr, int x, int y); /** * Returns pointer to the @ref wlmtk_layer_t handle serving `layer`. * * @param workspace_ptr * @param layer * * @return Pointer to the layer state. */ wlmtk_layer_t *wlmtk_workspace_get_layer( wlmtk_workspace_t *workspace_ptr, wlmtk_workspace_layer_t layer); /** * Returns the `bs_dllist_t` of currently mapped windows. * * @param workspace_ptr * * @return A pointer to the list. Note that the list should not be manipulated * directly. It's contents can change on @ref wlmtk_workspace_map_window * or @ref wlmtk_workspace_unmap_window calls. */ bs_dllist_t *wlmtk_workspace_get_windows_dllist( wlmtk_workspace_t *workspace_ptr); /** * Promotes the window to the fullscreen layer (or back). * * To be called by @ref wlmtk_window_commit_fullscreen. * * @param workspace_ptr * @param window_ptr * @param fullscreen */ void wlmtk_workspace_window_to_fullscreen( wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr, bool fullscreen); /** * Initiates a 'move' for the window. * * @param workspace_ptr * @param window_ptr */ void wlmtk_workspace_begin_window_move( wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr); /** * Initiates a 'resize' for the window. * * @param workspace_ptr * @param window_ptr * @param edges */ void wlmtk_workspace_begin_window_resize( wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr, uint32_t edges); /** Acticates `window_ptr`. Will de-activate an earlier window. */ void wlmtk_workspace_activate_window( wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr); /** @return Pointer to the activated @ref wlmtk_window_t, if any. */ wlmtk_window_t *wlmtk_workspace_get_activated_window( wlmtk_workspace_t *workspace_ptr); /** * Activates the @ref wlmtk_window_t *before* the currently activated one. * * Intended to permit cycling through tasks. Will activate the window, but not * raise it. See @ref wlmtk_workspace_activate_next_window. * * @param workspace_ptr */ void wlmtk_workspace_activate_previous_window( wlmtk_workspace_t *workspace_ptr); /** * Activates the @ref wlmtk_window_t *after* the currently activated one. * * Intended to permit cycling through tasks. Will activate the window, but not * raise it. See @ref wlmtk_workspace_activate_previous_window. * * @param workspace_ptr */ void wlmtk_workspace_activate_next_window( wlmtk_workspace_t *workspace_ptr); /** Raises `window_ptr`: Will show it atop all other windows. */ void wlmtk_workspace_raise_window( wlmtk_workspace_t *workspace_ptr, wlmtk_window_t *window_ptr); /** @return Pointer to wlmtk_workspace_t::super_container::super_element. */ wlmtk_element_t *wlmtk_workspace_element(wlmtk_workspace_t *workspace_ptr); /** @return pointer to the anchor @ref wlmtk_root_t of `workspace_ptr`. */ wlmtk_root_t *wlmtk_workspace_get_root(wlmtk_workspace_t *workspace_ptr); /** * Sets the anchor @ref wlmtk_root_t of `workspace_ptr`. * * @protected Must only be called from @ref wlmtk_root_t. * * @param workspace_ptr * @param root_ptr */ void wlmtk_workspace_set_root( wlmtk_workspace_t *workspace_ptr, wlmtk_root_t *root_ptr); /** @return Pointer to @ref wlmtk_workspace_t::dlnode. */ bs_dllist_node_t *wlmtk_dlnode_from_workspace( wlmtk_workspace_t *workspace_ptr); /** @return Poitner to the @ref wlmtk_workspace_t of the `dlnode_ptr`. */ wlmtk_workspace_t *wlmtk_workspace_from_dlnode( bs_dllist_node_t *dlnode_ptr); /** Unit tests for the workspace. */ extern const bs_test_case_t wlmtk_workspace_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMTK_WORKSPACE_H__ */ /* == End of workspace.h =================================================== */ wlmaker-0.7.1/include/backend/0000755000175100017510000000000015144077706015614 5ustar runnerrunnerwlmaker-0.7.1/include/backend/output_manager.h0000644000175100017510000000445515144077706021027 0ustar runnerrunner/* ========================================================================= */ /** * @file output_manager.h * * @copyright * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMBE_OUTPUT_MANAGER_H__ #define __WLMBE_OUTPUT_MANAGER_H__ struct wl_display; struct wlr_backend; struct wlr_output_layout; struct wlr_scene; /** Forward declaration: Handle for output managers. */ typedef struct _wlmbe_output_manager_t wlmbe_output_manager_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Instantiates output managers for both `wlr-output-management-unstable-v1` * and `xdg-output-unstable-v1`. Both will listen for output changes in * `wlr_output_layout_ptr` and update the respective output configurations * is requested so. * * @param wl_display_ptr * @param wlr_scene_ptr * @param wlr_output_layout_ptr * @param wlr_backend_ptr * * @return Handle for the output managers, or NULL on error. Must be destroyed * by @ref wlmbe_output_manager_destroy. */ wlmbe_output_manager_t *wlmbe_output_manager_create( struct wl_display *wl_display_ptr, struct wlr_scene *wlr_scene_ptr, struct wlr_output_layout *wlr_output_layout_ptr, struct wlr_backend *wlr_backend_ptr); /** * Destroy the output manager, returned from @ref wlmbe_output_manager_create. * * @param output_manager_ptr */ void wlmbe_output_manager_destroy( wlmbe_output_manager_t *output_manager_ptr); /** * Scales all outputs by the provided scale factor. * * @param output_manager_ptr * @param scale */ void wlmbe_output_manager_scale( wlmbe_output_manager_t *output_manager_ptr, double scale); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMBE_OUTPUT_MANAGER_H__ */ /* == End of output_manager.h ============================================== */ wlmaker-0.7.1/include/backend/output.h0000644000175100017510000000564315144077706017335 0ustar runnerrunner/* ========================================================================= */ /** * @file output.h * * @copyright * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMBE_OUTPUT_H__ #define __WLMBE_OUTPUT_H__ #include #include #include "output_config.h" /** Handle for an output device. */ typedef struct _wlmbe_output_t wlmbe_output_t; struct wlr_output; struct wlr_allocator; struct wlr_renderer; struct wlr_scene; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates an output device from `wlr_output_ptr`. * * @param wlr_output_ptr * @param wlr_allocator_ptr * @param wlr_renderer_ptr * @param wlr_scene_ptr * @param config_ptr * @param width * @param height * * @return The output device handle or NULL on error. */ wlmbe_output_t *wlmbe_output_create( struct wlr_output *wlr_output_ptr, struct wlr_allocator *wlr_allocator_ptr, struct wlr_renderer *wlr_renderer_ptr, struct wlr_scene *wlr_scene_ptr, wlmbe_output_config_t *config_ptr, int width, int height); /** * Destroys the output device handle, as created by @ref wlmbe_output_create. * * @param output_ptr */ void wlmbe_output_destroy(wlmbe_output_t *output_ptr); /** @return A long description string, @see wlmbe_output_t::description_ptr. */ const char *wlmbe_output_description(wlmbe_output_t *output_ptr); /** Returns @ref wlmbe_output_t::wlr_output_ptr. */ struct wlr_output *wlmbe_wlr_output_from_output(wlmbe_output_t *output_ptr); /** * Gets the attributes of this output. * * @param output_ptr * * @return pointer to @ref wlmbe_output_config_t::attributes of * @ref wlmbe_output_t::output_config_ptr. */ const wlmbe_output_config_attributes_t *wlmbe_output_attributes( wlmbe_output_t *output_ptr); /** Updates attributes from wlr_output, and from the given position data. */ void wlmbe_output_update_attributes( wlmbe_output_t *output_ptr, int x, int y, bool has_position); /** Returns a pointer to @ref wlmbe_output_t::dlnode. */ bs_dllist_node_t *wlmbe_dlnode_from_output(wlmbe_output_t *output_ptr); /** Returns the @ref wlmbe_output_t for @ref wlmbe_output_t::dlnode. */ wlmbe_output_t *wlmbe_output_from_dlnode(bs_dllist_node_t *dlnode_ptr); #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMBE_OUTPUT_H__ */ /* == End of output.h ====================================================== */ wlmaker-0.7.1/include/backend/backend.h0000644000175100017510000000655615144077706017370 0ustar runnerrunner/* ========================================================================= */ /** * @file backend.h * * @copyright * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMBE_BACKEND_H__ #define __WLMBE_BACKEND_H__ #include #include #include #include struct wl_display; struct wlr_output_layout; struct wlr_scene; /** Forward declaration. */ typedef struct _wlmbe_backend_t wlmbe_backend_t; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** * Creates the backend drivers. * * @param wl_display_ptr * @param wlr_scene_ptr * @param wlr_output_layout_ptr * @param width * @param height * @param config_dict_ptr * @param state_fname_ptr * * @return the server backend state, or NULL on error. */ wlmbe_backend_t *wlmbe_backend_create( struct wl_display *wl_display_ptr, struct wlr_scene *wlr_scene_ptr, struct wlr_output_layout *wlr_output_layout_ptr, int width, int height, bspl_dict_t *config_dict_ptr, const char *state_fname_ptr); /** * Destroys the server backend. * * @param backend_ptr */ void wlmbe_backend_destroy(wlmbe_backend_t *backend_ptr); /** * Switches to the given virtual terminal, if a wlroots session is available. * * Logs if wlr_session_change_vt() fails, but ignores the errors. * * @param backend_ptr * @param vt_num */ void wlmbe_backend_switch_to_vt(wlmbe_backend_t *backend_ptr, unsigned vt_num); /** Accessor. TODO(kaeser@gubbe.ch): Eliminate. */ struct wlr_backend *wlmbe_backend_wlr(wlmbe_backend_t *backend_ptr); /** Accessor. TODO(kaeser@gubbe.ch): Eliminate. */ struct wlr_compositor *wlmbe_backend_compositor(wlmbe_backend_t *backend_ptr); /** * Returns the primary output. Currently that is the first output found * in the output layout. * * @param wlr_output_layout_ptr * * @return A pointer to the `struct wlr_output` for the primary output. */ struct wlr_output *wlmbe_primary_output( struct wlr_output_layout *wlr_output_layout_ptr); /** * Returns the number of outputs active in the output layout. * * @param wlr_output_layout_ptr * * @return Number of outputs. */ size_t wlmbe_num_outputs(struct wlr_output_layout *wlr_output_layout_ptr); /** Magnifies all backend outputs by @ref _wlmbke_backend_magnification. */ void wlmbe_backend_magnify(wlmbe_backend_t *backend_ptr); /** Reduces all backend outputs by @ref _wlmbke_backend_magnification. */ void wlmbe_backend_reduce(wlmbe_backend_t *backend_ptr); /** Saves the output's ephemeral state into the state file. */ bool wlmbe_backend_save_ephemeral_output_configs(wlmbe_backend_t *backend_ptr); /** Unit test cases. */ extern const bs_test_case_t wlmbe_backend_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMBE_BACKEND_H__ */ /* == End of backend.h ===================================================== */ wlmaker-0.7.1/include/backend/output_config.h0000644000175100017510000001736015144077706020661 0ustar runnerrunner/* ========================================================================= */ /** * @file output_config.h * * @copyright * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __WLMBE_OUTPUT_CONFIG_H__ #define __WLMBE_OUTPUT_CONFIG_H__ #include #include #include #include #include /** Forward declaration. */ typedef struct _wlmbe_output_config_t wlmbe_output_config_t; struct wlr_output; struct wlr_output_layout; #ifdef __cplusplus extern "C" { #endif // __cplusplus /** An output's position. */ typedef struct { /** Horizontal, in pixels. */ int32_t x; /** Vertical, in pixels. */ int32_t y; } wlmbe_output_config_position_t; /** An output's position. */ typedef struct { /** Width, in pixels. */ int32_t width; /** Height, in pixels. */ int32_t height; /** Refresh rate, in mHz. Set 0, to let backend pick a preferred value. */ int32_t refresh; } wlmbe_output_config_mode_t; /** Description of an output, useful to identify an output. */ typedef struct { /** Name of this output. */ char *name_ptr; /** Whether a 'Name' entry was present. */ bool has_name; /** Manufacturer of this output. That is 'make' in WLR speech. */ char *manufacturer_ptr; /** Whether the 'Manufacturer' entry was present. */ bool has_manufacturer; /** The model of this output. */ char *model_ptr; /** Whether the 'Model' entry was present. */ bool has_model; /** The serial of this output. */ char *serial_ptr; /** Whether the 'Serial' entry was present. */ bool has_serial; } wlmbe_output_description_t; /** Attributes of the output. */ typedef struct { /** Default transformation for the output(s). */ enum wl_output_transform transformation; /** Default scaling factor to use for the output(s). */ double scale; /** Whether this output is enabled. */ bool enabled; /** Position of this output. */ wlmbe_output_config_position_t position; /** Whether the 'Position' field was present. */ bool has_position; /** Mode of this output. */ wlmbe_output_config_mode_t mode; /** Whether the 'Mode' field was present. */ bool has_mode; } wlmbe_output_config_attributes_t; /** Returns the base pointer from the @ref wlmbe_output_config_t::dlnode. */ wlmbe_output_config_t *wlmbe_output_config_from_dlnode( bs_dllist_node_t *dlnode_ptr); /** Returns the base pointer from the @ref wlmbe_output_config_t::dlnode. */ bs_dllist_node_t *wlmbe_dlnode_from_output_config( wlmbe_output_config_t *config_ptr); /** Returns pointer to @ref wlmbe_output_config_t::attributes. */ const wlmbe_output_config_attributes_t *wlmbe_output_config_attributes( wlmbe_output_config_t *config_ptr); /** Updates the attributes from wlr_output_ptr and the given position info. */ void wlmbe_output_config_update_attributes( wlmbe_output_config_t *config_ptr, struct wlr_output *wlr_output_ptr, int x, int y, bool has_position); /** * Applies `attributes_ptr` to the configuration. Respects presence flags. * * @param config_ptr * @param attributes_ptr */ void wlmbe_output_config_apply_attributes( wlmbe_output_config_t *config_ptr, const wlmbe_output_config_attributes_t *attributes_ptr); /** * Creates a new output config from `wlr_output`. * * @param wlr_output_ptr * * @return New output configuration or NULL on error. */ wlmbe_output_config_t *wlmbe_output_config_create_from_wlr( struct wlr_output *wlr_output_ptr); /** * Returns whether the backend configuration equals the wlr_output attributes. * * @param dlnode_ptr To @ref wlmbe_output_config_t::dlnode. * @param ud_ptr To a `struct wlr_output`. * * @return true if it equals. */ bool wlmbe_output_config_equals( bs_dllist_node_t *dlnode_ptr, void *ud_ptr); /** * Returns if the backend configuration fnmatches the wlr_output attributes. * * @param dlnode_ptr To @ref wlmbe_output_config_t::dlnode. * @param ud_ptr To a `struct wlr_output`. * * @return true if it matches. */ bool wlmbe_output_config_fnmatches( bs_dllist_node_t *dlnode_ptr, void *ud_ptr); /** * Creates a new output config from the plist dictionnary `dict_ptr`. * * @param dict_ptr * * @return New output configuration or NULL on error. */ wlmbe_output_config_t *wlmbe_output_config_create_from_plist( bspl_dict_t *dict_ptr); /** * Creates a plist dict from the output config. * * @param config_ptr * * @return A plist dict or NULL on error. */ bspl_dict_t *wlmbe_output_config_create_into_plist( const wlmbe_output_config_t *config_ptr); /** Destroys the output configuration. */ void wlmbe_output_config_destroy(wlmbe_output_config_t *config_ptr); /** * Initializes the output description from the plist dictionary. * * @param desc_ptr * @param dict_ptr Dictionary describing the output. It may contain * keys and values beyond of what's described in * @ref _wlmbe_output_description_desc. */ bool wlmbe_output_description_init_from_plist( wlmbe_output_description_t *desc_ptr, bspl_dict_t *dict_ptr); /** Un-initializes the output description. */ void wlmbe_output_description_fini(wlmbe_output_description_t *desc_ptr); /** * Returns whether the output description equals the `wlr_output`'s attributes. * * @param desc_ptr * @param wlr_output_ptr * * @return True if all fields (Name, Manufacturer, Model, Serial) have the * same presence in both description and `wlr_output_ptr`, and (if present) * their values are equal. */ bool wlmbe_output_description_equals( wlmbe_output_description_t *desc_ptr, struct wlr_output *wlr_output_ptr); /** * Returns whether the output description matches the `wlr_output`'s attributes. * * @param desc_ptr * @param wlr_output_ptr * * @return For all fields present in the description, returns the aggregate AND * of whether a fnmatch() of the field matches the corresponding `wlr_output` * field. */ bool wlmbe_output_description_fnmatches( wlmbe_output_description_t *desc_ptr, struct wlr_output *wlr_output_ptr); /** * Returns the first `wlr_output_layout` output that matches `desc_ptr`. * * @param desc_ptr * @param wlr_output_layout_ptr * * @return A pointer to the first `wlr_output` found in `wlr_output_layout_ptr` * that matches `desc_ptr`. See @ref wlmbe_output_description_fnmatches for * matching details. */ struct wlr_output *wlmbe_output_description_first_fnmatch( wlmbe_output_description_t *desc_ptr, struct wlr_output_layout *wlr_output_layout_ptr); /** Unit tests for the output module. */ extern const bs_test_case_t wlmbe_output_config_test_cases[]; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif /* __WLMBE_OUTPUT_CONFIG_H__ */ /* == End of output_config.h ================================================== */ wlmaker-0.7.1/share/0000755000175100017510000000000015144077706013704 5ustar runnerrunnerwlmaker-0.7.1/share/wlmnetgraph-64x64.png0000644000175100017510000000270615144077706017540 0ustar runnerrunnerPNG  IHDR@@iqsRGB,gAMA a cHRMz&u0`:pQ<bKGD pHYs  tIME .7N IDATx[=HkIr BZ"X +`h# /6QB [ yyjx ,(ODl{̝fe:޹s|gsׯ-P.~(DzcHb[O`,|&OQAB6DeQ[N?~π3I½~W /9e&GH&U.03/ۙJ"P߾p Xqi:^OQkJXK-Z. X|k {|e|aaL&"B6glmm-.//Qxƒ/jjjֲ'D"FD(FGGD"@ qcnnC `crVF*)1>>& }hii-QWW#=|uuݕ=9zzz000ouuXZZr>cee[[[Htuuacc}}}8<<|3ƒN*^{yxaq̠099`0H$GK=l6h;<@eqK0 BFBR@R[wQK6;}T򒴇@QL@,!9<smx= S ` }; |rwbLk8m'}`1yú.O!1}mx=0f[ŎP+/2^UvXg#( /&py?ie; 9;lHP t#B G@ƥl,> ,˝W8, >]HlҺ̐)yUHj&<+WP"iOTY٪0`%SdlRv=IENDB`wlmaker-0.7.1/share/wlmaker.wlmnetgraph.desktop.in0000644000175100017510000000041715144077706021677 0ustar runnerrunner[Desktop Entry] Name=WLMNetGraph GenericName="Wayland Maker network usage graph dockapp" Comment="Display network usage" Exec=@CMAKE_INSTALL_PREFIX@/bin/wlmnetgraph Type=Application Categories=Utility;Monitor; Keywords=network;monitoring;dockapp;wlmaker Icon=wlmnetgraph wlmaker-0.7.1/share/wlmaker/0000755000175100017510000000000015144077706015346 5ustar runnerrunnerwlmaker-0.7.1/share/wlmaker/icons/0000755000175100017510000000000015144077706016461 5ustar runnerrunnerwlmaker-0.7.1/share/wlmaker/icons/chrome-48x48.png0000644000175100017510000000504715144077706021247 0ustar runnerrunnerPNG  IHDR00WiCCPICC profile(}=HPO["A;8d,VBЪKIC(Y:8*? .N.R}IE{ecYF*2U!.ЏD%fsg}S/]gyYJdO eaoOmZ:}0+J 9A$~~6ҩy0PhcYP'#Q?yZ= C9me봆" B*J(Bv):{H.\%0r,߳5nR(t5> xR?Iз \\4ytɐ)@˟gMY`Ys<Y%oC Zuwwߞ~rNvbKGD pHYs B(xtIME;Jp"IDAThYipS}ix`01 Nb(^,dPHZ ]I!Mmh I)!a ē`2B fH\Mb05dlɲ'Y{?dR,[O)矞9:;~gAV4>SfrIg;MCxM(P-9xev1&*v{V-O3T)Ouoo޸/d4hDSR'6~9$XYe$F{D3wbdծo,\ R$Q=޷2q`* #y6s:cE#@۪;]LG6˷7h[5nx^貼K?r ֤yp}Zd]!E&}1MBUf }4lN89O-ihT5RP6s#k.Ϋrdhs򡝕 >i^ Xw#$8i#tɩojGl =yƋ_I0O<~xAMƾzrfc @r_Fe ZLn&V*އ6GK0Pd )J"䚗Q."Sɜ&+M83&O^1Ԋ%[U ƀ/yS'4I#xjӁfl|`MK,PUoߝn< E!r3,)vۃ:{v,-Pб+zpڣ})̿.Aj,̈́d^CITN0'SDP6Q/ƀ1g{슝?V |t($G7o}{~RJmS5ްU]5P(Mo0&؁Ch2w3^zqqr'M btO;$쀟#9x7{r?b|huT=:eD(-G|H[[DTDE:mnstFoiYii(-t}WAH,XNi;ˈN { HזUR)TQys# k5٩[]TNTrz#:4s@ä|g02.#RZ}i[@O֭1-&Y]&"}DӘ.\(Ij<՘ZOO*aP奆}n`Ąd4!ǶŁ"`MqC3E24]x[bM^CxE;QۉʌDի!7*p̩k0VDq#V_{ ;`BHa k ^nu~[5_zk}cwZQkJA W 7R6#r>6kNCxH3+; S*D:3^7IO ,7aC_}rY58I GA 䎚$$& Nߪg {YZqp2Gm YƑ]oߏ%w vlLj o*rw37-иCXm.akba14l PXoExpRNZLTN,6  ILJ$/o6_twϿd5+ 4TVF:m8<Lks+6K(x\¼XEE_" ?sw;0<|@PzYdP°% |ȋ.  hwА/z}6[5! '`i8Z^ ]ܒCO%] 3?"@6Ho`ɮxK]zƥBk[4:`oN}c9~}[S/ 15F sx l/h ǏpfUf7N?eNp2B7'5sb]6BYc!?8{jowZIENDB`wlmaker-0.7.1/share/wlmaker/icons/README.md0000644000175100017510000000223315144077706017740 0ustar runnerrunnerIcons that are re-distributable with wlmaker, respecting the various licenses below: * chrome-48x48.png : MIT License [SuperTinyIcons](https://github.com/edent/SuperTinyIcons/blob/master/LICENSE)) * https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/chrome.svg * Resized using gimp. * firefox-48x48.png : MIT License [SuperTinyIcons](https://github.com/edent/SuperTinyIcons/blob/master/LICENSE)) * https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/firefox.svg * Edited to remove background, resized using gimp. * terminal-48x48.png : Public Domain [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Terminalicon2.png) * https://upload.wikimedia.org/wikipedia/commons/b/b3/Terminalicon2.png * convert -resize 48x48^ Terminalicon2.png terminal-48x48.png * clip-48x48.png : Public domain [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Ryanlerch_green_paperclip.svg) * https://upload.wikimedia.org/wikipedia/commons/0/0c/Ryanlerch_green_paperclip.svg * Edited for size in gimp, resized. * wlmaker-48x48.png, wlmaker-64x64.png : Apache 2.0 License. * Artist: https://www.fiverr.com/alex_logos. wlmaker-0.7.1/share/wlmaker/icons/firefox-48x48.png0000644000175100017510000000616615144077706021437 0ustar runnerrunnerPNG  IHDR00WiCCPICC profile(}=HPOS"vqP,8jP! :4$).kŪ "%ޗZx>λ}Ш046ɄͭW 29IJ.γ~5o1 2ô77m>qdx̤ ?r]segFLz8J,;X`V25)☪/d=V9oq*5ֺ'a8,s0X$PPC؈Ӯb!M ȥ FTAv{VarK 'B@8ǎ<W';붦;!+i ~Fߔ"@ߚ79N *uE^ywoir|j}bKGD pHYs B(xtIME4? sIDATh՚yl\x Ivi $ %4,2P *Z(Vj(j)j"U ) EUagi,$^=oY=IhHG3o||g>*?S%ˎu?P ";G;_VT"]rD{۟[5xx:y.9 sԮkJīqk׻3\զ\ur0{z犕K^GϪDP/KTQ,o~ ?ǧMcST"9&K~T`kį=,."16gjҴ;yP;*o0w03{`yoc,<8aъXAkQ.i7DBhR.4$ /xʿ"yQ"k ,8֮G6!R ˁ!a|i @fE ) EKVy= %Ch ';wiK7+uG.@euo@ W7E{xݬճBHʵ; PVF|֥/! '< <';7[ނcYB zѱߤu6Hq^^;P@~lFEbZ0-[(pKJ%<‚ߟ4=kZx~ۀ;n#r B,\!"EX+gJI=ykWf%qń6>?yoWق Ĝ5JYq JR ZuV(z^tzf&zw 4P"}hs 6%_]E]i#TVgJ~C[wϺO]G`fX|@^IKݨ7{h6M"hi'Gb b䞇ǀ-)6i4 Q|I U@{VAK%4(Iɻ]؋i) }|xbO@& _d9僀qU!8aiWcd,==D2J;:Y16ӇU ZlGg g Z\BOo5NWˆ [#*  ,hxQY9C!Naj*J&=Po6ێ#:dӖNgasb3RϹ-,Y aQ\6k dߑj)^JsD!TЛ@ /,=ؑWȆ`@[mZG?[q…oR*v_\\+q|Mq$,w,c)_Tph׭ua\`o8i$$Wr?U<=AL N_Ŝ/3 {GT3b?_*TjiN~l(D ܠ&wd DP .ÊeY|p؁=I9<{1tT83'Nr/k ]7'^QʛԸz]bTZP1wp:N,9:4ܞjP!A kK8 x70*7Bx[/1cIktDN ;KV"B J |Zr](Ai4MQjMP]!XTw?]XzihJ &J3*َ,hQ{=1U] \pn1%8x 4MMiּ\RdW/ga!G=TX4HN~R%hVζ#O+<Ҥ6t @h>jjG1l`t0(+?yT :n4#fS?H䖛c)N Ɂ\+B~i5AW9&|hoQ">3jO!1si=$':. :f GM%KRJb#Hit,'eF0Q#aAq*Lj!m<1p7t\wPMPx]B KNw?3ݩOСWg8Y GHN3xPj>IM3 :f`_jxx:6gUq1ZV`V _)sєXIENDB`wlmaker-0.7.1/share/wlmaker/icons/clip-48x48.png0000644000175100017510000001006115144077706020711 0ustar runnerrunnerPNG  IHDR00W~iCCPicc(}=HPO[*vqPVBЪKIC(Y:8*? .N.R}IE{e〪YF*2U!.(z$fsg}S/]gyY}JdO eaoOoZ:}+J 9A$~~1ҩyPhcYPQ?yZ= C9me봆" B*J(Bv):{H.\%0r,߳5nR(t05> xRf>Iп \\4ytɐ)@˟gMY | skHӬ7!0Ruwwߞ~-%rqI cHRMz&u0`:pQ<bKGD pHYs B(xtIME+([ IDAThilǟg8Cx")R("Al[t8m6-:fE\u7q6Mc@jǵ[e˒hɢÒ,ΐ ǍƱ އ<;mi!%^.~h<`(X50ccVj%XU%] sPyh]`9Uj"Xj9uJ=L(|JHgMyV $!Ht&bJ27ĚT Z&M̝x؞cIV`6X(0LG$meV,$KpޥZT,}з{g.(Lp /(JUxlub^4f'<,]9|okӳgՎ8t3@h.HB I-])>cwt9^^2߿hcUM_jzЌٸrS:MF$F\)w(jR[o}VU.) ܙ3b "l B"R;Ll{n?~镗?1e 1P (UKlվ^7 p*t=[oxě}z\5Mr%\C4P ѐӃ "ѺD3P)w#Laya +"]TTzƏ{j2"i8"o8IzQN)FUn箹'ǎ勖+4X^Vc`GKY4tlpF\JG5Fd^>S"),-fV0F gu&>ЛCk_1="+htw~{gr'!̐LNJJYg)z)֐Z,_SQMmU}VͺZ]A=;>8~d+=ν_lS[1߸XKG^:*v[E1RB-/S_r/{ޯKIK[{˰I2eb21wG~o# K XLzr_iH`1!*(_ $ 6.4 [i>Ĝ?:1eMp`A hzk9S6d"~?s ˄1ԨYS,_bL=ݬn3dm <78&V ƃq~R:=TT8nlkwe\{<揋9ڪF}!3/8Hw+ԂJ])!M&$NUlVl$qZgCiկѱFl{5RI^ m g2$C..K]\[fӍӹ&gn'8y}|Xȉ(YN+;$a~Ҙ0.p=¾|=?]^op*^N[*c=>}߫qjmv`"Nf9v@"i(7nFJn_I甃*//6S8%ָH)PX*300@ \ieJp_FlN2%kN;u@\,?[e@ Uh6rk77]ø/4Ng*g' #bCT/];| 1Ki!B%$NhvT(<;>-fJR]% 'zCМQfߛݭ5j:]0&h|o `hbiXYYZjsSGNÓbd5e?jo}8]Ve4Z [yq zAFQ"/-"VKxo6X0vk?pb~@@SjiZ- Bi-,L㸨#uiPIKKfx;D]I=n`Sl:m}^|uDd}P`$<>Y@kI$IO].ebن޾ZcgBl1|0}5 \Ʈ@C" EBa=n;4sv*dжĶ J s{y[lPoxO^oybM1>7s(r]6c"T?,hy!bBY6^oCC֬?=_s&.Ժz797rE|>x w0 f8Ʀ b0Mtaaq1jowϯ\jE&l*k'}'cjτ¹޵m}TRR/>NQQ tfOkw;{eV&nߺp?ˇHdap84 ޘRR"jYB@p:x_n0p}sIS-^e8oۯv{w#<^/ n2#`6FLPe#MXMWԼ%M˫0כ&ɍ`o; z壿x|uJ)lm 1 !9}+)gM /}+V~ j>OaSvJJJfp!cI<*0Pv0 ՎKbzվB痚a8΄狋؈} DTU]p: ݇\&;Qh8~:zqAڵ EEEsV"1)gԲra0 ى;wbBѣuF|XuJ)WFJJ"ū,//ǶmP__漤: mR)Τa ǶR 8p0pD"sxRBI;~Ϥ@"|cǎiB4hHqs]FҶLYpy". [nK`W\y|(%l; RBIt 2yLi~?JKK8Q"()T@1i 8:47ʏIY(If㷇y9&Pv 4 ̥ (]$gPJBYP$_Hg HY%\bIR$RFW fDJ!'tLRigCHnRy 4/h!$mRJͧ KeYFDp m;űI*D9<_d`)vb(96!@>קR ql[XӭI"pmXEg2su DHZ]ס뚈D"w'@8tF,ر$ǰmQpf8|)NJ)~܌X1ĩ\1"ˆiBXltqsO.]`0ڳnO"D c-e.o6PP @T_OƏ wlmaker-0.7.1/share/wlmaker.desktop.in0000644000175100017510000000023615144077706017347 0ustar runnerrunner[Desktop Entry] Name=WaylandMaker Comment=A Wayland compositor inspired by Window Maker Exec=@CMAKE_INSTALL_PREFIX@/bin/wlmaker Type=Application Icon=wlmaker wlmaker-0.7.1/share/wlmaker-48x48.png0000644000175100017510000000643015144077706016654 0ustar runnerrunnerPNG  IHDR00W pHYs tEXtSoftwarewww.inkscape.org< IDAThlTWv?5100q0*pKҰ$tCJ) j7!MT-QCZيlmBZuHMpBjdlc߿f3ޛyo<3vGz~={!Ill_# t @80USLigs.}lX߉b:N3aIQ0(JzHif%KLݻvYaEg&01'ffv Xdm|>ĉk{ュIIIŋl6%577D/fS{׮]q᯷m6Jdu΀!5 nkcœΗ_~y]uueJ.E$;;rHЧ3q11`H̄jf txD_u7X]UUcll,3hl(xWn?s̅7 [: CN Iks\zmʕ޹sg/˲Xn]ˍ7s:3=\o]>Xu!PBݧwRs{t>srrEFGG--=<44VkDl3aphD, -YD@dYV-[6ٹX򼨨gXWzZFTywW^㏗WUU;Ktȑ+OlcTݻlhhXvUUw.INdE_YE`Ϟ=_ !T}~9vU@ p!R n!SB==='srrF6mtS#!I!kB׾Ӓ$ %r|,9˗˺/PgB|J|-'?9kUqB7fOPVOO +y+**|)5`1K"WBS|O(I%?=9֐X}$CJ>yuuuن71k.ddd܋8-]t0%%ezVg8z`q4x Y1666tԩF@ y3x>hQcccQ< .XbE$_IYݑt'x*^~Ze}0p%/[_~=+z_<𥥥m===?imm`˖-D.|.$H] F|k>27ڷoכp$`͚5];viQޮ46=Zo,I:`p{ܶ31)nW._sCPtw젍\@/LwŭVx_#9 gϞXrcՅi3.ɦVDӝlsw53Aˌ`@ЬzСҥKP({oZH:j•r*QKk KTBE K/5vdbb":v*У(vO:C1\_^:Ђ:uW6-_M1p11x eqx=ac9O3Yx >[ϫ=X޽{kc v֭G~C IϾqbNSjGSLSu@vx555u60# 9?KᇘpyΝ;kkk̭r(/[:F%Im[!Pay~ ]@Ԙž17@3Aç'[~J 8eM4SD韄3JHNы0q%n,6"^~08.Kwe<5 Z'q9[[xZT5v7hm-mQG ڗ;bn4/ :yedu$ow 3ձ/f BpW<ǣ[C]Wyjw;KD!Y΂}R`۟եLzzSFڎa·>i?i'7;9Ÿ?QͰcadW2'{2=8'7j6BؕjX!. '%!('sqrd(0A*寽ISj8 {E(6-nNLN(~)R;C@O4$B W69D /F1(Qf>IENDB`wlmaker-0.7.1/share/wlmeyes-64x64.png0000644000175100017510000000626315144077706016677 0ustar runnerrunnerPNG  IHDR@@iqsRGB,gAMA a cHRMz&u0`:pQ< pHYs  tIME =Xr IDATxkPTgt 6 M "A$1ꘉ; qf$_`RVTC%!V%nmUVM䢣آ3j2$^qѨ/ͥitهO>|<+ݸo+?? |'o{aELBPs,j}XW׈bZ 5!y^B.V&un0hv>F&\xkW鹏$Ajj:kdÆѩ*~5I}}6u{ͅG[ x~N#\bxxp-11?)**⛯7pa\8x!W  p~V#KNFeeeQPP@KK oߞ~$_*1lyg @ N {D_VVF]]]]]X,, ]]]XVJKKBp;Qo9#ip: u?ȉߢh7tM6aXؿ?{\{`8{ֲ`?>轖}pF q,9rJjo&F$\AEOv,coė_7ݻ^x]v@BBvt5⥗^>`b|o9رq8&ػw//"m>1)ш fB}l۶wy={pv;vgϞFpm yFڮqvgi1q[t:9$_@5I8x :9E B[ zlXP馹;wb۪Ux7hmmw{ioEy4(B]ܹSHݻ+!pf~I^<7Ou? Iw^ ԵZϳcrrr۷JF#FJ7ٔsܓstMR'v4o~;HOk#TTT=HSUU###TUUeΝ;:Ʀ( wf㏍uS(^VVVFzz:mMs@GG+oupiݲa] Yf,˔ymNyrdY^έPY`?݉޽`D##CtSw"{M$wA.`k,l۶M r^h ?ȸ/2wnߊwaڵLT }7b$4ˁ՞{V+.~a^֭['P1lV@_`|3#Ãin7h@>ݸSn7}R^ۭn  / jʍ}xXI({1;{X 8&Ɨ?HD||jF.G 8%OJLqIll,F5Z-z.גu:.K(.pL`0}`0t:BN:?>>˩pi >~i p8&BK ȁifҵ骥l" $uGUǎdž]ب7^C珎D;#> eFs8Nbt8].:nFDJUӋ] x-_Q;,츸e!.]2Nu@r FCkkjl64Z- !.,/_!ޘddLCjj6MUL)H,bRlff?JR)D/P|y26=hLF bJQ5XhbyR 17D(MM:fLE)GhjjRLRɟE};Uyx<Μ9uN> @ܰ\UB@A.`LH$-1jkkn@mm-iiV`0bJMSoJ}eEBrxx<+rVY.R5c 晉7R]]5`'+;gZ!!Zd2iA>j{r#Ǐ]]]:eamz4vNEQ[,_d,X|'l'w\6W09D^C޾hx[[bIHX>rĄ$Wdd>v߀O-err^{mQ!+믿$6nYp DvY[> 7p;&WC~~gϞ壏>Z~!Νcy-ef/P2=-ܼ_8<@*hn_㫯7ȑ#Ʊw>-ϡ.DzaӖ\oH,x!Fc"?o!x~駼!x1,3.4`doKxx|-m>f䓖ZևS<?MwqppКS׋ccA? @bO5y)Jm۶M~&ڛ`6>/ԩS^}=bыaD-Q19K1o7v}~ \)((OkX+l+Ue!Z[ظᗸ='O.9&񯨹 D^orSSHKjI޷oDZYfimj4`ib쫿7Ū*ķzL+ܠ:;;3.] GP^^\YYy`avS?>Y3r>6f XiWw#uCe ɩBֆ[N;vX5+iiitXKff?Dw"P3Th/r岼⋷s.\B 9sΘ7^ĉ[4#pZ`>Nk5 i+֭5:th^O>x%%%Wy][l_K+,ѵ23ێC/n,* TZ#^~,@{{{|PUDDK=f nm~/f@ F>#&Pz%"cߎ 7oxR2x^JEEEb/<>(**j'HK\#N3D fO M*6*'c?P" .x/++S]]}B /ZtvvvlM= gӋ>f2#;6vQe(F8Nyyy"k׮=o4Ǐ/dI RBɽ/wÀyÊT>!8۷o/'b%%%rJMAqΪ($ r .2ܳ,DqSN ̙3;999]ׯo֊7of(;qѴ= ǵ Y<|g@@ss󨶶Vgĉݱ*YhQ?!+?0] v ]ZQ<,1r@صkW^Nٽ{w!2s~Q,oӦM v51`tE4Cm1572,M Y FHPXXUUU粳×c霘sSO0 vth=j!CY(ehDEh cʔ)߫+Wu攅 ***w+G3%M=GXtvv`۝g֝xٻzp{~1?ڰa,4+j[yZ(++AFzVc3+V\6L~KͿD ׁqjnwFz~C&Rmd /LNo3gNsr{9,}]&\ g!yBxeۆ=SFQ\P6W`tJ$"1c4n^Ⱦ}\.WAff"@PHo<񘇧%bIR]Q7#/~6( s#ze@LX`~~x84 ~=d9/iKw0l$(;] 5Ocx/隳"(."!BJ#ǍדH!G?pMcw 4_΄T7z3fNP\\Up䎨V@ BhresSxrHKd"0>ROF0Q={F& E`9E\I3܇^m_\:Z|3oʣߧ|f|;m{͎.^=:K#޴ht{.[v+AjjPQQѕD {뭷R0}CüɰDX,X1^AM훒p(~Rrgk%M`a #Ho֬YSdj^sȑo?=G E.ŵUг<Jgpl}2!\FRRYYk/*ɓ4]u99($kOw(LBcQрkH72W>A (.4 m!¿{0ꃦl6$D}RSSӘUJ:z<넮'X%s9A쭟G'C![@-a2č7~`ә̸-:C >Zm9 hbsK䕗nӦMq۷_4@ U[G2;^E@olfΝ;<΄!>}!z 3X%LV D-\jU̡000`;W'#$#-#QP`BVDc:>"Դ-BiTI'i4kUeeX\ŋ?X[[;%p`o `_>D헺;%);Sݝ Fd0 {=tO=h2 _,O^{v`*w!Y Ah|4ܔ/ZJCajx'~t:k嘐go7Ό=×%NΑA4fu}.gKfFxŝ2!O5w} б3nR ;OpqKB{SvDը퀸BhvZ'>05Tp:B $A$e!:?€$ +_riOјoV&{I C0gš?YL?z Yx*ON<\qAHF4F_4%{#$8[d9\t}'(ms>b1rbvw8L_qN_NdA캖 zULt׏[y/]i`]ߞ>`;)3+$'RF@H5wd44_ڧȎ_E1j`0h_X "gToA1062F]}N7kv%˱(yyyWQBcE1H#o<(,3!'/s  `"?eRԺ0Q6"@aZ`Ƅ6`rX[rEW!FB?E`CbnIENDB`wlmaker-0.7.1/share/wlmclock-64x64.png0000644000175100017510000001404415144077706017021 0ustar runnerrunnerPNG  IHDR@@iqzTXtRaw profile type exifxmP[ ;$qI?ӤUYg adBycUK+%ҤQGwNQv!.-Fd+N YӅe@cDxL4Ս1ܠ۷biZ_X8CAطb{k;LqfǑI+.&pc,ߞ/߮Y^iCCPICC profilex}=H@_SR*v鐡:E8*BZu0 GbYWWAqvpRtZxp܏wwUg՗46sX(WCA$efGw 1,D3Lxxz68GYUVω'L #8W\xf戣bfUS#NUM|yVo= #%}y4c` BA5a#AN}_"B9 ZI/)_c |;N>Wz׿f>Iov0 \\w5eF ٔ])HS(3"0| W:8}U88+=rk xiTXtXML:com.adobe.xmp "bKGD pHYs  tIME 68m3IDATx[MLSYxgAf!$(X&.ԨKp".&LƸ l;иT܍Yʏ'BB(Q Y{OkJ֞{}s}i##"'?O (Gu.5^un;V$g |x~ACp_}}}f U B ~Fdk.<!'ܗ|޼daAr&U&"r&6K.=2oq]1WXϭu:f "׽v$6`ÁyX N<E.aÁ# pyENҭu% }4l{n昙LG4vIʃQgv$X 2 Q84šr2 88]@10^44$,#02bM,gL DUJ*̦ǎ"9 )6{7 ׇΩ<(2<M\~8,;w1t-D16 孭cW|>LEӔ/om)OP$}R-@1Z 2 v Up<5H0sٙ]xƮ|s&YAMy G+ Cׯ#ԞtKZ FVfgVpB>N^' \.:+`0D+hoG)2h. $jOòcGȏγȯ~( 9BIWѩZ Q҂׋6ng =#|N8\Fl - = O͆muu`Y>q^J2@`t4 NŶ#GtǦn,c5VyhXsXK[˛7a|zdy@e~H()2gP].0ݝ0nZZ + 1 k6|[_7n *3^Nބ|<=\ErX%9{nJYLYkؼo?yr!Y1ɫum-fOm!dt9, ),.64v3mt,.wg! @Պ]](jjA6 {)L~ljl4Դ9jk3՚_44 nǪ4"D*Vf(k>|XLwX;FtkLЛq eƫp |J@vcP^x ~yk+2KJ;JJ b+Zc&vvd, ;N@5~dv?@b@ߴ2':?u:P&": ip@Xdˡ"aP4hȒQ$Ty0~ ~g ?*sU^f.{ӍN7b'Jͥc`a,IXKZ?9!D=^wŽ7n΢ 9pV+j=䋕J~]@z# Puo/*vq0"T\/TTϟ[ϨekL+$M`|a_2FYÉD&g1At DF'*G譧'>kJwmB`{רV_8د1.h/P2!C}L ʪ=ՠR- >**o=ˋb,*JX] *OtѠ#^%W5f&&:*QTޤ zAG /=YrrJyVy頻R*UUQݕ@U ^=r! &ܜz~h!j$N'NE0d.ofa /;#L|2=c5yT)t>ߥ]`4:DU{U uF_ߗ<*&] IENDB`wlmaker-0.7.1/share/wlmaker.wlmmemgraph.desktop.in0000644000175100017510000000041415144077706021664 0ustar runnerrunner[Desktop Entry] Name=WLMMemGraph GenericName="Wayland Maker memory usage graph dockapp" Comment="Display memory usage" Exec=@CMAKE_INSTALL_PREFIX@/bin/wlmmemgraph Type=Application Categories=Utility;Monitor; Keywords=memory;monitoring;dockapp;wlmaker Icon=wlmmemgraph wlmaker-0.7.1/share/wlmmemgraph-64x64.png0000644000175100017510000000327515144077706017532 0ustar runnerrunnerPNG  IHDR@@iqsRGB,gAMA a cHRMz&u0`:pQ<bKGD pHYs  tIME .8uiIDATxK[?k̦4 BpeMKV")Vz78Ѣ˽"B On&ph|򹋙o.,9s^g9ybP.R!?·/T>#p嶀TV]Aݿ/#0p+ďw:W+s{1twc`pXc%^a";dz& X JB[ܶVD1lƶmBM$ R(x lX,Foo/SSS N(.]X,rʕU2 _Ecee6ted2,//[lY==@K/>߯_>IMM͚K&8qL&):tT*Ekk+kγm6^|}v9r˗/+W.*gTH+XM6&>}ė/_\snn_{*={ 6a  ]v;w6~A٣%囯Çs5@3`YX,}!ixwD\.Sx۷;vL&m6ض͙3gV]ӧp}|7n HN[!XQKŦO "HT @H 04W5=2!֝3T~UF} x}9\|sاDƃnQ݆/at7:335q2rm崩@)Ɯs"5"Szh6Z$$4F4 xI4! NtXqoH9Wʆ҉Pt8,4f* Ȥ0֢D34< Q@Y ZFR˺kql٩ޱt<}Ot)njO%;H#azUBWHV4CE/"lMU̼浬a:b^(IkOoi`fkP)`=&mzi`X'|IENDB`wlmaker-0.7.1/share/wlmaker.wlmeyes.desktop.in0000644000175100017510000000034115144077706021030 0ustar runnerrunner[Desktop Entry] Name=WLMEyes GenericName="Wayland Maker Eyes dockapp" Comment="Watches your mouse moves" Exec=@CMAKE_INSTALL_PREFIX@/bin/wlmeyes Type=Application Categories=Utility; Keywords=eyes;dockapp;wlmaker Icon=wlmeyes wlmaker-0.7.1/share/wlmaker.wlmclock.desktop.in0000644000175100017510000000035115144077706021157 0ustar runnerrunner[Desktop Entry] Name=WLMClock GenericName="Wayland Maker Clock dockapp" Comment="Display date and time" Exec=@CMAKE_INSTALL_PREFIX@/bin/wlmclock Type=Application Categories=Utility;Clock; Keywords=clock;dockapp;wlmaker Icon=wlmclock wlmaker-0.7.1/share/wlmcpugraph-64x64.png0000644000175100017510000000301215144077706017530 0ustar runnerrunnerPNG  IHDR@@iqsRGB,gAMA a cHRMz&u0`:pQ<bKGD pHYs  tIME 0`$NIDATx[?D<!(R]Eu4( EFB)BA44zw""]ջD<%I zgƻ>n{+ovvso-kX;76/G$Y#yP23x|'!@4wH (vZC̋}Gںij%"Ml-hїw;.Ļ"}X{^wa&\pa2(՝OͷG93MPxÞ/y m`+-۾pbW`//t!Pxξ0" qylgè:u]s&gXw|5lƪF<0Bi8Mb>;&uq `,~M`2mɮ:8l-M -Ub(}K{9 zb$[_E!e H&\|)uD/*u\*Z]B+a]R4Va`L%~n :J=c )bP x 3ALuE|k69 hN *84 TY Z^`*B̺o&@Y%(1ԑ4_wuSΦϨI!_^ݒ:f;LBz~|=xRnE@ LUH%VBxuC hb'X;mv _g(<@eq>ogd6Õ2v=bOs\IƊ,I1jFwaB\ uP18@0r&{$\-u@Xhg 쀵E3iBo@,4o@V50xap.1Zsh,/x8<=zc>ـuԷ]l1 Bؕ 0(+#1(pbJonh; 4sB\t`E[39yki7e+yw7I`GKbͲVF_!'˯967}m7uhlFWFhĺ4 L!WûMCͽ 9f$>w0`W>_gRRp՝!3.m&}z=lO3n)cT7MǓè0ً6lRG$L:Xp=/q]3o]. Q7Hekr1k0Xa)6 f2L~|A$пIENDB`wlmaker-0.7.1/submodules/0000755000175100017510000000000015144077706014764 5ustar runnerrunnerwlmaker-0.7.1/submodules/CMakeLists.txt0000644000175100017510000000260715144077706017531 0ustar runnerrunner# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. CMAKE_MINIMUM_REQUIRED(VERSION 3.13) ADD_SUBDIRECTORY(libbase) # Falling back to a provided version of `inih`: The distribution's appears to # use the default settings and definitions, among which there is a maximum line # length of 200 characters. That doesn't work for `.desktop` files. # # Obtained from: https://github.com/benhoyt/inih # # (C) Copyright (c) 2009, Ben Hoyt -- under "New BSD license". # # For wlmaker, the library is configured to permit much longer lines, and use # the heap for dynamic sizing. ADD_LIBRARY(inih STATIC ${CMAKE_CURRENT_SOURCE_DIR}/inih/ini.c) TARGET_COMPILE_DEFINITIONS( inih PUBLIC INI_MAX_LINE=65536 INI_USE_STACK=0 INI_ALLOW_REALLOC=1) TARGET_INCLUDE_DIRECTORIES( inih PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inih) SET_TARGET_PROPERTIES( inih PROPERTIES VERSION 62 PUBLIC_HEADER ini.h) wlmaker-0.7.1/submodules/libbase/0000755000175100017510000000000015144077710016360 5ustar runnerrunnerwlmaker-0.7.1/submodules/libbase/README.md0000644000175100017510000000134415144077710017641 0ustar runnerrunner# phkaeser libbase A small "standard library" for C, used for my personal projects. ### To configure ```bash cmake [-DCMAKE_INSTALL_PREFIX:PATH="${HOME}/.local"] -S . -B build ``` ### To build ```bash (cd build && make) ``` ### To install ```bash (cd build && make install) ``` ## Contributing See [`CONTRIBUTING.md`](CONTRIBUTING.md) for details, and [code of conduct](CODE_OF_CONDUCT.md) for more. See the [idea backlog](BACKLOG.md) for inspiration. ## License Apache 2.0; see [`LICENSE`](LICENSE) for details. ## Disclaimer This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose. wlmaker-0.7.1/submodules/libbase/tests/0000755000175100017510000000000015144077710017522 5ustar runnerrunnerwlmaker-0.7.1/submodules/libbase/tests/subprocess_test_sigpipe.c0000644000175100017510000000173715144077710024645 0ustar runnerrunner/* ========================================================================= */ /** * @file subprocess_test_sigpipe.c * Test executable for subprocess module: Killed by (arbitrarily chosen) * SIGPIPE. * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include /** A test program that raises a signal. */ int main() { raise(SIGPIPE); } /* == End of subprocess_test_sigpipe.c ===================================== */ wlmaker-0.7.1/submodules/libbase/tests/subprocess_test_success.c0000644000175100017510000000261015144077710024644 0ustar runnerrunner/* ========================================================================= */ /** * @file subprocess_test_success.c * Test executable for subprocess module: Exit successfully, with stdout/err. * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include /** A test program that returns a successful code, if args were all correct. */ int main(int argc, char** argv) { if (2 != argc) { fprintf(stderr, "Expecting 1 arguments.\n"); return EXIT_FAILURE; } const char *value_ptr = getenv("SUBPROCESS_ENV"); fprintf(stdout, "test stdout: %s\nenv: %s\n", basename(argv[0]), value_ptr ? value_ptr : "(null)"); fprintf(stderr, "test stderr: %s\n", argv[1]); return EXIT_SUCCESS; } /* == End of subprocess_test_success.c ===================================== */ wlmaker-0.7.1/submodules/libbase/tests/subprocess_test_hang.c0000644000175100017510000000202115144077710024105 0ustar runnerrunner/* ========================================================================= */ /** * @file subprocess_test_hang.c * Test executable for subprocess module: Keep looping, does not exit. * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include /** A program that will never exit. */ int main() { while (true) { poll(NULL, 0, 100); } } /* == End of subprocess_test_hang.c ======================================== */ wlmaker-0.7.1/submodules/libbase/tests/CMakeLists.txt0000644000175100017510000000374515144077710022273 0ustar runnerrunner# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ADD_EXECUTABLE(libbase_test libbase_test.c) TARGET_LINK_LIBRARIES(libbase_test libbase) # Refer to the source path for relative testdata. TARGET_COMPILE_DEFINITIONS( libbase_test PUBLIC BS_TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}") TARGET_COMPILE_DEFINITIONS( libbase_test PUBLIC BS_TEST_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}") ADD_EXECUTABLE(libbase_benchmark libbase_benchmark.c) TARGET_LINK_LIBRARIES(libbase_benchmark libbase) ADD_EXECUTABLE(subprocess_test_hang subprocess_test_hang.c) ADD_EXECUTABLE(subprocess_test_failure subprocess_test_failure.c) ADD_EXECUTABLE(subprocess_test_sigpipe subprocess_test_sigpipe.c) ADD_EXECUTABLE(subprocess_test_success subprocess_test_success.c) ADD_EXECUTABLE(plist_test plist_test.c) TARGET_LINK_LIBRARIES(plist_test libbase libbase_plist) TARGET_INCLUDE_DIRECTORIES(plist_test PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/) TARGET_COMPILE_DEFINITIONS( plist_test PUBLIC TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data") ADD_TEST(NAME libbase_test COMMAND libbase_test) ADD_TEST(NAME plist_test COMMAND plist_test) IF(iwyu_path_and_options) SET_TARGET_PROPERTIES( libbase_test PROPERTIES C_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}") SET_TARGET_PROPERTIES( libbase_benchmark PROPERTIES C_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}") SET_TARGET_PROPERTIES( plist_test PROPERTIES C_INCLUDE_WHAT_YOU_USE "${iwyu_path_and_options}") ENDIF(iwyu_path_and_options) wlmaker-0.7.1/submodules/libbase/tests/data/0000755000175100017510000000000015144077710020433 5ustar runnerrunnerwlmaker-0.7.1/submodules/libbase/tests/data/array.plist0000644000175100017510000000023715144077710022630 0ustar runnerrunner// A toplevel array. We do currently NOT enforce the same type. ( elem0, // a string. (subelem0, subelem1), // A sub-array. {subkey0 = (val0, val1)} ) wlmaker-0.7.1/submodules/libbase/tests/data/gfxbuf_equals.png0000644000175100017510000000012715144077710023774 0ustar runnerrunnerPNG  IHDRwSbKGD IDATchpP$DOIENDB`wlmaker-0.7.1/submodules/libbase/tests/data/dict.plist0000644000175100017510000000025515144077710022435 0ustar runnerrunner// comment. { key0 = "value0"; // comment. // more comment. subdict = { // comment. key1 = value1 // comment. }; // comment. "quoted+key" = value; } //more.wlmaker-0.7.1/submodules/libbase/tests/data/abcd.txt0000644000175100017510000000000515144077710022060 0ustar runnerrunnerabcd wlmaker-0.7.1/submodules/libbase/tests/data/string.plist0000644000175100017510000000003515144077710023014 0ustar runnerrunner// With a comment. file_valuewlmaker-0.7.1/submodules/libbase/tests/subprocess_test_failure.c0000644000175100017510000000164615144077710024633 0ustar runnerrunner/* ========================================================================= */ /** * @file subprocess_test_failure.c * Test executable for subprocess module: Exit with failure code. * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** Returns an error status. */ int main() { return 42; } /* == End of subprocess_test_failure.c ===================================== */ wlmaker-0.7.1/submodules/libbase/tests/libbase_test.c0000644000175100017510000002316015144077710022330 0ustar runnerrunner/* ========================================================================= */ /** * @file libbase_test.c * Unit tests for libbase. * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #include #include #include #include #if !defined(BS_TEST_DATA_DIR) /** Directory root for looking up test data. See @ref bs_test_resolve_path. */ #define BS_TEST_DATA_DIR "./" #endif // BS_TEST_DATA_DIR #if !defined(BS_TEST_BINARY_DIR) #define BS_TEST_BINARY_DIR "." #endif // BS_TEST_BINARY_DIR static void test_assert(bs_test_t *test_ptr); static void test_def(bs_test_t *test_ptr); /** Further tests of definitions, without .c file. */ static const bs_test_case_t bs_header_only_test_cases[] = { { true, "assert", test_assert }, { true, "def", test_def }, { false, NULL, NULL } }; /** Test set of the cases without .c file. */ static const bs_test_set_t bs_header_only_test_set = BS_TEST_SET( true, "header_only", bs_header_only_test_cases); static void test_failure(bs_test_t *test_ptr); static void test_sigpipe(bs_test_t *test_ptr); static void test_success(bs_test_t *test_ptr); static void test_success_cmdline(bs_test_t *test_ptr); static void test_success_twice(bs_test_t *test_ptr); static const char *test_args[] = { "binary", "alpha", NULL }; const bs_test_case_t bs_subprocess_extra_test_cases[] = { { true, "failure", test_failure }, { true, "sigpipe", test_sigpipe }, { true, "success", test_success }, { true, "success_cmdline", test_success_cmdline }, { true, "success_twice", test_success_twice }, { false , NULL, NULL } }; static const bs_test_set_t bs_subprocess_extra_test_set = BS_TEST_SET( true, "subprocess_extra", bs_subprocess_extra_test_cases); /* ------------------------------------------------------------------------- */ /** Tests the functions of 'assert.h' */ void test_assert(bs_test_t *test_ptr) { void *ptr = test_assert; BS_TEST_VERIFY_EQ(test_ptr, ptr, BS_ASSERT_NOTNULL(ptr)); } /* ------------------------------------------------------------------------- */ /** Tests the functions of 'def.h' */ void test_def(bs_test_t *test_ptr) { BS_TEST_VERIFY_EQ(test_ptr, 1, BS_MIN(1, 2)); BS_TEST_VERIFY_EQ(test_ptr, 2, BS_MAX(1, 2)); } /* ------------------------------------------------------------------------- */ void test_failure(bs_test_t *test_ptr) { test_args[0] = BS_TEST_BINARY_DIR "/subprocess_test_failure"; bs_subprocess_t *sp_ptr = bs_subprocess_create( test_args[0], test_args, NULL); BS_TEST_VERIFY_NEQ(test_ptr, NULL, sp_ptr); BS_TEST_VERIFY_TRUE(test_ptr, bs_subprocess_start(sp_ptr)); int exit_status, signal_number; while (!bs_subprocess_terminated(sp_ptr, &exit_status, &signal_number)) { // Don't busy-loop -- just wait a little. poll(NULL, 0, 10); } BS_TEST_VERIFY_EQ(test_ptr, 42, exit_status); BS_TEST_VERIFY_EQ(test_ptr, 0, signal_number); bs_subprocess_destroy(sp_ptr); } /* ------------------------------------------------------------------------- */ void test_sigpipe(bs_test_t *test_ptr) { test_args[0] = BS_TEST_BINARY_DIR "/subprocess_test_sigpipe"; bs_subprocess_t *sp_ptr = bs_subprocess_create( test_args[0], test_args, NULL); BS_TEST_VERIFY_NEQ(test_ptr, NULL, sp_ptr); BS_TEST_VERIFY_TRUE(test_ptr, bs_subprocess_start(sp_ptr)); int exit_status, signal_number; while (!bs_subprocess_terminated(sp_ptr, &exit_status, &signal_number)) { // Don't busy-loop -- just wait a little. poll(NULL, 0, 10); } BS_TEST_VERIFY_EQ(test_ptr, INT_MIN, exit_status); BS_TEST_VERIFY_EQ(test_ptr, SIGPIPE, signal_number); bs_subprocess_destroy(sp_ptr); } /* ------------------------------------------------------------------------- */ void test_success(bs_test_t *test_ptr) { const bs_subprocess_environment_variable_t envs[] = { { "SUBPROCESS_ENV", "WORKS" }, { NULL, NULL } }; test_args[0] = BS_TEST_BINARY_DIR "/subprocess_test_success"; bs_subprocess_t *sp_ptr = bs_subprocess_create( test_args[0], test_args, envs); BS_TEST_VERIFY_NEQ(test_ptr, NULL, sp_ptr); BS_TEST_VERIFY_TRUE(test_ptr, bs_subprocess_start(sp_ptr)); int exit_status, signal_number; while (!bs_subprocess_terminated(sp_ptr, &exit_status, &signal_number)) { // Don't busy-loop -- just wait a little. poll(NULL, 0, 10); } BS_TEST_VERIFY_EQ(test_ptr, 0, exit_status); BS_TEST_VERIFY_EQ(test_ptr, 0, signal_number); int stdout_fd, stderr_fd; bs_subprocess_get_fds(sp_ptr, NULL, &stdout_fd, &stderr_fd); bs_dynbuf_t stdout_buf; bs_dynbuf_init(&stdout_buf, 1024, SIZE_MAX); bs_dynbuf_read(&stdout_buf, stdout_fd); bs_dynbuf_t stderr_buf; bs_dynbuf_init(&stderr_buf, 1024, SIZE_MAX); bs_dynbuf_read(&stderr_buf, stderr_fd); BS_TEST_VERIFY_STREQ( test_ptr, "test stdout: subprocess_test_success\nenv: WORKS\n", stdout_buf.data_ptr); BS_TEST_VERIFY_STREQ( test_ptr, "test stderr: alpha\n", stderr_buf.data_ptr); bs_subprocess_destroy(sp_ptr); bs_dynbuf_fini(&stderr_buf); bs_dynbuf_fini(&stdout_buf); } /* ------------------------------------------------------------------------- */ void test_success_cmdline(bs_test_t *test_ptr) { bs_subprocess_t *sp_ptr = bs_subprocess_create_cmdline( "SUBPROCESS_ENV=CMD " BS_TEST_BINARY_DIR "/subprocess_test_success alpha"); BS_TEST_VERIFY_NEQ(test_ptr, NULL, sp_ptr); BS_TEST_VERIFY_TRUE(test_ptr, bs_subprocess_start(sp_ptr)); int exit_status, signal_number; while (!bs_subprocess_terminated(sp_ptr, &exit_status, &signal_number)) { // Don't busy-loop -- just wait a little. poll(NULL, 0, 10); } BS_TEST_VERIFY_EQ(test_ptr, 0, exit_status); BS_TEST_VERIFY_EQ(test_ptr, 0, signal_number); int stdout_fd, stderr_fd; bs_subprocess_get_fds(sp_ptr, NULL, &stdout_fd, &stderr_fd); bs_dynbuf_t stdout_buf; bs_dynbuf_init(&stdout_buf, 1024, SIZE_MAX); bs_dynbuf_read(&stdout_buf, stdout_fd); bs_dynbuf_t stderr_buf; bs_dynbuf_init(&stderr_buf, 1024, SIZE_MAX); bs_dynbuf_read(&stderr_buf, stderr_fd); BS_TEST_VERIFY_STREQ( test_ptr, "test stdout: subprocess_test_success\nenv: CMD\n", stdout_buf.data_ptr); BS_TEST_VERIFY_STREQ( test_ptr, "test stderr: alpha\n", stderr_buf.data_ptr); bs_subprocess_destroy(sp_ptr); bs_dynbuf_fini(&stderr_buf); bs_dynbuf_fini(&stdout_buf); } /* ------------------------------------------------------------------------- */ void test_success_twice(bs_test_t *test_ptr) { test_args[0] = BS_TEST_BINARY_DIR "/subprocess_test_success"; bs_subprocess_t *sp_ptr = bs_subprocess_create( test_args[0], test_args, NULL); BS_TEST_VERIFY_NEQ(test_ptr, NULL, sp_ptr); for (int i = 0; i < 2; ++i) { // Verify that starting the process again works. BS_TEST_VERIFY_TRUE(test_ptr, bs_subprocess_start(sp_ptr)); int exit_status, signal_number; while (!bs_subprocess_terminated(sp_ptr, &exit_status, &signal_number)) { // Don't busy-loop -- just wait a little. poll(NULL, 0, 10); } BS_TEST_VERIFY_EQ(test_ptr, 0, exit_status); BS_TEST_VERIFY_EQ(test_ptr, 0, signal_number); int stdout_fd, stderr_fd; bs_subprocess_get_fds(sp_ptr, NULL, &stdout_fd, &stderr_fd); bs_dynbuf_t stdout_buf; bs_dynbuf_init(&stdout_buf, 1024, SIZE_MAX); bs_dynbuf_read(&stdout_buf, stdout_fd); bs_dynbuf_t stderr_buf; bs_dynbuf_init(&stderr_buf, 1024, SIZE_MAX); bs_dynbuf_read(&stderr_buf, stderr_fd); BS_TEST_VERIFY_STREQ( test_ptr, "test stdout: subprocess_test_success\nenv: (null)\n", stdout_buf.data_ptr); BS_TEST_VERIFY_STREQ( test_ptr, "test stderr: alpha\n", stderr_buf.data_ptr); bs_dynbuf_fini(&stderr_buf); bs_dynbuf_fini(&stdout_buf); } bs_subprocess_destroy(sp_ptr); } /* ========================================================================= */ /** Main program, runs all unit tests. */ int main(int argc, const char **argv) { const bs_test_param_t params = { .test_data_dir_ptr = BS_TEST_DATA_DIR }; const bs_test_set_t *sets[] = { &bs_arg_test_set, &bs_atomic_test_set, &bs_avltree_test_set, &bs_dequeue_test_set, &bs_dllist_test_set, &bs_dynbuf_test_set, &bs_file_test_set, &bs_gfxbuf_test_set, &bs_gfxbuf_xpm_test_set, &bs_header_only_test_set, &bs_log_test_set, &bs_ptr_set_test_set, &bs_ptr_stack_test_set, &bs_ptr_vector_test_set, &bs_strutil_test_set, &bs_subprocess_extra_test_set, &bs_subprocess_test_set, &bs_test_test_set, &bs_time_test_set, NULL }; return bs_test_sets(sets, argc, argv, ¶ms); } /* == End of libbase_test.c ================================================ */ wlmaker-0.7.1/submodules/libbase/tests/plist_test.c0000644000175100017510000000262715144077710022067 0ustar runnerrunner/* ========================================================================= */ /** * @file plist_test.c * * @copyright * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include #include #if !defined(TEST_DATA_DIR) /** Directory root for looking up test data. See `bs_test_resolve_path`. */ #define TEST_DATA_DIR "./" #endif // TEST_DATA_DIR /** Main program, runs the unit tests. */ int main(__UNUSED__ int argc, __UNUSED__ const char **argv) { const bs_test_param_t params = { .test_data_dir_ptr = TEST_DATA_DIR }; const bs_test_set_t* set_ptrs[] = { &bspl_decode_test_set, &bspl_model_test_set, &bspl_plist_test_set, NULL }; return bs_test_sets(set_ptrs, argc, argv, ¶ms); } /* == End of plist_test.c ================================================== */ wlmaker-0.7.1/submodules/libbase/tests/libbase_benchmark.c0000644000175100017510000000220215144077710023275 0ustar runnerrunner/* ========================================================================= */ /** * @file libbase_benchmark.c * Benchmarks for libbase (in the form of unit test cases). * * @copyright * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include #include /** Main program, runs all unit tests. */ int main(int argc, const char **argv) { const bs_test_param_t param = {}; const bs_test_set_t* sets[] = { &bs_gfxbuf_benchmarks_set, NULL }; return bs_test_sets(sets, argc, argv, ¶m); } /* == End of libbase_benchmark.c =========================================== */ wlmaker-0.7.1/submodules/libbase/libbase.pc.in0000644000175100017510000000156215144077710020716 0ustar runnerrunner# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ Name: @PROJECT_NAME@ Description: @PROJECT_DESCRIPTION@ Version: @PROJECT_VERSION@ Requires: Libs: -L${libdir} -l@PROJECT_NAME@ Cflags: -I${includedir} wlmaker-0.7.1/submodules/libbase/Doxyfile.in0000644000175100017510000034032115144077710020476 0ustar runnerrunner# Doxyfile 1.9.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the configuration # file that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "My Project" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/doc # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line # such as # /*************** # as being the beginning of a Javadoc-style comment "banner". If set to NO, the # Javadoc-style will behave just like regular comments and it will not be # interpreted by doxygen. # The default value is: NO. JAVADOC_BANNER = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # By default Python docstrings are displayed as preformatted text and doxygen's # special commands cannot be used. By setting PYTHON_DOCSTRING to NO the # doxygen's special commands can be used and the contents of the docstring # documentation blocks is shown as doxygen documentation. # The default value is: YES. PYTHON_DOCSTRING = YES # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines (in the resulting output). You can put ^^ in the value part of an # alias to insert a newline as if a physical newline was in the original file. # When you need a literal { or } or , in the value part of an alias you have to # escape them by means of a backslash (\), this can lead to conflicts with the # commands \{ and \} for these it is advised to use the version @{ and @} or use # a double escape (\\{ and \\}) ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice # sources only. Doxygen will then generate output that is more tailored for that # language. For instance, namespaces will be presented as modules, types will be # separated into more groups, etc. # The default value is: NO. OPTIMIZE_OUTPUT_SLICE = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, JavaScript, # Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, # Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the # default for Fortran type files). For instance to make doxygen treat .inc files # as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. When specifying no_extension you should add # * to the FILE_PATTERNS. # # Note see also the list of default file extension mappings. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. # Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 5 # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 # The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use # during processing. When set to 0 doxygen will based this on the number of # cores available in the system. You can set it explicitly to a value larger # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, # which efficively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. # Minimum value: 0, maximum value: 32, default value: 1. NUM_PROC_THREADS = 1 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual # methods of a class will be included in the documentation. # The default value is: NO. EXTRACT_PRIV_VIRTUAL = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If this flag is set to YES, the name of an unnamed parameter in a declaration # will be determined by the corresponding definition. By default unnamed # parameters remain unnamed in the output. # The default value is: YES. RESOLVE_UNNAMED_PARAMS = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # declarations. If set to NO, these declarations will be included in the # documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # With the correct setting of option CASE_SENSE_NAMES doxygen will better be # able to match the capabilities of the underlying filesystem. In case the # filesystem is case sensitive (i.e. it supports files in the same directory # whose names only differ in casing), the option must be set to YES to properly # deal with such files in case they appear in the input. For filesystems that # are not case sensitive the option should be be set to NO to properly deal with # output files written for symbols that only differ in casing, such as for two # classes, one named CLASS and the other named Class, and to also support # references to files without having to specify the exact matching casing. On # Windows (including Cygwin) and MacOS, users should typically set this option # to NO, whereas on Linux or other Unix flavors it should typically be set to # YES. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. If # EXTRACT_ALL is set to YES then this flag will automatically be disabled. # The default value is: NO. WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS # then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but # at the end of the doxygen process doxygen will return with a non-zero status. # Possible values are: NO, YES and FAIL_ON_WARNINGS. # The default value is: NO. WARN_AS_ERROR = YES # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = @PROJECT_SOURCE_DIR@/src \ @PROJECT_SOURCE_DIR@/src/plist \ @PROJECT_SOURCE_DIR@/include/libbase \ @PROJECT_SOURCE_DIR@/include/libbase/plist # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: # https://www.gnu.org/software/libiconv/) for the list of possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # Note the list of default checked file patterns might differ from the list of # default file extension mappings. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), # *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, # *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.idl \ *.ddl \ *.odl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.cs \ *.d \ *.php \ *.php4 \ *.php5 \ *.phtml \ *.inc \ *.m \ *.markdown \ *.md \ *.mm \ *.dox \ *.py \ *.pyw \ *.f90 \ *.f95 \ *.f03 \ *.f08 \ *.f18 \ *.f \ *.for \ *.vhd \ *.vhdl \ *.ucf \ *.qsf \ *.ice # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: # http://clang.llvm.org/) for more accurate parsing at the cost of reduced # performance. This can be particularly helpful with template rich C++ code for # which doxygen's built-in parser lacks the necessary type information. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to # YES then doxygen will add the directory of each input to the include path. # The default value is: YES. CLANG_ADD_INC_PATHS = YES # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = # If clang assisted parsing is enabled you can provide the clang parser with the # path to the directory containing a file called compile_commands.json. This # file is the compilation database (see: # http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the # options used when the source files were built. This is equivalent to # specifying the -p option to a clang tool, such as clang-check. These options # will then be passed to the parser. Any options specified with CLANG_OPTIONS # will be added as well. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse_libclang=ON option for CMake. CLANG_DATABASE_PATH = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will # consists of multiple levels of tabs that are statically embedded in every HTML # page. Disable this option to support browsers that do not have JavaScript, # like the Qt help browser. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_MENUS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: # https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To # create a documentation set, doxygen will generate a Makefile in the HTML # output directory. Running make will produce the docset in that directory and # running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy # genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: # https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location (absolute path # including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to # run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for # the HTML output. These images will generally look nicer at scaled resolutions. # Possible values are: png (the default) and svg (looks nicer but requires the # pdf2svg or inkscape tool). # The default value is: png. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FORMULA_FORMAT = png # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands # to create new LaTeX commands to be used in formulas as building blocks. See # the section "Including formulas" for details. FORMULA_MACROFILE = # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from https://www.mathjax.org before deployment. # The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: # http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /