ROOT  6.06/09
Reference Guide
TGWin32ProxyBase.h
Go to the documentation of this file.
1 // @(#)root/win32gdk:$Id$
2 // Author: Valeriy Onuchin 08/08/2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGWin32ProxyBase
13 #define ROOT_TGWin32ProxyBase
14 
15 #ifndef ROOT_Rtypes
16 #include "Rtypes.h"
17 #endif
18 
19 typedef void (*TGWin32CallBack)(void*);
20 class TList;
21 class TGWin32ProxyBasePrivate;
22 ////////////////////////////////////////////////////////////////////////////////
24 friend class TGWin32;
25 friend class TGWin32GL;
26 
27 protected:
28  TGWin32ProxyBasePrivate *fPimpl; // very private data
29  Int_t fBatchLimit; // batch limit
30  TList *fListOfCallBacks; // list of callbacks (used for batch processing)
31  TGWin32CallBack fCallBack; // callback function (executed by "main" thread)
32  void *fParam; // arguments passed to/from callback function
33  ULong_t fId; // thread id. There is one proxy per client thread
34  Bool_t fIsVirtualX; // true if actual TVirtualX implementation
35  static UInt_t fMaxResponseTime; // max period for waiting response from server thread
36  static Long_t fgLock; // fgLock=1 - all client threads locked
37 
38  virtual Bool_t ForwardCallBack(Bool_t sync);
39  virtual void SendExitMessage();
40 
41 public: // private:
42  static ULong_t fgPostMessageId; // post message ID
43  static ULong_t fgPingMessageId; // ping message ID
44  static ULong_t fgMainThreadId; // main thread ID
45  static ULong_t fgUserThreadId; // user (e.g. python) thread ID
46 
47  static void Lock();
48  static void Unlock();
49  static void GlobalLock();
50  static void GlobalUnlock();
51  static Bool_t IsGloballyLocked();
52  static Bool_t Ping();
53 
54 public:
56  virtual ~TGWin32ProxyBase();
57  virtual void ExecuteCallBack(Bool_t sync);
58  virtual Double_t GetMilliSeconds();
59  ULong_t GetId() const { return fId; }
60 };
61 
62 #endif
virtual void ExecuteCallBack(Bool_t sync)
Executes all batched callbacks and the latest callback This method is executed by server thread...
TGWin32CallBack fCallBack
static void GlobalUnlock()
unlock any proxy (client thread)
static UInt_t fMaxResponseTime
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual ~TGWin32ProxyBase()
dtor
This class is the basic interface to the Win32 graphics system.
Definition: TGWin32.h:80
static void Lock()
enter critical section
virtual void SendExitMessage()
send exit message to server thread
ULong_t GetId() const
static Long_t fgLock
static void GlobalLock()
lock any proxy (client thread)
static ULong_t fgMainThreadId
A doubly linked list.
Definition: TList.h:47
static ULong_t fgPostMessageId
static ULong_t fgUserThreadId
unsigned int UInt_t
Definition: RtypesCore.h:42
friend class TGWin32GL
long Long_t
Definition: RtypesCore.h:50
double Double_t
Definition: RtypesCore.h:55
unsigned long ULong_t
Definition: RtypesCore.h:51
void(* TGWin32CallBack)(void *)
TGWin32ProxyBasePrivate * fPimpl
virtual Bool_t ForwardCallBack(Bool_t sync)
if sync is kTRUE:
static ULong_t fgPingMessageId
typedef void((*Func_t)())
static Bool_t IsGloballyLocked()
Check the status of the lock.
virtual Double_t GetMilliSeconds()
returns elapsed time in milliseconds with microseconds precision
static Bool_t Ping()
send ping messsage to server thread
static void Unlock()
leave critical section