[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patches to enhance ncurses mouse functionality.
From: |
Clive Nicolson |
Subject: |
Patches to enhance ncurses mouse functionality. |
Date: |
Wed, 30 May 2007 12:30:04 +1200 (NZST) |
I have some patches that enhance mouse functionality:
int slk_enclose(int y, int x);
The slk_enclose function tests whether a given pair of screen-relative
character-cell coordinates is enclosed by the slk window, returning
non-zero if it is and 0 otherwise. If slk label n encloses the
coordinates, n is returned otherwise -1 is returned. It is useful for
determining which slk label of the slk window enclose the location of a
mouse event.
For form_driver:
If the second argument is the KEY_MOUSE special key, the associated mouse
event is translated into one of the above pre-defined requests. Currently
only clicks in the user window (e.g. inside the form display area or the
decoration window) are handled. If you double-click a REQ_PREV_PAGE is
generated and if you triple-click a REQ_FIRST_FIELD is generated. If you
double-click a REQ_NEXT_PAGE is generated and if you triple-click a
REQ_LAST_FIELD is generated. If you click at an field inside the display
area of the form, the form cursor is positioned to that field. If you
double-click at a field, the form cursor is positioned to that field and
E_UNKNOWN_COMMAND is returned. This return value makes sense, because a
double click usually means that an field specific action should be
returned. Its exactly the purpose of this return value to signal that an
application specific command should be executed. If a translation into a
request was done, form_driver returns the result of this request. If you
clicked outside the user window or the mouse event couldn't`t be translated
into a form request an E_REQUEST_DENIED is returned.
Anyone interested in these?
Clive
- Patches to enhance ncurses mouse functionality.,
Clive Nicolson <=