[Y-devel] yEye

Mark Thomas mark at www.y-windows.org
Tue Mar 9 00:30:23 GMT 2004


[this missed the list first time round...]

On Mon, 8 Mar 2004, Trent Lloyd wrote:

> Some browsers let you middle click so that moving the mouse up and down
> moves the page up and down
> in that case if the mouse is outside the window (and the window is
> active...) it still wants to know whwere the mouse is.
>

For that there are facilities (already implemented, too) to grab the mouse
pointer so you get its events even when the pointer is outside your
bounding box.

Still, there will need to be some way of getting to the pointer position
and getting updated information.

My original intention was for this to be done using the "special"
interface, i.e. YMO_SPECIAL_OPERATION pointer getPosition

The more I think about this, the more I realise that the special interface
is probably not that necessary.  I think there might be a better way of
doing this.

Consider the three things we have that currently use or might use the
special interface:

  viewports
  modules
  pointer[s]

These might be better represented by client-viewable remote objects.  This
means they can have methods, properties and signals.  To find an object
you's need some other lookup mechanism, perhaps as a static method on the
class:

=> YMO_FIND_CLASS          Server/Viewport
<= YMO_FOUND_CLASS    x                               (x == class id)
=> YMO_INVOKE_METHOD  x 0  listViewports
<= YMO_METHOD_RETURNS x 0  0,"SDL Video Driver",y     (y == object id)
=> YMO_SET_PROPERTY   x y  resolution "1024x768-60"

To subscribe to pointer notifications you would do:

=> YMO_FIND_CLASS             Server/Pointer
<= YMO_FOUND=CLASS       x
=> YMO_INVOKE_METHOD     x 0  getMainPointer
<= YMO_METHOD_RETURNS    x 0  y
=> YMO_SUBSCRIBE_SIGNAL  x y  motion

which could be wrapped up in the API as:

SigC::Signal2<void,int,int>  Y::Pointer::getMainPointer ().motion

Note these are OBJECTS not WIDGETS.  Once we have things like this, the
distinction between the two becomes clear.  Something tells me my brain
thought of this two years before I did.

Thoughts?

Regards,

  Mark.
-- 
|| Mark Thomas
|| efaref.net
||
|| What is a "free gift?" Aren't all gifts free?



More information about the Y-devel mailing list









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