Logo ROOT   6.10/09
Reference Guide
Go to the documentation of this file.
1 // @(#)root/graf2d:$Id$
2 // Author: Timur Pocheptsov 22/11/2011
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  *************************************************************************/
13 #ifndef ROOT_TGCocoa
14 #define ROOT_TGCocoa
16 #include "CocoaGuiTypes.h"
17 #include "TVirtualX.h"
18 #include "X11Atoms.h"
20 #include <map>
21 #include <memory>
22 #include <string>
23 #include <utility>
24 #include <vector>
26 /// \defgroup cocoa Cocoa backend
27 /// \brief Interface to MacOS native graphics system.
28 /// \ingroup GraphicsBackends
30 /** \class TGCocoa
31 \ingroup cocoa
33 This class implements TVirtualX interface for MacOS X, using Cocoa and Quartz 2D.
35 TVirtualX is a typical fat interface, it's a "C++ wrapper" for
36 X11 library. It's a union of several orthogonal interfaces like:
37 color management, window management, pixmap management, cursors,
38 events, images, drag and drop, font management, gui-rendering,
39 non-gui graphics, etc. etc.
40 */
42 namespace ROOT {
43 namespace MacOSX {
45 namespace X11 {
46 class EventTranslator;
47 class CommandBuffer;
49 }
51 namespace Details {
52 class CocoaPrivate;
53 }
55 }
56 }
58 class TGCocoa : public TVirtualX {
59 public:
60  TGCocoa();
61  TGCocoa(const char *name, const char *title);
63  ~TGCocoa();
65  //TVirtualX final overriders.
66  //I split them in a group not to get lost in this fat interface.
68  ///////////////////////////////////////
69  //General.
70  virtual Bool_t Init(void *display);
71  virtual Int_t OpenDisplay(const char *displayName);
72  virtual const char *DisplayName(const char *);
73  virtual Int_t SupportsExtension(const char *extensionName)const;
74  virtual void CloseDisplay();
75  virtual Display_t GetDisplay()const;
76  virtual Visual_t GetVisual()const;
77  virtual Int_t GetScreen()const;
78  virtual UInt_t ScreenWidthMM()const;
79  virtual Int_t GetDepth()const;
80  virtual void Update(Int_t mode);
82  //Non-virtual functions.
83  void ReconfigureDisplay();
84  ROOT::MacOSX::X11::Rectangle GetDisplayGeometry()const;
85  //End of general.
86  ///////////////////////////////////////
88  ///////////////////////////////////////
89  //Window management part:
90  virtual Window_t GetDefaultRootWindow()const;
91  //-Functions used by TCanvas/TPad (work with window, selected by SelectWindow).
92  virtual Int_t InitWindow(ULong_t window);
93  virtual Window_t GetWindowID(Int_t wid);//TGCocoa simply returns wid.
94  virtual void SelectWindow(Int_t wid);
95  virtual void ClearWindow();
96  virtual void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
97  virtual void MoveWindow(Int_t wid, Int_t x, Int_t y);
98  virtual void RescaleWindow(Int_t wid, UInt_t w, UInt_t h);
99  virtual void ResizeWindow(Int_t wid);
100  virtual void UpdateWindow(Int_t mode);
101  virtual Window_t GetCurrentWindow()const;
102  virtual void CloseWindow();
103  virtual Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h); //-"Qt ROOT".
104  virtual void RemoveWindow(ULong_t qwid); //-"Qt ROOT".
107  //-Functions used by GUI.
108  virtual Window_t CreateWindow(Window_t parent, Int_t x, Int_t y,
109  UInt_t w, UInt_t h, UInt_t border,
110  Int_t depth, UInt_t clss,
111  void *visual, SetWindowAttributes_t *attr,
112  UInt_t wtype);
115  virtual void DestroyWindow(Window_t wid);
116  virtual void DestroySubwindows(Window_t wid);
118  virtual void GetWindowAttributes(Window_t wid, WindowAttributes_t &attr);
119  virtual void ChangeWindowAttributes(Window_t wid, SetWindowAttributes_t *attr);
120  virtual void SelectInput(Window_t wid, UInt_t evmask);//Can also be in events-related part.
122  void ReparentChild(Window_t wid, Window_t pid, Int_t x, Int_t y);//Non-overrider.
123  void ReparentTopLevel(Window_t wid, Window_t pid, Int_t x, Int_t y);//Non-overrider.
124  virtual void ReparentWindow(Window_t wid, Window_t pid, Int_t x, Int_t y);
126  virtual void MapWindow(Window_t wid);
127  virtual void MapSubwindows(Window_t wid);
128  virtual void MapRaised(Window_t wid);
129  virtual void UnmapWindow(Window_t wid);
130  virtual void RaiseWindow(Window_t wid);
131  virtual void LowerWindow(Window_t wid);
133  virtual void MoveWindow(Window_t wid, Int_t x, Int_t y);
134  virtual void MoveResizeWindow(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);
135  virtual void ResizeWindow(Window_t wid, UInt_t w, UInt_t h);
136  virtual void IconifyWindow(Window_t wid);
137  virtual void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x,Int_t src_y,
138  Int_t &dest_x, Int_t &dest_y, Window_t &child);
139  virtual void GetWindowSize(Drawable_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
142  virtual void SetWindowBackground(Window_t wid, ULong_t color);
143  virtual void SetWindowBackgroundPixmap(Window_t wid, Pixmap_t pxm);
145  virtual Window_t GetParent(Window_t wid)const;
147  virtual void SetWindowName(Window_t wid, char *name);
148  virtual void SetIconName(Window_t wid, char *name);
149  virtual void SetIconPixmap(Window_t wid, Pixmap_t pix);
150  virtual void SetClassHints(Window_t wid, char *className, char *resourceName);
151  //Non-rectangular window:
152  virtual void ShapeCombineMask(Window_t wid, Int_t x, Int_t y, Pixmap_t mask);
154  //End window-management part.
155  ///////////////////////////////////////
157  /////////////////////////////
158  //Set of "Window manager hints".
159  virtual void SetMWMHints(Window_t winID, UInt_t value, UInt_t decorators, UInt_t inputMode);
160  virtual void SetWMPosition(Window_t winID, Int_t x, Int_t y);
161  virtual void SetWMSize(Window_t winID, UInt_t w, UInt_t h);
162  virtual void SetWMSizeHints(Window_t winID, UInt_t wMin, UInt_t hMin, UInt_t wMax, UInt_t hMax, UInt_t wInc, UInt_t hInc);
163  virtual void SetWMState(Window_t winID, EInitialState state);
164  virtual void SetWMTransientHint(Window_t winID, Window_t mainWinID);
165  //"Window manager hints".
166  /////////////////////////////
169  ///////////////////////////////////////
170  //GUI-rendering part.
171  void DrawLineAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x1, Int_t y1, Int_t x2, Int_t y2);//Non-overrider.
172  virtual void DrawLine(Drawable_t wid, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2);
173  void DrawSegmentsAux(Drawable_t wid, const GCValues_t &gcVals, const Segment_t *segments, Int_t nSegments);//Non-overrider.
174  virtual void DrawSegments(Drawable_t wid, GContext_t gc, Segment_t *segments, Int_t nSegments);
175  void DrawRectangleAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x, Int_t y, UInt_t w, UInt_t h);//Non-overrider.
176  virtual void DrawRectangle(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h);
177  void FillRectangleAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x, Int_t y, UInt_t w, UInt_t h);//Non-overrider.
178  virtual void FillRectangle(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h);
179  void FillPolygonAux(Window_t wid, const GCValues_t &gcVals, const Point_t *polygon, Int_t nPoints) ;//Non-overrider.
180  virtual void FillPolygon(Window_t wid, GContext_t gc, Point_t *polygon, Int_t nPoints);
181  void CopyAreaAux(Drawable_t src, Drawable_t dst, const GCValues_t &gc, Int_t srcX, Int_t srcY, UInt_t width,
182  UInt_t height, Int_t dstX, Int_t dstY);//Non-overrider.
183  virtual void CopyArea(Drawable_t src, Drawable_t dst, GContext_t gc, Int_t srcX, Int_t srcY, UInt_t width,
184  UInt_t height, Int_t dstX, Int_t dstY);
185  void DrawStringAux(Drawable_t wid, const GCValues_t &gc, Int_t x, Int_t y, const char *s, Int_t len);//Non-overrider.
186  virtual void DrawString(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len);
187  void ClearAreaAux(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);//Non-overrider.
188  virtual void ClearArea(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);
189  virtual void ClearWindow(Window_t wid);
190  //End of GUI-rendering part.
191  ///////////////////////////////////////
194  ///////////////////////////////////////
195  //Pixmap management.
196  //-Used by TCanvas/TPad classes:
197  virtual Int_t OpenPixmap(UInt_t w, UInt_t h);
198  virtual Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h);
199  virtual void SelectPixmap(Int_t qpixid);
200  virtual void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos);
201  virtual void ClosePixmap();
202  //Used by GUI.
203  virtual Pixmap_t CreatePixmap(Drawable_t wid, UInt_t w, UInt_t h);
204  virtual Pixmap_t CreatePixmap(Drawable_t wid, const char *bitmap, UInt_t width, UInt_t height,
205  ULong_t foregroundColor, ULong_t backgroundColor,
206  Int_t depth);
207  virtual Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height);
208  virtual Pixmap_t CreateBitmap(Drawable_t wid, const char *bitmap,
209  UInt_t width, UInt_t height);
210  void DeletePixmapAux(Pixmap_t pixmapID);//Non-overrider.
211  virtual void DeletePixmap(Pixmap_t pixmapID);
213  //-"Qt ROOT".
214  virtual Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h);
215  virtual unsigned char *GetColorBits(Drawable_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);
216  //End of pixmap management.
217  /////////////////////////////
220  /////////////////////////////
221  //"Images" - emulation of XCreateImage/XPutImage etc.
222  virtual Drawable_t CreateImage(UInt_t width, UInt_t height);
223  virtual void GetImageSize(Drawable_t wid, UInt_t &width, UInt_t &height);
224  virtual void PutPixel(Drawable_t wid, Int_t x, Int_t y, ULong_t pixel);
225  virtual void PutImage(Drawable_t wid, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy,
226  Int_t x, Int_t y, UInt_t w, UInt_t h);
227  virtual void DeleteImage(Drawable_t img);
228  //"Images".
229  /////////////////////////////
231  /////////////////////////////
232  //Mouse (cursor, events, etc.)
233  virtual void GrabButton(Window_t wid, EMouseButton button, UInt_t modifier,
234  UInt_t evmask, Window_t confine, Cursor_t cursor,
235  Bool_t grab = kTRUE);
236  virtual void GrabPointer(Window_t wid, UInt_t evmask, Window_t confine,
237  Cursor_t cursor, Bool_t grab = kTRUE,
238  Bool_t owner_events = kTRUE);
239  virtual void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t);//Noop.
240  //End of mouse related part.
241  /////////////////////////////
243  /////////////////////////////
244  //Keyboard management.
245  virtual void SetKeyAutoRepeat(Bool_t on = kTRUE);
246  virtual void GrabKey(Window_t wid, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE);
247  virtual Int_t KeysymToKeycode(UInt_t keysym);
248  virtual Window_t GetInputFocus();
249  virtual void SetInputFocus(Window_t wid);
250  virtual void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym);
251  //End of keyboard management.
252  /////////////////////////////
254  /////////////////////////////
255  //Font management.
256  virtual FontStruct_t LoadQueryFont(const char *font_name);
257  virtual FontH_t GetFontHandle(FontStruct_t fs);
258  virtual void DeleteFont(FontStruct_t fs);
259  virtual Bool_t HasTTFonts() const;
260  virtual Int_t TextWidth(FontStruct_t font, const char *s, Int_t len);
261  virtual void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent);
262  virtual FontStruct_t GetFontStruct(FontH_t fh);
263  virtual void FreeFontStruct(FontStruct_t fs);
264  virtual char **ListFonts(const char *fontname, Int_t max, Int_t &count);
265  virtual void FreeFontNames(char **fontlist);
266  //End of font management.
267  /////////////////////////////
269  /////////////////////////////
270  //Color management.
271  virtual Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color);
272  virtual Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color);
273  virtual void QueryColor(Colormap_t cmap, ColorStruct_t &color);
274  virtual void FreeColor(Colormap_t cmap, ULong_t pixel);
275  virtual ULong_t GetPixel(Color_t cindex);
276  virtual void GetPlanes(Int_t &nplanes);
277  virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b);
278  virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b);
279  virtual Colormap_t GetColormap() const;
281  //End of color management.
282  /////////////////////////////
284  /////////////////////////////
285  //Context management.
286  virtual GContext_t CreateGC(Drawable_t wid, GCValues_t *gval);
287  virtual void SetForeground(GContext_t gc, ULong_t foreground);
288  virtual void ChangeGC(GContext_t gc, GCValues_t *gval);
289  virtual void CopyGC(GContext_t org, GContext_t dest, Mask_t mask);
290  virtual void GetGCValues(GContext_t gc, GCValues_t &gval);
291  virtual void DeleteGC(GContext_t gc);
292  //Context management.
293  /////////////////////////////
295  /////////////////////////////
296  //Cursors.
297  virtual Cursor_t CreateCursor(ECursor cursor);
298  virtual void SetCursor(Window_t wid, Cursor_t curid);
299  virtual void SetCursor(Int_t win, ECursor cursor);
300  virtual void QueryPointer(Int_t &x, Int_t &y);
301  virtual void QueryPointer(Window_t wid, Window_t &rootw, Window_t &childw,
302  Int_t &root_x, Int_t &root_y, Int_t &win_x,
303  Int_t &win_y, UInt_t &mask);
304  //Cursors.
305  /////////////////////////////
308  /////////////////////////////
309  //OpenGL.
310  //We have a mix of Handle_t, Window_t (both are long) and Int_t (this is an obsolete version).
311  virtual Double_t GetOpenGLScalingFactor();
312  virtual Window_t CreateOpenGLWindow(Window_t parentID, UInt_t width, UInt_t height, const std::vector<std::pair<UInt_t, Int_t> > &format);
313  virtual Handle_t CreateOpenGLContext(Window_t windowID, Handle_t sharedContext);
314  virtual void CreateOpenGLContext(Int_t wid);
315  virtual Bool_t MakeOpenGLContextCurrent(Handle_t ctx, Window_t windowID);
316  virtual Handle_t GetCurrentOpenGLContext();
317  virtual void FlushOpenGLBuffer(Handle_t ctxID);
319  virtual void DeleteOpenGLContext(Int_t ctxID);
320  //OpenGL.
321  /////////////////////////////
323  /////////////////////////////
324  //TPad's/TCanvas' specific - "double buffer" (off-screen rendering) + 'xor' mode.
325  virtual void SetDoubleBuffer(Int_t wid, Int_t mode);
326  virtual void SetDoubleBufferOFF();
327  virtual void SetDoubleBufferON();
328  virtual void SetDrawMode(EDrawMode mode);
329  //TPad's/TCanvas'.
330  /////////////////////////////
332  /////////////////////////////
333  //Event management.
334  virtual void SendEvent(Window_t wid, Event_t *ev);
335  virtual void NextEvent(Event_t &event);
336  virtual Int_t EventsPending();
337  virtual Bool_t CheckEvent(Window_t wid, EGEventType type, Event_t &ev);
338  virtual Handle_t GetNativeEvent() const;
339  //Event management.
340  /////////////////////////////
342  /////////////////////////////
343  //"Drag and drop" and "Copy and paste" (quotes are intentional :)).
345  //Names here are total mess, but this comes from TVirtualX interface.
346  virtual Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist);
348  virtual void SetPrimarySelectionOwner(Window_t wid);
349  virtual Bool_t SetSelectionOwner(Window_t windowID, Atom_t &selectionID);
350  virtual Window_t GetPrimarySelectionOwner();
352  virtual void ConvertPrimarySelection(Window_t wid, Atom_t clipboard, Time_t when);
353  virtual void ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&);
354  virtual Int_t GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t,
355  Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**);
356  virtual void GetPasteBuffer(Window_t wid, Atom_t atom, TString &text, Int_t &nchar,
357  Bool_t del);
359  virtual void ChangeProperty(Window_t wid, Atom_t property, Atom_t type,
360  UChar_t *data, Int_t len);
361  virtual void ChangeProperties(Window_t wid, Atom_t property, Atom_t type,
362  Int_t format, UChar_t *data, Int_t len);
363  virtual void DeleteProperty(Window_t, Atom_t&);
365  virtual void SetDNDAware(Window_t, Atom_t *);
366  virtual Bool_t IsDNDAware(Window_t win, Atom_t *typelist);
368  virtual void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist);
369  //FindRWindow is in DND part, since it looks for a DND aware window.
370  virtual Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd);
371  //"Drag and drop" and "Copy and paste".
372  /////////////////////////////
374  //The remaining bunch of functions is not sorted yet (and not implemented at the moment).
376  virtual UInt_t ExecCommand(TGWin32Command *code);
377  virtual void GetCharacterUp(Float_t &chupx, Float_t &chupy);
379  virtual Int_t GetDoubleBuffer(Int_t wid);
381  virtual Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t wid);
382  virtual Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y);
383  virtual Int_t RequestString(Int_t x, Int_t y, char *text);
385  virtual void SetCharacterUp(Float_t chupx, Float_t chupy);
386  virtual void SetClipOFF(Int_t wid);
387  virtual void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);
389  virtual void SetTextMagnitude(Float_t mgn);
391  virtual void Sync(Int_t mode);
392  virtual void Warp(Int_t ix, Int_t iy, Window_t wid);
393  virtual Int_t WriteGIF(char *name);
394  virtual void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname);
396  virtual Bool_t NeedRedraw(ULong_t tgwindow, Bool_t force);
399  virtual Bool_t CreatePictureFromFile(Drawable_t wid, const char *filename,
400  Pixmap_t &pict, Pixmap_t &pict_mask,
401  PictureAttributes_t &attr);
402  virtual Bool_t CreatePictureFromData(Drawable_t wid, char **data,
403  Pixmap_t &pict, Pixmap_t &pict_mask,
404  PictureAttributes_t &attr);
405  virtual Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data);
406  virtual void DeletePictureData(void *data);
407  virtual void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n);
410  virtual void Bell(Int_t percent);
412  virtual void WMDeleteNotify(Window_t wid);
414  virtual void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n);
415  virtual Region_t CreateRegion();
416  virtual void DestroyRegion(Region_t reg);
417  virtual void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest);
418  virtual Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding);
419  virtual void UnionRegion(Region_t rega, Region_t regb, Region_t result);
420  virtual void IntersectRegion(Region_t rega, Region_t regb, Region_t result);
421  virtual void SubtractRegion(Region_t rega, Region_t regb, Region_t result);
422  virtual void XorRegion(Region_t rega, Region_t regb, Region_t result);
423  virtual Bool_t EmptyRegion(Region_t reg);
424  virtual Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg);
425  virtual Bool_t EqualRegion(Region_t rega, Region_t regb);
426  virtual void GetRegionBox(Region_t reg, Rectangle_t *rect);
427  //
429  virtual Bool_t IsCmdThread()const { return kTRUE; }
431  //Non virtual, non-overriding functions.
432  ROOT::MacOSX::X11::EventTranslator *GetEventTranslator()const;
433  ROOT::MacOSX::X11::CommandBuffer *GetCommandBuffer()const;
435  void CocoaDrawON();
436  void CocoaDrawOFF();
437  Bool_t IsCocoaDraw()const;
439 protected:
440  void *GetCurrentContext();
444  std::unique_ptr<ROOT::MacOSX::Details::CocoaPrivate> fPimpl; //!
448  bool fDirectDraw;//Primitive in canvas tries to draw into window directly.
450 private:
451  bool MakeProcessForeground();
452  Atom_t FindAtom(const std::string &atomName, bool addIfNotFound);
453  void SetApplicationIcon();
456  std::vector<GCValues_t> fX11Contexts;
457  //
459  std::vector<std::string> fAtomToName;
461  std::map<Atom_t, Window_t> fSelectionOwners;
462  typedef std::map<Atom_t, Window_t>::iterator selection_iterator;
464  bool fSetApp;
465  mutable bool fDisplayShapeChanged;
468 public:
471 private:
472  //I'd prefer to use = delete syntax from C++0x11, but this file is processed by CINT.
473  TGCocoa(const TGCocoa &rhs);
474  TGCocoa &operator = (const TGCocoa &rhs);
476  ClassDef(TGCocoa, 0); //TVirtualX for MacOS X.
477 };
479 #endif
Handle_t FontStruct_t
Definition: GuiTypes.h:38
Semi-Abstract base class defining a generic interface to the underlying, low level, native graphics backend (X11, Win32, MacOS, OpenGL...).
Definition: TVirtualX.h:58
std::unique_ptr< ROOT::MacOSX::Details::CocoaPrivate > fPimpl
Definition: TGCocoa.h:444
bool fDisplayShapeChanged
Definition: TGCocoa.h:465
std::vector< GCValues_t > fX11Contexts
Definition: TGCocoa.h:456
Definition: GuiTypes.h:344
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
bool fSetApp
Definition: TGCocoa.h:464
void GetWindowAttributes(NSObject< X11Window > *window, WindowAttributes_t *dst)
float Float_t
Definition: RtypesCore.h:53
UInt_t Mask_t
Definition: GuiTypes.h:40
virtual Bool_t IsCmdThread() const
Definition: TGCocoa.h:429
ULong_t Time_t
Definition: GuiTypes.h:41
TH1 * h
Definition: legend2.C:5
Definition: GuiTypes.h:58
Handle_t Cursor_t
Definition: GuiTypes.h:33
Int_t fCocoaDraw
Definition: TGCocoa.h:445
Handle_t GContext_t
Definition: GuiTypes.h:37
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
std::map< Atom_t, Window_t >::iterator selection_iterator
Definition: TGCocoa.h:462
Handle_t Drawable_t
Definition: GuiTypes.h:30
static std::string format(double x, double y, int digits, int width)
Definition: TVirtualX.h:44
ROOT::MacOSX::X11::name_to_atom_map fNameToAtom
Definition: TGCocoa.h:458
Handle_t Display_t
Definition: GuiTypes.h:26
Handle_t FontH_t
Definition: GuiTypes.h:34
static const double x2[5]
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:297
NSPoint TranslateCoordinates(NSView< X11Window > *fromView, NSView< X11Window > *toView, NSPoint sourcePoint)
Handle_t Atom_t
Definition: GuiTypes.h:36
short Color_t
Definition: RtypesCore.h:79
Drawable_t fSelectedDrawable
Definition: TGCocoa.h:442
point * points
Definition: X3DBuffer.c:20
Definition: GuiTypes.h:213
TRandom2 r(17)
static Atom_t fgDeleteWindowAtom
Definition: TGCocoa.h:469
bool fDirectDraw
Definition: TGCocoa.h:448
Handle_t Visual_t
Definition: GuiTypes.h:27
std::map< Atom_t, Window_t > fSelectionOwners
Definition: TGCocoa.h:461
unsigned int UInt_t
Definition: RtypesCore.h:42
ROOT::MacOSX::X11::Rectangle fDisplayRect
Definition: TGCocoa.h:466
lv DrawLine(0.33, 0.0, 0.33, 1.0)
Handle_t Colormap_t
Definition: GuiTypes.h:32
long Long_t
Definition: RtypesCore.h:50
bool fForegroundProcess
Definition: TGCocoa.h:455
static const double x1[5]
double Double_t
Definition: RtypesCore.h:55
TText * text
int type
Definition: TGX11.cxx:120
unsigned long ULong_t
Definition: RtypesCore.h:51
Double_t y[n]
Definition: legend1.C:17
static void GetPixel(int y, int width, Byte_t *scline)
Get pixels in line y and put in array scline.
Definition: TGWin32.cxx:4288
NSCursor * CreateCursor(ECursor currentCursor)
Binding & operator=(OUT(*fun)(void))
EDrawMode fDrawMode
Definition: TGCocoa.h:447
#define org(otri, vertexptr)
Definition: triangle.c:1037
Handle_t Window_t
Definition: GuiTypes.h:28
This class implements TVirtualX interface for MacOS X, using Cocoa and Quartz 2D. ...
Definition: TGCocoa.h:58
Definition: file.py:1
#define dest(otri, vertexptr)
Definition: triangle.c:1040
Handle_t Region_t
Definition: GuiTypes.h:31
Handle_t Pixmap_t
Definition: GuiTypes.h:29
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
std::vector< std::string > fAtomToName
Definition: TGCocoa.h:459
double result[121]
unsigned char UChar_t
Definition: RtypesCore.h:34
std::map< std::string, Atom_t > name_to_atom_map
Definition: X11Atoms.h:14
const Bool_t kTRUE
Definition: RtypesCore.h:91
const Int_t n
Definition: legend1.C:16
ULong_t Handle_t
Definition: GuiTypes.h:25