I use a timer.

On Wed, Apr 22, 2020, 5:58 AM Antonio Scuri <antonio.sc...@gmail.com> wrote:

>   Do you use a timer or the idle callback to do that?
>
> Em qua., 22 de abr. de 2020 às 05:54, Milind Gupta <milind.gu...@gmail.com>
> escreveu:
>
>> I don't have control over the motion_cb or button_cb call backs since
>> they may change due to a selected operation. But if I want to display the
>> coordinates on the canvas of the mouse position independently then to query
>> the coordinates I use CURSORPOS and screenposition to determine it without
>> depending on the callbacks.
>>
>> On Tue, Apr 21, 2020 at 6:27 PM Antonio Scuri <antonio.sc...@gmail.com>
>> wrote:
>>
>>>   Hi,
>>>
>>>   I will have to do some tests here tomorrow. But the way to get mouse
>>> coordinates in canvas is using those callbacks...
>>>
>>>   What you are trying to do? Why you have to use CURSORPOS?
>>>
>>> Best,
>>> Scuri
>>>
>>>
>>> Em ter, 21 de abr de 2020 20:43, Milind Gupta <milind.gu...@gmail.com>
>>> escreveu:
>>>
>>>> Hi Antonio,
>>>>            I am using CURSORPOS to determine the mouse position on the
>>>> screen. I see that if I have a multi display setup as soon as my mouse goes
>>>> to the other display it returns nil. There is no error message.  Is there
>>>> any particular way to handle multiple displays.
>>>>            Also is there a way to directly get the mouse position in
>>>> terms of the canvas coordinate system. Right now I determine the screen
>>>> position of the mouse and then find the canvas position using
>>>> SCREENPOSITION attribute and then take the difference. Basically I want to
>>>> directly access the x,y coordinates without depending on the motion_cb or
>>>> button_cb.
>>>>
>>>> Thanks,
>>>> Milind
>>>> _______________________________________________
>>>> Iup-users mailing list
>>>> Iup-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>>
>>> _______________________________________________
>>> Iup-users mailing list
>>> Iup-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>
>> _______________________________________________
>> Iup-users mailing list
>> Iup-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to