From 094535c010320967639e8e86f974d878e80baa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 1 May 2015 16:13:57 +0200 Subject: Imported Upstream version 1.7.0 --- numlib/ui.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 numlib/ui.h (limited to 'numlib/ui.h') diff --git a/numlib/ui.h b/numlib/ui.h new file mode 100644 index 0000000..e1d7a58 --- /dev/null +++ b/numlib/ui.h @@ -0,0 +1,50 @@ + +#ifndef __UI_H__ + +/* + * Do OS specific setup for using UI windows. + * Include this only in file with main(). + * + * Copyright 2014 Graeme W. Gill + * All rights reserved. + * + * This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :- + * see the License.txt file for licencing details. + * + * Typically we need to set things up and then call the + * "normal" main, called "uimain" in ArgyllCMS utils. + */ + +/* Because linkers are dumb (they pass over a library containing main() */ +/* and then complain that there is no entry point!), we force linking */ +/* of libui if ui.h gets #included. */ +extern int ui_initialized; +static int *pui_initialized = &ui_initialized; + +#ifdef UNIX +# ifdef __APPLE__ + +extern pthread_t ui_thid; /* Thread ID of main thread running io run loop */ +extern pthread_t ui_main_thid; /* Thread ID of thread running application main() */ + +#ifndef __UI_C__ +# define main uimain +#endif + +#else /* Linux etc. */ + +#endif /* Linux etc. */ +#endif /* UNIX */ + +#ifdef NT + +#ifdef NEVER /* Not practical - see ui.c for full explanation */ +#ifndef __UI_C__ +# define main uimain +#endif +#endif + +#endif + +#define __UI_H__ +#endif /* __UI_H__ */ -- cgit v1.2.3