DtWidgetI.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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: DtWidgetI.h /main/1 1996/03/26 19:53:18 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 _DtWidgetI_h
  34. #define _DtWidgetI_h
  35. #include <X11/Intrinsic.h>
  36. /******** Conditionally defined macros for thread safe DtWidget ******/
  37. #ifdef XTHREADS
  38. #define _DtWidgetToAppContext(w) \
  39. XtAppContext app = XtWidgetToApplicationContext(w)
  40. #define _DtDisplayToAppContext(d) \
  41. XtAppContext app = XtDisplayToApplicationContext(d)
  42. #define _DtAppLock(app) XtAppLock(app)
  43. #define _DtAppUnlock(app) XtAppUnlock(app)
  44. #define _DtProcessLock() XtProcessLock()
  45. #define _DtProcessUnlock() XtProcessUnlock()
  46. #else /* XTHREADS */
  47. #define _DtWidgetToAppContext(w)
  48. #define _DtDisplayToAppContext(d)
  49. #define _DtAppLock(app)
  50. #define _DtAppUnlock(app)
  51. #define _DtProcessLock()
  52. #define _DtProcessUnlock()
  53. #endif /* XTHREADS */
  54. #ifdef __cplusplus
  55. } /* Close scope of 'extern "C"' declaration which encloses file. */
  56. #endif
  57. #endif /* _DtWidgetI_h */
  58. /* DON'T ADD ANYTHING AFTER THIS #endif */