|
||||
File indexing completed on 2025-01-18 10:14:31
0001 /************************************************************ 0002 0003 Copyright (c) 1993, Oracle and/or its affiliates. 0004 0005 Permission is hereby granted, free of charge, to any person obtaining a 0006 copy of this software and associated documentation files (the "Software"), 0007 to deal in the Software without restriction, including without limitation 0008 the rights to use, copy, modify, merge, publish, distribute, sublicense, 0009 and/or sell copies of the Software, and to permit persons to whom the 0010 Software is furnished to do so, subject to the following conditions: 0011 0012 The above copyright notice and this permission notice (including the next 0013 paragraph) shall be included in all copies or substantial portions of the 0014 Software. 0015 0016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 0019 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 0020 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 0021 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 0022 DEALINGS IN THE SOFTWARE. 0023 0024 ********************************************************/ 0025 0026 /* 0027 0028 Copyright 1994, 1998 The Open Group 0029 0030 Permission to use, copy, modify, distribute, and sell this software and its 0031 documentation for any purpose is hereby granted without fee, provided that 0032 the above copyright notice appear in all copies and that both that 0033 copyright notice and this permission notice appear in supporting 0034 documentation. 0035 0036 The above copyright notice and this permission notice shall be included in 0037 all copies or substantial portions of the Software. 0038 0039 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 0040 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 0041 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 0042 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 0043 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 0044 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 0045 0046 Except as contained in this notice, the name of The Open Group shall not be 0047 used in advertising or otherwise to promote the sale, use or other dealings 0048 in this Software without prior written authorization from The Open Group. 0049 0050 */ 0051 /* $XFree86: xc/lib/Xt/ThreadsI.h,v 3.5 2001/12/14 19:56:31 dawes Exp $ */ 0052 0053 #ifndef _XtThreadsI_h 0054 #define _XtThreadsI_h 0055 0056 #include <X11/XlibConf.h> 0057 0058 #ifdef XTHREADS 0059 0060 typedef struct _LockRec *LockPtr; 0061 0062 typedef void (*ThreadAppProc)( 0063 XtAppContext /* app */ 0064 ); 0065 0066 typedef void (*ThreadAppYieldLockProc)( 0067 XtAppContext, /* app */ 0068 Boolean*, /* push_thread */ 0069 Boolean*, /* pushed_thread */ 0070 int* /* level */ 0071 ); 0072 0073 typedef void (*ThreadAppRestoreLockProc)( 0074 XtAppContext /* app */, 0075 int, /* level */ 0076 Boolean* /* pushed_thread */ 0077 ); 0078 0079 _XFUNCPROTOBEGIN 0080 0081 extern void (*_XtProcessLock)( 0082 void 0083 ); 0084 0085 extern void (*_XtProcessUnlock)( 0086 void 0087 ); 0088 0089 extern void (*_XtInitAppLock)( 0090 XtAppContext /* app */ 0091 ); 0092 0093 _XFUNCPROTOEND 0094 0095 #define INIT_APP_LOCK(app) if(_XtInitAppLock) (*_XtInitAppLock)(app) 0096 #define FREE_APP_LOCK(app) if(app && app->free_lock)(*app->free_lock)(app) 0097 0098 #define LOCK_PROCESS if(_XtProcessLock)(*_XtProcessLock)() 0099 #define UNLOCK_PROCESS if(_XtProcessUnlock)(*_XtProcessUnlock)() 0100 #define LOCK_APP(app) if(app && app->lock)(*app->lock)(app) 0101 #define UNLOCK_APP(app) if(app && app->unlock)(*app->unlock)(app) 0102 0103 #define YIELD_APP_LOCK(app,push,pushed,level)\ 0104 if(app && app->yield_lock) (*app->yield_lock)(app,push,pushed,level) 0105 #define RESTORE_APP_LOCK(app,level,pushed)\ 0106 if(app && app->restore_lock) (*app->restore_lock)(app,level,pushed) 0107 0108 #define WIDGET_TO_APPCON(w) \ 0109 XtAppContext app = (w && _XtProcessLock ? \ 0110 XtWidgetToApplicationContext(w) : NULL) 0111 0112 #define DPY_TO_APPCON(d) \ 0113 XtAppContext app = (_XtProcessLock ? XtDisplayToApplicationContext(d): NULL) 0114 0115 #else /* defined(XTHREADS) */ 0116 0117 #define LOCK_PROCESS 0118 #define UNLOCK_PROCESS 0119 #define LOCK_APP(app) 0120 #define UNLOCK_APP(app) 0121 0122 #define INIT_APP_LOCK(app) 0123 #define FREE_APP_LOCK(app) 0124 0125 #define WIDGET_TO_APPCON(w) 0126 #define DPY_TO_APPCON(d) 0127 0128 #endif /* !defined(XTHREADS) */ 0129 #endif /* _XtThreadsI_h */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |