[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mouse cursor on MS-Windows. (revisited)
From: |
David PONCE |
Subject: |
Re: mouse cursor on MS-Windows. (revisited) |
Date: |
Tue, 03 Dec 2002 14:43:02 +0100 (MET) |
Hi All,
I submit you the attached patch to NT Emacs (HEAD) to display
different cursors, depending on mouse position.
This is a revisited patch from the original version posted by
"KOBAYASHI Yasuhiro" <address@hidden>. See message:
<http://mail.gnu.org/pipermail/emacs-devel/2002-September/012390.html>
The main differences are:
- Cursors are loaded only at frame creation in Fx_create_frame instead
of each time the cursor change. The Cursor type is actually a
cursor handle instead of a resource identifier. I think it is more
consistent.
- Cursors are loaded via the new function `w32_load_cursor' that try
first to load from application resources (defined in emacs.rc), then
from global shared predefined one. Thus it is possible to use
cursors specifically built for Emacs ;-) More important that allows
to provide a "hand" cursor for Windows 95 and NT for which a
predefined one does not exists. I added a sample hand.cur file in
the nt/icons directory (maybe using a nt/cursor directory would be
better?). Notice that I got this hand.cur from winhelp.exe.
Probably, for license reason, a specific version will be needed?
The patch includes some minor fixes too. You will find a change log
at end.
Hope it helps.
Sincerely,
David
------- Change log
* src/w32term.c (w32_encode_char): For DIM=1 charset, set
ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c
x_encode_char change by Kenichi Handa <address@hidden> on
2002-09-30.
(w32_draw_relief_rect): Declare all args.
(w32_define_cursor): New.
(note_mode_line_highlight)
(note_mouse_highlight)
(show_mouse_face)
(w32_initialize_display_info): Handle mouse cursor change.
* src/w32term.h (w32_output): Added `hand_cursor' member.
(WM_EMACS_SETCURSOR): New message.
* src/w32fns.c (Vx_hand_shape): New.
(w32_load_cursor): New.
(w32_init_class): Use it.
(w32_wnd_proc): Handle mouse cursor change message.
(Fx_create_frame): Initialize frame cursors.
(x_put_x_image): Declare all args.
* src/w32menu.c (digest_single_submenu): Declare all args.
* nt/emacs.rc (32649): Declare hand cursor resource.
* nt/icons/hand.cur: Hand cursor.
hand.cur
Description: image/icon
w32cursor.patch
Description: Text Data
- Re: mouse cursor on MS-Windows. (revisited),
David PONCE <=