[Y-devel] GUI design docs

Mikko Rantalainen mira at cc.jyu.fi
Wed Feb 25 15:35:26 GMT 2004


[Flying high... just try to follow my line of thought.]

Jay Sprenkle <cupycake_jay at yahoo.com> wrote:
> On focus and keystrokes:
> 
> I'm used to the windows method of sending keystrokes
> to the top window, versus the X method of sending them
> to the window the mouse cursor is over. I saw a
> suggestion that multiple pointing methods might
> be useful. The windows method works with that, but
> if you use the X method which mouse/pointing device
> cursor do you use?

I think the events should go to currently focused widget, no matter 
where it lives. If it wants to live two blocks above my screen's 
top-left corner and 100 miles to right, then it should be there, but 
if it's focused, the keyboard events should go to that. I think 
pointer (mouse) events should go to both focused widget and the one 
below the pointer - that way inactive windows can still do their 
pointer hover magic.

Now, the question is, how is user supposed to change focus? I like 
click-to-focus most but I know some people like it the other way. 
Perhaps the theme could take care of handling the focus so that one 
could change the behavior by changing the theme? On the other hand, 
I really like the IceWM's ability to change to looks but keep the 
behavior. How about having theme engine for widget looks and 
behavior engine for widget and focus behavior?

One more thing to consider: current PCs have USB connectors and you 
can attach, say, two keyboards and three mouses plus one tablet 
device. Say, in addition, we have multiple displays and two users. 
Wouldn't it be nice to be able to bind one mouse and one keyboard to 
one user that could use one of the displays to surf the web while 
the another user continued to work with another keyboard. I think it 
could be implemented by having a focus per keyboard and pointer 
would be used to change the focus for that keyboard only.

However, instead of requiring a keyboard, we should use virtual 
input devices. A virtual input device might be "implemented" with 
one keyboard, two mouses and one joystick. Logically that's a 
keyboard that has all the buttons of keyboard plus all the buttons 
of both two mice and all the buttons in the joystick. In addition to 
that, that virtual device also contains 2 (or more!) axis for both 
the mice and at least two axis for the joystick. And possibly one or 
more axis integrated in the keyboard. There should be a method to 
map some (one or more) of those axis to horizontal 2D pointer used 
to move "mouse cursor" and so on. For the Y, this input device has 
(say) total of 103+3+3+8 buttons and 3+3+4 axis. Some of the buttons 
generate "mouse button events" and some don't. Similarly, some of 
the axis generate "mouse cursor" movement and some don't. Each 
virtual input device like this would have a single focus in Y.

I think a virtual device should be able to output at least raw 
button events for every button, cursor movement for at least three 
dimensions, ideally for unlimited dimensions (user can map every 
axis to different dimension of every axis to the same dimension, and 
we don't know how many axis the virtual device might have) and 
character output for whatever character input method the user might 
be using. (I don't have a clue how, for example, Chinese could be 
written with a keyboard and how that looks to the OS/GUI.)

In short, Y should have some kind of support for more than two axis. 
I'd expect that in the future we'll have trackball on top of our 
mouse where we normally have a mouse wheel. Y should be able to map 
the trackball movement to window scrolling or for modifying Z-axis 
in 3d world and zooming with the another axis. Also, precision of 
more than a single pixel should be supported.

I'm not saying that Y must implement code for such features but that 
the APIs that we decide must be generic enough to not remove 
possibilities for future extensions.

And for heavens sake, don't make artificial limitations between 
mapping mouse actions as they were keyboard actions and wise versa. 
If your mouse has only two buttons but some application needs four, 
you should be able to use F11 and F12 for the missing mouse buttons 
if that's what you want.

> On Resizing controls:
> 
> I had envisioned a desktop built by inheritance.
> Being the optimization nut I was thinking you
> could build all the controls by inheriting from
> just two controls. A 'canvas' control that displays

That sounds simple, but I think we need to build some prototype 
applications to test it. I'm afraid that such a simple structure 
could cause some (yet unknown) problems for minor gain of seemingly 
simple structure.

-- 
Mikko




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved