#import <GraphicsServices/GSEvent.h>
#ifndef WebCoreThread_h
#define WebCoreThread_h
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct {
CGContextRef currentCGContext;
} WebThreadContext;
extern bool webThreadShouldYield;
void WebThreadLock(void);
void WebThreadUnlock(void);
bool WebTryThreadLock(void);
bool WebThreadIsLocked(void);
bool WebThreadIsLockedOrDisabled(void);
void WebThreadLockPushModal(void);
void WebThreadLockPopModal(void);
void WebThreadEnable(void);
bool WebThreadIsEnabled(void);
bool WebThreadIsCurrent(void);
bool WebThreadNotCurrent(void);
void WebThreadLockFromAnyThread();
void WebThreadUnlockFromAnyThread();
static inline bool WebThreadShouldYield(void) { return webThreadShouldYield; }
static inline void WebThreadSetShouldYield() { webThreadShouldYield = true; }
CFRunLoopRef WebThreadRunLoop(void);
WebThreadContext *WebThreadCurrentContext(void);
bool WebThreadContextIsCurrent(void);
void WebThreadPrepareForDrawing(void);
#if defined(__cplusplus)
}
#endif
#endif // WebCoreThread_h