I think the idea is a good one and should be implemented - lets make sure it is as useful as possible to as many people as possible.
I agree. I appreciate you bringing up the possible problems. I think we can work them out and still be able to hide everything all at once. That's really what I want set_chdk_osd() to do.
Seriously? You want to implement a change that requires people to guess where to touch the screen?
I want the function to hide everything, including the touch screen buttons, so you can see the complete image underneath. But if guessing where hidden buttons are won't work, you can just make the buttons visible when you touch the screen the first time. This is what happens on my smart phone when I'm viewing a picture while the buttons are hidden. It works well. I'm not sure exactly how to implement it, but it would be something like this:
ixus 310, keyboard.c
// Called from hooked touch panel task (boot.c)
// Return 0 to allow touch event to pass onto firmware, 1 to block event from firmware.
int chdk_process_touch()
{
//ts_check_cnt++;
// If in canon menu, let the firmware have all the touch events.
if (!show_virtual_buttons()) return 0;
if(camera_info.state.osd_off)
{
camera_info.state.osd_off=0; //turn it back on
return 1; //ignore this panel touch. (may need to clear current touch too?)
}
In my view the file_browser and textbox U/I are not OSD elements and should not be turned off. This would also mean a script writer doesn't have to remember to turn everything back on in order to use these functions.
Just set camera_info.state.osd_off=0 when the file brower or text box starts. That automatically makes it visible.
I'm aware that they pause the script, so you'd have to add code to them to hide and restore the OSD if you want to be able to do that. How about using "shoot_half"? Pressing "shoot_half" hides everything, and releasing it restores it.
. . . I can also envisage a script writer wanting to show the console without showing the ALT and script name text. Separating control of these elements makes sense to me.
I'm not sure anyone would use that capability, but a separate "hide_alt_line" function would be a better way to do this. I haven't used MD, but wouldn't it be more useful to be able to hide all overlays so you can see what's happening on the screen, like a video monitor? You could toggle the overlays back on if you want to see the motion detect areas.
I'm doing something similar with my time lapse script. I have 4 metering areas. When the user presses "right", I Lua draw the 4 metering area rectangles. The active area is red or green, and the inactive areas are yellow. But most of the time when I'm doing a time lapse, I hide these areas so I can see how the pictures look without the distraction.
The way the patch is now, I can toggle everything on and off with one call. If you split it into 3 calls, toggling everything becomes more complicated, i.e. 3 function calls, a state variable in the script, and an if then else statement.