This file is indexed.

/usr/include/root/TGClient.h is in libroot-gui-dev 5.34.19+dfsg-1.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// @(#)root/gui:$Id$
// Author: Fons Rademakers   27/12/97

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGClient
#define ROOT_TGClient


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGClient                                                             //
//                                                                      //
// Window client. In client server windowing systems, like X11 this     //
// class is used to make the initial connection to the window server.   //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_GuiTypes
#include "GuiTypes.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
#ifndef ROOT_TQObject
#include "TQObject.h"
#endif


class TList;
class THashList;
class TGWindow;
class TGResourcePool;
class TGPicturePool;
class TGPicture;
class TGGCPool;
class TGGC;
class TGFontPool;
class TGFont;
class TGMimeTypes;
class TGUnknownWindowHandler;
class TGIdleHandler;


class TGClient : public TObject, public TQObject {

friend class TGCocoa;

protected:
   Pixel_t         fBackColor;        // default background color
   Pixel_t         fForeColor;        // default foreground color
   Pixel_t         fHilite;           // default hilite color
   Pixel_t         fShadow;           // default shadow color
   Pixel_t         fSelBackColor;     // default selection background color
   Pixel_t         fSelForeColor;     // default selection foreground color
   Pixel_t         fWhite;            // white color index
   Pixel_t         fBlack;            // black color index
   TGWindow       *fDefaultRoot;      // default root window (base window of display)
   TGWindow       *fRoot;             // current root window (changing root window allows embedding)
   Int_t           fXfd;              // file descriptor of connection to server
   TGResourcePool *fResourcePool;     // global GUI resource pool
   TGGCPool       *fGCPool;           // graphics context pool
   TGFontPool     *fFontPool;         // font pool
   TGPicturePool  *fPicturePool;      // pixmap pool
   TGMimeTypes    *fMimeTypeList;     // mimetype list
   Colormap_t      fDefaultColormap;  // default colormap
   Bool_t          fGlobalNeedRedraw; // true if at least one window needs to be redrawn
   Bool_t          fForceRedraw;      // redraw widgets as soon as possible
   THashList      *fWlist;            // list of frames
   TList          *fPlist;            // list of popup windows used in HandleMaskEvent()
   TList          *fUWHandlers;       // list of event handlers for unknown windows
   TList          *fIdleHandlers;     // list of idle handlers
   EGEventType     fWaitForEvent;     // event to wait for
   Window_t        fWaitForWindow;    // window in which to wait for event
   UInt_t          fStyle;            // GUI style (modern or classic)

   TGClient(const TGClient&);             // not implemented
   TGClient& operator=(const TGClient&);  // not implemented

   Bool_t  ProcessOneEvent();
   Bool_t  ProcessIdleEvent();
   Bool_t  DoRedraw();

public:
   TGClient(const char *dpyName = 0);
   virtual ~TGClient();

   const TGWindow *GetRoot() const;
   const TGWindow *GetDefaultRoot() const;
   void            SetRoot(TGWindow *root = 0);
   TGWindow       *GetWindowById(Window_t sw) const;
   TGWindow       *GetWindowByName(const char *name) const;

   UInt_t       GetDisplayWidth() const;
   UInt_t       GetDisplayHeight() const;

   Bool_t       IsEditable() const { return fRoot != fDefaultRoot; }
   Bool_t       IsEditDisabled() const;
   void         SetEditDisabled(Bool_t on = kTRUE);

   FontStruct_t GetFontByName(const char *name, Bool_t fixedDefault = kTRUE) const;
   Bool_t       GetColorByName(const char *name, Pixel_t &pixel) const;
   Pixel_t      GetHilite(Pixel_t base_color) const;
   Pixel_t      GetShadow(Pixel_t base_color) const;
   void         FreeColor(Pixel_t color) const;
   void         ForceRedraw() { fForceRedraw = kTRUE; }
   void         NeedRedraw(TGWindow *w, Bool_t force = kFALSE);
   void         CancelRedraw(TGWindow *w);
   void         RegisterWindow(TGWindow *w);
   void         UnregisterWindow(TGWindow *w);
   void         RegisterPopup(TGWindow *w);
   void         UnregisterPopup(TGWindow *w);
   void         AddUnknownWindowHandler(TGUnknownWindowHandler *h);
   void         RemoveUnknownWindowHandler(TGUnknownWindowHandler *h);
   void         AddIdleHandler(TGIdleHandler *h);
   void         RemoveIdleHandler(TGIdleHandler *h);
   Bool_t       HandleInput();
   void         ProcessLine(TString cmd, Long_t msg, Long_t parm1, Long_t parm2);
   void         WaitFor(TGWindow *w);
   void         WaitForUnmap(TGWindow *w);
   void         ResetWaitFor(TGWindow *w);
   EGEventType  GetWaitForEvent() const  { return fWaitForEvent;}
   Window_t     GetWaitForWindow() const { return fWaitForWindow; }
   void         SetWaitForWindow(Window_t wid) {fWaitForWindow = wid;}
   Bool_t       ProcessEventsFor(TGWindow *w);

   Bool_t       HandleEvent(Event_t *event);
   Bool_t       HandleMaskEvent(Event_t *event, Window_t wid);
   void         RegisteredWindow(Window_t w);      //*SIGNAL*
   void         ProcessedEvent(Event_t *event, Window_t wid);   //*SIGNAL*

   const TGResourcePool *GetResourcePool() const { return fResourcePool; }

   TGPicturePool   *GetPicturePool() const { return fPicturePool; }
   const TGPicture *GetPicture(const char *name);
   const TGPicture *GetPicture(const char *name, UInt_t new_width, UInt_t new_height);
   void             FreePicture(const TGPicture *pic);

   TGGCPool        *GetGCPool() const { return fGCPool; }
   TGGC            *GetGC(GCValues_t *values, Bool_t rw = kFALSE);
   void             FreeGC(const TGGC *gc);
   void             FreeGC(GContext_t gc);

   TGFontPool      *GetFontPool() const { return fFontPool; }
   TGFont          *GetFont(const char *font, Bool_t fixedDefault = kTRUE);
   TGFont          *GetFont(const TGFont *font);
   void             FreeFont(const TGFont *font);

   UInt_t           GetStyle() const { return fStyle; }
   void             SetStyle(UInt_t newstyle) { fStyle = newstyle; }
   void             SetStyle(const char *style);

   Colormap_t       GetDefaultColormap() const { return fDefaultColormap; }
   TGMimeTypes     *GetMimeTypeList() const { return fMimeTypeList; }

   THashList       *GetListOfWindows() const { return fWlist; }
   TList           *GetListOfPopups() const { return fPlist; }

   ClassDef(TGClient,0)  // Class making connection to display server
};

R__EXTERN TGClient *gClient;

#endif