Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGCocoa.h
Go to the documentation of this file.
1// @(#)root/graf2d:$Id$
2// Author: Timur Pocheptsov 22/11/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_TGCocoa
14#define ROOT_TGCocoa
15
16#include "CocoaGuiTypes.h"
17#include "TVirtualX.h"
18
19#include <map>
20#include <memory>
21#include <string>
22#include <utility>
23#include <vector>
24
25/// \defgroup cocoa Cocoa backend
26/// \brief Interface to MacOS native graphics system.
27/// \ingroup GraphicsBackends
28
29/** \class TGCocoa
30\ingroup cocoa
31
32This class implements TVirtualX interface for MacOS X, using Cocoa and Quartz 2D.
33
34TVirtualX is a typical fat interface, it's a "C++ wrapper" for
35X11 library. It's a union of several orthogonal interfaces like:
36color management, window management, pixmap management, cursors,
37events, images, drag and drop, font management, gui-rendering,
38non-gui graphics, etc. etc.
39*/
40
41namespace ROOT {
42namespace MacOSX {
43
44namespace X11 {
45class EventTranslator;
46class CommandBuffer;
47
48}
49
50namespace Details {
51class CocoaPrivate;
52}
53
54}
55}
56
57class TGCocoa : public TVirtualX {
58public:
59 TGCocoa();
60 TGCocoa(const char *name, const char *title);
61
62 ~TGCocoa() override;
63
64 //TVirtualX final overriders.
65 //I split them in a group not to get lost in this fat interface.
66
67 ///////////////////////////////////////
68 //General.
69 Bool_t Init(void *display) override;
70 Int_t OpenDisplay(const char *displayName) override;
71 const char *DisplayName(const char *) override;
72 Int_t SupportsExtension(const char *extensionName) const override;
73 void CloseDisplay() override;
74 Display_t GetDisplay() const override;
75 Visual_t GetVisual() const override;
76 Int_t GetScreen() const override;
77 UInt_t ScreenWidthMM() const override;
78 Int_t GetDepth() const override;
79 void Update(Int_t mode) override;
80
81 //Non-virtual functions.
82 void ReconfigureDisplay();
84 //End of general.
85 ///////////////////////////////////////
86
87 ///////////////////////////////////////
88 //Window management part:
89 Window_t GetDefaultRootWindow() const override;
90 //-Functions used by TCanvas/TPad (work with window, selected by SelectWindow).
91 Int_t InitWindow(ULong_t window) override;
92 Window_t GetWindowID(Int_t wid) override;//TGCocoa simply returns wid.
93 void SelectWindow(Int_t wid) override;
94 void ClearWindow() override;
95 void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override;
96 void MoveWindow(Int_t wid, Int_t x, Int_t y) override;
97 void RescaleWindow(Int_t wid, UInt_t w, UInt_t h) override;
98 void ResizeWindow(Int_t wid) override;
99 void UpdateWindow(Int_t mode) override;
100 Window_t GetCurrentWindow() const override;
101 void CloseWindow() override;
102 Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h) override; //-"Qt ROOT".
103 void RemoveWindow(ULong_t qwid) override; //-"Qt ROOT".
104
105 //---- Methods used for new graphics -----
106 WinContext_t GetWindowContext(Int_t wid) override;
108 void SetDrawModeW(WinContext_t wctxt, EDrawMode mode) override;
109 EDrawMode GetDrawModeW(WinContext_t wctxt) override;
110 void ClearWindowW(WinContext_t wctxt) override;
111 void UpdateWindowW(WinContext_t wctxt, Int_t mode) override;
112 void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos) override;
113
114 //-Functions used by GUI.
116 UInt_t w, UInt_t h, UInt_t border,
117 Int_t depth, UInt_t clss,
118 void *visual, SetWindowAttributes_t *attr,
119 UInt_t wtype) override;
120
121
122 void DestroyWindow(Window_t wid) override;
123 void DestroySubwindows(Window_t wid) override;
124
125 void GetWindowAttributes(Window_t wid, WindowAttributes_t &attr) override;
126 void ChangeWindowAttributes(Window_t wid, SetWindowAttributes_t *attr) override;
127 void SelectInput(Window_t wid, UInt_t evmask) override;//Can also be in events-related part.
128
129 void ReparentChild(Window_t wid, Window_t pid, Int_t x, Int_t y);//Non-overrider.
130 void ReparentTopLevel(Window_t wid, Window_t pid, Int_t x, Int_t y);//Non-overrider.
131 void ReparentWindow(Window_t wid, Window_t pid, Int_t x, Int_t y) override;
132
133 void MapWindow(Window_t wid) override;
134 void MapSubwindows(Window_t wid) override;
135 void MapRaised(Window_t wid) override;
136 void UnmapWindow(Window_t wid) override;
137 void RaiseWindow(Window_t wid) override;
138 void LowerWindow(Window_t wid) override;
139
140 void MoveWindow(Window_t wid, Int_t x, Int_t y) override;
141 void MoveResizeWindow(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
142 void ResizeWindow(Window_t wid, UInt_t w, UInt_t h) override;
143 void IconifyWindow(Window_t wid) override;
144 void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x,Int_t src_y,
145 Int_t &dest_x, Int_t &dest_y, Window_t &child) override;
146 void GetWindowSize(Drawable_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override;
147
148
149 void SetWindowBackground(Window_t wid, ULong_t color) override;
150 void SetWindowBackgroundPixmap(Window_t wid, Pixmap_t pxm) override;
151
152 Window_t GetParent(Window_t wid) const override;
153
154 void SetWindowName(Window_t wid, char *name) override;
155 void SetIconName(Window_t wid, char *name) override;
156 void SetIconPixmap(Window_t wid, Pixmap_t pix) override;
157 void SetClassHints(Window_t wid, char *className, char *resourceName) override;
158 //Non-rectangular window:
159 void ShapeCombineMask(Window_t wid, Int_t x, Int_t y, Pixmap_t mask) override;
160
161 //End window-management part.
162 ///////////////////////////////////////
163
164 /////////////////////////////
165 //Set of "Window manager hints".
166 void SetMWMHints(Window_t winID, UInt_t value, UInt_t decorators, UInt_t inputMode) override;
167 void SetWMPosition(Window_t winID, Int_t x, Int_t y) override;
168 void SetWMSize(Window_t winID, UInt_t w, UInt_t h) override;
169 void SetWMSizeHints(Window_t winID, UInt_t wMin, UInt_t hMin, UInt_t wMax, UInt_t hMax, UInt_t wInc, UInt_t hInc) override;
170 void SetWMState(Window_t winID, EInitialState state) override;
171 void SetWMTransientHint(Window_t winID, Window_t mainWinID) override;
172 //"Window manager hints".
173 /////////////////////////////
174
175
176 ///////////////////////////////////////
177 //GUI-rendering part.
178 void DrawLineAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x1, Int_t y1, Int_t x2, Int_t y2);//Non-overrider.
179 void DrawLine(Drawable_t wid, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override;
180 void DrawSegmentsAux(Drawable_t wid, const GCValues_t &gcVals, const Segment_t *segments, Int_t nSegments);//Non-overrider.
181 void DrawSegments(Drawable_t wid, GContext_t gc, Segment_t *segments, Int_t nSegments) override;
182 void DrawRectangleAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x, Int_t y, UInt_t w, UInt_t h);//Non-overrider.
183 void DrawRectangle(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
184 void FillRectangleAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x, Int_t y, UInt_t w, UInt_t h);//Non-overrider.
185 void FillRectangle(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
186 void FillPolygonAux(Window_t wid, const GCValues_t &gcVals, const Point_t *polygon, Int_t nPoints) ;//Non-overrider.
187 void FillPolygon(Window_t wid, GContext_t gc, Point_t *polygon, Int_t nPoints) override;
188 void CopyAreaAux(Drawable_t src, Drawable_t dst, const GCValues_t &gc, Int_t srcX, Int_t srcY, UInt_t width,
189 UInt_t height, Int_t dstX, Int_t dstY);//Non-overrider.
190 void CopyArea(Drawable_t src, Drawable_t dst, GContext_t gc, Int_t srcX, Int_t srcY, UInt_t width,
191 UInt_t height, Int_t dstX, Int_t dstY) override;
192 void DrawStringAux(Drawable_t wid, const GCValues_t &gc, Int_t x, Int_t y, const char *s, Int_t len);//Non-overrider.
193 void DrawString(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len) override;
194 void ClearAreaAux(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h);//Non-overrider.
195 void ClearArea(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
196 void ClearWindow(Window_t wid) override;
197 //End of GUI-rendering part.
198 ///////////////////////////////////////
199
200
201 ///////////////////////////////////////
202 //Pixmap management.
203 //-Used by TCanvas/TPad classes:
204 Int_t OpenPixmap(UInt_t w, UInt_t h) override;
205 Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h) override;
206 void SelectPixmap(Int_t qpixid) override;
207 void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos) override;
208 void ClosePixmap() override;
209 //Used by GUI.
210 Pixmap_t CreatePixmap(Drawable_t wid, UInt_t w, UInt_t h) override;
211 Pixmap_t CreatePixmap(Drawable_t wid, const char *bitmap, UInt_t width, UInt_t height,
212 ULong_t foregroundColor, ULong_t backgroundColor,
213 Int_t depth) override;
214 Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height) override;
215 Pixmap_t CreateBitmap(Drawable_t wid, const char *bitmap,
216 UInt_t width, UInt_t height) override;
217 void DeletePixmapAux(Pixmap_t pixmapID);//Non-overrider.
218 void DeletePixmap(Pixmap_t pixmapID) override;
219
220 //-"Qt ROOT".
221 Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h) override;
222 unsigned char *GetColorBits(Drawable_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
223 //End of pixmap management.
224 /////////////////////////////
225
226
227 /////////////////////////////
228 //"Images" - emulation of XCreateImage/XPutImage etc.
229 Drawable_t CreateImage(UInt_t width, UInt_t height) override;
230 void GetImageSize(Drawable_t wid, UInt_t &width, UInt_t &height) override;
231 void PutPixel(Drawable_t wid, Int_t x, Int_t y, ULong_t pixel) override;
232 void PutImage(Drawable_t wid, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy,
233 Int_t x, Int_t y, UInt_t w, UInt_t h) override;
234 void DeleteImage(Drawable_t img) override;
235 //"Images".
236 /////////////////////////////
237
238 /////////////////////////////
239 //Mouse (cursor, events, etc.)
240 void GrabButton(Window_t wid, EMouseButton button, UInt_t modifier,
241 UInt_t evmask, Window_t confine, Cursor_t cursor,
242 Bool_t grab = kTRUE) override;
243 void GrabPointer(Window_t wid, UInt_t evmask, Window_t confine,
244 Cursor_t cursor, Bool_t grab = kTRUE,
245 Bool_t owner_events = kTRUE) override;
246 void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t) override;//Noop.
247 //End of mouse related part.
248 /////////////////////////////
249
250 /////////////////////////////
251 //Keyboard management.
252 void SetKeyAutoRepeat(Bool_t on = kTRUE) override;
253 void GrabKey(Window_t wid, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE) override;
254 Int_t KeysymToKeycode(UInt_t keysym) override;
255 Window_t GetInputFocus() override;
256 void SetInputFocus(Window_t wid) override;
257 void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym) override;
258 //End of keyboard management.
259 /////////////////////////////
260
261 /////////////////////////////
262 //Font management.
263 FontStruct_t LoadQueryFont(const char *font_name) override;
265 void DeleteFont(FontStruct_t fs) override;
266 Bool_t HasTTFonts() const override;
267 Int_t TextWidth(FontStruct_t font, const char *s, Int_t len) override;
268 void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent) override;
270 void FreeFontStruct(FontStruct_t fs) override;
271 char **ListFonts(const char *fontname, Int_t max, Int_t &count) override;
272 void FreeFontNames(char **fontlist) override;
273 //End of font management.
274 /////////////////////////////
275
276 /////////////////////////////
277 //Color management.
278 Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color) override;
279 Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color) override;
280 void QueryColor(Colormap_t cmap, ColorStruct_t &color) override;
281 void FreeColor(Colormap_t cmap, ULong_t pixel) override;
282 ULong_t GetPixel(Color_t cindex) override;
283 void GetPlanes(Int_t &nplanes) override;
284 void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b) override;
285 void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b) override;
286 Colormap_t GetColormap() const override;
287
288 //End of color management.
289 /////////////////////////////
290
291 /////////////////////////////
292 //Context management.
293 GContext_t CreateGC(Drawable_t wid, GCValues_t *gval) override;
294 void SetForeground(GContext_t gc, ULong_t foreground) override;
295 void ChangeGC(GContext_t gc, GCValues_t *gval) override;
296 void CopyGC(GContext_t org, GContext_t dest, Mask_t mask) override;
297 void GetGCValues(GContext_t gc, GCValues_t &gval) override;
298 void DeleteGC(GContext_t gc) override;
299 //Context management.
300 /////////////////////////////
301
302 /////////////////////////////
303 //Cursors.
304 Cursor_t CreateCursor(ECursor cursor) override;
305 void SetCursor(Window_t wid, Cursor_t curid) override;
306 void SetCursor(Int_t win, ECursor cursor) override;
307 void QueryPointer(Int_t &x, Int_t &y) override;
308 void QueryPointer(Window_t wid, Window_t &rootw, Window_t &childw,
309 Int_t &root_x, Int_t &root_y, Int_t &win_x,
310 Int_t &win_y, UInt_t &mask) override;
311 //Cursors.
312 /////////////////////////////
313
314
315 /////////////////////////////
316 //OpenGL.
317 //We have a mix of Handle_t, Window_t (both are long) and Int_t (this is an obsolete version).
319 Window_t CreateOpenGLWindow(Window_t parentID, UInt_t width, UInt_t height, const std::vector<std::pair<UInt_t, Int_t> > &format) override;
320 Handle_t CreateOpenGLContext(Window_t windowID, Handle_t sharedContext) override;
321 void CreateOpenGLContext(Int_t wid) override;
322 Bool_t MakeOpenGLContextCurrent(Handle_t ctx, Window_t windowID) override;
324 void FlushOpenGLBuffer(Handle_t ctxID) override;
325
326 void DeleteOpenGLContext(Int_t ctxID) override;
327 //OpenGL.
328 /////////////////////////////
329
330 /////////////////////////////
331 //TPad's/TCanvas' specific - "double buffer" (off-screen rendering) + 'xor' mode.
332 void SetDoubleBuffer(Int_t wid, Int_t mode) override;
333 void SetDoubleBufferOFF() override;
334 void SetDoubleBufferON() override;
335 void SetDrawMode(EDrawMode mode) override;
336 //TPad's/TCanvas'.
337 /////////////////////////////
338
339 /////////////////////////////
340 //Event management.
341 void SendEvent(Window_t wid, Event_t *ev) override;
342 void NextEvent(Event_t &event) override;
343 Int_t EventsPending() override;
344 Bool_t CheckEvent(Window_t wid, EGEventType type, Event_t &ev) override;
345 Handle_t GetNativeEvent() const override;
346 //Event management.
347 /////////////////////////////
348
349 /////////////////////////////
350 //"Drag and drop" and "Copy and paste" (quotes are intentional :)).
351
352 //Names here are total mess, but this comes from TVirtualX interface.
353 Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist) override;
354
355 void SetPrimarySelectionOwner(Window_t wid) override;
356 Bool_t SetSelectionOwner(Window_t windowID, Atom_t &selectionID) override;
358
359 void ConvertPrimarySelection(Window_t wid, Atom_t clipboard, Time_t when) override;
360 void ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&) override;
362 Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**) override;
363 void GetPasteBuffer(Window_t wid, Atom_t atom, TString &text, Int_t &nchar,
364 Bool_t del) override;
365
366 void ChangeProperty(Window_t wid, Atom_t property, Atom_t type,
367 UChar_t *data, Int_t len) override;
368 void ChangeProperties(Window_t wid, Atom_t property, Atom_t type,
369 Int_t format, UChar_t *data, Int_t len) override;
370 void DeleteProperty(Window_t, Atom_t&) override;
371
372 void SetDNDAware(Window_t, Atom_t *) override;
373 Bool_t IsDNDAware(Window_t win, Atom_t *typelist) override;
374
375 void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist) override;
376 //FindRWindow is in DND part, since it looks for a DND aware window.
377 Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd) override;
378 //"Drag and drop" and "Copy and paste".
379 /////////////////////////////
380
381 //The remaining bunch of functions is not sorted yet (and not implemented at the moment).
382
383 UInt_t ExecCommand(TGWin32Command *code) override;
384 void GetCharacterUp(Float_t &chupx, Float_t &chupy) override;
385
386 Int_t GetDoubleBuffer(Int_t wid) override;
387
388 Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t wid) override;
389 Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y) override;
390 Int_t RequestString(Int_t x, Int_t y, char *text) override;
391
392 void SetCharacterUp(Float_t chupx, Float_t chupy) override;
393 void SetClipOFF(Int_t wid) override;
394 void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
395
396 void SetTextMagnitude(Float_t mgn) override;
397
398 void Sync(Int_t mode) override;
399 void Warp(Int_t ix, Int_t iy, Window_t wid) override;
400 Int_t WriteGIF(char *name) override;
401 void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname) override;
402
403 Bool_t NeedRedraw(ULong_t tgwindow, Bool_t force) override;
404
405
406 Bool_t CreatePictureFromFile(Drawable_t wid, const char *filename,
407 Pixmap_t &pict, Pixmap_t &pict_mask,
408 PictureAttributes_t &attr) override;
409 Bool_t CreatePictureFromData(Drawable_t wid, char **data,
410 Pixmap_t &pict, Pixmap_t &pict_mask,
411 PictureAttributes_t &attr) override;
412 Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data) override;
413 void DeletePictureData(void *data) override;
414 void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n) override;
415
416
417 void Bell(Int_t percent) override;
418
419 void WMDeleteNotify(Window_t wid) override;
420
421 void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n) override;
422 Region_t CreateRegion() override;
423 void DestroyRegion(Region_t reg) override;
424 void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest) override;
425 Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding) override;
426 void UnionRegion(Region_t rega, Region_t regb, Region_t result) override;
427 void IntersectRegion(Region_t rega, Region_t regb, Region_t result) override;
428 void SubtractRegion(Region_t rega, Region_t regb, Region_t result) override;
429 void XorRegion(Region_t rega, Region_t regb, Region_t result) override;
430 Bool_t EmptyRegion(Region_t reg) override;
431 Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg) override;
432 Bool_t EqualRegion(Region_t rega, Region_t regb) override;
433 void GetRegionBox(Region_t reg, Rectangle_t *rect) override;
434 //
435
436 Bool_t IsCmdThread() const override { return kTRUE; }
437
438 //Non virtual, non-overriding functions.
441
442 void CocoaDrawON();
443 void CocoaDrawOFF();
444 Bool_t IsCocoaDraw() const;
445
446protected:
447 void *GetCurrentContext();
448
450
451 std::unique_ptr<ROOT::MacOSX::Details::CocoaPrivate> fPimpl; ///<!
453
455 bool fDirectDraw;//Primitive in canvas tries to draw into window directly.
456
457private:
459 Atom_t FindAtom(const std::string &atomName, bool addIfNotFound);
460 void SetApplicationIcon();
461
463 std::vector<GCValues_t> fX11Contexts;
464 //
465 std::map<std::string, Atom_t> fNameToAtom;
466 std::vector<std::string> fAtomToName;
467
468 std::map<Atom_t, Window_t> fSelectionOwners;
469 typedef std::map<Atom_t, Window_t>::iterator selection_iterator;
470
474
475public:
477
478 TGCocoa(const TGCocoa &rhs) = delete;
479 TGCocoa &operator = (const TGCocoa &rhs) = delete;
480 TGCocoa(TGCocoa &&rhs) = delete;
481 TGCocoa &operator = (TGCocoa &&rhs) = delete;
482
483 ClassDefOverride(TGCocoa, 0); //TVirtualX for MacOS X.
484};
485
486#endif
Handle_t WinContext_t
Window drawing context.
Definition GuiTypes.h:30
EGEventType
Definition GuiTypes.h:60
Handle_t Cursor_t
Cursor handle.
Definition GuiTypes.h:35
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index).
Definition GuiTypes.h:36
Handle_t Visual_t
Visual handle.
Definition GuiTypes.h:28
Handle_t Display_t
Display handle.
Definition GuiTypes.h:27
Handle_t Pixmap_t
Pixmap handle.
Definition GuiTypes.h:31
ULong_t Time_t
Event time.
Definition GuiTypes.h:43
EInitialState
Initial window mapping state.
Definition GuiTypes.h:346
Handle_t Drawable_t
Drawable handle.
Definition GuiTypes.h:32
Handle_t Colormap_t
Colormap handle.
Definition GuiTypes.h:34
Handle_t Atom_t
WM token.
Definition GuiTypes.h:38
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:39
UInt_t Mask_t
Structure mask type.
Definition GuiTypes.h:42
ECursor
Definition GuiTypes.h:373
Handle_t Region_t
Region handle.
Definition GuiTypes.h:33
Handle_t FontStruct_t
Pointer to font structure.
Definition GuiTypes.h:40
EMouseButton
Button names.
Definition GuiTypes.h:215
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
ULongptr_t Handle_t
Generic resource handle.
Definition GuiTypes.h:26
ROOT::R::TRInterface & r
Definition Object.C:4
#define b(i)
Definition RSha256.hxx:100
#define g(i)
Definition RSha256.hxx:105
#define h(i)
Definition RSha256.hxx:106
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
Definition RtypesCore.h:52
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
Definition RtypesCore.h:69
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
Definition RtypesCore.h:68
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
short Color_t
Color number (short).
Definition RtypesCore.h:99
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
char name[80]
Definition TGX11.cxx:148
point * points
Definition X3DBuffer.c:22
void DeleteFont(FontStruct_t fs) override
Explicitly deletes the font structure "fs" obtained via LoadQueryFont().
Definition TGCocoa.mm:2896
Int_t WriteGIF(char *name) override
Writes the current window into GIF file.
Definition TGCocoa.mm:4231
void SetCharacterUp(Float_t chupx, Float_t chupy) override
Sets character up vector.
Definition TGCocoa.mm:4164
Bool_t IsDNDAware(Window_t win, Atom_t *typelist) override
Checks if the Window is DND aware, and knows any of the DND formats passed in argument.
Definition TGCocoa.mm:4037
Pixmap_t CreatePixmap(Drawable_t wid, UInt_t w, UInt_t h) override
Creates a pixmap of the specified width and height and returns a pixmap ID that identifies it.
Definition TGCocoa.mm:2488
void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x, Int_t src_y, Int_t &dest_x, Int_t &dest_y, Window_t &child) override
Translates coordinates in one window to the coordinate space of another window.
Definition TGCocoa.mm:1389
void GetRegionBox(Region_t reg, Rectangle_t *rect) override
Returns smallest enclosing rectangle.
Definition TGCocoa.mm:4454
Window_t GetParent(Window_t wid) const override
Returns the parent of the window "id".
Definition TGCocoa.mm:1558
Double_t GetOpenGLScalingFactor() override
On a HiDPI resolution it can be > 1., this means glViewport should use scaled width and height.
Definition TGCocoa.mm:3258
void GetCharacterUp(Float_t &chupx, Float_t &chupy) override
Returns character up vector.
Definition TGCocoa.mm:4105
UInt_t ScreenWidthMM() const override
Returns the width of the screen in millimeters.
Definition TGCocoa.mm:550
std::vector< GCValues_t > fX11Contexts
Definition TGCocoa.h:463
void GrabPointer(Window_t wid, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE, Bool_t owner_events=kTRUE) override
Establishes an active pointer grab.
Definition TGCocoa.mm:2739
void DrawLineAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Definition TGCocoa.mm:1751
~TGCocoa() override
Definition TGCocoa.mm:481
EDrawMode GetDrawModeW(WinContext_t wctxt) override
Returns window draw mode.
Definition TGCocoa.mm:708
TGCocoa()
Definition TGCocoa.mm:430
Int_t GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t, Atom_t *, Int_t *, ULong_t *, ULong_t *, unsigned char **) override
Returns the actual type of the property; the actual format of the property; the number of 8-bit,...
Definition TGCocoa.mm:3786
void ReparentTopLevel(Window_t wid, Window_t pid, Int_t x, Int_t y)
Definition TGCocoa.mm:1143
void SetDoubleBufferON() override
Turns double buffer mode on.
Definition TGCocoa.mm:3534
void PutPixel(Drawable_t wid, Int_t x, Int_t y, ULong_t pixel) override
Overwrites the pixel in the image with the specified pixel value.
Definition TGCocoa.mm:2661
Bool_t IsCocoaDraw() const
Definition TGCocoa.mm:4487
void GetWindowSize(Drawable_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Returns the location and the size of window "id".
Definition TGCocoa.mm:1464
void SetApplicationIcon()
Definition TGCocoa.mm:4581
void SetWindowBackgroundPixmap(Window_t wid, Pixmap_t pxm) override
Sets the background pixmap of the window "id" to the specified pixmap "pxm".
Definition TGCocoa.mm:1512
bool fDisplayShapeChanged
Definition TGCocoa.h:472
void DeleteOpenGLContext(Int_t ctxID) override
Deletes OpenGL context for window "wid".
Definition TGCocoa.mm:3480
Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color) override
Allocates a read-only colormap entry corresponding to the closest RGB value supported by the hardware...
Definition TGCocoa.mm:2978
Bool_t EqualRegion(Region_t rega, Region_t regb) override
Returns kTRUE if the two regions have the same offset, size, and shape.
Definition TGCocoa.mm:4446
void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos) override
Copies the pixmap "wid" at the position [xpos,ypos] in the current window.
Definition TGCocoa.mm:2432
void FreeFontStruct(FontStruct_t fs) override
Frees the font structure "fs".
Definition TGCocoa.mm:2935
void DestroySubwindows(Window_t wid) override
The DestroySubwindows function destroys all inferior windows of the specified window,...
Definition TGCocoa.mm:1015
Int_t OpenPixmap(UInt_t w, UInt_t h) override
Creates a pixmap of the width "w" and height "h" you specified.
Definition TGCocoa.mm:2385
Int_t TextWidth(FontStruct_t font, const char *s, Int_t len) override
Return length of the string "s" in pixels. Size depends on font.
Definition TGCocoa.mm:2910
void ResizeWindow(Int_t wid) override
Resizes the window "wid" if necessary.
Definition TGCocoa.mm:843
void UpdateWindowW(WinContext_t wctxt, Int_t mode) override
Update specified window.
Definition TGCocoa.mm:739
void FillRectangleAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x, Int_t y, UInt_t w, UInt_t h)
Definition TGCocoa.mm:1943
Atom_t FindAtom(const std::string &atomName, bool addIfNotFound)
Definition TGCocoa.mm:4563
ROOT::MacOSX::X11::CommandBuffer * GetCommandBuffer() const
Definition TGCocoa.mm:4468
void ChangeGC(GContext_t gc, GCValues_t *gval) override
Changes the components specified by the mask in gval for the specified GC.
Definition TGCocoa.mm:3073
void CopyAreaAux(Drawable_t src, Drawable_t dst, const GCValues_t &gc, Int_t srcX, Int_t srcY, UInt_t width, UInt_t height, Int_t dstX, Int_t dstY)
Definition TGCocoa.mm:2155
void SetDoubleBufferOFF() override
Turns double buffer mode off.
Definition TGCocoa.mm:3517
bool fForegroundProcess
Definition TGCocoa.h:462
void DrawRectangleAux(Drawable_t wid, const GCValues_t &gcVals, Int_t x, Int_t y, UInt_t w, UInt_t h)
Definition TGCocoa.mm:1874
void Bell(Int_t percent) override
Sets the sound bell. Percent is loudness from -100% to 100%.
Definition TGCocoa.mm:4332
void SetWMState(Window_t winID, EInitialState state) override
Sets the initial state of the window "id": either kNormalState or kIconicState.
Definition TGCocoa.mm:1707
Window_t GetWindowID(Int_t wid) override
Returns the X11 window identifier.
Definition TGCocoa.mm:668
void SetWMSizeHints(Window_t winID, UInt_t wMin, UInt_t hMin, UInt_t wMax, UInt_t hMax, UInt_t wInc, UInt_t hInc) override
Gives the window manager minimum and maximum size hints of the window "id".
Definition TGCocoa.mm:1691
void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym) override
Converts the keycode from the event structure to a key symbol (according to the modifiers specified i...
Definition TGCocoa.mm:2849
Cursor_t CreateCursor(ECursor cursor) override
Creates the specified cursor.
Definition TGCocoa.mm:3168
Window_t GetCurrentWindow() const override
pointer to the current internal window used in canvas graphics
Definition TGCocoa.mm:887
void IntersectRegion(Region_t rega, Region_t regb, Region_t result) override
Computes the intersection of two regions.
Definition TGCocoa.mm:4402
std::unique_ptr< ROOT::MacOSX::Details::CocoaPrivate > fPimpl
!
Definition TGCocoa.h:451
void SetWindowName(Window_t wid, char *name) override
Sets the window name.
Definition TGCocoa.mm:1571
void Warp(Int_t ix, Int_t iy, Window_t wid) override
Sets the pointer position.
Definition TGCocoa.mm:4202
void IconifyWindow(Window_t wid) override
Iconifies the window "id".
Definition TGCocoa.mm:1362
Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h) override
Resizes the specified pixmap "wid".
Definition TGCocoa.mm:2405
void * GetCurrentContext()
Definition TGCocoa.mm:4493
Window_t GetInputFocus() override
Returns the window id of the window having the input focus.
Definition TGCocoa.mm:2829
Colormap_t GetColormap() const override
Returns handle to colormap.
Definition TGCocoa.mm:3040
void DrawRectangle(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Draws rectangle outlines of [x,y] [x+w,y] [x+w,y+h] [x,y+h].
Definition TGCocoa.mm:1908
void FreeColor(Colormap_t cmap, ULong_t pixel) override
Frees color cell with specified pixel value.
Definition TGCocoa.mm:2997
Bool_t NeedRedraw(ULong_t tgwindow, Bool_t force) override
Notify the low level GUI layer ROOT requires "tgwindow" to be updated.
Definition TGCocoa.mm:4250
void DeleteGC(GContext_t gc) override
Deletes the specified GC "gc".
Definition TGCocoa.mm:3160
void ClearWindowW(WinContext_t wctxt) override
Clear specified window.
Definition TGCocoa.mm:716
EDrawMode fDrawMode
Definition TGCocoa.h:454
void SetDNDAware(Window_t, Atom_t *) override
Add XdndAware property and the list of drag and drop types to the Window win.
Definition TGCocoa.mm:3986
Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h) override
Registers a pixmap created by TGLManager as a ROOT pixmap.
Definition TGCocoa.mm:2610
void DestroyWindow(Window_t wid) override
Destroys the window "id" as well as all of its subwindows.
Definition TGCocoa.mm:957
void ShapeCombineMask(Window_t wid, Int_t x, Int_t y, Pixmap_t mask) override
The Non-rectangular Window Shape Extension adds non-rectangular windows to the System.
Definition TGCocoa.mm:1605
void GetPlanes(Int_t &nplanes) override
Returns the maximum number of planes.
Definition TGCocoa.mm:3018
void UpdateWindow(Int_t mode) override
Updates or synchronises client and server once (not permanent).
Definition TGCocoa.mm:866
void CocoaDrawOFF()
Definition TGCocoa.mm:4480
Int_t SupportsExtension(const char *extensionName) const override
Returns 1 if window system server supports extension given by the argument, returns 0 in case extensi...
Definition TGCocoa.mm:516
Int_t GetScreen() const override
Returns screen number.
Definition TGCocoa.mm:543
Bool_t HasTTFonts() const override
Returns True when TrueType fonts are used.
Definition TGCocoa.mm:2902
void SetWindowBackground(Window_t wid, ULong_t color) override
Sets the background of the window "id" to the specified color value "color".
Definition TGCocoa.mm:1500
Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data) override
Reads picture data from file "filename" and store it in "ret_data".
Definition TGCocoa.mm:4298
void DestroyRegion(Region_t reg) override
Destroys the region "reg".
Definition TGCocoa.mm:4362
void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b) override
Returns RGB values for color "index".
Definition TGCocoa.mm:3025
void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos) override
Copy pixmap to specified window.
Definition TGCocoa.mm:2441
unsigned char * GetColorBits(Drawable_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Returns an array of pixels created from a part of drawable (defined by x, y, w, h) in format:
Definition TGCocoa.mm:2619
void SendEvent(Window_t wid, Event_t *ev) override
Specifies the event "ev" is to be sent to the window "id".
Definition TGCocoa.mm:3584
Int_t KeysymToKeycode(UInt_t keysym) override
Converts the "keysym" to the appropriate keycode.
Definition TGCocoa.mm:2818
void QueryColor(Colormap_t cmap, ColorStruct_t &color) override
Returns the current RGB value for the pixel in the "color" structure.
Definition TGCocoa.mm:2988
void MoveWindow(Int_t wid, Int_t x, Int_t y) override
Moves the window "wid" to the specified x and y coordinates.
Definition TGCocoa.mm:821
void SelectInput(Window_t wid, UInt_t evmask) override
Defines which input events the window is interested in.
Definition TGCocoa.mm:1076
void ClearWindow() override
Clears the entire area of the current window.
Definition TGCocoa.mm:769
void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n) override
Sets clipping rectangles in graphics context.
Definition TGCocoa.mm:4344
Bool_t CreatePictureFromData(Drawable_t wid, char **data, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr) override
Creates a picture pict from data in bitmap format.
Definition TGCocoa.mm:4285
void DrawString(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len) override
Each character image, as defined by the font in the GC, is treated as an additional mask for a fill o...
Definition TGCocoa.mm:2273
std::vector< std::string > fAtomToName
Definition TGCocoa.h:466
void XorRegion(Region_t rega, Region_t regb, Region_t result) override
Calculates the difference between the union and intersection of two regions.
Definition TGCocoa.mm:4418
void SetTextMagnitude(Float_t mgn) override
Sets the current text magnification factor to "mgn".
Definition TGCocoa.mm:4187
FontStruct_t GetFontStruct(FontH_t fh) override
Retrieves the associated font structure of the font specified font handle "fh".
Definition TGCocoa.mm:2924
void SetMWMHints(Window_t winID, UInt_t value, UInt_t decorators, UInt_t inputMode) override
Sets decoration style.
Definition TGCocoa.mm:1639
Handle_t GetCurrentOpenGLContext() override
Asks OpenGL subsystem about the current OpenGL context.
Definition TGCocoa.mm:3448
Bool_t MakeOpenGLContextCurrent(Handle_t ctx, Window_t windowID) override
Makes context ctx current OpenGL context.
Definition TGCocoa.mm:3371
void SetPrimarySelectionOwner(Window_t wid) override
Makes the window "id" the current owner of the primary selection.
Definition TGCocoa.mm:3654
void GetGCValues(GContext_t gc, GCValues_t &gval) override
Returns the components specified by the mask in "gval" for the specified GC "gc" (see also the GCValu...
Definition TGCocoa.mm:3151
void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b) override
Sets color intensities the specified color index "cindex".
Definition TGCocoa.mm:3031
TGCocoa(TGCocoa &&rhs)=delete
void MapRaised(Window_t wid) override
Maps the window "id" and all of its subwindows that have had map requests on the screen and put this ...
Definition TGCocoa.mm:1217
Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height) override
create pixmap from RGB data.
Definition TGCocoa.mm:2528
void SetClipOFF(Int_t wid) override
Turns off the clipping for the window "wid".
Definition TGCocoa.mm:4170
void GetWindowAttributes(Window_t wid, WindowAttributes_t &attr) override
The WindowAttributes_t structure is set to default.
Definition TGCocoa.mm:1046
Int_t RequestString(Int_t x, Int_t y, char *text) override
Requests string: text is displayed and can be edited with Emacs-like keybinding.
Definition TGCocoa.mm:4153
void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t) override
Changes the specified dynamic parameters if the pointer is actively grabbed by the client and if the ...
Definition TGCocoa.mm:2760
Bool_t CheckEvent(Window_t wid, EGEventType type, Event_t &ev) override
Check if there is for window "id" an event of type "type".
Definition TGCocoa.mm:3615
Int_t OpenDisplay(const char *displayName) override
Opens connection to display server (if such a thing exist on the current platform).
Definition TGCocoa.mm:499
static Atom_t fgDeleteWindowAtom
Definition TGCocoa.h:476
void QueryPointer(Int_t &x, Int_t &y) override
Returns the pointer position.
Definition TGCocoa.mm:3205
void SetDrawMode(EDrawMode mode) override
Sets the drawing mode.
Definition TGCocoa.mm:3568
Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color) override
Looks up the string name of a color "cname" with respect to the screen associated with the specified ...
Definition TGCocoa.mm:2969
void GetImageSize(Drawable_t wid, UInt_t &width, UInt_t &height) override
Returns the width and height of the image id.
Definition TGCocoa.mm:2650
Int_t InitWindow(ULong_t window) override
Creates a new window and return window number.
Definition TGCocoa.mm:643
void CloseDisplay() override
Closes connection to display server and destroys all windows.
Definition TGCocoa.mm:523
void ClearArea(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Paints a rectangular area in the specified window "id" according to the specified dimensions with the...
Definition TGCocoa.mm:2346
void DeletePixmap(Pixmap_t pixmapID) override
Explicitly deletes the pixmap resource "pmap".
Definition TGCocoa.mm:2602
void MapSubwindows(Window_t wid) override
Maps all subwindows for the specified window "id" in top-to-bottom stacking order.
Definition TGCocoa.mm:1203
void ReparentWindow(Window_t wid, Window_t pid, Int_t x, Int_t y) override
If the specified window is mapped, ReparentWindow automatically performs an UnmapWindow request on it...
Definition TGCocoa.mm:1165
Window_t GetDefaultRootWindow() const override
Returns handle to the default root window created when calling XOpenDisplay().
Definition TGCocoa.mm:636
void SetDoubleBuffer(Int_t wid, Int_t mode) override
Sets the double buffer on/off on the window "wid".
Definition TGCocoa.mm:3502
void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Returns position and size of window "wid".
Definition TGCocoa.mm:779
WinContext_t GetWindowContext(Int_t wid) override
Get window drawing context Should remain valid until window exists.
Definition TGCocoa.mm:684
void RemoveWindow(ULong_t qwid) override
Removes the created by Qt window "qwid".
Definition TGCocoa.mm:910
Bool_t CreatePictureFromFile(Drawable_t wid, const char *filename, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr) override
Creates a picture pict from data in file "filename".
Definition TGCocoa.mm:4270
void DrawStringAux(Drawable_t wid, const GCValues_t &gc, Int_t x, Int_t y, const char *s, Int_t len)
Definition TGCocoa.mm:2229
void GetPasteBuffer(Window_t wid, Atom_t atom, TString &text, Int_t &nchar, Bool_t del) override
Gets contents of the paste buffer "atom" into the string "text".
Definition TGCocoa.mm:3833
Drawable_t CreateImage(UInt_t width, UInt_t height) override
Allocates the memory needed for an drawable.
Definition TGCocoa.mm:2640
void Update(Int_t mode) override
Flushes (mode = 0, default) or synchronizes (mode = 1) X output buffer.
Definition TGCocoa.mm:577
Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist) override
Returns the atom identifier associated with the specified "atom_name" string.
Definition TGCocoa.mm:3645
Handle_t CreateOpenGLContext(Window_t windowID, Handle_t sharedContext) override
Creates OpenGL context for window "windowID".
Definition TGCocoa.mm:3346
TGCocoa(const TGCocoa &rhs)=delete
void ChangeWindowAttributes(Window_t wid, SetWindowAttributes_t *attr) override
Changes the attributes of the specified window "id" according the values provided in "attr".
Definition TGCocoa.mm:1060
GContext_t CreateGC(Drawable_t wid, GCValues_t *gval) override
Creates a graphics context using the provided GCValues_t *gval structure.
Definition TGCocoa.mm:3048
Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h) override
Registers a window created by Qt as a ROOT window.
Definition TGCocoa.mm:900
void UnmapWindow(Window_t wid) override
Unmaps the specified window "id".
Definition TGCocoa.mm:1238
void ClearAreaAux(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h)
Definition TGCocoa.mm:2306
void GrabButton(Window_t wid, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE) override
Establishes a passive grab on a certain mouse button.
Definition TGCocoa.mm:2705
Bool_t EmptyRegion(Region_t reg) override
Returns kTRUE if the region reg is empty.
Definition TGCocoa.mm:4430
void ConvertSelection(Window_t, Atom_t &, Atom_t &, Atom_t &, Time_t &) override
Requests that the specified selection be converted to the specified target type.
Definition TGCocoa.mm:3751
void ReconfigureDisplay()
Definition TGCocoa.mm:598
void RaiseWindow(Window_t wid) override
Raises the specified window to the top of the stack so that no sibling window obscures it.
Definition TGCocoa.mm:1268
void DrawSegments(Drawable_t wid, GContext_t gc, Segment_t *segments, Int_t nSegments) override
Draws multiple line segments.
Definition TGCocoa.mm:1839
ROOT::MacOSX::X11::Rectangle GetDisplayGeometry() const
Definition TGCocoa.mm:604
void MapWindow(Window_t wid) override
Maps the window "id" and all of its subwindows that have had map requests.
Definition TGCocoa.mm:1183
void SetWMSize(Window_t winID, UInt_t w, UInt_t h) override
Tells window manager the desired size of window "id".
Definition TGCocoa.mm:1685
WinContext_t GetSelectedContext()
Definition TGCocoa.mm:693
void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n) override
Sets the dash-offset and dash-list attributes for dashed line styles in the specified GC.
Definition TGCocoa.mm:4313
void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Sets clipping region for the window "wid".
Definition TGCocoa.mm:4176
Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg) override
Returns kTRUE if the point [x, y] is contained in the region reg.
Definition TGCocoa.mm:4438
Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd) override
Recursively search in the children of Window for a Window which is at location x, y and is DND aware,...
Definition TGCocoa.mm:4060
void RescaleWindow(Int_t wid, UInt_t w, UInt_t h) override
Rescales the window "wid".
Definition TGCocoa.mm:835
char ** ListFonts(const char *fontname, Int_t max, Int_t &count) override
Returns list of font names matching fontname regexp, like "-*-times-*".
Definition TGCocoa.mm:2943
void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname) override
Writes the pixmap "wid" in the bitmap file "pxname".
Definition TGCocoa.mm:4240
void CopyGC(GContext_t org, GContext_t dest, Mask_t mask) override
Copies the specified components from the source GC "org" to the destination GC "dest".
Definition TGCocoa.mm:3139
ROOT::MacOSX::X11::EventTranslator * GetEventTranslator() const
Definition TGCocoa.mm:4462
void ReparentChild(Window_t wid, Window_t pid, Int_t x, Int_t y)
Definition TGCocoa.mm:1096
void DrawSegmentsAux(Drawable_t wid, const GCValues_t &gcVals, const Segment_t *segments, Int_t nSegments)
Definition TGCocoa.mm:1828
void GrabKey(Window_t wid, Int_t keycode, UInt_t modifier, Bool_t grab=kTRUE) override
Establishes a passive grab on the keyboard.
Definition TGCocoa.mm:2776
bool fDirectDraw
Definition TGCocoa.h:455
void DeletePictureData(void *data) override
Delete picture data created by the function ReadPictureDataFromFile.
Definition TGCocoa.mm:4307
Int_t EventsPending() override
Returns the number of events that have been received from the X server but have not been removed from...
Definition TGCocoa.mm:3608
void SelectWindow(Int_t wid) override
Selects the window "wid" to which subsequent output is directed.
Definition TGCocoa.mm:677
void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest) override
Updates the destination region from a union of the specified rectangle and the specified source regio...
Definition TGCocoa.mm:4368
Display_t GetDisplay() const override
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
Definition TGCocoa.mm:529
void FlushOpenGLBuffer(Handle_t ctxID) override
Flushes OpenGL buffer.
Definition TGCocoa.mm:3465
void NextEvent(Event_t &event) override
The "event" is set to default event.
Definition TGCocoa.mm:3599
void SetIconName(Window_t wid, char *name) override
Sets the window icon name.
Definition TGCocoa.mm:1587
Bool_t Init(void *display) override
Initializes the X system.
Definition TGCocoa.mm:490
void DeletePixmapAux(Pixmap_t pixmapID)
Definition TGCocoa.mm:2596
void ClosePixmap() override
Deletes current pixmap.
Definition TGCocoa.mm:2474
Pixmap_t CreateBitmap(Drawable_t wid, const char *bitmap, UInt_t width, UInt_t height) override
Creates a bitmap (i.e.
Definition TGCocoa.mm:2559
Bool_t IsCmdThread() const override
Definition TGCocoa.h:436
void SetKeyAutoRepeat(Bool_t on=kTRUE) override
Turns key auto repeat on (kTRUE) or off (kFALSE).
Definition TGCocoa.mm:2769
void FreeFontNames(char **fontlist) override
Frees the specified the array of strings "fontlist".
Definition TGCocoa.mm:2957
void UnionRegion(Region_t rega, Region_t regb, Region_t result) override
Computes the union of two regions.
Definition TGCocoa.mm:4391
Window_t GetPrimarySelectionOwner() override
Returns the window id of the current owner of the primary selection.
Definition TGCocoa.mm:3703
void SetWMPosition(Window_t winID, Int_t x, Int_t y) override
Tells the window manager the desired position [x,y] of window "id".
Definition TGCocoa.mm:1679
void SetWMTransientHint(Window_t winID, Window_t mainWinID) override
Tells window manager that the window "id" is a transient window of the window "main_id".
Definition TGCocoa.mm:1713
void CocoaDrawON()
Definition TGCocoa.mm:4474
void SetIconPixmap(Window_t wid, Pixmap_t pix) override
Sets the icon name pixmap.
Definition TGCocoa.mm:1593
Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t wid) override
If id is NULL - loads the specified gif file at position [x0,y0] in the current window.
Definition TGCocoa.mm:4112
void LowerWindow(Window_t wid) override
Lowers the specified window "id" to the bottom of the stack so that it does not obscure any sibling w...
Definition TGCocoa.mm:1285
Bool_t SetSelectionOwner(Window_t windowID, Atom_t &selectionID) override
Changes the owner and last-change time for the specified selection.
Definition TGCocoa.mm:3680
Handle_t GetNativeEvent() const override
Returns the current native event handle.
Definition TGCocoa.mm:3635
void SubtractRegion(Region_t rega, Region_t regb, Region_t result) override
Subtracts regb from rega and stores the results in result.
Definition TGCocoa.mm:4412
void FillRectangle(Drawable_t wid, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Fills the specified rectangle defined by [x,y] [x+w,y] [x+w,y+h] [x,y+h].
Definition TGCocoa.mm:2008
Region_t CreateRegion() override
Creates a new empty region.
Definition TGCocoa.mm:4354
Int_t fCocoaDraw
Definition TGCocoa.h:452
void SelectPixmap(Int_t qpixid) override
Selects the pixmap "qpixid".
Definition TGCocoa.mm:2423
void ConvertPrimarySelection(Window_t wid, Atom_t clipboard, Time_t when) override
Causes a SelectionRequest event to be sent to the current primary selection owner.
Definition TGCocoa.mm:3717
void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent) override
Returns the font properties.
Definition TGCocoa.mm:2917
void DrawLine(Drawable_t wid, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Uses the components of the specified GC to draw a line between the specified set of points (x1,...
Definition TGCocoa.mm:1791
void ChangeProperty(Window_t wid, Atom_t property, Atom_t type, UChar_t *data, Int_t len) override
Alters the property for the specified window and causes the X server to generate a PropertyNotify eve...
Definition TGCocoa.mm:3884
void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist) override
Add the list of drag and drop types to the Window win.
Definition TGCocoa.mm:4052
bool fSetApp
Definition TGCocoa.h:471
Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding) override
Returns a region for the polygon defined by the points array.
Definition TGCocoa.mm:4379
Int_t GetDoubleBuffer(Int_t wid) override
Queries the double buffer value for the window "wid".
Definition TGCocoa.mm:4098
TGCocoa & operator=(const TGCocoa &rhs)=delete
void SetClassHints(Window_t wid, char *className, char *resourceName) override
Sets the windows class and resource name.
Definition TGCocoa.mm:1599
Window_t CreateWindow(Window_t parent, Int_t x, Int_t y, UInt_t w, UInt_t h, UInt_t border, Int_t depth, UInt_t clss, void *visual, SetWindowAttributes_t *attr, UInt_t wtype) override
Creates an unmapped subwindow for a specified parent window and returns the created window.
Definition TGCocoa.mm:916
Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y) override
Requests Locator position.
Definition TGCocoa.mm:4121
void SetInputFocus(Window_t wid) override
Changes the input focus to specified window "id".
Definition TGCocoa.mm:2837
Visual_t GetVisual() const override
Returns handle to visual.
Definition TGCocoa.mm:536
void MoveResizeWindow(Window_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Changes the size and location of the specified window "id" without raising it.
Definition TGCocoa.mm:1320
void FillPolygonAux(Window_t wid, const GCValues_t &gcVals, const Point_t *polygon, Int_t nPoints)
Definition TGCocoa.mm:2038
Int_t GetDepth() const override
Returns depth of screen (number of bit planes).
Definition TGCocoa.mm:560
FontStruct_t LoadQueryFont(const char *font_name) override
Provides the most common way for accessing a font: opens (loads) the specified font and returns a poi...
Definition TGCocoa.mm:2870
bool MakeProcessForeground()
Definition TGCocoa.mm:4506
Window_t CreateOpenGLWindow(Window_t parentID, UInt_t width, UInt_t height, const std::vector< std::pair< UInt_t, Int_t > > &format) override
Create window with special pixel format. Noop everywhere except Cocoa.
Definition TGCocoa.mm:3267
std::map< Atom_t, Window_t > fSelectionOwners
Definition TGCocoa.h:468
void DeleteProperty(Window_t, Atom_t &) override
Deletes the specified property only if the property was defined on the specified window and causes th...
Definition TGCocoa.mm:3962
std::map< std::string, Atom_t > fNameToAtom
Definition TGCocoa.h:465
UInt_t ExecCommand(TGWin32Command *code) override
Executes the command "code" coming from the other threads (Win32).
Definition TGCocoa.mm:4091
void SetCursor(Window_t wid, Cursor_t curid) override
Sets the cursor "curid" to be used when the pointer is in the window "id".
Definition TGCocoa.mm:3194
void SetForeground(GContext_t gc, ULong_t foreground) override
Sets the foreground color for the specified GC (shortcut for ChangeGC with only foreground mask set).
Definition TGCocoa.mm:3056
FontH_t GetFontHandle(FontStruct_t fs) override
Returns the font handle of the specified font structure "fs".
Definition TGCocoa.mm:2890
void DeleteImage(Drawable_t img) override
Deallocates the memory associated with the image img.
Definition TGCocoa.mm:2694
Drawable_t fSelectedDrawable
Definition TGCocoa.h:449
void SetDrawModeW(WinContext_t wctxt, EDrawMode mode) override
Set window draw mode.
Definition TGCocoa.mm:699
void CloseWindow() override
Deletes current window.
Definition TGCocoa.mm:894
void FillPolygon(Window_t wid, GContext_t gc, Point_t *polygon, Int_t nPoints) override
Fills the region closed by the specified path.
Definition TGCocoa.mm:2110
ROOT::MacOSX::X11::Rectangle fDisplayRect
Definition TGCocoa.h:473
void WMDeleteNotify(Window_t wid) override
Tells WM to send message when window is closed via WM.
Definition TGCocoa.mm:4338
void PutImage(Drawable_t wid, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Combines an image with a rectangle of the specified drawable.
Definition TGCocoa.mm:2683
void CopyArea(Drawable_t src, Drawable_t dst, GContext_t gc, Int_t srcX, Int_t srcY, UInt_t width, UInt_t height, Int_t dstX, Int_t dstY) override
Combines the specified rectangle of "src" with the specified rectangle of "dest" according to the "gc...
Definition TGCocoa.mm:2192
void Sync(Int_t mode) override
Set synchronisation on or off.
Definition TGCocoa.mm:4193
ULong_t GetPixel(Color_t cindex) override
Returns pixel value associated to specified ROOT color number "cindex".
Definition TGCocoa.mm:3003
std::map< Atom_t, Window_t >::iterator selection_iterator
Definition TGCocoa.h:469
const char * DisplayName(const char *) override
Returns hostname on which the display is opened.
Definition TGCocoa.mm:509
void ChangeProperties(Window_t wid, Atom_t property, Atom_t type, Int_t format, UChar_t *data, Int_t len) override
Alters the property for the specified window and causes the X server to generate a PropertyNotify eve...
Definition TGCocoa.mm:3927
Basic string class.
Definition TString.h:138
TText * text
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Event structure.
Definition GuiTypes.h:175
Graphics context structure.
Definition GuiTypes.h:225
Point structure (maps to the X11 XPoint structure).
Definition GuiTypes.h:357
Rectangle structure (maps to the X11 XRectangle structure).
Definition GuiTypes.h:362
Used for drawing line segments (maps to the X11 XSegments structure).
Definition GuiTypes.h:352
Attributes that can be used when creating or changing a window.
Definition GuiTypes.h:94
Window attributes that can be inquired.
Definition GuiTypes.h:115