-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1500 2010/01/30 23:48:39 tom Exp $
+-- $Id: NEWS,v 1.1503 2010/02/06 22:16:30 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20100206
+ + update mrxvt terminfo entry -TD
+ + modify win_driver.c to support mouse single-clicks.
+ + correct name for termlib in ncurses*-config, e.g., if it is renamed
+ to provide a single file for ncurses/ncursesw libraries (patch by
+ Miroslav Lichvar).
+
20100130
+ use vfork in test/ditto.c if available (request by Mike Frysinger).
+ miscellaneous cleanup of manpages.
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.744 2010/01/30 18:27:04 tom Exp $
+# $Id: dist.mk,v 1.745 2010/02/06 15:00:38 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 7
-NCURSES_PATCH = 20100130
+NCURSES_PATCH = 20100206
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
#!@SHELL@
-# $Id: gen-pkgconfig.in,v 1.7 2009/03/14 20:37:54 tom Exp $
+# $Id: gen-pkgconfig.in,v 1.8 2010/02/06 22:12:07 Miroslav.Lichvar Exp $
##############################################################################
-# Copyright (c) 2009 Free Software Foundation, Inc. #
+# Copyright (c) 2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
FORM_NAME=form # @FORM_NAME@
CXX_NAME=ncurses++ # @CXX_NAME@
DFT_DEP_SUFFIX=@DFT_DEP_SUFFIX@
+TINFO_ARG_SUFFIX=@TINFO_ARG_SUFFIX@
CXX_LIB_SUFFIX=@CXX_LIB_SUFFIX@
prefix="@prefix@"
show_libdir='@libdir@'
MAIN_LIBRARY="${LIB_NAME}@DFT_ARG_SUFFIX@"
-SUB_LIBRARY="${TINFO_NAME}@DFT_ARG_SUFFIX@"
+SUB_LIBRARY="${TINFO_ARG_SUFFIX}"
PANEL_LIBRARY="${PANEL_NAME}@DFT_ARG_SUFFIX@"
MENU_LIBRARY="${MENU_NAME}@DFT_ARG_SUFFIX@"
FORM_LIBRARY="${FORM_NAME}@DFT_ARG_SUFFIX@"
SUB_LIBRARY_REQ=${SUB_LIBRARY}
-TINFO_NAME_REQ=${TINFO_NAME}
if test $TINFO_NAME = $LIB_NAME ; then
SUB_LIBRARY_REQ=
- TINFO_NAME_REQ=
fi
for lib in ../lib/*
desc="ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@"
if test $name = $MAIN_LIBRARY ; then
- reqs=$TINFO_NAME_REQ
+ reqs=$SUB_LIBRARY_REQ
desc="$desc library"
elif test $name = $SUB_LIBRARY ; then
reqs=
#!@SHELL@
-# $Id: ncurses-config.in,v 1.23 2009/03/14 19:20:57 Charles.Wilson Exp $
+# $Id: ncurses-config.in,v 1.24 2010/02/06 22:12:16 Miroslav.Lichvar Exp $
##############################################################################
-# Copyright (c) 2006-2007,2009 Free Software Foundation, Inc. #
+# Copyright (c) 2006-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
mandir="@mandir@"
THIS="@LIB_NAME@@DFT_ARG_SUFFIX@"
-TINFO_LIB="@TINFO_NAME@@DFT_ARG_SUFFIX@"
+TINFO_LIB="@TINFO_ARG_SUFFIX@"
LANG=C; export LANG
LANGUAGE=C; export LANGUAGE
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
-# $Revision: 1.358 $
-# $Date: 2009/12/26 19:36:05 $
+# $Revision: 1.359 $
+# $Date: 2010/02/06 20:55:33 $
#
# The original header is preserved below for reference. It is noted that there
# is a "newer" version which differs in some cosmetic details (but actually
rxvt-16color|xterm with 16 colors like aixterm,
ncv#32, use=ibm+16color, use=rxvt,
-# mrxvt 0.5.3
+# mrxvt 0.5.4
#
# mrxvt is based on rxvt 2.7.11, but has by default XTERM_FKEYS defined, which
# makes its function-keys different from other flavors of rxvt -TD
mrxvt|multitabbed rxvt,
- use=xterm+pcc2, use=xterm+r6f2, use=rxvt,
+ kEND=\E[8;2~, kHOM=\E[7;2~, kcub1=\E[D, kcud1=\E[B,
+ kcuf1=\E[C, kcuu1=\E[A, kend=\E[8~, khome=\E[7~,
+ kEND3=\E[8;3~, kEND4=\E[8;4~, kEND5=\E[8;5~,
+ kEND6=\E[8;6~, kEND7=\E[8;7~, kHOM3=\E[7;3~,
+ kHOM4=\E[7;4~, kHOM5=\E[7;5~, kHOM6=\E[7;6~,
+ kHOM7=\E[7;7~, use=xterm+r6f2, use=xterm+pcfkeys,
+ use=rxvt,
+
+mrxvt-256color|multitabbed rxvt with 256 colors,
+ use=xterm+256color, use=mrxvt,
# From: Michael Jennings <mej@valinux.com>
#
# * add bterm (bogl 0.1.18) -TD
# * minor fix to rxvt+pcfkeys -TD
#
+# 2010-02-06
+# * update mrxvt to 0.5.4, add mrxvt-256color -TD
+#
# The following sets edit modes for GNU EMACS.
# Local Variables:
# fill-prefix:"\t"
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.109 2009/10/24 21:58:34 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.110 2010/02/06 18:39:16 tom Exp $")
#include <fifo_defs.h>
ch = KEY_MOUSE;
n = 1;
} else
+#endif
+#ifdef USE_TERM_DRIVER
+ if ((sp->_mouse_type == M_TERM_DRIVER)
+ && (sp->_drv_mouse_head < sp->_drv_mouse_tail)) {
+ sp->_mouse_event(sp);
+ ch = KEY_MOUSE;
+ n = 1;
+ } else
#endif
{ /* Can block... */
#ifdef USE_TERM_DRIVER
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.111 2010/01/02 21:06:52 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.112 2010/02/06 19:54:08 tom Exp $")
#include <tic.h>
* fifo_push() in lib_getch.c
*/
static bool
-_nc_mouse_event(SCREEN *sp GCC_UNUSED)
+_nc_mouse_event(SCREEN *sp)
{
MEVENT *eventp = sp->_mouse_eventp;
bool result = FALSE;
break;
#endif /* USE_SYSMOUSE */
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ while (sp->_drv_mouse_head < sp->_drv_mouse_tail) {
+ *eventp = sp->_drv_mouse_fifo[sp->_drv_mouse_head];
+
+ /*
+ * Point the fifo-head to the next possible location. If there
+ * are none, reset the indices.
+ */
+ sp->_drv_mouse_head += 1;
+ if (sp->_drv_mouse_head == sp->_drv_mouse_tail) {
+ sp->_drv_mouse_tail = 0;
+ sp->_drv_mouse_head = 0;
+ }
+
+ /* bump the next-free pointer into the circular list */
+ sp->_mouse_eventp = eventp = NEXT(eventp);
+ result = TRUE;
+ }
+ break;
+#endif
+
case M_NONE:
break;
}
signal(SIGUSR2, handle_sysmouse);
sp->_mouse_active = TRUE;
break;
+#endif
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ sp->_mouse_active = TRUE;
+ break;
#endif
case M_NONE:
return;
signal(SIGUSR2, SIG_IGN);
sp->_mouse_active = FALSE;
break;
+#endif
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ sp->_mouse_active = FALSE;
+ break;
#endif
case M_NONE:
return;
case M_SYSMOUSE:
mouse_activate(sp, FALSE);
break;
+#endif
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ mouse_activate(sp, FALSE);
+ break;
#endif
case M_NONE:
break;
mouse_activate(sp, TRUE);
break;
#endif
+
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ mouse_activate(sp, TRUE);
+ break;
+#endif
+
case M_NONE:
break;
}
/*
- * $Id: curses.priv.h,v 1.450 2010/01/23 22:05:30 tom Exp $
+ * $Id: curses.priv.h,v 1.451 2010/02/06 19:15:52 tom Exp $
*
* curses.priv.h
*
#if USE_SYSMOUSE
,M_SYSMOUSE /* FreeBSD sysmouse on console */
#endif
+#ifdef USE_TERM_DRIVER
+ ,M_TERM_DRIVER /* Win32 console, etc */
+#endif
} MouseType;
/*
int _sysmouse_new_buttons;
#endif
+#ifdef USE_TERM_DRIVER
+ MEVENT _drv_mouse_fifo[FIFO_SIZE];
+ int _drv_mouse_head;
+ int _drv_mouse_tail;
+ int _drv_mouse_old_buttons;
+ int _drv_mouse_new_buttons;
+#endif
/*
* This supports automatic resizing
*/
* *
****************************************************************************/
+/*
+ * TODO - GetMousePos(POINT * result) from ntconio.c
+ * TODO - implement nodelay
+ */
+
#include <curses.priv.h>
-MODULE_ID("$Id: win_driver.c,v 1.5 2010/01/16 22:42:30 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.6 2010/02/06 19:55:44 tom Exp $")
#define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
else
dwFlag &= ~ENABLE_PROCESSED_INPUT;
- /* we disable that for now to focus on keyboard. */
- dwFlag &= ~ENABLE_MOUSE_INPUT;
+ dwFlag |= ENABLE_MOUSE_INPUT;
buf->c_iflag = iflag;
buf->c_lflag = lflag;
AssertTCB();
SetSP();
+
+ sp->_mouse_type = M_TERM_DRIVER;
}
static int
return code;
}
+#define BUTTON_MASK (FROM_LEFT_1ST_BUTTON_PRESSED | \
+ FROM_LEFT_2ND_BUTTON_PRESSED | \
+ FROM_LEFT_3RD_BUTTON_PRESSED)
+
+static bool
+handle_mouse(SCREEN *sp, MOUSE_EVENT_RECORD mer)
+{
+ MEVENT work;
+ bool result = FALSE;
+
+ sp->_drv_mouse_old_buttons = sp->_drv_mouse_new_buttons;
+ sp->_drv_mouse_new_buttons = mer.dwButtonState & BUTTON_MASK;
+
+ /*
+ * We're only interested if the button is pressed or released.
+ * FIXME: implement continuous event-tracking.
+ */
+ if (sp->_drv_mouse_new_buttons != sp->_drv_mouse_old_buttons) {
+
+ memset(&work, 0, sizeof(work));
+
+ if (sp->_drv_mouse_new_buttons) {
+
+ if (sp->_drv_mouse_new_buttons & FROM_LEFT_1ST_BUTTON_PRESSED)
+ work.bstate |= BUTTON1_PRESSED;
+ if (sp->_drv_mouse_new_buttons & FROM_LEFT_2ND_BUTTON_PRESSED)
+ work.bstate |= BUTTON2_PRESSED;
+ if (sp->_drv_mouse_new_buttons & FROM_LEFT_3RD_BUTTON_PRESSED)
+ work.bstate |= BUTTON3_PRESSED;
+ if (sp->_drv_mouse_new_buttons & FROM_LEFT_4TH_BUTTON_PRESSED)
+ work.bstate |= BUTTON4_PRESSED;
+
+ } else {
+
+ if (sp->_drv_mouse_old_buttons & FROM_LEFT_1ST_BUTTON_PRESSED)
+ work.bstate |= BUTTON1_RELEASED;
+ if (sp->_drv_mouse_old_buttons & FROM_LEFT_2ND_BUTTON_PRESSED)
+ work.bstate |= BUTTON2_RELEASED;
+ if (sp->_drv_mouse_old_buttons & FROM_LEFT_3RD_BUTTON_PRESSED)
+ work.bstate |= BUTTON3_RELEASED;
+ if (sp->_drv_mouse_old_buttons & FROM_LEFT_4TH_BUTTON_PRESSED)
+ work.bstate |= BUTTON4_RELEASED;
+
+ result = TRUE;
+ }
+
+ work.x = mer.dwMousePosition.X;
+ work.y = mer.dwMousePosition.Y;
+
+ sp->_drv_mouse_fifo[sp->_drv_mouse_tail] = work;
+ sp->_drv_mouse_tail += 1;
+ }
+
+ return result;
+}
+
static int
drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
{
memset(&inp, 0, sizeof(inp));
+ T((T_CALLED("drv_read(%p)"), TCB));
while ((b = ReadConsoleInput(TCB->inp, &inp, 1, &nRead))) {
if (b && nRead > 0) {
if (inp.EventType == KEY_EVENT) {
} else { /* *buf != 0 */
break;
}
- } else if (0 && inp.EventType == MOUSE_EVENT) {
- *buf = KEY_MOUSE;
- break;
+ } else if (inp.EventType == MOUSE_EVENT) {
+ if (handle_mouse(sp, inp.Event.MouseEvent)) {
+ *buf = KEY_MOUSE;
+ break;
+ }
}
continue;
}
}
- return n;
+ returnCode(n);
}
static int