Logo ROOT  
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();
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);
56 
57  void ProcessApplicationDefinedEvent(void *event);
58 
59  std::unique_ptr<ROOT::MacOSX::Details::MacOSXSystem> fPimpl; //!
61  bool fFirstDispatch; //!
62 
65 
66  ClassDef(TMacOSXSystem, 0);//TSystem for Mac OSX.
67 };
68 
69 #endif
TUnixSystem.h
TMacOSXSystem::TMacOSXSystem
TMacOSXSystem()
Definition: TMacOSXSystem.mm:332
TMacOSXSystem::~TMacOSXSystem
~TMacOSXSystem()
Definition: TMacOSXSystem.mm:340
TMacOSXSystem::operator=
TMacOSXSystem & operator=(const TMacOSXSystem &rhs)
TMacOSXSystem::DispatchOneEvent
void DispatchOneEvent(Bool_t pendingOnly)
Dispatch a single event.
Definition: TMacOSXSystem.mm:345
TMacOSXSystem::CocoaInitialized
bool CocoaInitialized() const
Definition: TMacOSXSystem.mm:434
TMacOSXSystem::TMacOSXSystem
TMacOSXSystem(const TMacOSXSystem &rhs)
TMacOSXSystem::fPimpl
std::unique_ptr< ROOT::MacOSX::Details::MacOSXSystem > fPimpl
Definition: TMacOSXSystem.h:59
bool
TUnixSystem
Definition: TUnixSystem.h:32
TMacOSXSystem::RemoveFileHandler
TFileHandler * RemoveFileHandler(TFileHandler *fh)
Remove a file handler from the list of file handlers.
Definition: TMacOSXSystem.mm:539
TGCocoa
This class implements TVirtualX interface for MacOS X, using Cocoa and Quartz 2D.
Definition: TGCocoa.h:58
Long_t
long Long_t
Definition: RtypesCore.h:54
TMacOSXSystem::WaitEvents
void WaitEvents(Long_t nextto)
Definition: TMacOSXSystem.mm:482
TMacOSXSystem::AddFileHandler
void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
Definition: TMacOSXSystem.mm:528
ROOT::MacOSX::Details
Definition: TMacOSXSystem.h:30
TMacOSXSystem::fCocoaInitialized
bool fCocoaInitialized
Definition: TMacOSXSystem.h:60
TMacOSXSystem::ProcessPendingEvents
bool ProcessPendingEvents()
Definition: TMacOSXSystem.mm:468
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TMacOSXSystem::ProcessApplicationDefinedEvent
void ProcessApplicationDefinedEvent(void *event)
Definition: TMacOSXSystem.mm:548
TMacOSXSystem::fFirstDispatch
bool fFirstDispatch
Definition: TMacOSXSystem.h:61
TFileHandler
Definition: TSysEvtHandler.h:65
TMacOSXSystem
Definition: TMacOSXSystem.h:39
ROOT
VSD Structures.
Definition: StringConv.hxx:21
TMacOSXSystem::InitializeCocoa
void InitializeCocoa()
Definition: TMacOSXSystem.mm:440