ROOT  6.06/09
Reference Guide
TMacOSXSystem.h
Go to the documentation of this file.
1 // @(#)root/graf2d:$Id$
2 // Author: Timur Pocheptsov 5/12/2011
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2012, 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 
13 #ifndef ROOT_TMacOSXSystem
14 #define ROOT_TMacOSXSystem
15 
16 #include <memory>
17 
18 #ifndef ROOT_TUnixSystem
19 #include "TUnixSystem.h"
20 #endif
21 
22 ////////////////////////////////////////////////////////////////////
23 // //
24 // Event loop with MacOS X and Cocoa is different //
25 // from TUnixSystem. The difference is mainly //
26 // in DispatchOneEvent, AddFileHandler and RemoveFileHandler. //
27 // //
28 ////////////////////////////////////////////////////////////////////
29 
30 namespace ROOT {
31 namespace MacOSX {
32 namespace Detail {
33 
34 //'Private' pimpl class to hide Apple's specific things from CINT.
35 class MacOSXSystem;
36 
37 }
38 }
39 }
40 
41 class TMacOSXSystem : public TUnixSystem {
42  friend class TGCocoa;
43 public:
44  TMacOSXSystem();
46 
47  void DispatchOneEvent(Bool_t pendingOnly);
48  bool CocoaInitialized() const;
49 
50 private:
51  void InitializeCocoa();
52 
53  bool ProcessPendingEvents();
54  void WaitEvents(Long_t nextto);
55 
56  void AddFileHandler(TFileHandler *fh);
58 
59  void ProcessApplicationDefinedEvent(void *event);
60 
61  std::auto_ptr<ROOT::MacOSX::Detail::MacOSXSystem> fPimpl; //!
63  bool fFirstDispatch; //!
64 
65  TMacOSXSystem(const TMacOSXSystem &rhs);
67 
68  ClassDef(TMacOSXSystem, 0);//TSystem for Mac OSX.
69 };
70 
71 #endif
bool ProcessPendingEvents()
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
TMacOSXSystem & operator=(const TMacOSXSystem &rhs)
bool Bool_t
Definition: RtypesCore.h:59
void ProcessApplicationDefinedEvent(void *event)
void DispatchOneEvent(Bool_t pendingOnly)
Dispatch a single event.
TFileHandler * RemoveFileHandler(TFileHandler *fh)
Remove a file handler from the list of file handlers.
std::auto_ptr< ROOT::MacOSX::Detail::MacOSXSystem > fPimpl
Definition: TMacOSXSystem.h:61
void InitializeCocoa()
long Long_t
Definition: RtypesCore.h:50
void WaitEvents(Long_t nextto)
bool fCocoaInitialized
Definition: TMacOSXSystem.h:62
void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
This class implements TVirtualX interface for MacOS X, using Cocoa and Quartz 2D. ...
Definition: TGCocoa.h:64
bool CocoaInitialized() const
ClassDef(TMacOSXSystem, 0)