From 9f8279390b1308ba4626ab2b2e6eba3648e862ef Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Wed, 18 Nov 2026 10:21:40 -0649 Subject: [PATCH 1/2] tactus 0.1.0: an on-screen keyboard that corrects words as they are typed, opt-in beside squeekboard squeekboard types what is tapped and nothing else. Tactus is a second keyboard an owner may install beside it: it corrects a word when it is ended (by where each tap landed in its key, how common the word is and the usual slips), puts back what was typed on a Backspace right after, starts sentences with a capital, makes a full stop of two spaces, offers a letter's accented forms on a long press, and has an emoji page with a search. English only, and opt-in: no image installs it, nothing depends on it, and squeekboard stays the phone's keyboard until the owner picks Tactus. It draws itself in the applied Omarchy theme's colours, and takes a new theme's at once; without a theme, or where the owner keeps them, it has light and dark colours of its own. packages/tactus builds it from Stevia 0.59.0 (GPL-3.0-or-later): six patches to Stevia's files, each with its reason in its header and the files' upstream notices kept, and Tactus's own sources (the typing engine, the autocorrection, the drawing) with the checks that run with no window. Everything is installed under /usr/lib/tactus with the binary named tactus, so it sits beside squeekboard, which Arch's stevia package conflicts with. Stevia's own word completion is off by a settings default compiled into the package's own schemas. The word counts are hermitdave's FrequencyWords (CC-BY-SA-4.0), fetched at the first commit whose README gives that licence (the file is the same since it was added). Choosing it takes the shell part, omamobile-osk and Setup > Keyboard, which is its own pull request (#896). The typing engine's trace and its debug lines name letter counts, never what was typed. In Chromium the keyboard has to answer the text field. Chromium (156, text-input-v3) sends new state only once the last done's serial equals its count of commits, and Hyprland sends a text field done only when the keyboard commits something, so its surrounding text is one key behind and a delete_surrounding_text sent then is dropped: the corrected word lands after the wrong one. Tactus sends an empty input-method commit after a field's first sign of life and after every report with text, and a key that would take text away waits up to a quarter of a second for the field to show what was sent before it. The typing engine's test has a browser-like field, answered and unanswered. The panel's top corners are round, and what shows past them is the application in front, not the wallpaper: the keyboard reserves a little less room than its panel is high (8 px on a screen 360 wide), so the window reaches that far under the panel's top, and the corners are cut no deeper. A taller page takes its room only once it is on the screen and a lower one gives it back at once, so the wallpaper doesn't show between the window and the keyboard while the page changes. Tested: packages/tactus builds with makepkg in the project's Arch Linux ARM build image, check() included (typing 126 checks, the word list, the keys 80 with the theme's colours, the fallback and the owner's choice of Tactus's own, the emoji page 28, and a run with the trace and the debug lines on that holds nothing typed); test/all with --upstream applies the patches to the untouched Stevia 0.59.0 with no fuzz. On a Pixel 9a the package was installed, chosen in Setup > Keyboard by touch, changed to squeekboard and back, and started by itself after each reboot; it typed and corrected in a GTK 3 text view, in Chromium 156 (a text area, an editable block, a one-line field) and in a GPUI application, in light and in dark, and with the keyboard up no wallpaper showed past the corners or while the page changed. The theme colours ran off screen only so far. --- docs/screenshots/tactus/letters.png | Bin 0 -> 46233 bytes docs/screenshots/tactus/setup-keyboard.png | Bin 0 -> 27760 bytes packages/tactus/COPYING | 674 ++++ packages/tactus/PKGBUILD | 84 + packages/tactus/README.md | 84 + packages/tactus/WORD-COUNTS | 12 + ...un-without-the-device-state-protocol.patch | 29 + ...uild-the-typing-engine-and-its-tests.patch | 60 + ...yout-more-letters-under-a-long-press.patch | 585 ++++ ...dget-own-keys-and-where-a-tap-landed.patch | 3080 +++++++++++++++++ ...-large-emoji-that-slide-and-a-search.patch | 2432 +++++++++++++ ...rface-keys-through-the-typing-engine.patch | 920 +++++ packages/tactus/source/tactus-autocorrect.c | 888 +++++ packages/tactus/source/tactus-autocorrect.h | 35 + packages/tactus/source/tactus-draw.c | 857 +++++ packages/tactus/source/tactus-draw.h | 99 + packages/tactus/source/tactus-typer.c | 1517 ++++++++ packages/tactus/source/tactus-typer.h | 72 + packages/tactus/tactus | 12 + packages/tactus/tactus.gschema.override | 7 + packages/tactus/test/all | 158 + packages/tactus/tools/tactus-ac-test.c | 170 + packages/tactus/tools/tactus-draw-test.c | 122 + packages/tactus/tools/tactus-emoji-test.c | 271 ++ packages/tactus/tools/tactus-kbd-test.c | 789 +++++ packages/tactus/tools/tactus-pages-test.c | 165 + packages/tactus/tools/tactus-typer-test.c | 988 ++++++ packages/tactus/version | 1 + 28 files changed, 14111 insertions(+) create mode 100644 docs/screenshots/tactus/letters.png create mode 100644 docs/screenshots/tactus/setup-keyboard.png create mode 100644 packages/tactus/COPYING create mode 100644 packages/tactus/PKGBUILD create mode 100644 packages/tactus/README.md create mode 100644 packages/tactus/WORD-COUNTS create mode 100644 packages/tactus/patches/0001-run-without-the-device-state-protocol.patch create mode 100644 packages/tactus/patches/0002-build-the-typing-engine-and-its-tests.patch create mode 100644 packages/tactus/patches/0003-us-layout-more-letters-under-a-long-press.patch create mode 100644 packages/tactus/patches/0004-osk-widget-own-keys-and-where-a-tap-landed.patch create mode 100644 packages/tactus/patches/0005-emoji-page-large-emoji-that-slide-and-a-search.patch create mode 100644 packages/tactus/patches/0006-input-surface-keys-through-the-typing-engine.patch create mode 100644 packages/tactus/source/tactus-autocorrect.c create mode 100644 packages/tactus/source/tactus-autocorrect.h create mode 100644 packages/tactus/source/tactus-draw.c create mode 100644 packages/tactus/source/tactus-draw.h create mode 100644 packages/tactus/source/tactus-typer.c create mode 100644 packages/tactus/source/tactus-typer.h create mode 100755 packages/tactus/tactus create mode 100644 packages/tactus/tactus.gschema.override create mode 100755 packages/tactus/test/all create mode 100644 packages/tactus/tools/tactus-ac-test.c create mode 100644 packages/tactus/tools/tactus-draw-test.c create mode 100644 packages/tactus/tools/tactus-emoji-test.c create mode 100644 packages/tactus/tools/tactus-kbd-test.c create mode 100644 packages/tactus/tools/tactus-pages-test.c create mode 100644 packages/tactus/tools/tactus-typer-test.c create mode 100644 packages/tactus/version diff --git a/docs/screenshots/tactus/letters.png b/docs/screenshots/tactus/letters.png new file mode 100644 index 0000000000000000000000000000000000000000..851b0631364b850a4b1e86fc69172ee00412186f GIT binary patch literal 46233 zcmeFZcT`hb*YJx6m16;p1wpDpA_4*`NH0fGAwfVxm8u{m^xgtQK|!e!nt*^x07LIR zL_|PpBp^Kr9YRS20)d1i7oX?3@3`N0@A$^J|Gn=R=g*z8_F8kzIoI63J?DJ$&`_8A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fMo4I-wJP)Hd~sZ1;c{Z4nn2U0OCX(?m)!E2lcOaTc$_|s zA68P`1#?lF}syPw56{6&0=N=5K3&P5*)WIin zbTu6dqZe+%!t;~~JAKmoob0u65yO%g2|fLhD2mO-q;(c6ZWFve2a5K96~EbBt!kwT z=vu}SM-x{kNId4&DyZSB+Ny$g)G%Fc;k_jNUptMx-~dTtlXu2oTUJ4sygWRjJ7<>J zk@so%v_QXhKWKL??=6}Y^~vMCl=yXc1e@07%`(}oY1td54wyOD{RL?KDG&0rzt-<> zsW9dwD^K~3gTCGowj3BpkKPG!zJr8I60YFqF2nnhty(C<@ZAhu;fP-rZQ0EJt%EKc zsVeyOl-l_FBz^ig{Ife+eu2xHGB~@#1!t|%ADipN@f)-V&j1C=;g_*fy|%Fj*^KOT zR`V?F=coLC15k~DOeUCBpEL%kwRs1@5{uZIewBzi-4r2vfPc#Fhcw$;Y%rg3JQ3#y zd_swt&AT-!tc9AJP^fXh^~jD>kiNnEy4|lXxz}Jlg-Y6`-H`yN-1dZzg=5@IblNMI z>9k2*WmuN2c5048=Cy5R?ahwVk+IVgQ?LPc&ogBw8Q#go#;62<$Xm#wSn6FvaKt?Nj>Ju2+%N#-HKo9W_fPn$~r1QF4`Bsc}gGZs73789>OXc_R3t2N`=M z>#(mE9f%E(qGRpL>Exs1uM1O7lc~^f-rGDV5J*d)}axNF%j5+!svN%(s0Ptqr5Iclj}b&E8{LJ!=;;)9Q7izxpx)H z=^BqlPlsCuWtX?CPia2!4T(C{ua`hF-Z;t;So&!GuJ9j8%Kd*OssCL#{C{y~)PF|;Yi9W=A^ T&;9~_1c#}S#jP5H`%nJ^QC5@+ literal 0 HcmV?d00001 diff --git a/packages/tactus/COPYING b/packages/tactus/COPYING new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/packages/tactus/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/packages/tactus/PKGBUILD b/packages/tactus/PKGBUILD new file mode 100644 index 000000000..339e20018 --- /dev/null +++ b/packages/tactus/PKGBUILD @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: 0BSD +# +# Tactus, an on-screen keyboard that corrects words as they are typed. +# Opt-in: nothing depends on it, and squeekboard stays the phone's keyboard +# until the owner picks Tactus (Setup > Keyboard, or `omamobile-osk use +# tactus`; omamobile-shell 0.2.134 and later). +# +# Built from Stevia 0.59.0 (https://gitlab.gnome.org/World/Phosh/stevia, +# GPL-3.0-or-later), whose Wayland side, layout files and emoji data it keeps: +# - patches/0001 to 0006, each with what it does and why in its header; +# - source/ and tools/: Tactus's own sources (the typing engine, the +# autocorrection, the drawing) and the checks that run with no window. +# The word counts the autocorrection weighs are hermitdave's FrequencyWords +# (content/2018/en/en_50k.txt, made from OpenSubtitles 2018, CC-BY-SA-4.0), +# fetched at a pinned commit and installed unchanged. +# +# Everything is under /usr/lib/tactus with its own name and its own settings +# schemas, so it sits beside squeekboard: Arch's stevia package conflicts with +# squeekboard (both ship mobi.phosh.OSK.service), which omamobile-shell needs. +# - -Ddefault_osk=false and the unit directory inside the prefix: neither +# the desktop file nor the unit is wanted (the package removes both), and +# the unit would otherwise land on squeekboard's file. +# - The binary is renamed to tactus: Hyprland names a virtual keyboard after +# its binary, and omamobile-shell's key binds go by that name +# (hl-virtual-keyboard-tactus). + +pkgname=tactus +pkgver=$(cat "${startdir:-.}/version") +pkgrel=1 +_stevia=0.59.0 +_counts=34bb6447a96d4434dc2d4b24e0cf946c523090b3 +pkgdesc='An on-screen keyboard that corrects words as they are typed (opt-in; Omarchy Mobile)' +arch=(aarch64) +url='https://github.com/derekross/omarchy-mobile' +license=(GPL-3.0-or-later CC-BY-SA-4.0) # CC-BY-SA: the word counts +depends=(cairo dconf feedbackd glib2 glibc gnome-desktop gsettings-desktop-schemas + gst-plugins-base-libs gstreamer gtk3 hunspell json-glib libgmobile libhandy + libsoup3 libxkbcommon pango systemd-libs wayland + hunspell-en_us # the dictionary the autocorrection asks + noto-fonts-emoji) # the emoji page +makedepends=(meson ninja glib2-devel wayland-protocols pkgconf) +checkdepends=(xorg-server-xvfb adwaita-fonts) # the widget's checks draw off screen +source=("stevia-v$_stevia.tar.gz::https://gitlab.gnome.org/World/Phosh/stevia/-/archive/v$_stevia/stevia-v$_stevia.tar.gz" + "en_50k-$_counts.txt::https://raw.githubusercontent.com/hermitdave/FrequencyWords/$_counts/content/2018/en/en_50k.txt") +sha256sums=('bc2343929fd5f1b5206581aeef2293acba537b5ed5489a94634d689ada4cd397' + '5351ff405b1126ef555791dd4d9798a48e3e9a501a9fc481a9da957752cfb458') + +prepare() { + cd "stevia-v$_stevia" + local p + for p in "$startdir"/patches/*.patch; do + patch -Np1 -F0 -i "$p" + done + cp "$startdir"/source/tactus-*.[ch] src/ + cp "$startdir"/tools/tactus-*-test.c tools/ +} + +build() { + meson setup build "stevia-v$_stevia" --prefix=/usr/lib/tactus --buildtype=plain \ + --wrap-mode=nodownload -Db_pie=true \ + -Dtests=false -Dman=false -Dgtk_doc=false -Duim=disabled -Dgovarnam=disabled \ + -Ddefault_osk=false -Dsystemd_user_unit_dir=/usr/lib/tactus/lib/systemd/user + meson compile -C build +} + +check() { + TACTUS_WORD_COUNTS="$srcdir/en_50k-$_counts.txt" "$startdir/test/all" --built "$srcdir/build" "$srcdir/stevia-v$_stevia" +} + +package() { + meson install -C build --destdir "$pkgdir" + local p="$pkgdir/usr/lib/tactus" + mv "$p/bin/phosh-osk-stevia" "$p/bin/tactus" + # Not started by a unit or a desktop file: omamobile-osk runs /usr/bin/tactus + rm -rf "$p/lib/systemd" "$p/share/applications" "$p/share/metainfo" + rmdir --ignore-fail-on-non-empty "$p/lib" + # Tactus's defaults for Stevia's settings: its own completion off + install -Dm644 "$startdir/tactus.gschema.override" "$p/share/glib-2.0/schemas/10_tactus.gschema.override" + glib-compile-schemas --strict "$p/share/glib-2.0/schemas" + install -Dm644 "en_50k-$_counts.txt" "$p/share/phosh-osk-stevia/en_50k.txt" + install -Dm755 "$startdir/tactus" "$pkgdir/usr/bin/tactus" + install -Dm644 "stevia-v$_stevia/COPYING" "$pkgdir/usr/share/licenses/$pkgname/COPYING" + install -Dm644 "$startdir/WORD-COUNTS" "$pkgdir/usr/share/licenses/$pkgname/WORD-COUNTS" +} diff --git a/packages/tactus/README.md b/packages/tactus/README.md new file mode 100644 index 000000000..9144d2ed0 --- /dev/null +++ b/packages/tactus/README.md @@ -0,0 +1,84 @@ + +# tactus + +Tactus is an on-screen keyboard an owner may choose instead of squeekboard. It corrects words as they are typed, the way the keyboards on current phones do. Opt-in: no image installs it, nothing depends on it, and squeekboard stays the phone's keyboard until the owner picks Tactus. + +

+ Tactus under a text field. The sentence was typed with three slips (im, teh, dont) and no capitals +

+ +It is built from [Stevia](https://gitlab.gnome.org/World/Phosh/stevia) 0.59.0 (GPL-3.0-or-later), whose Wayland side, layout files and emoji data it keeps. The keys, the emoji page and everything about what gets typed are written anew: six patches to Stevia's files in `patches/`, each with what it does and why in its header, and Tactus's own sources in `source/` (the typing engine, the autocorrection, the drawing) and `tools/` (its checks). + +## Choosing it + +Install the package, then Setup > Keyboard in Omarchy's menu (the gear in quick settings): Standard is squeekboard, Tactus is this one, and the one in use has a tick. Or from a terminal: + +

+ Setup > Keyboard: Standard, and Tactus with a tick +

+ +``` +omamobile-osk use tactus # and back: omamobile-osk use squeekboard +omamobile-osk which +``` + +Both come with the shell's part of this, a pull request of its own (#896): `omamobile-osk` starts the keyboard the owner chose, and `hypr/phone.lua` keeps Tactus's virtual keyboard out of the hardware-key binds, as it does squeekboard's. The choice is one word in `~/.config/omamobile/keyboard`. If Tactus is removed, the phone is back on squeekboard at the next start. + +The package sits beside squeekboard: everything is under `/usr/lib/tactus`, with Stevia's settings schemas compiled there and the binary named `tactus`. (Arch's `stevia` package conflicts with squeekboard, which omamobile-shell needs.) + +## What it does + +- **Corrects a word when it is ended** (a space, a full stop, Return in running text). It weighs the word against what it could have been: where each finger landed in its key (a tap near a key's edge speaks for the neighbour), how common each word is, and the usual slips: two letters swapped, one missed or doubled, a missed space, a missing apostrophe (`dont`, `im`). A word the dictionary knows is replaced only when the taps themselves were close calls. +- **Backspace right after a correction puts back what was typed.** A word put back once is kept from then on (`~/.local/share/tactus/words.txt`). +- **Capitals:** a sentence starts with one, two spaces after a word make a full stop, a double tap on Shift locks it. +- **A long press** on a letter offers its accented forms. Held on the space bar, a slide moves the cursor. Backspace held deletes letters, then whole words. +- **An emoji page:** large emoji in four rows that slide sideways, the ones used lately first, a sign for each kind, a search by name, skin tones on a long press. +- **A microphone key** that starts the phone's dictation (`omamobile.voice`), and a swipe down that puts the keyboard away. +- **Past its round top corners the application shows,** not the wallpaper: the keyboard asks for a little less room than its panel is high (8 px on a screen 360 wide), so the window in front reaches that far under the panel's top. That much of the window's lower edge is behind the keyboard. +- It learns where the owner's fingers land (`~/.local/state/tactus/touch`) and shifts the keys' touch targets by it, within narrow limits. + +Password fields get none of this: the typing engine is off wherever what is typed is hidden, and nothing typed into a field that asked for it (`sensitive data`) is learned. + +## What it doesn't do + +- **English only.** The dictionary is hunspell's en_US and the word counts are English. With another language's layout the keys type as they are, without corrections, and that has not been tried on a phone. There is no globe key and no way from Tactus to the shell's language sheet. +- **It corrects, it doesn't predict:** there is no row of suggestions. Stevia's own word completion is off: Tactus's settings default says so (`tactus.gschema.override`), and Stevia's hunspell completer looks for its dictionary under `/usr/lib/tactus` and finds none, which it says once at every start (`Failed to init default completer 'hunspell'`). That line in the journal is expected. Stevia's `osk-features` setting does nothing here: the keys are Tactus's own. +- It knows how common the 50,000 commonest words are. A slip in a rarer form of a common word (`corects`) can stay as typed. +- No Paste key (Omarchy's clipboard menu is on squeekboard's action row). +- **An application that doesn't say what its field is for gets corrections there too.** The typing engine runs only where a field's purpose is plain text (text-input's "normal"): a field that declares a password, a PIN, a number, a phone number, a name, an e-mail or web address, a date or a terminal gets each key as typed. But "normal" is also what a field that declares nothing reads as, so a GPUI editor or a terminal that doesn't say it is one is treated like a chat field. Backspace right after a correction puts the word back. +- **Not tried on the lock screen's password field.** The typing engine is off wherever the field says what is typed is hidden, as a password field should; whether the lock's field says so has not been checked on a phone, so until it has, unlock with squeekboard or the PIN pad if a password matters. +- The shell's home strip stays under it, as under squeekboard, so the microphone and emoji keys sit above the strip. + +## Its colours + +Tactus draws itself in the applied Omarchy theme, as squeekboard is styled: the panel in the theme's darker background, the keys in its lighter one, the letters in its foreground, the caret in its accent (from `~/.local/state/omarchy/current/theme/colors.toml`). When Omarchy applies another theme the keyboard takes the new colours at once (it watches `theme.generation`). Without a theme file it uses light or dark colours of its own, by the desktop's setting. An owner who prefers those anyway can say so: + +``` +mkdir -p ~/.config/tactus && touch ~/.config/tactus/own-colours +``` + +## Text fields, and the browser + +Every key is committed at once (no preedit), and the typing engine keeps its own copy of the text before the cursor. + +- **A field that tells its text** (GTK, the browser) is held against that copy after every key. A word is replaced with `delete_surrounding_text`, and only once the field has shown everything sent before: a key that would take text away waits for that, a quarter of a second at most, and otherwise the word stays as typed. +- **A field that tells nothing** (GPUI applications) gets Backspace key presses and then the word. There the copy is built from Tactus's own keys alone, and any sign of life from the field that a key doesn't explain starts it afresh. +- **Chromium** (156, text-input-v3) sends new state only when the serial of the last `done` equals its count of commits, and Hyprland sends a text field `done` only when the keyboard commits something. Left alone, its surrounding text is one key behind, and since it takes text away counting from the cursor it last told of, a correction sent then deletes nothing and the right word lands after the wrong one. So Tactus answers: an empty input-method commit after a field's first sign of life and after every report that carries text (at most 40 a second). GTK applies nothing on an empty `done` and sends nothing back. + +## The trace + +`TACTUS_TRACE=1` in the keyboard's environment makes the typing engine say in the journal what it does and why: a word of so many letters kept or corrected, a field that tells its text or doesn't, a key that waited. It never says what was typed; `test/all --built` types a known text with the trace on and looks for it in the output. + +## Tests + +- `test/all` (offline; what `tests/packages` and CI run): the downloads are pinned, the patches are shaped as patches and touch the eleven files they should, the launcher, the licences. +- `test/all --upstream DIR`: the patches apply to the untouched Stevia tree with no fuzz. +- `test/all --built BUILD SRC` (the PKGBUILD's `check()`): the checks built with the keyboard. `tactus-typer-test` types against make-believe text fields (one that tells, one that tells nothing, a slow one, one that ignores deletes, a browser answered and unanswered): 126 checks. `tactus-ac-test` runs a list of slips and of words that must stay. Under `xvfb-run`, `tactus-kbd-test` and `tactus-emoji-test` drive the keys and the emoji page with no window on screen. + +## Where it has run + +On a Pixel 9a, as this package, chosen through Setup > Keyboard, in light on 2026-11-17 and in dark on 11-18: a GTK 3 text view (both days), Chromium 156 with text-input-v3 (a text area, an editable block and a one-line field: slips corrected, two spaces, Backspace, an emoji), and a GPUI application (a slip corrected, with the trace's line for it in a field that tells nothing). Changing to squeekboard and back from the menu worked both ways, and after each reboot the chosen keyboard was the one that started. It has been that phone's keyboard since. With the keyboard up the compositor kept 259 px for a panel 267 px high, the window in front ended 8 px under the panel's top, and no wallpaper showed past the corners, or between the window and the keyboard while the page changed from letters to emoji. Not tried: other languages' layouts, Qt applications, the lock screen's password field, a phone on its side, and any phone but the 9a. + +## Licences + +GPL-3.0-or-later, as Stevia (`COPYING`). The word counts (`en_50k.txt`) are from [FrequencyWords](https://github.com/hermitdave/FrequencyWords) by Hermit Dave, made from OpenSubtitles 2018, CC-BY-SA-4.0, installed unchanged; `WORD-COUNTS` has the commit. The emoji are the system's (Noto Color Emoji); the signs for their kinds and every icon on the keys are drawn in `tactus-draw.c`. diff --git a/packages/tactus/WORD-COUNTS b/packages/tactus/WORD-COUNTS new file mode 100644 index 000000000..eb3244185 --- /dev/null +++ b/packages/tactus/WORD-COUNTS @@ -0,0 +1,12 @@ +The word counts (/usr/lib/tactus/share/phosh-osk-stevia/en_50k.txt) + +How often each of the 50,000 commonest English words is seen, from +FrequencyWords by Hermit Dave (https://github.com/hermitdave/FrequencyWords, +content/2018/en/en_50k.txt at commit 34bb6447a96d4434dc2d4b24e0cf946c523090b3, +the first whose README gives the content's licence as CC-by-sa-4.0; the file +itself is the same since it was added at 072bbed282316a23651aa7068c7173aa7898cf80), +made from the OpenSubtitles 2018 corpus (http://opus.nlpl.eu/OpenSubtitles2018.php). +The file is installed unchanged. + +Licence: Creative Commons Attribution-ShareAlike 4.0 International +(CC-BY-SA-4.0), https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/packages/tactus/patches/0001-run-without-the-device-state-protocol.patch b/packages/tactus/patches/0001-run-without-the-device-state-protocol.patch new file mode 100644 index 000000000..cd8529d73 --- /dev/null +++ b/packages/tactus/patches/0001-run-without-the-device-state-protocol.patch @@ -0,0 +1,29 @@ +Subject: wayland: run where the compositor has no zphoc_device_state_v1 + +Stevia asks the compositor for phoc's device-state protocol (is a hardware +keyboard attached?) and counts it among the globals it can't do without, so +on a compositor without it the keyboard never becomes ready. Hyprland doesn't +have it. The protocol is now optional: without it there is no hardware +keyboard tracking, and everything else works. +--- +--- a/src/pos-hw-tracker.c ++++ b/src/pos-hw-tracker.c +@@ -72,6 +72,9 @@ + gpointer device_state) + { + self->device_state = device_state; ++ /* Not every compositor has it (Hyprland): no hardware keyboard tracking then */ ++ if (!self->device_state) ++ return; + zphoc_device_state_v1_add_listener (self->device_state, &device_state_listener, self); + } + +--- a/src/pos-wayland.c ++++ b/src/pos-wayland.c +@@ -387,6 +387,5 @@ + self->zwlr_foreign_toplevel_manager_v1 && + self->layer_shell && + self->zxdg_output_manager_v1 && +- self->zphoc_device_state_v1 && + self->ext_data_control_manager); + } diff --git a/packages/tactus/patches/0002-build-the-typing-engine-and-its-tests.patch b/packages/tactus/patches/0002-build-the-typing-engine-and-its-tests.patch new file mode 100644 index 000000000..bd9bf3fed --- /dev/null +++ b/packages/tactus/patches/0002-build-the-typing-engine-and-its-tests.patch @@ -0,0 +1,60 @@ +Subject: build: the typing engine, the drawing and their tests + +Adds Tactus's own sources to the library (tactus-autocorrect, tactus-draw, +tactus-typer), links hunspell for the dictionary, tells the code where the +package's data is (TACTUS_PKGDATADIR, for the word counts), and builds the +checks that run with no window on screen (tools/tactus-*-test). +--- +--- a/meson.build ++++ b/meson.build +@@ -171,6 +171,7 @@ + config_h.set_quoted('GETTEXT_PACKAGE', 'phosh-osk-stevia') + config_h.set_quoted('LOCALEDIR', localedir) + config_h.set_quoted('WORD_LIST', get_option('wordlist')) ++config_h.set_quoted('TACTUS_PKGDATADIR', pkgdatadir) + config_h.set_quoted('PHOSH_OSK_STEVIA_VERSION', meson.project_version()) + config_h.set_quoted('POS_APP_ID', app_id) + config_h.set('POS_HAVE_FZF', fzf.found()) +--- a/src/meson.build ++++ b/src/meson.build +@@ -20,6 +20,7 @@ + libhandy_dep, + libsoup_dep, + libsystemd_dep, ++ hunspell_dep, + wayland_client_dep, + xkbcommon_dep, + cc.find_library('m', required: false), +@@ -34,6 +35,12 @@ + ) + + libpos_sources = files( ++ 'tactus-autocorrect.c', ++ 'tactus-autocorrect.h', ++ 'tactus-draw.c', ++ 'tactus-draw.h', ++ 'tactus-typer.c', ++ 'tactus-typer.h', + 'pos-app.c', + 'pos-activation-filter.c', + 'pos-activation-filter.h', +--- a/tools/meson.build ++++ b/tools/meson.build +@@ -1,3 +1,17 @@ + + + executable('pos-speech-test', 'pos-speech-test.c', dependencies: libpos_dep) ++ ++# Tactus, checked with no window on screen ++executable('tactus-kbd-test', 'tactus-kbd-test.c', dependencies: libpos_dep) ++executable( ++ 'tactus-draw-test', ++ ['tactus-draw-test.c', '../src/tactus-draw.c'], ++ include_directories: include_directories('../src'), ++ dependencies: [dependency('pangocairo'), gio_dep, cc.find_library('m', required: false)], ++) ++executable('tactus-ac-test', 'tactus-ac-test.c', dependencies: libpos_dep) ++executable('tactus-typer-test', 'tactus-typer-test.c', dependencies: libpos_dep) ++executable('tactus-pages-test', 'tactus-pages-test.c', dependencies: libpos_dep) ++ ++executable('tactus-emoji-test', 'tactus-emoji-test.c', dependencies: libpos_dep) diff --git a/packages/tactus/patches/0003-us-layout-more-letters-under-a-long-press.patch b/packages/tactus/patches/0003-us-layout-more-letters-under-a-long-press.patch new file mode 100644 index 000000000..1906aded7 --- /dev/null +++ b/packages/tactus/patches/0003-us-layout-more-letters-under-a-long-press.patch @@ -0,0 +1,585 @@ +Subject: layouts/us: more letters under a long press + +A long press on a letter offers its accented forms. The US layout had a +handful; this adds the ones names and loanwords need most (ě ẽ ė ę, ÿ, į, +ś š, ł and the like), each letter's commonest forms nearest the finger. +--- +--- a/src/layouts/us.json ++++ b/src/layouts/us.json +@@ -14,10 +14,14 @@ + [ + "e", + "è", +- "é", + "ê", +- "ë", +- "ē" ++ "ě", ++ "ẽ", ++ "ē", ++ "ė", ++ "ę", ++ "é", ++ "ë" + ], + [ + "r" +@@ -26,7 +30,8 @@ + "t" + ], + [ +- "y" ++ "y", ++ "ÿ" + ], + [ + "u", +@@ -42,6 +47,7 @@ + "ï", + "í", + "ī", ++ "į", + "ì" + ], + [ +@@ -73,7 +79,9 @@ + ], + [ + "s", +- "ß" ++ "ß", ++ "ś", ++ "š" + ], + [ + "d" +@@ -94,19 +102,25 @@ + "k" + ], + [ +- "l" ++ "l", ++ "ł" + ] + ], + [ + [ +- "z" ++ "z", ++ "ž", ++ "ź", ++ "ż" + ], + [ + "x" + ], + [ + "c", +- "ç" ++ "ç", ++ "ć", ++ "č" + ], + [ + "v" +@@ -116,7 +130,8 @@ + ], + [ + "n", +- "ñ" ++ "ñ", ++ "ń" + ], + [ + "m" +@@ -124,21 +139,7 @@ + ], + [ + [ +- "," +- ], +- [ + " " +- ], +- [ +- ".", +- "#", +- "!", +- ",", +- "?", +- "-", +- ":", +- "'", +- "@" + ] + ] + ] +@@ -157,10 +158,14 @@ + [ + "E", + "È", +- "É", + "Ê", +- "Ë", +- "Ē" ++ "Ě", ++ "Ẽ", ++ "Ē", ++ "Ė", ++ "Ę", ++ "É", ++ "Ë" + ], + [ + "R" +@@ -169,7 +174,8 @@ + "T" + ], + [ +- "Y" ++ "Y", ++ "Ÿ" + ], + [ + "U", +@@ -185,6 +191,7 @@ + "Ï", + "Í", + "Ī", ++ "Į", + "Ì" + ], + [ +@@ -216,8 +223,8 @@ + ], + [ + "S", +- "ẞ", +- "SS" ++ "Ś", ++ "Š" + ], + [ + "D" +@@ -238,19 +245,25 @@ + "K" + ], + [ +- "L" ++ "L", ++ "Ł" + ] + ], + [ + [ +- "Z" ++ "Z", ++ "Ž", ++ "Ź", ++ "Ż" + ], + [ + "X" + ], + [ + "C", +- "Ç" ++ "Ç", ++ "Ć", ++ "Č" + ], + [ + "V" +@@ -260,7 +273,8 @@ + ], + [ + "N", +- "Ñ" ++ "Ñ", ++ "Ń" + ], + [ + "M" +@@ -268,21 +282,7 @@ + ], + [ + [ +- "," +- ], +- [ + " " +- ], +- [ +- ".", +- "#", +- "!", +- ",", +- "?", +- "-", +- ":", +- "'", +- "@" + ] + ] + ] +@@ -293,38 +293,25 @@ + "rows": [ + [ + [ +- "1", +- "¹", +- "½", +- "⅓", +- "¼", +- "⅛" ++ "1" + ], + [ +- "2", +- "²", +- "⅔" ++ "2" + ], + [ +- "3", +- "³", +- "¾", +- "⅜" ++ "3" + ], + [ +- "4", +- "⁴" ++ "4" + ], + [ +- "5", +- "⅝" ++ "5" + ], + [ + "6" + ], + [ +- "7", +- "⅞" ++ "7" + ], + [ + "8" +@@ -334,108 +321,83 @@ + ], + [ + "0", +- "ⁿ", +- "∅" ++ "°" + ] + ], + [ + [ +- "@" ++ "-", ++ "–", ++ "—", ++ "•" + ], + [ +- "#" ++ "/", ++ "\\" + ], + [ +- "$", +- "¢", +- "£", +- "€", +- "¥", +- "₱" ++ ":" + ], + [ +- "%", +- "‰" ++ ";" + ], + [ +- "&" ++ "(" + ], + [ +- "-", +- "_", +- "–", +- "—", +- "·" ++ ")" + ], + [ +- "+", +- "±" ++ "$", ++ "₽", ++ "¥", ++ "€", ++ "¢", ++ "£", ++ "₩" + ], + [ +- "(", +- "<", +- "{", +- "[" ++ "&", ++ "§" + ], + [ +- ")", +- ">", +- "}", +- "]" +- ] +- ], +- [ +- [ +- "*", +- "†", +- "‡", +- "★" ++ "@" + ], + [ + "\"", +- "“", +- "”", + "«", +- "»" +- ], ++ "»", ++ "„", ++ "“", ++ "”" ++ ] ++ ], ++ [ + [ +- "'", +- "‘", +- "’", +- "‹", +- "›" ++ ".", ++ "…" + ], + [ +- ":" ++ "," + ], + [ +- ";" ++ "?", ++ "¿" + ], + [ + "!", + "¡" + ], + [ +- "?", +- "¿" ++ "'", ++ "`", ++ "‘", ++ "’" + ] + ], + [ + [ +- "_" +- ], +- [ +- "/" +- ], +- [ + " " +- ], +- [ +- "," +- ], +- [ +- ".", +- "…" + ] + ] + ] +@@ -446,126 +408,97 @@ + "rows": [ + [ + [ +- "~" ++ "[" + ], + [ +- "`" ++ "]" + ], + [ +- "|" ++ "{" + ], + [ +- "•", +- "♪", +- "♥", +- "♠", +- "♦", +- "♣" ++ "}" + ], + [ +- "√" ++ "#" + ], + [ +- "Π", +- "π" ++ "%", ++ "‰" + ], + [ +- "÷" ++ "^" + ], + [ +- "×" ++ "*" + ], + [ +- "¶", +- "§" ++ "+" + ], + [ +- "∆" ++ "=", ++ "≠", ++ "≈" + ] + ], + [ + [ +- "£" ++ "_" + ], + [ +- "¢" ++ "\\" + ], + [ +- "€" ++ "|" + ], + [ +- "¥" ++ "~" + ], + [ +- "^", +- "↑", +- "↓", +- "←", +- "→" ++ "<" + ], + [ +- "°", +- "′", +- "″" ++ ">" + ], + [ +- "=", +- "≠", +- "≈", +- "∞" ++ "€" + ], + [ +- "{" ++ "£" + ], + [ +- "}" ++ "¥" ++ ], ++ [ ++ "•" + ] + ], + [ + [ +- "\\" +- ], +- [ +- "©" +- ], +- [ +- "®" ++ ".", ++ "…" + ], + [ +- "™" ++ "," + ], + [ +- "℅" ++ "?", ++ "¿" + ], + [ +- "[" ++ "!", ++ "¡" + ], + [ +- "]" ++ "'", ++ "`", ++ "‘", ++ "’" + ] + ], + [ + [ +- "<", +- "‹", +- "≤", +- "«" +- ], +- [ +- ">", +- "›", +- "≥", +- "»" +- ], +- [ + " " +- ], +- [ +- "," +- ], +- [ +- ".", +- "…" + ] + ] + ] +@@ -573,4 +506,4 @@ + ], + "locale": "en", + "name": "English United States" +-} ++} +\ No newline at end of file diff --git a/packages/tactus/patches/0004-osk-widget-own-keys-and-where-a-tap-landed.patch b/packages/tactus/patches/0004-osk-widget-own-keys-and-where-a-tap-landed.patch new file mode 100644 index 000000000..d1e8bf416 --- /dev/null +++ b/packages/tactus/patches/0004-osk-widget-own-keys-and-where-a-tap-landed.patch @@ -0,0 +1,3080 @@ +Subject: osk-widget: Tactus's keys, and where in a key a tap landed + +Loading a layout stays Stevia's. The geometry, the drawing and the touch +handling are written anew for a phone keyboard with the look and the manners +of the keyboards on current phones: + +- every measure is in points of a 390 pt wide phone and scales with the + widget's width; a keyboard much wider than tall (a phone on its side) has + lower keys; +- the keys are drawn with cairo and pango from tactus-draw (panel, keys, + labels, Shift in its three states, Delete, Return), light or dark; +- under the keys a strip with the emoji key and the microphone; +- a long press shows the letter's other forms in a bar above the key, and a + slide along it picks one; +- held on the space bar, a slide moves the cursor; +- Shift turns itself on where a sentence starts (set_autoshift), and a + double tap locks it; +- each key press is reported with where in the key the finger landed + (take_tap), which the autocorrection weighs, and the keys' touch targets + shift by what was learned about the owner's fingers (set_touch_bias); +- the widget says how high its panel is and how much room it needs above the + keys for the bar of other forms (get_panel_height, get_overhang), so the + surface can leave that band to the application underneath, and how far + the windows are to reach under the panel's top (get_panel_under). +--- +--- a/src/pos-osk-widget.h ++++ b/src/pos-osk-widget.h +@@ -42,4 +42,18 @@ + void pos_osk_widget_set_key_height (PosOskWidget *self, guint key_height); + guint pos_osk_widget_max_rows (PosOskWidget *self); + ++/* Tactus */ ++guint pos_osk_widget_get_overhang (PosOskWidget *self); ++guint pos_osk_widget_get_panel_height (PosOskWidget *self); ++guint pos_osk_widget_get_panel_under (PosOskWidget *self); ++void pos_osk_widget_set_flat_top (PosOskWidget *self, gboolean flat); ++void pos_osk_widget_set_attached (PosOskWidget *self, gboolean attached); ++gboolean pos_osk_widget_get_caps_lock (PosOskWidget *self); ++void pos_osk_widget_set_autoshift (PosOskWidget *self, ++ gboolean wanted, ++ gboolean context_changed); ++gboolean pos_osk_widget_take_tap (PosOskWidget *self, double *dx, double *dy); ++void pos_osk_widget_set_touch_bias (PosOskWidget *self, double dx, double dy); ++void pos_osk_widget_cancel_touches (PosOskWidget *self); ++ + G_END_DECLS +--- a/src/pos-osk-widget.c ++++ b/src/pos-osk-widget.c +@@ -1,41 +1,80 @@ + /* + * Copyright (C) 2022-2024 The Phosh Developers + * 2025 Phosh.mobi e.V. ++ * 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Author: Guido Günther ++ * ++ * Tactus. Loading a layout is Stevia's; the geometry, the drawing and the ++ * touch handling are written for a phone keyboard with the look and the ++ * manners of the keyboards on current phones: every measure below is in ++ * points of a 390 pt wide phone and scales with the widget's width. + */ + + #define G_LOG_DOMAIN "pos-osk-widget" + + #include "pos-config.h" + +-#include "util.h" +-#include "pos-char-popup.h" ++#include "tactus-draw.h" + #include "phosh-osk-enums.h" + #include "pos-enums.h" + #include "pos-enum-types.h" +-#include "pos-indicator-popup.h" + #include "pos-osk-key.h" + #include "pos-osk-widget.h" + + #include "gmobile.h" + + #include +-#include + + #include + +-#define KEY_ICON_SIZE 16 +- +-/* Default us layout */ +-#define LAYOUT_COLS 10 + #define LAYOUT_MAX_ROWS 5 +- + #define MINIMUM_WIDTH 360 + +-#define EVENT_HISTORY_THRESHOLD_MS 150 ++/* The keyboard's measures, in points */ ++#define PT_WIDTH 390.0 ++#define PT_WIDTH_MAX 430.0 /* heights and letters stop growing here */ ++#define PT_INSET 3.5 /* from the screen's edge to the first key's slot */ ++#define PT_GAP_H 6.5 ++#define PT_GAP_V 11.0 ++#define PT_KEY_H 43.0 ++#define PT_TOP_PAD 12.0 ++#define PT_STRIP_H 71.5 /* under the keys: emoji and dictation */ ++#define PT_SHIFT_GAP 7.8 /* extra room between Shift or Delete and the letters */ ++#define PT_KEY_RADIUS 6.8 ++#define PT_FONT_LOWER 23.85 ++#define PT_FONT_UPPER 21.1 ++#define PT_FONT_LABEL 18.3 ++#define PT_ICON_EDGE 42.5 /* emoji and dictation: centre, from the side */ ++#define PT_ICON_DROP 38.0 /* and below the keys */ ++#define PT_POPUP_H 68.0 ++#define PT_POPUP_GAP 4.0 ++#define PT_POPUP_RADIUS 18.0 ++#define PT_POPUP_SEL_W 36.0 ++#define PT_POPUP_SEL_H 48.0 ++/* The same, for a keyboard much wider than tall (a phone on its side) */ ++#define PT_WIDE_FROM 560.0 ++#define PT_WIDE_GAP_V 7.0 ++#define PT_WIDE_KEY_H 34.0 ++#define PT_WIDE_TOP_PAD 8.0 ++#define PT_WIDE_STRIP_H 40.0 ++ ++#define WEIGHT_LOWER 360 ++#define WEIGHT_UPPER 445 ++#define WEIGHT_LABEL 430 ++ ++#define LONG_PRESS_MS 400 ++#define LINGER_MS 70 ++#define SHIFT_DOUBLE_TAP_US (350 * G_TIME_SPAN_MILLISECOND) ++/* Cursor mode: finger travel for one step */ ++#define CURSOR_STEP_X 9.0 ++#define CURSOR_STEP_Y 24.0 ++ ++#define MAX_TOUCHES 6 ++/* The pointer (a mouse, or a test) is a touch of its own */ ++#define POINTER_SEQUENCE ((GdkEventSequence *) GUINT_TO_POINTER (1)) + + enum { + OSK_KEY_DOWN, +@@ -44,6 +83,7 @@ + OSK_KEY_SYMBOL, + OSK_POPOVER_SHOWN, + OSK_POPOVER_HIDDEN, ++ OSK_STRIP_KEY, + N_SIGNALS + }; + static guint signals[N_SIGNALS]; +@@ -60,22 +100,36 @@ + static GParamSpec *props[PROP_LAST_PROP]; + + typedef enum { +- CURSOR_DRAG_STARTING, +- CURSOR_DRAG_HORIZ, +- CURSOR_DRAG_VERT, +-} cursor_drag_t; ++ TACTUS_ROLE_CHAR, ++ TACTUS_ROLE_SPACE, ++ TACTUS_ROLE_SHIFT, ++ TACTUS_ROLE_BACKSPACE, ++ TACTUS_ROLE_SYM, /* "123" and "ABC" */ ++ TACTUS_ROLE_SYM2, /* "#+=" and, on that page, "123" */ ++ TACTUS_ROLE_RETURN, ++ TACTUS_ROLE_EMOJI, ++ TACTUS_ROLE_MIC, ++} TactusRole; ++ ++/* Where a key is: what is drawn, and the wider span that takes its touches */ ++typedef struct { ++ PosOskKey *key; ++ TactusRole role; ++ double vx, vy, vw, vh; ++ double hx0, hx1; ++ int row; ++} TactusGeom; + + /** + * PosOskWidgetRow: + * @width: number in key units +- * @offset_x: offset from the right in key units ++ * @offset_x: offset from the left in key units + * + * A key row on a #PosOskWidgetKeyboardLayer of the #PosOskWidget. +- * Renders the keys and reacts to touch and pointer events. Much +- * of the logic can go if we use GtkWidgets for the keys itself. + */ + typedef struct { + GPtrArray *keys; ++ GArray *geoms; + double width; + double offset_x; + } PosOskWidgetRow; +@@ -83,19 +137,14 @@ + /** + * PosOskWidgetKeyboardLayer: + * @width: The maximum width in key units +- * @offset_x: Offset of this layer from the left side in pixels +- * @key_width: Key width in pixels of a 1 unit wide key +- * @key_height: key height in pixels of a 1 unit high key ++ * @key_width: Width in pixels of one unit: a letter key and the gap beside it + * + * Describes the character layout of one layer of keys. + */ + typedef struct { + PosOskWidgetRow rows[LAYOUT_MAX_ROWS]; + double width; +- +- int offset_x; + double key_width; +- double key_height; + guint n_rows; + } PosOskWidgetKeyboardLayer; + +@@ -119,6 +168,32 @@ + double width; + } PosOskWidgetLayout; + ++typedef enum { ++ TACTUS_TOUCH_KEY, /* a character, the space bar or return */ ++ TACTUS_TOUCH_BACKSPACE, ++ TACTUS_TOUCH_SHIFT, ++ TACTUS_TOUCH_SYM, ++ TACTUS_TOUCH_SYM2, ++ TACTUS_TOUCH_STRIP, ++} TactusTouchKind; ++ ++/* One finger on the keyboard */ ++typedef struct { ++ PosOskWidget *widget; ++ gboolean active; ++ GdkEventSequence *seq; ++ TactusTouchKind kind; ++ TactusGeom *geom; /* the key under the finger; NULL once it has left the keys */ ++ TactusRole down_role; ++ double x0, y0, x, y; ++ gboolean consumed; /* typed already: another finger came down */ ++ gboolean moved_off; ++ gboolean return_to_letters; /* slid from "123" onto this key */ ++ gboolean chord_used; /* Shift, "123": a key was typed while this was held */ ++ PosOskWidgetLayer layer_before; ++ guint long_id; ++} TactusTouch; ++ + /** + * PosOskWidget: + * @name: The name of the layout, e.g. `de`, `us`, `de+ch` +@@ -132,207 +207,68 @@ + GtkDrawingArea parent; + + PhoshOskFeatures features; +- int width, height; ++ int width, height; + PosOskWidgetLayout layout; +- guint key_height; ++ guint key_height; + +- GtkStyleContext *key_context; + PosOskWidgetLayer layer; + PosOskWidgetMode mode; + /* Contains pointers to key symbols (keys have ownership) */ + GPtrArray *symbols; +- gboolean caps_lock; ++ gboolean caps_lock; + +- char *name; +- char *display_name; +- char *lang; +- char *region; +- char *layout_id; +- +- PosOskKey *current; +- PosOskKey *space; +- GtkGestureLongPress *long_press; +- GdkEventSequence *sequence; +- GtkWidget *char_popup; +- guint repeat_id; +- +- PosIndicatorPopup *indicator_popup; +- +- /* Cursor movement */ +- GtkGesture *cursor_drag; +- double last_x, last_y; +- GArray *event_history; +- cursor_drag_t drag_type; +- +- /* Key scaling */ +- GtkCssProvider *css_provider; +- int key_scale; ++ char *name; ++ char *display_name; ++ char *lang; ++ char *region; ++ char *layout_id; ++ ++ /* The look */ ++ GSettings *interface_settings; ++ TactusTheme theme; ++ ++ /* The measures, in pixels, for the current width */ ++ gboolean with_overhang; ++ double extra; /* height given beyond what is needed: clear, above the panel */ ++ gboolean flat_top; ++ gboolean attached; /* something sits right on top: no clear room above the keys */ ++ double s, vs; ++ double inset, gap_h, gap_v, key_h, pitch, top_pad, strip_h; ++ double overhang; ++ TactusGeom emoji, mic; ++ guint resize_id; ++ ++ /* Fingers */ ++ TactusTouch touches[MAX_TOUCHES]; ++ TactusGeom *linger; ++ guint linger_id; ++ TactusTouch *cursor_touch; ++ double cursor_x, cursor_y; ++ ++ /* Shift */ ++ gboolean autoshift; ++ gboolean shift_override; ++ gint64 last_shift_tap; ++ ++ /* The row of accented letters shown for a held key */ ++ struct { ++ gboolean active; ++ TactusTouch *touch; ++ GPtrArray *options; ++ int selected; ++ double x, y, w, h, cell; ++ } popup; ++ ++ /* Where the finger landed on the last letter typed, for the typing engine */ ++ double tap_dx, tap_dy; ++ gboolean tap_valid; ++ /* Where this owner's fingers land compared to where they aim, in key sizes */ ++ double bias_x, bias_y; + }; + G_DEFINE_TYPE (PosOskWidget, pos_osk_widget, GTK_TYPE_DRAWING_AREA) + +-typedef struct { +- double delta_x, delta_y; +- guint32 time; +-} EventHistoryRecord; +- +- +-static void +-pos_osk_widget_calculate_drag_velocity (PosOskWidget *self, double *v_x, double *v_y) +-{ +- gdouble total_delta_x = 0, total_delta_y = 0; +- guint32 first_time = 0, last_time = 0; +- guint i; +- +- for (i = 0; i < self->event_history->len; i++) { +- EventHistoryRecord *r = +- &g_array_index (self->event_history, EventHistoryRecord, i); +- +- if (i == 0) +- first_time = r->time; +- else { +- total_delta_x += r->delta_x; +- total_delta_y += r->delta_y; +- } +- +- last_time = r->time; +- } +- +- if (first_time == last_time) { +- if (v_x) +- *v_x = total_delta_x / (last_time - first_time); +- +- if (v_y) +- *v_y = total_delta_y / (last_time - first_time); +- } +- +- if (v_x) +- *v_x = total_delta_x / (last_time - first_time); +- +- if (v_y) +- *v_y = total_delta_y / (last_time - first_time); +-} +- +- +-static void +-pos_osk_widget_trim_event_history (PosOskWidget *self) +-{ +- g_autoptr (GdkEvent) event = gtk_get_current_event (); +- guint32 threshold_time = gdk_event_get_time (event) - EVENT_HISTORY_THRESHOLD_MS; +- guint i; +- +- for (i = 0; i < self->event_history->len; i++) { +- guint32 time = g_array_index (self->event_history, +- EventHistoryRecord, i).time; +- +- if (time >= threshold_time) +- break; +- } +- +- if (i > 0) +- g_array_remove_range (self->event_history, 0, i); +-} +- +- +-static void +-pos_osk_widget_append_to_event_history (PosOskWidget *self, double delta_x, double delta_y) +-{ +- g_autoptr (GdkEvent) event = gtk_get_current_event (); +- EventHistoryRecord record; +- +- pos_osk_widget_trim_event_history (self); +- +- record.delta_x = delta_x; +- record.delta_y = delta_y; +- record.time = gdk_event_get_time (event); +- +- g_array_append_val (self->event_history, record); +-} +- +- +-static void +-on_drag_begin (PosOskWidget *self, +- double start_x, +- double start_y) +-{ +- if (self->mode != POS_OSK_WIDGET_MODE_CURSOR) +- return; +- +- self->drag_type = CURSOR_DRAG_STARTING; +- self->last_x = start_x; +- self->last_y = start_y; +-} +- +-#define KEY_DIST_X 5 +-#define KEY_DIST_Y 10 +-#define V_X_MIN 1.4 +-#define V_Y_MIN 2.8 +- +-#define CAN_DRAG_HORIZ(self) \ +- (self->drag_type == CURSOR_DRAG_STARTING || self->drag_type == CURSOR_DRAG_HORIZ) +-#define CAN_DRAG_VERT(self) \ +- (self->drag_type == CURSOR_DRAG_STARTING || self->drag_type == CURSOR_DRAG_VERT) +-#define DRAG_TYPE(self) \ +- (self->drag_type == CURSOR_DRAG_STARTING ? "starting" \ +- : self->drag_type == CURSOR_DRAG_HORIZ ? "horiz" \ +- : "vert") +- +- +-static void +-on_drag_update (PosOskWidget *self, double off_x, double off_y) +-{ +- const char *symbol = NULL; +- double delta_x, delta_y, v_x, v_y; +- +- if (self->mode != POS_OSK_WIDGET_MODE_CURSOR) +- return; +- +- g_debug ("%s: (%f,%f) %s", __func__, off_x, off_y, DRAG_TYPE (self)); +- +- delta_x = self->last_x - off_x; +- delta_y = self->last_y - off_y; +- pos_osk_widget_append_to_event_history (self, delta_x, delta_y); +- +- pos_osk_widget_calculate_drag_velocity (self, &v_x, &v_y); +- +- if (CAN_DRAG_HORIZ (self) && ABS (v_x) < V_X_MIN && ABS (v_y) > V_Y_MIN) { +- g_debug ("Switching to vert: %f %f", v_x, v_y); +- self->drag_type = CURSOR_DRAG_VERT; +- } else if (CAN_DRAG_VERT (self) && ABS (v_y) < V_Y_MIN && ABS (v_x) > V_X_MIN) { +- g_debug ("Switching to horiz: %f %f", v_x, v_y); +- self->drag_type = CURSOR_DRAG_HORIZ; +- } +- +- if (ABS (delta_x) > KEY_DIST_X && CAN_DRAG_HORIZ (self)) { +- symbol = delta_x > 0 ? POS_OSK_SYMBOL_LEFT : POS_OSK_SYMBOL_RIGHT; +- self->last_x = off_x; +- self->drag_type = CURSOR_DRAG_HORIZ; +- } else if (ABS (delta_y) > KEY_DIST_Y && CAN_DRAG_VERT (self)) { +- symbol = delta_y > 0 ? POS_OSK_SYMBOL_UP : POS_OSK_SYMBOL_DOWN; +- self->last_y = off_y; +- self->drag_type = CURSOR_DRAG_VERT; +- } + +- if (symbol) +- g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, symbol); +-} +- +- +-static void +-on_drag_end (PosOskWidget *self) +-{ +- if (self->mode != POS_OSK_WIDGET_MODE_CURSOR) +- return; +- +- pos_osk_widget_set_mode (self, POS_OSK_WIDGET_MODE_KEYBOARD); +- g_array_remove_range (self->event_history, 0, self->event_history->len); +-} +- +- +-static void +-on_drag_cancel (PosOskWidget *self) +-{ +- on_drag_end (self); +-} ++static void tactus_set_layer (PosOskWidget *self, PosOskWidgetLayer layer); + + + static PosOskWidgetKeyboardLayer * +@@ -364,16 +300,6 @@ + } + + +-static PosOskWidgetRow * +-pos_osk_widget_get_row (PosOskWidget *self, guint row) +-{ +- PosOskWidgetKeyboardLayer *l; +- +- l = pos_osk_widget_get_current_layer (self); +- return &l->rows[row]; +-} +- +- + static guint + pos_osk_widget_row_get_num_keys (PosOskWidgetRow *row) + { +@@ -393,6 +319,23 @@ + } + + ++static gboolean ++tactus_is_letters (PosOskWidgetLayer layer) ++{ ++ return layer == POS_OSK_WIDGET_LAYER_NORMAL || layer == POS_OSK_WIDGET_LAYER_CAPS; ++} ++ ++ ++static gboolean ++tactus_types (TactusRole role) ++{ ++ return role == TACTUS_ROLE_CHAR || role == TACTUS_ROLE_SPACE || role == TACTUS_ROLE_RETURN; ++} ++ ++/* ++ * Layout loading ++ */ ++ + static void + pos_osk_widget_layout_free (PosOskWidgetLayout *layout) + { +@@ -400,18 +343,21 @@ + g_clear_pointer (&layout->locale, g_free); + + for (int l = 0; l < POS_OSK_WIDGET_LAST_LAYER + 1; l++) { +- for (int r = 0; r < layout->n_rows; r++) { +- if (layout->layers[l].rows[r].keys) { +- g_ptr_array_free (layout->layers[l].rows[r].keys, TRUE); +- layout->layers[l].rows[r].keys = NULL; +- } ++ for (int r = 0; r < LAYOUT_MAX_ROWS; r++) { ++ PosOskWidgetRow *row = &layout->layers[l].rows[r]; ++ ++ g_clear_pointer (&row->keys, g_ptr_array_unref); ++ g_clear_pointer (&row->geoms, g_array_unref); + } ++ layout->layers[l].n_rows = 0; ++ layout->layers[l].width = 0.0; + } + } + +- ++/* Delete in the row above the last, Return in the last */ + static void +-add_common_keys_post (PosOskWidgetRow *row, PosOskWidgetLayer layer, gint rownum, guint max_rows) ++add_common_keys_post (PosOskWidgetRow *row, PosOskWidgetLayer layer, gint rownum, guint max_rows, ++ double edge_width) + { + PosOskKey *key; + +@@ -429,7 +375,7 @@ + key = g_object_new (POS_TYPE_OSK_KEY, + "symbol", "KEY_ENTER", + "icon", "keyboard-enter-symbolic", +- "width", 2.0, ++ "width", edge_width, + "style", "return", + NULL); + row->width += pos_osk_key_get_width (key); +@@ -437,13 +383,15 @@ + } + } + +- ++/* Shift (on the number pages: the key to the other one) in the row above the last, ++ * and the key between letters and numbers in the last */ + static void + add_common_keys_pre (PosOskWidget *self, + PosOskWidgetRow *row, + PosOskWidgetLayer layer, + gint rownum, +- guint max_rows) ++ guint max_rows, ++ double edge_width) + { + PosOskKey *key; + +@@ -454,7 +402,7 @@ + const char *label, *icon; + switch (layer) { + case POS_OSK_WIDGET_LAYER_SYMBOLS: +- label = "={<"; ++ label = "#+="; + icon = NULL; + break; + case POS_OSK_WIDGET_LAYER_SYMBOLS2: +@@ -483,23 +431,12 @@ + } else if (rownum == max_rows - 1) { + const char *label; + +- key = g_object_new (POS_TYPE_OSK_KEY, +- "use", POS_OSK_KEY_USE_MENU, +- "icon", "layout-menu-symbolic", +- "width", 1.0, +- "style", "sys", +- NULL); +- row->width += pos_osk_key_get_width (key); +- g_ptr_array_insert (row->keys, 0, key); +- + switch (layer) { + case POS_OSK_WIDGET_LAYER_SYMBOLS: + case POS_OSK_WIDGET_LAYER_SYMBOLS2: + label = "ABC"; + break; + case POS_OSK_WIDGET_LAYER_CAPS: +- label = "={<"; +- break; + case POS_OSK_WIDGET_LAYER_NORMAL: + label = "123"; + break; +@@ -509,7 +446,7 @@ + key = g_object_new (POS_TYPE_OSK_KEY, + "label", label, + "use", POS_OSK_KEY_USE_TOGGLE, +- "width", 1.0, ++ "width", edge_width, + "layer", POS_OSK_WIDGET_LAYER_SYMBOLS, + "style", "toggle", + NULL); +@@ -525,10 +462,9 @@ + { + if (g_strcmp0 (symbol, " ") == 0) { + return g_object_new (POS_TYPE_OSK_KEY, +- "label", self->display_name, + "symbol", symbol, + "symbols", symbols, +- "width", 2.0, ++ "width", 1.0, + "expand", TRUE, + "style", "space", + NULL); +@@ -570,6 +506,7 @@ + guint max_rows) + { + gsize num_keys; ++ double edge_width; + + num_keys = json_array_get_length (arow); + row->keys = g_ptr_array_new_full (num_keys + 2, g_object_unref); +@@ -604,8 +541,11 @@ + return; + } + +- add_common_keys_pre (self, row, l, r, max_rows); +- add_common_keys_post (row, l, r, max_rows); ++ /* With only the space bar between them the keys at the ends are wide: each ++ * ends where the letters above begin */ ++ edge_width = num_keys == 1 ? 2.5 : 1.5; ++ add_common_keys_pre (self, row, l, r, max_rows, edge_width); ++ add_common_keys_post (row, l, r, max_rows, edge_width); + } + + +@@ -616,7 +556,7 @@ + gboolean ret = FALSE; + gdouble max_width = 0.0; + +- num_rows = json_array_get_length (rows); ++ num_rows = MIN (json_array_get_length (rows), LAYOUT_MAX_ROWS); + layer->n_rows = num_rows; + + for (int r = 0; r < num_rows; r++) { +@@ -636,13 +576,16 @@ + } + layer->width = max_width; + +- /* If the row has a key that should be expanded use that one to fill +- the maximum width */ + for (int r = 0; r < num_rows; r++) { + PosOskWidgetRow *row = pos_osk_widget_get_layer_row (self, l, r); + PosOskKey *expand_key = NULL; ++ double spare = layer->width - row->width; + +- /* Find possible key to expand */ ++ if (row->keys == NULL) ++ continue; ++ ++ /* If the row has a key that should be expanded use that one to fill ++ the maximum width */ + for (int k = 0; k < row->keys->len; k++) { + PosOskKey *key = g_ptr_array_index (row->keys, k); + +@@ -652,13 +595,26 @@ + } + } + +- if (expand_key) { +- float width = pos_osk_key_get_width (expand_key); +- float expand = layer->width - row->width; +- if (width > 0) { +- pos_osk_key_set_width (expand_key, width + expand); +- row->width += expand; ++ if (expand_key && spare > 0.0) { ++ pos_osk_key_set_width (expand_key, pos_osk_key_get_width (expand_key) + spare); ++ row->width += spare; ++ } else if (r == num_rows - 2 && num_rows >= 2 && spare > 0.01) { ++ /* The row between Shift and Delete fills its width: on the number pages ++ * its five keys are wider than the letters they replace */ ++ guint n = 0; ++ ++ for (int k = 0; k < row->keys->len; k++) { ++ if (pos_osk_key_get_use (g_ptr_array_index (row->keys, k)) == POS_OSK_KEY_USE_KEY) ++ n++; ++ } ++ for (int k = 0; n && k < row->keys->len; k++) { ++ PosOskKey *key = g_ptr_array_index (row->keys, k); ++ ++ if (pos_osk_key_get_use (key) == POS_OSK_KEY_USE_KEY) ++ pos_osk_key_set_width (key, pos_osk_key_get_width (key) + spare / n); + } ++ if (n) ++ row->width += spare; + } + } + +@@ -667,6 +623,10 @@ + PosOskWidgetRow *row = pos_osk_widget_get_layer_row (self, l, r); + + row->offset_x = 0.5 * (layer->width - row->width); ++ if (row->keys) { ++ row->geoms = g_array_sized_new (FALSE, TRUE, sizeof (TactusGeom), row->keys->len); ++ g_array_set_size (row->geoms, row->keys->len); ++ } + } + + return ret; +@@ -785,801 +745,1114 @@ + return TRUE; + } + ++/* ++ * Geometry ++ */ + +-static void +-pos_osk_widget_set_property (GObject *object, +- guint property_id, +- const GValue *value, +- GParamSpec *pspec) ++static gboolean ++tactus_is_wide (int width) + { +- PosOskWidget *self = POS_OSK_WIDGET (object); +- +- switch (property_id) { +- case PROP_FEATURES: +- self->features = g_value_get_flags (value); +- break; +- case PROP_KEY_HEIGHT: +- pos_osk_widget_set_key_height (self, g_value_get_uint (value)); +- break; +- default: +- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +- break; +- } ++ return width > PT_WIDE_FROM; + } + +- ++/* The measures for a keyboard this wide */ + static void +-pos_osk_widget_get_property (GObject *object, +- guint property_id, +- GValue *value, +- GParamSpec *pspec) ++tactus_update_metrics (PosOskWidget *self, int width) + { +- PosOskWidget *self = POS_OSK_WIDGET (object); ++ gboolean wide = tactus_is_wide (width); + +- switch (property_id) { +- case PROP_LAYER: +- g_value_set_enum (value, self->layer); +- break; +- case PROP_NAME: +- g_value_set_string (value, self->name); +- break; +- case PROP_MODE: +- g_value_set_enum (value, self->mode); +- break; +- case PROP_FEATURES: +- g_value_set_flags (value, self->features); +- break; +- case PROP_KEY_HEIGHT: +- g_value_set_uint (value, self->key_height); +- break; +- default: +- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +- break; +- } ++ self->s = width / PT_WIDTH; ++ self->vs = MIN (width, PT_WIDTH_MAX) / PT_WIDTH; ++ self->inset = PT_INSET * self->s; ++ self->gap_h = PT_GAP_H * self->vs; ++ self->gap_v = (wide ? PT_WIDE_GAP_V : PT_GAP_V) * self->vs; ++ self->key_h = (wide ? PT_WIDE_KEY_H : PT_KEY_H) * self->vs; ++ self->pitch = self->key_h + self->gap_v; ++ self->top_pad = (wide ? PT_WIDE_TOP_PAD : PT_TOP_PAD) * self->vs; ++ self->strip_h = (wide ? PT_WIDE_STRIP_H : PT_STRIP_H) * self->vs; ++ /* Room above the keys for the row of accented letters of a key in the top row */ ++ if (self->with_overhang && !self->attached) ++ self->overhang = ceil ((PT_POPUP_H + PT_POPUP_GAP) * self->vs - self->top_pad + 3.0); ++ else ++ self->overhang = 0.0; ++ /* Given more height than it needs, the keyboard stays at the bottom */ ++ self->overhang += self->extra; + } + +-/** +- * select_symbols2: +- * @self: The osk widget +- * @key: The pressed key +- * +- * Check whether we should switch into or out of the symbols2 layer. If the layer +- * didn't change, the current layer is returned. +- * +- * Returns: The resulting layer. +- */ +-static PosOskWidgetLayer +-select_symbols2 (PosOskWidget *self, PosOskKey *key) +-{ +- if (pos_osk_widget_get_layer (self) == POS_OSK_WIDGET_LAYER_SYMBOLS && +- pos_osk_key_get_layer (key) == POS_OSK_WIDGET_LAYER_CAPS) { +- return POS_OSK_WIDGET_LAYER_SYMBOLS2; +- } + +- if (pos_osk_widget_get_layer (self) == POS_OSK_WIDGET_LAYER_CAPS && +- pos_osk_key_get_layer (key) == POS_OSK_WIDGET_LAYER_SYMBOLS) { +- return POS_OSK_WIDGET_LAYER_SYMBOLS2; +- } ++static double ++tactus_rows_top (PosOskWidget *self) ++{ ++ return self->overhang + self->top_pad; ++} + +- if (pos_osk_widget_get_layer (self) == POS_OSK_WIDGET_LAYER_SYMBOLS2 && +- pos_osk_key_get_layer (key) == POS_OSK_WIDGET_LAYER_CAPS) { +- return POS_OSK_WIDGET_LAYER_SYMBOLS; +- } + +- if (pos_osk_widget_get_layer (self) == POS_OSK_WIDGET_LAYER_SYMBOLS2 && +- pos_osk_key_get_layer (key) == POS_OSK_WIDGET_LAYER_SYMBOLS) { +- return POS_OSK_WIDGET_LAYER_NORMAL; +- } ++static double ++tactus_keys_bottom (PosOskWidget *self) ++{ ++ guint n = MAX (self->layout.n_rows, 1); + +- return self->layer; ++ return tactus_rows_top (self) + (n - 1) * self->pitch + self->key_h; + } + + +-static void +-pos_osk_widget_set_key_pressed (PosOskWidget *self, PosOskKey *key, gboolean pressed) ++static int ++tactus_height_for_width (PosOskWidget *self, int width) + { +- const GdkRectangle *box; ++ double save_s = self->s, save_extra = self->extra; ++ int height; + +- pos_osk_key_set_pressed (key, pressed); +- box = pos_osk_key_get_box (key); +- gtk_widget_queue_draw_area (GTK_WIDGET (self), box->x, box->y, box->width, box->height); ++ self->extra = 0.0; ++ tactus_update_metrics (self, width); ++ height = ceil (tactus_keys_bottom (self) + self->strip_h); ++ self->extra = save_extra; ++ if (self->width > 0 && save_s > 0.0) ++ tactus_update_metrics (self, self->width); ++ else ++ tactus_update_metrics (self, width); ++ ++ return height; + } + + +-static void +-switch_layer (PosOskWidget *self, PosOskKey *key) ++static TactusRole ++tactus_role (PosOskKey *key, PosOskWidgetLayer layer) + { +- PosOskWidgetLayer new_layer; +- PosOskWidgetLayer layer = pos_osk_key_get_layer (key); ++ const char *symbol = pos_osk_key_get_symbol (key); + +- if (pos_osk_key_get_use (key) == POS_OSK_KEY_USE_TOGGLE) { +- new_layer = select_symbols2 (self, key); +- if (new_layer == self->layer) { +- switch (layer) { +- case POS_OSK_WIDGET_LAYER_CAPS: +- case POS_OSK_WIDGET_LAYER_SYMBOLS: +- if (new_layer == layer) +- new_layer = POS_OSK_WIDGET_LAYER_NORMAL; +- else +- new_layer = layer; +- break; +- case POS_OSK_WIDGET_LAYER_NORMAL: +- case POS_OSK_WIDGET_LAYER_SYMBOLS2: +- default: +- g_return_if_reached (); +- break; +- } +- } +- self->caps_lock = FALSE; +- /* Reset caps layer on every (non toggle) key press */ +- } else if (self->layer == POS_OSK_WIDGET_LAYER_CAPS && !self->caps_lock) { +- new_layer = POS_OSK_WIDGET_LAYER_NORMAL; +- } else { +- return; ++ switch (pos_osk_key_get_use (key)) { ++ case POS_OSK_KEY_USE_DELETE: ++ return TACTUS_ROLE_BACKSPACE; ++ case POS_OSK_KEY_USE_TOGGLE: ++ if (pos_osk_key_get_layer (key) == POS_OSK_WIDGET_LAYER_CAPS) ++ return tactus_is_letters (layer) ? TACTUS_ROLE_SHIFT : TACTUS_ROLE_SYM2; ++ return TACTUS_ROLE_SYM; ++ case POS_OSK_KEY_USE_KEY: ++ case POS_OSK_KEY_USE_MENU: ++ default: ++ break; + } + +- pos_osk_widget_set_layer (self, new_layer); ++ if (g_strcmp0 (symbol, POS_OSK_SYMBOL_SPACE) == 0) ++ return TACTUS_ROLE_SPACE; ++ if (g_strcmp0 (symbol, "KEY_ENTER") == 0) ++ return TACTUS_ROLE_RETURN; ++ return TACTUS_ROLE_CHAR; + } + +- ++/* Place every key of every layer for the current width */ + static void +-set_caps_lock (PosOskWidget *self, gboolean caps_lock) ++tactus_layout_keys (PosOskWidget *self) + { +- PosOskWidgetLayer layer; ++ double rows_top; + +- if (self->caps_lock == caps_lock) ++ if (self->width <= 0) + return; + +- self->caps_lock = caps_lock; ++ tactus_update_metrics (self, self->width); ++ rows_top = tactus_rows_top (self); + +- layer = self->caps_lock ? POS_OSK_WIDGET_LAYER_CAPS : POS_OSK_WIDGET_LAYER_NORMAL; +- pos_osk_widget_set_layer (self, layer); +-} ++ for (int l = 0; l <= POS_OSK_WIDGET_LAST_LAYER; l++) { ++ PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_keyboard_layer (self, l); ++ int first_row = self->layout.n_rows - layer->n_rows; + ++ if (layer->width <= 0.0) ++ continue; + +-static PosOskKey * +-pos_osk_widget_locate_key (PosOskWidget *self, double x, double y) +-{ +- int row_num; +- PosOskWidgetRow *row; +- PosOskKey *key = NULL; +- double pos_x; +- PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_current_layer (self); +- guint off_y = self->height - (layer->n_rows * layer->key_height); ++ layer->key_width = (self->width - 2 * self->inset) / layer->width; + +- pos_x = x - layer->offset_x; ++ for (int r = 0; r < layer->n_rows; r++) { ++ PosOskWidgetRow *row = pos_osk_widget_get_layer_row (self, l, r); ++ double c = row->offset_x; ++ guint n = pos_osk_widget_row_get_num_keys (row); + +- row_num = (int)((y - off_y) / layer->key_height); +- g_return_val_if_fail (row_num < self->layout.n_rows, NULL); ++ for (int k = 0; k < n; k++) { ++ PosOskKey *key = pos_osk_widget_row_get_key (row, k); ++ TactusGeom *g = &g_array_index (row->geoms, TactusGeom, k); ++ double units = pos_osk_key_get_width (key); ++ double slot_x = self->inset + c * layer->key_width; ++ double slot_w = units * layer->key_width; ++ GdkRectangle box; + +- row = pos_osk_widget_get_row (self, row_num); +- pos_x -= row->offset_x * layer->key_width; +- for (int k = 0; k < pos_osk_widget_row_get_num_keys (row); k++) { +- key = pos_osk_widget_row_get_key (row, k); ++ g->key = key; ++ g->role = tactus_role (key, l); ++ g->row = first_row + r; ++ g->vx = slot_x + self->gap_h / 2; ++ g->vw = slot_w - self->gap_h; ++ g->vy = rows_top + g->row * self->pitch; ++ g->vh = self->key_h; ++ /* Shift and Delete stand a little apart from the letters */ ++ if (units > 1.2 && (g->role == TACTUS_ROLE_SHIFT || g->role == TACTUS_ROLE_SYM2)) { ++ g->vw -= PT_SHIFT_GAP * self->s; ++ } else if (units > 1.2 && g->role == TACTUS_ROLE_BACKSPACE) { ++ g->vx += PT_SHIFT_GAP * self->s; ++ g->vw -= PT_SHIFT_GAP * self->s; ++ } ++ /* A row's first and last key take the touches out to the edges */ ++ g->hx0 = k == 0 ? -G_MAXDOUBLE : slot_x; ++ g->hx1 = k == n - 1 ? G_MAXDOUBLE : slot_x + slot_w; ++ ++ box.x = g->vx; ++ box.y = g->vy; ++ box.width = g->vw; ++ box.height = g->vh; ++ pos_osk_key_set_box (key, &box); + +- pos_x -= pos_osk_key_get_width (key) * layer->key_width; +- if (pos_x <= 0) +- break; ++ c += units; ++ } ++ } + } + +- g_return_val_if_fail (key != NULL, NULL); +- +- return key; ++ /* Under the keys */ ++ { ++ double cy = tactus_keys_bottom (self) + MIN (PT_ICON_DROP * self->vs, self->strip_h / 2); ++ double half = 22.0 * self->vs; ++ ++ self->emoji = (TactusGeom) { ++ .role = TACTUS_ROLE_EMOJI, .row = -1, ++ .vx = PT_ICON_EDGE * self->s - half, .vy = cy - half, .vw = 2 * half, .vh = 2 * half, ++ }; ++ self->mic = (TactusGeom) { ++ .role = TACTUS_ROLE_MIC, .row = -1, ++ .vx = self->width - PT_ICON_EDGE * self->s - half, .vy = cy - half, ++ .vw = 2 * half, .vh = 2 * half, ++ }; ++ } + } + +- +-static void +-key_repeat_cancel (PosOskWidget *self) ++/* The key (or the emoji or dictation key) a touch at this place is for */ ++static TactusGeom * ++tactus_hit_test (PosOskWidget *self, double x, double y) + { +- g_clear_handle_id (&self->repeat_id, g_source_remove); +-} ++ PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_current_layer (self); ++ PosOskWidgetRow *row; ++ double rows_top = tactus_rows_top (self); ++ double keys_bottom = tactus_keys_bottom (self); ++ int first_row = self->layout.n_rows - layer->n_rows; ++ int r; + ++ if (layer->n_rows == 0 || self->width <= 0) ++ return NULL; + +-static void +-pos_osk_widget_show_indicator_popup (PosOskWidget *self, PosOskKey *key) +-{ +- const char *symbol; ++ /* Where this owner's fingers land, compared to where they aim */ ++ x -= self->bias_x * layer->key_width; ++ y -= self->bias_y * self->pitch; ++ ++ /* Under the keys: emoji on the left, dictation on the right */ ++ if (y >= keys_bottom + MIN (14.0 * self->vs, self->strip_h / 3)) { ++ double reach = 2 * PT_ICON_EDGE * self->s; ++ ++ if (x < reach) ++ return &self->emoji; ++ if (x > self->width - reach) ++ return &self->mic; ++ return NULL; ++ } ++ /* Well above the keys */ ++ if (y < rows_top - self->key_h) ++ return NULL; + +- if (!(self->features & PHOSH_OSK_FEATURE_KEY_INDICATOR)) +- return; ++ r = floor ((y - (rows_top - self->gap_v / 2)) / self->pitch); ++ r = CLAMP (r, first_row, (int) self->layout.n_rows - 1) - first_row; + +- symbol = pos_osk_key_get_symbol (key); +- if (!symbol || strlen (symbol) != 1 || g_str_equal (symbol, POS_OSK_SYMBOL_SPACE)) +- return; ++ row = &layer->rows[r]; ++ if (row->geoms == NULL) ++ return NULL; + +- pos_indicator_popup_show_key (self->indicator_popup, key); ++ for (int k = 0; k < row->geoms->len; k++) { ++ TactusGeom *g = &g_array_index (row->geoms, TactusGeom, k); ++ ++ if (x < g->hx1) ++ return g; ++ } ++ return NULL; + } + ++/* ++ * Layers and Shift ++ */ + +-static void +-pos_osk_widget_key_press_action (PosOskWidget *self, PosOskKey *key) ++/* The letters page to show when nothing holds Shift */ ++static PosOskWidgetLayer ++tactus_letters_layer (PosOskWidget *self) + { +- self->current = key; +- pos_osk_widget_set_key_pressed (self, key, TRUE); +- +- pos_osk_widget_show_indicator_popup (self, key); +- +- g_signal_emit (self, signals[OSK_KEY_DOWN], 0, pos_osk_key_get_symbol (key)); ++ if (self->caps_lock) ++ return POS_OSK_WIDGET_LAYER_CAPS; ++ if (self->shift_override && tactus_is_letters (self->layer)) ++ return self->layer; ++ /* No capitals page, no automatic capitals */ ++ if (self->layout.layers[POS_OSK_WIDGET_LAYER_CAPS].n_rows == 0) ++ return POS_OSK_WIDGET_LAYER_NORMAL; ++ return self->autoshift ? POS_OSK_WIDGET_LAYER_CAPS : POS_OSK_WIDGET_LAYER_NORMAL; + } + + +-static gboolean +-pos_osk_widget_key_press (PosOskWidget *self, double x, double y) ++static TactusTouch * ++tactus_held (PosOskWidget *self, TactusTouchKind kind, TactusTouch *except) + { +- PosOskKey *key = NULL; +- +- key = pos_osk_widget_locate_key (self, x, y); +- g_return_val_if_fail (key != NULL, GDK_EVENT_PROPAGATE); ++ for (int i = 0; i < MAX_TOUCHES; i++) { ++ TactusTouch *t = &self->touches[i]; + +- if (self->current) { +- g_warning ("Got button press event for %s while another key %s is pressed", +- POS_OSK_KEY_DBG (key), POS_OSK_KEY_DBG (self->current)); ++ if (t->active && !t->consumed && t->kind == kind && t != except) ++ return t; + } +- pos_osk_widget_key_press_action (self, key); +- +- return GDK_EVENT_PROPAGATE; ++ return NULL; + } + + +-static gboolean +-pos_osk_widget_button_press_event (GtkWidget *widget, GdkEventButton *event) ++static void ++tactus_set_layer (PosOskWidget *self, PosOskWidgetLayer layer) + { +- PosOskWidget *self = POS_OSK_WIDGET (widget); ++ if (layer == self->layer) ++ return; ++ /* A layout need not have every page */ ++ if (self->layout.layers[layer].n_rows == 0) ++ return; + +- g_debug ("Button press: %f, %f, button: %d, state: %d", +- event->x, event->y, event->button, event->state); ++ self->layer = layer; + +- if (event->type != GDK_BUTTON_PRESS) +- return GDK_EVENT_PROPAGATE; ++ /* The keys under the fingers are the new page's now */ ++ for (int i = 0; i < MAX_TOUCHES; i++) { ++ TactusTouch *t = &self->touches[i]; + +- pos_osk_widget_key_press (self, event->x, event->y); ++ if (t->active && !t->consumed && t->geom && t->geom->row >= 0) ++ t->geom = tactus_hit_test (self, t->x, t->y); ++ } + +- return GDK_EVENT_STOP; ++ g_object_notify_by_pspec (G_OBJECT (self), props[PROP_LAYER]); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + ++/* ++ * Typing ++ */ + + static void +-get_popup_pos (PosOskKey *key, GdkRectangle *out) ++on_linger_timeout (gpointer data) + { +- const GdkRectangle *box = pos_osk_key_get_box (key); ++ PosOskWidget *self = POS_OSK_WIDGET (data); + +- out->x = box->x + (0.5 * box->width); +- out->y = box->y + (0.5 * box->height); +- out->width = 0; +- out->height = 0; ++ self->linger_id = 0; ++ self->linger = NULL; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + +- ++/* A key just typed stays lit for a moment, so that a quick tap shows */ + static void +-pos_osk_widget_show_menu (PosOskWidget *self, PosOskKey *key) ++tactus_set_linger (PosOskWidget *self, TactusGeom *g) + { +- GVariantBuilder builder; +- GActionGroup *group = gtk_widget_get_action_group (GTK_WIDGET (self), "win"); +- GdkRectangle rect; +- +- get_popup_pos (key, &rect); +- g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE); +- g_variant_builder_add_value (&builder, g_variant_new ("i", rect.x)); +- g_variant_builder_add_value (&builder, g_variant_new ("i", rect.y)); +- g_action_group_activate_action (group, "menu", g_variant_builder_end (&builder)); +- pos_osk_key_set_pressed (key, FALSE); ++ g_clear_handle_id (&self->linger_id, g_source_remove); ++ self->linger = g; ++ self->linger_id = g_timeout_add_once (LINGER_MS, on_linger_timeout, self); + } + +- ++/* What follows a key that typed something: Shift lets go, the number page goes back */ + static void +-pos_osk_widget_key_release_action (PosOskWidget *self, PosOskKey *key) ++tactus_after_key (PosOskWidget *self, TactusTouch *t, const char *symbol, PosOskWidgetLayer typed_on) + { +- switch (pos_osk_key_get_use (key)) { +- case POS_OSK_KEY_USE_TOGGLE: +- switch_layer (self, key); +- break; ++ TactusTouch *shift = tactus_held (self, TACTUS_TOUCH_SHIFT, t); ++ TactusTouch *sym = tactus_held (self, TACTUS_TOUCH_SYM, t); + +- case POS_OSK_KEY_USE_KEY: +- pos_indicator_popup_hide (self->indicator_popup, FALSE); +- G_GNUC_FALLTHROUGH; +- case POS_OSK_KEY_USE_DELETE: +- pos_osk_widget_set_key_pressed (self, self->current, FALSE); +- g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, pos_osk_key_get_symbol (key)); +- g_signal_emit (self, signals[OSK_KEY_UP], 0, pos_osk_key_get_symbol (key)); +- switch_layer (self, key); +- break; ++ self->shift_override = FALSE; ++ if (shift) ++ shift->chord_used = TRUE; ++ if (sym) ++ sym->chord_used = TRUE; + +- case POS_OSK_KEY_USE_MENU: +- pos_osk_widget_show_menu (self, key); +- break; +- default: +- g_assert_not_reached (); +- } ++ if (tactus_is_letters (typed_on)) { ++ if (!shift && tactus_is_letters (self->layer)) ++ tactus_set_layer (self, tactus_letters_layer (self)); ++ } else { ++ gboolean back = (t && t->return_to_letters) || ++ (!sym && (g_strcmp0 (symbol, " ") == 0 || g_strcmp0 (symbol, "'") == 0)); + +- self->current = NULL; ++ if (back && !tactus_is_letters (self->layer)) ++ tactus_set_layer (self, tactus_letters_layer (self)); ++ } + } + + +-static gboolean +-pos_osk_widget_button_release_event (GtkWidget *widget, GdkEventButton *event) ++static void ++tactus_commit_key (PosOskWidget *self, TactusTouch *t) + { +- PosOskWidget *self = POS_OSK_WIDGET (widget); +- PosOskKey *key = NULL; ++ TactusGeom *g = t->geom; ++ PosOskWidgetLayer typed_on = self->layer; ++ g_autofree char *symbol = NULL; + +- g_debug ("Button release: %f, %f, button: %d, state: %d", +- event->x, event->y, event->button, event->state); ++ g_return_if_fail (g && g->key); + +- key_repeat_cancel (self); +- pos_osk_widget_set_mode (self, POS_OSK_WIDGET_MODE_KEYBOARD); ++ symbol = g_strdup (pos_osk_key_get_symbol (g->key)); + +- if (event->button != 1) +- return GDK_EVENT_PROPAGATE; ++ /* Where in its key the finger was, for the typing engine */ ++ self->tap_valid = FALSE; ++ if (g->role == TACTUS_ROLE_CHAR) { ++ PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_current_layer (self); ++ double px = t->moved_off ? t->x : t->x0; ++ double py = t->moved_off ? t->y : t->y0; + +- /* Already cancelled */ +- if (self->current == NULL) +- return GDK_EVENT_PROPAGATE; ++ if (layer->key_width > 0.0 && self->pitch > 0.0) { ++ self->tap_dx = (px - (g->vx + g->vw / 2)) / layer->key_width; ++ self->tap_dy = (py - (g->vy + g->vh / 2)) / self->pitch; ++ self->tap_valid = TRUE; ++ } ++ } + +- key = pos_osk_widget_locate_key (self, event->x, event->y); +- g_return_val_if_fail (key != NULL, GDK_EVENT_PROPAGATE); ++ tactus_set_linger (self, g); + +- pos_osk_widget_key_release_action (self, key); ++ g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, symbol); ++ g_signal_emit (self, signals[OSK_KEY_UP], 0, symbol); ++ self->tap_valid = FALSE; + +- return GDK_EVENT_STOP; ++ tactus_after_key (self, t, symbol, typed_on); + } + ++/* ++ * The row of accented letters of a held key ++ */ + + static void +-pos_osk_widget_cancel_press (PosOskWidget *self) ++tactus_popup_close (PosOskWidget *self) + { +- if (self->current == NULL) ++ if (!self->popup.active) + return; + +- key_repeat_cancel (self); +- +- pos_osk_widget_set_key_pressed (self, self->current, FALSE); +- g_signal_emit (self, signals[OSK_KEY_CANCELLED], 0, pos_osk_key_get_symbol (self->current)); +- self->current = NULL; +- +- pos_indicator_popup_hide (self->indicator_popup, TRUE); ++ self->popup.active = FALSE; ++ self->popup.touch = NULL; ++ g_clear_pointer (&self->popup.options, g_ptr_array_unref); ++ g_signal_emit (self, signals[OSK_POPOVER_HIDDEN], 0); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + + +-static gboolean +-pos_osk_widget_touch_event (GtkWidget *widget, GdkEventTouch *event) ++static void ++tactus_popup_open (PosOskWidget *self, TactusTouch *t) + { +- PosOskWidget *self = POS_OSK_WIDGET (widget); ++ PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_current_layer (self); ++ TactusGeom *g = t->geom; ++ GStrv alts = pos_osk_key_get_symbols (g->key); ++ const char *base = pos_osk_key_get_symbol (g->key); ++ double cell = layer->key_width; ++ double key_cx = g->vx + g->vw / 2; ++ double room = self->width - 2 * self->inset; ++ int n_alts, total, right_room, left_room, n_right, n_left, base_idx; ++ const char **options; + +- g_debug ("Touch event: seq: %p (%f, %f), type: %d", +- event->sequence, +- event->x, +- event->y, +- event->type); +- +- if (event->type == GDK_TOUCH_BEGIN) { +- if (self->current) { +- key_repeat_cancel (self); +- pos_osk_widget_set_mode (self, POS_OSK_WIDGET_MODE_KEYBOARD); +- pos_osk_widget_key_release_action (self, self->current); +- } ++ /* No clear room above the keys to show them in */ ++ if (self->overhang <= 0.0) ++ return; ++ if (alts == NULL || alts[0] == NULL || cell <= 0.0) ++ return; + +- self->sequence = event->sequence; +- pos_osk_widget_key_press (self, event->x, event->y); +- return GDK_EVENT_STOP; ++ n_alts = g_strv_length (alts); ++ total = n_alts + 1; ++ if (total * cell > room) ++ cell = room / total; ++ ++ /* The letter itself stays over its key; the others go to the side with more ++ * room first, the likeliest nearest, and what doesn't fit there goes to the ++ * other side */ ++ right_room = MAX (0, (int) floor ((self->width - self->inset - (key_cx + cell / 2)) / cell + 0.01)); ++ left_room = MAX (0, (int) floor ((key_cx - cell / 2 - self->inset) / cell + 0.01)); ++ if (key_cx < self->width / 2.0) { ++ n_right = MIN (n_alts, right_room); ++ n_left = n_alts - n_right; ++ } else { ++ n_left = MIN (n_alts, left_room); ++ n_right = n_alts - n_left; + } ++ base_idx = n_left; + +- if (event->sequence != self->sequence) +- return GDK_EVENT_PROPAGATE; +- +- if (event->type == GDK_TOUCH_END || event->type == GDK_TOUCH_CANCEL) { +- if (self->current) { +- key_repeat_cancel (self); +- pos_osk_widget_set_mode (self, POS_OSK_WIDGET_MODE_KEYBOARD); +- pos_osk_widget_key_release_action (self, self->current); +- } +- } else if (event->type == GDK_TOUCH_UPDATE) { +- PosOskKey *key; +- +- if (!self->current) +- return GDK_EVENT_PROPAGATE; +- +- key = pos_osk_widget_locate_key (self, event->x, event->y); +- if (self->current && key != self->current) { +- gboolean accept = !!(self->features & PHOSH_OSK_FEATURE_KEY_DRAG); +- +- g_debug ("Crossed key boundary, %s", accept ? "accepting" : "canceling"); +- if (accept) { +- /* Handle current key */ +- pos_osk_widget_key_release_action (self, self->current); +- /* Make the new key current */ +- pos_osk_widget_key_press_action (self, key); +- return GDK_EVENT_STOP; +- } else { +- pos_osk_widget_cancel_press (self); +- } ++ options = g_new0 (const char *, total); ++ options[base_idx] = base; ++ for (int i = 0; i < n_alts; i++) { ++ if (key_cx < self->width / 2.0) { ++ if (i < n_right) ++ options[base_idx + 1 + i] = alts[i]; ++ else ++ options[base_idx - 1 - (i - n_right)] = alts[i]; ++ } else { ++ if (i < n_left) ++ options[base_idx - 1 - i] = alts[i]; ++ else ++ options[base_idx + 1 + (i - n_left)] = alts[i]; + } +- return GDK_EVENT_PROPAGATE; + } + +- return GDK_EVENT_STOP; ++ g_clear_pointer (&self->popup.options, g_ptr_array_unref); ++ self->popup.options = g_ptr_array_new_with_free_func (g_free); ++ for (int i = 0; i < total; i++) ++ g_ptr_array_add (self->popup.options, g_strdup (options[i])); ++ g_free (options); ++ ++ self->popup.cell = cell; ++ self->popup.w = total * cell; ++ self->popup.x = key_cx - cell / 2 - base_idx * cell; ++ self->popup.x = CLAMP (self->popup.x, self->inset, MAX (self->inset, self->width - self->inset - self->popup.w)); ++ self->popup.h = PT_POPUP_H * self->vs; ++ self->popup.y = MAX (1.0, g->vy - PT_POPUP_GAP * self->vs - self->popup.h); ++ self->popup.selected = base_idx; ++ self->popup.touch = t; ++ self->popup.active = TRUE; ++ ++ g_signal_emit (self, signals[OSK_POPOVER_SHOWN], 0, alts); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + + +-static gboolean +-pos_osk_widget_motion_notify_event (GtkWidget *widget, GdkEventMotion *event) ++static void ++tactus_popup_track (PosOskWidget *self, double x) + { +- PosOskWidget *self = POS_OSK_WIDGET (widget); +- PosOskKey *key; +- +- if ((event->state & GDK_BUTTON1_MASK) == 0) +- return GDK_EVENT_PROPAGATE; ++ int idx = floor ((x - self->popup.x) / self->popup.cell); + +- key = pos_osk_widget_locate_key (self, event->x, event->y); +- if (self->current && key != self->current) { +- gboolean accept = !!(self->features & PHOSH_OSK_FEATURE_KEY_DRAG); +- +- g_debug ("Crossed key boundary, %s", accept ? "accepting" : "canceling"); +- if (accept) { +- /* Handle current key */ +- pos_osk_widget_key_release_action (self, self->current); +- /* Make the new key current */ +- pos_osk_widget_key_press_action (self, key); +- return GDK_EVENT_STOP; +- } else { +- pos_osk_widget_cancel_press (self); +- } +- } ++ idx = CLAMP (idx, 0, (int) self->popup.options->len - 1); ++ if (idx == self->popup.selected) ++ return; + +- return GDK_EVENT_PROPAGATE; ++ self->popup.selected = idx; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + + + static void +-on_symbol_selected (PosOskWidget *self, const char *symbol) ++tactus_popup_commit (PosOskWidget *self) + { +- g_debug ("Selected '%s' from popover", symbol); ++ TactusTouch *t = self->popup.touch; ++ PosOskWidgetLayer typed_on = self->layer; ++ g_autofree char *symbol = NULL; + +- g_signal_emit (self, signals[OSK_KEY_DOWN], 0, symbol); ++ symbol = g_strdup (g_ptr_array_index (self->popup.options, self->popup.selected)); ++ ++ self->tap_valid = FALSE; + g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, symbol); + g_signal_emit (self, signals[OSK_KEY_UP], 0, symbol); +- g_clear_pointer (&self->char_popup, phosh_cp_widget_destroy); ++ tactus_popup_close (self); ++ ++ tactus_after_key (self, t, symbol, typed_on); + } + ++/* ++ * The space bar, held, moves the cursor ++ */ + + static void +-on_popover_closed (PosOskWidget *self) ++tactus_cursor_begin (PosOskWidget *self, TactusTouch *t) + { +- g_debug ("Closed symbol popover"); +- g_signal_emit (self, signals[OSK_POPOVER_HIDDEN], 0); ++ self->cursor_touch = t; ++ self->cursor_x = t->x; ++ self->cursor_y = t->y; ++ /* A tick: the keyboard is a touch pad now */ ++ g_signal_emit (self, signals[OSK_KEY_DOWN], 0, NULL); ++ pos_osk_widget_set_mode (self, POS_OSK_WIDGET_MODE_CURSOR); + } + + + static void +-on_long_pressed (GtkGestureLongPress *gesture, double x, double y, gpointer user_data) ++tactus_cursor_move (PosOskWidget *self, double x, double y) + { +- PosOskWidget *self = POS_OSK_WIDGET (user_data); +- PosOskKey *key = pos_osk_widget_locate_key (self, x, y); +- GStrv symbols = NULL; +- GdkRectangle rect = { 0 }; ++ while (x - self->cursor_x >= CURSOR_STEP_X) { ++ self->cursor_x += CURSOR_STEP_X; ++ g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, POS_OSK_SYMBOL_RIGHT); ++ } ++ while (self->cursor_x - x >= CURSOR_STEP_X) { ++ self->cursor_x -= CURSOR_STEP_X; ++ g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, POS_OSK_SYMBOL_LEFT); ++ } ++ while (y - self->cursor_y >= CURSOR_STEP_Y) { ++ self->cursor_y += CURSOR_STEP_Y; ++ g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, POS_OSK_SYMBOL_DOWN); ++ } ++ while (self->cursor_y - y >= CURSOR_STEP_Y) { ++ self->cursor_y -= CURSOR_STEP_Y; ++ g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, POS_OSK_SYMBOL_UP); ++ } ++} + +- g_debug ("Long press '%s'", pos_osk_key_get_label (key) ?: pos_osk_key_get_symbol (key)); + +- if (g_strcmp0 (pos_osk_key_get_symbol (key), POS_OSK_SYMBOL_SPACE) == 0) { +- key_repeat_cancel (self); +- /* Remember the key we want to untoggle when mode ends */ +- self->space = key; +- pos_osk_widget_set_mode (self, POS_OSK_WIDGET_MODE_CURSOR); +- return; +- } ++static void ++tactus_cursor_end (PosOskWidget *self) ++{ ++ self->cursor_touch = NULL; ++ pos_osk_widget_set_mode (self, POS_OSK_WIDGET_MODE_KEYBOARD); ++} + +- if (pos_osk_key_get_use (key) == POS_OSK_KEY_USE_TOGGLE && +- pos_osk_key_get_layer (key) == POS_OSK_WIDGET_LAYER_CAPS) { +- g_debug ("Enabling caps lock"); +- set_caps_lock (self, TRUE); +- pos_osk_widget_cancel_press (self); +- return; +- } ++/* ++ * Fingers ++ */ + +- symbols = pos_osk_key_get_symbols (key); +- if (symbols == NULL || symbols[0] == NULL) +- return; ++static gboolean ++on_long_press (gpointer data) ++{ ++ TactusTouch *t = data; ++ PosOskWidget *self = t->widget; + +- pos_osk_widget_cancel_press (self); +- g_clear_pointer (&self->char_popup, phosh_cp_widget_destroy); +- self->char_popup = GTK_WIDGET (pos_char_popup_new (GTK_WIDGET (self), symbols)); ++ t->long_id = 0; ++ if (!t->active || t->consumed || t->geom == NULL || t->kind != TACTUS_TOUCH_KEY) ++ return G_SOURCE_REMOVE; ++ if (self->popup.active || self->cursor_touch) ++ return G_SOURCE_REMOVE; + +- get_popup_pos (key, &rect); +- gtk_popover_set_pointing_to (GTK_POPOVER (self->char_popup), &rect); ++ if (t->geom->role == TACTUS_ROLE_SPACE) ++ tactus_cursor_begin (self, t); ++ else if (t->geom->role == TACTUS_ROLE_CHAR) ++ tactus_popup_open (self, t); + +- g_signal_connect_object (self->char_popup, "selected", +- G_CALLBACK (on_symbol_selected), +- self, +- G_CONNECT_SWAPPED); +- g_signal_connect_object (self->char_popup, "closed", +- G_CALLBACK (on_popover_closed), +- self, +- G_CONNECT_SWAPPED); +- gtk_popover_popup (GTK_POPOVER (self->char_popup)); +- g_signal_emit (self, signals[OSK_POPOVER_SHOWN], 0, symbols); ++ return G_SOURCE_REMOVE; + } + +- ++/* Holding the space bar moves the cursor; holding a letter that has them shows its accents */ + static void +-render_outline (cairo_t *cr, GtkStyleContext *context, const GdkRectangle *box) ++tactus_arm_long_press (PosOskWidget *self, TactusTouch *t, gboolean space_too) + { +- GtkBorder margin, border; +- double x, y, width, height; ++ g_clear_handle_id (&t->long_id, g_source_remove); + +- gtk_style_context_get_margin (context, GTK_STATE_FLAG_NORMAL, &margin); +- gtk_style_context_get_border (context, GTK_STATE_FLAG_NORMAL, &border); ++ if (t->geom == NULL || t->geom->key == NULL) ++ return; + +- x = margin.left + border.left; +- y = margin.top + border.top; +- width = box->width - x - margin.right - border.right; +- height = box->height - y - margin.bottom - border.bottom; ++ if (t->geom->role == TACTUS_ROLE_SPACE) { ++ if (!space_too) ++ return; ++ } else if (t->geom->role == TACTUS_ROLE_CHAR) { ++ GStrv alts = pos_osk_key_get_symbols (t->geom->key); + +- gtk_render_background (context, cr, x, y, width, height); +- gtk_render_frame (context, cr, x, y, width, height); ++ if (alts == NULL || alts[0] == NULL) ++ return; ++ } else { ++ return; ++ } ++ ++ t->long_id = g_timeout_add (LONG_PRESS_MS, on_long_press, t); ++ g_source_set_name_by_id (t->long_id, "[pos-osk-widget] long press"); + } + + +-#if !PANGO_VERSION_CHECK (1, 50, 0) +-G_DEFINE_AUTOPTR_CLEANUP_FUNC (PangoLayout, g_object_unref) +-G_DEFINE_AUTOPTR_CLEANUP_FUNC (PangoFontDescription, pango_font_description_free) +-#endif ++static TactusTouch * ++tactus_find_touch (PosOskWidget *self, GdkEventSequence *seq) ++{ ++ for (int i = 0; i < MAX_TOUCHES; i++) { ++ if (self->touches[i].active && self->touches[i].seq == seq) ++ return &self->touches[i]; ++ } ++ return NULL; ++} + + + static void +-render_label (cairo_t *cr, GtkStyleContext *context, const char *label, const GdkRectangle *box) ++tactus_touch_begin (PosOskWidget *self, GdkEventSequence *seq, double x, double y) + { +- g_autoptr (PangoLayout) layout = pango_cairo_create_layout (cr); +- g_autoptr (PangoFontDescription) font = NULL; +- PangoRectangle extents = { 0, }; +- GdkRGBA color = {0}; +- GtkStateFlags state; ++ TactusTouch *t = NULL; ++ TactusGeom *g; ++ const char *symbol; + +- cairo_save (cr); ++ /* One finger chooses an accent or moves the cursor: others wait */ ++ if (self->popup.active || self->cursor_touch) ++ return; ++ /* The same finger can't come down twice */ ++ if (tactus_find_touch (self, seq)) ++ return; + +- state = gtk_style_context_get_state (context); +- gtk_style_context_get (context, state, "font", &font, NULL); +- pango_layout_set_font_description (layout, font); +- +- pango_layout_set_text (layout, label, -1); +- pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); +- +- pango_layout_set_width (layout, PANGO_SCALE * box->width); +- pango_layout_get_extents (layout, NULL, &extents); +- +- cairo_move_to (cr, +- 0.0, +- 0.5 * (box->height - (double)extents.height / PANGO_SCALE)); +- gtk_style_context_get_color (context, state, &color); +- +- cairo_set_source_rgba (cr, +- color.red, +- color.green, +- color.blue, +- color.alpha); +- pango_cairo_show_layout (cr, layout); ++ if (tactus_hit_test (self, x, y) == NULL) ++ return; + +- cairo_restore (cr); +-} ++ /* A key another finger still holds is typed first */ ++ for (int i = 0; i < MAX_TOUCHES; i++) { ++ TactusTouch *o = &self->touches[i]; + ++ if (o->active && !o->consumed && o->kind == TACTUS_TOUCH_KEY) { ++ g_clear_handle_id (&o->long_id, g_source_remove); ++ if (o->geom) ++ tactus_commit_key (self, o); ++ o->consumed = TRUE; ++ } ++ } + +-static void +-render_hint (cairo_t *cr, GtkStyleContext *context, const char *hint, const GdkRectangle *box) +-{ +- g_autoptr (PangoLayout) layout = pango_cairo_create_layout (cr); +- g_autoptr (PangoFontDescription) font = NULL; +- PangoRectangle extents = { 0, }; +- GdkRGBA color = {0}; +- GtkStateFlags state = GTK_STATE_FLAG_INSENSITIVE; +- int x, y, size; +- GtkBorder margin, border; +- /* TODO: this should come from css */ +- int hint_margin = 1; +- float hint_scale = 0.75; ++ /* That may have changed the page */ ++ g = tactus_hit_test (self, x, y); ++ if (g == NULL) ++ return; + +- cairo_save (cr); ++ for (int i = 0; i < MAX_TOUCHES; i++) { ++ if (!self->touches[i].active) { ++ t = &self->touches[i]; ++ break; ++ } ++ } ++ if (t == NULL) ++ return; + +- gtk_style_context_set_state (context, state); +- gtk_style_context_add_class (context, "hint"); ++ *t = (TactusTouch) { ++ .widget = self, .active = TRUE, .seq = seq, ++ .geom = g, .down_role = g->role, ++ .x0 = x, .y0 = y, .x = x, .y = y, ++ .layer_before = self->layer, ++ }; ++ ++ switch (g->role) { ++ case TACTUS_ROLE_SHIFT: ++ t->kind = TACTUS_TOUCH_SHIFT; ++ g_signal_emit (self, signals[OSK_KEY_DOWN], 0, NULL); ++ /* Held, it gives capitals for as long as it is held */ ++ tactus_set_layer (self, POS_OSK_WIDGET_LAYER_CAPS); ++ break; ++ case TACTUS_ROLE_SYM2: ++ t->kind = TACTUS_TOUCH_SYM2; ++ g_signal_emit (self, signals[OSK_KEY_DOWN], 0, NULL); ++ tactus_set_layer (self, self->layer == POS_OSK_WIDGET_LAYER_SYMBOLS ? ++ POS_OSK_WIDGET_LAYER_SYMBOLS2 : POS_OSK_WIDGET_LAYER_SYMBOLS); ++ break; ++ case TACTUS_ROLE_SYM: ++ t->kind = TACTUS_TOUCH_SYM; ++ g_signal_emit (self, signals[OSK_KEY_DOWN], 0, NULL); ++ /* The page changes as the finger comes down, so it can slide on to a key there */ ++ if (tactus_is_letters (self->layer)) { ++ tactus_set_layer (self, POS_OSK_WIDGET_LAYER_SYMBOLS); ++ } else { ++ self->shift_override = FALSE; ++ tactus_set_layer (self, tactus_letters_layer (self)); ++ } ++ break; ++ case TACTUS_ROLE_BACKSPACE: ++ t->kind = TACTUS_TOUCH_BACKSPACE; ++ /* Deletes as the finger comes down; the surface repeats it while it stays */ ++ g_signal_emit (self, signals[OSK_KEY_DOWN], 0, "KEY_BACKSPACE"); ++ g_signal_emit (self, signals[OSK_KEY_SYMBOL], 0, "KEY_BACKSPACE"); ++ break; ++ case TACTUS_ROLE_EMOJI: ++ case TACTUS_ROLE_MIC: ++ t->kind = TACTUS_TOUCH_STRIP; ++ g_signal_emit (self, signals[OSK_KEY_DOWN], 0, NULL); ++ break; ++ case TACTUS_ROLE_CHAR: ++ case TACTUS_ROLE_SPACE: ++ case TACTUS_ROLE_RETURN: ++ default: ++ t->kind = TACTUS_TOUCH_KEY; ++ symbol = pos_osk_key_get_symbol (g->key); ++ g_signal_emit (self, signals[OSK_KEY_DOWN], 0, symbol); ++ tactus_arm_long_press (self, t, TRUE); ++ break; ++ } + +- gtk_style_context_get (context, state, "font", &font, NULL); +- size = pango_font_description_get_size (font); +- pango_font_description_set_size (font, hint_scale * size); +- pango_layout_set_font_description (layout, font); +- +- pango_layout_set_text (layout, hint, -1); +- pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); +- +- gtk_style_context_get_margin (context, state, &margin); +- gtk_style_context_get_border (context, state, &border); +- +- pango_layout_get_extents (layout, NULL, &extents); +- +- x = box->width - border.left - margin.left - margin.right - border.right +- - (extents.width / PANGO_SCALE) - hint_margin; +- y = margin.top + border.top + hint_margin; +- +- gtk_style_context_get_color (context, state, &color); +- +- cairo_move_to (cr, x, y); +- cairo_set_source_rgba (cr, +- color.red, +- color.green, +- color.blue, +- color.alpha); +- pango_cairo_show_layout (cr, layout); ++ /* The page may have changed under the finger */ ++ if (t->geom && t->geom->row >= 0) ++ t->geom = tactus_hit_test (self, x, y); + +- cairo_restore (cr); +- gtk_style_context_remove_class (context, "hint"); +- gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + + + static void +-render_icon (cairo_t *cr, +- GtkStyleContext *context, +- GtkIconTheme *icon_theme, +- const char *icon, +- int icon_size, +- const GdkRectangle *box, +- int scale) ++tactus_touch_update (PosOskWidget *self, GdkEventSequence *seq, double x, double y) + { +- cairo_surface_t *surface; ++ TactusTouch *t = tactus_find_touch (self, seq); ++ TactusGeom *g; + +- g_autoptr (GtkIconInfo) icon_info = NULL; +- g_autoptr (GdkPixbuf) pixbuf = NULL; ++ if (t == NULL) ++ return; + +- icon_info = gtk_icon_theme_lookup_icon_for_scale (icon_theme, icon, icon_size, scale, 0); ++ t->x = x; ++ t->y = y; + +- pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, context, NULL, NULL); ++ if (self->popup.active && self->popup.touch == t) { ++ tactus_popup_track (self, x); ++ return; ++ } ++ if (self->cursor_touch == t) { ++ tactus_cursor_move (self, x, y); ++ return; ++ } ++ if (t->consumed) ++ return; + +- surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, scale, NULL); +- gtk_render_icon_surface (context, cr, surface, +- (box->width - icon_size) / 2, +- (box->height - icon_size) / 2); +- cairo_surface_destroy (surface); +-} ++ g = tactus_hit_test (self, x, y); ++ if (g == t->geom) ++ return; + ++ switch (t->kind) { ++ case TACTUS_TOUCH_KEY: ++ /* The finger slid to another key: that one is typed when it lifts */ ++ g_clear_handle_id (&t->long_id, g_source_remove); ++ t->moved_off = TRUE; ++ if (g && tactus_types (g->role)) { ++ t->geom = g; ++ tactus_arm_long_press (self, t, FALSE); ++ } else { ++ t->geom = NULL; ++ } ++ break; ++ case TACTUS_TOUCH_BACKSPACE: ++ if (t->geom) ++ g_signal_emit (self, signals[OSK_KEY_UP], 0, "KEY_BACKSPACE"); ++ t->geom = NULL; ++ break; ++ case TACTUS_TOUCH_SHIFT: ++ if (g && g->role == TACTUS_ROLE_CHAR) { ++ /* From Shift on to a letter: a capital, and Shift is done */ ++ t->kind = TACTUS_TOUCH_KEY; ++ t->moved_off = TRUE; ++ t->geom = g; ++ tactus_arm_long_press (self, t, FALSE); ++ } else { ++ t->geom = (g && g->role == TACTUS_ROLE_SHIFT) ? g : NULL; ++ } ++ break; ++ case TACTUS_TOUCH_SYM: ++ if (g && tactus_types (g->role)) { ++ /* From "123" on to a key: that one, and back to the letters */ ++ t->kind = TACTUS_TOUCH_KEY; ++ t->moved_off = TRUE; ++ t->return_to_letters = tactus_is_letters (t->layer_before); ++ t->geom = g; ++ tactus_arm_long_press (self, t, FALSE); ++ } else { ++ t->geom = (g && g->role == TACTUS_ROLE_SYM) ? g : NULL; ++ } ++ break; ++ case TACTUS_TOUCH_SYM2: ++ case TACTUS_TOUCH_STRIP: ++ default: ++ t->geom = (g && g->role == t->down_role) ? g : NULL; ++ break; ++ } + ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++/* Shift was let go */ + static void +-draw_key (PosOskWidget *self, PosOskKey *key, cairo_t *cr) ++tactus_shift_released (PosOskWidget *self, TactusTouch *t) + { +- GdkRGBA fg_color; +- GtkStateFlags state; +- const GdkRectangle *box; +- g_autofree char *style = NULL; +- g_autofree char *icon = NULL; +- g_autofree char *label = NULL; +- g_autofree char *symbol = NULL; +- gboolean pressed; +- double width; +- int scale; +- int icon_size; +- +- scale = gtk_widget_get_scale_factor (GTK_WIDGET (self)); +- state = gtk_style_context_get_state (self->key_context); +- gtk_style_context_get_color (self->key_context, state, &fg_color); ++ gint64 now = g_get_monotonic_time (); + +- g_object_get (key, "style", &style, "pressed", &pressed, "width", &width, +- "symbol", &symbol, "label", &label, "icon", &icon, NULL); ++ if (!tactus_is_letters (self->layer)) ++ return; + +- if (style) +- gtk_style_context_add_class (self->key_context, style); ++ if (t->chord_used) { ++ /* It was held for some capitals: back to small letters */ ++ self->shift_override = FALSE; ++ tactus_set_layer (self, self->caps_lock ? POS_OSK_WIDGET_LAYER_CAPS : POS_OSK_WIDGET_LAYER_NORMAL); ++ return; ++ } ++ if (t->geom == NULL) { ++ /* The finger slid away: as it was */ ++ tactus_set_layer (self, tactus_is_letters (t->layer_before) ? t->layer_before : self->layer); ++ return; ++ } + +- if (pressed) +- gtk_style_context_add_class (self->key_context, "pressed"); ++ if (self->caps_lock) { ++ self->caps_lock = FALSE; ++ self->shift_override = TRUE; ++ self->last_shift_tap = 0; ++ tactus_set_layer (self, POS_OSK_WIDGET_LAYER_NORMAL); ++ } else if (now - self->last_shift_tap < SHIFT_DOUBLE_TAP_US) { ++ /* Two quick taps lock the capitals */ ++ self->caps_lock = TRUE; ++ self->shift_override = FALSE; ++ self->last_shift_tap = 0; ++ tactus_set_layer (self, POS_OSK_WIDGET_LAYER_CAPS); ++ } else { ++ self->shift_override = TRUE; ++ self->last_shift_tap = now; ++ tactus_set_layer (self, t->layer_before == POS_OSK_WIDGET_LAYER_CAPS ? ++ POS_OSK_WIDGET_LAYER_NORMAL : POS_OSK_WIDGET_LAYER_CAPS); ++ } ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} + +- cairo_save (cr); + +- box = pos_osk_key_get_box (key); +- cairo_translate (cr, box->x, box->y); +- cairo_rectangle (cr, 0.0, 0.0, box->width, box->height); +- cairo_clip (cr); +- +- /* Scale icon by key scale */ +- icon_size = MIN (KEY_ICON_SIZE * (self->key_scale / 100.0), box->height / 2.0); +- +- render_outline (cr, self->key_context, box); +- +- if (self->mode == POS_OSK_WIDGET_MODE_KEYBOARD) { +- if (icon) { +- GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (self)); +- GtkIconTheme *icon_theme = gtk_icon_theme_get_for_screen (screen); ++static void ++tactus_touch_end (PosOskWidget *self, GdkEventSequence *seq, double x, double y, gboolean cancelled) ++{ ++ TactusTouch *t = tactus_find_touch (self, seq); + +- render_icon (cr, self->key_context, icon_theme, icon, icon_size, box, scale); +- } else { +- GStrv symbols = pos_osk_key_get_symbols (key); ++ if (t == NULL) ++ return; + +- render_label (cr, self->key_context, label ?: symbol, box); +- if (symbols) +- render_hint (cr, self->key_context, symbols[0], box); ++ if (!cancelled) { ++ t->x = x; ++ t->y = y; ++ } ++ g_clear_handle_id (&t->long_id, g_source_remove); ++ ++ if (self->popup.active && self->popup.touch == t) { ++ if (cancelled) ++ tactus_popup_close (self); ++ else ++ tactus_popup_commit (self); ++ } else if (self->cursor_touch == t) { ++ tactus_cursor_end (self); ++ } else if (t->consumed) { ++ /* typed already */ ++ } else if (cancelled) { ++ switch (t->kind) { ++ case TACTUS_TOUCH_KEY: ++ if (t->geom && t->geom->key) ++ g_signal_emit (self, signals[OSK_KEY_CANCELLED], 0, pos_osk_key_get_symbol (t->geom->key)); ++ break; ++ case TACTUS_TOUCH_BACKSPACE: ++ if (t->geom) ++ g_signal_emit (self, signals[OSK_KEY_CANCELLED], 0, "KEY_BACKSPACE"); ++ break; ++ case TACTUS_TOUCH_SHIFT: ++ if (tactus_is_letters (self->layer) && tactus_is_letters (t->layer_before)) ++ tactus_set_layer (self, t->layer_before); ++ break; ++ case TACTUS_TOUCH_SYM: ++ case TACTUS_TOUCH_SYM2: ++ case TACTUS_TOUCH_STRIP: ++ default: ++ break; ++ } ++ } else { ++ switch (t->kind) { ++ case TACTUS_TOUCH_KEY: ++ if (t->geom && t->geom->key) ++ tactus_commit_key (self, t); ++ break; ++ case TACTUS_TOUCH_BACKSPACE: ++ if (t->geom) ++ g_signal_emit (self, signals[OSK_KEY_UP], 0, "KEY_BACKSPACE"); ++ break; ++ case TACTUS_TOUCH_SHIFT: ++ tactus_shift_released (self, t); ++ break; ++ case TACTUS_TOUCH_SYM: ++ /* Held while keys were typed there: back to where it came from */ ++ if (t->chord_used) { ++ self->shift_override = FALSE; ++ tactus_set_layer (self, tactus_is_letters (t->layer_before) ? ++ tactus_letters_layer (self) : POS_OSK_WIDGET_LAYER_SYMBOLS); ++ } ++ break; ++ case TACTUS_TOUCH_STRIP: ++ if (t->geom) ++ g_signal_emit (self, signals[OSK_STRIP_KEY], 0, ++ t->geom->role == TACTUS_ROLE_EMOJI ? "emoji" : "mic"); ++ break; ++ case TACTUS_TOUCH_SYM2: ++ default: ++ break; + } + } + +- cairo_restore (cr); ++ t->active = FALSE; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} + +- if (style) +- gtk_style_context_remove_class (self->key_context, style); ++/** ++ * pos_osk_widget_cancel_touches: ++ * @self: The osk widget ++ * ++ * Forget every finger on the keyboard: nothing more is typed for them. ++ */ ++void ++pos_osk_widget_cancel_touches (PosOskWidget *self) ++{ ++ g_return_if_fail (POS_IS_OSK_WIDGET (self)); ++ ++ for (int i = 0; i < MAX_TOUCHES; i++) { ++ TactusTouch *t = &self->touches[i]; + +- if (pressed) +- gtk_style_context_remove_class (self->key_context, "pressed"); ++ if (t->active) ++ tactus_touch_end (self, t->seq, t->x, t->y, TRUE); ++ g_clear_handle_id (&t->long_id, g_source_remove); ++ } ++ g_clear_handle_id (&self->linger_id, g_source_remove); ++ self->linger = NULL; + } + + +-static void +-update_key_scale (PosOskWidget *self) ++static gboolean ++pos_osk_widget_touch_event (GtkWidget *widget, GdkEventTouch *event) + { +- g_autofree char *css = NULL; +- g_autoptr (GtkCssProvider) provider = gtk_css_provider_new (); +- GdkScreen *screen; +- int scale, scale_w, scale_h; ++ PosOskWidget *self = POS_OSK_WIDGET (widget); + +- scale_h = 100 * MAX (1.0, (double)self->height / POS_INPUT_SURFACE_DEFAULT_HEIGHT); /* in % */ +- scale_w = 100 * MAX (1.0, (double)self->width / MINIMUM_WIDTH); /* in % */ +- scale = MIN (scale_w, scale_h); ++ if (event->type == GDK_TOUCH_BEGIN) ++ tactus_touch_begin (self, event->sequence, event->x, event->y); ++ else if (event->type == GDK_TOUCH_UPDATE) ++ tactus_touch_update (self, event->sequence, event->x, event->y); ++ else if (event->type == GDK_TOUCH_END) ++ tactus_touch_end (self, event->sequence, event->x, event->y, FALSE); ++ else if (event->type == GDK_TOUCH_CANCEL) ++ tactus_touch_end (self, event->sequence, event->x, event->y, TRUE); ++ else ++ return GDK_EVENT_PROPAGATE; + +- /* Avoid pointless style updates */ +- if (self->key_scale == scale) +- return; +- self->key_scale = scale; ++ return GDK_EVENT_STOP; ++} + +- g_debug ("Scaling font scale to %d%% (w: %d, h: %d)", scale, scale_w, scale_h); + +- screen = gdk_screen_get_default (); +- if (self->css_provider) +- gtk_style_context_remove_provider_for_screen (screen, GTK_STYLE_PROVIDER (self->css_provider)); ++static gboolean ++pos_osk_widget_button_press_event (GtkWidget *widget, GdkEventButton *event) ++{ ++ PosOskWidget *self = POS_OSK_WIDGET (widget); + ++ /* Touches arrive as touches; what they also raise as a pointer is not for us */ ++ if (gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_STOP; ++ if (event->type != GDK_BUTTON_PRESS || event->button != 1) ++ return GDK_EVENT_PROPAGATE; + +- css = g_strdup_printf ("pos-key {" +- " font-size: %d%%;" +- "}", +- scale); +- gtk_css_provider_load_from_data (provider, css, -1, NULL); +- gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), +- GTK_STYLE_PROVIDER (provider), +- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1); +- g_set_object (&self->css_provider, provider); ++ tactus_touch_begin (self, POINTER_SEQUENCE, event->x, event->y); ++ return GDK_EVENT_STOP; + } + + +-static void +-pos_osk_widget_size_allocate (GtkWidget *widget, GdkRectangle *allocation) ++static gboolean ++pos_osk_widget_button_release_event (GtkWidget *widget, GdkEventButton *event) + { + PosOskWidget *self = POS_OSK_WIDGET (widget); + +- self->width = allocation->width; +- self->height = allocation->height; ++ if (gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_STOP; ++ if (event->button != 1) ++ return GDK_EVENT_PROPAGATE; + +- for (int l = 0; l <= POS_OSK_WIDGET_LAST_LAYER; l++) { +- PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_keyboard_layer (self, l); +- guint off_y; ++ tactus_touch_end (self, POINTER_SEQUENCE, event->x, event->y, FALSE); ++ return GDK_EVENT_STOP; ++} + +- layer->key_width = self->width / layer->width; +- layer->key_height = self->key_height; +- layer->offset_x = 0.5 * (self->width - (layer->width * layer->key_width)); +- off_y = self->height - (layer->n_rows * layer->key_height); + +- /* Precalc all key positions */ +- for (int r = 0; r < self->layout.n_rows; r++) { +- PosOskWidgetRow *row = pos_osk_widget_get_layer_row (self, l, r); +- double c = row->offset_x; ++static gboolean ++pos_osk_widget_motion_notify_event (GtkWidget *widget, GdkEventMotion *event) ++{ ++ PosOskWidget *self = POS_OSK_WIDGET (widget); + +- for (int k = 0; k < pos_osk_widget_row_get_num_keys (row); k++) { +- PosOskKey *key = pos_osk_widget_row_get_key (row, k); +- GdkRectangle box; ++ if (gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_STOP; ++ if ((event->state & GDK_BUTTON1_MASK) == 0) ++ return GDK_EVENT_PROPAGATE; + +- box.x = c * layer->key_width; +- box.y = off_y + r * layer->key_height; +- box.width = pos_osk_key_get_width (key) * layer->key_width; +- box.height = layer->key_height; +- pos_osk_key_set_box (key, &box); ++ tactus_touch_update (self, POINTER_SEQUENCE, event->x, event->y); ++ return GDK_EVENT_STOP; ++} + +- c += pos_osk_key_get_width (key); +- } ++/* ++ * Drawing ++ */ ++ ++static gboolean ++tactus_is_pressed (PosOskWidget *self, TactusGeom *g) ++{ ++ if (self->linger == g) ++ return TRUE; ++ ++ for (int i = 0; i < MAX_TOUCHES; i++) { ++ TactusTouch *t = &self->touches[i]; ++ ++ if (t->active && !t->consumed && t->geom == g) ++ return TRUE; ++ } ++ return FALSE; ++} ++ ++ ++static void ++tactus_draw_key (PosOskWidget *self, cairo_t *cr, TactusGeom *g) ++{ ++ const TactusTheme *theme = &self->theme; ++ gboolean pressed = tactus_is_pressed (self, g); ++ double radius = PT_KEY_RADIUS * self->vs; ++ double cx = g->vx + g->vw / 2, cy = g->vy + g->vh / 2; ++ const char *label; ++ ++ /* A soft edge under each key of a light keyboard */ ++ if (!theme->dark) { ++ tactus_rounded_rect (cr, g->vx, g->vy + 1.0, g->vw, g->vh, radius); ++ cairo_set_source_rgba (cr, 0, 0, 0, 0.06); ++ cairo_fill (cr); ++ } ++ tactus_rounded_rect (cr, g->vx, g->vy, g->vw, g->vh, radius); ++ tactus_set_source (cr, pressed ? &theme->key_pressed : &theme->key, 1.0); ++ cairo_fill (cr); ++ ++ /* As a touch pad the keys are blank */ ++ if (self->mode == POS_OSK_WIDGET_MODE_CURSOR) ++ return; ++ ++ switch (g->role) { ++ case TACTUS_ROLE_SHIFT: ++ tactus_set_source (cr, &theme->icon, 1.0); ++ tactus_icon_shift (cr, cx, cy, self->vs, ++ self->caps_lock ? TACTUS_SHIFT_LOCKED : ++ self->layer == POS_OSK_WIDGET_LAYER_CAPS ? TACTUS_SHIFT_ON : TACTUS_SHIFT_OFF); ++ break; ++ case TACTUS_ROLE_BACKSPACE: ++ tactus_set_source (cr, &theme->icon, 1.0); ++ tactus_icon_delete (cr, cx, cy, self->vs, FALSE, NULL); ++ break; ++ case TACTUS_ROLE_RETURN: ++ tactus_set_source (cr, &theme->icon, 1.0); ++ tactus_icon_return (cr, cx, cy, self->vs); ++ break; ++ case TACTUS_ROLE_SYM: ++ case TACTUS_ROLE_SYM2: ++ label = pos_osk_key_get_label (g->key); ++ if (label) ++ tactus_draw_label (cr, label, cx, cy - 1.0 * self->vs, PT_FONT_LABEL * self->vs, ++ WEIGHT_LABEL, TACTUS_BAND_CAP_HEIGHT, &theme->text); ++ break; ++ case TACTUS_ROLE_CHAR: ++ label = pos_osk_key_get_label (g->key) ?: pos_osk_key_get_symbol (g->key); ++ if (label == NULL) ++ break; ++ if (g_utf8_strlen (label, -1) > 1) { ++ tactus_draw_label (cr, label, cx, cy - 1.0 * self->vs, PT_FONT_LABEL * self->vs, ++ WEIGHT_LABEL, TACTUS_BAND_CAP_HEIGHT, &theme->text); ++ } else if (g_unichar_islower (g_utf8_get_char (label))) { ++ tactus_draw_label (cr, label, cx, cy, PT_FONT_LOWER * self->vs, ++ WEIGHT_LOWER, TACTUS_BAND_X_HEIGHT, &theme->text); ++ } else { ++ tactus_draw_label (cr, label, cx, cy - 1.5 * self->vs, PT_FONT_UPPER * self->vs, ++ WEIGHT_UPPER, TACTUS_BAND_CAP_HEIGHT, &theme->text); + } ++ break; ++ case TACTUS_ROLE_SPACE: ++ case TACTUS_ROLE_EMOJI: ++ case TACTUS_ROLE_MIC: ++ default: ++ break; + } ++} + +- /* On key size changes we adjust the font and icon size */ +- update_key_scale (self); + +- GTK_WIDGET_CLASS (pos_osk_widget_parent_class)->size_allocate (widget, allocation); ++static void ++tactus_draw_popup (PosOskWidget *self, cairo_t *cr) ++{ ++ const TactusTheme *theme = &self->theme; ++ double radius = PT_POPUP_RADIUS * self->vs; ++ double pad = 2.0 * self->vs; ++ double x = self->popup.x - pad, w = self->popup.w + 2 * pad; ++ double y = self->popup.y, h = self->popup.h; ++ ++ /* a soft shadow, then the row itself */ ++ for (int i = 3; i >= 1; i--) { ++ tactus_rounded_rect (cr, x - i, y - i + 1.5, w + 2 * i, h + 2 * i, radius + i); ++ cairo_set_source_rgba (cr, 0, 0, 0, theme->dark ? 0.10 : 0.035); ++ cairo_fill (cr); ++ } ++ tactus_rounded_rect (cr, x, y, w, h, radius); ++ tactus_set_source (cr, &theme->popup, 1.0); ++ cairo_fill (cr); ++ ++ for (int i = 0; i < self->popup.options->len; i++) { ++ const char *option = g_ptr_array_index (self->popup.options, i); ++ double cx = self->popup.x + (i + 0.5) * self->popup.cell; ++ double cy = y + h / 2; ++ gboolean lower = g_unichar_islower (g_utf8_get_char (option)); ++ ++ if (i == self->popup.selected) { ++ double sw = MIN (PT_POPUP_SEL_W * self->vs, self->popup.cell - 1.0); ++ double sh = PT_POPUP_SEL_H * self->vs; ++ ++ tactus_rounded_rect (cr, cx - sw / 2, cy - sh / 2, sw, sh, 10.0 * self->vs); ++ tactus_set_source (cr, &theme->popup_selected, 1.0); ++ cairo_fill (cr); ++ } ++ tactus_draw_label (cr, option, cx, lower ? cy : cy - 1.5 * self->vs, ++ (lower ? PT_FONT_LOWER : PT_FONT_UPPER) * self->vs, ++ lower ? WEIGHT_LOWER : WEIGHT_UPPER, ++ lower ? TACTUS_BAND_X_HEIGHT : TACTUS_BAND_CAP_HEIGHT, &theme->text); ++ } + } + + +@@ -1587,48 +1860,76 @@ + pos_osk_widget_draw (GtkWidget *widget, cairo_t *cr) + { + PosOskWidget *self = POS_OSK_WIDGET (widget); +- GtkStyleContext *context; + PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_current_layer (self); ++ const TactusTheme *theme = &self->theme; ++ ++ if (self->width <= 0) ++ return FALSE; + + cairo_save (cr); + +- context = gtk_widget_get_style_context (widget); +- gtk_render_background (context, cr, 0, 0, self->width, self->height); ++ /* The panel; what is above it (room for a row of accents) stays clear */ ++ if (self->flat_top || self->attached) ++ cairo_rectangle (cr, 0, self->overhang, self->width, self->height - self->overhang + 1.0); ++ else ++ tactus_panel_path (cr, 0, self->overhang, self->width, self->height - self->overhang + 1.0, self->vs); ++ tactus_set_source (cr, &theme->panel, 1.0); ++ cairo_fill (cr); + +- cairo_translate (cr, layer->offset_x, 0); ++ for (int r = 0; r < layer->n_rows; r++) { ++ PosOskWidgetRow *row = &layer->rows[r]; + +- for (int r = 0; r < self->layout.n_rows; r++) { +- PosOskWidgetRow *row = pos_osk_widget_get_row (self, r); ++ if (row->geoms == NULL) ++ continue; ++ for (int k = 0; k < row->geoms->len; k++) ++ tactus_draw_key (self, cr, &g_array_index (row->geoms, TactusGeom, k)); ++ } + +- for (int k = 0; k < pos_osk_widget_row_get_num_keys (row); k++) { +- PosOskKey *key = pos_osk_widget_row_get_key (row, k); ++ tactus_icon_emoji (cr, self->emoji.vx + self->emoji.vw / 2, self->emoji.vy + self->emoji.vh / 2, ++ self->vs, theme, tactus_is_pressed (self, &self->emoji) ? 0.45 : 1.0); ++ tactus_icon_mic (cr, self->mic.vx + self->mic.vw / 2, self->mic.vy + self->mic.vh / 2, ++ self->vs, theme, tactus_is_pressed (self, &self->mic) ? 0.45 : 1.0); + +- draw_key (self, key, cr); +- } +- } ++ if (self->popup.active) ++ tactus_draw_popup (self, cr); + + cairo_restore (cr); + return FALSE; + } + ++/* ++ * Size ++ */ + + static void +-pos_osk_widget_finalize (GObject *object) ++on_resize_idle (gpointer data) + { +- PosOskWidget *self = POS_OSK_WIDGET (object); ++ PosOskWidget *self = POS_OSK_WIDGET (data); + +- g_clear_handle_id (&self->repeat_id, g_source_remove); +- pos_osk_widget_layout_free (&self->layout); +- g_clear_object (&self->long_press); +- g_clear_pointer (&self->name, g_free); +- g_clear_pointer (&self->display_name, g_free); +- g_clear_pointer (&self->lang, g_free); +- g_clear_pointer (&self->region, g_free); +- g_clear_pointer (&self->layout_id, g_free); +- g_ptr_array_free (self->symbols, TRUE); +- g_clear_pointer (&self->event_history, g_array_unref); ++ self->resize_id = 0; ++ gtk_widget_queue_resize (GTK_WIDGET (self)); ++} + +- G_OBJECT_CLASS (pos_osk_widget_parent_class)->finalize (object); ++ ++static void ++pos_osk_widget_size_allocate (GtkWidget *widget, GdkRectangle *allocation) ++{ ++ PosOskWidget *self = POS_OSK_WIDGET (widget); ++ gboolean width_changed = self->width != allocation->width; ++ ++ self->width = allocation->width; ++ self->height = allocation->height; ++ self->extra = 0.0; ++ self->extra = MAX (allocation->height - tactus_height_for_width (self, self->width), 0); ++ ++ tactus_layout_keys (self); ++ ++ /* The height follows the width: ask again when that changed */ ++ if (width_changed && self->resize_id == 0 && ++ tactus_height_for_width (self, self->width) != allocation->height) ++ self->resize_id = g_idle_add_once (on_resize_idle, self); ++ ++ GTK_WIDGET_CLASS (pos_osk_widget_parent_class)->size_allocate (widget, allocation); + } + + +@@ -1639,10 +1940,11 @@ + { + PosOskWidget *self = POS_OSK_WIDGET (widget); + +- *minimum_height = *natural_height = self->key_height * self->layout.n_rows; +- ++ *minimum_height = *natural_height = ++ tactus_height_for_width (self, self->width > 0 ? self->width : MINIMUM_WIDTH); + } + ++ + static void + pos_osk_widget_get_preferred_width (GtkWidget *widget, + gint *minimum_width, +@@ -1651,6 +1953,96 @@ + *minimum_width = *natural_width = MINIMUM_WIDTH; + } + ++/* ++ * The look follows the applied Omarchy theme (tactus_theme_init), else the ++ * desktop's light or dark setting ++ */ ++ ++static void ++on_color_scheme_changed (PosOskWidget *self) ++{ ++ g_autofree char *scheme = g_settings_get_string (self->interface_settings, "color-scheme"); ++ ++ tactus_theme_init (&self->theme, g_strcmp0 (scheme, "prefer-dark") == 0); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++ ++static void ++pos_osk_widget_set_property (GObject *object, ++ guint property_id, ++ const GValue *value, ++ GParamSpec *pspec) ++{ ++ PosOskWidget *self = POS_OSK_WIDGET (object); ++ ++ switch (property_id) { ++ case PROP_FEATURES: ++ self->features = g_value_get_flags (value); ++ break; ++ case PROP_KEY_HEIGHT: ++ pos_osk_widget_set_key_height (self, g_value_get_uint (value)); ++ break; ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); ++ break; ++ } ++} ++ ++ ++static void ++pos_osk_widget_get_property (GObject *object, ++ guint property_id, ++ GValue *value, ++ GParamSpec *pspec) ++{ ++ PosOskWidget *self = POS_OSK_WIDGET (object); ++ ++ switch (property_id) { ++ case PROP_LAYER: ++ g_value_set_enum (value, self->layer); ++ break; ++ case PROP_NAME: ++ g_value_set_string (value, self->name); ++ break; ++ case PROP_MODE: ++ g_value_set_enum (value, self->mode); ++ break; ++ case PROP_FEATURES: ++ g_value_set_flags (value, self->features); ++ break; ++ case PROP_KEY_HEIGHT: ++ g_value_set_uint (value, self->key_height); ++ break; ++ default: ++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); ++ break; ++ } ++} ++ ++ ++static void ++pos_osk_widget_finalize (GObject *object) ++{ ++ PosOskWidget *self = POS_OSK_WIDGET (object); ++ ++ for (int i = 0; i < MAX_TOUCHES; i++) ++ g_clear_handle_id (&self->touches[i].long_id, g_source_remove); ++ g_clear_handle_id (&self->linger_id, g_source_remove); ++ g_clear_handle_id (&self->resize_id, g_source_remove); ++ g_clear_pointer (&self->popup.options, g_ptr_array_unref); ++ g_clear_object (&self->interface_settings); ++ pos_osk_widget_layout_free (&self->layout); ++ g_clear_pointer (&self->name, g_free); ++ g_clear_pointer (&self->display_name, g_free); ++ g_clear_pointer (&self->lang, g_free); ++ g_clear_pointer (&self->region, g_free); ++ g_clear_pointer (&self->layout_id, g_free); ++ g_ptr_array_free (self->symbols, TRUE); ++ ++ G_OBJECT_CLASS (pos_osk_widget_parent_class)->finalize (object); ++} ++ + + static void + pos_osk_widget_class_init (PosOskWidgetClass *klass) +@@ -1716,7 +2108,7 @@ + /** + * PosOskWidget:key-height + * +- * The height of a single, regular key on the keyboard ++ * Kept for the surface's sake: the keyboard takes its height from its width. + */ + props[PROP_KEY_HEIGHT] = + g_param_spec_uint ("key-height", "", "", +@@ -1798,89 +2190,48 @@ + 0, NULL, NULL, NULL, + G_TYPE_NONE, + 0); ++ /** ++ * PosOskWidget::strip-key ++ * @self: The osk widget ++ * @which: `emoji` or `mic` ++ * ++ * One of the two keys under the keyboard was tapped. ++ */ ++ signals[OSK_STRIP_KEY] = g_signal_new ("strip-key", ++ G_TYPE_FROM_CLASS (klass), ++ G_SIGNAL_RUN_LAST, ++ 0, NULL, NULL, NULL, ++ G_TYPE_NONE, ++ 1, ++ G_TYPE_STRING); + + gtk_widget_class_set_css_name (widget_class, "pos-osk-widget"); + } + + +-/* Keys are no GObject types so make up a type for CSS */ +-static GType +-key_type (void) +-{ +- static GType type = 0; +- +- if (!type) { +- GTypeInfo info = {0}; +- info.class_size = sizeof (GtkWidgetClass); +- info.instance_size = sizeof (GtkWidget); +- +- type = g_type_register_static (GTK_TYPE_WIDGET, "pos-key", &info, G_TYPE_FLAG_ABSTRACT); +- } +- +- return type; +-} +- +- + static void + pos_osk_widget_init (PosOskWidget *self) + { +- const char *purpose_class = "normal"; +- g_autoptr (GtkWidgetPath) path = NULL; +- GtkStyleContext *key_context; +- GtkStyleContext *context; +- +- self->key_scale = 100; /* percent */ + self->mode = POS_OSK_WIDGET_MODE_KEYBOARD; + self->layer = POS_OSK_WIDGET_LAYER_NORMAL; + self->symbols = g_ptr_array_new (); + self->key_height = POS_OSK_WIDGET_KEY_HEIGHT_DEFAULT; +- self->event_history = g_array_new (FALSE, FALSE, sizeof (EventHistoryRecord)); ++ self->with_overhang = TRUE; ++ tactus_update_metrics (self, MINIMUM_WIDTH); + +- gtk_widget_add_events (GTK_WIDGET (self), GDK_BUTTON_PRESS_MASK | ++ gtk_widget_add_events (GTK_WIDGET (self), ++ GDK_TOUCH_MASK | ++ GDK_BUTTON_PRESS_MASK | + GDK_BUTTON_RELEASE_MASK | ++ GDK_BUTTON_MOTION_MASK | + GDK_POINTER_MOTION_MASK); + +- context = gtk_widget_get_style_context (GTK_WIDGET (self)); +- /* Create a style context for the buttons */ +- path = gtk_widget_path_new (); +- /* TODO: until keys are widgets */ +- gtk_widget_path_append_type (path, key_type ()); +- gtk_widget_path_iter_add_class (path, -1, purpose_class); +- +- key_context = gtk_style_context_new (); +- gtk_style_context_set_path (key_context, path); +- gtk_style_context_set_parent (key_context, context); +- gtk_style_context_set_state (key_context, GTK_STATE_FLAG_NORMAL); +- gtk_style_context_set_screen (key_context, gdk_screen_get_default ()); +- +- self->key_context = key_context; +- +- self->layer = POS_OSK_WIDGET_LAYER_NORMAL; +- +- self->long_press = g_object_new (GTK_TYPE_GESTURE_LONG_PRESS, +- "widget", self, +- "propagation-phase", GTK_PHASE_CAPTURE, +- "delay-factor", 0.5, +- NULL); +- g_signal_connect (self->long_press, "pressed", G_CALLBACK (on_long_pressed), self); +- +- self->cursor_drag = g_object_new (GTK_TYPE_GESTURE_DRAG, +- "widget", self, +- "propagation-phase", GTK_PHASE_CAPTURE, +- NULL); +- g_object_connect (self->cursor_drag, +- "swapped-signal::drag-begin", +- G_CALLBACK (on_drag_begin), self, +- "swapped-signal::drag-update", +- G_CALLBACK (on_drag_update), self, +- "swapped-signal::drag-end", +- G_CALLBACK (on_drag_end), self, +- "swapped-signal::cancel", +- G_CALLBACK (on_drag_cancel), self, +- NULL); +- +- self->indicator_popup = pos_indicator_popup_new (); +- gtk_popover_set_relative_to (GTK_POPOVER (self->indicator_popup), GTK_WIDGET (self)); ++ self->interface_settings = g_settings_new ("org.gnome.desktop.interface"); ++ g_signal_connect_swapped (self->interface_settings, "changed::color-scheme", ++ G_CALLBACK (on_color_scheme_changed), self); ++ /* and the applied Omarchy theme's, when Omarchy applies another */ ++ tactus_theme_watch (self, G_CALLBACK (on_color_scheme_changed)); ++ on_color_scheme_changed (self); + } + + +@@ -1901,37 +2252,27 @@ + return self->layer; + } + +- ++/** ++ * pos_osk_widget_set_layer: ++ * @self: The osk widget ++ * @layer: The page to show ++ * ++ * Show a page of the keyboard. Asking for the small letters also lets go of ++ * a locked Shift, and still shows capitals where a sentence starts. ++ */ + void + pos_osk_widget_set_layer (PosOskWidget *self, PosOskWidgetLayer layer) + { + g_return_if_fail (POS_IS_OSK_WIDGET (self)); + +- if (layer == self->layer) +- return; +- +- self->layer = layer; ++ self->shift_override = FALSE; ++ if (layer == POS_OSK_WIDGET_LAYER_NORMAL) { ++ self->caps_lock = FALSE; ++ layer = tactus_letters_layer (self); ++ } + +- g_object_notify_by_pspec (G_OBJECT (self), props[PROP_LAYER]); ++ tactus_set_layer (self, layer); + gtk_widget_queue_draw (GTK_WIDGET (self)); +- +- /* Update key state for rendering */ +- for (int r = 0; r < self->layout.n_rows; r++) { +- PosOskWidgetRow *row = pos_osk_widget_get_row (self, r); +- +- for (int k = 0; k < pos_osk_widget_row_get_num_keys (row); k++) { +- PosOskKey *akey = g_ptr_array_index (row->keys, k); +- gboolean pressed; +- +- if (pos_osk_key_get_use (akey) != POS_OSK_KEY_USE_TOGGLE) +- continue; +- +- pressed = (self->layer == pos_osk_key_get_layer (akey)) || +- (pos_osk_widget_get_layer (self) == POS_OSK_WIDGET_LAYER_SYMBOLS2); +- +- pos_osk_widget_set_key_pressed (self, akey, pressed); +- } +- } + } + + +@@ -2000,14 +2341,9 @@ + if (g_strcmp0 (self->name, name) == 0) + return TRUE; + +- if (self->layout.name) +- pos_osk_widget_layout_free (&self->layout); +- g_free (self->name); +- self->name = g_strdup (name); +- g_free (self->display_name); +- self->display_name = g_strdup (display_name); +- g_free (self->layout_id); +- self->layout_id = g_strdup (layout_id); ++ /* The keys the fingers are on are about to go */ ++ pos_osk_widget_cancel_touches (self); ++ tactus_popup_close (self); + + if (!gm_str_is_null_or_empty (variant)) + path = g_strdup_printf ("/mobi/phosh/stevia/layouts/%s+%s.json", layout, variant); +@@ -2018,6 +2354,14 @@ + if (data == NULL) + return FALSE; + ++ pos_osk_widget_layout_free (&self->layout); ++ g_free (self->name); ++ self->name = g_strdup (name); ++ g_free (self->display_name); ++ self->display_name = g_strdup (display_name); ++ g_free (self->layout_id); ++ self->layout_id = g_strdup (layout_id); ++ + g_ptr_array_free (self->symbols, TRUE); + self->symbols = g_ptr_array_new (); + +@@ -2026,6 +2370,14 @@ + + parse_lang (self, layout, variant); + ++ /* A terminal's keys sit right under its bar of shortcuts */ ++ self->with_overhang = g_strcmp0 (layout, "terminal") != 0; ++ self->layer = POS_OSK_WIDGET_LAYER_NORMAL; ++ self->caps_lock = FALSE; ++ tactus_update_metrics (self, self->width > 0 ? self->width : MINIMUM_WIDTH); ++ tactus_layout_keys (self); ++ gtk_widget_queue_resize (GTK_WIDGET (self)); ++ + g_object_notify_by_pspec (G_OBJECT (self), props[PROP_NAME]); + + return ret; +@@ -2071,15 +2423,7 @@ + g_debug ("Switching to mode: %d", mode); + self->mode = mode; + +- if (mode == POS_OSK_WIDGET_MODE_CURSOR) { +- self->current = NULL; +- } else if (self->space) { +- pos_osk_widget_set_key_pressed (self, self->space, FALSE); +- self->space = NULL; +- } +- + g_object_notify_by_pspec (G_OBJECT (self), props[PROP_MODE]); +- self->last_x = self->last_y = 0.0; + gtk_widget_queue_draw (GTK_WIDGET (self)); + } + +@@ -2172,7 +2516,7 @@ + g_object_notify_by_pspec (G_OBJECT (self), props[PROP_FEATURES]); + } + +- ++/* Kept for the surface's sake: the keyboard takes its height from its width */ + void + pos_osk_widget_set_key_height (PosOskWidget *self, guint key_height) + { +@@ -2181,8 +2525,6 @@ + + self->key_height = key_height; + g_object_notify_by_pspec (G_OBJECT (self), props[PROP_KEY_HEIGHT]); +- +- gtk_widget_queue_resize (GTK_WIDGET (self)); + } + + +@@ -2193,3 +2535,166 @@ + + return self->layout.n_rows; + } ++ ++/** ++ * pos_osk_widget_get_overhang: ++ * @self: The osk widget ++ * ++ * The height, in pixels, of the clear band above the keyboard's panel where ++ * a row of accented letters is drawn. Touches there are not the keyboard's. ++ */ ++guint ++pos_osk_widget_get_overhang (PosOskWidget *self) ++{ ++ g_return_val_if_fail (POS_IS_OSK_WIDGET (self), 0); ++ ++ return self->overhang; ++} ++ ++ ++/** ++ * pos_osk_widget_get_panel_height: ++ * @self: The osk widget ++ * ++ * The height, in pixels, of the keyboard's panel: its keys and the strip under them. ++ */ ++guint ++pos_osk_widget_get_panel_height (PosOskWidget *self) ++{ ++ int natural; ++ ++ g_return_val_if_fail (POS_IS_OSK_WIDGET (self), 0); ++ ++ natural = tactus_height_for_width (self, self->width > 0 ? self->width : MINIMUM_WIDTH); ++ return MAX (natural - (int) (self->overhang - self->extra), 0); ++} ++ ++/** ++ * pos_osk_widget_get_panel_under: ++ * @self: The osk widget ++ * ++ * How far, in pixels, the applications' windows are to reach under the top of ++ * the panel, so that what shows past its round corners is theirs. ++ */ ++guint ++pos_osk_widget_get_panel_under (PosOskWidget *self) ++{ ++ g_return_val_if_fail (POS_IS_OSK_WIDGET (self), 0); ++ ++ return tactus_panel_under (self->vs > 0.0 ? self->vs : MINIMUM_WIDTH / PT_WIDTH); ++} ++ ++/** ++ * pos_osk_widget_set_flat_top: ++ * @self: The osk widget ++ * @flat: Whether something sits right on top of the panel, so that its corners there are square ++ */ ++void ++pos_osk_widget_set_flat_top (PosOskWidget *self, gboolean flat) ++{ ++ g_return_if_fail (POS_IS_OSK_WIDGET (self)); ++ ++ if (self->flat_top == !!flat) ++ return; ++ self->flat_top = !!flat; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++ ++/** ++ * pos_osk_widget_set_attached: ++ * @self: The osk widget ++ * @attached: Whether something sits right on top of the keys (the search for emoji) ++ * ++ * Attached, the keyboard keeps no clear room above its keys and its panel's ++ * top is square. ++ */ ++void ++pos_osk_widget_set_attached (PosOskWidget *self, gboolean attached) ++{ ++ g_return_if_fail (POS_IS_OSK_WIDGET (self)); ++ ++ if (self->attached == !!attached) ++ return; ++ self->attached = !!attached; ++ pos_osk_widget_cancel_touches (self); ++ tactus_update_metrics (self, self->width > 0 ? self->width : MINIMUM_WIDTH); ++ gtk_widget_queue_resize (GTK_WIDGET (self)); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++ ++gboolean ++pos_osk_widget_get_caps_lock (PosOskWidget *self) ++{ ++ g_return_val_if_fail (POS_IS_OSK_WIDGET (self), FALSE); ++ ++ return self->caps_lock; ++} ++ ++/** ++ * pos_osk_widget_set_autoshift: ++ * @self: The osk widget ++ * @wanted: Whether the next letter starts a sentence ++ * @context_changed: Whether the text or the cursor changed since the last call ++ * ++ * Tell the keyboard whether the next letter should be a capital. A Shift the ++ * owner set by hand stays until the text changes. ++ */ ++void ++pos_osk_widget_set_autoshift (PosOskWidget *self, gboolean wanted, gboolean context_changed) ++{ ++ g_return_if_fail (POS_IS_OSK_WIDGET (self)); ++ ++ self->autoshift = wanted; ++ if (context_changed) ++ self->shift_override = FALSE; ++ ++ if (!tactus_is_letters (self->layer) || self->shift_override || self->caps_lock) ++ return; ++ if (tactus_held (self, TACTUS_TOUCH_SHIFT, NULL)) ++ return; ++ ++ tactus_set_layer (self, tactus_letters_layer (self)); ++} ++ ++/** ++ * pos_osk_widget_take_tap: ++ * @self: The osk widget ++ * @dx:(out): How far right of its key's centre the finger was, in key widths ++ * @dy:(out): How far below, in row heights ++ * ++ * Where the finger landed for the letter being typed right now. Valid only ++ * while `key-symbol` is emitted for a letter key. ++ * ++ * Returns: %TRUE if there is such a place ++ */ ++gboolean ++pos_osk_widget_take_tap (PosOskWidget *self, double *dx, double *dy) ++{ ++ g_return_val_if_fail (POS_IS_OSK_WIDGET (self), FALSE); ++ ++ if (!self->tap_valid) ++ return FALSE; ++ ++ *dx = self->tap_dx; ++ *dy = self->tap_dy; ++ return TRUE; ++} ++ ++/** ++ * pos_osk_widget_set_touch_bias: ++ * @self: The osk widget ++ * @dx: How far right of where they aim this owner's fingers land, in key widths ++ * @dy: How far below, in row heights ++ * ++ * Touches are read as that much further left and up. ++ */ ++void ++pos_osk_widget_set_touch_bias (PosOskWidget *self, double dx, double dy) ++{ ++ g_return_if_fail (POS_IS_OSK_WIDGET (self)); ++ ++ self->bias_x = CLAMP (dx, -0.25, 0.25); ++ self->bias_y = CLAMP (dy, -0.35, 0.35); ++} diff --git a/packages/tactus/patches/0005-emoji-page-large-emoji-that-slide-and-a-search.patch b/packages/tactus/patches/0005-emoji-page-large-emoji-that-slide-and-a-search.patch new file mode 100644 index 000000000..645a8d612 --- /dev/null +++ b/packages/tactus/patches/0005-emoji-page-large-emoji-that-slide-and-a-search.patch @@ -0,0 +1,2432 @@ +Subject: emoji-picker: large emoji that slide sideways, and a search + +Replaces the emoji chooser (Stevia's, after GTK's: a scrolled grid of small +buttons made for a pointer) with a page drawn for fingers: a search field +across the top, four rows of large emoji that slide sideways with a flick +(the ones used lately first, then kind after kind), a row with a sign for +each kind and the delete key, and "ABC" and the microphone at the bottom. A +tap on a sign jumps to its kind, a long press on an emoji offers its skin +tones. Searching puts the field and a row of what was found on top of the +letters, which then type into the search. An emoji the font has no picture +for is left out, on the page and in the search. + +The emoji and what is known about them still come from PosEmojiDb; the ones +used lately are kept in the same setting as before. +--- +--- a/src/pos-emoji-picker.h ++++ b/src/pos-emoji-picker.h +@@ -14,8 +14,19 @@ + + #define POS_TYPE_EMOJI_PICKER (pos_emoji_picker_get_type ()) + +-G_DECLARE_FINAL_TYPE (PosEmojiPicker, pos_emoji_picker, POS, EMOJI_PICKER, GtkBox) ++G_DECLARE_FINAL_TYPE (PosEmojiPicker, pos_emoji_picker, POS, EMOJI_PICKER, GtkDrawingArea) + + GtkWidget *pos_emoji_picker_new (void); + ++/* What sits on top of the letters while emoji are searched for by name */ ++#define POS_TYPE_EMOJI_SEARCH (pos_emoji_search_get_type ()) ++ ++G_DECLARE_FINAL_TYPE (PosEmojiSearch, pos_emoji_search, POS, EMOJI_SEARCH, GtkDrawingArea) ++ ++GtkWidget *pos_emoji_search_new (void); ++void pos_emoji_search_reset (PosEmojiSearch *self); ++void pos_emoji_search_type (PosEmojiSearch *self, const char *text); ++void pos_emoji_search_backspace (PosEmojiSearch *self); ++const char *pos_emoji_search_get_query (PosEmojiSearch *self); ++ + G_END_DECLS +--- a/src/pos-emoji-picker.c ++++ b/src/pos-emoji-picker.c +@@ -1,5 +1,6 @@ + /* + * Copyright (C) 2023 The Phosh Developers ++ * 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + * +@@ -9,632 +10,1220 @@ + * gtkemojichooser.c: An Emoji chooser widget + * Copyright 2017, Red Hat, Inc. + * Author: Matthias Clasen ++ * ++ * The emoji page of Tactus. ++ * ++ * A search field across the top, the emoji in four rows that slide sideways ++ * (the ones used lately first, then kind after kind), under them a row with ++ * a sign for each kind and the delete key, and at the bottom "ABC" to go ++ * back to the letters and the microphone. The measures are in points of a ++ * 390 pt wide phone, as the letters' are; all of it is drawn here from ++ * scratch. ++ * ++ * The emoji and what is known about them come from PosEmojiDb, as in the ++ * emoji chooser this replaces (Stevia's, after GTK's). + */ + ++#define G_LOG_DOMAIN "pos-emoji-picker" ++ ++#include "tactus-draw.h" + #include "pos-emoji-db.h" + #include "pos-emoji-picker.h" + +-#define BOX_SPACE 6 ++#include ++ ++/* Measures in points of a screen 390 points wide; see pos-osk-widget.c */ ++#define PT_WIDTH 390.0 ++#define PT_WIDTH_MAX 430.0 ++#define PT_WIDE_FROM 560.0 ++#define MINIMUM_WIDTH 360 ++ ++#define E_FIELD_TOP 10.0 ++#define E_FIELD_H 40.0 ++#define E_FIELD_SIDE 9.3 ++#define E_FIELD_ICON_X 30.0 /* the magnifier's middle, from the left */ ++#define E_FIELD_TEXT_X 46.3 /* where the words start */ ++#define E_FIELD_FONT 17.0 ++#define E_ROWS 4 ++#define E_ROWS_WIDE 3 ++#define E_ROW0 38.5 /* the first row's middle, below the field */ ++#define E_PITCH 53.2 /* from one emoji to the next, across and down */ ++#define E_COL0 32.2 /* the first column's middle */ ++#define E_EMOJI 34.6 /* how wide a face is */ ++#define E_GAP 0.0 /* between two kinds: none, they run on */ ++#define E_BAR_BELOW 44.8 /* the signs' middle, below the last row's */ ++#define E_BAR_X0 28.3 /* the first sign's middle */ ++#define E_BAR_END 68.2 /* the last sign's middle, from the right */ ++#define E_BAR_DISC 14.65 /* the disc behind the sign of the kind in view */ ++#define E_DELETE_X 24.5 /* the delete key's middle, from the right */ ++#define E_STRIP 87.4 /* from the signs' middle to the bottom */ ++#define E_STRIP_WIDE 58.0 ++#define E_ABC_X 42.7 ++#define E_ABC_BELOW 61.2 /* below the signs' middle */ ++#define E_ABC_FONT 16.5 ++#define E_MIC_X 42.7 /* from the right */ ++#define E_MIC_BELOW 53.9 ++#define E_TONES_PITCH 46.0 ++#define E_TONES_H 58.0 ++ ++#define MAX_RECENT 28 ++#define DRAG_START 8.0 /* pixels a finger moves before the emoji slide */ ++#define LONG_PRESS_MS 400 ++#define DELETE_DELAY_MS 350 ++#define DELETE_EVERY_MS 90 ++/* How fast a flick dies away: what is left of the speed after a millisecond */ ++#define GLIDE_KEEP 0.998 ++#define GLIDE_STOP 12.0 /* pixels a second */ ++#define JUMP_MS 260.0 ++#define N_TONES 6 + + enum { + EMOJI_PICKED, + DELETE_LAST, + DONE, ++ MIC, ++ SEARCH, + LAST_SIGNAL + }; +- + static int signals[LAST_SIGNAL]; + + typedef struct { +- GtkWidget *box; +- GtkWidget *button; +- int group; +- gunichar label; +- gboolean empty; +-} EmojiSection; ++ char *text; /* as drawn and typed */ ++ GVariant *data; /* what the emoji data says of it: (ausasu), or (auss) for one used lately */ ++ gunichar modifier; /* the skin tone it was used with */ ++ gboolean tones; /* it comes in skin tones */ ++} EmojiItem; ++ ++typedef enum { ++ E_ZONE_NONE, ++ E_ZONE_FIELD, ++ E_ZONE_GRID, ++ E_ZONE_BAR, ++ E_ZONE_DELETE, ++ E_ZONE_ABC, ++ E_ZONE_MIC, ++} EmojiZone; + + /** + * PosEmojiPicker + * +- * A widget to pick emojis from. ++ * The emoji page: a widget to pick emojis from. + */ + struct _PosEmojiPicker { +- GtkBox parent_instance; ++ GtkDrawingArea parent_instance; + +- GtkWidget *scrolled_window; ++ GSettings *settings; ++ GSettings *interface_settings; ++ TactusTheme theme; ++ ++ /* The emoji, by kind */ ++ GPtrArray *kinds[TACTUS_N_KINDS]; ++ GVariant *data; ++ GVariantIter *iter; ++ guint populate_id; ++ double usual_width; /* of a face, to tell a missing emoji by */ ++ ++ /* Where things are, for the width at hand */ ++ int width, height; ++ double s, vs; ++ int rows; ++ double pitch, col0, row0, bar_y, abc_y, mic_y; ++ double kind_x[TACTUS_N_KINDS + 1]; /* where each kind starts in the row of emoji */ ++ double content; ++ double font_size; ++ double font_for; /* the scale font_size was worked out for */ ++ ++ /* Sliding */ ++ double scroll; ++ double speed; /* pixels a second, gliding */ ++ gboolean jumping; ++ double jump_from, jump_to; ++ gint64 jump_start; ++ gint64 last_frame; ++ guint tick_id; ++ ++ /* The finger */ ++ gboolean touching; ++ GdkEventSequence *sequence; ++ EmojiZone zone; ++ double x0, y0, x, y; ++ double scroll0; ++ gboolean sliding; ++ EmojiItem *pressed; ++ TactusKind pressed_kind; ++ gint64 track_time[4]; ++ double track_x[4]; ++ guint long_id; ++ guint delete_id; ++ ++ /* The skin tones of a held emoji */ ++ gboolean tones_open; ++ EmojiItem *tones_item; ++ double tones_x, tones_y; /* the box's left and top */ ++ int tones_at; ++}; + +- int emoji_max_width; ++G_DEFINE_TYPE (PosEmojiPicker, pos_emoji_picker, GTK_TYPE_DRAWING_AREA) + +- GtkScrolledWindow *scrolled_sections; ++/* ++ * The emoji ++ */ + +- EmojiSection recent; +- EmojiSection people; +- EmojiSection body; +- EmojiSection nature; +- EmojiSection food; +- EmojiSection travel; +- EmojiSection activities; +- EmojiSection objects; +- EmojiSection symbols; +- EmojiSection flags; +- +- GtkGesture *recent_long_press; +- GtkGesture *recent_multi_press; +- GtkGesture *people_long_press; +- GtkGesture *people_multi_press; +- GtkGesture *body_long_press; +- GtkGesture *body_multi_press; +- +- GVariant *data; +- GtkWidget *box; +- GVariantIter *iter; +- guint populate_idle; ++static void ++emoji_item_free (gpointer data) ++{ ++ EmojiItem *item = data; + +- GSettings *settings; +-}; ++ g_free (item->text); ++ g_clear_pointer (&item->data, g_variant_unref); ++ g_free (item); ++} + +-G_DEFINE_TYPE (PosEmojiPicker, pos_emoji_picker, GTK_TYPE_BOX) ++/* The emoji as text, with a skin tone where it takes one */ ++static char * ++emoji_text (GVariant *data, gunichar modifier, gboolean *tones) ++{ ++ g_autoptr (GVariant) codes = g_variant_get_child_value (data, 0); ++ GString *text = g_string_new (NULL); + +-static void +-on_done_clicked (PosEmojiPicker *self) ++ if (tones) ++ *tones = FALSE; ++ for (gsize i = 0; i < g_variant_n_children (codes); i++) { ++ gunichar code; ++ ++ g_variant_get_child (codes, i, "u", &code); ++ if (code == 0) { ++ if (tones) ++ *tones = TRUE; ++ code = modifier; ++ } ++ if (code != 0) ++ g_string_append_unichar (text, code); ++ } ++ /* U+FE0F asks for the picture, not the sign */ ++ g_string_append_unichar (text, 0xFE0F); ++ return g_string_free (text, FALSE); ++} ++ ++/* An emoji the font has no picture for comes out as several, or as a box. ++ * @usual_width keeps the width of a face between calls (start it at 0). */ ++static gboolean ++emoji_drawable (GtkWidget *widget, double *usual_width, const char *text) + { +- g_signal_emit (self, signals[DONE], 0); ++ g_autoptr (PangoLayout) layout = gtk_widget_create_pango_layout (widget, text); ++ PangoFontDescription *font = pango_font_description_from_string ("Noto Color Emoji 20"); ++ PangoRectangle rect; ++ ++ pango_layout_set_font_description (layout, font); ++ pango_font_description_free (font); ++ pango_layout_get_extents (layout, &rect, NULL); ++ ++ if (*usual_width <= 0.0) { ++ g_autoptr (PangoLayout) face = gtk_widget_create_pango_layout (widget, "\360\237\231\202"); ++ PangoFontDescription *same = pango_font_description_from_string ("Noto Color Emoji 20"); ++ PangoRectangle usual; ++ ++ pango_layout_set_font_description (face, same); ++ pango_font_description_free (same); ++ pango_layout_get_extents (face, &usual, NULL); ++ *usual_width = MAX (usual.width, 1); ++ } ++ ++ return pango_layout_get_unknown_glyphs_count (layout) == 0 && rect.width < 1.5 * *usual_width; + } + +-static void +-on_backspace_clicked (PosEmojiPicker *self) ++ ++static TactusKind ++kind_of_group (guint group) + { +- g_signal_emit (self, signals[DELETE_LAST], 0); ++ switch (group) { ++ case 0: ++ case 1: ++ return TACTUS_KIND_SMILEYS; ++ case 3: ++ return TACTUS_KIND_ANIMALS; ++ case 4: ++ return TACTUS_KIND_FOOD; ++ case 5: ++ return TACTUS_KIND_TRAVEL; ++ case 6: ++ return TACTUS_KIND_ACTIVITY; ++ case 7: ++ return TACTUS_KIND_OBJECTS; ++ case 8: ++ return TACTUS_KIND_SYMBOLS; ++ case 9: ++ return TACTUS_KIND_FLAGS; ++ default: ++ return TACTUS_N_KINDS; ++ } + } + ++static void emoji_layout (PosEmojiPicker *self); + +-static void +-scroll_to_section (GtkButton *button, +- gpointer data) ++/* Take the emoji in from the data, a few milliseconds' worth at a time */ ++static gboolean ++populate (gpointer user_data) + { +- EmojiSection *section = data; +- PosEmojiPicker *self; +- GtkAdjustment *adj; +- GtkAllocation alloc = { 0 }; +- double value; ++ PosEmojiPicker *self = POS_EMOJI_PICKER (user_data); ++ gint64 start = g_get_monotonic_time (); ++ GVariant *item; + +- self = POS_EMOJI_PICKER (gtk_widget_get_ancestor (GTK_WIDGET (button), POS_TYPE_EMOJI_PICKER)); ++ if (self->data == NULL) ++ self->data = g_variant_ref (pos_emoji_db_get_data (pos_emoji_db_get_default ())); ++ if (self->iter == NULL) ++ self->iter = g_variant_iter_new (self->data); + +- adj = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (self->scrolled_window)); ++ while ((item = g_variant_iter_next_value (self->iter))) { ++ TactusKind kind; ++ guint group; ++ gboolean tones; ++ g_autofree char *text = NULL; + +- gtk_widget_get_allocation (section->box, &alloc); ++ g_variant_get_child (item, 3, "u", &group); ++ kind = kind_of_group (group); ++ text = emoji_text (item, 0, &tones); ++ if (kind != TACTUS_N_KINDS && emoji_drawable (GTK_WIDGET (self), &self->usual_width, text)) { ++ EmojiItem *emoji = g_new0 (EmojiItem, 1); ++ ++ emoji->text = g_steal_pointer (&text); ++ emoji->data = g_variant_ref (item); ++ emoji->tones = tones; ++ g_ptr_array_add (self->kinds[kind], emoji); ++ } ++ g_variant_unref (item); + +- if (gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL) { +- double width = gtk_widget_get_allocated_width (GTK_WIDGET (self)); +- value = alloc.x + alloc.width - width; +- } else { +- value = alloc.x - BOX_SPACE; ++ if (g_get_monotonic_time () > start + 6000) { ++ emoji_layout (self); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++ return G_SOURCE_CONTINUE; ++ } + } + +- gtk_adjustment_set_value (adj, value); ++ g_clear_pointer (&self->iter, g_variant_iter_free); ++ self->populate_id = 0; ++ emoji_layout (self); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++ return G_SOURCE_REMOVE; + } + +- ++/* The emoji used lately, the latest first */ + static void +-add_emoji (GtkWidget *box, +- gboolean prepend, +- GVariant *item, +- gunichar modifier, +- PosEmojiPicker *self); +- +-#define MAX_RECENT (4 * 4) +- +-static void +-populate_recent_section (PosEmojiPicker *self) ++load_recent (PosEmojiPicker *self) + { +- g_autoptr (GVariant) variant = NULL; +- GVariant *item; ++ g_autoptr (GVariant) variant = g_settings_get_value (self->settings, "recent-emoji"); + GVariantIter iter; +- gboolean empty = TRUE; ++ GVariant *entry; + +- variant = g_settings_get_value (self->settings, "recent-emoji"); ++ g_ptr_array_set_size (self->kinds[TACTUS_KIND_RECENT], 0); + g_variant_iter_init (&iter, variant); +- while ((item = g_variant_iter_next_value (&iter))) { +- g_autoptr (GVariant) emoji_data = NULL; +- gunichar modifier; +- +- emoji_data = g_variant_get_child_value (item, 0); +- g_variant_get_child (item, 1, "u", &modifier); +- add_emoji (self->recent.box, FALSE, emoji_data, modifier, self); +- g_variant_unref (item); +- empty = FALSE; +- } ++ while ((entry = g_variant_iter_next_value (&iter))) { ++ EmojiItem *emoji = g_new0 (EmojiItem, 1); + +- gtk_widget_set_visible (self->recent.box, !empty); +- gtk_widget_set_sensitive (self->recent.button, !empty); ++ emoji->data = g_variant_get_child_value (entry, 0); ++ g_variant_get_child (entry, 1, "u", &emoji->modifier); ++ emoji->text = emoji_text (emoji->data, emoji->modifier, &emoji->tones); ++ /* one the font has lost its picture for stays in the settings, unseen */ ++ if (emoji_drawable (GTK_WIDGET (self), &self->usual_width, emoji->text)) ++ g_ptr_array_add (self->kinds[TACTUS_KIND_RECENT], emoji); ++ else ++ emoji_item_free (emoji); ++ g_variant_unref (entry); ++ if (self->kinds[TACTUS_KIND_RECENT]->len >= MAX_RECENT) ++ break; ++ } + } + ++/* What is kept of an emoji used lately: its codes and its name */ + static GVariant * +-get_recent_emoji_data (GtkWidget *widget) ++recent_data (EmojiItem *emoji) + { +- GVariant *emoji_data = g_object_get_data (G_OBJECT (widget), "emoji-data"); +- GVariantIter *codes_iter; +- GVariantIter *keywords_iter; +- GVariantBuilder codes_builder; +- const char *name; +- const char *shortname; +- guint code; +- guint group; +- +- g_assert (emoji_data); +- +- if (g_variant_is_of_type (emoji_data, G_VARIANT_TYPE ("(auss)"))) +- return emoji_data; ++ GVariantBuilder codes; ++ GVariantIter *codes_iter = NULL, *keywords_iter = NULL; ++ const char *name = ""; ++ guint code, group; + +- g_variant_get (emoji_data, "(au&sasu)", &codes_iter, &name, &keywords_iter, &group); ++ if (g_variant_is_of_type (emoji->data, G_VARIANT_TYPE ("(auss)"))) ++ return g_variant_ref (emoji->data); + +- g_variant_builder_init (&codes_builder, G_VARIANT_TYPE ("au")); ++ g_variant_get (emoji->data, "(au&sasu)", &codes_iter, &name, &keywords_iter, &group); ++ g_variant_builder_init (&codes, G_VARIANT_TYPE ("au")); + while (g_variant_iter_loop (codes_iter, "u", &code)) +- g_variant_builder_add (&codes_builder, "u", code); +- ++ g_variant_builder_add (&codes, "u", code); + g_variant_iter_free (codes_iter); + g_variant_iter_free (keywords_iter); + +- shortname = ""; +- +- return g_variant_new ("(auss)", &codes_builder, name, shortname); ++ return g_variant_ref_sink (g_variant_new ("(auss)", &codes, name, "")); + } + ++/* Note an emoji as used: it leads the ones used lately the next time the page comes up */ + static void +-add_recent_item (PosEmojiPicker *self, GVariant *item, gunichar modifier) ++remember (PosEmojiPicker *self, EmojiItem *emoji, gunichar modifier) + { +- GList *children, *l; +- int i; ++ g_autoptr (GVariant) variant = g_settings_get_value (self->settings, "recent-emoji"); ++ g_autoptr (GVariant) mine = recent_data (emoji); + GVariantBuilder builder; +- +- g_variant_ref (item); ++ GVariantIter iter; ++ GVariant *entry; ++ guint n = 1; + + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a((auss)u)")); +- g_variant_builder_add (&builder, "(@(auss)u)", item, modifier); ++ g_variant_builder_add (&builder, "(@(auss)u)", mine, modifier); + +- children = gtk_container_get_children (GTK_CONTAINER (self->recent.box)); +- for (l = children, i = 1; l; l = l->next, i++) { +- GVariant *item2 = get_recent_emoji_data (GTK_WIDGET (l->data)); +- gunichar modifier2 = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (l->data), "modifier")); +- +- if (modifier == modifier2 && g_variant_equal (item, item2)) { +- gtk_widget_destroy (GTK_WIDGET (l->data)); +- i--; +- continue; +- } +- if (i >= MAX_RECENT) { +- gtk_widget_destroy (GTK_WIDGET (l->data)); +- continue; ++ g_variant_iter_init (&iter, variant); ++ while ((entry = g_variant_iter_next_value (&iter))) { ++ g_autoptr (GVariant) other = g_variant_get_child_value (entry, 0); ++ g_autoptr (GVariant) codes = g_variant_get_child_value (other, 0); ++ g_autoptr (GVariant) my_codes = g_variant_get_child_value (mine, 0); ++ gunichar other_modifier; ++ ++ g_variant_get_child (entry, 1, "u", &other_modifier); ++ if (n < MAX_RECENT && !(g_variant_equal (codes, my_codes) && other_modifier == modifier)) { ++ g_variant_builder_add (&builder, "(@(auss)u)", other, other_modifier); ++ n++; + } +- +- g_variant_builder_add (&builder, "(@(auss)u)", item2, modifier2); ++ g_variant_unref (entry); + } +- g_list_free (children); +- +- add_emoji (self->recent.box, TRUE, item, modifier, self); +- +- /* Enable recent */ +- gtk_widget_set_visible (self->recent.box, TRUE); +- gtk_widget_set_sensitive (self->recent.button, TRUE); +- + g_settings_set_value (self->settings, "recent-emoji", g_variant_builder_end (&builder)); +- +- g_variant_unref (item); + } + + + static void +-on_emoji_activated (GtkFlowBox *box, GtkFlowBoxChild *child, gpointer data) ++pick (PosEmojiPicker *self, EmojiItem *emoji, gunichar modifier) + { +- PosEmojiPicker *self = POS_EMOJI_PICKER (data); + g_autofree char *text = NULL; +- GtkWidget *label; +- GVariant *item; +- gunichar modifier; +- +- label = gtk_bin_get_child (GTK_BIN (child)); +- text = g_strdup (gtk_label_get_label (GTK_LABEL (label))); + +- item = get_recent_emoji_data (GTK_WIDGET (child)); +- modifier = (gunichar) GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (child), "modifier")); +- add_recent_item (self, item, modifier); ++ if (emoji->tones) ++ text = emoji_text (emoji->data, modifier, NULL); ++ else ++ text = g_strdup (emoji->text); + +- g_signal_emit (data, signals[EMOJI_PICKED], 0, text); ++ remember (self, emoji, emoji->tones ? modifier : 0); ++ g_signal_emit (self, signals[EMOJI_PICKED], 0, text); + } + +-static gboolean +-has_variations (GVariant *emoji_data) ++/* ++ * Where things are ++ */ ++ ++static void ++emoji_metrics (PosEmojiPicker *self, int width) + { +- GVariant *codes; +- int i; +- gboolean has_variations; ++ gboolean wide = width > PT_WIDE_FROM; + +- has_variations = FALSE; +- codes = g_variant_get_child_value (emoji_data, 0); +- for (i = 0; i < g_variant_n_children (codes); i++) { +- gunichar code; +- g_variant_get_child (codes, i, "u", &code); +- if (code == 0) { +- has_variations = TRUE; +- break; +- } ++ self->s = width / PT_WIDTH; ++ self->vs = MIN (width, PT_WIDTH_MAX) / PT_WIDTH; ++ self->rows = wide ? E_ROWS_WIDE : E_ROWS; ++ self->pitch = E_PITCH * self->vs; ++ self->col0 = E_COL0 * self->vs; ++ self->row0 = (E_FIELD_TOP + E_FIELD_H + E_ROW0) * self->vs; ++ self->bar_y = self->row0 + (self->rows - 1) * self->pitch + E_BAR_BELOW * self->vs; ++ if (wide) { ++ self->abc_y = self->bar_y + 36.0 * self->vs; ++ self->mic_y = self->bar_y + 33.0 * self->vs; ++ } else { ++ self->abc_y = self->bar_y + E_ABC_BELOW * self->vs; ++ self->mic_y = self->bar_y + E_MIC_BELOW * self->vs; + } +- g_variant_unref (codes); ++} ++ ++ ++static int ++emoji_height_for_width (PosEmojiPicker *self, int width) ++{ ++ int keep = self->width, height; + +- return has_variations; ++ emoji_metrics (self, width); ++ height = ceil (self->bar_y + (width > PT_WIDE_FROM ? E_STRIP_WIDE : E_STRIP) * self->vs); ++ if (keep > 0) ++ emoji_metrics (self, keep); ++ return height; + } + ++/* Where each kind starts in the row of emoji, and how long the row is */ + static void +-show_variations (PosEmojiPicker *self, GtkWidget *child) ++emoji_layout (PosEmojiPicker *self) + { +- GtkWidget *popover; +- GtkWidget *view; +- GtkWidget *box; +- GVariant *emoji_data; +- GtkWidget *parent; +- gunichar modifier; ++ double x = 0.0; + +- if (!child) +- return; ++ for (int k = 0; k < TACTUS_N_KINDS; k++) { ++ guint n = self->kinds[k]->len; ++ guint cols = (n + self->rows - 1) / self->rows; ++ ++ self->kind_x[k] = x; ++ if (cols > 0) ++ x += cols * self->pitch + E_GAP * self->vs; ++ } ++ self->kind_x[TACTUS_N_KINDS] = x; ++ /* as much room after the last column as before the first */ ++ self->content = MAX (x - E_GAP * self->vs + 2 * (self->col0 - self->pitch / 2), 0.0); ++} + +- emoji_data = (GVariant*) g_object_get_data (G_OBJECT (child), "emoji-data"); +- if (!emoji_data) +- return; + +- if (!has_variations (emoji_data)) +- return; ++static double ++scroll_max (PosEmojiPicker *self) ++{ ++ return MAX (self->content - self->width, 0.0); ++} + +- parent = gtk_widget_get_ancestor (child, POS_TYPE_EMOJI_PICKER); +- popover = gtk_popover_new (child); +- view = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +- gtk_style_context_add_class (gtk_widget_get_style_context (view), "view"); +- box = gtk_flow_box_new (); +- gtk_flow_box_set_homogeneous (GTK_FLOW_BOX (box), TRUE); +- gtk_flow_box_set_min_children_per_line (GTK_FLOW_BOX (box), 6); +- gtk_flow_box_set_max_children_per_line (GTK_FLOW_BOX (box), 6); +- gtk_flow_box_set_activate_on_single_click (GTK_FLOW_BOX (box), TRUE); +- gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (box), GTK_SELECTION_NONE); +- gtk_container_add (GTK_CONTAINER (popover), view); +- gtk_container_add (GTK_CONTAINER (view), box); ++/* Where the row of emoji is drawn: pulled past an end, it follows the finger by less */ ++static double ++scroll_shown (PosEmojiPicker *self) ++{ ++ double max = scroll_max (self); + +- g_signal_connect (box, "child-activated", G_CALLBACK (on_emoji_activated), parent); ++ if (self->scroll < 0.0) ++ return self->scroll * 0.4; ++ if (self->scroll > max) ++ return max + (self->scroll - max) * 0.4; ++ return self->scroll; ++} + +- add_emoji (box, FALSE, emoji_data, 0, self); +- for (modifier = 0x1f3fb; modifier <= 0x1f3ff; modifier++) +- add_emoji (box, FALSE, emoji_data, modifier, self); ++/* The kind in view: the one the first column on screen belongs to */ ++static TactusKind ++kind_in_view (PosEmojiPicker *self) ++{ ++ double x = CLAMP (self->scroll, 0.0, scroll_max (self)) + self->pitch * 0.6; ++ TactusKind found = TACTUS_KIND_RECENT; + +- gtk_widget_show_all (view); +- gtk_popover_popup (GTK_POPOVER (popover)); ++ for (int k = 0; k < TACTUS_N_KINDS; k++) { ++ if (self->kinds[k]->len == 0) ++ continue; ++ if (found == TACTUS_KIND_RECENT && self->kinds[TACTUS_KIND_RECENT]->len == 0) ++ found = k; ++ if (self->kind_x[k] <= x) ++ found = k; ++ } ++ return found; + } + ++/* The sign of a kind in the row of signs */ ++static double ++bar_x (PosEmojiPicker *self, TactusKind kind) ++{ ++ double first = E_BAR_X0 * self->s; ++ double last = self->width - E_BAR_END * self->s; + +-static void +-long_pressed_cb (GtkGesture *gesture, double x, double y, gpointer data) ++ return first + (last - first) * kind / (TACTUS_N_KINDS - 1); ++} ++ ++/* The emoji at a place, and where its middle is */ ++static EmojiItem * ++emoji_at (PosEmojiPicker *self, double x, double y, double *cx, double *cy) + { +- PosEmojiPicker *self = data; +- GtkWidget *box; +- GtkWidget *child; ++ double top = self->row0 - self->pitch / 2; ++ double cx0 = x + scroll_shown (self) - (self->col0 - self->pitch / 2); ++ int row; ++ ++ if (y < top || y >= top + self->rows * self->pitch) ++ return NULL; ++ row = (int) ((y - top) / self->pitch); ++ ++ for (int k = 0; k < TACTUS_N_KINDS; k++) { ++ guint n = self->kinds[k]->len; ++ guint cols = (n + self->rows - 1) / self->rows; ++ double start = self->kind_x[k]; ++ guint col, index; + +- box = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)); +- child = GTK_WIDGET (gtk_flow_box_get_child_at_pos (GTK_FLOW_BOX (box), x, y)); +- show_variations (self, child); ++ if (cols == 0 || cx0 < start || cx0 >= start + cols * self->pitch) ++ continue; ++ col = (guint) ((cx0 - start) / self->pitch); ++ index = col * self->rows + row; ++ if (index >= n) ++ return NULL; ++ if (cx) ++ *cx = (self->col0 - self->pitch / 2) + start + (col + 0.5) * self->pitch - scroll_shown (self); ++ if (cy) ++ *cy = self->row0 + row * self->pitch; ++ return g_ptr_array_index (self->kinds[k], index); ++ } ++ return NULL; + } + ++/* ++ * Sliding ++ */ ++ + static gboolean +-popup_menu (GtkWidget *widget, gpointer data) ++on_tick (GtkWidget *widget, GdkFrameClock *clock, gpointer data) + { +- PosEmojiPicker *self = data; ++ PosEmojiPicker *self = POS_EMOJI_PICKER (widget); ++ gint64 now = gdk_frame_clock_get_frame_time (clock); ++ double dt = self->last_frame ? (now - self->last_frame) / 1000.0 : 16.0; ++ double max = scroll_max (self); ++ gboolean more = FALSE; ++ ++ self->last_frame = now; ++ dt = CLAMP (dt, 1.0, 50.0); ++ ++ if (self->jumping) { ++ double t = (now - self->jump_start) / 1000.0 / JUMP_MS; ++ ++ if (t >= 1.0) { ++ self->scroll = self->jump_to; ++ self->jumping = FALSE; ++ } else { ++ /* quick at first, easing in */ ++ double e = 1.0 - pow (1.0 - t, 3.0); + +- show_variations (self, widget); +- return TRUE; ++ self->scroll = self->jump_from + (self->jump_to - self->jump_from) * e; ++ more = TRUE; ++ } ++ } else if (fabs (self->speed) > GLIDE_STOP) { ++ self->scroll += self->speed * dt / 1000.0; ++ self->speed *= pow (GLIDE_KEEP, dt); ++ if (self->scroll < 0.0 || self->scroll > max) { ++ self->scroll = CLAMP (self->scroll, 0.0, max); ++ self->speed = 0.0; ++ } else { ++ more = fabs (self->speed) > GLIDE_STOP; ++ } ++ } ++ ++ gtk_widget_queue_draw (widget); ++ if (!more) { ++ self->speed = 0.0; ++ self->tick_id = 0; ++ return G_SOURCE_REMOVE; ++ } ++ return G_SOURCE_CONTINUE; + } + ++ + static void +-add_emoji (GtkWidget *box, +- gboolean prepend, +- GVariant *item, +- gunichar modifier, +- PosEmojiPicker *self) +-{ +- GtkWidget *child; +- GtkWidget *label; +- g_autoptr (PangoAttrList) attrs = NULL; +- GVariant *codes; +- char text[64]; +- char *p = text; +- int i; +- PangoLayout *layout; +- PangoRectangle rect; ++start_ticking (PosEmojiPicker *self) ++{ ++ if (self->tick_id == 0) { ++ self->last_frame = 0; ++ self->tick_id = gtk_widget_add_tick_callback (GTK_WIDGET (self), on_tick, NULL, NULL); ++ } ++} + +- codes = g_variant_get_child_value (item, 0); +- for (i = 0; i < g_variant_n_children (codes); i++) { +- gunichar code; + +- g_variant_get_child (codes, i, "u", &code); +- if (code == 0) +- code = modifier; +- if (code != 0) +- p += g_unichar_to_utf8 (code, p); ++static void ++stop_sliding (PosEmojiPicker *self) ++{ ++ if (self->tick_id) { ++ gtk_widget_remove_tick_callback (GTK_WIDGET (self), self->tick_id); ++ self->tick_id = 0; + } +- g_variant_unref (codes); +- p += g_unichar_to_utf8 (0xFE0F, p); /* U+FE0F is the Emoji variation selector */ +- p[0] = 0; +- +- label = gtk_label_new (text); +- attrs = pango_attr_list_new (); +- pango_attr_list_insert (attrs, pango_attr_scale_new (PANGO_SCALE_X_LARGE)); +- gtk_label_set_attributes (GTK_LABEL (label), attrs); ++ self->speed = 0.0; ++ self->jumping = FALSE; ++} + +- layout = gtk_label_get_layout (GTK_LABEL (label)); +- pango_layout_get_extents (layout, &rect, NULL); + +- /* Check for fallback rendering that generates too wide items */ +- if (pango_layout_get_unknown_glyphs_count (layout) > 0 || +- rect.width >= 1.5 * self->emoji_max_width) { +- gtk_widget_destroy (label); ++static void ++jump_to (PosEmojiPicker *self, double where) ++{ ++ stop_sliding (self); ++ self->jump_from = self->scroll; ++ self->jump_to = CLAMP (where, 0.0, scroll_max (self)); ++ if (fabs (self->jump_to - self->jump_from) < 0.5) { ++ self->scroll = self->jump_to; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + return; + } ++ self->jumping = TRUE; ++ self->jump_start = g_get_monotonic_time (); ++ start_ticking (self); ++} + +- child = gtk_flow_box_child_new (); +- gtk_style_context_add_class (gtk_widget_get_style_context (child), "emoji"); +- g_object_set_data_full (G_OBJECT (child), "emoji-data", +- g_variant_ref (item), +- (GDestroyNotify)g_variant_unref); +- if (modifier != 0) +- g_object_set_data (G_OBJECT (child), "modifier", GUINT_TO_POINTER (modifier)); +- +- gtk_container_add (GTK_CONTAINER (child), label); +- gtk_widget_show_all (child); ++/* ++ * The skin tones of a held emoji ++ */ + +- if (self) +- g_signal_connect (child, "popup-menu", G_CALLBACK (popup_menu), self); ++static void ++tones_track (PosEmojiPicker *self, double x) ++{ ++ int at = (int) floor ((x - self->tones_x - 6.0 * self->vs) / (E_TONES_PITCH * self->vs)); + +- gtk_flow_box_insert (GTK_FLOW_BOX (box), child, prepend ? 0 : -1); ++ at = CLAMP (at, 0, N_TONES - 1); ++ if (at != self->tones_at) { ++ self->tones_at = at; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++ } + } + + + static gboolean +-populate_emoji_chooser (gpointer data) ++on_long_press (gpointer data) + { +- PosEmojiPicker *self = data; +- GVariant *item; +- guint64 start, now; ++ PosEmojiPicker *self = POS_EMOJI_PICKER (data); ++ double cx = 0.0, cy = 0.0, w; + +- start = g_get_monotonic_time (); ++ self->long_id = 0; ++ if (!self->touching || self->sliding || self->pressed == NULL || !self->pressed->tones) ++ return G_SOURCE_REMOVE; ++ if (emoji_at (self, self->x, self->y, &cx, &cy) != self->pressed) ++ return G_SOURCE_REMOVE; ++ ++ w = (N_TONES * E_TONES_PITCH + 12.0) * self->vs; ++ self->tones_open = TRUE; ++ self->tones_item = self->pressed; ++ self->tones_x = CLAMP (cx - w / 2, 4.0, self->width - w - 4.0); ++ self->tones_y = MAX (cy - self->pitch / 2 - (E_TONES_H + 4.0) * self->vs, 2.0); ++ self->tones_at = -1; ++ tones_track (self, self->x); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++ return G_SOURCE_REMOVE; ++} + +- if (!self->data) { +- PosEmojiDb *emoji_db = pos_emoji_db_get_default (); ++/* ++ * The finger ++ */ + +- self->data = g_variant_ref (pos_emoji_db_get_data (emoji_db)); +- } ++static gboolean ++on_delete_repeat (gpointer data) ++{ ++ PosEmojiPicker *self = POS_EMOJI_PICKER (data); + +- if (!self->iter) { +- self->iter = g_variant_iter_new (self->data); +- self->box = self->people.box; +- } +- while ((item = g_variant_iter_next_value (self->iter))) { +- guint group; ++ g_signal_emit (self, signals[DELETE_LAST], 0); ++ return G_SOURCE_CONTINUE; ++} + +- g_variant_get_child (item, 3, "u", &group); + +- if (group == self->people.group) +- self->box = self->people.box; +- else if (group == self->body.group) +- self->box = self->body.box; +- else if (group == self->nature.group) +- self->box = self->nature.box; +- else if (group == self->food.group) +- self->box = self->food.box; +- else if (group == self->travel.group) +- self->box = self->travel.box; +- else if (group == self->activities.group) +- self->box = self->activities.box; +- else if (group == self->objects.group) +- self->box = self->objects.box; +- else if (group == self->symbols.group) +- self->box = self->symbols.box; +- else if (group == self->flags.group) +- self->box = self->flags.box; ++static gboolean ++on_delete_held (gpointer data) ++{ ++ PosEmojiPicker *self = POS_EMOJI_PICKER (data); + +- add_emoji (self->box, FALSE, item, 0, self); +- g_variant_unref (item); ++ g_signal_emit (self, signals[DELETE_LAST], 0); ++ self->delete_id = g_timeout_add (DELETE_EVERY_MS, on_delete_repeat, self); ++ return G_SOURCE_REMOVE; ++} + +- now = g_get_monotonic_time (); +- if (now > start + 8000) +- return G_SOURCE_CONTINUE; ++ ++static EmojiZone ++zone_at (PosEmojiPicker *self, double x, double y, TactusKind *kind) ++{ ++ double field_bottom = (E_FIELD_TOP + E_FIELD_H) * self->vs; ++ double grid_bottom = self->row0 + (self->rows - 0.5) * self->pitch; ++ double bar_half = 22.0 * self->vs; ++ ++ if (y < field_bottom + 3.0 * self->vs) ++ return E_ZONE_FIELD; ++ if (y < grid_bottom) ++ return E_ZONE_GRID; ++ if (y < self->bar_y + bar_half) { ++ double best = G_MAXDOUBLE; ++ ++ if (x > self->width - 2 * E_DELETE_X * self->s) ++ return E_ZONE_DELETE; ++ for (int k = 0; k < TACTUS_N_KINDS; k++) { ++ double d = fabs (x - bar_x (self, k)); ++ ++ if (d < best) { ++ best = d; ++ *kind = k; ++ } ++ } ++ return best < 22.0 * self->vs ? E_ZONE_BAR : E_ZONE_NONE; + } ++ if (x < 2 * E_ABC_X * self->s) ++ return E_ZONE_ABC; ++ if (x > self->width - 2 * E_MIC_X * self->s) ++ return E_ZONE_MIC; ++ return E_ZONE_NONE; ++} + +- g_variant_iter_free (self->iter); +- self->iter = NULL; +- self->box = NULL; +- self->populate_idle = 0; + +- return G_SOURCE_REMOVE; ++static void ++touch_begin (PosEmojiPicker *self, GdkEventSequence *sequence, double x, double y) ++{ ++ if (self->touching) ++ return; ++ ++ stop_sliding (self); ++ /* stopped past an end by a second finger: back where it belongs */ ++ self->scroll = CLAMP (self->scroll, 0.0, scroll_max (self)); ++ ++ self->touching = TRUE; ++ self->sequence = sequence; ++ self->x0 = self->x = x; ++ self->y0 = self->y = y; ++ self->scroll0 = self->scroll; ++ self->sliding = FALSE; ++ self->pressed = NULL; ++ self->pressed_kind = TACTUS_N_KINDS; ++ for (int i = 0; i < 4; i++) { ++ self->track_time[i] = g_get_monotonic_time (); ++ self->track_x[i] = x; ++ } ++ ++ self->zone = zone_at (self, x, y, &self->pressed_kind); ++ switch (self->zone) { ++ case E_ZONE_GRID: ++ self->pressed = emoji_at (self, x, y, NULL, NULL); ++ if (self->pressed && self->pressed->tones) ++ self->long_id = g_timeout_add (LONG_PRESS_MS, on_long_press, self); ++ break; ++ case E_ZONE_DELETE: ++ g_signal_emit (self, signals[DELETE_LAST], 0); ++ self->delete_id = g_timeout_add (DELETE_DELAY_MS, on_delete_held, self); ++ break; ++ case E_ZONE_BAR: ++ if (self->kinds[self->pressed_kind]->len == 0) ++ self->zone = E_ZONE_NONE; ++ break; ++ case E_ZONE_NONE: ++ case E_ZONE_FIELD: ++ case E_ZONE_ABC: ++ case E_ZONE_MIC: ++ default: ++ break; ++ } ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + ++ + static void +-adj_value_changed (GtkAdjustment *adj, gpointer data) ++touch_update (PosEmojiPicker *self, GdkEventSequence *sequence, double x, double y) + { +- PosEmojiPicker *self = data; +- double width, value; +- EmojiSection const *sections[] = { +- &self->recent, +- &self->people, +- &self->body, +- &self->nature, +- &self->food, +- &self->travel, +- &self->activities, +- &self->objects, +- &self->symbols, +- &self->flags, +- }; +- EmojiSection const *select_section = sections[0]; +- gsize i; +- +- /* Figure out which section the current scroll position is within */ +- width = gtk_widget_get_allocated_width (GTK_WIDGET (self)); +- value = gtk_adjustment_get_value (adj); +- for (i = 0; i < G_N_ELEMENTS (sections); ++i) { +- EmojiSection const *section = sections[i]; +- GtkAllocation alloc; ++ if (!self->touching || self->sequence != sequence) ++ return; + +- if (!gtk_widget_get_visible (section->box)) +- continue; ++ self->x = x; ++ self->y = y; + +- gtk_widget_get_allocation (section->box, &alloc); ++ if (self->tones_open) { ++ tones_track (self, x); ++ return; ++ } ++ if (self->zone != E_ZONE_GRID) ++ return; + +- if (gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL) { +- if (alloc.x == -1 || value > alloc.x + alloc.width - width) +- break; +- } else { +- if (alloc.x == -1 || value < alloc.x - BOX_SPACE) +- break; ++ if (!self->sliding && fabs (x - self->x0) > DRAG_START) { ++ self->sliding = TRUE; ++ self->pressed = NULL; ++ g_clear_handle_id (&self->long_id, g_source_remove); ++ /* from where the finger is now, not with a jump */ ++ self->x0 = x; ++ self->scroll0 = self->scroll; ++ } ++ if (self->sliding) { ++ self->scroll = self->scroll0 - (x - self->x0); ++ for (int i = 3; i > 0; i--) { ++ self->track_time[i] = self->track_time[i - 1]; ++ self->track_x[i] = self->track_x[i - 1]; + } +- +- select_section = section; ++ self->track_time[0] = g_get_monotonic_time (); ++ self->track_x[0] = x; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } ++} + +- /* Un/Check the section buttons accordingly */ +- for (i = 0; i < G_N_ELEMENTS (sections); ++i) { +- EmojiSection const *section = sections[i]; +- +- /* TODO: scroll button into view */ +- if (section == select_section) { +- GtkAdjustment *adj_sections; +- GtkAllocation alloc_btn = { 0 }, alloc_view = { 0 }; +- double v, pos; +- +- gtk_widget_set_state_flags (section->button, GTK_STATE_FLAG_CHECKED, FALSE); +- +- /* Scroll section button into view */ +- adj_sections = gtk_scrolled_window_get_hadjustment (self->scrolled_sections); +- gtk_widget_get_allocation (section->button, &alloc_btn); +- gtk_widget_get_allocation (GTK_WIDGET (self->scrolled_sections), &alloc_view); +- v = gtk_adjustment_get_value (adj_sections); +- +- /* Button is out of view to the right */ +- if (alloc_btn.x + alloc_btn.width > v + alloc_view.width) { +- pos = (alloc_btn.x + alloc_btn.width - alloc_view.width); +- gtk_adjustment_set_value (adj_sections, pos); +- /* Button is out of view to the left */ +- } else if (alloc_btn.x < v) { +- pos = alloc_btn.x; +- gtk_adjustment_set_value (adj_sections, alloc_btn.x); +- } + +- } else { +- gtk_widget_unset_state_flags (section->button, GTK_STATE_FLAG_CHECKED); ++static void ++touch_end (PosEmojiPicker *self, GdkEventSequence *sequence, double x, double y, gboolean cancelled) ++{ ++ EmojiZone zone; ++ TactusKind kind = TACTUS_N_KINDS; ++ ++ if (!self->touching || self->sequence != sequence) ++ return; ++ ++ self->touching = FALSE; ++ g_clear_handle_id (&self->long_id, g_source_remove); ++ g_clear_handle_id (&self->delete_id, g_source_remove); ++ zone = self->zone; ++ self->zone = E_ZONE_NONE; ++ ++ if (self->tones_open) { ++ self->tones_open = FALSE; ++ if (!cancelled && self->tones_item && self->tones_at >= 0) ++ pick (self, self->tones_item, self->tones_at == 0 ? 0 : 0x1f3fb + self->tones_at - 1); ++ self->tones_item = NULL; ++ } else if (zone == E_ZONE_GRID && self->sliding) { ++ double max = scroll_max (self); ++ ++ if (self->scroll < 0.0 || self->scroll > max) { ++ /* let go past an end: back to it */ ++ jump_to (self, self->scroll); ++ } else if (!cancelled) { ++ gint64 now = g_get_monotonic_time (); ++ double dt = (self->track_time[0] - self->track_time[3]) / 1e6; ++ ++ /* a finger that rested before it lifted has stopped the row */ ++ if (dt > 0.005 && now - self->track_time[0] < 80 * G_TIME_SPAN_MILLISECOND) { ++ self->speed = -(self->track_x[0] - self->track_x[3]) / dt; ++ self->speed = CLAMP (self->speed, -6000.0, 6000.0); ++ if (fabs (self->speed) > 60.0) ++ start_ticking (self); ++ else ++ self->speed = 0.0; ++ } ++ } ++ } else if (!cancelled) { ++ switch (zone) { ++ case E_ZONE_GRID: ++ if (self->pressed && emoji_at (self, x, y, NULL, NULL) == self->pressed) ++ pick (self, self->pressed, self->pressed->modifier); ++ break; ++ case E_ZONE_BAR: ++ if (zone_at (self, x, y, &kind) == E_ZONE_BAR && kind == self->pressed_kind) ++ jump_to (self, self->kind_x[kind]); ++ break; ++ case E_ZONE_ABC: ++ if (zone_at (self, x, y, &kind) == E_ZONE_ABC) ++ g_signal_emit (self, signals[DONE], 0); ++ break; ++ case E_ZONE_MIC: ++ if (zone_at (self, x, y, &kind) == E_ZONE_MIC) ++ g_signal_emit (self, signals[MIC], 0); ++ break; ++ case E_ZONE_FIELD: ++ if (zone_at (self, x, y, &kind) == E_ZONE_FIELD) ++ g_signal_emit (self, signals[SEARCH], 0); ++ break; ++ case E_ZONE_NONE: ++ case E_ZONE_DELETE: ++ default: ++ break; + } + } ++ ++ self->sliding = FALSE; ++ self->pressed = NULL; ++ self->pressed_kind = TACTUS_N_KINDS; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + +-static void +-setup_section (PosEmojiPicker *self, +- EmojiSection *section, +- int group, +- const char *icon) ++ ++static gboolean ++pos_emoji_picker_touch_event (GtkWidget *widget, GdkEventTouch *event) ++{ ++ PosEmojiPicker *self = POS_EMOJI_PICKER (widget); ++ ++ if (event->type == GDK_TOUCH_BEGIN) ++ touch_begin (self, event->sequence, event->x, event->y); ++ else if (event->type == GDK_TOUCH_UPDATE) ++ touch_update (self, event->sequence, event->x, event->y); ++ else if (event->type == GDK_TOUCH_END) ++ touch_end (self, event->sequence, event->x, event->y, FALSE); ++ else if (event->type == GDK_TOUCH_CANCEL) ++ touch_end (self, event->sequence, event->x, event->y, TRUE); ++ else ++ return GDK_EVENT_PROPAGATE; ++ ++ return GDK_EVENT_STOP; ++} ++ ++/* A mouse is a finger too (what touches are turned into for those who don't take them isn't) */ ++#define POINTER_SEQUENCE ((GdkEventSequence *) GINT_TO_POINTER (0x706f696e)) ++ ++static gboolean ++pos_emoji_picker_button_press_event (GtkWidget *widget, GdkEventButton *event) ++{ ++ if (event->button != 1 || gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_PROPAGATE; ++ touch_begin (POS_EMOJI_PICKER (widget), POINTER_SEQUENCE, event->x, event->y); ++ return GDK_EVENT_STOP; ++} ++ ++ ++static gboolean ++pos_emoji_picker_button_release_event (GtkWidget *widget, GdkEventButton *event) ++{ ++ if (event->button != 1 || gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_PROPAGATE; ++ touch_end (POS_EMOJI_PICKER (widget), POINTER_SEQUENCE, event->x, event->y, FALSE); ++ return GDK_EVENT_STOP; ++} ++ ++ ++static gboolean ++pos_emoji_picker_motion_notify_event (GtkWidget *widget, GdkEventMotion *event) + { +- GtkWidget *image; ++ if (!(event->state & GDK_BUTTON1_MASK) || gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_PROPAGATE; ++ touch_update (POS_EMOJI_PICKER (widget), POINTER_SEQUENCE, event->x, event->y); ++ return GDK_EVENT_STOP; ++} + +- section->group = group; ++/* ++ * Drawing ++ */ + +- image = gtk_bin_get_child (GTK_BIN (section->button)); +- gtk_image_set_from_icon_name (GTK_IMAGE (image), icon, GTK_ICON_SIZE_BUTTON); ++typedef struct { ++ TactusRgb field, hint, sign, disc, word; ++} EmojiColours; + +- g_signal_connect (section->button, "clicked", G_CALLBACK (scroll_to_section), section); ++static void ++emoji_colours (PosEmojiPicker *self, EmojiColours *c) ++{ ++ c->field = self->theme.field; ++ c->hint = self->theme.hint; ++ c->sign = self->theme.sign; ++ c->disc = self->theme.disc; ++ c->word = self->theme.text; + } + ++/* Words starting at x, their capitals' middle at cy */ + static void +-pos_emoji_picker_init (PosEmojiPicker *self) ++draw_words (cairo_t *cr, const char *text, double x, double cy, double size, const TactusRgb *rgb) + { +- GtkAdjustment *adj; ++ g_autoptr (PangoLayout) layout = pango_cairo_create_layout (cr); ++ PangoFontDescription *font = pango_font_description_from_string ("Adwaita Sans, Inter, Noto Sans, sans-serif"); ++ double baseline; ++ ++ pango_font_description_set_absolute_size (font, size * PANGO_SCALE); ++ pango_layout_set_font_description (layout, font); ++ pango_font_description_free (font); ++ pango_layout_set_text (layout, text, -1); ++ baseline = (double) pango_layout_get_baseline (layout) / PANGO_SCALE; ++ ++ tactus_set_source (cr, rgb, 1.0); ++ cairo_move_to (cr, x, cy + 0.727 * size / 2.0 - baseline); ++ pango_cairo_show_layout (cr, layout); ++} + +- self->settings = g_settings_new ("mobi.phosh.osk.EmojiPicker"); + +- gtk_widget_init_template (GTK_WIDGET (self)); ++static void ++draw_emoji_row (PosEmojiPicker *self, cairo_t *cr, const EmojiColours *colours) ++{ ++ g_autoptr (PangoLayout) layout = pango_cairo_create_layout (cr); ++ PangoFontDescription *font = pango_font_description_new (); ++ double shown = scroll_shown (self); ++ double inset = self->col0 - self->pitch / 2; ++ double top = self->row0 - self->pitch / 2; ++ ++ if (fabs (self->font_for - self->vs) > 1e-6) { ++ self->font_size = tactus_emoji_font_size (cr, E_EMOJI * self->vs); ++ self->font_for = self->vs; ++ } ++ pango_font_description_set_family (font, "Noto Color Emoji"); ++ pango_font_description_set_absolute_size (font, self->font_size * PANGO_SCALE); ++ pango_layout_set_font_description (layout, font); ++ pango_font_description_free (font); ++ ++ cairo_save (cr); ++ cairo_rectangle (cr, 0, top - 2, self->width, self->rows * self->pitch + 4); ++ cairo_clip (cr); ++ ++ for (int k = 0; k < TACTUS_N_KINDS; k++) { ++ GPtrArray *items = self->kinds[k]; ++ guint cols = (items->len + self->rows - 1) / self->rows; ++ double start = inset + self->kind_x[k] - shown; ++ int first, last; + +- /* Get a reasonable maximum width for an emoji. We do this to +- * skip overly wide fallback rendering for certain emojis the +- * font does not contain and therefore end up being rendered +- * as multiply glyphs. +- */ +- { +- g_autoptr (PangoLayout) layout = gtk_widget_create_pango_layout (GTK_WIDGET (self), "🙂"); +- g_autoptr (PangoAttrList) attrs = NULL; +- PangoRectangle rect; ++ if (cols == 0 || start > self->width || start + cols * self->pitch < 0) ++ continue; ++ first = MAX ((int) floor (-start / self->pitch), 0); ++ last = MIN ((int) ceil ((self->width - start) / self->pitch), (int) cols); + +- attrs = pango_attr_list_new (); +- pango_attr_list_insert (attrs, pango_attr_scale_new (PANGO_SCALE_X_LARGE)); +- pango_layout_set_attributes (layout, attrs); ++ for (int col = first; col < last; col++) { ++ for (int row = 0; row < self->rows; row++) { ++ guint index = col * self->rows + row; ++ EmojiItem *emoji; ++ PangoRectangle ink; ++ double cx = start + (col + 0.5) * self->pitch; ++ double cy = self->row0 + row * self->pitch; ++ ++ if (index >= items->len) ++ break; ++ emoji = g_ptr_array_index (items, index); ++ ++ if (emoji == self->pressed && !self->sliding) { ++ double half = self->pitch / 2 - 2.0 * self->vs; ++ ++ tactus_rounded_rect (cr, cx - half, cy - half, 2 * half, 2 * half, 9.0 * self->vs); ++ tactus_set_source (cr, &colours->disc, 1.0); ++ cairo_fill (cr); ++ } ++ ++ pango_layout_set_text (layout, emoji->text, -1); ++ pango_layout_get_extents (layout, &ink, NULL); ++ cairo_move_to (cr, ++ cx - ((double) ink.x + ink.width / 2.0) / PANGO_SCALE, ++ cy - ((double) ink.y + ink.height / 2.0) / PANGO_SCALE); ++ pango_cairo_show_layout (cr, layout); ++ } ++ } ++ } ++ cairo_new_path (cr); ++ cairo_restore (cr); ++} + +- pango_layout_get_extents (layout, &rect, NULL); +- self->emoji_max_width = rect.width; ++ ++static void ++draw_tones (PosEmojiPicker *self, cairo_t *cr) ++{ ++ double w = (N_TONES * E_TONES_PITCH + 12.0) * self->vs; ++ double h = E_TONES_H * self->vs; ++ double cy = self->tones_y + h / 2; ++ ++ /* a soft shadow, then the box */ ++ for (int i = 3; i >= 1; i--) { ++ tactus_rounded_rect (cr, self->tones_x - i, self->tones_y - i + 1.5, w + 2 * i, h + 2 * i, 18.0 * self->vs + i); ++ cairo_set_source_rgba (cr, 0, 0, 0, 0.035); ++ cairo_fill (cr); ++ } ++ tactus_rounded_rect (cr, self->tones_x, self->tones_y, w, h, 18.0 * self->vs); ++ tactus_set_source (cr, &self->theme.popup, 1.0); ++ cairo_fill (cr); ++ ++ for (int i = 0; i < N_TONES; i++) { ++ g_autofree char *text = emoji_text (self->tones_item->data, i == 0 ? 0 : 0x1f3fb + i - 1, NULL); ++ double cx = self->tones_x + (6.0 + (i + 0.5) * E_TONES_PITCH) * self->vs; ++ ++ if (i == self->tones_at) { ++ tactus_rounded_rect (cr, cx - 21.0 * self->vs, cy - 24.0 * self->vs, 42.0 * self->vs, 48.0 * self->vs, ++ 10.0 * self->vs); ++ tactus_set_source (cr, &self->theme.popup_selected, 1.0); ++ cairo_fill (cr); ++ } ++ tactus_draw_emoji (cr, text, cx, cy, self->font_size * 0.92, 1.0); + } ++} + +- self->recent_long_press = gtk_gesture_long_press_new (self->recent.box); +- g_signal_connect (self->recent_long_press, "pressed", G_CALLBACK (long_pressed_cb), self); + +- self->people_long_press = gtk_gesture_long_press_new (self->people.box); +- g_signal_connect (self->people_long_press, "pressed", G_CALLBACK (long_pressed_cb), self); ++static gboolean ++pos_emoji_picker_draw (GtkWidget *widget, cairo_t *cr) ++{ ++ PosEmojiPicker *self = POS_EMOJI_PICKER (widget); ++ TactusKind in_view = kind_in_view (self); ++ EmojiColours colours; ++ double field_y = E_FIELD_TOP * self->vs, field_h = E_FIELD_H * self->vs; ++ ++ if (self->width <= 0) ++ return FALSE; ++ ++ emoji_colours (self, &colours); ++ ++ tactus_panel_path (cr, 0, 0, self->width, self->height + 1.0, self->vs); ++ tactus_set_source (cr, &self->theme.panel, 1.0); ++ cairo_fill (cr); ++ ++ /* The search field */ ++ tactus_rounded_rect (cr, E_FIELD_SIDE * self->s, field_y, self->width - 2 * E_FIELD_SIDE * self->s, field_h, ++ field_h / 2); ++ tactus_set_source (cr, &colours.field, self->zone == E_ZONE_FIELD ? 0.6 : 1.0); ++ cairo_fill (cr); ++ tactus_icon_magnifier (cr, E_FIELD_ICON_X * self->s, field_y + field_h / 2, self->vs, &colours.hint); ++ draw_words (cr, "Search Emoji", E_FIELD_TEXT_X * self->s, field_y + field_h / 2, E_FIELD_FONT * self->vs, ++ &colours.hint); ++ ++ draw_emoji_row (self, cr, &colours); ++ ++ /* The signs of the kinds, and the delete key */ ++ for (int k = 0; k < TACTUS_N_KINDS; k++) { ++ double x = bar_x (self, k); ++ gboolean none = self->kinds[k]->len == 0; ++ ++ if ((TactusKind) k == in_view && !none) { ++ cairo_arc (cr, x, self->bar_y, E_BAR_DISC * self->vs, 0, 2 * G_PI); ++ tactus_set_source (cr, &colours.disc, 1.0); ++ cairo_fill (cr); ++ } ++ cairo_push_group (cr); ++ tactus_icon_kind (cr, k, x, self->bar_y, self->vs, &colours.sign); ++ cairo_pop_group_to_source (cr); ++ cairo_paint_with_alpha (cr, none ? 0.3 : (self->zone == E_ZONE_BAR && self->pressed_kind == (TactusKind) k) ? 0.5 : 1.0); ++ } ++ tactus_set_source (cr, &colours.word, self->zone == E_ZONE_DELETE ? 0.45 : 1.0); ++ tactus_icon_delete (cr, self->width - E_DELETE_X * self->s, self->bar_y, 1.2 * self->vs, FALSE, NULL); + +- self->body_long_press = gtk_gesture_long_press_new (self->body.box); +- g_signal_connect (self->body_long_press, "pressed", G_CALLBACK (long_pressed_cb), self); ++ /* Back to the letters, and the microphone */ ++ cairo_push_group (cr); ++ tactus_draw_label (cr, "ABC", E_ABC_X * self->s, self->abc_y, E_ABC_FONT * self->vs, 400, ++ TACTUS_BAND_CAP_HEIGHT, &colours.word); ++ cairo_pop_group_to_source (cr); ++ cairo_paint_with_alpha (cr, self->zone == E_ZONE_ABC ? 0.45 : 1.0); ++ tactus_icon_mic (cr, self->width - E_MIC_X * self->s, self->mic_y, self->vs, &self->theme, ++ self->zone == E_ZONE_MIC ? 0.45 : 1.0); + +- adj = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (self->scrolled_window)); +- g_signal_connect (adj, "value-changed", G_CALLBACK (adj_value_changed), self); ++ if (self->tones_open && self->tones_item) ++ draw_tones (self, cr); + +- setup_section (self, &self->recent, -1, "emoji-recent-symbolic"); +- setup_section (self, &self->people, 0, "emoji-people-symbolic"); +- setup_section (self, &self->body, 1, "emoji-body-symbolic"); +- setup_section (self, &self->nature, 3, "emoji-nature-symbolic"); +- setup_section (self, &self->food, 4, "emoji-food-symbolic"); +- setup_section (self, &self->travel, 5, "emoji-travel-symbolic"); +- setup_section (self, &self->activities, 6, "emoji-activities-symbolic"); +- setup_section (self, &self->objects, 7, "emoji-objects-symbolic"); +- setup_section (self, &self->symbols, 8, "emoji-symbols-symbolic"); +- setup_section (self, &self->flags, 9, "emoji-flags-symbolic"); ++ return FALSE; ++} + +- populate_recent_section (self); ++/* ++ * Size ++ */ ++ ++static void ++pos_emoji_picker_size_allocate (GtkWidget *widget, GdkRectangle *allocation) ++{ ++ PosEmojiPicker *self = POS_EMOJI_PICKER (widget); ++ gboolean changed = self->width != allocation->width; + +- self->populate_idle = g_idle_add (populate_emoji_chooser, self); +- g_source_set_name_by_id (self->populate_idle, "[pos] populate_emoji_chooser"); ++ self->width = allocation->width; ++ self->height = allocation->height; ++ emoji_metrics (self, self->width); ++ emoji_layout (self); ++ self->scroll = CLAMP (self->scroll, 0.0, scroll_max (self)); ++ ++ GTK_WIDGET_CLASS (pos_emoji_picker_parent_class)->size_allocate (widget, allocation); ++ if (changed) ++ gtk_widget_queue_resize (widget); + } + ++ + static void +-pos_emoji_picker_show (GtkWidget *widget) ++pos_emoji_picker_get_preferred_height (GtkWidget *widget, int *minimum, int *natural) + { + PosEmojiPicker *self = POS_EMOJI_PICKER (widget); +- GtkAdjustment *adj; + +- GTK_WIDGET_CLASS (pos_emoji_picker_parent_class)->show (widget); ++ *minimum = *natural = emoji_height_for_width (self, self->width > 0 ? self->width : MINIMUM_WIDTH); ++} + +- adj = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (self->scrolled_window)); +- gtk_adjustment_set_value (adj, 0); +- adj_value_changed (adj, self); ++ ++static void ++pos_emoji_picker_get_preferred_width (GtkWidget *widget, int *minimum, int *natural) ++{ ++ *minimum = *natural = MINIMUM_WIDTH; + } + ++/* Each time the page comes up: from the start, with the emoji used since */ ++static void ++pos_emoji_picker_map (GtkWidget *widget) ++{ ++ PosEmojiPicker *self = POS_EMOJI_PICKER (widget); ++ ++ stop_sliding (self); ++ self->touching = FALSE; ++ self->tones_open = FALSE; ++ self->zone = E_ZONE_NONE; ++ g_clear_handle_id (&self->long_id, g_source_remove); ++ g_clear_handle_id (&self->delete_id, g_source_remove); ++ load_recent (self); ++ emoji_layout (self); ++ self->scroll = 0.0; ++ ++ GTK_WIDGET_CLASS (pos_emoji_picker_parent_class)->map (widget); ++} ++ ++ ++static void ++on_color_scheme_changed (PosEmojiPicker *self) ++{ ++ g_autofree char *scheme = g_settings_get_string (self->interface_settings, "color-scheme"); ++ ++ tactus_theme_init (&self->theme, g_strcmp0 (scheme, "prefer-dark") == 0); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++ + static void + pos_emoji_picker_finalize (GObject *object) + { + PosEmojiPicker *self = POS_EMOJI_PICKER (object); + +- if (self->populate_idle) +- g_source_remove (self->populate_idle); +- ++ g_clear_handle_id (&self->populate_id, g_source_remove); ++ g_clear_handle_id (&self->long_id, g_source_remove); ++ g_clear_handle_id (&self->delete_id, g_source_remove); ++ g_clear_pointer (&self->iter, g_variant_iter_free); + g_clear_pointer (&self->data, g_variant_unref); +- g_object_unref (self->settings); +- +- g_clear_object (&self->recent_long_press); +- g_clear_object (&self->recent_multi_press); +- g_clear_object (&self->people_long_press); +- g_clear_object (&self->people_multi_press); +- g_clear_object (&self->body_long_press); +- g_clear_object (&self->body_multi_press); ++ for (int k = 0; k < TACTUS_N_KINDS; k++) ++ g_clear_pointer (&self->kinds[k], g_ptr_array_unref); ++ g_clear_object (&self->settings); ++ g_clear_object (&self->interface_settings); + + G_OBJECT_CLASS (pos_emoji_picker_parent_class)->finalize (object); + } + ++ + static void + pos_emoji_picker_class_init (PosEmojiPickerClass *klass) + { +@@ -642,96 +1231,665 @@ + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + + object_class->finalize = pos_emoji_picker_finalize; +- widget_class->show = pos_emoji_picker_show; ++ ++ widget_class->draw = pos_emoji_picker_draw; ++ widget_class->map = pos_emoji_picker_map; ++ widget_class->size_allocate = pos_emoji_picker_size_allocate; ++ widget_class->get_preferred_height = pos_emoji_picker_get_preferred_height; ++ widget_class->get_preferred_width = pos_emoji_picker_get_preferred_width; ++ widget_class->touch_event = pos_emoji_picker_touch_event; ++ widget_class->button_press_event = pos_emoji_picker_button_press_event; ++ widget_class->button_release_event = pos_emoji_picker_button_release_event; ++ widget_class->motion_notify_event = pos_emoji_picker_motion_notify_event; + + /** +- * PosEmojiPicker::emoji-picked +- * @self: The emoji picker +- * @emoji: The emoji picked by the user. +- * +- * The user picked an emoji. ++ * PosEmojiPicker::emoji-picked: ++ * @self: The emoji page ++ * @emoji: The emoji that was picked + */ +- signals[EMOJI_PICKED] = +- g_signal_new ("emoji-picked", +- G_OBJECT_CLASS_TYPE (object_class), +- G_SIGNAL_RUN_LAST, +- 0, +- NULL, NULL, +- NULL, +- G_TYPE_NONE, 1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE); ++ signals[EMOJI_PICKED] = g_signal_new ("emoji-picked", ++ G_OBJECT_CLASS_TYPE (object_class), ++ G_SIGNAL_RUN_LAST, ++ 0, NULL, NULL, NULL, ++ G_TYPE_NONE, 1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE); + /** + * PosEmojiPicker::done: ++ * @self: The emoji page + * +- * The user is done picking emojis. ++ * "ABC" was tapped: back to the letters. + */ +- signals[DONE] = +- g_signal_new ("done", +- G_OBJECT_CLASS_TYPE (object_class), +- G_SIGNAL_RUN_LAST, +- 0, NULL, NULL, NULL, +- G_TYPE_NONE, 0); ++ signals[DONE] = g_signal_new ("done", ++ G_OBJECT_CLASS_TYPE (object_class), ++ G_SIGNAL_RUN_LAST, ++ 0, NULL, NULL, NULL, ++ G_TYPE_NONE, 0); + /** + * PosEmojiPicker::delete-last: ++ * @self: The emoji page + * +- * Delete the last entered character. ++ * The delete key: once for a tap, on and on while it is held. ++ */ ++ signals[DELETE_LAST] = g_signal_new ("delete-last", ++ G_OBJECT_CLASS_TYPE (object_class), ++ G_SIGNAL_RUN_LAST, ++ 0, NULL, NULL, NULL, ++ G_TYPE_NONE, 0); ++ /** ++ * PosEmojiPicker::mic: ++ * @self: The emoji page ++ * ++ * The microphone was tapped. ++ */ ++ signals[MIC] = g_signal_new ("mic", ++ G_OBJECT_CLASS_TYPE (object_class), ++ G_SIGNAL_RUN_LAST, ++ 0, NULL, NULL, NULL, ++ G_TYPE_NONE, 0); ++ /** ++ * PosEmojiPicker::search: ++ * @self: The emoji page + * +- * TODO: we can make this more flexible by allowing to add +- * arbitrary widgets to an `action-box`. This would also make +- * it simple to send custom events, use the same key repeat logic +- * etc. ++ * The search field was tapped. + */ +- signals[DELETE_LAST] = +- g_signal_new ("delete-last", +- G_OBJECT_CLASS_TYPE (object_class), +- G_SIGNAL_RUN_LAST, +- 0, NULL, NULL, NULL, +- G_TYPE_NONE, 0); ++ signals[SEARCH] = g_signal_new ("search", ++ G_OBJECT_CLASS_TYPE (object_class), ++ G_SIGNAL_RUN_LAST, ++ 0, NULL, NULL, NULL, ++ G_TYPE_NONE, 0); ++ ++ gtk_widget_class_set_css_name (widget_class, "pos-emoji-picker"); ++} ++ ++ ++static void ++pos_emoji_picker_init (PosEmojiPicker *self) ++{ ++ for (int k = 0; k < TACTUS_N_KINDS; k++) ++ self->kinds[k] = g_ptr_array_new_with_free_func (emoji_item_free); ++ ++ self->settings = g_settings_new ("mobi.phosh.osk.EmojiPicker"); ++ self->interface_settings = g_settings_new ("org.gnome.desktop.interface"); ++ g_signal_connect_swapped (self->interface_settings, "changed::color-scheme", ++ G_CALLBACK (on_color_scheme_changed), self); ++ tactus_theme_watch (self, G_CALLBACK (on_color_scheme_changed)); ++ on_color_scheme_changed (self); ++ ++ emoji_metrics (self, MINIMUM_WIDTH); ++ self->pressed_kind = TACTUS_N_KINDS; ++ ++ gtk_widget_add_events (GTK_WIDGET (self), ++ GDK_TOUCH_MASK | ++ GDK_BUTTON_PRESS_MASK | ++ GDK_BUTTON_RELEASE_MASK | ++ GDK_BUTTON_MOTION_MASK); ++ ++ load_recent (self); ++ self->populate_id = g_idle_add (populate, self); ++ g_source_set_name_by_id (self->populate_id, "[pos] the emoji page's emoji"); ++} + +- gtk_widget_class_set_template_from_resource (widget_class, +- "/mobi/phosh/stevia/ui/emoji-picker.ui"); + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, scrolled_window); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, scrolled_sections); ++GtkWidget * ++pos_emoji_picker_new (void) ++{ ++ return GTK_WIDGET (g_object_new (POS_TYPE_EMOJI_PICKER, NULL)); ++} + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, recent.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, recent.button); ++/* ++ * Searching for emoji by name: a field with what was typed and, under it, a ++ * row of the emoji it finds. It sits on top of the letters, which type into ++ * the field for as long as it is there. ++ */ + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, people.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, people.button); ++#define S_ROW_Y 75.0 /* the found emoji's middle */ ++#define S_HEIGHT 104.0 ++#define S_CLEAR_X 27.0 /* the clear button's middle, from the right */ ++#define S_MAX_FOUND 60 + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, body.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, body.button); ++enum { ++ S_EMOJI_PICKED, ++ S_LAST_SIGNAL ++}; ++static int search_signals[S_LAST_SIGNAL]; + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, nature.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, nature.button); ++struct _PosEmojiSearch { ++ GtkDrawingArea parent_instance; + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, food.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, food.button); ++ GSettings *settings; ++ GSettings *interface_settings; ++ TactusTheme theme; ++ ++ GString *query; ++ GPtrArray *found; /* EmojiItem */ ++ double usual_width; /* of a face, to tell a missing emoji by */ ++ ++ int width, height; ++ double s, vs; ++ double font_size, font_for; ++ double scroll; ++ ++ gboolean touching; ++ GdkEventSequence *sequence; ++ double x0, x, y; ++ double scroll0; ++ gboolean sliding; ++ gboolean on_clear; ++ EmojiItem *pressed; ++}; + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, travel.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, travel.button); ++G_DEFINE_TYPE (PosEmojiSearch, pos_emoji_search, GTK_TYPE_DRAWING_AREA) + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, activities.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, activities.button); ++/* Every word of what was typed starts a word of the emoji's name or of what it is known by */ ++static gboolean ++search_matches (GVariant *item, char **words) ++{ ++ g_autoptr (GVariant) keywords = g_variant_get_child_value (item, 2); ++ const char *name; + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, objects.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, objects.button); ++ g_variant_get_child (item, 1, "&s", &name); ++ for (int w = 0; words[w]; w++) { ++ gboolean hit = FALSE; ++ size_t len = strlen (words[w]); + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, symbols.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, symbols.button); ++ if (len == 0) ++ continue; ++ for (const char *p = name; p && *p && !hit; ) { ++ hit = g_ascii_strncasecmp (p, words[w], len) == 0; ++ p = strpbrk (p, " -_"); ++ if (p) ++ p++; ++ } ++ for (gsize k = 0; k < g_variant_n_children (keywords) && !hit; k++) { ++ const char *keyword; + +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, flags.box); +- gtk_widget_class_bind_template_child (widget_class, PosEmojiPicker, flags.button); ++ g_variant_get_child (keywords, k, "&s", &keyword); ++ for (const char *p = keyword; p && *p && !hit; ) { ++ hit = g_ascii_strncasecmp (p, words[w], len) == 0; ++ p = strpbrk (p, " -_"); ++ if (p) ++ p++; ++ } ++ } ++ if (!hit) ++ return FALSE; ++ } ++ return TRUE; ++} + +- gtk_widget_class_bind_template_callback (widget_class, on_emoji_activated); +- gtk_widget_class_bind_template_callback (widget_class, on_done_clicked); +- gtk_widget_class_bind_template_callback (widget_class, on_backspace_clicked); + +- gtk_widget_class_set_css_name (widget_class, "pos-emoji-picker"); ++static void ++search_update (PosEmojiSearch *self) ++{ ++ g_auto (GStrv) words = g_strsplit (self->query->str, " ", -1); ++ gboolean any = FALSE; ++ ++ g_ptr_array_set_size (self->found, 0); ++ self->scroll = 0.0; ++ for (int w = 0; words[w]; w++) ++ any = any || words[w][0] != '\0'; ++ ++ if (!any) { ++ /* nothing typed yet: the emoji used lately */ ++ g_autoptr (GVariant) variant = g_settings_get_value (self->settings, "recent-emoji"); ++ GVariantIter iter; ++ GVariant *entry; ++ ++ g_variant_iter_init (&iter, variant); ++ while ((entry = g_variant_iter_next_value (&iter))) { ++ EmojiItem *emoji = g_new0 (EmojiItem, 1); ++ ++ emoji->data = g_variant_get_child_value (entry, 0); ++ g_variant_get_child (entry, 1, "u", &emoji->modifier); ++ emoji->text = emoji_text (emoji->data, emoji->modifier, &emoji->tones); ++ if (emoji_drawable (GTK_WIDGET (self), &self->usual_width, emoji->text)) ++ g_ptr_array_add (self->found, emoji); ++ else ++ emoji_item_free (emoji); ++ g_variant_unref (entry); ++ } ++ } else { ++ GVariant *data = pos_emoji_db_get_data (pos_emoji_db_get_default ()); ++ GVariantIter iter; ++ GVariant *item; ++ ++ g_variant_iter_init (&iter, data); ++ while ((item = g_variant_iter_next_value (&iter))) { ++ guint group; ++ ++ g_variant_get_child (item, 3, "u", &group); ++ if (kind_of_group (group) != TACTUS_N_KINDS && self->found->len < S_MAX_FOUND && ++ search_matches (item, words)) { ++ EmojiItem *emoji = g_new0 (EmojiItem, 1); ++ ++ emoji->data = g_variant_ref (item); ++ emoji->text = emoji_text (item, 0, &emoji->tones); ++ /* as on the page: only what the font has a picture for */ ++ if (emoji_drawable (GTK_WIDGET (self), &self->usual_width, emoji->text)) ++ g_ptr_array_add (self->found, emoji); ++ else ++ emoji_item_free (emoji); ++ } ++ g_variant_unref (item); ++ } ++ } ++ gtk_widget_queue_draw (GTK_WIDGET (self)); + } + ++/** ++ * pos_emoji_search_reset: ++ * @self: The search ++ * ++ * Start over: nothing typed. ++ */ ++void ++pos_emoji_search_reset (PosEmojiSearch *self) ++{ ++ g_return_if_fail (POS_IS_EMOJI_SEARCH (self)); ++ ++ g_string_truncate (self->query, 0); ++ search_update (self); ++} ++ ++ ++void ++pos_emoji_search_type (PosEmojiSearch *self, const char *text) ++{ ++ g_return_if_fail (POS_IS_EMOJI_SEARCH (self)); ++ ++ if (text == NULL || self->query->len > 60) ++ return; ++ g_string_append (self->query, text); ++ search_update (self); ++} ++ ++ ++void ++pos_emoji_search_backspace (PosEmojiSearch *self) ++{ ++ const char *prev; ++ ++ g_return_if_fail (POS_IS_EMOJI_SEARCH (self)); ++ ++ if (self->query->len == 0) ++ return; ++ prev = g_utf8_find_prev_char (self->query->str, self->query->str + self->query->len); ++ g_string_truncate (self->query, prev - self->query->str); ++ search_update (self); ++} ++ ++ ++const char * ++pos_emoji_search_get_query (PosEmojiSearch *self) ++{ ++ g_return_val_if_fail (POS_IS_EMOJI_SEARCH (self), NULL); ++ ++ return self->query->str; ++} ++ ++ ++static double ++search_scroll_max (PosEmojiSearch *self) ++{ ++ double pitch = E_PITCH * self->vs, inset = (E_COL0 - E_PITCH / 2) * self->vs; ++ ++ return MAX (self->found->len * pitch + 2 * inset - self->width, 0.0); ++} ++ ++ ++static EmojiItem * ++search_at (PosEmojiSearch *self, double x, double y) ++{ ++ double pitch = E_PITCH * self->vs, inset = (E_COL0 - E_PITCH / 2) * self->vs; ++ double at = x + self->scroll - inset; ++ int index; ++ ++ if (fabs (y - S_ROW_Y * self->vs) > pitch / 2 || at < 0) ++ return NULL; ++ index = (int) (at / pitch); ++ return index < (int) self->found->len ? g_ptr_array_index (self->found, index) : NULL; ++} ++ ++ ++static gboolean ++search_on_clear (PosEmojiSearch *self, double x, double y) ++{ ++ return self->query->len > 0 && y < (E_FIELD_TOP + E_FIELD_H + 4.0) * self->vs && ++ x > self->width - 2 * S_CLEAR_X * self->s; ++} ++ ++ ++static void ++search_begin (PosEmojiSearch *self, GdkEventSequence *sequence, double x, double y) ++{ ++ if (self->touching) ++ return; ++ self->touching = TRUE; ++ self->sequence = sequence; ++ self->x0 = self->x = x; ++ self->y = y; ++ self->scroll0 = self->scroll; ++ self->sliding = FALSE; ++ self->on_clear = search_on_clear (self, x, y); ++ self->pressed = self->on_clear ? NULL : search_at (self, x, y); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++ ++static void ++search_move (PosEmojiSearch *self, GdkEventSequence *sequence, double x, double y) ++{ ++ if (!self->touching || self->sequence != sequence) ++ return; ++ self->x = x; ++ self->y = y; ++ if (!self->sliding && !self->on_clear && fabs (x - self->x0) > DRAG_START) { ++ self->sliding = TRUE; ++ self->pressed = NULL; ++ self->x0 = x; ++ self->scroll0 = self->scroll; ++ } ++ if (self->sliding) { ++ self->scroll = CLAMP (self->scroll0 - (x - self->x0), 0.0, search_scroll_max (self)); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++ } ++} ++ ++ ++static void ++search_end (PosEmojiSearch *self, GdkEventSequence *sequence, double x, double y, gboolean cancelled) ++{ ++ if (!self->touching || self->sequence != sequence) ++ return; ++ self->touching = FALSE; ++ ++ if (!cancelled && !self->sliding) { ++ if (self->on_clear && search_on_clear (self, x, y)) { ++ pos_emoji_search_reset (self); ++ } else if (self->pressed && search_at (self, x, y) == self->pressed) { ++ EmojiItem *emoji = self->pressed; ++ g_autofree char *text = g_strdup (emoji->text); ++ g_autoptr (GVariant) mine = recent_data (emoji); ++ g_autoptr (GVariant) variant = g_settings_get_value (self->settings, "recent-emoji"); ++ GVariantBuilder builder; ++ GVariantIter iter; ++ GVariant *entry; ++ guint n = 1; ++ ++ /* it leads the emoji used lately from now on */ ++ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a((auss)u)")); ++ g_variant_builder_add (&builder, "(@(auss)u)", mine, emoji->modifier); ++ g_variant_iter_init (&iter, variant); ++ while ((entry = g_variant_iter_next_value (&iter))) { ++ g_autoptr (GVariant) other = g_variant_get_child_value (entry, 0); ++ g_autoptr (GVariant) codes = g_variant_get_child_value (other, 0); ++ g_autoptr (GVariant) my_codes = g_variant_get_child_value (mine, 0); ++ gunichar modifier; ++ ++ g_variant_get_child (entry, 1, "u", &modifier); ++ if (n < MAX_RECENT && !(g_variant_equal (codes, my_codes) && modifier == emoji->modifier)) { ++ g_variant_builder_add (&builder, "(@(auss)u)", other, modifier); ++ n++; ++ } ++ g_variant_unref (entry); ++ } ++ self->pressed = NULL; ++ g_settings_set_value (self->settings, "recent-emoji", g_variant_builder_end (&builder)); ++ g_signal_emit (self, search_signals[S_EMOJI_PICKED], 0, text); ++ } ++ } ++ self->pressed = NULL; ++ self->on_clear = FALSE; ++ self->sliding = FALSE; ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++ ++static gboolean ++pos_emoji_search_touch_event (GtkWidget *widget, GdkEventTouch *event) ++{ ++ PosEmojiSearch *self = POS_EMOJI_SEARCH (widget); ++ ++ if (event->type == GDK_TOUCH_BEGIN) ++ search_begin (self, event->sequence, event->x, event->y); ++ else if (event->type == GDK_TOUCH_UPDATE) ++ search_move (self, event->sequence, event->x, event->y); ++ else if (event->type == GDK_TOUCH_END) ++ search_end (self, event->sequence, event->x, event->y, FALSE); ++ else if (event->type == GDK_TOUCH_CANCEL) ++ search_end (self, event->sequence, event->x, event->y, TRUE); ++ else ++ return GDK_EVENT_PROPAGATE; ++ return GDK_EVENT_STOP; ++} ++ ++ ++static gboolean ++pos_emoji_search_button_press_event (GtkWidget *widget, GdkEventButton *event) ++{ ++ if (event->button != 1 || gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_PROPAGATE; ++ search_begin (POS_EMOJI_SEARCH (widget), POINTER_SEQUENCE, event->x, event->y); ++ return GDK_EVENT_STOP; ++} ++ ++ ++static gboolean ++pos_emoji_search_button_release_event (GtkWidget *widget, GdkEventButton *event) ++{ ++ if (event->button != 1 || gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_PROPAGATE; ++ search_end (POS_EMOJI_SEARCH (widget), POINTER_SEQUENCE, event->x, event->y, FALSE); ++ return GDK_EVENT_STOP; ++} ++ ++ ++static gboolean ++pos_emoji_search_motion_notify_event (GtkWidget *widget, GdkEventMotion *event) ++{ ++ if (!(event->state & GDK_BUTTON1_MASK) || gdk_event_get_pointer_emulated ((GdkEvent *) event)) ++ return GDK_EVENT_PROPAGATE; ++ search_move (POS_EMOJI_SEARCH (widget), POINTER_SEQUENCE, event->x, event->y); ++ return GDK_EVENT_STOP; ++} ++ ++ ++static gboolean ++pos_emoji_search_draw (GtkWidget *widget, cairo_t *cr) ++{ ++ PosEmojiSearch *self = POS_EMOJI_SEARCH (widget); ++ double field_y = E_FIELD_TOP * self->vs, field_h = E_FIELD_H * self->vs; ++ double pitch = E_PITCH * self->vs, inset = (E_COL0 - E_PITCH / 2) * self->vs; ++ double text_x = E_FIELD_TEXT_X * self->s, size = E_FIELD_FONT * self->vs; ++ TactusRgb field = self->theme.field, hint = self->theme.hint; ++ TactusRgb word = self->theme.text, disc = self->theme.disc; ++ ++ if (self->width <= 0) ++ return FALSE; ++ ++ tactus_panel_path (cr, 0, 0, self->width, self->height + 1.0, self->vs); ++ tactus_set_source (cr, &self->theme.panel, 1.0); ++ cairo_fill (cr); ++ ++ tactus_rounded_rect (cr, E_FIELD_SIDE * self->s, field_y, self->width - 2 * E_FIELD_SIDE * self->s, field_h, ++ field_h / 2); ++ tactus_set_source (cr, &field, 1.0); ++ cairo_fill (cr); ++ tactus_icon_magnifier (cr, E_FIELD_ICON_X * self->s, field_y + field_h / 2, self->vs, &hint); ++ ++ if (self->query->len == 0) { ++ draw_words (cr, "Search Emoji", text_x, field_y + field_h / 2, size, &hint); ++ /* the caret, where the words will go */ ++ cairo_rectangle (cr, text_x - 1.5 * self->vs, field_y + field_h / 2 - 11.0 * self->vs, 2.0 * self->vs, ++ 22.0 * self->vs); ++ tactus_set_source (cr, &self->theme.accent, 1.0); ++ cairo_fill (cr); ++ } else { ++ g_autoptr (PangoLayout) layout = pango_cairo_create_layout (cr); ++ PangoFontDescription *font = pango_font_description_from_string ("Adwaita Sans, Inter, Noto Sans, sans-serif"); ++ PangoRectangle logical; ++ TactusRgb cross = field; ++ TactusRgb button = hint; ++ ++ draw_words (cr, self->query->str, text_x, field_y + field_h / 2, size, &word); ++ pango_font_description_set_absolute_size (font, size * PANGO_SCALE); ++ pango_layout_set_font_description (layout, font); ++ pango_font_description_free (font); ++ pango_layout_set_text (layout, self->query->str, -1); ++ pango_layout_get_extents (layout, NULL, &logical); ++ cairo_rectangle (cr, text_x + (double) logical.width / PANGO_SCALE + 1.5 * self->vs, ++ field_y + field_h / 2 - 11.0 * self->vs, 2.0 * self->vs, 22.0 * self->vs); ++ tactus_set_source (cr, &self->theme.accent, 1.0); ++ cairo_fill (cr); ++ ++ cairo_push_group (cr); ++ tactus_icon_clear (cr, self->width - S_CLEAR_X * self->s, field_y + field_h / 2, self->vs, &button, &cross); ++ cairo_pop_group_to_source (cr); ++ cairo_paint_with_alpha (cr, self->on_clear ? 0.5 : 1.0); ++ } ++ ++ /* What was found */ ++ if (fabs (self->font_for - self->vs) > 1e-6) { ++ self->font_size = tactus_emoji_font_size (cr, E_EMOJI * self->vs); ++ self->font_for = self->vs; ++ } ++ cairo_save (cr); ++ cairo_rectangle (cr, 0, S_ROW_Y * self->vs - pitch / 2, self->width, pitch); ++ cairo_clip (cr); ++ for (guint i = 0; i < self->found->len; i++) { ++ EmojiItem *emoji = g_ptr_array_index (self->found, i); ++ double cx = inset + (i + 0.5) * pitch - self->scroll; ++ ++ if (cx < -pitch || cx > self->width + pitch) ++ continue; ++ if (emoji == self->pressed) { ++ double half = pitch / 2 - 2.0 * self->vs; ++ ++ tactus_rounded_rect (cr, cx - half, S_ROW_Y * self->vs - half, 2 * half, 2 * half, 9.0 * self->vs); ++ tactus_set_source (cr, &disc, 1.0); ++ cairo_fill (cr); ++ } ++ tactus_draw_emoji (cr, emoji->text, cx, S_ROW_Y * self->vs, self->font_size, 1.0); ++ } ++ cairo_restore (cr); ++ ++ return FALSE; ++} ++ ++ ++static void ++pos_emoji_search_size_allocate (GtkWidget *widget, GdkRectangle *allocation) ++{ ++ PosEmojiSearch *self = POS_EMOJI_SEARCH (widget); ++ gboolean changed = self->width != allocation->width; ++ ++ self->width = allocation->width; ++ self->height = allocation->height; ++ self->s = self->width / PT_WIDTH; ++ self->vs = MIN (self->width, PT_WIDTH_MAX) / PT_WIDTH; ++ ++ GTK_WIDGET_CLASS (pos_emoji_search_parent_class)->size_allocate (widget, allocation); ++ if (changed) ++ gtk_widget_queue_resize (widget); ++} ++ ++ ++static void ++pos_emoji_search_get_preferred_height (GtkWidget *widget, int *minimum, int *natural) ++{ ++ PosEmojiSearch *self = POS_EMOJI_SEARCH (widget); ++ int width = self->width > 0 ? self->width : MINIMUM_WIDTH; ++ ++ *minimum = *natural = ceil (S_HEIGHT * MIN (width, PT_WIDTH_MAX) / PT_WIDTH); ++} ++ ++ ++static void ++pos_emoji_search_get_preferred_width (GtkWidget *widget, int *minimum, int *natural) ++{ ++ *minimum = *natural = MINIMUM_WIDTH; ++} ++ ++ ++static void ++search_color_scheme_changed (PosEmojiSearch *self) ++{ ++ g_autofree char *scheme = g_settings_get_string (self->interface_settings, "color-scheme"); ++ ++ tactus_theme_init (&self->theme, g_strcmp0 (scheme, "prefer-dark") == 0); ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++ ++static void ++pos_emoji_search_finalize (GObject *object) ++{ ++ PosEmojiSearch *self = POS_EMOJI_SEARCH (object); ++ ++ g_clear_pointer (&self->found, g_ptr_array_unref); ++ g_string_free (self->query, TRUE); ++ g_clear_object (&self->settings); ++ g_clear_object (&self->interface_settings); ++ ++ G_OBJECT_CLASS (pos_emoji_search_parent_class)->finalize (object); ++} ++ ++ ++static void ++pos_emoji_search_class_init (PosEmojiSearchClass *klass) ++{ ++ GObjectClass *object_class = G_OBJECT_CLASS (klass); ++ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); ++ ++ object_class->finalize = pos_emoji_search_finalize; ++ ++ widget_class->draw = pos_emoji_search_draw; ++ widget_class->size_allocate = pos_emoji_search_size_allocate; ++ widget_class->get_preferred_height = pos_emoji_search_get_preferred_height; ++ widget_class->get_preferred_width = pos_emoji_search_get_preferred_width; ++ widget_class->touch_event = pos_emoji_search_touch_event; ++ widget_class->button_press_event = pos_emoji_search_button_press_event; ++ widget_class->button_release_event = pos_emoji_search_button_release_event; ++ widget_class->motion_notify_event = pos_emoji_search_motion_notify_event; ++ ++ /** ++ * PosEmojiSearch::emoji-picked: ++ * @self: The search ++ * @emoji: The emoji that was picked among the ones found ++ */ ++ search_signals[S_EMOJI_PICKED] = g_signal_new ("emoji-picked", ++ G_OBJECT_CLASS_TYPE (object_class), ++ G_SIGNAL_RUN_LAST, ++ 0, NULL, NULL, NULL, ++ G_TYPE_NONE, 1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE); ++ ++ gtk_widget_class_set_css_name (widget_class, "pos-emoji-search"); ++} ++ ++ ++static void ++pos_emoji_search_init (PosEmojiSearch *self) ++{ ++ self->query = g_string_new (NULL); ++ self->found = g_ptr_array_new_with_free_func (emoji_item_free); ++ self->s = self->vs = MINIMUM_WIDTH / PT_WIDTH; ++ ++ self->settings = g_settings_new ("mobi.phosh.osk.EmojiPicker"); ++ self->interface_settings = g_settings_new ("org.gnome.desktop.interface"); ++ g_signal_connect_swapped (self->interface_settings, "changed::color-scheme", ++ G_CALLBACK (search_color_scheme_changed), self); ++ tactus_theme_watch (self, G_CALLBACK (search_color_scheme_changed)); ++ search_color_scheme_changed (self); ++ ++ gtk_widget_add_events (GTK_WIDGET (self), ++ GDK_TOUCH_MASK | ++ GDK_BUTTON_PRESS_MASK | ++ GDK_BUTTON_RELEASE_MASK | ++ GDK_BUTTON_MOTION_MASK); ++} ++ ++ + GtkWidget * +-pos_emoji_picker_new (void) ++pos_emoji_search_new (void) + { +- return GTK_WIDGET (g_object_new (POS_TYPE_EMOJI_PICKER, NULL)); ++ return GTK_WIDGET (g_object_new (POS_TYPE_EMOJI_SEARCH, NULL)); + } diff --git a/packages/tactus/patches/0006-input-surface-keys-through-the-typing-engine.patch b/packages/tactus/patches/0006-input-surface-keys-through-the-typing-engine.patch new file mode 100644 index 000000000..25db64e21 --- /dev/null +++ b/packages/tactus/patches/0006-input-surface-keys-through-the-typing-engine.patch @@ -0,0 +1,920 @@ +Subject: input-surface: the keys go through the typing engine + +With a text field for ordinary text, the keys of a language layout and the +emoji go to tactus-typer, which commits each key at once, keeps a copy of the +text before the cursor, corrects a word when it is ended, starts sentences +with a capital and turns two spaces into a full stop. Password fields, the +terminal layout and keys with a latched modifier go the old way. + +Also here: +- an answer to the text field (an empty input-method commit) when the typing + engine asks for one: the browser tells its text only once its last word + was answered; +- Backspace held: letters, then whole words; +- the keys under the keyboard: the emoji page, and the microphone, which + starts the phone's dictation (omamobile.voice); +- a swipe down puts the keyboard away, and a touch of the text field brings + it back; +- the surface is as high as the page it shows and leaves the band above the + keys to the application: its input region ends at the panel's top. The + room it reserves is a little less than the panel is high (8 px on a + screen 360 wide), so the window in front reaches under the panel's top and + it is the application that shows past the panel's round corners, not the + wallpaper behind it. A taller page takes its room only once it is on the + screen, and a lower one gives it back at once, so the wallpaper doesn't + show between the window and the keyboard while the page changes; +- the pages change at once, and the page follows the text field's purpose + (letters, numbers, the terminal's keys) each time the keyboard comes up. +--- +--- a/src/pos-input-surface.c ++++ b/src/pos-input-surface.c +@@ -2,6 +2,7 @@ + * Copyright (C) 2021 Purism SPC + * 2022-2024 The Phosh Developers + * 2025 Phosh.mobi e.V. ++ * 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + * +@@ -29,7 +30,8 @@ + #include "pos-speech-input.h" + #include "pos-style-manager.h" + #include "pos-vk-driver.h" +-#include "pos-vk-driver.h" ++#include "tactus-draw.h" ++#include "tactus-typer.h" + #include "util.h" + + #include +@@ -47,9 +49,18 @@ + + #define MIN_Y_VELOCITY 1000 + +-#define BS_KEY_REPEAT_DELAY 700 +-#define BS_KEY_REPEAT_INTERVAL_CHAR 50 +-#define BS_KEY_REPEAT_INTERVAL_WORD 150 ++/* Backspace held: letters soon, whole words after a while */ ++#define BS_KEY_REPEAT_DELAY 350 ++#define BS_KEY_REPEAT_INTERVAL_CHAR 60 ++#define BS_KEY_REPEAT_INTERVAL_WORD 140 ++#define BS_KEY_REPEAT_WORDS_AFTER_US (1500 * G_TIME_SPAN_MILLISECOND) ++ ++/* Swiped away, the keyboard stays away at least this long */ ++#define TACTUS_SWIPED_QUIET_US (1 * G_TIME_SPAN_SECOND) ++ ++/* What the Mic under the keys starts: the phone's dictation, which types what it hears */ ++#define TACTUS_DICTATION \ ++ "omarchy-shell shell call omamobile.voice press ''; omarchy-shell shell call omamobile.voice release ''" + + /** + * POS_INPUT_SURFACE_IS_LANG_LAYOUT: +@@ -104,10 +115,10 @@ + * can easily add and remove actions. + */ + struct _PosInputSurface { +- PhoshLayerSurface parent; ++ PhoshLayerSurface parent; + +- gboolean surface_visible; +- PosInputSurfaceAnimation animation; ++ gboolean surface_visible; ++ PosInputSurfaceAnimation animation; + guint min_height; + guint dead_zone; + +@@ -176,6 +187,28 @@ + gboolean layout_overriden; + /* Keymap handling */ + guint keymap_delayed_id; ++ ++ /* Tactus's typing */ ++ TactusTyper *typer; ++ gboolean typer_on; ++ guint typer_wake_id; ++ gboolean autoshift; ++ TactusTap tap; ++ gboolean have_tap; ++ gboolean bs_repeating; ++ gint64 bs_repeat_start; ++ /* Tactus's look */ ++ GSettings *interface_settings; ++ GtkCssProvider *tactus_css; ++ int clear; ++ int zone; /* the room last asked of the compositor */ ++ gboolean room_wait; /* more room is asked for after the next frame */ ++ guint shape_id; ++ /* When the owner swiped the keyboard away, while its text field stays */ ++ gint64 swiped_at; ++ /* Searching for emoji by name: the letters type into the search */ ++ GtkWidget *emoji_search; ++ gboolean searching; + }; + + +@@ -264,8 +297,20 @@ + { + PosInputSurface *self = data; + ++ /* After a while of letters, go on by whole words */ ++ if (self->bs_mode == POS_BACKSPACE_MODE_CHAR && self->bs_repeat_start && ++ pos_input_method_get_active (self->input_method) && ++ g_get_monotonic_time () - self->bs_repeat_start > BS_KEY_REPEAT_WORDS_AFTER_US) { ++ pos_input_surface_set_backspace_mode (self, POS_BACKSPACE_MODE_WORD); ++ self->bs_repeat_id = g_timeout_add (BS_KEY_REPEAT_INTERVAL_WORD, on_bs_key_repeat, self); ++ g_source_set_name_by_id (self->bs_repeat_id, "[pos-bs-key-repeat]"); ++ return G_SOURCE_REMOVE; ++ } ++ + pos_input_surface_trigger_feedback (self, KEY_PRESS_EVENT); ++ self->bs_repeating = TRUE; + pos_input_surface_submit_symbol (self, "KEY_BACKSPACE"); ++ self->bs_repeating = FALSE; + + return G_SOURCE_CONTINUE; + } +@@ -277,14 +322,9 @@ + PosInputSurface *self = data; + guint interval; + +- if (pos_input_method_get_active (self->input_method)) { +- interval = BS_KEY_REPEAT_INTERVAL_WORD; +- pos_input_surface_set_backspace_mode (self, POS_BACKSPACE_MODE_WORD); +- } else { +- /* When no input method is active we delete individual chars which should +- * happen faster than deleting whole words */ +- interval = BS_KEY_REPEAT_INTERVAL_CHAR; +- } ++ /* Letters first (on_bs_key_repeat moves on to words) */ ++ interval = BS_KEY_REPEAT_INTERVAL_CHAR; ++ self->bs_repeat_start = g_get_monotonic_time (); + + self->bs_repeat_id = g_timeout_add (interval, on_bs_key_repeat, self); + g_source_set_name_by_id (self->bs_repeat_id, "[pos-bs-key-repeat]"); +@@ -332,6 +372,228 @@ + } + + ++/* ++ * Tactus's typing: the keys of a language layout go through the typing ++ * engine, which corrects words and knows where sentences start ++ */ ++ ++static void ++tactus_op_commit (const char *text, gpointer data) ++{ ++ PosInputSurface *self = POS_INPUT_SURFACE (data); ++ ++ pos_input_method_send_string (self->input_method, text, TRUE); ++} ++ ++ ++static void ++tactus_op_key (const char *symbol, gpointer data) ++{ ++ PosInputSurface *self = POS_INPUT_SURFACE (data); ++ ++ pos_vk_driver_key_down (self->keyboard_driver, symbol, POS_KEYCODE_MODIFIER_NONE); ++ pos_vk_driver_key_up (self->keyboard_driver, symbol); ++} ++ ++ ++static void ++tactus_op_erase (guint n_chars, guint n_bytes, gboolean by_keys, gpointer data) ++{ ++ PosInputSurface *self = POS_INPUT_SURFACE (data); ++ ++ if (!by_keys) { ++ pos_input_method_delete_surrounding_text (self->input_method, n_bytes, 0, TRUE); ++ return; ++ } ++ for (guint i = 0; i < n_chars; i++) ++ tactus_op_key ("KEY_BACKSPACE", self); ++} ++ ++ ++static void ++tactus_op_shift (gboolean wanted, gboolean context_changed, gpointer data) ++{ ++ PosInputSurface *self = POS_INPUT_SURFACE (data); ++ GtkWidget *child = hdy_deck_get_visible_child (self->deck); ++ ++ self->autoshift = wanted; ++ /* what is typed into the search for emoji is no sentence */ ++ if (POS_INPUT_SURFACE_IS_LANG_LAYOUT (child)) ++ pos_osk_widget_set_autoshift (POS_OSK_WIDGET (child), wanted && !self->searching, context_changed); ++} ++ ++ ++/* An answer with nothing in it: see the typing engine's answer() */ ++static void ++tactus_op_ack (gpointer data) ++{ ++ PosInputSurface *self = POS_INPUT_SURFACE (data); ++ ++ if (pos_input_method_get_active (self->input_method)) ++ pos_input_method_commit (self->input_method); ++} ++ ++ ++static void ++on_typer_wake (gpointer data) ++{ ++ PosInputSurface *self = POS_INPUT_SURFACE (data); ++ ++ self->typer_wake_id = 0; ++ tactus_typer_poll (self->typer); ++} ++ ++ ++static void ++tactus_op_wake (guint ms, gpointer data) ++{ ++ PosInputSurface *self = POS_INPUT_SURFACE (data); ++ ++ g_clear_handle_id (&self->typer_wake_id, g_source_remove); ++ self->typer_wake_id = g_timeout_add_once (ms, on_typer_wake, self); ++ g_source_set_name_by_id (self->typer_wake_id, "[tactus-typer-wake]"); ++} ++ ++/* Whether the keys go through the typing engine right now: there is a text ++ * field for ordinary text, and what shows is a language layout (or the ++ * emoji, which type into the same text) */ ++static gboolean ++tactus_typer_usable (PosInputSurface *self) ++{ ++ GtkWidget *child; ++ ++ if (!self->typer_on || self->latched_modifiers) ++ return FALSE; ++ ++ child = hdy_deck_get_visible_child (self->deck); ++ return POS_INPUT_SURFACE_IS_LANG_LAYOUT (child) || child == self->emoji_picker; ++} ++ ++static void tactus_queue_shape (PosInputSurface *self); ++ ++/* Searching for emoji by name, or not: the search sits on top of the letters, ++ * which type into it for as long as it is there */ ++static void ++tactus_search_set (PosInputSurface *self, gboolean on) ++{ ++ if (self->searching == !!on || self->emoji_search == NULL) ++ return; ++ ++ self->searching = !!on; ++ if (on) ++ pos_emoji_search_reset (POS_EMOJI_SEARCH (self->emoji_search)); ++ for (guint i = 0; self->osks && i < self->osks->len; i++) { ++ PosOskWidget *osk = g_ptr_array_index (self->osks, i); ++ ++ pos_osk_widget_set_attached (osk, on); ++ pos_osk_widget_set_autoshift (osk, !on && self->typer_on && self->autoshift, TRUE); ++ } ++ gtk_widget_set_visible (self->emoji_search, on); ++ /* the keyboard changes its height */ ++ tactus_typer_settle (self->typer, 700); ++ tactus_queue_shape (self); ++} ++ ++/* The text field gave a sign of life */ ++static void ++on_im_done (PosInputSurface *self, PosInputMethod *im) ++{ ++ PosInputMethodHint hint = pos_input_method_get_hint (im); ++ gboolean wanted; ++ const char *text; ++ guint anchor = 0, cursor = 0; ++ ++ /* Swiped away, the keyboard comes back when its text field is touched ++ * again (the field then says where its cursor is). Not at once: the field ++ * also speaks as it gets the room the keyboard left. */ ++ if (!pos_input_method_get_active (im)) { ++ self->swiped_at = 0; ++ tactus_search_set (self, FALSE); ++ } else if (self->swiped_at && self->surface_visible == FALSE && ++ g_get_monotonic_time () - self->swiped_at > TACTUS_SWIPED_QUIET_US) { ++ self->swiped_at = 0; ++ pos_input_surface_set_visible (self, TRUE); ++ } ++ ++ /* Not where what is typed is hidden (a password) */ ++ wanted = pos_input_method_get_active (im) && ++ pos_input_method_get_purpose (im) == POS_INPUT_METHOD_PURPOSE_NORMAL && ++ !(hint & TACTUS_HINT_HIDDEN); ++ ++ if (wanted != self->typer_on) { ++ if (g_getenv ("TACTUS_TRACE")) ++ g_message ("text field: %s, purpose %d, hints 0x%x: the typing engine is %s", ++ pos_input_method_get_active (im) ? "there" : "gone", pos_input_method_get_purpose (im), hint, ++ wanted ? "on" : "off"); ++ self->typer_on = wanted; ++ tactus_typer_focus (self->typer, wanted); ++ if (wanted) { ++ double dx, dy; ++ ++ /* What was learned about where the owner's fingers land */ ++ tactus_ac_get_bias (&dx, &dy); ++ for (guint i = 0; self->osks && i < self->osks->len; i++) ++ pos_osk_widget_set_touch_bias (g_ptr_array_index (self->osks, i), dx, dy); ++ } ++ } ++ if (!wanted) ++ return; ++ ++ tactus_typer_set_hints (self->typer, hint); ++ text = pos_input_method_get_surrounding_text (im, &anchor, &cursor); ++ tactus_typer_state (self->typer, text, cursor, anchor); ++} ++ ++/* One of the two keys under the keyboard */ ++static void ++on_osk_strip_key (PosInputSurface *self, const char *which, GtkWidget *osk_widget) ++{ ++ g_return_if_fail (POS_IS_INPUT_SURFACE (self)); ++ ++ if (g_strcmp0 (which, "emoji") == 0) { ++ tactus_search_set (self, FALSE); ++ if (self->action_map) ++ g_action_group_change_action_state (G_ACTION_GROUP (self->action_map), "select-layout", ++ g_variant_new_string ("emoji")); ++ } else if (g_strcmp0 (which, "mic") == 0) { ++ const char *argv[] = { "sh", "-c", TACTUS_DICTATION, NULL }; ++ g_autoptr (GError) err = NULL; ++ ++ if (!g_spawn_async (NULL, (char **) argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &err)) ++ g_warning ("Dictation: %s", err->message); ++ } ++} ++ ++ ++/* The emoji page's microphone */ ++static void ++on_emoji_picker_mic (PosInputSurface *self) ++{ ++ on_osk_strip_key (self, "mic", NULL); ++} ++ ++/* The emoji page's search field was tapped: the letters come up, with the search on top */ ++static void ++on_emoji_picker_search (PosInputSurface *self) ++{ ++ if (self->last_layout == NULL) ++ return; ++ tactus_search_set (self, TRUE); ++ hdy_deck_set_visible_child (self->deck, self->last_layout); ++} ++ ++/* An emoji among the ones the search found */ ++static void ++on_search_emoji_picked (PosInputSurface *self, const char *emoji) ++{ ++ if (tactus_typer_usable (self)) ++ tactus_typer_text (self->typer, emoji, TRUE); ++ else if (pos_input_method_get_active (self->input_method)) ++ pos_input_method_send_string (self->input_method, emoji, TRUE); ++ pos_input_surface_trigger_feedback (self, KEY_PRESS_EVENT); ++} ++ ++ + static void + on_swipe (GtkGestureSwipe *swipe, double velocity_x, double velocity_y, gpointer data) + { +@@ -342,7 +604,14 @@ + g_debug ("swipe with v_x: %f, v_y: %f", velocity_x, velocity_y); + + if (velocity_y > MIN_Y_VELOCITY && velocity_y > 2.0 * ABS (velocity_x)) { ++ GtkWidget *child = hdy_deck_get_visible_child (self->deck); ++ + g_debug ("Hiding the keyboard on swipe down"); ++ /* The finger that swiped types nothing */ ++ if (POS_IS_OSK_WIDGET (child)) ++ pos_osk_widget_cancel_touches (POS_OSK_WIDGET (child)); ++ pos_input_surface_set_backspace_pressed (self, NULL); ++ self->swiped_at = g_get_monotonic_time (); + pos_input_surface_set_visible (self, FALSE); + } else { + g_debug ("Swipe not downwards"); +@@ -578,11 +847,19 @@ + + + static void +-on_osk_key_symbol (PosInputSurface *self, const char *symbol) ++on_osk_key_symbol (PosInputSurface *self, const char *symbol, GtkWidget *osk_widget) + { ++ double dx = 0.0, dy = 0.0; ++ + g_assert (POS_IS_INPUT_SURFACE (self)); + ++ /* Where in its key the finger was, for the typing engine */ ++ self->have_tap = POS_IS_OSK_WIDGET (osk_widget) && ++ pos_osk_widget_take_tap (POS_OSK_WIDGET (osk_widget), &dx, &dy); ++ self->tap = (TactusTap) { .dx = dx, .dy = dy, .valid = self->have_tap }; ++ + pos_input_surface_submit_symbol (self, symbol); ++ self->have_tap = FALSE; + } + + +@@ -595,6 +872,17 @@ + + is_bs = pos_input_surface_set_backspace_pressed (self, symbol); + ++ /* Searching for emoji: the keys type into the search */ ++ if (self->searching) { ++ if (is_bs) ++ pos_emoji_search_backspace (POS_EMOJI_SEARCH (self->emoji_search)); ++ else if (g_strcmp0 (symbol, "KEY_ENTER") == 0) ++ tactus_search_set (self, FALSE); ++ else if (!g_str_has_prefix (symbol, "KEY_")) ++ pos_emoji_search_type (POS_EMOJI_SEARCH (self->emoji_search), symbol); ++ return; ++ } ++ + /* Latched modifiers, send as virtual-keyboard */ + if (self->latched_modifiers) { + PosKeycodeModifier modifier; +@@ -612,6 +900,26 @@ + return; + } + ++ /* Tactus's typing */ ++ if (tactus_typer_usable (self)) { ++ GtkWidget *child = hdy_deck_get_visible_child (self->deck); ++ ++ /* The dictionary is English: another language's words stay as they are typed */ ++ if (POS_INPUT_SURFACE_IS_LANG_LAYOUT (child)) ++ tactus_typer_set_language (self->typer, pos_osk_widget_get_lang (POS_OSK_WIDGET (child))); ++ ++ if (is_bs) { ++ TactusBackspace how = TACTUS_BACKSPACE_TAP; ++ ++ if (self->bs_repeating) ++ how = self->bs_mode == POS_BACKSPACE_MODE_WORD ? TACTUS_BACKSPACE_WORD : TACTUS_BACKSPACE_REPEAT; ++ tactus_typer_backspace (self->typer, how); ++ } else { ++ tactus_typer_key (self->typer, symbol, self->have_tap ? &self->tap : NULL); ++ } ++ return; ++ } ++ + if (pos_input_surface_is_completion_mode (self)) { + handled = pos_completer_feed_symbol (self->completer, symbol); + if (handled) +@@ -725,7 +1033,9 @@ + if (gm_str_is_null_or_empty (text)) + return; + +- if (pos_input_method_get_active (self->input_method)) { ++ if (tactus_typer_usable (self)) { ++ tactus_typer_text (self->typer, text, FALSE); ++ } else if (pos_input_method_get_active (self->input_method)) { + pos_input_surface_submit_current_preedit (self); + pos_input_method_send_string (self->input_method, text, TRUE); + } else { +@@ -789,7 +1099,9 @@ + g_assert (POS_IS_INPUT_SURFACE (self)); + g_assert (POS_IS_EMOJI_PICKER (emoji_picker)); + +- if (pos_input_method_get_active (self->input_method)) { ++ if (tactus_typer_usable (self)) { ++ tactus_typer_text (self->typer, emoji, TRUE); ++ } else if (pos_input_method_get_active (self->input_method)) { + pos_input_surface_submit_current_preedit (self); + pos_input_method_send_string (self->input_method, emoji, TRUE); + } else { +@@ -1039,6 +1351,253 @@ + } + + ++/* ++ * Tactus's look: the keyboard is a panel at the bottom of the surface. ++ * What is above it is clear: there the accents of a held key are drawn, the ++ * application shows through, and touches are the application's. ++ */ ++ ++static int ++tactus_measure_clear (PosInputSurface *self) ++{ ++ GtkWidget *child = hdy_deck_get_visible_child (self->deck); ++ int y = 0, clear; ++ ++ if (child == NULL || !gtk_widget_get_realized (GTK_WIDGET (self))) ++ return 0; ++ /* A bar above the keys reaches to the top */ ++ if (gtk_widget_get_visible (GTK_WIDGET (self->shortcuts_bar)) || ++ gtk_widget_get_visible (self->completion_bar) || ++ (self->emoji_search && gtk_widget_get_visible (self->emoji_search))) ++ return 0; ++ ++ if (!gtk_widget_translate_coordinates (child, GTK_WIDGET (self), 0, 0, NULL, &y)) ++ y = 0; ++ clear = y; ++ if (POS_IS_OSK_WIDGET (child)) ++ clear += pos_osk_widget_get_overhang (POS_OSK_WIDGET (child)); ++ ++ return MAX (clear, 0); ++} ++ ++ ++/* How far the windows reach under the top of the panel (tactus_panel_under) */ ++static int ++tactus_under (PosInputSurface *self) ++{ ++ if (self->last_layout && POS_IS_OSK_WIDGET (self->last_layout)) ++ return pos_osk_widget_get_panel_under (POS_OSK_WIDGET (self->last_layout)); ++ ++ return tactus_panel_under (360.0 / 390.0); ++} ++ ++ ++/* Whether the surface has the height it last asked for. Between asking and ++ * getting it, what is drawn and what is measured belong to two pages. */ ++static gboolean ++tactus_settled (PosInputSurface *self) ++{ ++ int asked = 0; ++ ++ g_object_get (self, "height", &asked, NULL); ++ ++ return asked == gtk_widget_get_allocated_height (GTK_WIDGET (self)); ++} ++ ++ ++static void ++tactus_keep_room (PosInputSurface *self, int room) ++{ ++ self->zone = room; ++ g_debug ("Room kept for the keyboard: %d", self->zone); ++ phosh_layer_surface_set_exclusive_zone (PHOSH_LAYER_SURFACE (self), self->zone); ++ phosh_layer_surface_wl_surface_commit (PHOSH_LAYER_SURFACE (self)); ++} ++ ++ ++/* The room the page that shows needs, as the surface is laid out now */ ++static int ++tactus_room (PosInputSurface *self) ++{ ++ int height = gtk_widget_get_allocated_height (GTK_WIDGET (self)); ++ int clear = tactus_measure_clear (self); ++ ++ if (clear >= height) ++ clear = 0; ++ ++ return MAX (height - clear - tactus_under (self), 0); ++} ++ ++ ++/* A frame of the keyboard has gone to the compositor (GDK commits it in its ++ * own handler of this signal, connected before ours) */ ++static void ++on_frame_painted (PosInputSurface *self, GdkFrameClock *clock) ++{ ++ int room; ++ ++ if (self->surface_visible == TRUE && self->animation.progress >= 1.0 && !tactus_settled (self)) ++ return; /* the frame at the new height is yet to come */ ++ ++ g_signal_handlers_disconnect_by_func (clock, on_frame_painted, self); ++ self->room_wait = FALSE; ++ if (self->surface_visible != TRUE || self->animation.progress < 1.0) ++ return; /* put away meanwhile, or sliding: pos_input_surface_move sets it */ ++ ++ room = tactus_room (self); ++ if (room != self->zone) ++ tactus_keep_room (self, room); ++} ++ ++ ++/* More room for the keyboard is asked for only once the frame that shows the ++ * taller page is with the compositor. Asked for before it, the window in ++ * front is made shorter at once while the old, lower page is still on the ++ * screen, and for as long as the new page takes to draw the wallpaper shows ++ * between the two. */ ++static void ++tactus_room_after_paint (PosInputSurface *self) ++{ ++ GdkFrameClock *clock = gtk_widget_get_frame_clock (GTK_WIDGET (self)); ++ ++ if (clock == NULL) ++ return; ++ if (!self->room_wait) { ++ self->room_wait = TRUE; ++ g_signal_connect_object (clock, "after-paint", G_CALLBACK (on_frame_painted), self, ++ G_CONNECT_SWAPPED | G_CONNECT_AFTER); ++ } ++ gtk_widget_queue_draw (GTK_WIDGET (self)); ++} ++ ++ ++static void ++tactus_update_shape (PosInputSurface *self) ++{ ++ int width, height, clear, room; ++ cairo_rectangle_int_t rect; ++ cairo_region_t *region; ++ ++ /* The number pad takes the place of the keys, no more and no less */ ++ if (self->last_layout && POS_IS_OSK_WIDGET (self->last_layout) && !self->searching) { ++ GtkWidget *others[] = { self->keypad }; ++ int natural = 0, panel, over; ++ ++ gtk_widget_get_preferred_height (self->last_layout, &natural, NULL); ++ panel = pos_osk_widget_get_panel_height (POS_OSK_WIDGET (self->last_layout)); ++ over = MAX (natural - panel, 0); ++ for (guint i = 0; i < G_N_ELEMENTS (others); i++) { ++ int req = 0; ++ ++ gtk_widget_get_size_request (others[i], NULL, &req); ++ if (gtk_widget_get_margin_top (others[i]) != over) ++ gtk_widget_set_margin_top (others[i], over); ++ if (req != panel) ++ gtk_widget_set_size_request (others[i], -1, panel); ++ } ++ } ++ ++ if (!gtk_widget_get_realized (GTK_WIDGET (self))) ++ return; ++ ++ width = gtk_widget_get_allocated_width (GTK_WIDGET (self)); ++ height = gtk_widget_get_allocated_height (GTK_WIDGET (self)); ++ clear = tactus_measure_clear (self); ++ if (clear >= height) ++ clear = 0; ++ ++ rect = (cairo_rectangle_int_t) { 0, clear, width, height - clear }; ++ region = cairo_region_create_rectangle (&rect); ++ gtk_widget_input_shape_combine_region (GTK_WIDGET (self), region); ++ cairo_region_destroy (region); ++ ++ self->clear = clear; ++ ++ /* Room is kept for the panel only, less the little the windows reach ++ * under its top: past the panel's round corners it is then the application ++ * that shows, not the wallpaper. Whichever page shows. Not while the ++ * keyboard slides: there pos_input_surface_move sets it. */ ++ if (self->surface_visible != TRUE || self->animation.progress < 1.0) ++ return; ++ ++ if (!tactus_settled (self)) { ++ /* A page of another height has just come up and the surface has asked ++ * for that height. A lower page gives its room back now, while the ++ * taller one is still on the screen; a taller one waits (below). */ ++ GtkWidget *child = hdy_deck_get_visible_child (self->deck); ++ int asked = 0, above = 0; ++ ++ g_object_get (self, "height", &asked, NULL); ++ if (clear > 0 && child) { ++ above = gtk_widget_get_margin_top (child); ++ if (POS_IS_OSK_WIDGET (child)) ++ above += pos_osk_widget_get_overhang (POS_OSK_WIDGET (child)); ++ } ++ room = MAX (asked - above - tactus_under (self), 0); ++ if (room < self->zone) ++ tactus_keep_room (self, room); ++ return; ++ } ++ ++ room = MAX (height - clear - tactus_under (self), 0); ++ if (room < self->zone) ++ tactus_keep_room (self, room); ++ else if (room > self->zone) ++ tactus_room_after_paint (self); ++} ++ ++ ++static void ++on_shape_idle (gpointer data) ++{ ++ PosInputSurface *self = POS_INPUT_SURFACE (data); ++ ++ self->shape_id = 0; ++ tactus_update_shape (self); ++} ++ ++ ++static void ++tactus_queue_shape (PosInputSurface *self) ++{ ++ if (self->shape_id == 0) ++ self->shape_id = g_idle_add_once (on_shape_idle, self); ++} ++ ++/* The surface got a new size (a page of another height came up) */ ++static void ++on_surface_size_allocate (PosInputSurface *self) ++{ ++ tactus_queue_shape (self); ++} ++ ++/* The number pad draws no ground of its own: its style's, before its keys */ ++static gboolean ++on_page_draw (GtkWidget *widget, cairo_t *cr) ++{ ++ gtk_render_background (gtk_widget_get_style_context (widget), cr, 0, 0, ++ gtk_widget_get_allocated_width (widget), ++ gtk_widget_get_allocated_height (widget)); ++ return GDK_EVENT_PROPAGATE; ++} ++ ++/* What isn't drawn by the keyboard itself (the emoji, the number pad, the ++ * bars) in the keyboard's colours */ ++static void ++tactus_update_css (PosInputSurface *self) ++{ ++ g_autofree char *scheme = g_settings_get_string (self->interface_settings, "color-scheme"); ++ g_autofree char *css = NULL; ++ g_autoptr (GError) err = NULL; ++ TactusTheme theme; ++ ++ tactus_theme_init (&theme, g_strcmp0 (scheme, "prefer-dark") == 0); ++ css = tactus_theme_css (&theme); ++ if (!gtk_css_provider_load_from_data (self->tactus_css, css, -1, &err)) ++ g_warning ("The keyboard's colours: %s", err->message); ++} ++ ++ + static void + on_visible_child_changed (PosInputSurface *self) + { +@@ -1048,6 +1607,11 @@ + child = hdy_deck_get_visible_child (self->deck); + + pos_input_surface_toggle_shortcuts_bar (self); ++ /* the pages differ in height */ ++ tactus_typer_settle (self->typer, 700); ++ tactus_queue_shape (self); ++ if (!POS_INPUT_SURFACE_IS_LANG_LAYOUT (child)) ++ tactus_search_set (self, FALSE); + + if (!POS_IS_OSK_WIDGET (child)) + return; +@@ -1055,6 +1619,11 @@ + osk = POS_OSK_WIDGET (child); + g_debug ("Switched to layout '%s'", pos_osk_widget_get_display_name (osk)); + pos_osk_widget_set_layer (osk, POS_OSK_WIDGET_LAYER_NORMAL); ++ /* Capitals where a sentence starts, on the layouts that write sentences */ ++ if (POS_INPUT_SURFACE_IS_LANG_LAYOUT (osk)) ++ pos_osk_widget_set_autoshift (osk, self->typer_on && self->autoshift && !self->searching, TRUE); ++ else ++ pos_osk_widget_set_flat_top (osk, gtk_widget_get_visible (GTK_WIDGET (self->shortcuts_bar))); + + set_keymap (self); + +@@ -1100,9 +1669,11 @@ + + if (self->animation.progress >= 1.0 && self->animation.show) { + /* On unfold adjust the exclusive zone at the very end to avoid flickering */ +- phosh_layer_surface_set_exclusive_zone (PHOSH_LAYER_SURFACE (self), height); ++ self->zone = MAX (height - self->clear - tactus_under (self), 0); ++ phosh_layer_surface_set_exclusive_zone (PHOSH_LAYER_SURFACE (self), self->zone); + } else if (self->animation.progress <= 0.0 && !self->animation.show) { + /* On fold adjust the exclusive zone at the start to avoid flickering */ ++ self->zone = 0; + phosh_layer_surface_set_exclusive_zone (PHOSH_LAYER_SURFACE (self), 0); + } + +@@ -1363,7 +1934,8 @@ + pos_input_surface_set_min_height (self, g_value_get_uint (value)); + break; + case PROP_DEAD_ZONE: +- self->dead_zone = g_value_get_uint (value); ++ /* Tactus has the strip under its keys for that */ ++ self->dead_zone = 0; + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +@@ -1630,6 +2202,7 @@ + on_im_text_change_cause_changed, self, + "swapped-object-signal::notify::surrounding-text", + on_im_surrounding_text_changed, self, ++ "swapped-object-signal::done", on_im_done, self, + NULL); + + set_keymap (self); +@@ -1667,6 +2240,15 @@ + g_clear_handle_id (&self->animation.id, g_source_remove); + g_clear_handle_id (&self->bs_repeat_id, g_source_remove); + g_clear_handle_id (&self->keymap_delayed_id, g_source_remove); ++ g_clear_handle_id (&self->typer_wake_id, g_source_remove); ++ g_clear_handle_id (&self->shape_id, g_source_remove); ++ g_clear_pointer (&self->typer, tactus_typer_free); ++ if (self->tactus_css) { ++ gtk_style_context_remove_provider_for_screen (gdk_screen_get_default (), ++ GTK_STYLE_PROVIDER (self->tactus_css)); ++ g_clear_object (&self->tactus_css); ++ } ++ g_clear_object (&self->interface_settings); + + g_clear_object (&self->speech_input); + g_clear_object (&self->logind_session); +@@ -1813,13 +2395,12 @@ + gtk_widget_get_preferred_size (GTK_WIDGET (self), &min, NULL); + g_object_get (self, "height", &height, NULL); + +- min.height = MAX (min.height, self->min_height); ++ /* Tactus has its own measures: it is as high as it is */ + + if (gtk_widget_get_mapped (GTK_WIDGET (self)) && min.height != height) { + phosh_layer_surface_set_size (PHOSH_LAYER_SURFACE (self), -1, min.height); +- /* Don't interfere with animation */ +- if (self->animation.progress >= 1.0) +- phosh_layer_surface_set_exclusive_zone (PHOSH_LAYER_SURFACE (self), min.height); ++ /* The room kept for it follows in tactus_update_shape, once the surface ++ * has its new size: asked for here it would be worked out from the old one */ + } + + /* Ensure unfold animation starts from the screen bottom */ +@@ -1827,6 +2408,8 @@ + phosh_layer_surface_set_margins (PHOSH_LAYER_SURFACE (self), 0, 0, -min.height, 0); + + GTK_CONTAINER_CLASS (pos_input_surface_parent_class)->check_resize (container); ++ ++ tactus_update_shape (self); + } + + +@@ -2073,6 +2656,7 @@ + "swapped-signal::notify::mode", G_CALLBACK (on_osk_mode_changed), self, + "swapped-signal::popover-shown", G_CALLBACK (on_osk_popover_shown), self, + "swapped-signal::popover-hidden", G_CALLBACK (on_osk_popover_hidden), self, ++ "swapped-signal::strip-key", G_CALLBACK (on_osk_strip_key), self, + NULL); + + hdy_deck_insert_child_after (self->deck, GTK_WIDGET (osk_widget), NULL); +@@ -2367,8 +2951,51 @@ + g_autoptr (GError) err = NULL; + GAction *action; + ++ static const TactusTyperOps typer_ops = { ++ .commit = tactus_op_commit, ++ .erase = tactus_op_erase, ++ .key = tactus_op_key, ++ .shift = tactus_op_shift, ++ .wake = tactus_op_wake, ++ .ack = tactus_op_ack, ++ }; ++ + gtk_widget_init_template (GTK_WIDGET (self)); + ++ self->typer = tactus_typer_new (&typer_ops, self); ++ self->clear = -1; ++ self->zone = -1; ++ g_signal_connect (self, "size-allocate", G_CALLBACK (on_surface_size_allocate), NULL); ++ /* The pages change at once, as keys do, and each is as high as it is */ ++ hdy_deck_set_transition_duration (self->deck, 0); ++ hdy_deck_set_homogeneous (self->deck, GTK_ORIENTATION_VERTICAL, FALSE); ++ g_signal_connect_swapped (self->osk_terminal, "strip-key", G_CALLBACK (on_osk_strip_key), self); ++ g_signal_connect (self->keypad, "draw", G_CALLBACK (on_page_draw), NULL); ++ g_object_connect (self->emoji_picker, ++ "swapped-signal::mic", G_CALLBACK (on_emoji_picker_mic), self, ++ "swapped-signal::search", G_CALLBACK (on_emoji_picker_search), self, ++ NULL); ++ /* The search for emoji: on top of the keys, when it is asked for */ ++ { ++ GtkWidget *box = gtk_widget_get_parent (GTK_WIDGET (self->deck)); ++ ++ self->emoji_search = pos_emoji_search_new (); ++ gtk_widget_set_no_show_all (self->emoji_search, TRUE); ++ gtk_box_pack_start (GTK_BOX (box), self->emoji_search, FALSE, FALSE, 0); ++ gtk_box_reorder_child (GTK_BOX (box), self->emoji_search, 2); ++ g_signal_connect_swapped (self->emoji_search, "emoji-picked", G_CALLBACK (on_search_emoji_picked), self); ++ } ++ ++ self->tactus_css = gtk_css_provider_new (); ++ gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), ++ GTK_STYLE_PROVIDER (self->tactus_css), ++ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 10); ++ self->interface_settings = g_settings_new ("org.gnome.desktop.interface"); ++ g_signal_connect_swapped (self->interface_settings, "changed::color-scheme", ++ G_CALLBACK (tactus_update_css), self); ++ tactus_theme_watch (self, G_CALLBACK (tactus_update_css)); ++ tactus_update_css (self); ++ + self->bs_mode = POS_BACKSPACE_MODE_CHAR; + self->style_manager = pos_style_manager_new (); + self->action_map = g_simple_action_group_new (); +@@ -2503,6 +3130,11 @@ + + self->surface_visible = visible; + g_object_notify_by_pspec (G_OBJECT (self), props[PROP_SURFACE_VISIBLE]); ++ if (!visible) ++ tactus_search_set (self, FALSE); ++ else if (!self->layout_overriden && self->input_method) ++ /* the page the text field asks for, whatever showed last */ ++ select_layout_by_im_purpose (self); + + self->animation.show = visible; + self->animation.last_frame = -1; +@@ -2618,7 +3250,12 @@ + g_autofree char *name = NULL; + + if (g_str_equal (type, "")) { ++ gboolean was = self->layout_overriden; ++ + self->layout_overriden = FALSE; ++ /* back to what the text field asks for, without waiting for the keyboard to go and come */ ++ if (was) ++ select_layout_by_im_purpose (self); + return; + } + diff --git a/packages/tactus/source/tactus-autocorrect.c b/packages/tactus/source/tactus-autocorrect.c new file mode 100644 index 000000000..9a4beb275 --- /dev/null +++ b/packages/tactus/source/tactus-autocorrect.c @@ -0,0 +1,888 @@ +/* + * Tactus's autocorrection: which word the owner meant. + * + * A typed word is weighed against the words it could have been: by where + * each finger landed (a tap near the edge of a key speaks for its neighbour), + * by how common each word is, and by the usual slips (two letters swapped, + * one missed or doubled, a missed space, a missing apostrophe). A word the + * dictionary knows is replaced only when the taps themselves were close + * calls; a word the owner took back once is left alone from then on. + * + * English on a QWERTY keyboard only. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#define G_LOG_DOMAIN "tactus-autocorrect" + +#include "pos-config.h" + +#include "tactus-autocorrect.h" + +#include +#include + +#include +#include +#include + +#define DICT_DIRS "/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts" +/* How often each word is seen in everyday writing: "word count" lines, the + * commonest first (hermitdave's FrequencyWords, en_50k.txt). TACTUS_WORD_COUNTS + * in the environment names another file, for the tests. */ +#define FREQ_DEFAULT TACTUS_PKGDATADIR "/en_50k.txt" +#define MAX_LEN 24 +/* How often a word is seen in the list before it counts as everyday writing */ +#define COMMON 300 +/* The least a word must be seen to be offered at all */ +#define OFFERED 50 +/* What a word the owner taught the keyboard counts as */ +#define LEARNED 50000 +/* The spread of a finger around the key it aims at: across in key widths, down in row heights */ +#define SIGMA_X 0.42 +#define SIGMA_Y 0.36 +#define KX (1.0 / (2.0 * SIGMA_X * SIGMA_X)) +#define KY (1.0 / (2.0 * SIGMA_Y * SIGMA_Y)) +/* No letter of a guess may be further from its tap than this */ +#define LETTER_MAX 9.0 +/* … nor all of them together than this (about two keys missed by a whole + * key), a little more for each letter of a long word */ +#define REACH_TAPS 6.0 +#define REACH_LONG 6 +#define REACH_MORE 0.6 +/* With no taps to go by: one key missed in a short word, two in a longer one */ +#define REACH_SHORT 4.6 +#define REACH_BLIND 6.8 +/* The usual slips, in the same currency as the taps */ +#define COST_SWAP 2.5 +#define COST_EXTRA 3.0 +#define COST_MISSED 3.0 +/* a letter that should have been typed twice, or once */ +#define COST_DOUBLE 1.5 +/* the g of -ing left off */ +#define COST_DROPPED 1.0 +#define COST_SPLIT 2.5 +#define COST_GUESS 3.2 + +/* How common both halves must be for a word to be two words run together */ +#define SPLIT_COMMON 2000 +/* A word not in the dictionary starts this far behind; one that is not, but + * that people do write, this far */ +#define UNKNOWN 8.0 +#define SEEN 3.0 +/* What such a word is replaced by is an everyday word: slips of rare words are rare */ +#define FIX_COMMON 1000 +/* The dictionary's own guess may differ by two letters only if it is a very common word */ +#define GUESS_TWO 20000 +/* A known word gives way only to a clearly likelier one, and only when the taps were close calls */ +#define KNOWN_MARGIN 4.0 +#define KNOWN_REACH 1.5 +#define OTHER_MARGIN 1.0 +/* How fast the keyboard learns where this owner's fingers land, and how far it may go */ +#define BIAS_RATE 0.01 +#define BIAS_MAX_X 0.15 +#define BIAS_MAX_Y 0.25 +#define BIAS_SAVE 40 +/* … and the typed word long enough */ +#define GUESS_LONG 7 + +typedef struct { + const char *letters; /* a to z only: what is typed */ + const char *display; /* with its apostrophe, and "I" */ + guint count; +} Entry; + +static gboolean inited; +static Hunhandle *hun; +static GHashTable *freq; +static GHashTable *learned; +static GStringChunk *chunk; +static GArray *by_len[MAX_LEN + 1]; +static double bias_x, bias_y; +static guint bias_unsaved; +static gboolean bias_loaded; + +/* Written the way people write, not in the dictionary */ +static const char *const informal[] = { + "ok", "okay", "k", "kk", "lol", "lmao", "lmfao", "rofl", "omg", "omfg", "wtf", "wth", "idk", + "idc", "btw", "tbh", "imo", "imho", "fyi", "asap", "brb", "afk", "gtg", "ttyl", "irl", "omw", + "smh", "ikr", "nvm", "tmi", "bff", "fomo", "yolo", "jk", "gg", "ty", "tysm", "yw", "np", + "hbu", "wyd", "hmu", "ily", "ngl", "fr", "rn", "af", "ofc", "lmk", "iirc", "afaik", "tldr", + "eta", "aka", "etc", "vs", "ie", "eg", "bc", "cuz", "coz", "tho", "thru", "tmrw", "tmr", + "pls", "plz", "thx", "ur", "u", "xoxo", + "haha", "hahaha", "hehe", "hah", "heh", "hmm", "hm", "mhm", "uh", "um", "umm", "uhh", "yea", + "yeh", "ya", "nah", "nope", "yep", "yup", "yeah", "aww", "aw", "wow", "whoa", "yay", "yikes", + "oops", "whoops", "meh", "duh", "eh", "huh", "shh", "psst", "ew", "eww", "ooh", "oh", "ah", + "aha", "ahh", "argh", "grr", "ugh", "hey", "hi", "yo", "bye", "nite", + "gonna", "wanna", "gotta", "kinda", "sorta", "dunno", "gimme", "lemme", "outta", "tryna", + "wifi", "emoji", "emojis", "selfie", "app", "apps", "blog", "podcast", "login", "username", + "hotspot", "online", "offline", "email", "emails", "internet", "website", "smartphone", + "laptop", "linux", "github", "ssh", "sudo", "repo", "config", "kernel", "bluetooth", + "screenshot", "livestream", "inbox", "unfollow", "hashtag", "admin", "sync", + NULL, +}; + + +/* Words with an apostrophe, by the letters people type for them. The word + * list counts their halves apart ("don" and "t"), so the counts are set here, + * in its measure. Left out where the letters are a word of their own that is + * as likely meant: its, well, were, hell, shell, wed, shed, ill, id, lets. */ +static const struct { + const char *letters; + const char *display; + guint count; +} contractions[] = { + { "im", "I'm", 5000000 }, { "ive", "I've", 800000 }, + { "dont", "don't", 4100000 }, { "didnt", "didn't", 1100000 }, { "doesnt", "doesn't", 470000 }, + { "isnt", "isn't", 430000 }, { "wasnt", "wasn't", 310000 }, { "cant", "can't", 1200000 }, + { "wont", "won't", 400000 }, { "wouldnt", "wouldn't", 290000 }, { "couldnt", "couldn't", 230000 }, + { "shouldnt", "shouldn't", 120000 }, { "arent", "aren't", 180000 }, { "werent", "weren't", 90000 }, + { "havent", "haven't", 250000 }, { "hasnt", "hasn't", 70000 }, { "hadnt", "hadn't", 45000 }, + { "aint", "ain't", 200000 }, { "mustnt", "mustn't", 17000 }, + { "thats", "that's", 2500000 }, { "whats", "what's", 1000000 }, { "hes", "he's", 1000000 }, + { "shes", "she's", 600000 }, { "theres", "there's", 800000 }, { "heres", "here's", 300000 }, + { "whos", "who's", 250000 }, { "hows", "how's", 80000 }, { "wheres", "where's", 200000 }, + { "youre", "you're", 2000000 }, { "theyre", "they're", 600000 }, + { "youll", "you'll", 400000 }, { "theyll", "they'll", 100000 }, { "itll", "it'll", 80000 }, + { "thatll", "that'll", 30000 }, { "youve", "you've", 400000 }, { "weve", "we've", 300000 }, + { "theyve", "they've", 100000 }, { "couldve", "could've", 30000 }, { "wouldve", "would've", 30000 }, + { "shouldve", "should've", 30000 }, { "youd", "you'd", 150000 }, { "theyd", "they'd", 50000 }, + { "hed", "he'd", 70000 }, { "yall", "y'all", 20000 }, { "oclock", "o'clock", 30000 }, + { "maam", "ma'am", 80000 }, +}; + +/* Halves of those words that the word list counts as words: what they count as on their own */ +static const struct { + const char *word; + guint count; +} recount[] = { + { "don", 3000 }, { "won", 60000 }, { "haven", 2000 }, { "re", 3000 }, { "shan", 100 }, + { "ain", 100 }, { "ll", 0 }, { "ve", 0 }, { "didn", 0 }, { "doesn", 0 }, { "isn", 0 }, + { "wasn", 0 }, { "wouldn", 0 }, { "couldn", 0 }, { "shouldn", 0 }, { "aren", 0 }, + { "weren", 0 }, { "hasn", 0 }, { "hadn", 0 }, { "mustn", 0 }, +}; + +/* Written in capitals */ +static const char *const acronyms[] = { + "tv", "fbi", "dna", "usa", "uk", "nyc", "dvd", "ceo", "atm", "gps", "usb", "pdf", "diy", + "faq", "vip", "ufo", "nasa", "bbc", "nba", "nfl", "suv", "hiv", "html", "url", "api", + NULL, +}; + + +static gboolean +key_pos (char c, double *x, double *y) +{ + static const char *rows[] = { "qwertyuiop", "asdfghjkl", "zxcvbnm" }; + static const double first[] = { 0.5, 1.0, 2.0 }; + + for (int r = 0; r < 3; r++) { + const char *at = strchr (rows[r], c); + + if (at && c) { + *x = first[r] + (at - rows[r]); + *y = r; + return TRUE; + } + } + return FALSE; +} + + +static char * +state_path (const char *name) +{ + return g_build_filename (g_get_user_state_dir (), "tactus", name, NULL); +} + + +static char * +words_path (void) +{ + return g_build_filename (g_get_user_data_dir (), "tactus", "words.txt", NULL); +} + + +static gboolean +hun_ok (const char *word) +{ + return hun && Hunspell_spell (hun, word); +} + + +static guint +count_of (const char *lower) +{ + guint count = freq ? GPOINTER_TO_UINT (g_hash_table_lookup (freq, lower)) : 0; + + if (learned && g_hash_table_contains (learned, lower)) + count = MAX (count, LEARNED); + return count; +} + +/* A word that stands: in the dictionary (also as a name), taught, or everyday writing */ +static gboolean +is_solid (const char *lower) +{ + g_autofree char *capital = NULL; + + if (learned && g_hash_table_contains (learned, lower)) + return TRUE; + if (hun_ok (lower)) + return TRUE; + /* a name ("michael"); of two letters, the dictionary takes about anything */ + if (strlen (lower) >= 3) { + capital = g_strdup (lower); + capital[0] = g_ascii_toupper (capital[0]); + if (hun_ok (capital)) + return TRUE; + } + return g_strv_contains (informal, lower); +} + + +static void +load_bias (void) +{ + g_autofree char *path = state_path ("touch"); + g_autofree char *contents = NULL; + char *end = NULL; + double x, y; + + bias_loaded = TRUE; + if (!g_file_get_contents (path, &contents, NULL, NULL)) + return; + + x = g_ascii_strtod (contents, &end); + if (end == contents) + return; + y = g_ascii_strtod (end, NULL); + if (fabs (x) <= BIAS_MAX_X && fabs (y) <= BIAS_MAX_Y) { + bias_x = x; + bias_y = y; + } +} + +/** + * tactus_ac_save: + * + * Keep what was learned about where the owner's fingers land. + */ +void +tactus_ac_save (void) +{ + g_autofree char *path = state_path ("touch"); + g_autofree char *dir = g_path_get_dirname (path); + g_autofree char *text = NULL; + char bx[G_ASCII_DTOSTR_BUF_SIZE], by[G_ASCII_DTOSTR_BUF_SIZE]; + + if (!bias_loaded || bias_unsaved == 0) + return; + + g_ascii_formatd (bx, sizeof (bx), "%.4f", bias_x); + g_ascii_formatd (by, sizeof (by), "%.4f", bias_y); + text = g_strdup_printf ("%s %s\n", bx, by); + g_mkdir_with_parents (dir, 0700); + if (g_file_set_contents (path, text, -1, NULL)) + bias_unsaved = 0; +} + + +static void +add_entry (const char *letters, const char *display, guint count) +{ + size_t len = strlen (letters); + Entry entry; + + if (len < 1 || len > MAX_LEN) + return; + + entry.letters = g_string_chunk_insert (chunk, letters); + entry.display = g_string_chunk_insert (chunk, display); + entry.count = count; + g_array_append_val (by_len[len], entry); +} + +/* The words a typed word can become: the dictionary's words by how often + * they are written, names with their capital, and the words with an + * apostrophe by the letters people type for them */ +static void +build_index (void) +{ + GHashTableIter iter; + gpointer key, value; + + for (int i = 0; i <= MAX_LEN; i++) + by_len[i] = g_array_new (FALSE, FALSE, sizeof (Entry)); + + g_hash_table_iter_init (&iter, freq); + while (g_hash_table_iter_next (&iter, &key, &value)) { + const char *word = key; + guint count = GPOINTER_TO_UINT (value); + size_t n = strlen (word); + gboolean plain = TRUE; + + if (count < OFFERED || n > MAX_LEN) + continue; + for (const char *p = word; *p; p++) + plain = plain && *p >= 'a' && *p <= 'z'; + if (!plain) + continue; + + if (n == 1) { + /* "a" and "I" are the words of one letter */ + if (word[0] == 'a') + add_entry ("a", "a", count); + else if (word[0] == 'i') + add_entry ("i", "I", count); + continue; + } + + if (hun_ok (word)) { + add_entry (word, word, count); + } else if (n >= 3) { + g_autofree char *capital = g_strdup (word); + + capital[0] = g_ascii_toupper (capital[0]); + if (hun_ok (capital)) + add_entry (word, capital, count); + } + } + + for (guint i = 0; i < G_N_ELEMENTS (contractions); i++) + add_entry (contractions[i].letters, contractions[i].display, contractions[i].count); +} + + +static void +ensure_init (void) +{ + const char *freq_path = g_getenv ("TACTUS_WORD_COUNTS") ?: FREQ_DEFAULT; + g_auto (GStrv) dirs = g_strsplit (DICT_DIRS, ":", -1); + g_autofree char *contents = NULL; + g_autofree char *words = words_path (); + + if (inited) + return; + inited = TRUE; + + for (int i = 0; dirs[i] && hun == NULL; i++) { + g_autofree char *aff = g_build_filename (dirs[i], "en_US.aff", NULL); + g_autofree char *dic = g_build_filename (dirs[i], "en_US.dic", NULL); + + if (g_file_test (aff, G_FILE_TEST_EXISTS) && g_file_test (dic, G_FILE_TEST_EXISTS)) + hun = Hunspell_create (aff, dic); + } + if (hun == NULL) + g_warning ("No English dictionary: the keyboard does not correct"); + + chunk = g_string_chunk_new (4096); + freq = g_hash_table_new (g_str_hash, g_str_equal); + if (g_file_get_contents (freq_path, &contents, NULL, NULL)) { + char *save = NULL; + + for (char *line = strtok_r (contents, "\n", &save); line; line = strtok_r (NULL, "\n", &save)) { + char *space = strchr (line, ' '); + guint64 count; + + if (space == NULL) + continue; + *space = '\0'; + count = g_ascii_strtoull (space + 1, NULL, 10); + g_hash_table_insert (freq, g_string_chunk_insert (chunk, line), + GUINT_TO_POINTER ((guint) MIN (count, G_MAXUINT))); + } + for (guint i = 0; i < G_N_ELEMENTS (recount); i++) { + if (g_hash_table_contains (freq, recount[i].word)) + g_hash_table_replace (freq, (gpointer) recount[i].word, GUINT_TO_POINTER (recount[i].count)); + } + } else { + g_warning ("No word list at %s: the keyboard corrects by the dictionary alone", freq_path); + } + + learned = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + g_clear_pointer (&contents, g_free); + if (g_file_get_contents (words, &contents, NULL, NULL)) { + g_auto (GStrv) lines = g_strsplit (contents, "\n", -1); + + for (int i = 0; lines[i]; i++) { + g_strstrip (lines[i]); + if (*lines[i]) + g_hash_table_add (learned, g_ascii_strdown (lines[i], -1)); + } + } + + if (hun) + build_index (); + load_bias (); +} + +/** + * tactus_ac_available: + * + * Returns: %TRUE if there is a dictionary to correct by + */ +gboolean +tactus_ac_available (void) +{ + ensure_init (); + return hun != NULL; +} + +/** + * tactus_ac_learn: + * @word: A word the owner wants as typed + * + * The owner took a correction of this word back: leave it alone from now on. + * The words are kept on this device only. + */ +void +tactus_ac_learn (const char *word) +{ + g_autofree char *path = words_path (); + g_autofree char *dir = g_path_get_dirname (path); + g_autofree char *lower = NULL; + FILE *f; + + ensure_init (); + if (word == NULL || *word == '\0' || strchr (word, ' ')) + return; + + lower = g_ascii_strdown (word, -1); + if (g_hash_table_contains (learned, lower)) + return; + g_hash_table_add (learned, g_strdup (lower)); + + g_mkdir_with_parents (dir, 0700); + f = g_fopen (path, "a"); + if (f) { + fprintf (f, "%s\n", lower); + fclose (f); + } +} + + +typedef struct { + char text[2 * MAX_LEN + 4]; + double score; + double reach; /* how much further from the taps than the word as typed */ + gboolean by_taps; /* a word of the same letters count, weighed tap by tap */ + gboolean found; +} Best; + + +static void +consider (Best *best, const char *text, double cost, guint count, double typed_cost, gboolean by_taps) +{ + double score; + + if (count < OFFERED) + return; + score = cost - log ((double) count); + if (best->found && score >= best->score) + return; + + g_strlcpy (best->text, text, sizeof (best->text)); + best->score = score; + best->reach = cost - typed_cost; + best->by_taps = by_taps; + best->found = TRUE; +} + +/* The count and the written form of a word of these letters, if it may be offered */ +static guint +offer (const char *letters, const char **display) +{ + size_t len = strlen (letters); + guint best = 0; + + *display = NULL; + if (len < 1 || len > MAX_LEN) + return 0; + + for (guint i = 0; i < by_len[len]->len; i++) { + Entry *e = &g_array_index (by_len[len], Entry, i); + + if (e->count > best && strcmp (e->letters, letters) == 0) { + best = e->count; + *display = e->display; + } + } + return best; +} + + +static char * +with_case (const char *typed, const char *fixed) +{ + char *out = g_strdup (fixed); + + if (g_ascii_isupper (typed[0])) + out[0] = g_ascii_toupper (out[0]); + return out; +} + +/* The fewest single-letter changes (one swapped pair counts once) from one word to another */ +static guint +edits (const char *a, const char *b) +{ + size_t n = strlen (a), m = strlen (b); + g_autofree guint *d = g_new0 (guint, (n + 1) * (m + 1)); +#define D(i, j) d[(i) * (m + 1) + (j)] + + for (size_t i = 0; i <= n; i++) + D (i, 0) = i; + for (size_t j = 0; j <= m; j++) + D (0, j) = j; + for (size_t i = 1; i <= n; i++) { + for (size_t j = 1; j <= m; j++) { + guint cost = g_ascii_tolower (a[i - 1]) == g_ascii_tolower (b[j - 1]) ? 0 : 1; + guint v = MIN (D (i - 1, j) + 1, D (i, j - 1) + 1); + + v = MIN (v, D (i - 1, j - 1) + cost); + if (i > 1 && j > 1 && a[i - 1] == b[j - 2] && a[i - 2] == b[j - 1]) + v = MIN (v, D (i - 2, j - 2) + 1); + D (i, j) = v; + } + } + return D (n, m); +#undef D +} + +/** + * tactus_ac_correct: + * @word: The word as typed + * @taps:(nullable): Where the finger landed for each of its letters + * @n_taps: How many of those there are + * @sentence_start: Whether the word starts a sentence, so that its capital says nothing + * + * Returns:(transfer full)(nullable): The word that was meant, or %NULL to keep it as typed + */ +char * +tactus_ac_correct (const char *word, const TactusTap *taps, guint n_taps, gboolean sentence_start) +{ + static const char *const i_tails[] = { "m", "ll", "ve", "d", NULL }; + g_autofree char *lower = NULL; + size_t n; + gboolean have_taps, solid, seen; + double tx[MAX_LEN], ty[MAX_LEN]; + double typed_cost = 0.0, typed_score, reach_max; + guint typed_count, floor; + Best best = { .found = FALSE }; + const char *display; + + ensure_init (); + if (hun == NULL || word == NULL || *word == '\0') + return NULL; + + n = strlen (word); + if (n > MAX_LEN) + return NULL; + + /* "i'm" and its kin, typed with the apostrophe */ + if (word[0] == 'i' && word[1] == '\'' && g_strv_contains (i_tails, word + 2)) { + char *fixed = g_strdup (word); + + fixed[0] = 'I'; + return fixed; + } + + /* Letters only; a capital in mid sentence is a name, and all capitals are meant */ + for (size_t i = 0; i < n; i++) { + if (!g_ascii_isalpha (word[i])) + return NULL; + if (i > 0 && g_ascii_isupper (word[i])) + return NULL; + } + if (g_ascii_isupper (word[0]) && !sentence_start) + return NULL; + + lower = g_ascii_strdown (word, -1); + if (strcmp (lower, "i") == 0) + return strcmp (word, "I") == 0 ? NULL : g_strdup ("I"); + if (n == 1) + return NULL; + /* A word the owner taught stays */ + if (g_hash_table_contains (learned, lower)) + return NULL; + + typed_count = count_of (lower); + + if (g_strv_contains (acronyms, lower)) { + char *upper = g_ascii_strup (lower, -1); + + if (strcmp (upper, word) != 0) + return upper; + g_free (upper); + return NULL; + } + /* A name typed small: "paris", "monday" */ + if (n >= 3 && typed_count >= COMMON && !hun_ok (lower)) { + g_autofree char *capital = g_strdup (lower); + + capital[0] = g_ascii_toupper (capital[0]); + if (hun_ok (capital)) + return strcmp (capital, word) == 0 ? NULL : g_steal_pointer (&capital); + } + + /* How the word stands: solid (the dictionary's, the owner's, everyday + * writing), seen (not a word, but people do write it: "alot", "goin"), or + * not known at all */ + solid = is_solid (lower); + seen = !solid && typed_count >= COMMON; + /* What a word that isn't solid is replaced by is an everyday word */ + floor = solid ? OFFERED : FIX_COMMON; + + have_taps = taps != NULL && n_taps == n; + for (size_t i = 0; have_taps && i < n; i++) + have_taps = taps[i].valid; + + /* Where each finger landed, on a keyboard of unit keys. With no taps to go + * by, as if each was dead centre: then only the letters speak. */ + for (size_t i = 0; i < n; i++) { + double x = 0.0, y = 0.0; + + if (!key_pos (lower[i], &x, &y)) + return NULL; + tx[i] = x; + ty[i] = y; + if (have_taps) { + tx[i] += taps[i].dx - bias_x; + ty[i] += taps[i].dy - bias_y; + typed_cost += KX * (tx[i] - x) * (tx[i] - x) + KY * (ty[i] - y) * (ty[i] - y); + } + } + + /* Words of as many letters, tap by tap; among them the same letters with an apostrophe */ + if (have_taps) + reach_max = REACH_TAPS + REACH_MORE * MAX ((int) n - REACH_LONG, 0); + else + reach_max = n <= 4 ? REACH_SHORT : REACH_BLIND; + for (guint w = 0; w < by_len[n]->len; w++) { + Entry *e = &g_array_index (by_len[n], Entry, w); + double cost = 0.0; + gboolean out = FALSE; + + if (e->count < floor || strcmp (e->display, lower) == 0) + continue; + for (size_t i = 0; i < n; i++) { + double x = 0.0, y = 0.0, c; + + key_pos (e->letters[i], &x, &y); + c = KX * (tx[i] - x) * (tx[i] - x) + KY * (ty[i] - y) * (ty[i] - y); + if (c > LETTER_MAX) { + out = TRUE; + break; + } + cost += c; + } + if (out || cost - typed_cost > reach_max) + continue; + consider (&best, e->display, cost, e->count, typed_cost, TRUE); + } + + /* The usual slips of a word that isn't one: two letters swapped, a letter + * too many, a letter missed, a space missed or hit as the key above it */ + if (!solid) { + char cand[MAX_LEN + 4]; + const char *az = "abcdefghijklmnopqrstuvwxyz"; + guint count; + + for (size_t i = 0; i + 1 < n; i++) { + if (lower[i] == lower[i + 1]) + continue; + memcpy (cand, lower, n + 1); + cand[i] = lower[i + 1]; + cand[i + 1] = lower[i]; + if ((count = offer (cand, &display)) >= floor) + consider (&best, display, typed_cost + COST_SWAP, count, typed_cost, FALSE); + } + if (n > 2) { + for (size_t i = 0; i < n; i++) { + memcpy (cand, lower, i); + memcpy (cand + i, lower + i + 1, n - i); + /* not down to a word with an apostrophe: "iam" is "I am", not "I'm" */ + if ((count = offer (cand, &display)) >= floor && !strchr (display, '\'')) { + gboolean twice = (i > 0 && lower[i] == lower[i - 1]) || lower[i] == lower[i + 1]; + + consider (&best, display, typed_cost + (twice ? COST_DOUBLE : COST_EXTRA), count, typed_cost, FALSE); + } + } + } + if (n + 1 <= MAX_LEN) { + for (size_t i = 0; i <= n; i++) { + for (const char *c = az; *c; c++) { + memcpy (cand, lower, i); + cand[i] = *c; + memcpy (cand + i + 1, lower + i, n - i + 1); + if ((count = offer (cand, &display)) >= floor) { + gboolean twice = (i > 0 && *c == lower[i - 1]) || (i < n && *c == lower[i]); + /* "goin", "nothin" */ + gboolean dropped = i == n && *c == 'g' && n >= 4 && g_str_has_suffix (lower, "in"); + + consider (&best, display, typed_cost + (dropped ? COST_DROPPED : twice ? COST_DOUBLE : COST_MISSED), + count, typed_cost, FALSE); + } + } + } + } + if (n >= 3) { + for (size_t i = 1; i < n; i++) { + char left[MAX_LEN + 1], right[MAX_LEN + 1]; + const char *dl, *dr; + guint cl, cr; + + memcpy (left, lower, i); + left[i] = '\0'; + cl = offer (left, &dl); + if (cl < SPLIT_COMMON) + continue; + + /* the space was missed */ + memcpy (right, lower + i, n - i + 1); + cr = offer (right, &dr); + if (cr >= SPLIT_COMMON && n >= 4 - (i == 1 ? 1 : 0)) { + g_autofree char *both = g_strdup_printf ("%s %s", dl, dr); + + consider (&best, both, typed_cost + COST_SPLIT, MIN (cl, cr), typed_cost, FALSE); + } + + /* a key of the row above the space bar was hit for it */ + if (n >= 5 && i + 1 < n && strchr ("cvbnm", lower[i])) { + memcpy (right, lower + i + 1, n - i); + cr = offer (right, &dr); + if (cr >= SPLIT_COMMON) { + g_autofree char *both = g_strdup_printf ("%s %s", dl, dr); + + consider (&best, both, typed_cost + COST_SPLIT + 1.0, MIN (cl, cr), typed_cost, FALSE); + } + } + } + } + + /* The dictionary's own guesses, where nothing above explains the word: + * spelled as it sounds ("definately") */ + if (!best.found && n <= 16) { + char **guesses = NULL; + int n_guesses = Hunspell_suggest (hun, &guesses, lower); + + for (int g = 0; g < MIN (n_guesses, 3); g++) { + const char *guess = guesses[g]; + gboolean plain = g_str_is_ascii (guess); + guint far; + + for (const char *q = guess; plain && *q; q++) + plain = g_ascii_islower (*q); + if (!plain) + continue; + far = edits (lower, guess); + count = count_of (guess); + if (count < floor) + continue; + if (far == 1 || (far == 2 && n >= GUESS_LONG && count >= GUESS_TWO)) + consider (&best, guess, typed_cost + COST_GUESS * far + 0.2 * g, count, typed_cost, FALSE); + } + if (n_guesses > 0) + Hunspell_free_list (hun, &guesses, n_guesses); + } + } + + typed_score = typed_cost - log ((double) MAX (typed_count, 1)); + if (!solid) + typed_score += seen ? SEEN : UNKNOWN; + + if (best.found) { + gboolean take; + + if (solid) + take = best.by_taps && best.reach <= KNOWN_REACH && best.score < typed_score - KNOWN_MARGIN; + else + take = best.score < typed_score - OTHER_MARGIN; + + /* Letter counts only: what was typed never goes to a log (known: 2 solid, + * 1 seen, 0 not in the dictionary) */ + g_debug ("a word of %u letters (known %d, %.1f) against one of %u (%.1f, reach %.1f): replaced %d", + (guint) g_utf8_strlen (word, -1), solid ? 2 : seen ? 1 : 0, typed_score, + (guint) g_utf8_strlen (best.text, -1), best.score, best.reach, take); + if (take) + return with_case (word, best.text); + } + + return NULL; +} + +/** + * tactus_ac_observe: + * @typed: A word as its letters were read + * @meant: The word that went to the text field + * @taps: Where the finger landed for each letter of @typed + * @n_taps: How many of those + * + * Learn where this owner's fingers land compared to the keys they aim at, + * from a word that is trusted to be what was meant. + */ +void +tactus_ac_observe (const char *typed, const char *meant, const TactusTap *taps, guint n_taps) +{ + g_autofree char *a = NULL; + g_autofree char *b = NULL; + size_t n, m = 0; + + ensure_init (); + if (typed == NULL || meant == NULL || taps == NULL) + return; + + n = strlen (typed); + if (n != n_taps || n < 2 || n > MAX_LEN) + return; + + a = g_ascii_strdown (typed, -1); + /* the word that was meant, by its letters */ + b = g_malloc0 (strlen (meant) + 1); + for (const char *p = meant; *p; p++) { + if (g_ascii_isalpha (*p)) + b[m++] = g_ascii_tolower (*p); + else if (*p != '\'') + return; + } + if (m != n) + return; + if (count_of (b) < COMMON) { + const char *display; + + if (offer (b, &display) < COMMON) + return; + } + + for (size_t i = 0; i < n; i++) { + double x, y, mx, my, ox, oy; + + if (!taps[i].valid || !key_pos (a[i], &x, &y) || !key_pos (b[i], &mx, &my)) + continue; + ox = CLAMP (x + taps[i].dx - mx, -1.0, 1.0); + oy = CLAMP (y + taps[i].dy - my, -1.0, 1.0); + bias_x = CLAMP ((1.0 - BIAS_RATE) * bias_x + BIAS_RATE * ox, -BIAS_MAX_X, BIAS_MAX_X); + bias_y = CLAMP ((1.0 - BIAS_RATE) * bias_y + BIAS_RATE * oy, -BIAS_MAX_Y, BIAS_MAX_Y); + bias_unsaved++; + } + if (bias_unsaved >= BIAS_SAVE) + tactus_ac_save (); +} + +/** + * tactus_ac_get_bias: + * @dx:(out): How far right of where they aim this owner's fingers land, in key widths + * @dy:(out): How far below, in row heights + * + * Returns: %TRUE (there is always an answer; it starts at none) + */ +gboolean +tactus_ac_get_bias (double *dx, double *dy) +{ + ensure_init (); + *dx = bias_x; + *dy = bias_y; + return TRUE; +} diff --git a/packages/tactus/source/tactus-autocorrect.h b/packages/tactus/source/tactus-autocorrect.h new file mode 100644 index 000000000..10c5b5b37 --- /dev/null +++ b/packages/tactus/source/tactus-autocorrect.h @@ -0,0 +1,35 @@ +/* + * Tactus's autocorrection: which word the owner meant. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#pragma once + +#include + +G_BEGIN_DECLS + +/* Where a finger landed, from the centre of the key it was read as: across in + * key widths, down in row heights */ +typedef struct { + double dx, dy; + gboolean valid; +} TactusTap; + +gboolean tactus_ac_available (void); +char *tactus_ac_correct (const char *word, + const TactusTap *taps, + guint n_taps, + gboolean sentence_start); +void tactus_ac_learn (const char *word); +void tactus_ac_observe (const char *typed, + const char *meant, + const TactusTap *taps, + guint n_taps); +gboolean tactus_ac_get_bias (double *dx, double *dy); +void tactus_ac_save (void); + +G_END_DECLS diff --git a/packages/tactus/source/tactus-draw.c b/packages/tactus/source/tactus-draw.c new file mode 100644 index 000000000..a36665b23 --- /dev/null +++ b/packages/tactus/source/tactus-draw.c @@ -0,0 +1,857 @@ +/* + * Drawing for Tactus: panel, keys, labels and icons. + * + * Everything here is drawn from measurements in points (1 pt of a 390 pt wide + * phone) and scaled by the caller's factor, so the keyboard keeps its + * proportions on any width. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "tactus-draw.h" + +#include +#include +#include + +#define TACTUS_FONT_FAMILY "Adwaita Sans, Inter, Noto Sans, sans-serif" +/* The share of the font size taken by the lowercase letters and by the capitals (Inter) */ +#define TACTUS_X_HEIGHT 0.546 +#define TACTUS_CAP_HEIGHT 0.727 +/* Icon stroke, in points */ +#define TACTUS_STROKE 1.7 + + +static TactusRgb +mix (TactusRgb a, TactusRgb b, double amount) +{ + return (TactusRgb) { a.r + (b.r - a.r) * amount, a.g + (b.g - a.g) * amount, a.b + (b.b - a.b) * amount }; +} + + +/* The colours that follow from the panel, the keys and the text */ +static void +derive (TactusTheme *theme) +{ + theme->field = mix (theme->panel, theme->key, 0.45); + theme->hint = mix (theme->text, theme->panel, 0.45); + theme->sign = mix (theme->text, theme->panel, 0.2); + theme->disc = mix (theme->panel, theme->text, 0.14); +} + + +static char * +state_file (const char *name) +{ + const char *state = g_getenv ("XDG_STATE_HOME"); + + if (state && *state) + return g_build_filename (state, "omarchy", "current", name, NULL); + return g_build_filename (g_get_home_dir (), ".local", "state", "omarchy", "current", name, NULL); +} + + +static gboolean +parse_hex (const char *text, TactusRgb *rgb) +{ + guint v[3]; + size_t n; + + if (!text) + return FALSE; + if (*text == '#') + text++; + n = strlen (text); + if (n != 6 || strspn (text, "0123456789abcdefABCDEF") != 6) + return FALSE; + for (int i = 0; i < 3; i++) { + char two[3] = { text[2 * i], text[2 * i + 1], 0 }; + + v[i] = (guint) g_ascii_strtoull (two, NULL, 16); + } + *rgb = (TactusRgb) { v[0] / 255.0, v[1] / 255.0, v[2] / 255.0 }; + return TRUE; +} + + +/* + * The applied Omarchy theme's colours (its colors.toml: background, + * foreground, accent and their variants, and the mode), as + * omamobile-keyboard-theme reads them for squeekboard: the panel in the + * theme's darker background, the keys in its lighter one, the text in its + * foreground. FALSE when there is no such file, or the owner keeps Tactus's + * own colours ($XDG_CONFIG_HOME/tactus/own-colours). + */ +static gboolean +theme_from_omarchy (TactusTheme *theme) +{ + g_autofree char *own = g_build_filename (g_get_user_config_dir (), "tactus", "own-colours", NULL); + g_autofree char *path = NULL; + g_autofree char *text = NULL; + g_auto (GStrv) lines = NULL; + g_autoptr (GHashTable) values = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); + TactusRgb bg, fg, lighter, darker; + const char *mode; + + if (g_file_test (own, G_FILE_TEST_EXISTS)) + return FALSE; + path = g_strdup (g_getenv ("TACTUS_THEME_COLORS")); + if (path == NULL || *path == '\0') { + g_free (path); + path = state_file ("theme" G_DIR_SEPARATOR_S "colors.toml"); + } + if (!g_file_get_contents (path, &text, NULL, NULL)) + return FALSE; + + lines = g_strsplit (text, "\n", -1); + for (int i = 0; lines[i]; i++) { + g_auto (GStrv) kv = g_strsplit (lines[i], "=", 2); + char *key, *value; + + if (!kv[0] || !kv[1]) + continue; + key = g_strstrip (kv[0]); + value = g_strstrip (kv[1]); + if (*key == '#' || *key == '\0') + continue; + if (*value == '"') { + char *end = strchr (value + 1, '"'); + + if (!end) + continue; + *end = '\0'; + value++; + } + g_hash_table_replace (values, g_strdup (key), g_strdup (value)); + } + + if (!parse_hex (g_hash_table_lookup (values, "background"), &bg) || + !parse_hex (g_hash_table_lookup (values, "foreground"), &fg)) + return FALSE; + mode = g_hash_table_lookup (values, "mode"); + theme->dark = g_strcmp0 (mode, "light") != 0; + if (!parse_hex (g_hash_table_lookup (values, "lighter_background"), &lighter)) + lighter = mix (bg, fg, 0.08); + if (!parse_hex (g_hash_table_lookup (values, "dark_background"), &darker)) + darker = mix (bg, theme->dark ? (TactusRgb) { 0, 0, 0 } : (TactusRgb) { 1, 1, 1 }, 0.2); + + theme->panel = darker; + theme->key = lighter; + theme->key_pressed = mix (lighter, fg, 0.28); + theme->text = fg; + theme->icon = fg; + theme->popup = mix (lighter, fg, 0.10); + theme->popup_selected = mix (lighter, fg, 0.30); + derive (theme); + if (!parse_hex (g_hash_table_lookup (values, "accent"), &theme->accent) && + !parse_hex (g_hash_table_lookup (values, "blue"), &theme->accent)) + theme->accent = fg; + if (parse_hex (g_hash_table_lookup (values, "muted"), &theme->hint)) + theme->hint = mix (theme->hint, fg, 0.25); + return TRUE; +} + + +/** + * tactus_theme_init: + * @theme: The keyboard's colours, filled in + * @dark: Whether the desktop asks for dark (used without an Omarchy theme) + * + * The applied Omarchy theme's colours when there is one, else Tactus's own + * light or dark ones. + */ +void +tactus_theme_init (TactusTheme *theme, gboolean dark) +{ + if (theme_from_omarchy (theme)) + return; + + theme->dark = dark; + if (dark) { + theme->panel = (TactusRgb){ 31 / 255.0, 31 / 255.0, 31 / 255.0 }; + theme->key = (TactusRgb){ 67 / 255.0, 67 / 255.0, 67 / 255.0 }; + theme->key_pressed = (TactusRgb){ 100 / 255.0, 100 / 255.0, 102 / 255.0 }; + theme->text = (TactusRgb){ 1.0, 1.0, 1.0 }; + theme->icon = (TactusRgb){ 1.0, 1.0, 1.0 }; + theme->popup = (TactusRgb){ 58 / 255.0, 58 / 255.0, 60 / 255.0 }; + theme->popup_selected = (TactusRgb){ 104 / 255.0, 104 / 255.0, 108 / 255.0 }; + } else { + theme->panel = (TactusRgb){ 226 / 255.0, 227 / 255.0, 232 / 255.0 }; + theme->key = (TactusRgb){ 253 / 255.0, 253 / 255.0, 255 / 255.0 }; + theme->key_pressed = (TactusRgb){ 232 / 255.0, 233 / 255.0, 236 / 255.0 }; + theme->text = (TactusRgb){ 0.0, 0.0, 0.0 }; + theme->icon = (TactusRgb){ 20 / 255.0, 20 / 255.0, 22 / 255.0 }; + theme->popup = (TactusRgb){ 249 / 255.0, 249 / 255.0, 251 / 255.0 }; + theme->popup_selected = (TactusRgb){ 184 / 255.0, 185 / 255.0, 188 / 255.0 }; + } + derive (theme); + theme->accent = (TactusRgb) { 0.0, 0.478, 1.0 }; + /* Tactus's own: the emoji page as it was drawn before these came from here */ + if (dark) { + theme->field = (TactusRgb) { 44 / 255.0, 44 / 255.0, 46 / 255.0 }; + theme->hint = (TactusRgb) { 152 / 255.0, 152 / 255.0, 159 / 255.0 }; + theme->sign = (TactusRgb) { 205 / 255.0, 205 / 255.0, 210 / 255.0 }; + theme->disc = (TactusRgb) { 72 / 255.0, 72 / 255.0, 74 / 255.0 }; + } else { + theme->field = (TactusRgb) { 239 / 255.0, 240 / 255.0, 244 / 255.0 }; + theme->hint = (TactusRgb) { 114 / 255.0, 115 / 255.0, 119 / 255.0 }; + theme->sign = (TactusRgb) { 67 / 255.0, 68 / 255.0, 72 / 255.0 }; + theme->disc = (TactusRgb) { 210 / 255.0, 211 / 255.0, 215 / 255.0 }; + } +} + + +/** + * tactus_theme_watch: + * @instance: The widget whose colours follow the theme + * @changed: Called with @instance when Omarchy applies another theme + * + * omarchy-theme-set writes current/theme.generation each time it applies a + * theme; the keyboard takes the new colours from there without a restart. + */ +void +tactus_theme_watch (gpointer instance, GCallback changed) +{ + static GFileMonitor *monitor; + + if (monitor == NULL) { + g_autofree char *path = state_file ("theme.generation"); + g_autoptr (GFile) file = g_file_new_for_path (path); + + monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL); + if (monitor == NULL) + return; + } + g_signal_connect_object (monitor, "changed", changed, instance, G_CONNECT_SWAPPED); +} + + +/** + * tactus_theme_css: + * @theme: The keyboard's colours + * + * Returns:(transfer full): Style rules that give what the keyboard doesn't + * draw itself (the emoji, the number pad, the bars) the keyboard's colours, + * and leave the window clear where nothing is drawn + */ +char * +tactus_theme_css (const TactusTheme *theme) +{ + char panel[8], key[8], pressed[8], text[8], under[8]; + +#define HEX(buf, c) g_snprintf (buf, sizeof (buf), "#%02x%02x%02x", \ + (guint) (c.r * 255 + 0.5), (guint) (c.g * 255 + 0.5), (guint) (c.b * 255 + 0.5)) + HEX (panel, theme->panel); + HEX (key, theme->key); + HEX (pressed, theme->key_pressed); + HEX (text, theme->text); +#undef HEX + + /* A bar's corners, as the panel's (tactus_panel_path) on the narrowest + * keyboard, 360 wide of the 390 it is drawn for: no deeper than the windows + * reach under it */ + g_snprintf (under, sizeof (under), "%dpx", tactus_panel_under (360.0 / 390.0)); + + return g_strconcat ( + "pos-input-surface, pos-input-surface.background { background-color: transparent; }\n" + "pos-emoji-picker, pos-keypad, pos-shortcuts-bar, pos-completion-bar {" + " background-color: ", panel, "; color: ", text, ";" + " border-radius: 22px 22px 0 0 / ", under, " ", under, " 0 0; }\n" + "pos-emoji-picker .view, pos-emoji-picker scrolledwindow, pos-emoji-picker viewport," + " pos-emoji-picker flowbox, pos-emoji-picker flowboxchild { background: transparent; color: ", text, "; }\n" + "pos-emoji-picker button, #pos-emoji-switcher .view button {" + " background: transparent; color: ", text, "; border: none; box-shadow: none; text-shadow: none; }\n" + "pos-emoji-picker button.action { background: ", key, "; color: ", text, ";" + " border-radius: 7px; padding: 6px 12px; margin: 2px 4px; }\n" + "pos-emoji-picker button.action:active { background: ", pressed, "; }\n" + "#pos-emoji-switcher .view button:checked { background-color: ", pressed, "; }\n" + "pos-emoji-picker separator { background-color: alpha(", text, ", 0.12); min-width: 1px; }\n" + "pos-keypad { padding: 10px 3px 6px 3px; }\n" + "pos-keypad button { background: ", key, "; color: ", text, ";" + " border: none; box-shadow: none; text-shadow: none; border-radius: 7px; margin: 3px; }\n" + "pos-keypad button:active { background: ", pressed, "; }\n" + "pos-shortcuts-bar button { background: ", key, "; color: ", text, ";" + " border: none; box-shadow: none; text-shadow: none; }\n", + NULL); +} + + +void +tactus_set_source (cairo_t *cr, const TactusRgb *rgb, double alpha) +{ + cairo_set_source_rgba (cr, rgb->r, rgb->g, rgb->b, alpha); +} + + +void +tactus_rounded_rect (cairo_t *cr, double x, double y, double w, double h, double r) +{ + r = MIN (r, MIN (w, h) / 2.0); + cairo_new_sub_path (cr); + cairo_arc (cr, x + w - r, y + r, r, -G_PI_2, 0); + cairo_arc (cr, x + w - r, y + h - r, r, 0, G_PI_2); + cairo_arc (cr, x + r, y + h - r, r, G_PI_2, G_PI); + cairo_arc (cr, x + r, y + r, r, G_PI, 3 * G_PI_2); + cairo_close_path (cr); +} + +/* + * How far the applications' windows reach under the top of the panel, in + * pixels: what shows past its round corners is then the application in front, + * not the wallpaper behind it. The keyboard asks the compositor for that much + * less room than its panel is high. Little, because that much of a window's + * lower edge is behind the panel: at 12 px on a screen 360 wide a message + * box 11 px above its window's edge lost its lower line. + */ +int +tactus_panel_under (double scale) +{ + return (int) (9.0 * scale + 0.5); +} + +/* + * The keyboard's panel: square at the bottom (the screen's own corners are + * there), and at the top two wide corners that ease into the edges rather + * than meeting them as arcs do. They reach further along the top than down + * the sides: only as deep as the windows reach under the panel + * (tactus_panel_under), so that nothing shows past them that isn't a window's. + */ +void +tactus_panel_path (cairo_t *cr, double x, double y, double w, double h, double scale) +{ + double a = MIN (24.0 * scale, w / 2.0); /* how far along the top a corner reaches */ + double d = MIN (tactus_panel_under (scale), h); /* and how far down the side */ + double pull = 23.2 / 33.0; /* of the control points, fitted to a measured corner */ + double ka = a * pull, kd = d * pull; + + cairo_new_sub_path (cr); + cairo_move_to (cr, x, y + h); + cairo_line_to (cr, x, y + d); + cairo_curve_to (cr, x, y + d - kd, x + a - ka, y, x + a, y); + cairo_line_to (cr, x + w - a, y); + cairo_curve_to (cr, x + w - a + ka, y, x + w, y + d - kd, x + w, y + d); + cairo_line_to (cr, x + w, y + h); + cairo_close_path (cr); +} + +/* + * A label centred on (cx, cy): horizontally by its width, vertically by the + * band of the letters named (so "a" and "g" share a baseline, and capitals + * sit as capitals do). + */ +void +tactus_draw_label (cairo_t *cr, + const char *text, + double cx, + double cy, + double size_px, + int weight, + TactusBand band, + const TactusRgb *rgb) +{ + g_autoptr (PangoLayout) layout = pango_cairo_create_layout (cr); + PangoFontDescription *font = pango_font_description_new (); + PangoRectangle logical; + double ratio = band == TACTUS_BAND_X_HEIGHT ? TACTUS_X_HEIGHT : TACTUS_CAP_HEIGHT; + double baseline_y, baseline; + + pango_font_description_set_family (font, TACTUS_FONT_FAMILY); + pango_font_description_set_absolute_size (font, size_px * PANGO_SCALE); + pango_font_description_set_weight (font, weight); + pango_layout_set_font_description (layout, font); + pango_font_description_free (font); + + pango_layout_set_text (layout, text, -1); + pango_layout_get_extents (layout, NULL, &logical); + baseline = (double) pango_layout_get_baseline (layout) / PANGO_SCALE; + baseline_y = cy + ratio * size_px / 2.0; + + cairo_save (cr); + tactus_set_source (cr, rgb, 1.0); + cairo_move_to (cr, + cx - (double) logical.width / PANGO_SCALE / 2.0 - (double) logical.x / PANGO_SCALE, + baseline_y - baseline); + pango_cairo_show_layout (cr, layout); + cairo_restore (cr); +} + + +static void +icon_begin (cairo_t *cr, double cx, double cy, double scale) +{ + cairo_save (cr); + cairo_new_path (cr); + cairo_translate (cr, cx, cy); + cairo_scale (cr, scale, scale); + cairo_set_line_width (cr, TACTUS_STROKE); + cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND); + cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); +} + +/* Shift: an arrow pointing up; outlined when off, solid when on, with a bar under it when locked */ +void +tactus_icon_shift (cairo_t *cr, double cx, double cy, double scale, TactusShiftState state) +{ + /* locked: the same arrow, shorter, with a bar under it */ + double stem_bottom = state == TACTUS_SHIFT_LOCKED ? 4.4 : 8.0; + double top = state == TACTUS_SHIFT_LOCKED ? -8.6 : -8.0; + double wings = top + (state == TACTUS_SHIFT_LOCKED ? 9.4 : 10.2); + + icon_begin (cr, cx, cy, scale); + cairo_move_to (cr, 0.0, top); + cairo_line_to (cr, 9.2, wings); + cairo_line_to (cr, 3.85, wings); + cairo_line_to (cr, 3.85, stem_bottom); + cairo_line_to (cr, -3.85, stem_bottom); + cairo_line_to (cr, -3.85, wings); + cairo_line_to (cr, -9.2, wings); + cairo_close_path (cr); + if (state == TACTUS_SHIFT_OFF) { + cairo_stroke (cr); + } else { + cairo_fill_preserve (cr); + cairo_stroke (cr); + } + if (state == TACTUS_SHIFT_LOCKED) { + tactus_rounded_rect (cr, -4.7, 6.6, 9.4, 2.3, 0.9); + cairo_fill (cr); + } + cairo_restore (cr); +} + +/* Delete: a tag pointing left with a cross in it */ +void +tactus_icon_delete (cairo_t *cr, double cx, double cy, double scale, gboolean filled, + const TactusRgb *cutout) +{ + const double r = 2.4, top = -7.4, bottom = 7.4, right = 9.4, shoulder = -4.2, tip = -9.2; + cairo_pattern_t *colour; + + icon_begin (cr, cx, cy, scale); + colour = cairo_pattern_reference (cairo_get_source (cr)); + cairo_move_to (cr, tip, 0.0); + cairo_line_to (cr, shoulder, top); + cairo_line_to (cr, right - r, top); + cairo_arc (cr, right - r, top + r, r, -G_PI_2, 0); + cairo_line_to (cr, right, bottom - r); + cairo_arc (cr, right - r, bottom - r, r, 0, G_PI_2); + cairo_line_to (cr, shoulder, bottom); + cairo_close_path (cr); + if (filled) { + cairo_fill_preserve (cr); + cairo_stroke (cr); + if (cutout) + tactus_set_source (cr, cutout, 1.0); + } else { + cairo_stroke (cr); + } + /* the cross */ + cairo_move_to (cr, -0.8, -3.0); + cairo_line_to (cr, 5.2, 3.0); + cairo_move_to (cr, -0.8, 3.0); + cairo_line_to (cr, 5.2, -3.0); + cairo_stroke (cr); + cairo_set_source (cr, colour); + cairo_pattern_destroy (colour); + cairo_restore (cr); +} + +/* Return: across the top, down the right side, and back to the left with an arrowhead */ +void +tactus_icon_return (cairo_t *cr, double cx, double cy, double scale) +{ + const double r = 2.6, top = -7.4, line = 2.0, right = 9.3, left = -9.2, head = 5.5; + + icon_begin (cr, cx, cy, scale); + cairo_move_to (cr, 1.8, top); + cairo_line_to (cr, right - r, top); + cairo_arc (cr, right - r, top + r, r, -G_PI_2, 0); + cairo_line_to (cr, right, line - r); + cairo_arc (cr, right - r, line - r, r, 0, G_PI_2); + cairo_line_to (cr, left, line); + cairo_stroke (cr); + cairo_move_to (cr, left + head, line - head); + cairo_line_to (cr, left, line); + cairo_line_to (cr, left + head, line + head); + cairo_stroke (cr); + cairo_restore (cr); +} + +/* + * The emoji key: a laughing face. On a light keyboard it is drawn in + * outline, on a dark one as a solid disc with the features cut out. + */ +void +tactus_icon_emoji (cairo_t *cr, double cx, double cy, double scale, const TactusTheme *theme, + double alpha) +{ + const TactusRgb *ink = &theme->icon; + const TactusRgb *features = theme->dark ? &theme->panel : &theme->icon; + const TactusRgb *teeth = theme->dark ? &theme->icon : &theme->panel; + + icon_begin (cr, cx, cy, scale); + cairo_push_group (cr); + + tactus_set_source (cr, ink, 1.0); + if (theme->dark) { + cairo_arc (cr, 0, 0, 13.35, 0, 2 * G_PI); + cairo_fill (cr); + } else { + cairo_arc (cr, 0, 0, 12.5, 0, 2 * G_PI); + cairo_stroke (cr); + } + + /* eyes: a little taller than wide */ + tactus_set_source (cr, features, 1.0); + for (int side = -1; side <= 1; side += 2) { + cairo_save (cr); + cairo_translate (cr, side * 4.1, -3.0); + cairo_scale (cr, 1.45, 1.8); + cairo_arc (cr, 0, 0, 1.0, 0, 2 * G_PI); + cairo_restore (cr); + cairo_fill (cr); + } + + /* the laughing mouth: a crescent with its corners turned up */ + cairo_save (cr); + cairo_move_to (cr, -9.0, 1.9); + cairo_curve_to (cr, -4.5, 4.6, 4.5, 4.6, 9.0, 1.9); + cairo_curve_to (cr, 8.0, 7.7, 4.0, 10.0, 0.0, 10.0); + cairo_curve_to (cr, -4.0, 10.0, -8.0, 7.7, -9.0, 1.9); + cairo_close_path (cr); + cairo_fill_preserve (cr); + /* the teeth: a band along the upper lip, inside the mouth only */ + cairo_clip (cr); + tactus_set_source (cr, teeth, 1.0); + cairo_move_to (cr, -9.0, 2.35); + cairo_curve_to (cr, -4.5, 5.05, 4.5, 5.05, 9.0, 2.35); + cairo_line_to (cr, 9.0, 4.5); + cairo_curve_to (cr, 4.5, 7.2, -4.5, 7.2, -9.0, 4.5); + cairo_close_path (cr); + cairo_fill (cr); + cairo_restore (cr); + + cairo_pop_group_to_source (cr); + cairo_paint_with_alpha (cr, alpha); + cairo_restore (cr); +} + +/* The dictation key: a microphone on its stand */ +void +tactus_icon_mic (cairo_t *cr, double cx, double cy, double scale, const TactusTheme *theme, + double alpha) +{ + icon_begin (cr, cx, cy, scale); + cairo_push_group (cr); + tactus_set_source (cr, &theme->icon, 1.0); + + /* the capsule */ + if (theme->dark) { + tactus_rounded_rect (cr, -4.2, -14.0, 8.4, 18.2, 4.2); + cairo_fill (cr); + } else { + tactus_rounded_rect (cr, -3.35, -13.15, 6.7, 16.5, 3.35); + cairo_stroke (cr); + } + /* the holder */ + cairo_move_to (cr, -8.5, -3.0); + cairo_line_to (cr, -8.5, 0.0); + cairo_arc_negative (cr, 0.0, 0.0, 8.5, G_PI, 0); + cairo_line_to (cr, 8.5, -3.0); + cairo_stroke (cr); + /* the stem and the foot */ + cairo_move_to (cr, 0.0, 8.5); + cairo_line_to (cr, 0.0, 13.1); + cairo_stroke (cr); + cairo_move_to (cr, -5.6, 13.15); + cairo_line_to (cr, 5.6, 13.15); + cairo_stroke (cr); + + cairo_pop_group_to_source (cr); + cairo_paint_with_alpha (cr, alpha); + cairo_restore (cr); +} + +/* + * The emoji page + */ + +#define KIND_STROKE 1.5 + +static void +kind_begin (cairo_t *cr, double cx, double cy, double scale, const TactusRgb *rgb) +{ + cairo_save (cr); + /* nothing left over from what was drawn before joins in */ + cairo_new_path (cr); + cairo_translate (cr, cx, cy); + cairo_scale (cr, scale, scale); + cairo_set_line_width (cr, KIND_STROKE); + cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND); + cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); + tactus_set_source (cr, rgb, 1.0); +} + +#define DEG(d) ((d) * G_PI / 180.0) + +/** + * tactus_icon_kind: + * + * The sign of a kind of emoji, in the row under them: a clock for the ones + * used lately, a face, an animal, an apple, a ball, a car, a light bulb, a + * heart, a flag. Drawn in a box of about 17 points. + */ +void +tactus_icon_kind (cairo_t *cr, TactusKind kind, double cx, double cy, double scale, const TactusRgb *rgb) +{ + kind_begin (cr, cx, cy, scale, rgb); + + switch (kind) { + case TACTUS_KIND_RECENT: + cairo_arc (cr, 0, 0, 8.0, 0, 2 * G_PI); + cairo_stroke (cr); + cairo_move_to (cr, 0, -4.9); + cairo_line_to (cr, 0, 0.2); + cairo_line_to (cr, -4.2, 0.2); + cairo_stroke (cr); + break; + + case TACTUS_KIND_SMILEYS: + cairo_arc (cr, 0, 0, 8.3, 0, 2 * G_PI); + cairo_stroke (cr); + cairo_arc (cr, -3.0, -2.5, 1.15, 0, 2 * G_PI); + cairo_fill (cr); + cairo_arc (cr, 3.0, -2.5, 1.15, 0, 2 * G_PI); + cairo_fill (cr); + cairo_move_to (cr, -5.0, 1.0); + cairo_line_to (cr, 5.0, 1.0); + cairo_curve_to (cr, 5.0, 4.4, 2.8, 6.3, 0, 6.3); + cairo_curve_to (cr, -2.8, 6.3, -5.0, 4.4, -5.0, 1.0); + cairo_close_path (cr); + cairo_fill (cr); + break; + + case TACTUS_KIND_ANIMALS: + /* a round head with two round ears */ + cairo_arc (cr, 0, 1.2, 6.6, 0, 2 * G_PI); + cairo_stroke (cr); + cairo_arc (cr, -5.5, -4.6, 2.9, DEG (108), DEG (342)); + cairo_stroke (cr); + cairo_arc (cr, 5.5, -4.6, 2.9, DEG (198), DEG (432)); + cairo_stroke (cr); + cairo_arc (cr, -2.5, -0.2, 0.95, 0, 2 * G_PI); + cairo_fill (cr); + cairo_arc (cr, 2.5, -0.2, 0.95, 0, 2 * G_PI); + cairo_fill (cr); + cairo_save (cr); + cairo_translate (cr, 0, 3.0); + cairo_scale (cr, 1.5, 1.05); + cairo_arc (cr, 0, 0, 1.0, 0, 2 * G_PI); + cairo_restore (cr); + cairo_fill (cr); + break; + + case TACTUS_KIND_FOOD: + cairo_move_to (cr, 0, -3.4); + cairo_curve_to (cr, 2.2, -5.4, 7.4, -4.4, 7.4, 0.8); + cairo_curve_to (cr, 7.4, 5.4, 4.2, 8.8, 1.8, 8.8); + cairo_curve_to (cr, 0.9, 8.8, 0.6, 8.2, 0, 8.2); + cairo_curve_to (cr, -0.6, 8.2, -0.9, 8.8, -1.8, 8.8); + cairo_curve_to (cr, -4.2, 8.8, -7.4, 5.4, -7.4, 0.8); + cairo_curve_to (cr, -7.4, -4.4, -2.2, -5.4, 0, -3.4); + cairo_close_path (cr); + cairo_stroke (cr); + /* its leaf */ + cairo_move_to (cr, 0.6, -5.0); + cairo_curve_to (cr, 0.8, -7.6, 3.0, -8.9, 4.8, -8.7); + cairo_curve_to (cr, 4.6, -6.5, 2.8, -4.8, 0.6, -5.0); + cairo_close_path (cr); + cairo_fill (cr); + break; + + case TACTUS_KIND_ACTIVITY: + cairo_arc (cr, 0, 0, 8.2, 0, 2 * G_PI); + cairo_stroke (cr); + /* the ball's patches: one in the middle, five at the rim */ + for (int i = 0; i < 5; i++) { + double a = DEG (-90 + 72 * i); + + if (i == 0) + cairo_move_to (cr, 3.1 * cos (a), 3.1 * sin (a)); + else + cairo_line_to (cr, 3.1 * cos (a), 3.1 * sin (a)); + } + cairo_close_path (cr); + cairo_fill (cr); + cairo_set_line_width (cr, 1.1); + for (int i = 0; i < 5; i++) { + double a = DEG (-90 + 72 * i), b = DEG (-90 + 72 * i + 36); + + cairo_move_to (cr, 3.1 * cos (a), 3.1 * sin (a)); + cairo_line_to (cr, 5.6 * cos (a), 5.6 * sin (a)); + cairo_stroke (cr); + /* a patch at the rim, between two seams */ + cairo_move_to (cr, 8.0 * cos (b - DEG (20)), 8.0 * sin (b - DEG (20))); + cairo_line_to (cr, 5.9 * cos (b - DEG (11)), 5.9 * sin (b - DEG (11))); + cairo_line_to (cr, 5.9 * cos (b + DEG (11)), 5.9 * sin (b + DEG (11))); + cairo_line_to (cr, 8.0 * cos (b + DEG (20)), 8.0 * sin (b + DEG (20))); + cairo_arc_negative (cr, 0, 0, 8.0, b + DEG (20), b - DEG (20)); + cairo_fill (cr); + } + break; + + case TACTUS_KIND_TRAVEL: + /* a small car from the side */ + tactus_rounded_rect (cr, -10.2, -0.4, 20.4, 5.6, 2.4); + cairo_stroke (cr); + cairo_move_to (cr, -6.2, -0.4); + cairo_curve_to (cr, -5.2, -3.6, -4.2, -5.8, -2.0, -5.8); + cairo_line_to (cr, 3.0, -5.8); + cairo_curve_to (cr, 5.0, -5.8, 6.4, -3.2, 7.4, -0.4); + cairo_stroke (cr); + cairo_move_to (cr, 0.4, -5.8); + cairo_line_to (cr, 0.4, -0.4); + cairo_stroke (cr); + cairo_arc (cr, -5.4, 5.4, 2.3, 0, 2 * G_PI); + cairo_fill (cr); + cairo_arc (cr, 5.4, 5.4, 2.3, 0, 2 * G_PI); + cairo_fill (cr); + break; + + case TACTUS_KIND_OBJECTS: + /* a light bulb */ + cairo_arc (cr, 0, -3.0, 5.6, DEG (128), DEG (412)); + cairo_stroke (cr); + cairo_move_to (cr, 3.45, 1.4); + cairo_line_to (cr, 2.4, 4.4); + cairo_line_to (cr, -2.4, 4.4); + cairo_line_to (cr, -3.45, 1.4); + cairo_stroke (cr); + cairo_move_to (cr, -2.2, 6.5); + cairo_line_to (cr, 2.2, 6.5); + cairo_stroke (cr); + cairo_move_to (cr, -1.3, 8.5); + cairo_line_to (cr, 1.3, 8.5); + cairo_stroke (cr); + break; + + case TACTUS_KIND_SYMBOLS: + cairo_move_to (cr, 0, 7.5); + cairo_curve_to (cr, -3.2, 4.9, -8.0, 1.7, -8.0, -2.5); + cairo_curve_to (cr, -8.0, -5.3, -6.0, -7.3, -3.8, -7.3); + cairo_curve_to (cr, -2.2, -7.3, -0.8, -6.3, 0, -4.8); + cairo_curve_to (cr, 0.8, -6.3, 2.2, -7.3, 3.8, -7.3); + cairo_curve_to (cr, 6.0, -7.3, 8.0, -5.3, 8.0, -2.5); + cairo_curve_to (cr, 8.0, 1.7, 3.2, 4.9, 0, 7.5); + cairo_close_path (cr); + cairo_stroke (cr); + break; + + case TACTUS_KIND_FLAGS: + cairo_move_to (cr, -6.6, -7.8); + cairo_line_to (cr, -6.6, 8.0); + cairo_stroke (cr); + cairo_move_to (cr, -6.6, -6.4); + cairo_curve_to (cr, -2.6, -8.6, 0.6, -4.4, 7.2, -6.8); + cairo_line_to (cr, 7.2, 2.0); + cairo_curve_to (cr, 0.6, 4.4, -2.6, 0.2, -6.6, 2.4); + cairo_stroke (cr); + break; + + case TACTUS_N_KINDS: + default: + break; + } + + cairo_restore (cr); +} + + +void +tactus_icon_magnifier (cairo_t *cr, double cx, double cy, double scale, const TactusRgb *rgb) +{ + kind_begin (cr, cx, cy, scale, rgb); + cairo_set_line_width (cr, 1.9); + cairo_arc (cr, -1.5, -1.5, 5.9, 0, 2 * G_PI); + cairo_stroke (cr); + cairo_move_to (cr, 2.9, 2.9); + cairo_line_to (cr, 7.3, 7.3); + cairo_stroke (cr); + cairo_restore (cr); +} + +/* What empties the search field: a cross on a disc */ +void +tactus_icon_clear (cairo_t *cr, double cx, double cy, double scale, const TactusRgb *disc, const TactusRgb *cross) +{ + kind_begin (cr, cx, cy, scale, disc); + cairo_arc (cr, 0, 0, 8.4, 0, 2 * G_PI); + cairo_fill (cr); + tactus_set_source (cr, cross, 1.0); + cairo_set_line_width (cr, 1.9); + cairo_move_to (cr, -3.0, -3.0); + cairo_line_to (cr, 3.0, 3.0); + cairo_move_to (cr, 3.0, -3.0); + cairo_line_to (cr, -3.0, 3.0); + cairo_stroke (cr); + cairo_restore (cr); +} + +#define TACTUS_EMOJI_FONT "Noto Color Emoji" + +/** + * tactus_emoji_font_size: + * @cr: Where emoji will be drawn + * @ink_px: How wide an emoji should come out + * + * Returns: The font size that makes a face that wide + */ +double +tactus_emoji_font_size (cairo_t *cr, double ink_px) +{ + g_autoptr (PangoLayout) layout = pango_cairo_create_layout (cr); + PangoFontDescription *font = pango_font_description_new (); + PangoRectangle ink; + + pango_font_description_set_family (font, TACTUS_EMOJI_FONT); + pango_font_description_set_absolute_size (font, 100.0 * PANGO_SCALE); + pango_layout_set_font_description (layout, font); + pango_font_description_free (font); + pango_layout_set_text (layout, "\360\237\230\200", -1); + pango_layout_get_extents (layout, &ink, NULL); + if (ink.width <= 0) + return ink_px; + return 100.0 * ink_px / ((double) ink.width / PANGO_SCALE); +} + +/* An emoji with its middle at (cx, cy) */ +void +tactus_draw_emoji (cairo_t *cr, const char *emoji, double cx, double cy, double size_px, double alpha) +{ + g_autoptr (PangoLayout) layout = pango_cairo_create_layout (cr); + PangoFontDescription *font = pango_font_description_new (); + PangoRectangle ink; + + pango_font_description_set_family (font, TACTUS_EMOJI_FONT); + pango_font_description_set_absolute_size (font, size_px * PANGO_SCALE); + pango_layout_set_font_description (layout, font); + pango_font_description_free (font); + pango_layout_set_text (layout, emoji, -1); + pango_layout_get_extents (layout, &ink, NULL); + + cairo_save (cr); + cairo_move_to (cr, + cx - ((double) ink.x + ink.width / 2.0) / PANGO_SCALE, + cy - ((double) ink.y + ink.height / 2.0) / PANGO_SCALE); + if (alpha < 1.0) { + cairo_push_group (cr); + pango_cairo_show_layout (cr, layout); + cairo_pop_group_to_source (cr); + cairo_paint_with_alpha (cr, alpha); + } else { + pango_cairo_show_layout (cr, layout); + } + cairo_restore (cr); +} diff --git a/packages/tactus/source/tactus-draw.h b/packages/tactus/source/tactus-draw.h new file mode 100644 index 000000000..8d2556683 --- /dev/null +++ b/packages/tactus/source/tactus-draw.h @@ -0,0 +1,99 @@ +/* + * Drawing for Tactus: panel, keys, labels and icons. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#pragma once + +#include +#include +#include + +G_BEGIN_DECLS + +typedef struct { + double r, g, b; +} TactusRgb; + +typedef struct { + gboolean dark; + TactusRgb panel; + TactusRgb key; + TactusRgb key_pressed; + TactusRgb text; + TactusRgb icon; + TactusRgb popup; + TactusRgb popup_selected; + /* the emoji page's search field, its hint, the kinds' signs and the disc + * behind the one in view */ + TactusRgb field; + TactusRgb hint; + TactusRgb sign; + TactusRgb disc; + /* the caret */ + TactusRgb accent; +} TactusTheme; + +typedef enum { + TACTUS_SHIFT_OFF, + TACTUS_SHIFT_ON, + TACTUS_SHIFT_LOCKED, +} TactusShiftState; + +/* How a label sits on its key: the band of the letter that is centred */ +typedef enum { + TACTUS_BAND_X_HEIGHT, /* lowercase letters */ + TACTUS_BAND_CAP_HEIGHT, /* capitals, digits, punctuation */ +} TactusBand; + +void tactus_theme_init (TactusTheme *theme, gboolean dark); +void tactus_theme_watch (gpointer instance, GCallback changed); +char *tactus_theme_css (const TactusTheme *theme); +void tactus_set_source (cairo_t *cr, const TactusRgb *rgb, double alpha); +void tactus_rounded_rect (cairo_t *cr, double x, double y, double w, double h, double r); +int tactus_panel_under (double scale); +void tactus_panel_path (cairo_t *cr, double x, double y, double w, double h, double scale); +void tactus_draw_label (cairo_t *cr, + const char *text, + double cx, + double cy, + double size_px, + int weight, + TactusBand band, + const TactusRgb *rgb); +void tactus_icon_shift (cairo_t *cr, double cx, double cy, double scale, TactusShiftState state); +void tactus_icon_delete (cairo_t *cr, double cx, double cy, double scale, gboolean filled, + const TactusRgb *cutout); +void tactus_icon_return (cairo_t *cr, double cx, double cy, double scale); +void tactus_icon_emoji (cairo_t *cr, double cx, double cy, double scale, const TactusTheme *theme, + double alpha); +void tactus_icon_mic (cairo_t *cr, double cx, double cy, double scale, const TactusTheme *theme, + double alpha); + +/* The emoji page: what its kinds of emoji are, in the order of their signs */ +typedef enum { + TACTUS_KIND_RECENT, + TACTUS_KIND_SMILEYS, + TACTUS_KIND_ANIMALS, + TACTUS_KIND_FOOD, + TACTUS_KIND_ACTIVITY, + TACTUS_KIND_TRAVEL, + TACTUS_KIND_OBJECTS, + TACTUS_KIND_SYMBOLS, + TACTUS_KIND_FLAGS, + TACTUS_N_KINDS, +} TactusKind; + +void tactus_icon_kind (cairo_t *cr, TactusKind kind, double cx, double cy, double scale, + const TactusRgb *rgb); +void tactus_icon_magnifier (cairo_t *cr, double cx, double cy, double scale, const TactusRgb *rgb); +void tactus_icon_clear (cairo_t *cr, double cx, double cy, double scale, const TactusRgb *disc, + const TactusRgb *cross); +void tactus_draw_emoji (cairo_t *cr, const char *emoji, double cx, double cy, double size_px, + double alpha); +double tactus_emoji_font_size (cairo_t *cr, double ink_px); + +G_END_DECLS diff --git a/packages/tactus/source/tactus-typer.c b/packages/tactus/source/tactus-typer.c new file mode 100644 index 000000000..8d873e793 --- /dev/null +++ b/packages/tactus/source/tactus-typer.c @@ -0,0 +1,1517 @@ +/* + * Tactus's typing: what goes to the text field for each key. + * + * Every key is put into the text field at once; nothing is held back as + * "text being composed". When a word ends, the letters just typed may be + * replaced by the word that was meant. For that the typer keeps its own copy + * of the text before the cursor. + * + * A text field of the usual kind tells what it holds after every change, and + * can take text away before the cursor on request. The copy is then checked + * against what the field tells, and the field is right when they differ. + * + * Some text fields tell nothing and can't take text away (the GPUI + * applications). There the copy is all there is: it is built from our own + * keys, text is taken away with presses of Backspace, and a sign of life from + * the field that no key of ours explains means the cursor went elsewhere or + * the text was sent off, so the copy starts afresh. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#define G_LOG_DOMAIN "tactus-typer" + +#include "tactus-typer.h" + +#include + +/* How much of the text before the cursor is kept, in characters */ +#define MODEL_MAX 512 +#define WORD_MAX 24 +/* A field that tells nothing: how long after a key its first sign of life is that key's echo */ +#define ECHO_US (1 * G_TIME_SPAN_SECOND) +/* … and how long after an echo another one still belongs to it */ +#define ECHO_TAIL_US (100 * G_TIME_SPAN_MILLISECOND) +/* A field that tells: how long it has to show what a key did (Backspace, an arrow) */ +#define OTHER_WAIT_US (300 * G_TIME_SPAN_MILLISECOND) +/* … and text put in or taken away */ +#define INSERT_WAIT_US (1 * G_TIME_SPAN_SECOND) +/* A field that tells: how long a key that may take text away waits for the + * field to show what was sent before it */ +#define HOLD_US (250 * G_TIME_SPAN_MILLISECOND) +/* … and how long nothing waits once that was not enough */ +#define HOLD_OFF_US (3 * G_TIME_SPAN_SECOND) +/* Keys sent before a field first told its text: how many may be put after what it then tells */ +#define FIRST_MAX 8 +/* How often a text field is answered at most, and for how many seconds on end */ +#define ACKS_A_SECOND 40 +#define ACK_SECONDS 5 +/* A field that tells nothing: a word typed with a pause this long is left alone */ +#define PAUSE_US (2500 * G_TIME_SPAN_MILLISECOND) +/* Two spaces this close together after a word are a full stop */ +#define DOUBLE_SPACE_US (1500 * G_TIME_SPAN_MILLISECOND) + +typedef struct { + gunichar c; + TactusTap tap; + gint64 time; /* when a key of ours typed it; 0 for text that was there */ +} TactusChar; + +typedef enum { + TACTUS_OP_INSERT, /* text put in */ + TACTUS_OP_ERASE, /* text taken away on request: as sure as text put in */ + TACTUS_OP_OTHER, /* a key: what it does is up to the text field */ +} TactusOpKind; + +/* Something sent to a text field that tells, until the field has shown it */ +typedef struct { + TactusOpKind kind; + gint64 time; + char *predicted; /* the text before the cursor once the field has done it; NULL: can't know */ + gboolean anchored; +} TactusOp; + +typedef enum { + TACTUS_IN_KEY, + TACTUS_IN_BACKSPACE, + TACTUS_IN_TEXT, +} TactusInKind; + +/* A key that waits for the text field to catch up */ +typedef struct { + TactusInKind kind; + char *text; /* the key's symbol, or the text */ + TactusTap tap; + gboolean has_tap; + TactusBackspace how; + gboolean ends_word; +} TactusInput; + +struct _TactusTyper { + TactusTyperOps ops; + gpointer data; + gint64 (*now) (gpointer data); + gpointer now_data; + + gboolean active; + guint hints; + gboolean foreign; /* the layout is of a language the dictionary doesn't know */ + + /* The text before the cursor */ + GArray *chars; /* TactusChar */ + gboolean anchored; /* it starts where the text (or its line) starts */ + gboolean after_word; /* a letter follows the cursor */ + gboolean selection; /* some text is selected */ + + /* A text field that tells */ + gboolean reporting; + gboolean no_delete; /* … but turned out to ignore requests to take text away */ + char *acked; /* what it last told */ + gboolean acked_anchored; + GArray *pending; /* TactusOp */ + char *if_ignored; /* what it holds if it ignored the last request to take text away */ + GArray *held; /* TactusInput: keys that wait for it to show what was sent */ + gint64 held_since; + gint64 no_hold_until; + gboolean draining; + + /* Answers to a text field, which may be waiting for one before it tells more */ + gboolean greeted; + gint64 ack_second; + guint acks; + guint ack_full_seconds; + gboolean ack_muted; + + /* A text field that tells nothing */ + gint64 last_send; + gboolean echo_seen; + gint64 echo_time; + gint64 settle_until; + + /* The last correction, while Backspace can still take it back */ + gboolean undo_armed; + char *undo_typed; + char *undo_made; + /* The word last put back: typed again, it is meant */ + char *rejected; + + /* Say in the log what is done and why (never what is typed) */ + gboolean trace; +}; + +#define note(self, ...) G_STMT_START { if ((self)->trace) g_message (__VA_ARGS__); } G_STMT_END + +/* + * Characters + */ + +static gboolean +is_space (gunichar c) +{ + return c == ' ' || c == '\t' || c == 0xa0; +} + + +static gboolean +is_word_char (gunichar c) +{ + return g_unichar_isalpha (c) || c == '\'' || c == 0x2019; +} + +/* What may stand between a space and the word it opens */ +static gboolean +is_opener (gunichar c) +{ + return c == '(' || c == '[' || c == '{' || c == '"' || c == 0x201c || c == 0x2018 || + c == 0xab || c == 0xbf || c == 0xa1; +} + +/* What may stand between the end of a sentence and the space after it */ +static gboolean +is_closer (gunichar c) +{ + return c == ')' || c == ']' || c == '}' || c == '"' || c == '\'' || c == 0x201d || + c == 0x2019 || c == 0xbb; +} + +/* What ends a word in a way that says the word is done: sentence punctuation, an emoji */ +static gboolean +ends_word (const char *text) +{ + gunichar c = g_utf8_get_char (text); + + if (strchr (".,?!;:)]}\"", (int) c) && c < 0x80) + return TRUE; + return c == 0x2026 || c == 0x201d || c == 0xbb; +} + +/* + * The copy of the text before the cursor + */ + +static gint64 +now_us (TactusTyper *self) +{ + return self->now ? self->now (self->now_data) : g_get_monotonic_time (); +} + + +static TactusChar * +char_at (TactusTyper *self, guint i) +{ + return &g_array_index (self->chars, TactusChar, i); +} + + +static char * +model_dup (TactusTyper *self, guint from, guint to) +{ + GString *out = g_string_new (NULL); + + for (guint i = from; i < to && i < self->chars->len; i++) + g_string_append_unichar (out, char_at (self, i)->c); + return g_string_free (out, FALSE); +} + + +static guint +model_bytes (TactusTyper *self, guint from, guint to) +{ + guint bytes = 0; + + for (guint i = from; i < to && i < self->chars->len; i++) + bytes += g_unichar_to_utf8 (char_at (self, i)->c, NULL); + return bytes; +} + + +static void +model_append (TactusTyper *self, const char *text, const TactusTap *tap, gint64 time) +{ + gboolean one = g_utf8_strlen (text, -1) == 1; + + for (const char *p = text; *p; p = g_utf8_next_char (p)) { + TactusChar ch = { .c = g_utf8_get_char (p), .time = time }; + + if (ch.c == 0xa0) + ch.c = ' '; + if (tap && one) + ch.tap = *tap; + g_array_append_val (self->chars, ch); + } + + if (self->chars->len > MODEL_MAX) { + g_array_remove_range (self->chars, 0, self->chars->len - MODEL_MAX); + self->anchored = FALSE; + } +} + + +static void +model_pop (TactusTyper *self, guint n) +{ + n = MIN (n, self->chars->len); + if (n) + g_array_remove_range (self->chars, self->chars->len - n, n); +} + +/* Take the text before the cursor as given. What was typed by taps and is + * still there keeps its taps. */ +static void +model_adopt (TactusTyper *self, const char *text, gboolean anchored) +{ + GArray *fresh = g_array_new (FALSE, TRUE, sizeof (TactusChar)); + guint old = self->chars->len, n; + + for (const char *p = text; p && *p; p = g_utf8_next_char (p)) { + TactusChar ch = { .c = g_utf8_get_char (p) }; + + g_array_append_val (fresh, ch); + } + n = fresh->len; + + for (guint i = 1; i <= MIN (old, n); i++) { + TactusChar *was = char_at (self, old - i); + TactusChar *is = &g_array_index (fresh, TactusChar, n - i); + + if (was->c != is->c) + break; + *is = *was; + } + + g_array_unref (self->chars); + self->chars = fresh; + self->anchored = anchored; +} + + +static void +model_reset (TactusTyper *self, gboolean anchored) +{ + g_array_set_size (self->chars, 0); + self->anchored = anchored; + self->after_word = FALSE; + self->selection = FALSE; +} + +/* Two accounts of the text before the cursor agree. One that doesn't reach + * back to the start may be the shorter of the two. */ +static gboolean +same_text (const char *a, gboolean a_anchored, const char *b, gboolean b_anchored) +{ + size_t la = strlen (a), lb = strlen (b); + + if (la == lb) + return memcmp (a, b, la) == 0; + if (la < lb) + return !a_anchored && memcmp (b + lb - la, a, la) == 0; + return !b_anchored && memcmp (a + la - lb, b, lb) == 0; +} + +/* + * Capitals + */ + +/* Whether a sentence starts after the first @pos characters */ +static gboolean +sentence_start_at (TactusTyper *self, guint pos) +{ + guint i = pos, end; + gunichar c; + + while (i > 0 && is_opener (char_at (self, i - 1)->c)) + i--; + if (i == 0) + return self->anchored; + + c = char_at (self, i - 1)->c; + if (c == '\n') + return TRUE; + if (!is_space (c)) + return FALSE; + while (i > 0 && is_space (char_at (self, i - 1)->c)) + i--; + if (i == 0) + return self->anchored; + if (char_at (self, i - 1)->c == '\n') + return TRUE; + + while (i > 0 && is_closer (char_at (self, i - 1)->c)) + i--; + if (i == 0) + return FALSE; + + c = char_at (self, i - 1)->c; + if (c == '!' || c == '?') + return TRUE; + if (c != '.') + return FALSE; + /* Three dots trail off; they don't end a sentence */ + if (i >= 2 && char_at (self, i - 2)->c == '.') + return FALSE; + + /* "e.g. this", "i.e. that", "one vs. the other" */ + end = i - 1; + i = end; + while (i > 0 && !is_space (char_at (self, i - 1)->c) && char_at (self, i - 1)->c != '\n') + i--; + if (end - i <= 3) { + g_autofree char *token = model_dup (self, i, end); + g_autofree char *lower = g_utf8_strdown (token, -1); + + if (g_str_equal (lower, "e.g") || g_str_equal (lower, "i.e") || g_str_equal (lower, "vs")) + return FALSE; + } + return TRUE; +} + +/** + * tactus_typer_wants_capital: + * @self: The typer + * + * Returns: Whether the next letter should be a capital + */ +gboolean +tactus_typer_wants_capital (TactusTyper *self) +{ + guint h = self->hints, len = self->chars->len; + + if (!self->active) + return FALSE; + if (h & (TACTUS_HINT_HIDDEN | TACTUS_HINT_LOWERCASE)) + return FALSE; + if (h & TACTUS_HINT_UPPERCASE) + return TRUE; + if (h & TACTUS_HINT_TITLECASE) { + gunichar last; + + if (len == 0) + return self->anchored; + last = char_at (self, len - 1)->c; + if (is_space (last) || last == '\n') + return TRUE; + } + /* A field that says what it wants, and didn't ask for capitals */ + if (h != 0 && !(h & (TACTUS_HINT_AUTO_CAPS | TACTUS_HINT_TITLECASE))) + return FALSE; + + return sentence_start_at (self, len); +} + + +static void +update_shift (TactusTyper *self, gboolean context_changed) +{ + if (self->ops.shift) + self->ops.shift (tactus_typer_wants_capital (self), context_changed, self->data); +} + + +static gboolean +corrects (TactusTyper *self) +{ + guint h = self->hints; + + /* Only where what is typed is hidden. That a field didn't ask for + * corrections says nothing: a page in the browser asks for them only when + * its author wrote so, and nearly none do, though all expect them. */ + if (h & TACTUS_HINT_HIDDEN) + return FALSE; + if (self->foreign) + return FALSE; + return tactus_ac_available (); +} + +/* Nothing is learned from what goes into a field that asked for that */ +static gboolean +learns (TactusTyper *self) +{ + return !(self->hints & (TACTUS_HINT_HIDDEN | TACTUS_HINT_SENSITIVE)); +} + +/* + * What was sent and not yet shown + */ + +static void +op_clear (gpointer data) +{ + TactusOp *op = data; + + g_clear_pointer (&op->predicted, g_free); +} + + +static void +arm_wake (TactusTyper *self) +{ + gint64 now = now_us (self), first = G_MAXINT64; + + for (guint i = 0; i < self->pending->len; i++) { + TactusOp *op = &g_array_index (self->pending, TactusOp, i); + gint64 due = op->time + (op->kind == TACTUS_OP_OTHER ? OTHER_WAIT_US : INSERT_WAIT_US); + + first = MIN (first, due); + } + if (self->held->len > 0) + first = MIN (first, self->held_since + HOLD_US); + if (first == G_MAXINT64 || self->ops.wake == NULL) + return; + self->ops.wake ((guint) (MAX (first - now, 0) / 1000) + 5, self->data); +} + +/* Note that something went to the text field. @known: the copy shows what + * the field holds once it has done it. */ +static void +sent (TactusTyper *self, TactusOpKind kind, gboolean known) +{ + gint64 now = now_us (self); + + self->last_send = now; + self->echo_seen = FALSE; + + if (self->reporting) { + TactusOp op = { .kind = kind, .time = now, .anchored = self->anchored }; + + if (known) + op.predicted = model_dup (self, 0, self->chars->len); + g_array_append_val (self->pending, op); + arm_wake (self); + } +} + + +static void +disarm_undo (TactusTyper *self) +{ + self->undo_armed = FALSE; + g_clear_pointer (&self->undo_typed, g_free); + g_clear_pointer (&self->undo_made, g_free); +} + +/* + * Sending + */ + +/* The copy is brought up to date before anything goes out, so that an answer + * from the text field always finds it as it will be */ +static void +insert (TactusTyper *self, const char *text, const TactusTap *tap) +{ + self->selection = FALSE; + model_append (self, text, tap, now_us (self)); + sent (self, TACTUS_OP_INSERT, TRUE); + self->ops.commit (text, self->data); +} + +/* Take the last @n characters away and put @text there */ +static void +replace (TactusTyper *self, guint n, const char *text) +{ + gboolean by_keys = !self->reporting || self->no_delete; + guint len = self->chars->len, bytes; + + self->selection = FALSE; + n = MIN (n, len); + if (n > 0) { + if (!by_keys) { + g_autofree char *whole = model_dup (self, 0, len); + + g_free (self->if_ignored); + self->if_ignored = g_strconcat (whole, text, NULL); + } + bytes = model_bytes (self, len - n, len); + model_pop (self, n); + sent (self, TACTUS_OP_ERASE, TRUE); + self->ops.erase (n, bytes, by_keys, self->data); + } + if (text && *text) { + model_append (self, text, NULL, now_us (self)); + sent (self, TACTUS_OP_INSERT, TRUE); + self->ops.commit (text, self->data); + } +} + +/* + * Words + */ + +/* Where the word the cursor is at the end of starts; the length of the text if there is none */ +static guint +word_start (TactusTyper *self) +{ + guint s = self->chars->len; + + while (s > 0 && is_word_char (char_at (self, s - 1)->c)) + s--; + return s; +} + +/* Whether text can be taken away now. A text field that tells must have shown + * all that was sent to it: the browser takes text away counting from the + * cursor it last told of, not from where the cursor is, so a request that + * comes before it has caught up takes nothing or the wrong letters. One that + * has text taken away with Backspace only needs no key's outcome to be open. */ +static gboolean +settled (TactusTyper *self) +{ + if (!self->reporting) + return TRUE; + + if (!self->no_delete) + return self->pending->len == 0; + + for (guint i = 0; i < self->pending->len; i++) { + if (g_array_index (self->pending, TactusOp, i).kind == TACTUS_OP_OTHER) + return FALSE; + } + return TRUE; +} + +/* Why the word from @s to the cursor is left as it is, whatever the + * dictionary says; NULL if it is known well enough to be replaced */ +static const char * +word_stays_because (TactusTyper *self, guint s) +{ + guint len = self->chars->len; + + if (s >= len) + return "no word"; + if (len - s > WORD_MAX) + return "too long"; + if (self->after_word) + return "a letter follows the cursor"; + /* The owner was typing it */ + if (char_at (self, len - 1)->time == 0) + return "not typed just now"; + + if (s == 0) { + if (!self->anchored) + return "what is before it is not known"; + } else { + gunichar before = char_at (self, s - 1)->c; + + /* Part of something longer ("user@host", "example.com", "x-ray") is not a word to correct */ + if (!is_space (before) && before != '\n' && !is_opener (before)) + return "part of something longer"; + } + + if (!settled (self)) + return "the text field has not shown all that was sent"; + + if (!self->reporting) { + /* Typed in one go */ + for (guint i = s; i < len; i++) { + if (char_at (self, i)->time == 0) + return "not all of it typed just now"; + if (i > s && char_at (self, i)->time - char_at (self, i - 1)->time > PAUSE_US) + return "typed with a long pause"; + } + } + return NULL; +} + +/* The word that was meant by the one from @s to the cursor, or NULL to keep it */ +static char * +meant (TactusTyper *self, guint s) +{ + guint len = self->chars->len, n = len - s; + g_autofree char *word = model_dup (self, s, len); + g_autofree TactusTap *taps = g_new0 (TactusTap, n); + gboolean have_taps = TRUE; + char *fixed; + + /* Put back once and typed again, or kept after it was put back: it is meant */ + if (self->rejected) { + gboolean again = g_ascii_strcasecmp (self->rejected, word) == 0; + + g_clear_pointer (&self->rejected, g_free); + if (again) { + if (learns (self)) + tactus_ac_learn (word); + note (self, "a word of %u letters kept: it was put back before", n); + return NULL; + } + } + + if (!corrects (self)) { + note (self, "a word of %u letters kept: the field asked for no corrections (hints 0x%x)", n, self->hints); + return NULL; + } + + for (guint i = 0; i < n; i++) { + taps[i] = char_at (self, s + i)->tap; + have_taps = have_taps && taps[i].valid; + } + + fixed = tactus_ac_correct (word, have_taps ? taps : NULL, n, sentence_start_at (self, s)); + if (fixed && g_str_equal (fixed, word)) + g_clear_pointer (&fixed, g_free); + if (have_taps && learns (self)) + tactus_ac_observe (word, fixed ?: word, taps, n); + note (self, "a word of %u letters %s (%s)", n, fixed ? "corrected" : "kept by the dictionary", + have_taps ? "taps" : "letters only"); + + return fixed; +} + +/* The word at the cursor is done and @tail follows it. Returns: whether + * it took care of @tail as well. */ +static gboolean +finish_word (TactusTyper *self, const char *tail) +{ + guint s = word_start (self); + g_autofree char *fixed = NULL; + g_autofree char *typed = NULL; + g_autofree char *made = NULL; + + const char *why = word_stays_because (self, s); + + if (why) { + if (s < self->chars->len) + note (self, "a word of %u letters kept: %s", self->chars->len - s, why); + return FALSE; + } + + fixed = meant (self, s); + if (fixed == NULL) + return FALSE; + + typed = model_dup (self, s, self->chars->len); + made = g_strconcat (fixed, tail, NULL); + /* Letter counts only: what was typed never goes to a log */ + g_debug ("a word of %u letters corrected to one of %u", + (guint) g_utf8_strlen (typed, -1), (guint) g_utf8_strlen (fixed, -1)); + replace (self, self->chars->len - s, made); + + disarm_undo (self); + self->undo_armed = TRUE; + self->undo_typed = g_steal_pointer (&typed); + self->undo_made = g_steal_pointer (&made); + return TRUE; +} + +/* + * Keys + */ + +static void +type_letter (TactusTyper *self, const char *text, const TactusTap *tap) +{ + disarm_undo (self); + insert (self, text, tap); +} + + +static void +type_space (TactusTyper *self) +{ + guint len = self->chars->len; + gint64 now = now_us (self); + + /* Two spaces after a word: a full stop and a space */ + if (len >= 2 && char_at (self, len - 1)->c == ' ' && char_at (self, len - 1)->time != 0 && + now - char_at (self, len - 1)->time < DOUBLE_SPACE_US && !self->after_word && settled (self)) { + gunichar before = char_at (self, len - 2)->c; + + if (!is_space (before) && before != '\n' && !(before < 0x80 && strchr (".,?!;:-/", (int) before))) { + disarm_undo (self); + replace (self, 1, ". "); + /* a third space is a space */ + char_at (self, self->chars->len - 1)->time = 0; + return; + } + } + + if (finish_word (self, " ")) + return; + + disarm_undo (self); + insert (self, " ", NULL); +} + + +static void +type_other (TactusTyper *self, const char *text, gboolean ends) +{ + if (ends && finish_word (self, text)) + return; + + disarm_undo (self); + insert (self, text, NULL); +} + + +static void +type_enter (TactusTyper *self) +{ + guint s = word_start (self), line = s; + gboolean prose = FALSE; + + /* Only in running text: a lone word sent off with Return (a search, a name) stays as typed */ + while (line > 0 && char_at (self, line - 1)->c != '\n') { + if (is_word_char (char_at (self, line - 1)->c)) + prose = TRUE; + line--; + } + if (prose) + finish_word (self, ""); + disarm_undo (self); + + if (self->reporting) { + model_append (self, "\n", NULL, 0); + sent (self, TACTUS_OP_OTHER, TRUE); + } else { + /* A new line or a message sent off: either way what comes next starts afresh */ + model_reset (self, TRUE); + sent (self, TACTUS_OP_OTHER, FALSE); + } + self->ops.key ("KEY_ENTER", self->data); +} + +/* A key that moves the cursor, or one we know nothing about */ +static void +type_key (TactusTyper *self, const char *symbol) +{ + disarm_undo (self); + /* Where the cursor is now, only the text field knows: one that tells will + * tell, and until then nothing is corrected */ + if (!self->reporting) + model_reset (self, FALSE); + sent (self, TACTUS_OP_OTHER, FALSE); + self->ops.key (symbol, self->data); +} + +/* What a key does, once it is its turn */ +static void +act_backspace (TactusTyper *self, TactusBackspace how) +{ + guint len; + + /* Right after a correction: the word as it was typed comes back */ + if (how == TACTUS_BACKSPACE_TAP && self->undo_armed) { + g_autofree char *typed = g_steal_pointer (&self->undo_typed); + g_autofree char *made = g_steal_pointer (&self->undo_made); + guint n = g_utf8_strlen (made, -1); + + disarm_undo (self); + if (n <= self->chars->len && settled (self)) { + g_autofree char *tail = model_dup (self, self->chars->len - n, self->chars->len); + + if (g_str_equal (tail, made)) { + g_debug ("a word of %u letters put back", (guint) g_utf8_strlen (typed, -1)); + replace (self, n, typed); + g_free (self->rejected); + self->rejected = g_strdup (typed); + update_shift (self, FALSE); + return; + } + } + } + disarm_undo (self); + + len = self->chars->len; + if (how == TACTUS_BACKSPACE_WORD && len > 0 && !self->selection && settled (self)) { + guint i = len; + + /* The spaces after the last word, then the word */ + while (i > 0 && is_space (char_at (self, i - 1)->c)) + i--; + if (i > 0 && char_at (self, i - 1)->c == '\n') { + if (i == len) + i--; + } else { + while (i > 0 && !is_space (char_at (self, i - 1)->c) && char_at (self, i - 1)->c != '\n') + i--; + } + if (len - i > 1) { + replace (self, len - i, NULL); + update_shift (self, FALSE); + return; + } + } + + if (self->selection) { + /* It deletes what is selected; what is before stays */ + self->selection = FALSE; + sent (self, TACTUS_OP_OTHER, TRUE); + } else if (len > 0) { + model_pop (self, 1); + sent (self, TACTUS_OP_OTHER, TRUE); + } else if (self->reporting) { + sent (self, TACTUS_OP_OTHER, self->anchored); + } else { + /* There was text before the cursor that we knew nothing of */ + self->anchored = FALSE; + sent (self, TACTUS_OP_OTHER, FALSE); + } + self->ops.key ("KEY_BACKSPACE", self->data); + update_shift (self, FALSE); +} + + +static void +act_key (TactusTyper *self, const char *symbol, const TactusTap *tap) +{ + gunichar c; + + if (g_str_has_prefix (symbol, "KEY_")) { + if (g_str_equal (symbol, "KEY_ENTER")) + type_enter (self); + else + type_key (self, symbol); + update_shift (self, FALSE); + return; + } + if (*symbol == '\0') + return; + + c = g_utf8_get_char (symbol); + if (g_utf8_strlen (symbol, -1) == 1 && is_word_char (c)) + type_letter (self, symbol, tap); + else if (g_str_equal (symbol, " ")) + type_space (self); + else + type_other (self, symbol, ends_word (symbol)); + + update_shift (self, FALSE); +} + + +static void +act (TactusTyper *self, const TactusInput *in) +{ + switch (in->kind) { + case TACTUS_IN_BACKSPACE: + act_backspace (self, in->how); + break; + case TACTUS_IN_TEXT: + type_other (self, in->text, in->ends_word); + update_shift (self, FALSE); + break; + case TACTUS_IN_KEY: + default: + act_key (self, in->text, in->has_tap ? &in->tap : NULL); + break; + } +} + +/* Whether @in may take text away */ +static gboolean +may_replace (TactusTyper *self, const TactusInput *in) +{ + guint len = self->chars->len; + gboolean word = word_start (self) < len; + + switch (in->kind) { + case TACTUS_IN_BACKSPACE: + if (in->how == TACTUS_BACKSPACE_TAP) + return self->undo_armed; + return in->how == TACTUS_BACKSPACE_WORD && len > 0 && !self->selection; + case TACTUS_IN_TEXT: + return in->ends_word && word; + case TACTUS_IN_KEY: + default: + if (g_str_equal (in->text, "KEY_ENTER")) + return word; + if (g_str_has_prefix (in->text, "KEY_")) + return FALSE; + /* a word to correct, or the second of two spaces */ + if (g_str_equal (in->text, " ")) + return word || (len >= 2 && char_at (self, len - 1)->c == ' ' && char_at (self, len - 1)->time != 0); + return ends_word (in->text) && word; + } +} + +/* Whether @in has to wait: it may take text away, and the text field has yet + * to show what was sent before it */ +static gboolean +must_wait (TactusTyper *self, const TactusInput *in) +{ + if (!self->reporting || self->no_delete || self->pending->len == 0) + return FALSE; + if (now_us (self) < self->no_hold_until) + return FALSE; + + /* Not for a key whose outcome is the field's to tell: nothing is taken + * away after one until the field has told, or the wait for it has run out */ + for (guint i = 0; i < self->pending->len; i++) { + if (g_array_index (self->pending, TactusOp, i).kind == TACTUS_OP_OTHER) + return FALSE; + } + return may_replace (self, in); +} + + +static void +input_clear (gpointer data) +{ + TactusInput *in = data; + + g_clear_pointer (&in->text, g_free); +} + +/* A key comes in: its turn is now, or after those that wait */ +static void +take (TactusTyper *self, const TactusInput *in) +{ + TactusInput keep; + + if (self->held->len == 0 && !must_wait (self, in)) { + act (self, in); + return; + } + + if (self->held->len == 0) { + self->held_since = now_us (self); + note (self, "a key waits for the text field to show what was sent"); + } + keep = *in; + keep.text = g_strdup (in->text); + g_array_append_val (self->held, keep); + arm_wake (self); +} + +/* The keys that waited, in their order */ +static void +drain (TactusTyper *self) +{ + if (self->draining) + return; + + self->draining = TRUE; + while (self->held->len > 0) { + TactusInput in = g_array_index (self->held, TactusInput, 0); + gint64 now = now_us (self); + + if (must_wait (self, &in)) { + if (now - self->held_since < HOLD_US) + break; + /* Too slow to wait for. On with it: nothing is taken away while the + * field is behind, so the word stays as it was typed. */ + note (self, "the text field did not catch up in time: keys don't wait for it for a while"); + self->no_hold_until = now + HOLD_OFF_US; + } + + /* Out of the line before its turn: what it sends may bring us back here */ + g_array_index (self->held, TactusInput, 0).text = NULL; + g_array_remove_index (self->held, 0); + act (self, &in); + g_free (in.text); + self->held_since = now; + } + self->draining = FALSE; + if (self->held->len > 0) + arm_wake (self); +} + +/** + * tactus_typer_key: + * @self: The typer + * @symbol: What the key types, or its name ("KEY_ENTER") + * @tap:(nullable): Where in the key the finger was + * + * A key of the keyboard was typed. + */ +void +tactus_typer_key (TactusTyper *self, const char *symbol, const TactusTap *tap) +{ + TactusInput in = { .kind = TACTUS_IN_KEY }; + + g_return_if_fail (self != NULL && symbol != NULL); + + if (g_str_equal (symbol, "KEY_BACKSPACE")) { + tactus_typer_backspace (self, TACTUS_BACKSPACE_TAP); + return; + } + + in.text = (char *) symbol; + if (tap) { + in.tap = *tap; + in.has_tap = TRUE; + } + tactus_typer_poll (self); + take (self, &in); +} + +/** + * tactus_typer_text: + * @self: The typer + * @text: Text from elsewhere than a key: an emoji, the clipboard + * @ends_word: Whether it ends the word before it the way a full stop does + */ +void +tactus_typer_text (TactusTyper *self, const char *text, gboolean ends_word) +{ + TactusInput in = { .kind = TACTUS_IN_TEXT, .ends_word = ends_word }; + + g_return_if_fail (self != NULL); + + if (text == NULL || *text == '\0') + return; + + in.text = (char *) text; + tactus_typer_poll (self); + take (self, &in); +} + +/** + * tactus_typer_backspace: + * @self: The typer + * @how: A tap, or the key being held + */ +void +tactus_typer_backspace (TactusTyper *self, TactusBackspace how) +{ + TactusInput in = { .kind = TACTUS_IN_BACKSPACE, .how = how }; + + g_return_if_fail (self != NULL); + + tactus_typer_poll (self); + take (self, &in); +} + +/* + * The text field + */ + +static void +clear_pending (TactusTyper *self) +{ + g_array_set_size (self->pending, 0); +} + +/* Answer the text field. The browser tells nothing more until what it last + * told has been answered, and the compositor answers a text field only when + * the keyboard sends something: left unanswered, the browser is one key + * behind, and takes text away counting from where its cursor was then. An + * answer with nothing in it changes nothing in a text field. */ +static void +answer (TactusTyper *self) +{ + gint64 now = now_us (self); + + if (self->ops.ack == NULL || self->ack_muted) + return; + + if (now - self->ack_second >= G_TIME_SPAN_SECOND) { + self->ack_full_seconds = self->acks >= ACKS_A_SECOND ? self->ack_full_seconds + 1 : 0; + self->ack_second = now; + self->acks = 0; + } + if (self->acks >= ACKS_A_SECOND) { + /* One that answers every answer: the two would go on for ever */ + if (self->ack_full_seconds >= ACK_SECONDS && !self->ack_muted) { + self->ack_muted = TRUE; + note (self, "the text field answers every answer: it gets no more"); + } + return; + } + self->acks++; + self->ops.ack (self->data); +} + +/** + * tactus_typer_poll: + * @self: The typer + * + * Give up waiting for a text field to show what it was sent a while ago. + */ +void +tactus_typer_poll (TactusTyper *self) +{ + gint64 now; + + g_return_if_fail (self != NULL); + + now = now_us (self); + for (guint i = 0; i < self->pending->len; i++) { + TactusOp *op = &g_array_index (self->pending, TactusOp, i); + + if (op->kind != TACTUS_OP_OTHER) { + /* Text that never showed keeps its place in the copy, and counts as + * shown: what the field tells next is held against it */ + if (now - op->time >= INSERT_WAIT_US) { + if (op->predicted) { + g_free (self->acked); + self->acked = g_steal_pointer (&op->predicted); + self->acked_anchored = op->anchored; + } + g_array_remove_index (self->pending, i); + i--; + } + continue; + } + if (now - op->time < OTHER_WAIT_US) + continue; + + /* A key the field did not answer as foreseen (Backspace with nothing to + * delete, an arrow at the end): what it last told stands */ + g_debug ("no answer to a key: back to what the field told"); + clear_pending (self); + if (self->acked) + model_adopt (self, self->acked, self->acked_anchored); + disarm_undo (self); + update_shift (self, TRUE); + break; + } + drain (self); + arm_wake (self); +} + +/* The text before the cursor out of what a text field told. Returns: whether it made sense. */ +static gboolean +read_report (const char *text, guint cursor, guint anchor, + char **before, gboolean *anchored, gboolean *after_word, gboolean *selection) +{ + size_t len = strlen (text); + size_t lo = MIN (MIN (cursor, anchor), len), hi = MIN (MAX (cursor, anchor), len); + GString *out; + glong n_chars; + const char *p, *end; + + if (!g_utf8_validate (text, -1, NULL)) + return FALSE; + + while (lo > 0 && lo < len && (text[lo] & 0xc0) == 0x80) + lo--; + while (hi < len && (text[hi] & 0xc0) == 0x80) + hi++; + + p = text; + end = text + lo; + n_chars = g_utf8_pointer_to_offset (p, end); + *anchored = TRUE; + if (n_chars > MODEL_MAX) { + p = g_utf8_offset_to_pointer (p, n_chars - MODEL_MAX); + *anchored = FALSE; + } + + out = g_string_new (NULL); + for (; p < end; p = g_utf8_next_char (p)) { + gunichar c = g_utf8_get_char (p); + + g_string_append_unichar (out, c == 0xa0 ? ' ' : c); + } + *before = g_string_free (out, FALSE); + *after_word = hi < len && is_word_char (g_utf8_get_char (text + hi)); + *selection = lo != hi; + return TRUE; +} + +/* A sign of life from a text field that tells nothing */ +static void +silent_state (TactusTyper *self) +{ + gint64 now = now_us (self); + gboolean echo = FALSE; + + if (self->reporting) { + self->reporting = FALSE; + g_clear_pointer (&self->acked, g_free); + clear_pending (self); + } + + /* The keyboard changed its height: the field moves, and says so */ + if (now < self->settle_until) + return; + + /* The first sign of life after a key is that key's echo, and what follows + * it closely (the text field settling) still is. Anything later is not: + * a tap on the application's own Send button comes a moment after the + * last key, and must not pass for its echo. */ + if (self->last_send) { + if (!self->echo_seen) + echo = now - self->last_send < ECHO_US; + else + echo = now - self->echo_time < ECHO_TAIL_US; + } + if (echo) { + self->echo_seen = TRUE; + self->echo_time = now; + return; + } + + /* No key of ours explains it: the cursor went elsewhere, or the text was sent off */ + g_debug ("the text field changed by itself: starting afresh"); + note (self, "the text field changed by itself (%u letters known before): starting afresh", self->chars->len); + self->last_send = 0; + model_reset (self, TRUE); + disarm_undo (self); + update_shift (self, TRUE); +} + +/* A text field told its text */ +static void +told (TactusTyper *self, char **told_before, gboolean anchored, gboolean after_word, gboolean selection) +{ + g_autofree char *before = g_steal_pointer (told_before); + gboolean first = !self->reporting; + + self->reporting = TRUE; + self->after_word = after_word; + self->selection = selection; + + if (first) { + g_autofree char *typed = NULL; + + note (self, "the text field tells its text"); + /* Keys went out before it first spoke, and it may be telling how things + * were before them: one that speaks only when spoken to is a step behind */ + if (self->last_send && now_us (self) - self->last_send < INSERT_WAIT_US && + self->chars->len > 0 && self->chars->len <= FIRST_MAX) + typed = model_dup (self, 0, self->chars->len); + + clear_pending (self); + g_clear_pointer (&self->if_ignored, g_free); + g_free (self->acked); + self->acked = g_strdup (before); + self->acked_anchored = anchored; + + if (typed && !g_str_has_suffix (before, typed)) { + TactusOp op = { .kind = TACTUS_OP_INSERT, .time = self->last_send, .anchored = anchored }; + char *whole = g_strconcat (before, typed, NULL); + + note (self, "it tells of the time before the %u letters just sent: they stay", self->chars->len); + model_adopt (self, whole, anchored); + op.predicted = whole; + g_array_append_val (self->pending, op); + arm_wake (self); + } else { + model_adopt (self, before, anchored); + } + disarm_undo (self); + update_shift (self, TRUE); + return; + } + + if (self->acked) { + /* Is it what we foresaw for something we sent? The latest first. */ + for (guint k = self->pending->len; k >= 1; k--) { + TactusOp *op = &g_array_index (self->pending, TactusOp, k - 1); + + if (op->predicted == NULL || !same_text (before, anchored, op->predicted, op->anchored)) + continue; + + g_array_remove_range (self->pending, 0, k); + g_free (self->acked); + self->acked = g_steal_pointer (&before); + self->acked_anchored = anchored; + g_clear_pointer (&self->if_ignored, g_free); + if (self->pending->len == 0) + model_adopt (self, self->acked, self->acked_anchored); + return; + } + /* Nothing new */ + if (same_text (before, anchored, self->acked, self->acked_anchored)) + return; + } + + /* The text field has it otherwise: it is right */ + if (self->acked && self->pending->len > 0) + note (self, "the text field has it otherwise than foreseen (%u sent and unanswered)", self->pending->len); + if (self->if_ignored && same_text (before, anchored, self->if_ignored, FALSE)) { + g_warning ("This text field ignores requests to delete: using Backspace from now on"); + self->no_delete = TRUE; + } + g_clear_pointer (&self->if_ignored, g_free); + + g_free (self->acked); + self->acked = g_steal_pointer (&before); + self->acked_anchored = anchored; + clear_pending (self); + model_adopt (self, self->acked, self->acked_anchored); + disarm_undo (self); + update_shift (self, TRUE); +} + +/** + * tactus_typer_state: + * @self: The typer + * @text:(nullable): The text around the cursor as the text field tells it, or %NULL if it tells nothing + * @cursor: Where in @text the cursor is, in bytes + * @anchor: Where in @text the other end of the selection is + * + * The text field gave a sign of life (the input method's `done`). + */ +void +tactus_typer_state (TactusTyper *self, const char *text, guint cursor, guint anchor) +{ + g_autofree char *before = NULL; + gboolean anchored, after_word, selection; + + g_return_if_fail (self != NULL); + + if (!self->active) + return; + + if (text == NULL || !read_report (text, cursor, anchor, &before, &anchored, &after_word, &selection)) { + silent_state (self); + /* One that keeps its text back until it is answered tells it now */ + if (!self->greeted) { + self->greeted = TRUE; + answer (self); + } + return; + } + + told (self, &before, anchored, after_word, selection); + self->greeted = TRUE; + answer (self); + drain (self); +} + +/** + * tactus_typer_settle: + * @self: The typer + * @ms: How long things take to settle + * + * The keyboard is about to change its height. A text field that tells + * nothing gives signs of life as it moves; for this long they mean nothing. + */ +void +tactus_typer_settle (TactusTyper *self, guint ms) +{ + g_return_if_fail (self != NULL); + + self->settle_until = now_us (self) + ms * G_TIME_SPAN_MILLISECOND; +} + +/** + * tactus_typer_set_language: + * @self: The typer + * @lang:(nullable): The language of the layout the keys are typed on ("en", "de") + * + * The dictionary is English. With another language's layout words are left as + * they are typed; capitals at the start of a sentence stay. + */ +void +tactus_typer_set_language (TactusTyper *self, const char *lang) +{ + g_return_if_fail (self != NULL); + + self->foreign = lang != NULL && !g_str_has_prefix (lang, "en"); +} + +/** + * tactus_typer_set_hints: + * @self: The typer + * @hints: What the text field says it is for (text-input's content hint) + */ +void +tactus_typer_set_hints (TactusTyper *self, guint hints) +{ + g_return_if_fail (self != NULL); + + if (self->hints == hints) + return; + note (self, "the text field's hints: 0x%x", hints); + self->hints = hints; + update_shift (self, TRUE); +} + +/** + * tactus_typer_focus: + * @self: The typer + * @active: Whether there is a text field to type into + * + * A text field came or went. A new one is taken to be empty until it tells + * otherwise. + */ +void +tactus_typer_focus (TactusTyper *self, gboolean active) +{ + g_return_if_fail (self != NULL); + + note (self, active ? "a text field" : "no text field"); + self->active = active; + self->reporting = FALSE; + self->no_delete = FALSE; + self->hints = 0; + self->last_send = 0; + self->echo_seen = FALSE; + self->settle_until = 0; + g_clear_pointer (&self->acked, g_free); + g_clear_pointer (&self->if_ignored, g_free); + g_clear_pointer (&self->rejected, g_free); + clear_pending (self); + /* keys that waited for a text field that is gone go nowhere */ + g_array_set_size (self->held, 0); + self->held_since = 0; + self->no_hold_until = 0; + self->greeted = FALSE; + self->ack_second = 0; + self->acks = 0; + self->ack_full_seconds = 0; + self->ack_muted = FALSE; + disarm_undo (self); + model_reset (self, TRUE); + + if (!active) + tactus_ac_save (); + update_shift (self, TRUE); +} + +/** + * tactus_typer_dup_before: + * @self: The typer + * + * Returns:(transfer full): The text before the cursor as the typer has it + */ +char * +tactus_typer_dup_before (TactusTyper *self) +{ + g_return_val_if_fail (self != NULL, NULL); + + return model_dup (self, 0, self->chars->len); +} + + +void +tactus_typer_set_clock (TactusTyper *self, gint64 (*now) (gpointer data), gpointer data) +{ + g_return_if_fail (self != NULL); + + self->now = now; + self->now_data = data; +} + + +TactusTyper * +tactus_typer_new (const TactusTyperOps *ops, gpointer data) +{ + TactusTyper *self = g_new0 (TactusTyper, 1); + + g_return_val_if_fail (ops && ops->commit && ops->erase && ops->key, NULL); + + self->ops = *ops; + self->data = data; + self->trace = g_getenv ("TACTUS_TRACE") != NULL; + self->chars = g_array_new (FALSE, TRUE, sizeof (TactusChar)); + self->pending = g_array_new (FALSE, TRUE, sizeof (TactusOp)); + g_array_set_clear_func (self->pending, op_clear); + self->held = g_array_new (FALSE, TRUE, sizeof (TactusInput)); + g_array_set_clear_func (self->held, input_clear); + self->anchored = TRUE; + return self; +} + + +void +tactus_typer_free (TactusTyper *self) +{ + if (self == NULL) + return; + + tactus_ac_save (); + disarm_undo (self); + g_free (self->acked); + g_free (self->if_ignored); + g_free (self->rejected); + g_array_unref (self->pending); + g_array_unref (self->held); + g_array_unref (self->chars); + g_free (self); +} diff --git a/packages/tactus/source/tactus-typer.h b/packages/tactus/source/tactus-typer.h new file mode 100644 index 000000000..4d4ef2b33 --- /dev/null +++ b/packages/tactus/source/tactus-typer.h @@ -0,0 +1,72 @@ +/* + * Tactus's typing: what goes to the text field for each key. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#pragma once + +#include "tactus-autocorrect.h" + +#include + +G_BEGIN_DECLS + +typedef struct _TactusTyper TactusTyper; + +/* What the text field said it is for (the bits of text-input's content hint) */ +#define TACTUS_HINT_COMPLETION 0x1 +#define TACTUS_HINT_SPELLCHECK 0x2 +#define TACTUS_HINT_AUTO_CAPS 0x4 +#define TACTUS_HINT_LOWERCASE 0x8 +#define TACTUS_HINT_UPPERCASE 0x10 +#define TACTUS_HINT_TITLECASE 0x20 +#define TACTUS_HINT_HIDDEN 0x40 +#define TACTUS_HINT_SENSITIVE 0x80 + +typedef enum { + TACTUS_BACKSPACE_TAP, /* the key went down */ + TACTUS_BACKSPACE_REPEAT, /* it is held: one more character */ + TACTUS_BACKSPACE_WORD, /* it has been held for a while: one more word */ +} TactusBackspace; + +typedef struct { + /* Put this text where the cursor is */ + void (*commit) (const char *text, gpointer data); + /* Take away what is before the cursor: with the text field's own means (so + * many bytes), or, where it has none, as so many presses of Backspace */ + void (*erase) (guint n_chars, guint n_bytes, gboolean by_keys, gpointer data); + /* Press a key: "KEY_BACKSPACE", "KEY_ENTER", "KEY_LEFT" … */ + void (*key) (const char *symbol, gpointer data); + /* Whether the next letter should be a capital; @context_changed when the + * text or the cursor changed by other means than a key of ours */ + void (*shift) (gboolean wanted, gboolean context_changed, gpointer data); + /* Call tactus_typer_poll() in so many milliseconds */ + void (*wake) (guint ms, gpointer data); + /* Answer the text field with nothing (the input method's empty commit): a + * field that waits for an answer before it tells more can go on. May be NULL. */ + void (*ack) (gpointer data); +} TactusTyperOps; + +TactusTyper *tactus_typer_new (const TactusTyperOps *ops, gpointer data); +void tactus_typer_free (TactusTyper *self); +void tactus_typer_set_clock (TactusTyper *self, gint64 (*now) (gpointer data), gpointer data); + +void tactus_typer_focus (TactusTyper *self, gboolean active); +void tactus_typer_set_hints (TactusTyper *self, guint hints); +void tactus_typer_set_language (TactusTyper *self, const char *lang); +void tactus_typer_state (TactusTyper *self, const char *text, guint cursor, guint anchor); + +void tactus_typer_key (TactusTyper *self, const char *symbol, const TactusTap *tap); +void tactus_typer_backspace (TactusTyper *self, TactusBackspace how); +void tactus_typer_text (TactusTyper *self, const char *text, gboolean ends_word); +void tactus_typer_poll (TactusTyper *self); +void tactus_typer_settle (TactusTyper *self, guint ms); + +gboolean tactus_typer_wants_capital (TactusTyper *self); +/* For tests and logs: the text before the cursor as the typer has it */ +char *tactus_typer_dup_before (TactusTyper *self); + +G_END_DECLS diff --git a/packages/tactus/tactus b/packages/tactus/tactus new file mode 100755 index 000000000..d685452a5 --- /dev/null +++ b/packages/tactus/tactus @@ -0,0 +1,12 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# Tactus, the on-screen keyboard. It lives under /usr/lib/tactus with settings +# schemas of its own (Stevia's, which a phone with squeekboard doesn't have), +# so this points GSettings at them and starts it. --allow-replacement: another +# keyboard may take the session's keyboard name (sm.puri.OSK0) from it, which +# is how `omamobile-osk use` changes keyboards without a gap. +# TACTUS_TRACE=1 makes it say in the journal what the typing engine does and +# why (a word kept or corrected, a text field that tells its text or doesn't), +# never what is typed. +export GSETTINGS_SCHEMA_DIR=/usr/lib/tactus/share/glib-2.0/schemas${GSETTINGS_SCHEMA_DIR:+:$GSETTINGS_SCHEMA_DIR} +exec /usr/lib/tactus/bin/tactus --allow-replacement "$@" diff --git a/packages/tactus/tactus.gschema.override b/packages/tactus/tactus.gschema.override new file mode 100644 index 000000000..20cf7b544 --- /dev/null +++ b/packages/tactus/tactus.gschema.override @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT +# Tactus's defaults for Stevia's settings. It is compiled with Stevia's schemas +# under /usr/lib/tactus, which only Tactus reads. +[mobi.phosh.osk] +# Stevia's own word completion stays off: Tactus's typing engine takes the keys +# before Stevia's completer would see them, and corrects the words itself. +completion-mode=[] diff --git a/packages/tactus/test/all b/packages/tactus/test/all new file mode 100755 index 000000000..1d7c93552 --- /dev/null +++ b/packages/tactus/test/all @@ -0,0 +1,158 @@ +#!/bin/bash +# SPDX-License-Identifier: MIT +# Checks for the tactus package. +# +# test/all offline (tests/packages, CI): the PKGBUILD's pins, the patches' +# shape and which files they touch, the launcher, the licences +# test/all --upstream DIR also: the patches apply to the untouched Stevia tree in DIR +# with no fuzz, and nothing of ours overwrites a file of Stevia's +# test/all --built BUILD SRC (the PKGBUILD's check()) also: the checks built with the +# keyboard run: the typing engine against make-believe text +# fields, the autocorrection's word list, and, under xvfb-run, +# the keys and the emoji page; and the trace says nothing typed +set -uo pipefail +cd "$(dirname "$(readlink -f "$0")")/.." +fails=0 +fail() { echo "FAIL: $*" >&2; fails=$((fails + 1)); } +pass() { echo "ok: $*"; } + +upstream= built= src= +case ${1:-} in + --upstream) upstream=${2:?--upstream DIR} ;; + --built) built=${2:?--built BUILD SRC}; src=${3:?--built BUILD SRC} ;; + "") ;; + *) echo "usage: test/all [--upstream DIR | --built BUILD SRC]" >&2; exit 2 ;; +esac + +# --- the PKGBUILD +# shellcheck disable=SC1091 +( startdir=$PWD; source ./PKGBUILD + [[ $pkgname == tactus && $pkgver == "$(cat version)" ]] || exit 1 + [[ ${#source[@]} == 2 && ${#sha256sums[@]} == 2 ]] || exit 2 + [[ ${sha256sums[0]} =~ ^[0-9a-f]{64}$ && ${sha256sums[1]} =~ ^[0-9a-f]{64}$ ]] || exit 3 + [[ ${source[0]} == *"/v$_stevia/stevia-v$_stevia.tar.gz" ]] || exit 4 + [[ ${source[1]} == *"/FrequencyWords/$_counts/content/2018/en/en_50k.txt" && $_counts =~ ^[0-9a-f]{40}$ ]] || exit 5 + grep -q "commit $_counts" WORD-COUNTS || exit 6 + [[ " ${depends[*]} " == *" hunspell-en_us "* && " ${depends[*]} " != *" squeekboard "* ]] || exit 7 + [[ -z ${conflicts[*]:-} && -z ${provides[*]:-} ]] || exit 8 +) && pass "PKGBUILD: both downloads pinned by commit or tag and sha256, the word counts' commit is the one WORD-COUNTS names, no conflict with squeekboard" \ + || fail "PKGBUILD (exit $?)" +grep -q -- '--prefix=/usr/lib/tactus' PKGBUILD && grep -q -- '-Dsystemd_user_unit_dir=/usr/lib/tactus/' PKGBUILD \ + && grep -q -- '-Ddefault_osk=false' PKGBUILD \ + && pass "everything is installed under /usr/lib/tactus, the unit included (squeekboard owns mobi.phosh.OSK.service)" \ + || fail "the build no longer keeps to /usr/lib/tactus" +grep -q 'mv "$p/bin/phosh-osk-stevia" "$p/bin/tactus"' PKGBUILD \ + && pass "the binary is named tactus (Hyprland names its virtual keyboard after it)" || fail "the binary keeps Stevia's name" + +# --- the patches +want_files="meson.build src/layouts/us.json src/meson.build src/pos-emoji-picker.c src/pos-emoji-picker.h src/pos-hw-tracker.c src/pos-input-surface.c src/pos-osk-widget.c src/pos-osk-widget.h src/pos-wayland.c tools/meson.build" +shopt -s nullglob +patches=(patches/*.patch) +[[ ${#patches[@]} == 6 ]] && pass "six patches" || fail "${#patches[@]} patches, not six" +bad= +for p in "${patches[@]}"; do + [[ $(head -1 "$p") == "Subject: "* ]] || bad+=" $p:no-subject" + grep -qx -- '---' "$p" || bad+=" $p:no-separator" + [[ $(grep -c '^@@ ' "$p") -ge 1 ]] || bad+=" $p:no-hunk" +done +[[ -z $bad ]] && pass "each patch says what it does and why, then the diff" || fail "patches not shaped as patches:$bad" +got_files=$(grep -h '^+++ b/' "${patches[@]}" | sed 's|^+++ b/||' | sort | tr '\n' ' ') +[[ "$got_files" == "$(tr ' ' '\n' <<<"$want_files" | sort | tr '\n' ' ')" ]] \ + && pass "the patches change eleven of Stevia's files and no other" || fail "the patches touch: $got_files" + +# --- our own sources +own=(source/tactus-autocorrect.c source/tactus-autocorrect.h source/tactus-draw.c source/tactus-draw.h source/tactus-typer.c source/tactus-typer.h + tools/tactus-ac-test.c tools/tactus-draw-test.c tools/tactus-emoji-test.c tools/tactus-kbd-test.c tools/tactus-pages-test.c tools/tactus-typer-test.c) +bad= +for f in "${own[@]}"; do + [[ -f $f ]] || { bad+=" $f:missing"; continue; } + grep -q 'SPDX-License-Identifier: GPL-3.0-or-later' "$f" || bad+=" $f:no-licence" +done +[[ -z $bad && $(ls source/* tools/* | wc -l) == "${#own[@]}" ]] && pass "twelve source files of our own, each GPL-3.0-or-later" || fail "own sources:$bad" +[[ $(sed -n 1p COPYING 2>/dev/null | tr -s ' ') == ' GNU GENERAL PUBLIC LICENSE' && $(sed -n 2p COPYING | tr -s ' ') == ' Version 3, 29 June 2007' ]] \ + && [[ $(head -1 README.md) == '' ]] \ + && pass "the GPL-3.0 text is beside them, and the README says it" || fail "COPYING is not the GPL-3.0, or the README has no SPDX line" +own_cr=0; for f in source/* tools/*; do grep -q 'Copyright (C) 2026 W4HO' "$f" || own_cr=1; done +((own_cr == 0)) && pass "each of our own files has its copyright line" || fail "a file of our own has no copyright line" +for t in ac draw emoji kbd pages typer; do + grep -q "tactus-$t-test" patches/0002-*.patch || fail "tools/meson.build (patch 0002) doesn't build tactus-$t-test" +done +# What the trace may say is fixed text and counts: no place in it takes a typed word +if grep -n 'note (self' source/tactus-typer.c | grep -E '%s' | grep -vE '"(corrected|kept by the dictionary)"|"(taps|letters only)"|, why\)|\? "a text field" : "no text field"' | grep -c . >/dev/null; then + fail "a trace line in tactus-typer.c takes a string that is not one of its own fixed ones" +else + pass "the trace's lines take counts and fixed words only" +fi +# Nor do the debug lines (G_MESSAGES_DEBUG): none of them takes a string +if grep -n 'g_debug (' source/tactus-typer.c source/tactus-autocorrect.c | grep -c '%s' >/dev/null; then + fail "a debug line in the typing engine or the autocorrection takes a string: $(grep -n 'g_debug (' source/tactus-typer.c source/tactus-autocorrect.c | grep '%s' | head -2)" +else + pass "the debug lines take counts only" +fi +# --- Stevia's settings as Tactus wants them +grep -qx 'completion-mode=\[\]' tactus.gschema.override && grep -q '^\[mobi.phosh.osk\]$' tactus.gschema.override \ + && [[ $(grep -n 'tactus.gschema.override' PKGBUILD | head -1 | cut -d: -f1) -lt $(grep -n 'glib-compile-schemas' PKGBUILD | head -1 | cut -d: -f1) ]] \ + && pass "Stevia's own completion is off by default, in an override compiled with the private schemas" \ + || fail "the settings override is missing, or installed after the schemas are compiled" + +# --- the launcher +bash -n tactus && grep -q 'GSETTINGS_SCHEMA_DIR=/usr/lib/tactus/share/glib-2.0/schemas' tactus \ + && grep -q 'exec /usr/lib/tactus/bin/tactus --allow-replacement' tactus \ + && pass "the launcher points GSettings at Tactus's own schemas and lets another keyboard take over" || fail "the launcher" + +# --- with the untouched Stevia tree +if [[ -n $upstream ]]; then + tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT + cp -a "$upstream" "$tmp/t" + ok=1 + for p in "${patches[@]}"; do + patch -d "$tmp/t" -Np1 -F0 -s -i "$PWD/$p" >"$tmp/patch.log" 2>&1 || { ok=0; fail "$p does not apply: $(head -3 "$tmp/patch.log" | tr '\n' ' ')"; } + done + ((ok)) && pass "the patches apply to the untouched tree with no fuzz" + clash= + for f in "${own[@]}"; do [[ -e $upstream/${f/#source\//src/} ]] && clash+=" $f"; done + [[ -z $clash ]] && pass "none of our files has the name of one of Stevia's" || fail "our files would overwrite Stevia's:$clash" +fi + +# --- with the build +if [[ -n $built ]]; then + export TACTUS_WORD_COUNTS=${TACTUS_WORD_COUNTS:?the word counts file} + tmp2=$(mktemp -d) + export XDG_DATA_HOME=$tmp2/data XDG_STATE_HOME=$tmp2/state XDG_CONFIG_HOME=$tmp2/config + out=$("$built/tools/tactus-typer-test" 2>&1); rc=$? + [[ $rc == 0 ]] && pass "typing: $(tail -1 <<<"$out")" || fail "typing: $(grep -E 'FAIL|failed|no dictionary' <<<"$out" | head -5 | tr '\n' ' ')" + out=$("$built/tools/tactus-ac-test" 2>&1); rc=$? + [[ $rc == 0 ]] && pass "words: $(tail -1 <<<"$out")" || fail "words: $(grep -E 'FAIL|failed|no dictionary' <<<"$out" | head -5 | tr '\n' ' ')" + # The trace and the debug lines, on: what they say of a run that types these words must not hold one + out=$(TACTUS_TRACE=1 G_MESSAGES_DEBUG=all "$built/tools/tactus-typer-test" 2>&1 | grep -E -- '-Message: |DEBUG' || true) + if ! grep -c -- '-Message: ' <<<"$out" >/dev/null; then + fail "the trace says nothing with TACTUS_TRACE=1" + elif ! grep -c 'DEBUG' <<<"$out" >/dev/null; then + fail "no debug lines with G_MESSAGES_DEBUG=all" + elif grep -qiE 'teh|wrold|zorblat|tomorow|github|bob@' <<<"$out"; then + fail "the trace or a debug line holds typed text: $(grep -iE 'teh|wrold|zorblat|tomorow|github|bob@' <<<"$out" | head -2)" + else + pass "the trace and the debug lines ($(wc -l <<<"$out") lines) hold nothing that was typed" + fi + if command -v xvfb-run >/dev/null; then + mkdir -p "$tmp2/schemas" "$tmp2/out" + cp "$src"/data/*.gschema.xml "$built"/data/*.xml "$tmp2/schemas/" 2>/dev/null + cp tactus.gschema.override "$tmp2/schemas/10_tactus.gschema.override" + glib-compile-schemas --strict "$tmp2/schemas" 2>/dev/null || fail "the schemas with Tactus's override do not compile" + export GSETTINGS_SCHEMA_DIR=$tmp2/schemas GDK_BACKEND=x11 GSETTINGS_BACKEND=memory NO_AT_BRIDGE=1 + if command -v gsettings >/dev/null; then + [[ $(gsettings get mobi.phosh.osk completion-mode 2>/dev/null) == '@as []' ]] \ + && pass "a new user's keyboard has Stevia's completion off" || fail "completion-mode defaults to $(gsettings get mobi.phosh.osk completion-mode 2>&1)" + fi + out=$(xvfb-run -a -s "-screen 0 1280x1024x24" "$built/tools/tactus-kbd-test" "$tmp2/out/kbd" 2>&1); rc=$? + [[ $rc == 0 ]] && pass "the keys: $(grep -E 'checks' <<<"$out" | tail -1)" || fail "the keys: $(grep -E 'FAIL|not ok|checks' <<<"$out" | head -5 | tr '\n' ' ')" + out=$(xvfb-run -a -s "-screen 0 1280x1024x24" "$built/tools/tactus-emoji-test" 2>&1); rc=$? + [[ $rc == 0 ]] && pass "the emoji page: $(grep -E 'checks' <<<"$out" | tail -1)" || fail "the emoji page: $(grep -E 'FAIL|not ok|checks' <<<"$out" | head -5 | tr '\n' ' ')" + else + pass "the keys and the emoji page # SKIP no xvfb-run" + fi + rm -rf "$tmp2" +fi + +((fails)) && { echo "$fails test(s) failed" >&2; exit 1; } +echo "tactus: all tests passed" diff --git a/packages/tactus/tools/tactus-ac-test.c b/packages/tactus/tools/tactus-ac-test.c new file mode 100644 index 000000000..91445c58d --- /dev/null +++ b/packages/tactus/tools/tactus-ac-test.c @@ -0,0 +1,170 @@ +/* + * Tactus's autocorrection, tried on words: what each becomes. + * + * tactus-ac-test the built-in list + * tactus-ac-test WORD... these words, with no taps to go by + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "tactus-autocorrect.h" + +#include + +#include +#include + +typedef struct { + const char *typed; + const char *want; /* NULL: stays as typed */ + gboolean start; /* it starts a sentence */ + gboolean taps; /* only with taps to go by */ +} Case; + +static const Case cases[] = { + /* slips */ + { "teh", "the" }, { "beyyer", "better" }, { "js", "is" }, { "waybetter", "way better" }, + { "hemko", "hello", FALSE, TRUE }, { "wrold", "world" }, { "recieve", "receive" }, + { "definately", "definitely" }, { "seperate", "separate" }, { "tommorow", "tomorrow" }, + { "thnaks", "thanks" }, { "becuase", "because" }, { "adn", "and" }, { "taht", "that" }, + { "wich", "which" }, { "alot", "a lot" }, { "atleast", "at least" }, { "iam", "I am" }, + { "helo", "hello" }, { "helllo", "hello" }, { "goign", "going" }, { "somthing", "something" }, + { "abotu", "about" }, { "jsut", "just" }, { "knwo", "know" }, { "yuo", "you" }, + { "tge", "the" }, { "thr", "the" }, { "whta", "what" }, { "peopel", "people" }, + { "freind", "friend" }, { "thankyou", "thank you" }, + { "ofcourse", "of course" }, { "probaly", "probably" }, { "realy", "really" }, + { "goimg", "going" }, { "tjis", "this" }, { "wgat", "what" }, { "yoi", "you" }, + { "thwn", "then" }, { "abput", "about" }, { "wotk", "work" }, { "gokng", "going" }, + { "hellonthere", "hello there" }, { "seebyou", "see you" }, + { "Teh", "The", TRUE }, { "Hemko", "Hello", TRUE, TRUE }, + { "colour", "color" }, { "goin", "going" }, { "ofc", NULL }, { "lmk", NULL }, { "tonite", NULL }, + /* apostrophes */ + { "i", "I" }, { "im", "I'm" }, { "ive", "I've" }, { "dont", "don't" }, { "cant", "can't" }, + { "wont", "won't" }, { "thats", "that's" }, { "youre", "you're" }, { "hows", "how's" }, + { "didnt", "didn't" }, { "isnt", "isn't" }, { "whats", "what's" }, { "hes", "he's" }, + { "theyre", "they're" }, { "couldnt", "couldn't" }, { "i'm", "I'm" }, { "i'll", "I'll" }, + { "Dont", "Don't", TRUE }, + /* names and capitals */ + { "paris", "Paris" }, { "monday", "Monday" }, { "tv", "TV" }, { "michael", "Michael" }, + { "january", "January" }, + /* stays */ + { "the", NULL }, { "its", NULL }, { "well", NULL }, { "were", NULL }, { "ill", NULL }, + { "id", NULL }, { "lol", NULL }, { "ok", NULL }, { "wifi", NULL }, { "omarchy", NULL }, + { "fediverse", NULL }, { "hyprland", NULL }, { "github", NULL }, { "gonna", NULL }, + { "bows", NULL }, { "fir", NULL }, { "hi", NULL }, { "hey", NULL }, + { "yeah", NULL }, { "nope", NULL }, { "haha", NULL }, { "hmm", NULL }, { "ugh", NULL }, + { "tbh", NULL }, { "btw", NULL }, { "app", NULL }, { "emoji", NULL }, { "let", NULL }, + { "lets", NULL }, { "hell", NULL }, { "shell", NULL }, { "wed", NULL }, { "may", NULL }, + { "mark", NULL }, { "will", NULL }, { "in", NULL }, { "on", NULL }, { "of", NULL }, + { "if", NULL }, { "or", NULL }, { "so", NULL }, { "do", NULL }, { "go", NULL }, + { "no", NULL }, { "us", NULL }, { "an", NULL }, { "as", NULL }, { "at", NULL }, + { "Zorblat", NULL }, { "NASA", NULL }, { "GitHub", NULL }, { "kernel", NULL }, + { "linux", NULL }, { "sudo", NULL }, { "laptop", NULL }, { "dictation", NULL }, + { "Paris", NULL, TRUE }, { "The", NULL, TRUE }, { "I", NULL }, +}; + + +static gboolean +key_pos (char c, double *x, double *y) +{ + static const char *rows[] = { "qwertyuiop", "asdfghjkl", "zxcvbnm" }; + static const double first[] = { 0.5, 1.0, 2.0 }; + + c = g_ascii_tolower (c); + for (int r = 0; r < 3; r++) { + const char *at = c ? strchr (rows[r], c) : NULL; + + if (at) { + *x = first[r] + (at - rows[r]); + *y = r; + return TRUE; + } + } + return FALSE; +} + +/* Taps as of a finger that aimed at @want and landed on @typed's keys: inside + * each key that was hit, toward the key that was meant */ +static TactusTap * +near_miss (const char *typed, const char *want) +{ + size_t n = strlen (typed); + TactusTap *taps = g_new0 (TactusTap, n); + + for (size_t i = 0; i < n; i++) { + double tx, ty, wx, wy; + + taps[i].valid = TRUE; + if (!want || strlen (want) != n || !key_pos (typed[i], &tx, &ty) || !key_pos (want[i], &wx, &wy)) + continue; + taps[i].dx = CLAMP (0.42 * (wx - tx), -0.48, 0.48); + taps[i].dy = CLAMP (0.42 * (wy - ty), -0.48, 0.48); + } + return taps; +} + + +static int +run (const Case *c, gboolean with_taps) +{ + g_autofree TactusTap *taps = with_taps ? near_miss (c->typed, c->want) : NULL; + g_autofree char *got = tactus_ac_correct (c->typed, taps, taps ? strlen (c->typed) : 0, c->start); + gboolean ok = g_strcmp0 (got, c->want) == 0; + + printf ("%s %-13s -> %-14s", ok ? " ok" : "FAIL", c->typed, got ?: "(stays)"); + if (!ok) + printf (" wanted %s", c->want ?: "(stays)"); + printf ("\n"); + return ok ? 0 : 1; +} + + +int +main (int argc, char **argv) +{ + int failed = 0; + gint64 t0; + + if (!tactus_ac_available ()) { + printf ("no dictionary\n"); + return 2; + } + + if (argc > 1) { + for (int i = 1; i < argc; i++) { + g_autofree char *got = tactus_ac_correct (argv[i], NULL, 0, FALSE); + + printf ("%s -> %s\n", argv[i], got ?: "(stays)"); + } + return 0; + } + + printf ("== letters alone\n"); + for (guint i = 0; i < G_N_ELEMENTS (cases); i++) { + if (!cases[i].taps) + failed += run (&cases[i], FALSE); + } + + printf ("== with taps that nearly missed\n"); + for (guint i = 0; i < G_N_ELEMENTS (cases); i++) + failed += run (&cases[i], TRUE); + + /* A word the dictionary knows, hit at the edge next to a far likelier one */ + { + static const Case edge[] = { { "fir", "for" }, { "hid", "his" }, { "thr", "the" }, { "og", "of" } }; + + printf ("== at the edge of a key\n"); + for (guint i = 0; i < G_N_ELEMENTS (edge); i++) + failed += run (&edge[i], TRUE); + } + + t0 = g_get_monotonic_time (); + for (int i = 0; i < 200; i++) + g_free (tactus_ac_correct ("somthing", NULL, 0, FALSE)); + printf ("== %.2f ms a word\n", (g_get_monotonic_time () - t0) / 200.0 / 1000.0); + + printf ("%d failed\n", failed); + return failed ? 1 : 0; +} diff --git a/packages/tactus/tools/tactus-draw-test.c b/packages/tactus/tools/tactus-draw-test.c new file mode 100644 index 000000000..b7bb71435 --- /dev/null +++ b/packages/tactus/tools/tactus-draw-test.c @@ -0,0 +1,122 @@ +/* + * Draws Tactus's look to a PNG, with no window: a check of the + * drawing code (panel, keys, labels, icons) against reference pictures. + * + * tactus-draw-test OUT.png [light|dark] [lower|upper] [width] + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "tactus-draw.h" + +#include +#include + +int +main (int argc, char **argv) +{ + const char *out = argc > 1 ? argv[1] : "tactus-draw-test.png"; + gboolean dark = argc > 2 && strcmp (argv[2], "dark") == 0; + gboolean upper = argc > 3 && strcmp (argv[3], "upper") == 0; + double W = argc > 4 ? atof (argv[4]) : 360.0; + const int device_scale = 3; + const double s = W / 390.0, vs = MIN (W, 430.0) / 390.0; + const double inset = 3.5 * s, cell = (W - 2 * inset) / 10.0; + const double gap_h = 6.5 * vs, key_h = 43 * vs, pitch = 54 * vs, top_pad = 12 * vs; + const double strip_h = 71.5 * vs, overhang = 20; + const double H = overhang + top_pad + 3 * pitch + key_h + strip_h; + const char *rows[3] = { "qwertyuiop", "asdfghjkl", "zxcvbnm" }; + const double offs[3] = { 0.0, 0.5, 1.5 }; + TactusTheme theme; + cairo_surface_t *surface; + cairo_t *cr; + double y; + + tactus_theme_init (&theme, dark); + surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, (int) (W * device_scale), + (int) (H * device_scale + 0.5)); + cr = cairo_create (surface); + cairo_scale (cr, device_scale, device_scale); + + /* what is behind the keyboard */ + cairo_set_source_rgb (cr, dark ? 0 : 1, dark ? 0 : 1, dark ? 0 : 1); + cairo_paint (cr); + + tactus_panel_path (cr, 0, overhang, W, H - overhang, vs); + tactus_set_source (cr, &theme.panel, 1.0); + cairo_fill (cr); + + for (int r = 0; r < 3; r++) { + y = overhang + top_pad + r * pitch; + for (int i = 0; rows[r][i]; i++) { + char label[2] = { upper ? g_ascii_toupper (rows[r][i]) : rows[r][i], 0 }; + double x = inset + (offs[r] + i) * cell + gap_h / 2; + + if (!dark) { + tactus_rounded_rect (cr, x, y + 1.0, cell - gap_h, key_h, 6.8 * vs); + cairo_set_source_rgba (cr, 0, 0, 0, 0.06); + cairo_fill (cr); + } + tactus_rounded_rect (cr, x, y, cell - gap_h, key_h, 6.8 * vs); + tactus_set_source (cr, &theme.key, 1.0); + cairo_fill (cr); + tactus_draw_label (cr, label, x + (cell - gap_h) / 2, y + key_h / 2 - (upper ? 1.4 * vs : 0), + (upper ? 21.1 : 23.85) * vs, upper ? 420 : 360, + upper ? TACTUS_BAND_CAP_HEIGHT : TACTUS_BAND_X_HEIGHT, &theme.text); + } + } + /* shift and delete */ + y = overhang + top_pad + 2 * pitch; + { + double sw = 1.5 * cell - gap_h - 7.8 * s; + double x = inset + gap_h / 2; + + tactus_rounded_rect (cr, x, y, sw, key_h, 6.8 * vs); + tactus_set_source (cr, &theme.key, 1.0); + cairo_fill (cr); + tactus_set_source (cr, &theme.icon, 1.0); + tactus_icon_shift (cr, x + sw / 2, y + key_h / 2, vs, upper ? TACTUS_SHIFT_ON : TACTUS_SHIFT_OFF); + + x = W - inset - gap_h / 2 - sw; + tactus_rounded_rect (cr, x, y, sw, key_h, 6.8 * vs); + tactus_set_source (cr, &theme.key, 1.0); + cairo_fill (cr); + tactus_set_source (cr, &theme.icon, 1.0); + tactus_icon_delete (cr, x + sw / 2, y + key_h / 2, vs, FALSE, NULL); + } + /* bottom row */ + y = overhang + top_pad + 3 * pitch; + { + double tw = 2.5 * cell - gap_h; + double x = inset + gap_h / 2; + + tactus_rounded_rect (cr, x, y, tw, key_h, 6.8 * vs); + tactus_set_source (cr, &theme.key, 1.0); + cairo_fill (cr); + tactus_draw_label (cr, "123", x + tw / 2, y + key_h / 2 - 1.0 * vs, 18.3 * vs, 400, + TACTUS_BAND_CAP_HEIGHT, &theme.text); + + x = inset + 2.5 * cell + gap_h / 2; + tactus_rounded_rect (cr, x, y, 5 * cell - gap_h, key_h, 6.8 * vs); + tactus_set_source (cr, &theme.key, 1.0); + cairo_fill (cr); + + x = inset + 7.5 * cell + gap_h / 2; + tactus_rounded_rect (cr, x, y, tw, key_h, 6.8 * vs); + tactus_set_source (cr, &theme.key, 1.0); + cairo_fill (cr); + tactus_set_source (cr, &theme.icon, 1.0); + tactus_icon_return (cr, x + tw / 2, y + key_h / 2, vs); + } + /* the strip */ + y = overhang + top_pad + 3 * pitch + key_h; + tactus_icon_emoji (cr, 42.2 * s, y + 38.2 * vs, vs, &theme, 1.0); + tactus_icon_mic (cr, W - 42.8 * s, y + 37.3 * vs, vs, &theme, 1.0); + + cairo_destroy (cr); + cairo_surface_write_to_png (surface, out); + cairo_surface_destroy (surface); + return 0; +} diff --git a/packages/tactus/tools/tactus-emoji-test.c b/packages/tactus/tools/tactus-emoji-test.c new file mode 100644 index 000000000..81612de78 --- /dev/null +++ b/packages/tactus/tools/tactus-emoji-test.c @@ -0,0 +1,271 @@ +/* + * The emoji page of Tactus, tried with no window on screen: + * taps, slides, the signs of the kinds, skin tones, the keys around. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "../src/pos-emoji-picker.c" + +#include "pos-main.h" + +static GString *picked; +static int n_delete, n_done, n_mic, n_search; +static int checks, failures; + + +static void +on_picked (PosEmojiPicker *self, const char *emoji) +{ + g_string_append (picked, emoji); +} + + +static void +count (int *n) +{ + (*n)++; +} + + +static void +check (const char *what, gboolean ok, const char *detail) +{ + checks++; + if (!ok) + failures++; + g_print ("%s %-52s %s\n", ok ? "ok " : "FAIL", what, detail ?: ""); +} + + +static void +wait_ms (int ms) +{ + gint64 until = g_get_monotonic_time () + ms * 1000; + + while (g_get_monotonic_time () < until) { + while (g_main_context_iteration (NULL, FALSE)) + ; + g_usleep (2000); + } +} + + +static void +touch (PosEmojiPicker *w, GdkEventType type, double x, double y) +{ + GdkEvent *event = gdk_event_new (type); + GdkSeat *seat = gdk_display_get_default_seat (gdk_display_get_default ()); + + event->touch.window = g_object_ref (gtk_widget_get_window (GTK_WIDGET (w))); + event->touch.sequence = GINT_TO_POINTER (1); + event->touch.x = x; + event->touch.y = y; + event->touch.time = g_get_monotonic_time () / 1000; + gdk_event_set_device (event, gdk_seat_get_pointer (seat)); + gtk_widget_event (GTK_WIDGET (w), event); + gdk_event_free (event); +} + + +static void +tap (PosEmojiPicker *w, double x, double y) +{ + touch (w, GDK_TOUCH_BEGIN, x, y); + touch (w, GDK_TOUCH_END, x, y); +} + + +int +main (int argc, char **argv) +{ + GtkWidget *window; + PosEmojiPicker *w; + double row0, pitch, col0, max; + g_autofree char *first = NULL; + g_autofree char *detail = NULL; + EmojiItem *toned = NULL; + guint toned_at = 0; + + gtk_init (&argc, &argv); + pos_init (); + picked = g_string_new (NULL); + + w = POS_EMOJI_PICKER (pos_emoji_picker_new ()); + g_signal_connect (w, "emoji-picked", G_CALLBACK (on_picked), NULL); + g_signal_connect_swapped (w, "delete-last", G_CALLBACK (count), &n_delete); + g_signal_connect_swapped (w, "done", G_CALLBACK (count), &n_done); + g_signal_connect_swapped (w, "mic", G_CALLBACK (count), &n_mic); + g_signal_connect_swapped (w, "search", G_CALLBACK (count), &n_search); + + window = gtk_offscreen_window_new (); + gtk_widget_set_size_request (GTK_WIDGET (w), 360, -1); + gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (w)); + gtk_widget_show_all (window); + /* until every emoji is in */ + for (int i = 0; i < 400 && w->populate_id; i++) + wait_ms (10); + + row0 = w->row0; + pitch = w->pitch; + col0 = w->col0; + max = scroll_max (w); + g_print ("page %dx%d, %d rows, pitch %.1f, row of emoji %.0f long\n", w->width, w->height, w->rows, pitch, + w->content); + for (int k = 0; k < TACTUS_N_KINDS; k++) + g_print (" kind %d: %u emoji from %.0f\n", k, w->kinds[k]->len, w->kind_x[k]); + + check ("there are emoji of every kind but the ones used lately", + w->kinds[TACTUS_KIND_RECENT]->len == 0 && w->kinds[TACTUS_KIND_SMILEYS]->len > 100 && + w->kinds[TACTUS_KIND_FLAGS]->len > 50, NULL); + + /* a tap */ + first = g_strdup (((EmojiItem *) g_ptr_array_index (w->kinds[TACTUS_KIND_SMILEYS], 0))->text); + tap (w, col0, row0); + check ("a tap on the first emoji types it", g_str_equal (picked->str, first), picked->str); + g_string_truncate (picked, 0); + tap (w, col0 + pitch, row0 + 2 * pitch); + check ("a tap on another", + g_str_equal (picked->str, ((EmojiItem *) g_ptr_array_index (w->kinds[TACTUS_KIND_SMILEYS], 6))->text), + picked->str); + g_string_truncate (picked, 0); + + /* a slide */ + touch (w, GDK_TOUCH_BEGIN, 300, row0); + for (int x = 290; x >= 100; x -= 10) + touch (w, GDK_TOUCH_UPDATE, x, row0); + wait_ms (120); + touch (w, GDK_TOUCH_END, 100, row0); + detail = g_strdup_printf ("slid %.0f", w->scroll); + check ("a slide moves the emoji and types none", picked->len == 0 && fabs (w->scroll - 190.0) < 11.0, detail); + check ("a finger that rested first leaves them where they are", w->tick_id == 0, NULL); + + /* past the start */ + touch (w, GDK_TOUCH_BEGIN, 100, row0); + touch (w, GDK_TOUCH_UPDATE, 200, row0); + touch (w, GDK_TOUCH_UPDATE, 350, row0); + touch (w, GDK_TOUCH_UPDATE, 500, row0); + check ("pulled past the start they follow by less", w->scroll < 0.0 && scroll_shown (w) > w->scroll, NULL); + wait_ms (120); + touch (w, GDK_TOUCH_END, 500, row0); + check ("and go back to it when let go", w->jumping && fabs (w->jump_to) < 0.5, NULL); + stop_sliding (w); + w->scroll = 0.0; + + /* the signs */ + tap (w, bar_x (w, TACTUS_KIND_FOOD), w->bar_y); + check ("the apple goes to the food", w->jumping && fabs (w->jump_to - w->kind_x[TACTUS_KIND_FOOD]) < 1.0, NULL); + stop_sliding (w); + w->scroll = w->kind_x[TACTUS_KIND_FOOD]; + check ("and the apple is the sign in view", kind_in_view (w) == TACTUS_KIND_FOOD, NULL); + tap (w, bar_x (w, TACTUS_KIND_RECENT), w->bar_y); + check ("the clock does nothing while nothing was used", !w->jumping, NULL); + w->scroll = max; + check ("at the end the flag is in view", kind_in_view (w) == TACTUS_KIND_FLAGS, NULL); + + /* skin tones */ + for (guint i = 0; i < w->kinds[TACTUS_KIND_SMILEYS]->len && !toned; i++) { + EmojiItem *item = g_ptr_array_index (w->kinds[TACTUS_KIND_SMILEYS], i); + + if (item->tones) { + toned = item; + toned_at = i; + } + } + check ("some emoji come in skin tones", toned != NULL, toned ? toned->text : NULL); + if (toned) { + guint col = toned_at / w->rows, row = toned_at % w->rows; + double cx, cy = row0 + row * pitch; + g_autofree char *plain = emoji_text (toned->data, 0, NULL); + g_autofree char *medium = emoji_text (toned->data, 0x1f3fd, NULL); + + w->scroll = CLAMP (w->kind_x[TACTUS_KIND_SMILEYS] + col * pitch - 3 * pitch, 0.0, max); + cx = (col0 - pitch / 2) + w->kind_x[TACTUS_KIND_SMILEYS] + (col + 0.5) * pitch - w->scroll; + + tap (w, cx, cy); + check ("a tap types it plain", g_str_equal (picked->str, plain), picked->str); + g_string_truncate (picked, 0); + + touch (w, GDK_TOUCH_BEGIN, cx, cy); + wait_ms (LONG_PRESS_MS + 80); + check ("held, its tones open", w->tones_open && w->tones_item == toned, NULL); + touch (w, GDK_TOUCH_UPDATE, w->tones_x + (6.0 + 3.5 * E_TONES_PITCH) * w->vs, cy); + touch (w, GDK_TOUCH_END, w->tones_x + (6.0 + 3.5 * E_TONES_PITCH) * w->vs, cy); + check ("the fourth is the medium tone", g_str_equal (picked->str, medium), picked->str); + g_string_truncate (picked, 0); + } + + /* the keys around */ + w->scroll = 0.0; + touch (w, GDK_TOUCH_BEGIN, w->width - E_DELETE_X * w->s, w->bar_y); + check ("the delete key deletes as it goes down", n_delete == 1, NULL); + wait_ms (DELETE_DELAY_MS + 3 * DELETE_EVERY_MS + 40); + touch (w, GDK_TOUCH_END, w->width - E_DELETE_X * w->s, w->bar_y); + detail = g_strdup_printf ("%d", n_delete); + check ("and on while it is held", n_delete >= 4 && n_delete <= 6, detail); + wait_ms (3 * DELETE_EVERY_MS); + check ("and stops when let go", n_delete <= 6, NULL); + + tap (w, E_ABC_X * w->s, w->abc_y); + check ("ABC", n_done == 1, NULL); + tap (w, w->width - E_MIC_X * w->s, w->mic_y); + check ("the microphone", n_mic == 1, NULL); + tap (w, 180, (E_FIELD_TOP + E_FIELD_H / 2) * w->vs); + check ("the search field", n_search == 1, NULL); + check ("none of them typed an emoji", picked->len == 0, picked->str); + + /* the emoji used lately lead the next time the page comes up */ + gtk_widget_hide (GTK_WIDGET (w)); + gtk_widget_show (GTK_WIDGET (w)); + wait_ms (50); + detail = g_strdup_printf ("%u", w->kinds[TACTUS_KIND_RECENT]->len); + check ("what was typed is among the ones used lately", w->kinds[TACTUS_KIND_RECENT]->len == 4, detail); + if (w->kinds[TACTUS_KIND_RECENT]->len > 0) { + tap (w, col0, row0); + check ("the latest first, with its tone", + toned == NULL || g_str_has_prefix (picked->str, "") , picked->str); + check ("the clock is the sign in view", kind_in_view (w) == TACTUS_KIND_RECENT, NULL); + } + + /* one the font has no picture for is kept out of sight, on the page and in the search */ + { + g_autoptr (GSettings) settings = g_settings_new ("mobi.phosh.osk.EmojiPicker"); + g_autoptr (GVariant) before = g_settings_get_value (settings, "recent-emoji"); + g_autoptr (GtkWidget) search = g_object_ref_sink (pos_emoji_search_new ()); + guint shown = w->kinds[TACTUS_KIND_RECENT]->len; + guint32 code = 0x2fe0; /* not assigned to anything: no font draws it */ + GVariantBuilder builder; + GVariantIter iter; + GVariant *entry; + + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a((auss)u)")); + g_variant_builder_add (&builder, "(@(auss)u)", + g_variant_new ("(@auss)", + g_variant_new_fixed_array (G_VARIANT_TYPE_UINT32, &code, 1, sizeof code), + "no such emoji", ""), + 0); + g_variant_iter_init (&iter, before); + while ((entry = g_variant_iter_next_value (&iter))) { + g_variant_builder_add_value (&builder, entry); + g_variant_unref (entry); + } + g_settings_set_value (settings, "recent-emoji", g_variant_builder_end (&builder)); + + load_recent (w); + detail = g_strdup_printf ("%u shown of %u kept", w->kinds[TACTUS_KIND_RECENT]->len, shown + 1); + check ("one the font has no picture for is not shown", shown > 0 && w->kinds[TACTUS_KIND_RECENT]->len == shown, + detail); + pos_emoji_search_reset (POS_EMOJI_SEARCH (search)); + detail = g_strdup_printf ("%u", POS_EMOJI_SEARCH (search)->found->len); + check ("nor by the search before anything is typed", POS_EMOJI_SEARCH (search)->found->len == shown, detail); + pos_emoji_search_type (POS_EMOJI_SEARCH (search), "grin"); + detail = g_strdup_printf ("%u", POS_EMOJI_SEARCH (search)->found->len); + check ("the search finds emoji by a part of their name", POS_EMOJI_SEARCH (search)->found->len >= 3, detail); + g_settings_set_value (settings, "recent-emoji", before); + } + + g_print ("\n%d checks, %d failed\n", checks, failures); + return failures ? 1 : 0; +} diff --git a/packages/tactus/tools/tactus-kbd-test.c b/packages/tactus/tools/tactus-kbd-test.c new file mode 100644 index 000000000..64e452553 --- /dev/null +++ b/packages/tactus/tools/tactus-kbd-test.c @@ -0,0 +1,789 @@ +/* + * Drives Tactus's widget with no window on screen: draws it to + * PNGs and plays touches into it, checking what gets typed. + * + * tactus-kbd-test OUTDIR [width] + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "pos-osk-widget.c" + +#include "pos-main.h" + +#include + +static GString *typed; +static GString *log_events; +static int failures; +static int checks; +static const char *outdir; +static gboolean emulate_sentences; + +#define SEQ(n) ((GdkEventSequence *) GUINT_TO_POINTER (100 + (n))) + +static void +wait_ms (guint ms) +{ + gint64 end = g_get_monotonic_time () + ms * G_TIME_SPAN_MILLISECOND; + + while (g_get_monotonic_time () < end) { + while (g_main_context_iteration (NULL, FALSE)) + ; + g_usleep (2000); + } + while (g_main_context_iteration (NULL, FALSE)) + ; +} + + +static gboolean +sentence_start (const char *text) +{ + size_t len = strlen (text); + + if (len == 0 || text[len - 1] == '\n') + return TRUE; + if (text[len - 1] != ' ') + return FALSE; + while (len && text[len - 1] == ' ') + len--; + return len && strchr (".!?", text[len - 1]); +} + + +static void +on_symbol (PosOskWidget *w, const char *symbol) +{ + if (g_strcmp0 (symbol, "KEY_BACKSPACE") == 0) { + if (typed->len) { + const char *prev = g_utf8_find_prev_char (typed->str, typed->str + typed->len); + g_string_truncate (typed, prev - typed->str); + } + } else if (g_strcmp0 (symbol, "KEY_ENTER") == 0) { + g_string_append_c (typed, '\n'); + } else if (g_str_has_prefix (symbol, "KEY_")) { + g_string_append_printf (typed, "<%s>", symbol + 4); + } else { + g_string_append (typed, symbol); + } + /* What the input surface does: capitals where a sentence starts */ + if (emulate_sentences) + pos_osk_widget_set_autoshift (w, sentence_start (typed->str), FALSE); +} + + +static void +on_strip (PosOskWidget *w, const char *which) +{ + g_string_append_printf (log_events, "strip:%s ", which); +} + + +static void +on_down (PosOskWidget *w, const char *symbol) +{ + g_string_append_printf (log_events, "down:%s ", symbol ? symbol : "-"); +} + + +static void +check_str (const char *what, const char *got, const char *want) +{ + checks++; + if (g_strcmp0 (got, want) == 0) { + g_print ("ok %-58s '%s'\n", what, got); + } else { + failures++; + g_print ("FAIL %-58s got '%s' want '%s'\n", what, got, want); + } +} + + +static void +check_int (const char *what, int got, int want) +{ + checks++; + if (got == want) { + g_print ("ok %-58s %d\n", what, got); + } else { + failures++; + g_print ("FAIL %-58s got %d want %d\n", what, got, want); + } +} + + +static TactusGeom * +find_key (PosOskWidget *w, const char *name) +{ + PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_current_layer (w); + + if (g_strcmp0 (name, "emoji") == 0) + return &w->emoji; + if (g_strcmp0 (name, "mic") == 0) + return &w->mic; + + for (int r = 0; r < layer->n_rows; r++) { + PosOskWidgetRow *row = &layer->rows[r]; + + for (int k = 0; k < row->geoms->len; k++) { + TactusGeom *g = &g_array_index (row->geoms, TactusGeom, k); + const char *symbol = pos_osk_key_get_symbol (g->key); + const char *label = pos_osk_key_get_label (g->key); + + if (g_strcmp0 (name, "shift") == 0 && g->role == TACTUS_ROLE_SHIFT) + return g; + if (g_strcmp0 (name, "sym2") == 0 && g->role == TACTUS_ROLE_SYM2) + return g; + if (g_strcmp0 (name, "sym") == 0 && g->role == TACTUS_ROLE_SYM) + return g; + if (g_strcmp0 (name, "bksp") == 0 && g->role == TACTUS_ROLE_BACKSPACE) + return g; + if (g_strcmp0 (name, "return") == 0 && g->role == TACTUS_ROLE_RETURN) + return g; + if (g_strcmp0 (name, "space") == 0 && g->role == TACTUS_ROLE_SPACE) + return g; + if (g->role == TACTUS_ROLE_CHAR && (g_strcmp0 (symbol, name) == 0 || g_strcmp0 (label, name) == 0)) + return g; + } + } + return NULL; +} + + +static void +send_touch (PosOskWidget *w, GdkEventType type, int seq, double x, double y) +{ + GdkEvent *event = gdk_event_new (type); + GdkSeat *seat = gdk_display_get_default_seat (gdk_display_get_default ()); + + event->touch.window = g_object_ref (gtk_widget_get_window (GTK_WIDGET (w))); + event->touch.send_event = TRUE; + event->touch.time = g_get_monotonic_time () / 1000; + event->touch.x = x; + event->touch.y = y; + event->touch.sequence = SEQ (seq); + event->touch.emulating_pointer = FALSE; + gdk_event_set_device (event, gdk_seat_get_pointer (seat)); + gtk_widget_event (GTK_WIDGET (w), event); + gdk_event_free (event); +} + + +static void +key_xy (PosOskWidget *w, const char *name, double *x, double *y) +{ + TactusGeom *g = find_key (w, name); + + if (g == NULL) { + g_print ("FAIL no key '%s' on this page\n", name); + failures++; + *x = *y = -1000; + return; + } + *x = g->vx + g->vw / 2; + *y = g->vy + g->vh / 2; +} + + +static void +down (PosOskWidget *w, int seq, const char *name) +{ + double x, y; + + key_xy (w, name, &x, &y); + send_touch (w, GDK_TOUCH_BEGIN, seq, x, y); +} + + +static void +move (PosOskWidget *w, int seq, const char *name) +{ + double x, y; + + key_xy (w, name, &x, &y); + send_touch (w, GDK_TOUCH_UPDATE, seq, x, y); +} + + +static void +up (PosOskWidget *w, int seq, const char *name) +{ + double x, y; + + key_xy (w, name, &x, &y); + send_touch (w, GDK_TOUCH_END, seq, x, y); +} + + +static void +tap (PosOskWidget *w, const char *name) +{ + double x, y; + + key_xy (w, name, &x, &y); + send_touch (w, GDK_TOUCH_BEGIN, 0, x, y); + send_touch (w, GDK_TOUCH_END, 0, x, y); +} + + +static void +type (PosOskWidget *w, const char *text) +{ + for (const char *p = text; *p; p = g_utf8_next_char (p)) { + char buf[8] = { 0 }; + + g_utf8_strncpy (buf, p, 1); + tap (w, buf[0] == ' ' ? "space" : buf); + } +} + + +static void +snap (GtkWidget *window, PosOskWidget *w, const char *name) +{ + const int scale = 3; + int width = gtk_widget_get_allocated_width (GTK_WIDGET (w)); + int height = gtk_widget_get_allocated_height (GTK_WIDGET (w)); + cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width * scale, height * scale); + cairo_t *cr = cairo_create (surface); + g_autofree char *path = g_build_filename (outdir, name, NULL); + + while (g_main_context_iteration (NULL, FALSE)) + ; + cairo_scale (cr, scale, scale); + /* a text page behind, so that the clear band above the keyboard shows */ + cairo_set_source_rgb (cr, w->theme.dark ? 0.0 : 1.0, w->theme.dark ? 0.0 : 1.0, w->theme.dark ? 0.0 : 1.0); + cairo_paint (cr); + gtk_widget_draw (GTK_WIDGET (w), cr); + cairo_destroy (cr); + cairo_surface_write_to_png (surface, path); + cairo_surface_destroy (surface); +} + + +static gboolean +same_rgb (TactusRgb a, guint hex) +{ + return fabs (a.r - ((hex >> 16) & 0xff) / 255.0) < 0.002 && fabs (a.g - ((hex >> 8) & 0xff) / 255.0) < 0.002 && + fabs (a.b - (hex & 0xff) / 255.0) < 0.002; +} + + +/* The colours of the applied Omarchy theme, Tactus's own without one, and the owner's way to keep Tactus's own */ +static void +check_theme (void) +{ + g_autofree char *dir = g_dir_make_tmp ("tactus-theme-XXXXXX", NULL); + g_autofree char *colors = g_build_filename (dir, "colors.toml", NULL); + g_autofree char *own_dir = g_build_filename (g_get_user_config_dir (), "tactus", NULL); + g_autofree char *own = g_build_filename (own_dir, "own-colours", NULL); + g_autofree char *before = g_strdup (g_getenv ("TACTUS_THEME_COLORS")); + TactusTheme t; + + g_setenv ("TACTUS_THEME_COLORS", colors, TRUE); + g_file_set_contents (colors, "mode = \"dark\"\n\naccent = \"#7e9cd8\"\nmuted = \"#54546D\"\n" + "background = \"#1f1f28\"\ndark_background = \"#17171e\"\n" + "lighter_background = \"#223249\"\nforeground = \"#dcd7ba\"\n", -1, NULL); + tactus_theme_init (&t, FALSE); + check_int ("a dark Omarchy theme is dark whatever the desktop asks", t.dark, TRUE); + check_int ("the panel in the theme's darker background", same_rgb (t.panel, 0x17171e), TRUE); + check_int ("the keys in its lighter background", same_rgb (t.key, 0x223249), TRUE); + check_int ("the letters in its foreground", same_rgb (t.text, 0xdcd7ba), TRUE); + check_int ("the caret in its accent", same_rgb (t.accent, 0x7e9cd8), TRUE); + + g_file_set_contents (colors, "mode = \"light\"\nbackground = \"#f2ecbc\"\nforeground = \"#545464\"\n", -1, NULL); + tactus_theme_init (&t, TRUE); + check_int ("a light theme is light, its missing colours mixed from the ones it has", + !t.dark && same_rgb (t.text, 0x545464) && !same_rgb (t.key, 0xf2ecbc), TRUE); + + g_file_set_contents (colors, "accent = \"#7e9cd8\"\n", -1, NULL); + tactus_theme_init (&t, FALSE); + check_int ("without a background and a foreground, Tactus's own light colours", + !t.dark && same_rgb (t.panel, 0xe2e3e8), TRUE); + + g_file_set_contents (colors, "background = \"#1f1f28\"\nforeground = \"#dcd7ba\"\n", -1, NULL); + g_mkdir_with_parents (own_dir, 0700); + g_file_set_contents (own, "", -1, NULL); + tactus_theme_init (&t, TRUE); + check_int ("an owner who keeps Tactus's own colours gets them", t.dark && same_rgb (t.panel, 0x1f1f1f), TRUE); + g_unlink (own); + g_rmdir (own_dir); + + g_unlink (colors); + g_rmdir (dir); + /* the pictures that follow are drawn as the caller asked */ + if (before) + g_setenv ("TACTUS_THEME_COLORS", before, TRUE); + else + g_unsetenv ("TACTUS_THEME_COLORS"); +} + + +/* Whether the widget draws its panel over a point, or lets what is behind it show */ +static gboolean +panel_at (PosOskWidget *w, int x, int y) +{ + int width = gtk_widget_get_allocated_width (GTK_WIDGET (w)); + int height = gtk_widget_get_allocated_height (GTK_WIDGET (w)); + cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); + cairo_t *cr = cairo_create (surface); + guint32 pixel; + + /* behind it, a colour no keyboard has */ + cairo_set_source_rgb (cr, 1.0, 0.0, 1.0); + cairo_paint (cr); + gtk_widget_draw (GTK_WIDGET (w), cr); + cairo_destroy (cr); + cairo_surface_flush (surface); + memcpy (&pixel, + cairo_image_surface_get_data (surface) + y * cairo_image_surface_get_stride (surface) + 4 * x, + sizeof pixel); + cairo_surface_destroy (surface); + + return (pixel & 0x00ffffff) != 0x00ff00ff; +} + + +static void +reset (PosOskWidget *w) +{ + pos_osk_widget_cancel_touches (w); + w->autoshift = FALSE; + pos_osk_widget_set_layer (w, POS_OSK_WIDGET_LAYER_NORMAL); + w->last_shift_tap = 0; + g_string_truncate (typed, 0); + g_string_truncate (log_events, 0); + emulate_sentences = FALSE; +} + + +/* Where the keys of every page are, in the widget: "page name x y", for + * whoever drives the real keyboard with touches */ +static void +print_map (PosOskWidget *w) +{ + static const char *const pages[] = { "letters", "capitals", "numbers", "symbols" }; + + g_print ("size %d %d clear %u\n", gtk_widget_get_allocated_width (GTK_WIDGET (w)), + gtk_widget_get_allocated_height (GTK_WIDGET (w)), pos_osk_widget_get_overhang (w)); + for (guint l = 0; l < G_N_ELEMENTS (pages); l++) { + PosOskWidgetKeyboardLayer *layer; + + pos_osk_widget_set_layer (w, l); + while (g_main_context_iteration (NULL, FALSE)) + ; + if (pos_osk_widget_get_layer (w) != l && l != POS_OSK_WIDGET_LAYER_NORMAL) + continue; + layer = pos_osk_widget_get_current_layer (w); + for (int r = 0; r < layer->n_rows; r++) { + PosOskWidgetRow *row = &layer->rows[r]; + + for (int k = 0; row->geoms && k < row->geoms->len; k++) { + TactusGeom *g = &g_array_index (row->geoms, TactusGeom, k); + const char *name = pos_osk_key_get_symbol (g->key); + + if (g->role == TACTUS_ROLE_SHIFT) + name = "shift"; + else if (g->role == TACTUS_ROLE_SYM2) + name = "sym2"; + else if (g->role == TACTUS_ROLE_SYM) + name = "sym"; + else if (g->role == TACTUS_ROLE_BACKSPACE) + name = "bksp"; + else if (g->role == TACTUS_ROLE_RETURN) + name = "return"; + else if (g->role == TACTUS_ROLE_SPACE) + name = "space"; + g_print ("%s %s %.1f %.1f\n", pages[l], name, g->vx + g->vw / 2, g->vy + g->vh / 2); + } + } + } + g_print ("any emoji %.1f %.1f\n", w->emoji.vx + w->emoji.vw / 2, w->emoji.vy + w->emoji.vh / 2); + g_print ("any mic %.1f %.1f\n", w->mic.vx + w->mic.vw / 2, w->mic.vy + w->mic.vh / 2); +} + + +int +main (int argc, char **argv) +{ + GtkWidget *window; + PosOskWidget *w; + g_autoptr (GError) err = NULL; + int width = argc > 2 ? atoi (argv[2]) : 360; + int height; + double x, y; + + outdir = argc > 1 ? argv[1] : "."; + if (g_strcmp0 (outdir, "--map") != 0) + g_mkdir_with_parents (outdir, 0755); + + gtk_init (&argc, &argv); + pos_init (); + + typed = g_string_new (NULL); + log_events = g_string_new (NULL); + + if (g_strcmp0 (outdir, "--map") != 0) + check_theme (); + + w = pos_osk_widget_new (PHOSH_OSK_FEATURE_DEFAULT); + if (!pos_osk_widget_set_layout (w, "us", "us", "English (US)", "us", NULL, &err)) + g_error ("layout: %s", err->message); + g_signal_connect (w, "key-symbol", G_CALLBACK (on_symbol), NULL); + g_signal_connect (w, "strip-key", G_CALLBACK (on_strip), NULL); + g_signal_connect (w, "key-down", G_CALLBACK (on_down), NULL); + + window = gtk_offscreen_window_new (); + height = tactus_height_for_width (w, width); + gtk_widget_set_size_request (GTK_WIDGET (w), width, height); + gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (w)); + gtk_widget_show_all (window); + wait_ms (50); + + if (g_strcmp0 (outdir, "--map") == 0) { + print_map (w); + return 0; + } + + g_print ("widget %dx%d, overhang %.0f, key %.2fx%.2f, pitch %.2f, cell %.3f, strip %.1f\n", + gtk_widget_get_allocated_width (GTK_WIDGET (w)), + gtk_widget_get_allocated_height (GTK_WIDGET (w)), w->overhang, + find_key (w, "q")->vw, w->key_h, w->pitch, + pos_osk_widget_get_current_layer (w)->key_width, w->strip_h); + + /* ---- the panel's corners ---- */ + { + int top = pos_osk_widget_get_overhang (w), under = pos_osk_widget_get_panel_under (w); + int right = gtk_widget_get_allocated_width (GTK_WIDGET (w)) - 1; + + if (width == 360) + check_int ("the windows reach this far under the panel's top", under, 8); + check_int ("past a top corner what is behind shows", panel_at (w, 0, top + 1), FALSE); + check_int ("a little way along the top", panel_at (w, 2, top + 1), FALSE); + check_int ("and a little way down the side", panel_at (w, 0, top + 3), FALSE); + check_int ("no deeper than the windows reach, on the left", panel_at (w, 0, top + under), TRUE); + check_int ("or on the right", panel_at (w, right, top + under), TRUE); + check_int ("the other corner is cut the same", panel_at (w, right, top + 1), FALSE); + check_int ("between them the panel starts at its top", panel_at (w, right / 2, top + 1), TRUE); + } + + /* ---- pictures ---- */ + snap (window, w, "01-lower.png"); + tap (w, "shift"); + snap (window, w, "02-shift.png"); + wait_ms (400); + tap (w, "shift"); + tap (w, "shift"); + check_int ("double tap locks Shift", pos_osk_widget_get_caps_lock (w), TRUE); + snap (window, w, "03-capslock.png"); + reset (w); + tap (w, "sym"); + snap (window, w, "04-numbers.png"); + tap (w, "sym2"); + snap (window, w, "05-symbols.png"); + reset (w); + + /* ---- typing ---- */ + type (w, "hello"); + check_str ("plain letters", typed->str, "hello"); + reset (w); + + tap (w, "shift"); + check_int ("Shift: capitals page", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_CAPS); + tap (w, "A"); + check_int ("after one capital: small letters", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + tap (w, "b"); + check_str ("Shift is for one letter", typed->str, "Ab"); + reset (w); + + wait_ms (400); + tap (w, "shift"); + tap (w, "shift"); + check_int ("two quick taps: locked", pos_osk_widget_get_caps_lock (w), TRUE); + tap (w, "A"); + tap (w, "B"); + check_str ("locked capitals", typed->str, "AB"); + tap (w, "shift"); + check_int ("a tap unlocks", pos_osk_widget_get_caps_lock (w), FALSE); + check_int ("and small letters are back", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + reset (w); + + wait_ms (400); + tap (w, "shift"); + wait_ms (450); + tap (w, "shift"); + check_int ("two slow taps: on, then off", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + check_int ("and not locked", pos_osk_widget_get_caps_lock (w), FALSE); + reset (w); + + /* numbers */ + type (w, "a"); + tap (w, "sym"); + check_int ("123: numbers page", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_SYMBOLS); + tap (w, "1"); + tap (w, "2"); + check_int ("numbers stay for more numbers", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_SYMBOLS); + tap (w, "space"); + check_int ("a space goes back to letters", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + check_str ("letters, numbers, space", typed->str, "a12 "); + reset (w); + + type (w, "don"); + tap (w, "sym"); + tap (w, "'"); + check_int ("an apostrophe goes back to letters", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + type (w, "t"); + check_str ("don't", typed->str, "don't"); + reset (w); + + tap (w, "sym"); + tap (w, "sym2"); + check_int ("#+=: symbols page", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_SYMBOLS2); + tap (w, "["); + tap (w, "sym2"); + check_int ("123 there: numbers page", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_SYMBOLS); + tap (w, "sym"); + check_int ("ABC: letters", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + check_str ("a bracket", typed->str, "["); + reset (w); + + /* slide from 123 to a key */ + down (w, 1, "sym"); + check_int ("123 switches as the finger comes down", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_SYMBOLS); + move (w, 1, "?"); + up (w, 1, "?"); + check_str ("slide from 123 to ?", typed->str, "?"); + check_int ("and back to letters", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + reset (w); + + /* hold 123, type with another finger */ + down (w, 1, "sym"); + down (w, 2, "4"); + up (w, 2, "4"); + down (w, 2, "5"); + up (w, 2, "5"); + check_int ("held 123: still numbers", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_SYMBOLS); + up (w, 1, "sym"); + check_int ("let go: letters", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + check_str ("numbers under a held 123", typed->str, "45"); + reset (w); + + /* delete */ + type (w, "abc"); + down (w, 1, "bksp"); + check_str ("delete works as the finger comes down", typed->str, "ab"); + up (w, 1, "bksp"); + check_str ("and not again when it lifts", typed->str, "ab"); + reset (w); + + /* slide between keys */ + down (w, 1, "q"); + move (w, 1, "w"); + up (w, 1, "w"); + check_str ("slide from q to w types w", typed->str, "w"); + reset (w); + + /* two fingers */ + down (w, 1, "a"); + down (w, 2, "s"); + check_str ("second finger down types the first key", typed->str, "a"); + up (w, 1, "a"); + check_str ("first finger up adds nothing", typed->str, "a"); + up (w, 2, "s"); + check_str ("second finger up types its key", typed->str, "as"); + reset (w); + + /* Shift held for several capitals */ + down (w, 1, "shift"); + down (w, 2, "A"); + up (w, 2, "A"); + down (w, 2, "B"); + up (w, 2, "B"); + up (w, 1, "shift"); + check_str ("Shift held: capitals", typed->str, "AB"); + check_int ("let go: small letters", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + type (w, "c"); + check_str ("then small", typed->str, "ABc"); + reset (w); + + /* slide from Shift to a letter */ + down (w, 1, "shift"); + move (w, 1, "D"); + up (w, 1, "D"); + check_str ("slide from Shift to d: a capital", typed->str, "D"); + check_int ("and small letters after", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + reset (w); + + /* accents */ + down (w, 1, "e"); + wait_ms (LONG_PRESS_MS + 80); + check_int ("holding e shows its accents", w->popup.active, TRUE); + if (w->popup.active) { + g_autofree char *row = NULL; + GString *s = g_string_new (NULL); + + for (int i = 0; i < w->popup.options->len; i++) + g_string_append_printf (s, "%s ", (char *) g_ptr_array_index (w->popup.options, i)); + row = g_string_free (s, FALSE); + check_str ("the row of accents", row, "ë é e è ê ě ẽ ē ė ę "); + snap (window, w, "06-accents.png"); + key_xy (w, "e", &x, &y); + send_touch (w, GDK_TOUCH_UPDATE, 1, x - pos_osk_widget_get_current_layer (w)->key_width, y - 40); + snap (window, w, "07-accents-sel.png"); + send_touch (w, GDK_TOUCH_END, 1, x - pos_osk_widget_get_current_layer (w)->key_width, y - 40); + } + check_str ("one to the left of e is é", typed->str, "é"); + check_int ("the row is gone", w->popup.active, FALSE); + reset (w); + + down (w, 1, "e"); + wait_ms (LONG_PRESS_MS + 80); + up (w, 1, "e"); + check_str ("held and let go without moving: plain e", typed->str, "e"); + reset (w); + + down (w, 1, "o"); + wait_ms (LONG_PRESS_MS + 80); + snap (window, w, "08-accents-o.png"); + up (w, 1, "o"); + reset (w); + down (w, 1, "a"); + wait_ms (LONG_PRESS_MS + 80); + snap (window, w, "09-accents-a.png"); + up (w, 1, "a"); + reset (w); + down (w, 1, "c"); + wait_ms (LONG_PRESS_MS + 80); + snap (window, w, "10-accents-c.png"); + up (w, 1, "c"); + reset (w); + + /* a quick tap on a key with accents types it */ + tap (w, "e"); + check_str ("a tap on e", typed->str, "e"); + reset (w); + + /* the space bar as a touch pad */ + down (w, 1, "space"); + wait_ms (LONG_PRESS_MS + 80); + check_int ("holding space: touch pad", pos_osk_widget_get_mode (w), POS_OSK_WIDGET_MODE_CURSOR); + snap (window, w, "11-touchpad.png"); + key_xy (w, "space", &x, &y); + send_touch (w, GDK_TOUCH_UPDATE, 1, x + 3 * CURSOR_STEP_X + 1, y); + send_touch (w, GDK_TOUCH_UPDATE, 1, x, y); + send_touch (w, GDK_TOUCH_END, 1, x, y); + check_str ("three right, three left, no space", typed->str, ""); + check_int ("letters again", pos_osk_widget_get_mode (w), POS_OSK_WIDGET_MODE_KEYBOARD); + reset (w); + + tap (w, "space"); + check_str ("a tap on space", typed->str, " "); + reset (w); + + /* under the keys */ + tap (w, "emoji"); + tap (w, "mic"); + check_str ("emoji and dictation", strstr (log_events->str, "strip:") ?: "", "strip:emoji down:- strip:mic "); + check_str ("they type nothing", typed->str, ""); + reset (w); + + /* return */ + type (w, "a"); + tap (w, "return"); + check_str ("return", typed->str, "a\n"); + reset (w); + + /* capitals where a sentence starts */ + emulate_sentences = TRUE; + pos_osk_widget_set_autoshift (w, TRUE, TRUE); + check_int ("an empty field: capitals", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_CAPS); + snap (window, w, "12-autoshift.png"); + tap (w, "H"); + type (w, "i"); + tap (w, "sym"); + tap (w, "."); + check_int ("a full stop: still numbers", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_SYMBOLS); + tap (w, "space"); + check_int ("then a space: capitals again", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_CAPS); + tap (w, "Y"); + type (w, "o"); + check_str ("two sentences", typed->str, "Hi. Yo"); + /* the owner turns the automatic capital off */ + type (w, " "); + tap (w, "sym"); + tap (w, "?"); + tap (w, "space"); + check_int ("after ? and space: capitals", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_CAPS); + wait_ms (400); + tap (w, "shift"); + check_int ("Shift turns that off", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + pos_osk_widget_set_autoshift (w, TRUE, FALSE); + check_int ("and it stays off while nothing changes", pos_osk_widget_get_layer (w), POS_OSK_WIDGET_LAYER_NORMAL); + type (w, "n"); + check_str ("a small letter by choice", typed->str, "Hi. Yo ? n"); + reset (w); + + /* every key is found at its own centre, and between keys the nearer one wins */ + { + PosOskWidgetKeyboardLayer *layer = pos_osk_widget_get_current_layer (w); + int wrong = 0; + + for (int r = 0; r < layer->n_rows; r++) { + PosOskWidgetRow *row = &layer->rows[r]; + + for (int k = 0; k < row->geoms->len; k++) { + TactusGeom *g = &g_array_index (row->geoms, TactusGeom, k); + + if (tactus_hit_test (w, g->vx + g->vw / 2, g->vy + g->vh / 2) != g) + wrong++; + if (tactus_hit_test (w, g->vx + 1, g->vy - w->gap_v / 2 + 1) != g) + wrong++; + if (tactus_hit_test (w, g->vx + g->vw - 1, g->vy + g->vh + w->gap_v / 2 - 1) != g) + wrong++; + } + } + check_int ("every key answers at its centre and to its half of the gaps", wrong, 0); + check_int ("left of a: a", tactus_hit_test (w, 2, find_key (w, "a")->vy + 5) == find_key (w, "a"), TRUE); + check_int ("right of l: l", tactus_hit_test (w, width - 2, find_key (w, "l")->vy + 5) == find_key (w, "l"), TRUE); + check_int ("just under the space bar: space", + tactus_hit_test (w, width / 2, tactus_keys_bottom (w) + 6) == find_key (w, "space"), TRUE); + check_int ("under the middle of the keys, lower: nothing", + tactus_hit_test (w, width / 2, tactus_keys_bottom (w) + 30) == NULL, TRUE); + } + + /* a pressed key, and dark */ + down (w, 1, "g"); + snap (window, w, "13-pressed.png"); + up (w, 1, "g"); + reset (w); + tactus_theme_init (&w->theme, TRUE); + snap (window, w, "14-dark-lower.png"); + tap (w, "shift"); + snap (window, w, "15-dark-shift.png"); + reset (w); + down (w, 1, "e"); + wait_ms (LONG_PRESS_MS + 80); + snap (window, w, "16-dark-accents.png"); + up (w, 1, "e"); + reset (w); + + /* the terminal's keys: no room for accents above, and a bar may sit on top */ + tactus_theme_init (&w->theme, FALSE); + if (!pos_osk_widget_set_layout (w, "terminal", "terminal", "Terminal", "terminal", NULL, &err)) + g_error ("layout: %s", err->message); + gtk_widget_queue_resize (GTK_WIDGET (w)); + while (g_main_context_iteration (NULL, FALSE)) + ; + pos_osk_widget_set_flat_top (w, TRUE); + snap (window, w, "17-terminal.png"); + g_print ("terminal: %dx%d, clear %u, panel %u\n", + gtk_widget_get_allocated_width (GTK_WIDGET (w)), + gtk_widget_get_allocated_height (GTK_WIDGET (w)), + pos_osk_widget_get_overhang (w), pos_osk_widget_get_panel_height (w)); + + g_print ("\n%d checks, %d failed\n", checks, failures); + return failures ? 1 : 0; +} diff --git a/packages/tactus/tools/tactus-pages-test.c b/packages/tactus/tools/tactus-pages-test.c new file mode 100644 index 000000000..de1ff8fcd --- /dev/null +++ b/packages/tactus/tools/tactus-pages-test.c @@ -0,0 +1,165 @@ +/* + * The pages of Tactus that it doesn't draw itself (the emoji, + * the number pad), with no window on screen: their size, and a picture of + * each in light and dark. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "tactus-draw.h" +#include "pos-emoji-picker.h" +#include "pos-keypad.h" +#include "pos-main.h" +#include "pos-style-manager.h" + +#include +#include + +#define WIDTH 360 +#define PANEL 267 +#define CLEAR 59 + +static int snap_height = PANEL + CLEAR; +static int snap_clear = CLEAR; + + +static void +settle (void) +{ + for (int i = 0; i < 50; i++) { + while (g_main_context_iteration (NULL, FALSE)) + ; + g_usleep (10000); + } +} + + +static void +snap (GtkWidget *window, const char *dir, const char *name, gboolean dark) +{ + const int scale = 3; + cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, WIDTH * scale, snap_height * scale); + cairo_t *cr = cairo_create (surface); + g_autofree char *path = g_build_filename (dir, name, NULL); + + settle (); + cairo_scale (cr, scale, scale); + /* a text page behind, so that what is clear shows */ + cairo_set_source_rgb (cr, dark ? 0.0 : 1.0, dark ? 0.0 : 1.0, dark ? 0.0 : 1.0); + cairo_paint (cr); + cairo_translate (cr, 0, snap_clear); + gtk_widget_draw (gtk_bin_get_child (GTK_BIN (window)), cr); + cairo_destroy (cr); + cairo_surface_write_to_png (surface, path); + cairo_surface_destroy (surface); +} + + +/* As the input surface does for the number pad */ +static gboolean +on_page_draw (GtkWidget *widget, cairo_t *cr) +{ + gtk_render_background (gtk_widget_get_style_context (widget), cr, 0, 0, + gtk_widget_get_allocated_width (widget), + gtk_widget_get_allocated_height (widget)); + return GDK_EVENT_PROPAGATE; +} + + +/* A page that knows its own height */ +static GtkWidget * +own_page (GtkWidget *widget, const char *what, int *height) +{ + GtkWidget *window = gtk_offscreen_window_new (); + int min = 0, nat = 0; + + gtk_widget_set_visible (widget, TRUE); + gtk_container_add (GTK_CONTAINER (window), widget); + gtk_widget_set_size_request (widget, WIDTH, -1); + gtk_widget_show (window); + settle (); + gtk_widget_get_preferred_height (widget, &min, &nat); + g_print ("%s: %dx%d (wants %d)\n", what, gtk_widget_get_allocated_width (widget), + gtk_widget_get_allocated_height (widget), nat); + *height = gtk_widget_get_allocated_height (widget); + return window; +} + + +static GtkWidget * +page (GtkWidget *widget, const char *what) +{ + GtkWidget *window = gtk_offscreen_window_new (); + int min = 0, nat = 0; + + gtk_widget_set_visible (widget, TRUE); + gtk_container_add (GTK_CONTAINER (window), widget); + gtk_widget_get_preferred_height_for_width (widget, WIDTH, &min, &nat); + g_print ("%s: at least %d high, would like %d\n", what, min, nat); + gtk_widget_set_size_request (widget, WIDTH, PANEL); + gtk_window_set_default_size (GTK_WINDOW (window), WIDTH, PANEL); + gtk_widget_show (window); + settle (); + g_print ("%s: given %dx%d\n", what, gtk_widget_get_allocated_width (widget), + gtk_widget_get_allocated_height (widget)); + return window; +} + + +int +main (int argc, char **argv) +{ + const char *dir = argc > 1 ? argv[1] : "."; + g_autoptr (PosStyleManager) style = NULL; + g_autoptr (GtkCssProvider) provider = NULL; + GtkWidget *emoji, *keypad, *pad; + TactusTheme theme; + + g_mkdir_with_parents (dir, 0755); + gtk_init (&argc, &argv); + hdy_init (); + pos_init (); + + style = pos_style_manager_new (); + provider = gtk_css_provider_new (); + gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), GTK_STYLE_PROVIDER (provider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 10); + + emoji = page (gtk_label_new (""), "nothing"); + pad = pos_keypad_new (); + pos_keypad_set_letters_visible (POS_KEYPAD (pad), TRUE); + pos_keypad_set_symbols_visible (POS_KEYPAD (pad), TRUE); + g_signal_connect (pad, "draw", G_CALLBACK (on_page_draw), NULL); + keypad = page (pad, "number pad"); + + for (int dark = 0; dark <= 1; dark++) { + g_autofree char *css = NULL; + + tactus_theme_init (&theme, dark); + css = tactus_theme_css (&theme); + gtk_css_provider_load_from_data (provider, css, -1, NULL); + snap (keypad, dir, dark ? "keypad-dark.png" : "keypad-light.png", dark); + } + + /* the emoji page and the search for emoji draw themselves, to their own height */ + { + GtkWidget *search = pos_emoji_search_new (); + GtkWidget *window; + int height = 0; + + snap_clear = 0; + window = own_page (gtk_bin_get_child (GTK_BIN (emoji)) ? pos_emoji_picker_new () : pos_emoji_picker_new (), + "emoji", &height); + snap_height = height; + snap (window, dir, "emoji-light.png", FALSE); + + window = own_page (search, "emoji search", &height); + snap_height = height; + snap (window, dir, "search-empty.png", FALSE); + pos_emoji_search_type (POS_EMOJI_SEARCH (search), "smil"); + snap (window, dir, "search-smil.png", FALSE); + } + return 0; +} diff --git a/packages/tactus/tools/tactus-typer-test.c b/packages/tactus/tools/tactus-typer-test.c new file mode 100644 index 000000000..1601cedce --- /dev/null +++ b/packages/tactus/tools/tactus-typer-test.c @@ -0,0 +1,988 @@ +/* + * Tactus's typing, tried against make-believe text fields: one + * that tells its text and can take text away (as GTK, Qt and the browser do), + * one that tells nothing (as the GPUI applications), one that is slow, one + * that ignores requests to delete, and the browser, which tells nothing more + * until its last word was answered and takes text away counting from the + * cursor it last told of. + * + * Copyright (C) 2026 W4HO + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +#include "tactus-typer.h" + +#include +#include + +#include +#include + +typedef struct { + char *text; + gsize cursor, anchor; +} Report; + +typedef struct { + gboolean tells; + gboolean ignores_erase; + gboolean enter_sends; + gboolean hold; + GString *text; + gsize cursor, anchor; + GPtrArray *held; + gint64 now; + TactusTyper *typer; + gboolean shift; + guint by_keys, by_field; + + /* The browser */ + gboolean gated; /* it tells nothing more until its last word was answered */ + gboolean answered; /* the keyboard's answers reach it */ + guint commits, done; /* its words so far, and the last one it was answered for */ + Report *waiting; /* what it has to tell once answered */ + Report *told; /* what it last told */ + guint lost_erases; /* requests to take text away that it could not place */ + + /* The keyboard's answers */ + gboolean ack_due; + guint acks; +} Field; + +static int failed, checked; + +/* + * The text field + */ + +static void +report_free (gpointer data) +{ + Report *r = data; + + g_free (r->text); + g_free (r); +} + + +static Report * +report_new (Field *f) +{ + Report *r = g_new0 (Report, 1); + + r->text = g_strdup (f->text->str); + r->cursor = f->cursor; + r->anchor = f->anchor; + return r; +} + + +static gboolean +report_same (const Report *a, const Report *b) +{ + return a && b && g_str_equal (a->text, b->text) && a->cursor == b->cursor && a->anchor == b->anchor; +} + +static void gated_send (Field *f); + +/* The keyboard's answers go out once the typing engine is done with what it was told */ +static void +pump (Field *f) +{ + while (f->ack_due) { + f->ack_due = FALSE; + if (f->gated && f->answered) { + f->done = f->commits; + gated_send (f); + } + } +} + +/* The browser tells what it has to tell, if its last word was answered */ +static void +gated_send (Field *f) +{ + Report *r; + + if (f->done != f->commits || f->waiting == NULL) + return; + + r = g_steal_pointer (&f->waiting); + g_clear_pointer (&f->told, report_free); + f->told = r; + f->commits++; + tactus_typer_state (f->typer, r->text, r->cursor, r->anchor); + pump (f); +} + +/* The page in the browser has changed */ +static void +gated_set (Field *f) +{ + Report *r = report_new (f); + + if (report_same (r, f->told)) { + report_free (r); + return; + } + g_clear_pointer (&f->waiting, report_free); + f->waiting = r; + gated_send (f); +} + + +static void +deliver (Field *f, Report *r) +{ + if (f->tells) + tactus_typer_state (f->typer, r->text, r->cursor, r->anchor); + else + tactus_typer_state (f->typer, NULL, 0, 0); + pump (f); +} + + +static void +report (Field *f) +{ + Report *r; + + if (f->gated) { + gated_set (f); + return; + } + + r = report_new (f); + if (f->hold) { + g_ptr_array_add (f->held, r); + return; + } + deliver (f, r); + report_free (r); +} + + +static void +flush (Field *f) +{ + /* in their order: what it has to tell meanwhile comes after what it kept */ + while (f->held->len > 0) { + Report *r = g_ptr_array_steal_index (f->held, 0); + + deliver (f, r); + report_free (r); + } + f->hold = FALSE; +} + + +static gboolean +delete_selection (Field *f) +{ + gsize lo = MIN (f->cursor, f->anchor), hi = MAX (f->cursor, f->anchor); + + if (lo == hi) + return FALSE; + g_string_erase (f->text, lo, hi - lo); + f->cursor = f->anchor = lo; + return TRUE; +} + + +static gboolean +backspace (Field *f) +{ + const char *prev; + + if (delete_selection (f)) + return TRUE; + if (f->cursor == 0) + return FALSE; + prev = g_utf8_find_prev_char (f->text->str, f->text->str + f->cursor); + g_string_erase (f->text, prev - f->text->str, f->text->str + f->cursor - prev); + f->cursor = f->anchor = prev - f->text->str; + return TRUE; +} + + +static void +op_commit (const char *text, gpointer data) +{ + Field *f = data; + + /* what the keyboard sends is an answer too */ + if (f->gated) + f->done = f->commits; + delete_selection (f); + g_string_insert (f->text, f->cursor, text); + f->cursor += strlen (text); + f->anchor = f->cursor; + /* The browser first tells what it had to tell before this; the page's new + * text comes after, and waits for the next answer */ + if (f->gated) + gated_send (f); + report (f); +} + + +static void +op_erase (guint n_chars, guint n_bytes, gboolean by_keys, gpointer data) +{ + Field *f = data; + + if (by_keys) { + f->by_keys += n_chars; + for (guint i = 0; i < n_chars; i++) { + if (backspace (f)) + report (f); + } + return; + } + + f->by_field += n_chars; + if (f->ignores_erase) + return; + if (f->gated) { + f->done = f->commits; + /* It counts from the cursor it last told of: behind, it takes nothing away */ + if (f->told == NULL || f->told->cursor != f->cursor || !g_str_equal (f->told->text, f->text->str)) { + f->lost_erases++; + gated_send (f); + return; + } + } + n_bytes = MIN (n_bytes, f->cursor); + g_string_erase (f->text, f->cursor - n_bytes, n_bytes); + f->cursor -= n_bytes; + f->anchor = f->cursor; + if (f->gated) + gated_send (f); + report (f); +} + + +static void +op_key (const char *symbol, gpointer data) +{ + Field *f = data; + + if (g_str_equal (symbol, "KEY_BACKSPACE")) { + if (backspace (f)) + report (f); + } else if (g_str_equal (symbol, "KEY_ENTER")) { + if (f->enter_sends) { + gboolean had = f->text->len > 0; + + g_string_truncate (f->text, 0); + f->cursor = f->anchor = 0; + if (had) + report (f); + } else { + op_commit ("\n", f); + } + } else if (g_str_equal (symbol, "KEY_LEFT")) { + if (f->cursor > 0) { + f->cursor = g_utf8_find_prev_char (f->text->str, f->text->str + f->cursor) - f->text->str; + f->anchor = f->cursor; + report (f); + } + } else if (g_str_equal (symbol, "KEY_RIGHT")) { + if (f->cursor < f->text->len) { + f->cursor = g_utf8_next_char (f->text->str + f->cursor) - f->text->str; + f->anchor = f->cursor; + report (f); + } + } +} + + +static void +op_shift (gboolean wanted, gboolean context_changed, gpointer data) +{ + Field *f = data; + + f->shift = wanted; +} + + +static void +op_wake (guint ms, gpointer data) +{ +} + + +static void +op_ack (gpointer data) +{ + Field *f = data; + + f->acks++; + f->ack_due = TRUE; +} + + +static gint64 +clock_now (gpointer data) +{ + Field *f = data; + + return f->now; +} + + +static Field * +field_new (gboolean tells) +{ + static const TactusTyperOps ops = { op_commit, op_erase, op_key, op_shift, op_wake, op_ack }; + Field *f = g_new0 (Field, 1); + + f->tells = tells; + f->text = g_string_new (NULL); + f->held = g_ptr_array_new_with_free_func (report_free); + f->now = 1000 * G_TIME_SPAN_SECOND; + f->typer = tactus_typer_new (&ops, f); + tactus_typer_set_clock (f->typer, clock_now, f); + tactus_typer_focus (f->typer, TRUE); + /* a text field says hello when it gets the keyboard */ + report (f); + return f; +} + +/* A text field in the browser, holding @text. @answered: the keyboard's + * answers reach it. */ +static Field * +field_new_browser (gboolean answered, const char *text) +{ + static const TactusTyperOps ops = { op_commit, op_erase, op_key, op_shift, op_wake, op_ack }; + Field *f = g_new0 (Field, 1); + + f->tells = TRUE; + f->gated = TRUE; + f->answered = answered; + f->text = g_string_new (text); + f->cursor = f->anchor = f->text->len; + f->held = g_ptr_array_new_with_free_func (report_free); + f->now = 1000 * G_TIME_SPAN_SECOND; + f->typer = tactus_typer_new (&ops, f); + tactus_typer_set_clock (f->typer, clock_now, f); + tactus_typer_focus (f->typer, TRUE); + /* It says hello without its text, and has the text to tell once answered */ + f->commits = 1; + tactus_typer_state (f->typer, NULL, 0, 0); + pump (f); + gated_set (f); + return f; +} + + +static void +field_free (Field *f) +{ + tactus_typer_free (f->typer); + g_clear_pointer (&f->waiting, report_free); + g_clear_pointer (&f->told, report_free); + g_ptr_array_unref (f->held); + g_string_free (f->text, TRUE); + g_free (f); +} + +/* The owner, or the application, changed the text field by other means than our keys */ +static void +field_set (Field *f, const char *text, gsize cursor, gsize anchor) +{ + g_string_assign (f->text, text); + f->cursor = cursor; + f->anchor = anchor; + report (f); +} + +/* + * The owner's fingers + */ + +static void +advance (Field *f, guint ms) +{ + f->now += ms * G_TIME_SPAN_MILLISECOND; + tactus_typer_poll (f->typer); +} + + +static void +press (Field *f, const char *symbol) +{ + TactusTap tap = { .valid = TRUE }; + + advance (f, 130); + tactus_typer_key (f->typer, symbol, g_utf8_strlen (symbol, -1) == 1 ? &tap : NULL); +} + +/* Type text as on the keyboard: a small letter comes out as a capital while + * Shift is on by itself; "\b" is Backspace and "\n" Return */ +static void +type (Field *f, const char *text) +{ + for (const char *p = text; *p; p = g_utf8_next_char (p)) { + char sym[8] = { 0 }; + + g_utf8_strncpy (sym, p, 1); + if (*p == '\b') { + advance (f, 130); + tactus_typer_backspace (f->typer, TACTUS_BACKSPACE_TAP); + } else if (*p == '\n') { + press (f, "KEY_ENTER"); + } else { + if (g_ascii_islower (*p) && f->shift) + sym[0] = g_ascii_toupper (*p); + press (f, sym); + } + } +} + +/* + * Checks + */ + +static void +expect (Field *f, const char *what, const char *text) +{ + g_autofree char *got = g_strescape (f->text->str, "\""); + g_autofree char *want = g_strescape (text, "\""); + gboolean ok = g_str_equal (f->text->str, text); + + checked++; + if (!ok) + failed++; + printf ("%s %-44s \"%s\"", ok ? " ok" : "FAIL", what, got); + if (!ok) + printf (" wanted \"%s\"", want); + printf ("\n"); +} + +/* The typer's copy is what the text field holds before the cursor */ +static void +expect_copy (Field *f, const char *what) +{ + g_autofree char *copy = tactus_typer_dup_before (f->typer); + g_autofree char *before = g_strndup (f->text->str, MIN (f->cursor, f->anchor)); + gboolean ok = g_str_equal (copy, before); + + checked++; + if (!ok) + failed++; + printf ("%s %-44s copy \"%s\"", ok ? " ok" : "FAIL", what, copy); + if (!ok) + printf (" field \"%s\"", before); + printf ("\n"); +} + + +static void +expect_shift (Field *f, const char *what, gboolean wanted) +{ + gboolean ok = !!f->shift == !!wanted; + + checked++; + if (!ok) + failed++; + printf ("%s %-44s Shift %s\n", ok ? " ok" : "FAIL", what, f->shift ? "on" : "off"); +} + +/* + * Tests + */ + +static void +test_basic (gboolean tells) +{ + Field *f = field_new (tells); + + printf ("== typing (%s)\n", tells ? "a field that tells" : "a field that tells nothing"); + expect_shift (f, "an empty field", TRUE); + type (f, "teh "); + expect (f, "a slip, a space", "The "); + expect_shift (f, "in a sentence", FALSE); + type (f, "wrold."); + expect (f, "a slip, a full stop", "The world."); + type (f, " "); + expect_shift (f, "after a full stop", TRUE); + type (f, "i think im right"); + expect (f, "I and I'm", "The world. I think I'm right"); + type (f, " "); + expect (f, "two spaces", "The world. I think I'm right. "); + expect_shift (f, "after two spaces", TRUE); + type (f, "ok! "); + expect (f, "two spaces after !", "The world. I think I'm right. Ok! "); + type (f, "see you tomorow?"); + expect (f, "a question mark", "The world. I think I'm right. Ok! See you tomorrow?"); + expect_copy (f, "the copy"); + field_free (f); +} + + +static void +test_slow (void) +{ + Field *f = field_new (TRUE); + + printf ("== a field that tells late\n"); + /* Text is taken away only once the field has shown what was sent: a key + * that may take some away waits for that, a quarter of a second at most */ + type (f, "it "); + f->hold = TRUE; + type (f, "wsa"); + advance (f, 60); + tactus_typer_key (f->typer, " ", NULL); + expect (f, "the space waits for the field", "It wsa"); + advance (f, 100); + flush (f); + expect (f, "told in time: the word is corrected", "It was "); + expect_copy (f, "the copy"); + + /* what is typed while a key waits keeps its place after it */ + f->hold = TRUE; + type (f, "teh"); + advance (f, 40); + tactus_typer_key (f->typer, " ", NULL); + advance (f, 40); + tactus_typer_key (f->typer, "c", NULL); + advance (f, 40); + tactus_typer_key (f->typer, "a", NULL); + advance (f, 40); + tactus_typer_key (f->typer, "t", NULL); + expect (f, "keys after the one that waits wait too", "It was teh"); + flush (f); + expect (f, "in their order, once it is told", "It was the cat"); + expect_copy (f, "the copy"); + field_free (f); + + /* too late: the key goes in, the word stays as it was typed, and nothing waits for a while */ + f = field_new (TRUE); + f->hold = TRUE; + type (f, "teh"); + advance (f, 60); + tactus_typer_key (f->typer, " ", NULL); + expect (f, "the space waits", "Teh"); + advance (f, 300); + expect (f, "not told in time: the word stays", "Teh "); + type (f, "cat sat "); + expect (f, "typed on, nothing waits", "Teh cat sat "); + flush (f); + expect_copy (f, "the copy, once told"); + type (f, "donw. "); + expect (f, "caught up: corrected again", "Teh cat sat down. "); + expect_shift (f, "after it", TRUE); + + /* held for more than a second */ + f->hold = TRUE; + type (f, "it wsa "); + advance (f, 1500); + type (f, "late "); + flush (f); + expect (f, "told after a long while: nothing lost", "Teh cat sat down. It wsa late "); + expect_copy (f, "the copy"); + type (f, "adn on "); + expect (f, "and corrected again after", "Teh cat sat down. It wsa late and on "); + field_free (f); +} + +/* The browser. Answered, it tells its text after every key; unanswered, it is + * a key behind, and a request to take text away would take nothing. */ +static void +test_browser (gboolean answered) +{ + Field *f = field_new_browser (answered, ""); + + printf ("== the browser (%s)\n", answered ? "its words answered" : "left unanswered"); + expect_shift (f, "an empty field", TRUE); + type (f, "h"); + expect_shift (f, "after the first letter", FALSE); + type (f, "ello "); + /* unanswered, it is behind: the space waits its quarter of a second for nothing */ + if (!answered) + advance (f, 300); + expect (f, "a word", "Hello "); + expect_copy (f, "the copy"); + type (f, "teh wrold. "); + if (answered) { + expect (f, "slips are corrected", "Hello the world. "); + } else { + expect (f, "slips stay: text can't be taken away", "Hello teh wrold. "); + } + expect_shift (f, "after a full stop", TRUE); + type (f, "ok"); + expect_copy (f, "the copy"); + + checked++; + if (f->lost_erases) { + failed++; + printf ("FAIL %u requests to take text away went nowhere\n", f->lost_erases); + } else { + printf (" ok no request to take text away went nowhere\n"); + } + field_free (f); + + /* in the middle of a sentence that was there */ + f = field_new_browser (answered, "See you "); + if (answered) + expect_shift (f, "text was there: no capital", FALSE); + type (f, "t"); + expect_shift (f, "after a letter", FALSE); + type (f, "omorow "); + if (answered) + expect (f, "corrected after what was there", "See you tomorrow "); + field_free (f); +} + +/* The dictionary is English: on another language's layout words stay as typed */ +static void +test_language (void) +{ + Field *f = field_new (TRUE); + + printf ("== another language's layout\n"); + tactus_typer_set_language (f->typer, "de"); + type (f, "teh wrold. "); + expect (f, "nothing is corrected", "Teh wrold. "); + expect_shift (f, "a sentence still starts with a capital", TRUE); + tactus_typer_set_language (f->typer, "en"); + type (f, "teh "); + expect (f, "back on the English layout", "Teh wrold. The "); + field_free (f); +} + +/* A field that tells nothing is answered once, when it gets the keyboard */ +static void +test_answers (void) +{ + Field *f = field_new (FALSE); + + printf ("== answers\n"); + type (f, "teh cat sat. ok "); + checked++; + if (f->acks != 1) { + failed++; + printf ("FAIL a field that tells nothing got %u answers\n", f->acks); + } else { + printf (" ok a field that tells nothing is answered once\n"); + } + field_free (f); +} + + +static void +test_tokens (gboolean tells) +{ + Field *f = field_new (tells); + + printf ("== not words (%s)\n", tells ? "tells" : "tells nothing"); + type (f, "see example.cmo and bob@gmial.com #hashtga abc123 x-rya /usr/bni "); + expect (f, "addresses, tags, paths", "See example.cmo and bob@gmial.com #hashtga abc123 x-rya /usr/bni "); + type (f, "TEH Zorblat GitHub "); + expect (f, "capitals", "See example.cmo and bob@gmial.com #hashtga abc123 x-rya /usr/bni TEH Zorblat GitHub "); + type (f, "(teh) \"wrold\" "); + expect (f, "brackets and quotes", + "See example.cmo and bob@gmial.com #hashtga abc123 x-rya /usr/bni TEH Zorblat GitHub (the) \"world\" "); + expect_copy (f, "the copy"); + field_free (f); +} + + +static void +test_enter (void) +{ + Field *f = field_new (TRUE); + + printf ("== Return\n"); + type (f, "helo\n"); + expect (f, "a lone word", "Helo\n"); + expect_shift (f, "a new line", TRUE); + type (f, "i am helo\n"); + expect (f, "running text", "Helo\nI am hello\n"); + expect_copy (f, "the copy"); + field_free (f); + + f = field_new (FALSE); + f->enter_sends = TRUE; + type (f, "ok thanks\n"); + expect (f, "sent off", ""); + expect_shift (f, "the next message", TRUE); + type (f, "sure "); + expect (f, "the next message", "Sure "); + field_free (f); +} + + +static void +test_silent (void) +{ + Field *f = field_new (FALSE); + + printf ("== a field that tells nothing: the cursor moves, the text is sent\n"); + type (f, "hello there"); + advance (f, 1000); + /* the owner taps the application's Send */ + g_string_truncate (f->text, 0); + f->cursor = f->anchor = 0; + report (f); + expect_shift (f, "sent with the application's button", TRUE); + type (f, "ok"); + /* … and quickly */ + advance (f, 300); + g_string_truncate (f->text, 0); + f->cursor = f->anchor = 0; + report (f); + type (f, "sure "); + expect (f, "sent a moment after the last key", "Sure "); + + /* the text field settles in two steps */ + type (f, "a"); + f->now += 10 * G_TIME_SPAN_MILLISECOND; + report (f); + f->now += 10 * G_TIME_SPAN_MILLISECOND; + report (f); + type (f, "nd teh "); + expect (f, "settling is not a change", "Sure and the "); + + /* a pause in mid word */ + type (f, "te"); + advance (f, 3000); + type (f, "h "); + expect (f, "a word typed with a long pause", "Sure and the teh "); + + /* Backspace where we thought nothing was */ + advance (f, 1000); + g_string_assign (f->text, "see you tom"); + f->cursor = f->anchor = f->text->len; + report (f); + expect_shift (f, "a field we know nothing of", TRUE); + type (f, "\b\b\b"); + expect_shift (f, "after deleting what was there", FALSE); + type (f, "soon "); + expect (f, "typing on", "see you soon "); + + /* the cursor moved with the space bar */ + press (f, "KEY_LEFT"); + expect_shift (f, "after moving the cursor", FALSE); + field_free (f); +} + + +static void +test_moved (void) +{ + Field *f = field_new (TRUE); + g_autofree char *copy = NULL; + + printf ("== a field that tells: the cursor moves, text is selected\n"); + field_set (f, "hello world", 5, 5); + type (f, "s "); + expect (f, "typing in the middle", "hellos world"); + expect_copy (f, "the copy"); + + field_set (f, "teh", 3, 3); + type (f, " "); + expect (f, "a word that was there", "teh "); + + field_set (f, "te", 2, 2); + type (f, "h "); + expect (f, "a word that was begun", "the "); + + field_set (f, "wor ld", 2, 2); + type (f, "x "); + expect (f, "inside a word", "wox r ld"); + + field_set (f, "abc def", 7, 4); + type (f, "\b"); + expect (f, "Backspace on a selection", "abc "); + expect_copy (f, "the copy"); + + field_set (f, "abc def", 7, 4); + type (f, "x"); + expect (f, "typing over a selection", "abc x"); + expect_copy (f, "the copy"); + + field_set (f, "", 0, 0); + type (f, "\b"); + advance (f, 400); + expect_shift (f, "Backspace in an empty field", TRUE); + + field_set (f, "hello world", 11, 11); + press (f, "KEY_LEFT"); + press (f, "KEY_LEFT"); + expect_copy (f, "after arrows"); + press (f, "KEY_RIGHT"); + press (f, "KEY_RIGHT"); + press (f, "KEY_RIGHT"); + advance (f, 400); + expect_copy (f, "an arrow at the end"); + field_free (f); +} + + +static void +test_ignores (void) +{ + Field *f = field_new (TRUE); + + printf ("== a field that tells, but ignores requests to delete\n"); + f->ignores_erase = TRUE; + type (f, "teh "); + expect (f, "the first time", "TehThe "); + type (f, "wrold "); + expect (f, "from then on", "TehThe world "); + printf (" (%u by the field, %u by keys)\n", f->by_field, f->by_keys); + field_free (f); +} + + +static void +test_backspace (gboolean tells) +{ + Field *f = field_new (tells); + + printf ("== Backspace (%s)\n", tells ? "tells" : "tells nothing"); + type (f, "hello there friend"); + advance (f, 130); + tactus_typer_backspace (f->typer, TACTUS_BACKSPACE_WORD); + expect (f, "held: a word", "Hello there "); + advance (f, 130); + tactus_typer_backspace (f->typer, TACTUS_BACKSPACE_WORD); + expect (f, "held: another", "Hello "); + advance (f, 130); + tactus_typer_backspace (f->typer, TACTUS_BACKSPACE_WORD); + expect (f, "held: the last", ""); + expect_shift (f, "empty again", TRUE); + expect_copy (f, "the copy"); + + type (f, "teh "); + type (f, "\b\b\bhe "); + expect (f, "put back, then mended by hand", "The "); + type (f, "teh "); + expect (f, "still corrected", "The the "); + field_free (f); +} + + +static void +test_put_back (gboolean tells) +{ + Field *f = field_new (tells); + const char *slip = tells ? "wrold" : "tommorow"; + g_autofree char *typed = g_strdup_printf ("%s ", slip); + g_autofree char *kept = NULL; + g_autofree char *again = NULL; + + printf ("== a correction taken back (%s)\n", tells ? "tells" : "tells nothing"); + type (f, "a "); + type (f, typed); + type (f, "\b"); + kept = g_strdup_printf ("A %s", slip); + expect (f, "Backspace after a correction", kept); + type (f, " "); + again = g_strdup_printf ("A %s %s ", slip, slip); + type (f, typed); + expect (f, "kept, and left alone from then on", again); + expect_copy (f, "the copy"); + field_free (f); +} + + +static void +test_other (void) +{ + Field *f = field_new (FALSE); + + printf ("== other things\n"); + type (f, "funy"); + tactus_typer_text (f->typer, "\360\237\230\200", TRUE); + expect (f, "an emoji ends a word", "Funny\360\237\230\200"); + field_free (f); + + f = field_new (TRUE); + tactus_typer_set_hints (f->typer, TACTUS_HINT_LOWERCASE); + expect_shift (f, "a field that wants small letters", FALSE); + tactus_typer_set_hints (f->typer, TACTUS_HINT_AUTO_CAPS); + type (f, "teh "); + expect (f, "a field that asked for capitals alone (a web page)", "The "); + tactus_typer_set_hints (f->typer, TACTUS_HINT_AUTO_CAPS | TACTUS_HINT_SPELLCHECK | TACTUS_HINT_COMPLETION); + type (f, "teh "); + expect (f, "a field that asked for corrections too", "The the "); + tactus_typer_set_hints (f->typer, TACTUS_HINT_SENSITIVE); + type (f, "teh "); + expect (f, "a field nothing is to be learned from", "The the the "); + tactus_typer_set_hints (f->typer, TACTUS_HINT_HIDDEN | TACTUS_HINT_SENSITIVE); + type (f, "teh "); + expect (f, "a secret", "The the the teh "); + field_free (f); + + f = field_new (TRUE); + type (f, "e.g. this vs. that. wait... what. \"yes.\" ok"); + expect (f, "where sentences start", "E.g. this vs. that. Wait... what. \"Yes.\" Ok"); + field_free (f); + + f = field_new (FALSE); + type (f, "ok "); + advance (f, 2000); + type (f, " x"); + expect (f, "two slow spaces", "Ok x"); + field_free (f); +} + +/* Known to go wrong, and why: shown, not counted */ +static void +test_limits (void) +{ + Field *f = field_new (FALSE); + + printf ("== known limits (not counted)\n"); + type (f, "ok"); + /* sent off within a tenth of a second of the last key's echo: no way to tell */ + f->now += 50 * G_TIME_SPAN_MILLISECOND; + g_string_truncate (f->text, 0); + f->cursor = f->anchor = 0; + report (f); + type (f, "sure "); + printf (" sent off right on the last key, then \"sure \": \"%s\"\n", f->text->str); + field_free (f); +} + + +int +main (int argc, char **argv) +{ + g_autofree char *tmp = g_dir_make_tmp ("tactus-typer-XXXXXX", NULL); + + /* What the keyboard learns here is not the owner's */ + g_setenv ("XDG_DATA_HOME", tmp, TRUE); + g_setenv ("XDG_STATE_HOME", tmp, TRUE); + + if (!tactus_ac_available ()) { + printf ("no dictionary\n"); + return 2; + } + + test_basic (TRUE); + test_basic (FALSE); + test_slow (); + test_browser (TRUE); + test_browser (FALSE); + test_answers (); + test_language (); + test_tokens (TRUE); + test_tokens (FALSE); + test_enter (); + test_silent (); + test_moved (); + test_ignores (); + test_backspace (TRUE); + test_backspace (FALSE); + test_other (); + test_put_back (TRUE); + test_put_back (FALSE); + test_limits (); + + printf ("%d of %d failed\n", failed, checked); + return failed ? 1 : 0; +} diff --git a/packages/tactus/version b/packages/tactus/version new file mode 100644 index 000000000..6e8bf73aa --- /dev/null +++ b/packages/tactus/version @@ -0,0 +1 @@ +0.1.0 From 559a1d34838baf837f15a805f4c2db072bd62704 Mon Sep 17 00:00:00 2001 From: W4HO <87742609+W4HO-ham@users.noreply.github.com> Date: Wed, 18 Nov 2026 18:33:19 -0649 Subject: [PATCH 2/2] tactus: pictures in the theme's colours, and omamobile-osk named instead of a pull request From the review of #888. letters.png now shows the keyboard as the palmtop draws it in Omarchy's Tokyo Night theme, and theme-light.png the same keyboard a moment after omarchy-theme-set catppuccin-latte, beside the README's words on the colours. The README names omamobile-shell's omamobile-osk (and its fallback to squeekboard) rather than the pull request it comes in, and the PKGBUILD's comment no longer carries a version number for it. --- docs/screenshots/tactus/letters.png | Bin 46233 -> 60014 bytes docs/screenshots/tactus/theme-light.png | Bin 0 -> 60774 bytes packages/tactus/PKGBUILD | 2 +- packages/tactus/README.md | 12 +++++++++--- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 docs/screenshots/tactus/theme-light.png diff --git a/docs/screenshots/tactus/letters.png b/docs/screenshots/tactus/letters.png index 851b0631364b850a4b1e86fc69172ee00412186f..9eb93ec0689356441016cc15bfae517e916d76bf 100644 GIT binary patch literal 60014 zcmb@u1yEc~@GnXXT_gbl1PiXgU4sXg#SQ>!_sNe+pb)o4(UfMnUnWM?v`%h=OtpG=17ZL2>6mLD~C=f+CcNfUDu5-S$V*FTdd?jzn){OJq_ZPjLsL3q%-^HxadCH5z&D)MIFvoP z%DJn!s~SD7mYO||t2~J;J%R;e<>~P)Ea{`8bqg|l8)W)z_>~{hF)CxMCF9kN(eE1??vea3i3e%4`?T)2tt?mDsJjdG zhh~ELLmy?V&GrcXu{roCQ)sdmc90?L;Xsk5kkF3pW^>(x(B(^f($R~+%!a5uFxB=|K@im~E_)Jx5!*~R@E0Q9VaxUTC zb+W_@W~|}?Xc_QvLNiY+(mSsVh@hM!68E+`8GaQcgISMExvG5-|A>0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%l`&C;}AX23MBj}Qm! z-v^>{K^^h7#EYwNkXi^x&T=}y;?MuAWwFJdm?^d>Kj*&^+Cja5dX)s$3sL7XxgV>l zu(Y)^%wEi`(=%kLeY?J#NHhNP5TXCp|$0=GLz^^ST+4!!$cPixo7I*pO$7!Ux zmGvN~8Im8m&|r%_s4au|Tj)np)x9foQyo3F(xULajyrmqOS8-b|HDaX&yI!6*RF?) zcFFk#RQiUbzIq8zF!UKzdoBlSR%;Wktr-X17g?K1905oB?wsRBdZdHj8%sWvd9e&0 zA`?^FE-3xS!LY45X@BiQg*95E8<)FC&joUGL@dnRIp+H_Vh=>g0qsc=bE&`GC#R|k zD4V(t?i%w`;rzK6F~0CePL8~^g_>7i;j@=A;bC8{kZ^pY`NOZ3?5)+*o2mnyLyeDb zQGgbG5JkNqKoUD!)6A6Q2X6Equo9pZHtYQUt3u?qW1fSWx?eF^)p44Cn zku(fRjgQUs)RJ7I8}E;Y{1zV@>bLqkC~esU(neu^YP5Q5t{8*8Z9g^GBM^JS=gy<> nv8`6;fB*gefBv7F4W4%0R^ExL&!438SMrvw;kAOR_n!U_0FR#_ literal 0 HcmV?d00001 diff --git a/packages/tactus/PKGBUILD b/packages/tactus/PKGBUILD index 339e20018..686dcd6f8 100644 --- a/packages/tactus/PKGBUILD +++ b/packages/tactus/PKGBUILD @@ -3,7 +3,7 @@ # Tactus, an on-screen keyboard that corrects words as they are typed. # Opt-in: nothing depends on it, and squeekboard stays the phone's keyboard # until the owner picks Tactus (Setup > Keyboard, or `omamobile-osk use -# tactus`; omamobile-shell 0.2.134 and later). +# tactus`, from an omamobile-shell that has omamobile-osk). # # Built from Stevia 0.59.0 (https://gitlab.gnome.org/World/Phosh/stevia, # GPL-3.0-or-later), whose Wayland side, layout files and emoji data it keeps: diff --git a/packages/tactus/README.md b/packages/tactus/README.md index 9144d2ed0..af1754867 100644 --- a/packages/tactus/README.md +++ b/packages/tactus/README.md @@ -4,7 +4,7 @@ Tactus is an on-screen keyboard an owner may choose instead of squeekboard. It corrects words as they are typed, the way the keyboards on current phones do. Opt-in: no image installs it, nothing depends on it, and squeekboard stays the phone's keyboard until the owner picks Tactus.

- Tactus under a text field. The sentence was typed with three slips (im, teh, dont) and no capitals + Tactus in Omarchy's Tokyo Night theme

It is built from [Stevia](https://gitlab.gnome.org/World/Phosh/stevia) 0.59.0 (GPL-3.0-or-later), whose Wayland side, layout files and emoji data it keeps. The keys, the emoji page and everything about what gets typed are written anew: six patches to Stevia's files in `patches/`, each with what it does and why in its header, and Tactus's own sources in `source/` (the typing engine, the autocorrection, the drawing) and `tools/` (its checks). @@ -22,7 +22,7 @@ omamobile-osk use tactus # and back: omamobile-osk use squeekboard omamobile-osk which ``` -Both come with the shell's part of this, a pull request of its own (#896): `omamobile-osk` starts the keyboard the owner chose, and `hypr/phone.lua` keeps Tactus's virtual keyboard out of the hardware-key binds, as it does squeekboard's. The choice is one word in `~/.config/omamobile/keyboard`. If Tactus is removed, the phone is back on squeekboard at the next start. +Both come with omamobile-shell's `omamobile-osk`, which starts the keyboard the owner chose (squeekboard instead, if Tactus fails at its start), and its `hypr/phone.lua` keeps Tactus's virtual keyboard out of the hardware-key binds, as it does squeekboard's. The choice is one word in `~/.config/omamobile/keyboard`. If Tactus is removed, the phone is back on squeekboard at the next start. The package sits beside squeekboard: everything is under `/usr/lib/tactus`, with Stevia's settings schemas compiled there and the binary named `tactus`. (Arch's `stevia` package conflicts with squeekboard, which omamobile-shell needs.) @@ -51,7 +51,13 @@ Password fields get none of this: the typing engine is off wherever what is type ## Its colours -Tactus draws itself in the applied Omarchy theme, as squeekboard is styled: the panel in the theme's darker background, the keys in its lighter one, the letters in its foreground, the caret in its accent (from `~/.local/state/omarchy/current/theme/colors.toml`). When Omarchy applies another theme the keyboard takes the new colours at once (it watches `theme.generation`). Without a theme file it uses light or dark colours of its own, by the desktop's setting. An owner who prefers those anyway can say so: +Tactus draws itself in the applied Omarchy theme, as squeekboard is styled: the panel in the theme's darker background, the keys in its lighter one, the letters in its foreground, the caret in its accent (from `~/.local/state/omarchy/current/theme/colors.toml`). When Omarchy applies another theme the keyboard takes the new colours at once (it watches `theme.generation`): the keyboard at the top of this page in Tokyo Night, and here a moment after `omarchy-theme-set catppuccin-latte`. + +

+ The same keyboard a moment after Omarchy applied Catppuccin Latte +

+ +Without a theme file it uses light or dark colours of its own, by the desktop's setting. An owner who prefers those anyway can say so: ``` mkdir -p ~/.config/tactus && touch ~/.config/tactus/own-colours