X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftest.priv.h;h=5447fa6eae2562ea5824978d392a347661b05348;hp=c8d88806029a38f27f7cc56ea82c639684377745;hb=b779f5fb4516b3e6d1bc8880ea68923efb761e1d;hpb=a1aff38c9421e79f92cd4e8ab0587fdf3806cc28 diff --git a/test/test.priv.h b/test/test.priv.h index c8d88806..5447fa6e 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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 * @@ -29,7 +29,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.66 2007/06/09 19:55:16 tom Exp $ */ +/* $Id: test.priv.h,v 1.69 2008/01/26 22:05:48 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -191,10 +191,6 @@ #define NCURSES_EXT_FUNCS 0 #endif -#ifndef NCURSES_OPAQUE -#define NCURSES_OPAQUE 0 -#endif - #ifndef NEED_PTEM_H #define NEED_PTEM_H 0 #endif @@ -313,7 +309,7 @@ extern int optind; #ifndef HAVE_TYPE_ATTR_T #if !USE_WIDEC_SUPPORT -#define attr_t long +#define attr_t chtype #endif #endif @@ -324,6 +320,10 @@ extern int optind; #define NCURSES_CH_T cchar_t #endif +#ifndef NCURSES_OPAQUE +#define NCURSES_OPAQUE 0 +#endif + #ifndef CCHARW_MAX #define CCHARW_MAX 5 #endif @@ -459,4 +459,21 @@ extern int optind; signal(nsig, handler); \ } +/* + * Simplify setting up demo of threading with these macros. + */ +#if !defined(NCURSES_VERSION_PATCH) || (NCURSES_VERSION_PATCH < 20070915) || !NCURSES_EXT_FUNCS +#define WANT_USE_WINDOW() \ +static int \ +use_window(WINDOW *win, int (*func) (WINDOW *, void *), void *data) \ +{ \ + return func(win, data); \ +} +#define USING_WINDOW(w,func) use_window(w, (NCURSES_CALLBACK) func, w) +#else +#define WANT_USE_WINDOW() /* nothing */ +#define USING_WINDOW(w,func) func(w) +#endif + + #endif /* __TEST_PRIV_H */