TGWin32ProxyBase.h

Go to the documentation of this file.
00001 // @(#)root/win32gdk:$Id: TGWin32ProxyBase.h 32129 2010-01-28 08:31:05Z bellenot $
00002 // Author: Valeriy Onuchin  08/08/2003
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGWin32ProxyBase
00013 #define ROOT_TGWin32ProxyBase
00014 
00015 #ifndef ROOT_Rtypes
00016 #include "Rtypes.h"
00017 #endif
00018 
00019 typedef void (*TGWin32CallBack)(void*);
00020 class TList;
00021 class TGWin32ProxyBasePrivate;
00022 ////////////////////////////////////////////////////////////////////////////////
00023 class TGWin32ProxyBase {
00024 friend class TGWin32;
00025 friend class TGWin32GL;
00026 
00027 protected:
00028    TGWin32ProxyBasePrivate *fPimpl;       // very private data
00029    Int_t             fBatchLimit;         // batch limit
00030    TList             *fListOfCallBacks;   // list of callbacks (used for batch processing)
00031    TGWin32CallBack   fCallBack;           // callback function (executed by "main" thread)
00032    void              *fParam;             // arguments passed to/from callback function
00033    ULong_t           fId;                 // thread id. There is one proxy per client thread
00034    Bool_t            fIsVirtualX;         // true if actual TVirtualX implementation
00035    static UInt_t     fMaxResponseTime;    // max period for waiting response from server thread 
00036    static Long_t     fgLock;              // fgLock=1 - all client threads locked
00037 
00038    virtual Bool_t ForwardCallBack(Bool_t sync);
00039    virtual void   SendExitMessage();
00040 
00041 public: // private:
00042    static ULong_t    fgPostMessageId;     // post message ID
00043    static ULong_t    fgPingMessageId;     // ping message ID
00044    static ULong_t    fgMainThreadId;      // main thread ID
00045    static ULong_t    fgUserThreadId;      // user (e.g. python) thread ID
00046 
00047    static void    Lock();
00048    static void    Unlock();
00049    static void    GlobalLock();
00050    static void    GlobalUnlock();
00051    static Bool_t  IsGloballyLocked();
00052    static Bool_t  Ping();
00053 
00054 public:
00055    TGWin32ProxyBase();
00056    virtual ~TGWin32ProxyBase();
00057    virtual void      ExecuteCallBack(Bool_t sync);
00058    virtual Double_t  GetMilliSeconds();
00059    ULong_t GetId() const { return fId; }
00060 };
00061 
00062 #endif

Generated on Tue Jul 5 14:14:43 2011 for ROOT_528-00b_version by  doxygen 1.5.1