Dev/Bugreports for SKKBAUI

Root / Talk About Programs / [.]

Some stuff I added (or plan to add):
Return values and automation of window propertiesMidori OS apps need to manually specify what they need, such as adding a close button and triggering its logic in the app's logic. I would like to introduce window flags, which the window manager will take care of without you needing to explicitly specify these except just a flag value you set in the property DEF of the app. About return values, I changed the format of the app DEF, it returns a value and also specifies how the app should react.
Return code specifications-1 or lower: App will not close when flagged to. 0: App closes immediately. 1: App can be closed. Progress data can be appended using WM_mkProgressCode() in the RETURN. It returns a value lower than -1, so it will refuse to close.
There's 2 types of closing however: Closing (as of setting a flag for the app to think about it closing) and Kill (forcibly end the process, regardless if it wants or not). This is so Task Manager can moderate the window manager properly.
Window arraysApp windows can use global values, but no longer have predefined arrays like in Midori OS, but you can create them yourself, as well as other ones. It's basically Midori's later array concept but more generalized. The main idea is that you "allocate" an array from the pool and it returns an array ID to later get the array name and use VAR() to read/write to it. The way I implement this allows you to get the first allocated array ID of the window using WM_1stArr(WID) and have the other associated array IDs inside that one, but global variables can hold them too. Example:
 IF ! WM_HasArray(WID) THEN
 '"Allocate" an integer array with 32 elements
 '0 - int, 1 - float, 2 - string
  ARRID% = WM_AllocArray(WID, 0, 32)
  IF ARRID%<0 THEN RETURN 0'No free array, will not continue
  ARRID% = WM_1stArr(WID)
 ARRN$ = WM_GetArr$(ARRID%)
 RETURN 1 'When signal sent, close immediately
Tooltips and Context Menus Showcase of a tooltip in the application menu. It's rendered on top of everything Context menus, makes a child window with these options and you can set it to change the parent windows's state or change a value in a windows's array for it to read and react to it.
Task Manager improvements Got around to finish it up... The memory diagram was updated to show "danger zones". SmileBASIC 3 is not forgiving when your low on memory, sometimes it just throws an out of memory error even if you're just storing a 4-letter string with around 1 MB "free". The colors should be obvious; green is all good, yellow is dangerous and red is death; the session will be killed and CYMOS will panic. Light mode works decently and: when hovering over an entry, it will show the number of milliseconds it took to run; the number is not updated often to not flicker all over. Windows should preferably be only taking 2-3 ms to run so you can squeeze around 4 apps in and it stays at solid 60FPS. If not, then it's not an issue since CYMOS is sorta good at handling inconsequent framerates and you can cap the framerate should your app be a bit complex. ;P
Session saving through shutdown tasksThis is probably not useful for text editors but is for more generic things, such as the API logger or my file system. CYMOS will not immediately shut down but ensure all apps are properly closed and all needed data has been saved. For these, you can interact with the logon UI to like show a progress meter or explain what the task is currently doing. Should a task not finish in time, i.e. it might be stuck, you can choose to cancel the shutdown, skip that task and move on or wait a bit more.
Function key integration Want to make function keys useful... I suck at describing things lol The 4th key gives it away... there's a hidden string in it but you'll have to wait :P The 5th key just shows/hides the keyboard, nothing special
App Switcher Self-explanatory, this is tied to the 4th function key.
Planned to add- A feature test, yes, no mock OS is truly one without a feature test of some kind. Here's 2 screenshots: This also shows the other thing I plan to add... - Ability to resize windows Yes, this is it. I doubt this will be used by many apps since you need to be careful that the window size may change. Hence why that will be an opt-in through the flags and you can configure the min/max size, as per usual.
Quite a bit, sorry for taking so long and to blast out so much but it's how it is, eh? It's definitely still in beta, I don't even have a package loader yet, but it already gives an idea as to how it works.
SpoilerThe package manager is going to be very complex. Want too do namespaces and quite a lot of sanity checks and restrictions...

I really suck at keeping CYMOS publically up-to-date, eh? Anyway, I've added some more stuff and a new beta release may be released in a bit.
WIP Desk Icons I'm working on adding the desk icons using the new DESKSVC% service. As you may see, it doesn't work at the moment but it shows already how CYMOS apps tend to work, they load things slowly so that apps can co-exist without long lag spikes.
Window buttons After god knows how long I scrambled to implement these, here we are. They are made out of sprites and they function via SPFUNC.
Taskbar improvements The way I previously added the taskbar caused weird moments when refreshing the screen. It would sometimes eat away other windows' sprites and the sprites were in a limbo state effectively. I remembered SPFUNC and am using it for function instead. I'm still puzzled how that previous taskbar caused issues exactly... If a task is scheduled to close but doesn't want to finish, you can kill the task right from the taskbar. Note that if the task does WM_DiscardClose you have to grab the task manager from Security Options to kill it.
Sound effects and BGM channels Windows can now allocate BGM channels for themselves. By default, the system service takes the last 2 channels for sound and music-like sounds respectively. Adding custom MML is also a thing windows can allocate for themselves. Yes, I go for a more locked down approach. You can't use the provided functions to write or play BGM that the window didn't allocate. Here's some sample code of it:
 WN$="Test window"
 WF%=WMFLG_BtnClose%OR WMFLG_BtnMin 'Yes, the window buttons are invoked with these flags. They can be changed while the app is running with WM_SetFlag.
  EAT WM_NewNamedBGM("My BGM","@9O4CDEFGAB<C /Although SB3 doesn't natively support in-MML comments, I added it in here just for this./") 'NewBGM would return the BGM index - 128
  IF WM_AllocBGM(WID)>=0 THEN 'It returns the channel to play stuff with
   WM_PlayBGM WM_GetBGM$("My BGM")
   'PlayBGM inherits "WID" from the window manager directly, I should probably do this for more things where you really shouldn't mess with other windows on
   'GetBGM$ scans the list for only sounds the window allocated.
 GPUTCHR SX+4,SY+4,"Hello there."
 GPUTCHR SX+4,SY+14,"I'm playing a sound."
 RETURN 1 'Close immediately when scheduled to
There's more commands to play either at different volume, do a volume sweep or even a stop timer, so the WM stops the sound for you. Of course, when the window is closed, all sound effects and channels allocated get free'd. The system sounds can still be played with WM_PlaySystem.
Explorer Finally, a file explorer. This is the CYX version. If you don't have CYX, the file lists are crafted but emulate how CYX makes directory listings so that when in the future, a task is invoked from explorer, it can refer to the selected file the same way. To simplify that, I make another service that handles files for tasks, since CYX simplifies it so much more and bypasses the nasty SAVE/RENAME/DELETE dialog.
Oh, and I do plan to simplify app devlopment a tiny bit by mirroring variables for slight Midori OS / SKKBAUI compatibility through a MidoriOSParity% toggle. The beta release will not yet have the package loader but all the other features I just mentioned here.