diff -urN --exclude CVS microwin-old/src/Configs/config.tuxscreen microwin-good/src/Configs/config.tuxscreen --- microwin-old/src/Configs/config.tuxscreen Wed Dec 31 17:00:00 1969 +++ microwin-good/src/Configs/config.tuxscreen Mon Oct 15 16:27:24 2001 @@ -0,0 +1,287 @@ +#################################################################### +# Microwindows and Nano-X configuration file +# +# This package can be configured to run on Linux (MIPS, ARM, x86) +# UNIX, ELKS, DJGPP, or RTEMS. +# On Linux, we've got drivers for Linux 2.x framebuffers, X11, or, +# svgalib for VGA hardware. +# In addition, a gpm or direct serial mouse driver can be configured. +# On ELKS, the bios screen driver and serial mouse driver are always used. +# +# Either Microwindows and/or Nano-X can be built. +# Microwindows and Nano-X have several demos. +# +# For MSDOS makes, see mcmwin.mak and mcnanox.mak +#################################################################### + +#################################################################### +# +# build target platform +# +# Valid ARCH values are: +# +# LINUX-NATIVE +# LINUX-ARM +# LINUX-MIPS +# SOLARIS +# RTEMS +# DJGPP +# ELKS +# +# note: ELKS can't build client/server nano-X, nor widget lib +# +#################################################################### +ARCH = LINUX-ARM +ARMTOOLSPREFIX = arm-uclibc- +MIPSTOOLSPREFIX = mipsel-linux- +RTEMSTOOLSPREFIX = i386-rtemself- + +#################################################################### +# +# Compiling options +# +#################################################################### +OPTIMIZE = Y +DEBUG = N +VERBOSE = N + +#################################################################### +# +# Libraries to build: microwin, nano-X, nanowidget, object frameworks +# +#################################################################### +MICROWIN = N +NANOX = Y +SHAREDLIBS = Y +NWIDGET = N +OBJFRAMEWORK = N + + +#################################################################### +# +# Demos to build +# +#################################################################### +MICROWINDEMO = N +NANOXDEMO = Y + +#################################################################### +# +# Applications to build +# +#################################################################### +NANOWM = Y + +#################################################################### +# +# The pixeltype of the native hardware or underlying graphics library. +# This definition defines the PIXELVAL to be 32, 16 or 8 bits wide. +# If using Linux framebuffer, set to MWPF_TRUECOLOR0888, and use fbset. +# It also enables GdArea/GrArea for this particular pixel packing format. +# +# define MWPF_PALETTE /* pixel is packed 8 bits 1, 4 or 8 pal index*/ +# define MWPF_TRUECOLOR0888 /* pixel is packed 32 bits 8/8/8 truecolor*/ +# define MWPF_TRUECOLOR888 /* pixel is packed 24 bits 8/8/8 truecolor*/ +# define MWPF_TRUECOLOR565 /* pixel is packed 16 bits 5/6/5 truecolor*/ +# define MWPF_TRUECOLOR332 /* pixel is packed 8 bits 3/3/2 truecolor*/ +# +#################################################################### +SCREEN_PIXTYPE = MWPF_TRUECOLOR0888 + +#################################################################### +# +# NanoX: Put Y to the following line to link the nano-X application +# with the server. This is required for ELKS, if no network is present, +# or for speed or debugging. This affects the nano-X server only. +# +#################################################################### +LINK_APP_INTO_SERVER = N + +#################################################################### +# +# File I/O support +# Supporting either below drags in libc stdio, which may not be wanted +# +#################################################################### +HAVE_FILEIO = Y + +#################################################################### +# BMP, GIF reading support +#################################################################### +HAVE_BMP_SUPPORT = Y +HAVE_GIF_SUPPORT = Y +HAVE_PNM_SUPPORT = Y +HAVE_XPM_SUPPORT = Y + +#################################################################### +# JPEG support through libjpeg, see README.txt in contrib/jpeg +#################################################################### +HAVE_JPEG_SUPPORT = N +INCJPEG = . +LIBJPEG = /usr/lib/libjpeg.a + +#################################################################### +# PNG support via libpng and libz +#################################################################### +HAVE_PNG_SUPPORT = N +INCPNG = . +LIBPNG = /usr/lib/libpng.a +LIBZ = /usr/lib/libz.a + +#################################################################### +# T1 adobe type1 font support thru t1lib +#################################################################### +HAVE_T1LIB_SUPPORT = N +INCT1LIB = /usr/include +LIBT1LIB = /usr/lib/libt1.a + +#################################################################### +# TrueType font support thru FreeType +#################################################################### +HAVE_FREETYPE_SUPPORT = N +INCFTLIB = /usr/include +LIBFTLIB = /usr/lib/libttf.so + +#################################################################### +# Shared memory support for Nano-X client/server protocol speedup +#################################################################### +HAVE_SHAREDMEM_SUPPORT = N + +#################################################################### +# Chinese Han Zi Ku font support +#################################################################### +HAVE_HZK_SUPPORT = N +HZK_FONT_DIR = "fonts/chinese" + +#################################################################### +# Chinese GB2312 compiled in font support (gb2312font.c) +#################################################################### +HAVE_GB2312_SUPPORT = N + +#################################################################### +# +# Window move algorithms for Microwindows +# Change for tradeoff between cpu speed and looks +# ERASEMOVE repaints only backgrounds while window dragging, quicker. +# Otherwise an XOR redraw is used for window moves only after button up, +# quickest (should set for ELKS) +# UPDATEREGIONS paints in update clipping region only for better look and feel +# +#################################################################### +ERASEMOVE = Y +UPDATEREGIONS = Y + +#################################################################### +# +# Use MS fonts (default no) +# +#################################################################### +HAVEMSFONTS = N + +#################################################################### +# +# Link with Gray Palette (valid only for 4bpp modes) +# +#################################################################### +GRAYPALETTE = N + +#################################################################### +# +# If the platform is running UNIX, Linux or RTEMS... +# +#################################################################### +ifneq ($(ARCH), ELKS) + +# X Window screen, mouse and kbd drivers +X11 = N + +ifeq ($(X11), Y) +# predefined model or select screen width, height, depth(palette mode only) +SCREEN_E15 = N +SCREEN_WIDTH = 640 +SCREEN_HEIGHT = 480 +SCREEN_DEPTH = 4 + +else + +# framebuffer screen driver (linear and/or vga 4 planes) +# set VTSWITCH to include virtual terminal switch code +# set PORTRAIT_MODE to L or R for left or right orientation +FRAMEBUFFER = Y +FBVGA = N +VTSWITCH = Y +PORTRAIT_MODE = N + +# svgalib screen driver +VGALIB = N + +# direct VGA hardware access screen driver +HWVGA = N + +#################################################################### +# Mouse or touch screen driver +# TPMOUSE for Linux-VR and Embedded Planet +# ADSMOUSE for ADS Graphics Client +# IPAQMOUSE for Compaq iPAQ +#################################################################### +GPMMOUSE = N +SERMOUSE = N +TPMOUSE = N +ADSMOUSE = N +ASSABETMOUSE = Y +IPAQMOUSE = N +NOMOUSE = N + +# keyboard or null kbd driver +SCANKBD = Y +TTYKBD = N +NOKBD = N + +endif + +#################################################################### +# +# If the platform is a LINUX-ARM box .... +# +#################################################################### +ifeq ($(ARCH), LINUX-ARM) + +# If 4bpp driver with arm SA1100 LCD controller is used ... +SA1100_LCD_LTLEND = N + +endif + + +#################################################################### +# +# If the platform is a RTEMS box .... +# +#################################################################### +ifeq ($(ARCH), RTEMS) + +# Location & BSP information of the RTEMS build +RTEMS_BUILD = /tools/build-i386-elf-rtems +RTEMS_BSP = pc386 +LINK_APP_INTO_SERVER = Y + +endif + +endif + +#################################################################### +# +# If the platform is an ELKS box ... +# +#################################################################### +ifeq ($(ARCH), ELKS) + +# Higher speed asm driver, c driver of hercules screen driver +ASMVGADRIVER = Y +CVGADRIVER = N +HERCDRIVER = N +DBGDRIVER = N + +# Mouse support +SERMOUSE = Y + +endif diff -urN --exclude CVS microwin-old/src/demos/nanox/Makefile microwin-good/src/demos/nanox/Makefile --- microwin-old/src/demos/nanox/Makefile Thu Jun 21 00:32:40 2001 +++ microwin-good/src/demos/nanox/Makefile Mon Oct 15 16:33:27 2001 @@ -154,7 +154,7 @@ $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) $(TOP)/bin/nsaver: nsaver.o $($NANOXCLIENTLIBS) $(TOP)/config - $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ -lm $(LD_NANOXCLIENTLIBS) $(TOP)/bin/getselection: getselection.o $($NANOXCLIENTLIBS) $(TOP)/config $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) diff -urN --exclude CVS microwin-old/src/demos/nxroach/Makefile microwin-good/src/demos/nxroach/Makefile --- microwin-old/src/demos/nxroach/Makefile Thu Jun 21 00:32:40 2001 +++ microwin-good/src/demos/nxroach/Makefile Mon Oct 15 16:32:48 2001 @@ -41,8 +41,8 @@ ifeq ($(SHAREDLIBS), Y) $(TOP)/bin/nxroach: $(OBJS) $(NANOXCLIENTLIBS) $(TOP)/config - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(CCNANOXCLIENTLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ -lm $(CCNANOXCLIENTLIBS) else $(TOP)/bin/nxroach: $(OBJS) $(NANOXCLIENTLIBS) $(TOP)/config - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ -lm $(NANOXCLIENTLIBS) endif diff -urN --exclude CVS microwin-old/src/drivers/Makefile microwin-good/src/drivers/Makefile --- microwin-old/src/drivers/Makefile Thu Jun 21 00:32:40 2001 +++ microwin-good/src/drivers/Makefile Mon Oct 15 15:41:38 2001 @@ -29,7 +29,7 @@ # If you want to create a library with the objects files, define the name here LIBNAME = libmwdrivers.a -LIBNAMESO = libmwdrivers.so +#LIBNAMESO = libmwdrivers.so # List of objects to compile @@ -167,6 +167,12 @@ endif ifeq ($(ADSMOUSE), Y) +CFLAGS += -DPLATFORM_GRAPHICSCLIENT +OBJS += mou_ads.o +endif + +ifeq ($(ASSABETMOUSE), Y) +CFLAGS += -DPLATFORM_ASSABET OBJS += mou_ads.o endif diff -urN --exclude CVS microwin-old/src/drivers/kbd_ttyscan.c microwin-good/src/drivers/kbd_ttyscan.c --- microwin-old/src/drivers/kbd_ttyscan.c Wed Jul 4 14:22:09 2001 +++ microwin-good/src/drivers/kbd_ttyscan.c Mon Oct 15 15:42:56 2001 @@ -17,7 +17,7 @@ #include "device.h" #include "fb.h" -#define KEYBOARD "/dev/tty" /* console kbd to open*/ +#define KEYBOARD "/dev/tty1" /* console kbd to open*/ static int TTY_Open(KBDDEVICE *pkd); static void TTY_Close(void); @@ -71,8 +71,8 @@ MWKEY_LEFT, MWKEY_RIGHT, MWKEY_END, MWKEY_DOWN, MWKEY_PAGEDOWN, /* 105*/ MWKEY_INSERT, MWKEY_DELETE, MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN, /* 110*/ MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_PAUSE, /* 115*/ -MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN, /* 120*/ -MWKEY_LMETA, MWKEY_RMETA, MWKEY_MENU /* 125*/ +MWKEY_SCREENP, MWKEY_SCREENN,MWKEY_UNKNOWN,MWKEY_UNKNOWN,MWKEY_UNKNOWN, /* 120*/ +MWKEY_LMETA, MWKEY_RMETA, MWKEY_MENU, /* 125*/ }; static MWBOOL UpdateKeyState(int pressed, MWKEY mwkey); diff -urN --exclude CVS microwin-old/src/drivers/mou_ads.c microwin-good/src/drivers/mou_ads.c --- microwin-old/src/drivers/mou_ads.c Thu Jun 21 00:32:41 2001 +++ microwin-good/src/drivers/mou_ads.c Mon Oct 15 15:43:41 2001 @@ -17,6 +17,8 @@ /* file descriptor for touch panel */ static int pd_fd = -1; +#define DEVICE "/dev/ucb1200-ts" + /* Hack extern to used when hiding the mouse cursor * There needs to be a better way to do this */ @@ -29,7 +31,7 @@ * Return the fd if successful, or negative if unsuccessful. */ - pd_fd = open("/dev/ts", O_NONBLOCK); + pd_fd = open(DEVICE, O_NONBLOCK); if (pd_fd < 0) { EPRINTF("Error %d opening touch panel\n", errno); return -1; @@ -68,27 +70,28 @@ static int PD_Read(MWCOORD *px, MWCOORD *py, MWCOORD *pz, int *pb) { /* read a data point */ - short data[3]; + short data[4]; int bytes_read; - - bytes_read = read(pd_fd, data, sizeof(data)); - - if (bytes_read != sizeof(data)) { - if (errno == EINTR || errno == EAGAIN) - return 0; - /* - * kernel driver bug: select returns read available, - * but read returns -1 - * we return 0 here to avoid GsError above - */ - /*return -1;*/ - return 0; + + bytes_read = read(pd_fd, data, 4 * sizeof(short)); + + if (bytes_read != (4 * sizeof(short))) { + if (errno == EINTR || errno == EAGAIN) + return 0; + + /* + * kernel driver bug: select returns read available, + * but read returns -1 + * we return 0 here to avoid GsError above + */ + /*return -1;*/ + return 0; } + + *px = (MWCOORD)data[1]; + *py = (MWCOORD)data[2]; - *px = (MWCOORD)data[0]; - *py = (MWCOORD)data[1]; - - *pb = (data[2]>0?MWBUTTON_L:0); + *pb = (data[0]>0?MWBUTTON_L:0); *pz = 0; if((*px == -1 || *py == -1) && *pb >= 0) diff -urN --exclude CVS microwin-old/src/engine/Makefile microwin-good/src/engine/Makefile --- microwin-old/src/engine/Makefile Thu Sep 6 11:11:10 2001 +++ microwin-good/src/engine/Makefile Mon Oct 15 15:46:57 2001 @@ -23,7 +23,7 @@ # If you want to create a library with the objects files, define the name here LIBNAME = libmwengine.a -LIBNAMESO = libmwengine.so +#LIBNAMESO = libmwengine.so # List of objects to compile OBJS = devopen.o devdraw.o devfont.o devmouse.o devkbd.o devclip.o devrgn.o \ diff -urN --exclude CVS microwin-old/src/fonts/Makefile microwin-good/src/fonts/Makefile --- microwin-old/src/fonts/Makefile Wed Jul 4 13:47:13 2001 +++ microwin-good/src/fonts/Makefile Mon Oct 15 15:58:35 2001 @@ -28,7 +28,7 @@ # If you want to create a library with the objects files, define the name here LIBNAME = libmwfonts.a -LIBNAMESO = libmwfonts.so +#LIBNAMESO = libmwfonts.so # List of objects to compile OBJS = helvB10.o helvB12.o helvR10.o symbol.o rom8x16.o rom8x8.o\ diff -urN --exclude CVS microwin-old/src/include/mwtypes.h microwin-good/src/include/mwtypes.h --- microwin-old/src/include/mwtypes.h Wed Sep 26 09:31:51 2001 +++ microwin-good/src/include/mwtypes.h Mon Oct 15 16:30:30 2001 @@ -586,6 +586,10 @@ #define MWKEY_APP2 0xF849 #define MWKEY_LAST 0xF849 +/* Tuxscreen keys */ +#define MWKEY_SCREENP 0xF84A +#define MWKEY_SCREENN 0xF84B + /* Keyboard state modifiers*/ typedef unsigned int MWKEYMOD; diff -urN --exclude CVS microwin-old/src/include/nano-X.h microwin-good/src/include/nano-X.h --- microwin-old/src/include/nano-X.h Wed Sep 26 09:31:51 2001 +++ microwin-good/src/include/nano-X.h Mon Oct 15 15:55:11 2001 @@ -268,6 +268,7 @@ #define GR_EVENT_TYPE_SELECTION_CHANGED 20 #define GR_EVENT_TYPE_TIMER 21 #define GR_EVENT_TYPE_PORTRAIT_CHANGED 22 +#define GR_EVENT_TYPE_BUTTON_LONG_CLICK 23 /* Event masks */ #define GR_EVENTMASK(n) (((GR_EVENT_MASK) 1) << (n)) @@ -296,6 +297,7 @@ #define GR_EVENT_MASK_SELECTION_CHANGED GR_EVENTMASK(GR_EVENT_TYPE_SELECTION_CHANGED) #define GR_EVENT_MASK_TIMER GR_EVENTMASK(GR_EVENT_TYPE_TIMER) #define GR_EVENT_MASK_PORTRAIT_CHANGED GR_EVENTMASK(GR_EVENT_TYPE_PORTRAIT_CHANGED) +#define GR_EVENT_MASK_BUTTON_LONG_CLICK GR_EVENTMASK(GR_EVENT_TYPE_BUTTON_LONG_CLICK) #define GR_EVENT_MASK_ALL ((GR_EVENT_MASK) -1L) /* update event types */ diff -urN --exclude CVS microwin-old/src/mwin/Makefile microwin-good/src/mwin/Makefile --- microwin-old/src/mwin/Makefile Thu Jun 21 00:32:41 2001 +++ microwin-good/src/mwin/Makefile Mon Oct 15 15:58:57 2001 @@ -37,7 +37,7 @@ # If you want to create a library with the objects files, define the name here LIBNAME = libmwin.a -LIBNAMESO = libmwin.so +#LIBNAMESO = libmwin.so # List of objects to compile OBJS = winmain.o winuser.o wingdi.o winexpos.o winclip.o winevent.o\ diff -urN --exclude CVS microwin-old/src/mwin/bmp/Makefile microwin-good/src/mwin/bmp/Makefile --- microwin-old/src/mwin/bmp/Makefile Thu Jun 21 00:32:41 2001 +++ microwin-good/src/mwin/bmp/Makefile Mon Oct 15 15:58:45 2001 @@ -34,7 +34,7 @@ # If you want to create a library with the objects files, define the name here LIBNAME = libmwimages.a -LIBNAMESO = libmwimages.so +#LIBNAMESO = libmwimages.so # List of objects to compile OBJS = car8.o min4.o max4.o close4.o under4.o\ diff -urN --exclude CVS microwin-old/src/mwin/mwobjects/Makefile microwin-good/src/mwin/mwobjects/Makefile --- microwin-old/src/mwin/mwobjects/Makefile Thu Jun 21 00:32:42 2001 +++ microwin-good/src/mwin/mwobjects/Makefile Mon Oct 15 15:59:20 2001 @@ -7,7 +7,7 @@ include $(CONFIG) LIBNAME = libmwobjects.a -LIBNAMESO = libmwobjects.so +#LIBNAMESO = libmwobjects.so ifeq ($(OBJFRAMEWORK), Y) CXXOBJS += mwobjects.o diff -urN --exclude CVS microwin-old/src/mwin/winlib/Makefile microwin-good/src/mwin/winlib/Makefile --- microwin-old/src/mwin/winlib/Makefile Thu Jun 21 00:32:42 2001 +++ microwin-good/src/mwin/winlib/Makefile Mon Oct 15 15:59:10 2001 @@ -30,7 +30,7 @@ # If you want to create a library with the objects files, define the name here LIBNAME = libmwinlib.a -LIBNAMESO = libmwinlib.so +#LIBNAMESO = libmwinlib.so # List of objects to compile OBJS = draw3d.o ptinsid.o insetr.o fastfill.o graph3d.o mwuser.o diff -urN --exclude CVS microwin-old/src/nanox/srvevent.c microwin-good/src/nanox/srvevent.c --- microwin-old/src/nanox/srvevent.c Thu Sep 6 10:50:41 2001 +++ microwin-good/src/nanox/srvevent.c Mon Oct 15 15:52:49 2001 @@ -16,6 +16,12 @@ GR_ERROR_STRINGS }; +#ifdef HAVE_STYLUS_MOUSE +/* If the mouse is a stylus */ +/* Then we want to implement multiple timers */ +MWTIMER *buttonTimer = 0; +#endif + #if NONETWORK /* [copied from client.c] * The following is the user defined function for handling errors. @@ -203,6 +209,34 @@ return FALSE; } +#ifdef HAVE_STYLUS_MOUSE + +static void timerCallback(void *data) { + + MWKEYMOD modifiers; /* latest modifiers */ + + /* If the timer fires, then we fire a left and right button down */ + + GdGetModifierInfo(NULL, &modifiers); /* Read kbd modifiers */ + + curbuttons |= MWBUTTON_R; + + /* Many applications don't check the which button was pressed when */ + /* they get a GR_EVENT_TYPE_BUTTON_DOWN, so if we sent a BUTTON_DOWN */ + /* here, 95% of the worlds apps would just handle it as a click */ + + /* So BUTTON_LONG_CLICK will only be handled by those 5% of apps */ + /* that care about a right click */ + + GsDeliverButtonEvent(GR_EVENT_TYPE_BUTTON_LONG_CLICK, + curbuttons, MWBUTTON_R, + modifiers); + + buttonTimer = 0; +} + +#endif + /* * Handle all mouse events. These are mouse enter, mouse exit, mouse * motion, mouse position, button down, and button up. This also moves @@ -224,6 +258,23 @@ */ if ((newx != cursorx) || (newy != cursory)) { GsResetScreenSaver(); + +#ifdef HAVE_STYLUS_MOUSE + /* If a timer is running, then kill it and send */ + /* the left button click */ + + if (buttonTimer) { + GdDestroyTimer(buttonTimer); buttonTimer = 0; + +#ifdef NOTUSED + GsDeliverButtonEvent(GR_EVENT_TYPE_BUTTON_DOWN, + MWBUTTON_L, MWBUTTON_L, + modifiers); +#endif + + } +#endif + GrMoveCursor(newx, newy); GsDeliverMotionEvent(GR_EVENT_TYPE_MOUSE_MOTION, newbuttons, modifiers); @@ -235,21 +286,58 @@ * Next, generate a button up event if any buttons have been released. */ changebuttons = (curbuttons & ~newbuttons); + if (changebuttons) { + GsResetScreenSaver(); + +#ifdef HAVE_STYLUS_MOUSE + + /* If the timer is still running, kill it */ + /* and send the left button down, first */ + + if (buttonTimer) { + GdDestroyTimer(buttonTimer); buttonTimer = 0; + +#ifdef NOTUSED + GsDeliverButtonEvent(GR_EVENT_TYPE_BUTTON_DOWN, + MWBUTTON_L, MWBUTTON_L, + modifiers); +#endif + + } +#endif + + /* If the left button was released, then so was the right one */ + GsDeliverButtonEvent(GR_EVENT_TYPE_BUTTON_UP, - newbuttons, changebuttons, modifiers); + newbuttons, changebuttons, modifiers); } /* * Finally, generate a button down event if any buttons have been * pressed. */ + + /* JHC 08/09 - For stylus driven devices, set a timer on a button */ + /* down. If the timer expires before a button up, then consider it */ + /* a right click */ + changebuttons = (~curbuttons & newbuttons); + if (changebuttons) { GsResetScreenSaver(); + +#ifdef HAVE_STYLUS_MOUSE + /* Start a timer to wait for the button click */ + + /* Fixme: This should be configurable */ + + buttonTimer = GdAddTimer(1 * 1000, timerCallback, 0); +#endif + GsDeliverButtonEvent(GR_EVENT_TYPE_BUTTON_DOWN, - newbuttons, changebuttons, modifiers); + newbuttons, changebuttons, modifiers); } curbuttons = newbuttons;