TailWimp Lite
Pages: 1 2
Andreas Skyman (8677) 170 posts |
EDIT: Latest release is v1.0.1 (2021-02-05), see post further down in the thread for release notes and links! First release of TailWimp Lite ( (Zip file here, since Github works badly in NetSurf: https://github.com/skymandr/TailWimpLite/releases/download/v0.1.0/TailWmpLt.zip ) From the Readme:
Rudimentary window movements work, however there are several known issues:
Unfortunately I am going back to work tomorrow, so I probably won’t have the time to work on the outstanding issues, though especially issue #5 annoys me a lot, so I may need to invoke the “work on free software during work hours” clause of my contract… ;) Many thanks to @steve-fryatt for the excellent introduction he’s written to wimp programming. I hope I have given appropriate credit in the code. |
Julie Stamp (8365) 462 posts |
The bird is cute :-)
I removed your wimp_open_window and the hang didn’t happen anymore1. Looking at the wiki it says you can only wimp_open_window your own windows. Try doing a wimp_send_message instead; this is how Madness does it. For your validation problem, make the string
(see the wiki for more details). 1 For anyone who’s not looked at the github issue, it happens if you try and move the Tools window in Paint. |
Andreas Skyman (8677) 170 posts |
:3
Hmm… I have a feeling this can’t be the whole issue, since some non-owned windows are manageable, and the Choices window – which I think I own, but I’m not entirely sure what “own” means in this context – doesn’t… That being said, I haven’t looked deeply enough into the issue with Choices to verify that it is the exact same issue as with
Hah! What a difference a char makes… ;) |
Julie Stamp (8365) 462 posts |
In wininfo_get_info you need to call wimp_get_window_info_header_only rather than wimp_get_window_info. The latter tries to give you info on all the icons in the window as well, which overruns onto your stack after wimp_wininfo. This explains why it didn’t open Choices, but managed to open the TailWimp window ok (it doesn’t have any icons). |
Andreas Skyman (8677) 170 posts |
TailWimp Lite v0.1.1 This release fixes the window movement crash (issue #5), removes the Choices sub menu (issue #7 ) and fixes the input validation (issue #8). The fix of #5 revealed an issue affecting the same windows, where they cannot be correctly identified as Next release will probably be when Choices have been implemented. Many thanks to Julie Stamp on for pointing out how to solve the issues above! |
Alan Adams (2486) 1125 posts |
The underlying calls are Wimp_getWindowState, which gets the positional info, but not the icons. Unfortunately it doesn’t return the icon count, otherwise it could be used to find out how much memory would be needed for Wimp_GetWindowInfo, which returns the entire window description. |
Chris Johnson (125) 819 posts |
I think you are missing the point of Wimp_GetWindowInfo. If you call it with bit 0 of R1 set, then it returns the info for the window, the number of icons, but not the actual icon info. You call the SWI with bit 0 of R1 set. This may be all you need. If you need the icon info, you now know how many icons there are, and hence how much memory should be reserved for the second call to Wimp_GetWindowInfo, now with bit 0 of R1 clear, when all the icon info is returned as well. |
Steve Fryatt (216) 2046 posts |
Both With OSLib, you can completely safely do
What you can’t do is
You would instead need to claim the memory via |
Andreas Skyman (8677) 170 posts |
That explains why my choices dialog crashes when I try to manipulate the icons… ;) |
Andreas Skyman (8677) 170 posts |
TailWimp Lite v0.2.0 Choices now work (issue #1) and the movements work as intended, though the fix for undecorated windows is a bit hacky (issue #11). In addition, functions for moving windows to centre and to maximize have been implemented and documented (issue #14), and windows moved to top or bottom will be centred if they cannot cover the whole width (issue #15). Finally, Release Notes and License have been added and can be opened in the menu (issue #16), which has been tidied up a bit (issue #17), and iconized windows now have the correct icon (issue #13). The main issue that remains is the redrawing bug (issue #6). This is actually probably several bugs, but I’m hoping there may be a fix for all of them. It affects Many thanks to the users on the ROOL forum for help with ironing out some details for this release! Please let me know if you try it out and have any further input! |
Andreas Skyman (8677) 170 posts |
TailWimp Lite v0.3.0 This release replaces bare In addition, this version makes it so that windows that are entirely off screen cannot be moved, which makes sure that you won’t move Future development targets remain the same: more interesting and configurable hot keys (issues #2 and #3). Additionally, I would like to have a look at moving to using the GCCSDK, so that I can build on GNU/Linux (issue #18), with the intent of perhaps getting the application into Once more, my thanks to the users on the ROOL forums for helpful suggestions, and in particular to Julie Stamp for pointing out how to solve the redrawing issue! Let me know if you try it out and have any suggestions or find any bugs! |
Andrew Rawnsley (492) 1409 posts |
Before release, I strongly recommend checking it with programs that use panes or nested windows. For example, Impression Style (on !Store) is a good example of something that uses a lot of panes/sub-windows for its main window. The “nested wimp” apps are a little different, as the Wimp allows extended interrogation of any nesting. Browse and Messenger are examples of nested wimp apps, but there are many more (brain isn’t quite firing on all cylinders yet today). I think !ConfigX might be another exmaple. |
Andreas Skyman (8677) 170 posts |
Thanks for the input. As far as I can tell
I can’t find these in either |
Andrew McCarthy (3688) 576 posts |
A search of the internet reveals !ConfiX ;) |
Stuart Swales (1481) 351 posts |
Also PipeDream and Fireworkz manage their own document window stacks; the latter also does this for some of its dialogue boxes. |
Rick Murray (539) 13405 posts |
Check also Ovation. It does a lot of complicated stuff to create its main window 1. 1 Hearsay is the same, but given that they’re both by the same author, I’d imagine the method used would be similar. |
Andreas Skyman (8677) 170 posts |
Quick run-through: Of these Thanks for the input! :) Edit: Icon bar pop-up for |
Stuart Swales (1481) 351 posts |
Just click on the icon on the icon bar! |
Andreas Skyman (8677) 170 posts |
I did! It gives me a dialogue where it wants me to type something – the name of a new document I’m guessing – but whatever I type I get an error box saying “Can’t open file”… |
Alan Adams (2486) 1125 posts |
What it should do is ask what TYPE of document – text, numbers etc. The default of text should open a new document. The name of the document isn’t set until it’s saved. The options are numbers, text, text_plain or records. Anything else typed gives “file not found”. There’s a menu too, which lists the options. |
Stuart Swales (1481) 351 posts |
Nobody had ever reported that to me! Best make that a non-writable icon :-) |
Andreas Skyman (8677) 170 posts |
Typing any of these four gives me the same error, pressing the arrows does nothing, or at least nothing visible. :-/ |
Stuart Swales (1481) 351 posts |
You don’t need to type anything in that dialogue box, Andreas. Just click Create. |
Andreas Skyman (8677) 170 posts |
Then it complains of “Bad name”… :-( |
Andreas Skyman (8677) 170 posts |
TailWimp Lite v0.4.0 This release introduces a new modkey:
There are two quirks:
Since this changes the interaction pattern, and since being able to move focused windows is important, I’m bumping the minor version. The next logical step is to make the modkey configurable (issue #3). I think that this will require implementing support for DeepKeys 0, unless I want to make a complete reimagining of the control logic (issue #25). Not sure which route is best. DeepKeys seems very convenient, but I am reluctant to foist the inconvenience of installing a third-party dependency to run the program, especially a proprietary one, upon the user. It might also be more fun to do it myself, but on the other hand it might be very frustrating. I guess I’ll find out. Regardless, if I go with DeepKeys I will most likely keep the current control logic as a fallback, in case DeepKeys is not detected. I have decided not to prioritise the known bugs (issues #21–#23) at the moment, so after the above is done, I’ll probably have another look at GCCSDK and distribution options (issues #18–#20). As always, thanks to the users on the ROOL forums for suggestions! TailWimp Lite v0.4.2 This release retires Since this breaks previous interaction patterns, this it should probably be a minor release rather than a patch release, but it comes very soon after Once choices are implemented, I will probably bump the version to Once more, thanks to the users on the ROOL forums for help and suggestions! |
Pages: 1 2