Logo ROOT   6.12/07
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 "TUnixSystem.h"
17 
18 #include <memory>
19 
20 ////////////////////////////////////////////////////////////////////
21 // //
22 // Event loop with MacOS X and Cocoa is different //
23 // from TUnixSystem. The difference is mainly //
24 // in DispatchOneEvent, AddFileHandler and RemoveFileHandler. //
25 // //
26 ////////////////////////////////////////////////////////////////////
27 
28 namespace ROOT {
29 namespace MacOSX {
30 namespace Details {
31 
32 //'Private' pimpl class to hide Apple's specific things from CINT.
33 class MacOSXSystem;
34 
35 }
36 }
37 }
38 
39 class TMacOSXSystem : public TUnixSystem {
40  friend class TGCocoa;
41 public:
42  TMacOSXSystem();
43  ~TMacOSXSystem();
44 
45  void DispatchOneEvent(Bool_t pendingOnly);
46  bool CocoaInitialized() const;
47 
48 private:
49  void InitializeCocoa();
50 
51  bool ProcessPendingEvents();
52  void WaitEvents(Long_t nextto);
53 
54  void AddFileHandler(TFileHandler *fh);
55  TFileHandler *RemoveFileHandler(TFileHandler *fh);
56 
57  void ProcessApplicationDefinedEvent(void *event);
58 
59  std::unique_ptr<ROOT::MacOSX::Details::MacOSXSystem> fPimpl; //!
61  bool fFirstDispatch; //!
62 
63  TMacOSXSystem(const TMacOSXSystem &rhs);
65 
66  ClassDef(TMacOSXSystem, 0);//TSystem for Mac OSX.
67 };
68 
69 #endif
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
bool Bool_t
Definition: RtypesCore.h:59
std::unique_ptr< ROOT::MacOSX::Details::MacOSXSystem > fPimpl
Definition: TMacOSXSystem.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:320
long Long_t
Definition: RtypesCore.h:50
bool fCocoaInitialized
Definition: TMacOSXSystem.h:60
Binding & operator=(OUT(*fun)(void))
This class implements TVirtualX interface for MacOS X, using Cocoa and Quartz 2D. ...
Definition: TGCocoa.h:58