PrintI.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: PrintI.h /main/1 1996/10/31 11:19:07 drk $
  24. *
  25. * (c) Copyright 1996 Digital Equipment Corporation.
  26. * (c) Copyright 1996 Hewlett-Packard Company.
  27. * (c) Copyright 1996 International Business Machines Corp.
  28. * (c) Copyright 1996 Sun Microsystems, Inc.
  29. * (c) Copyright 1996 Novell, Inc.
  30. * (c) Copyright 1996 FUJITSU LIMITED.
  31. * (c) Copyright 1996 Hitachi.
  32. */
  33. #ifndef _DtPrintI_h
  34. #define _DtPrintI_h
  35. #include <X11/Intrinsic.h>
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. /******** Conditionally defined macros for thread safe DtPrint ******/
  40. #ifdef XTHREADS
  41. #define _DtPrintWidgetToAppContext(w) \
  42. XtAppContext app = XtWidgetToApplicationContext(w)
  43. #define _DtPrintDisplayToAppContext(d) \
  44. XtAppContext app = XtDisplayToApplicationContext(d)
  45. #define _DtPrintAppLock(app) XtAppLock(app)
  46. #define _DtPrintAppUnlock(app) XtAppUnlock(app)
  47. #define _DtPrintProcessLock() XtProcessLock()
  48. #define _DtPrintProcessUnlock() XtProcessUnlock()
  49. #else /* XTHREADS */
  50. #define _DtPrintWidgetToAppContext(w)
  51. #define _DtPrintDisplayToAppContext(d)
  52. #define _DtPrintAppLock(app)
  53. #define _DtPrintAppUnlock(app)
  54. #define _DtPrintProcessLock()
  55. #define _DtPrintProcessUnlock()
  56. #endif /* XTHREADS */
  57. #ifdef __cplusplus
  58. } /* Close scope of 'extern "C"' declaration which encloses file. */
  59. #endif
  60. #endif /* _DtPrintI_h */
  61. /* DON'T ADD ANYTHING AFTER THIS #endif */