Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGWin32.h
Go to the documentation of this file.
1// @(#)root/win32gdk:$Id$
2// Author: Rene Brun, Olivier Couet, Fons Rademakers, Bertrand Bellenot 27/11/01
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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#ifndef ROOT_TGWin32
13#define ROOT_TGWin32
14
15
16#include "TVirtualX.h"
17
18#include <memory>
19#include <map>
20
21
22
23#ifndef __CLING__
24
25#include "Windows4Root.h"
26#include "gdk/gdk.h"
27#include "gdk/win32/gdkwin32.h"
28
29#else
30
31typedef unsigned long DWORD;
32typedef void* HANDLE;
33
34typedef ULongptr_t XID;
35typedef XID GdkDrawable;
36typedef XID GdkCursor;
37typedef XID GdkColormap;
38typedef XID GdkWindow;
39typedef XID GdkVisual;
40
41struct GdkGC;
42struct GdkGCValues;
43struct GdkWindowAttr;
44struct GdkColor { int pixel,red,green,blue; };
45struct GdkEvent;
46struct GdkImage;
47struct GdkPoint;
48struct GdkRectangle;
49
50#endif
51
52typedef unsigned long KeySym;
53
54//#define None 0 /* universal null resource or null atom */
55
56struct XWindow_t;
57
58struct XColor_t {
59 GdkColor color;
60 Bool_t fDefined; // true if pixel value is defined
61 XColor_t() { color.pixel = 0; color.red = color.green = color.blue = 0; fDefined = kFALSE; }
62};
63
64class TExMap;
65
66class TGWin32 : public TVirtualX {
67
68private:
69 void DrawFTGlyph(void *source, ULong_t fore, ULong_t back, GdkImage *xim,
70 Int_t bx, Int_t by);
71 GdkImage *GetBackground(WinContext_t wctxt, Int_t x, Int_t y, UInt_t w, UInt_t h);
72
73 template<class CharType>
74 void DrawTextHelper(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle,
75 const CharType *text, ETextMode mode);
76
77 std::unordered_map<Int_t,std::unique_ptr<XWindow_t>> fWindows; // map of windows
78 TExMap *fColors; ///< Hash list of colors
79 GdkCursor *fCursors[kNumCursors]; ///< List of cursors
80
82 void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx,
84 UChar_t *image, Drawable_t id);
85 void RemovePixmap(GdkDrawable *pix);
86 void SetColor(XWindow_t *ctxt, GdkGC *gc, Int_t ci);
87 void SetInput(Int_t inp);
88
89 //---- Private methods used for GUI ----
90 void MapGCValues(GCValues_t &gval, ULong_t &xmask, GdkGCValues &xgval, Bool_t tox = kTRUE);
92 ULong_t &xmask, GdkWindowAttr &xattr);
93 void MapCursor(ECursor cursor, Int_t &xcursor);
94 void MapColorStruct(ColorStruct_t *color, GdkColor &xcolor);
95 void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox = kTRUE);
96 void MapEvent(Event_t &ev, GdkEvent &xev, Bool_t tox = kTRUE);
97 void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox = kTRUE);
98 void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox = kTRUE);
99
100protected:
101 GdkVisual *fVisual;
102 GdkColormap *fColormap; ///< Default colormap, 0 if b/w
103 Int_t fScreenNumber; ///< Screen number
104 Bool_t fHasTTFonts; ///< True when TrueType fonts are used
105 Bool_t fUseSysPointers; ///< True when using system mouse pointers
106 Float_t fCharacterUpX; ///< Character Up vector along X
107 Float_t fCharacterUpY; ///< Character Up vector along Y
108 Float_t fTextMagnitude; ///< Text Magnitude
109 Int_t fDepth; ///< Number of color planes
110 Int_t fRedDiv; ///< Red value divider, -1 if no TrueColor visual
111 Int_t fGreenDiv; ///< Green value divider
112 Int_t fBlueDiv; ///< Blue value divider
113 Int_t fRedShift; ///< Bits to left shift red, -1 if no TrueColor visual
114 Int_t fGreenShift; ///< Bits to left shift green
115 Int_t fBlueShift; ///< Bits to left shift blue
116 Handle_t fXEvent; ///< Current native (GDK) event
117 TObject* fRefreshTimer; ///< TGWin32RefreshTimer for GUI thread message handler
118
119 Bool_t AllocColor(GdkColormap *cmap, GdkColor *color);
120 void QueryColors(GdkColormap *cmap, GdkColor *colors, Int_t ncolors);
121 GdkGC *GetGC(Int_t which) const;
122 XColor_t &GetColor(Int_t cid);
123
124public:
125 TGWin32();
126 TGWin32(const char *name, const char *title);
127 virtual ~TGWin32();
128
129 void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn,
130 const char *text, ETextMode mode) override;
131 void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn,
132 const wchar_t *text, ETextMode mode) override;
133 void SetTextFont(Font_t fontnumber) override;
134 Int_t SetTextFont(char *fontname, ETextSetMode mode) override;
135 void SetTextSize(Float_t textsize) override;
136
137 Bool_t Init(void *display=0) override;
138 //UInt_t ExecCommand(TGWin32Command *);
139 void ClearWindow() override;
140 void ClosePixmap() override;
141 void CloseWindow() override;
142 void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos) override;
143 void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override;
144 void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic) override;
145 void DrawFillArea(Int_t n, TPoint *xy) override;
146 void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2) override;
147 void DrawPolyLine(Int_t n, TPoint *xy) override;
148 void DrawPolyMarker(Int_t n, TPoint *xy) override;
149 void GetCharacterUp(Float_t &chupx, Float_t &chupy) override;
150 Int_t GetDoubleBuffer(Int_t wid) override;
151 void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override;
152 const char *DisplayName(const char *dpyName = 0) override;
153 ULong_t GetPixel(Color_t cindex) override;
154 void GetPlanes(Int_t &nplanes) override;
155 void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b) override;
157 Window_t GetWindowID(Int_t wid) override;
158 Bool_t HasTTFonts() const override { return fHasTTFonts; }
159 Int_t InitWindow(ULongptr_t window) override;
160 Int_t AddPixmap(ULongptr_t pix, UInt_t w, UInt_t h) override;
161 void MoveWindow(Int_t wid, Int_t x, Int_t y) override;
162 Int_t OpenPixmap(UInt_t w, UInt_t h) override;
163 void QueryPointer(Int_t &ix, Int_t &iy) override;
164 Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0) override;
165 Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y) override;
166 Int_t RequestString(Int_t x, Int_t y, char *text) override;
167 void RescaleWindow(Int_t wid, UInt_t w, UInt_t h) override;
168 Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h) override;
169 void ResizeWindow(Int_t wid) override;
170 void SelectWindow(Int_t wid) override;
171 void SetCharacterUp(Float_t chupx, Float_t chupy) override;
172 void SetClipOFF(Int_t wid) override;
173 void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
174 void SetCursor(Int_t wid, ECursor cursor) override;
175 void SetDoubleBuffer(Int_t wid, Int_t mode) override;
176 void SetDoubleBufferOFF() override;
177 void SetDoubleBufferON() override;
178 void SetDrawMode(EDrawMode mode) override;
179 void SetFillColor(Color_t cindex) override;
180 Color_t GetFillColor() const override;
181 void SetFillStyle(Style_t style) override;
182 Style_t GetFillStyle() const override;
183 void SetLineColor(Color_t cindex) override;
184 void SetLineType(Int_t n, Int_t *dash) override;
185 void SetLineStyle(Style_t linestyle) override;
186 Style_t GetLineStyle() const override;
187 void SetLineWidth(Width_t width) override;
188 Width_t GetLineWidth() const override;
189 void SetMarkerColor(Color_t cindex) override;
190 void SetMarkerSize(Float_t markersize) override;
191 void SetMarkerStyle(Style_t markerstyle) override;
192 void SetOpacity(Int_t percent) override;
193 void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b) override;
194 void SetTextAlign(Short_t talign=11) override;
195 void SetTextColor(Color_t cindex) override;
196 void SetTextMagnitude(Float_t mgn=1) override { fTextMagnitude = mgn;}
197 void Sync(Int_t mode) override;
198 void UpdateWindow(Int_t mode) override;
199 void Warp(Int_t ix, Int_t iy, Window_t id = 0) override;
200 Int_t WriteGIF(char *name) override;
201 void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname) override;
202 Window_t GetCurrentWindow() const override;
203 void GetTextExtent(UInt_t &w, UInt_t &h, char *mess) override;
204 void GetTextExtent(UInt_t &w, UInt_t &h, wchar_t *mess) override;
205
206 //---- Methods used for new graphics -----
207 WinContext_t GetWindowContext(Int_t wid) override;
208 void SetAttFill(WinContext_t wctxt, const TAttFill &att) override;
209 void SetAttLine(WinContext_t wctxt, const TAttLine &att) override;
210 void SetAttMarker(WinContext_t wctxt, const TAttMarker &att) override;
211 void SetAttText(WinContext_t wctxt, const TAttText &att) override;
212 void SetDrawModeW(WinContext_t wctxt, EDrawMode mode) override;
213 EDrawMode GetDrawModeW(WinContext_t wctxt) override;
214 void ClearWindowW(WinContext_t wctxt) override;
215 void UpdateWindowW(WinContext_t wctxt, Int_t mode) override;
216 void SetOpacityW(WinContext_t wctxt, Int_t percent) override;
217 void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos) override;
218 Int_t WriteGIFW(WinContext_t wctxt, const char *name) override;
219
220 void DrawBoxW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override;
221 void DrawFillAreaW(WinContext_t wctxt, Int_t n, TPoint *xy) override;
222 void DrawLineW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override;
223 void DrawPolyLineW(WinContext_t wctxt, Int_t n, TPoint *xy) override;
224 void DrawLinesSegmentsW(WinContext_t wctxt, Int_t n, TPoint *xy) override;
225 void DrawPolyMarkerW(WinContext_t wctxt, Int_t n, TPoint *xy) override;
226 void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn,
227 const char *text, ETextMode mode) override;
228 void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn,
229 const wchar_t *text, ETextMode mode) override;
230
231 //---- Methods used for GUI -----
232 void GetWindowAttributes(Window_t id, WindowAttributes_t &attr) override;
233 void MapWindow(Window_t id) override;
234 void MapSubwindows(Window_t id) override;
235 void MapRaised(Window_t id) override;
236 void UnmapWindow(Window_t id) override;
237 void DestroyWindow(Window_t id) override;
238 void DestroySubwindows(Window_t id) override;
239 void RaiseWindow(Window_t id) override;
240 void LowerWindow(Window_t id) override;
241 void MoveWindow(Window_t id, Int_t x, Int_t y) override;
242 void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
243 void ResizeWindow(Window_t id, UInt_t w, UInt_t h) override;
244 void IconifyWindow(Window_t id) override;
245 void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y) override;
246 void SetWindowBackground(Window_t id, ULong_t color) override;
247 void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm) override;
249 UInt_t w, UInt_t h, UInt_t border,
250 Int_t depth, UInt_t clss,
251 void *visual, SetWindowAttributes_t *attr,
252 UInt_t wtype) override;
253 Int_t OpenDisplay(const char *dpyName=0) override;
254 void CloseDisplay() override;
255 Display_t GetDisplay() const override;
256 Visual_t GetVisual() const override { return 0; }
257 Int_t GetScreen() const override { return 0; }
258 Int_t GetDepth() const override;
259 Colormap_t GetColormap() const override { return (Colormap_t) fColormap; }
260 Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist) override;
261 Window_t GetDefaultRootWindow() const override;
262 Window_t GetParent(Window_t id) const override;
263 FontStruct_t LoadQueryFont(const char *font_name) override;
265 void DeleteFont(FontStruct_t fs) override;
266 GContext_t CreateGC(Drawable_t id, GCValues_t *gval) override;
267 void ChangeGC(GContext_t gc, GCValues_t *gval) override;
268 void CopyGC(GContext_t org, GContext_t dest, Mask_t mask) override;
269 void DeleteGC(GContext_t gc) override;
270 Cursor_t CreateCursor(ECursor cursor) override;
271 void SetCursor(Window_t id, Cursor_t curid) override;
273 Pixmap_t CreatePixmap(Drawable_t id, const char *bitmap, UInt_t width,
274 UInt_t height, ULong_t forecolor, ULong_t backcolor,
275 Int_t depth) override;
276 Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height) override;
277 Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap,
278 UInt_t width, UInt_t height) override;
279 void DeletePixmap(Pixmap_t pmap) override;
280 Bool_t CreatePictureFromFile(Drawable_t id, const char *filename,
281 Pixmap_t &pict, Pixmap_t &pict_mask,
282 PictureAttributes_t &attr) override;
284 Pixmap_t &pict, Pixmap_t &pict_mask,
285 PictureAttributes_t &attr) override;
286 Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data) override;
287 void DeletePictureData(void *data) override;
288 void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n) override;
289 Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color) override;
290 Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color) override;
291 void QueryColor(Colormap_t cmap, ColorStruct_t &color) override;
292 void FreeColor(Colormap_t cmap, ULong_t pixel) override;
293 Int_t EventsPending() override;
294 void NextEvent(Event_t &event) override;
295 void Bell(Int_t percent) override;
296 void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc,
297 Int_t src_x, Int_t src_y, UInt_t width, UInt_t height,
298 Int_t dest_x, Int_t dest_y) override;
300 void ChangeProperty(Window_t id, Atom_t property, Atom_t type,
301 UChar_t *data, Int_t len) override;
302 void DrawLine(Drawable_t id, GContext_t gc, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override;
303 void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override;
304 Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev) override;
305 void SendEvent(Window_t id, Event_t *ev) override;
306 void WMDeleteNotify(Window_t id) override;
307 void SetKeyAutoRepeat(Bool_t on = kTRUE) override;
308 void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab = kTRUE) override;
309 void GrabButton(Window_t id, EMouseButton button, UInt_t modifier,
310 UInt_t evmask, Window_t confine, Cursor_t cursor,
311 Bool_t grab = kTRUE) override;
312 void GrabPointer(Window_t id, UInt_t evmask, Window_t confine,
313 Cursor_t cursor, Bool_t grab = kTRUE,
314 Bool_t owner_events = kTRUE) override;
315 void SetWindowName(Window_t id, char *name) override;
316 void SetIconName(Window_t id, char *name) override;
317 void SetIconPixmap(Window_t id, Pixmap_t pic) override;
318 void SetClassHints(Window_t id, char *className, char *resourceName) override;
319 void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input) override;
320 void SetWMPosition(Window_t id, Int_t x, Int_t y) override;
321 void SetWMSize(Window_t id, UInt_t w, UInt_t h) override;
322 void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin,
323 UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc) override;
324 void SetWMState(Window_t id, EInitialState state) override;
325 void SetWMTransientHint(Window_t id, Window_t main_id) override;
327 const char *s, Int_t len) override;
328 Int_t TextWidth(FontStruct_t font, const char *s, Int_t len) override;
329 void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent) override;
330 void GetGCValues(GContext_t gc, GCValues_t &gval) override;
332 void FreeFontStruct(FontStruct_t fs) override;
333 void ClearWindow(Window_t id) override;
334 Int_t KeysymToKeycode(UInt_t keysym) override;
336 UInt_t w, UInt_t h) override;
338 UInt_t w, UInt_t h) override;
339 void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg) override;
340 void SelectInput(Window_t id, UInt_t evmask) override;
341 Window_t GetInputFocus() override;
342 void SetInputFocus(Window_t id) override;
344 void SetPrimarySelectionOwner(Window_t id) override;
345 void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when) override;
346 void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym) override;
347 void GetPasteBuffer(Window_t id, Atom_t atom, TString &text,
348 Int_t &nchar, Bool_t del) override;
349 void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x,
350 Int_t src_y, Int_t &dest_x, Int_t &dest_y, Window_t &child) override;
351 void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override;
352 void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt) override;
353 void QueryPointer(Window_t id, Window_t &rootw, Window_t &childw,
354 Int_t &root_x, Int_t &root_y, Int_t &win_x,
355 Int_t &win_y, UInt_t &mask) override;
356 void SetForeground(GContext_t gc, ULong_t foreground) override;
357 void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n) override;
358 void Update(Int_t mode = 0) override;
359 Region_t CreateRegion() override;
360 void DestroyRegion(Region_t reg) override;
361 void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest) override;
362 Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding) override;
363 void UnionRegion(Region_t rega, Region_t regb, Region_t result) override;
364 void IntersectRegion(Region_t rega, Region_t regb, Region_t result) override;
365 void SubtractRegion(Region_t rega, Region_t regb, Region_t result) override;
366 void XorRegion(Region_t rega, Region_t regb, Region_t result) override;
367 Bool_t EmptyRegion(Region_t reg) override;
368 Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg) override;
369 Bool_t EqualRegion(Region_t rega, Region_t regb) override;
370 void GetRegionBox(Region_t reg, Rectangle_t *) override;
371 char **ListFonts(const char *fontname, Int_t max, Int_t &count) override;
372 void FreeFontNames(char **fontlist) override;
373 Drawable_t CreateImage(UInt_t width, UInt_t height) override;
374 void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height) override;
375 void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel) override;
376 void PutImage(Drawable_t id, GContext_t gc, Drawable_t img,
377 Int_t dx, Int_t dy, Int_t x, Int_t y,
378 UInt_t w, UInt_t h) override;
379 void DeleteImage(Drawable_t img) override;
380 unsigned char *GetColorBits(Drawable_t wid, Int_t x, Int_t y, UInt_t width, UInt_t height) override;
381 Int_t AddWindow(ULongptr_t qwid, UInt_t w, UInt_t h) override;
382 void RemoveWindow(ULongptr_t qwid) override;
383 void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask) override;
384 UInt_t ScreenWidthMM() const override;
385
386 void DeleteProperty(Window_t, Atom_t&) override;
388 Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**) override;
390 void ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&) override;
392 void ChangeProperties(Window_t id, Atom_t property, Atom_t type,
393 Int_t format, UChar_t *data, Int_t len) override;
394 void SetDNDAware(Window_t win, Atom_t *typelist) override;
395 void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist) override;
396 Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd) override;
397 Bool_t IsDNDAware(Window_t win, Atom_t *typelist) override;
398
399 Bool_t IsCmdThread() const override;
400 void SetUserThreadId(ULong_t id);
401
402 static void Lock();
403 static void Unlock();
404
405 ClassDefOverride(TGWin32,0) //Interface to Win32
406};
407
408#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
const int kNumCursors
Definition GuiTypes.h:372
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 long ULongptr_t
Unsigned integer large enough to hold a pointer (platform-dependent).
Definition RtypesCore.h:90
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
short Width_t
Line width (short).
Definition RtypesCore.h:98
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
short Font_t
Font number (short).
Definition RtypesCore.h:95
short Short_t
Signed Short integer 2 bytes (short).
Definition RtypesCore.h:53
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
short Color_t
Color number (short).
Definition RtypesCore.h:99
short Style_t
Style number (short).
Definition RtypesCore.h:96
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
unsigned long KeySym
Definition TGWin32.h:52
char name[80]
Definition TGX11.cxx:148
unsigned long XID
Definition TGX11.h:34
float xmin
float ymin
float xmax
float ymax
point * points
Definition X3DBuffer.c:22
Color * colors
Definition X3DBuffer.c:21
This class stores a (key,value) pair using an external hash.
Definition TExMap.h:33
void DrawFillAreaW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Fill area described by polygon in a specified window.
Definition TGWin32.cxx:1649
Cursor_t CreateCursor(ECursor cursor) override
Create cursor handle (just return cursor from cursor pool fCursors).
Definition TGWin32.cxx:5493
void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc) override
Give the window manager minimum and maximum size hints.
Definition TGWin32.cxx:6561
void SetDoubleBuffer(Int_t wid, Int_t mode) override
Set the double buffer on/off on window wid.
Definition TGWin32.cxx:2947
void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override
Draw text using TrueType fonts.
Definition TGWin32.cxx:1212
Int_t GetDoubleBuffer(Int_t wid) override
Query the double buffer value for the window wid.
Definition TGWin32.cxx:1890
void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg) override
Draws multiple line segments. Each line is specified by a pair of points.
Definition TGWin32.cxx:6727
void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox=kTRUE)
Map modifier key state to or from X.
Definition TGWin32.cxx:5840
GdkImage * GetBackground(WinContext_t wctxt, Int_t x, Int_t y, UInt_t w, UInt_t h)
Get the background of the current window in an XImage.
Definition TGWin32.cxx:1394
void SetFillColor(Color_t cindex) override
Set color index for fill areas.
Definition TGWin32.cxx:3029
void DestroyRegion(Region_t reg) override
Destroy region.
Definition TGWin32.cxx:7082
void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b) override
Get rgb values for color "index".
Definition TGWin32.cxx:1960
void SetColor(XWindow_t *ctxt, GdkGC *gc, Int_t ci)
Set the foreground color in GdkGC.
Definition TGWin32.cxx:2873
void DeleteGC(GContext_t gc) override
Explicitely delete a graphics context.
Definition TGWin32.cxx:5485
void ClearWindow() override
Clear current window.
Definition TGWin32.cxx:1463
void MapSetWindowAttributes(SetWindowAttributes_t *attr, ULong_t &xmask, GdkWindowAttr &xattr)
Map a SetWindowAttributes_t to a GdkWindowAttr structure.
Definition TGWin32.cxx:4943
Window_t GetInputFocus() override
Returns the window id of the window having the input focus.
Definition TGWin32.cxx:6753
void GetTextExtent(UInt_t &w, UInt_t &h, char *mess) override
Return the size of a character string - no longer used iw : text width ih : text height mess : messag...
Definition TGWin32.cxx:1980
void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b) override
Set color intensities for given color index.
Definition TGWin32.cxx:4000
void SetFillStyle(Style_t style) override
Set fill area style.
Definition TGWin32.cxx:3056
void SetDoubleBufferON() override
Turn double buffer mode on.
Definition TGWin32.cxx:2993
Int_t GetScreen() const override
Returns screen number.
Definition TGWin32.h:257
void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask) override
The Nonrectangular Window Shape Extension adds nonrectangular windows to the System.
Definition TGWin32.cxx:7460
void MapCursor(ECursor cursor, Int_t &xcursor)
void SetOpacity(Int_t percent) override
Set opacity of a current window.
Definition TGWin32.cxx:3990
char ** ListFonts(const char *fontname, Int_t max, Int_t &count) override
Return list of font names matching "fontname".
Definition TGWin32.cxx:7186
void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent) override
Return some font properties.
Definition TGWin32.cxx:6641
void SetTextMagnitude(Float_t mgn=1) override
Sets the current text magnification factor to "mgn".
Definition TGWin32.h:196
FontStruct_t LoadQueryFont(const char *font_name) override
Load font and query font.
Definition TGWin32.cxx:5336
void ChangeProperties(Window_t id, Atom_t property, Atom_t type, Int_t format, UChar_t *data, Int_t len) override
Put data into Clipboard.
Definition TGWin32.cxx:7594
void SetDrawMode(EDrawMode mode) override
Set the drawing mode.
Definition TGWin32.cxx:3021
void CloseWindow() override
Delete current window.
Definition TGWin32.cxx:1500
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
TranslateCoordinates translates coordinates from the frame of reference of one window to another.
Definition TGWin32.cxx:6900
void RaiseWindow(Window_t id) override
Put window on top of window stack.
Definition TGWin32.cxx:4638
Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color) override
Parse string cname containing color name, like "green" or "#00FF00".
Definition TGWin32.cxx:5687
Float_t fCharacterUpY
Character Up vector along Y.
Definition TGWin32.h:107
Int_t KeysymToKeycode(UInt_t keysym) override
Convert a keysym to the appropriate keycode.
Definition TGWin32.cxx:6695
Int_t InitWindow(ULongptr_t window) override
Open window and return window number.
Definition TGWin32.cxx:2116
Visual_t GetVisual() const override
Returns handle to visual.
Definition TGWin32.h:256
void SetTextFont(Font_t fontnumber) override
Set specified font.
Definition TGWin32.cxx:1421
void SetAttLine(WinContext_t wctxt, const TAttLine &att) override
Set line attributes for specified window.
Definition TGWin32.cxx:3220
Int_t fDepth
Number of color planes.
Definition TGWin32.h:109
void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Draw a line.
Definition TGWin32.cxx:1673
void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Return position and size of window wid.
Definition TGWin32.cxx:1911
void GetPlanes(Int_t &nplanes) override
Get maximum number of planes.
Definition TGWin32.cxx:1952
Float_t fTextMagnitude
Text Magnitude.
Definition TGWin32.h:108
Float_t GetTextMagnitude() override
Returns the current font magnification factor.
Definition TGWin32.h:156
void RescaleWindow(Int_t wid, UInt_t w, UInt_t h) override
Rescale the window wid.
Definition TGWin32.cxx:2631
void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr) override
Change window attributes.
Definition TGWin32.cxx:6281
void SetIconPixmap(Window_t id, Pixmap_t pic) override
Set pixmap the WM can use when the window is iconized.
Definition TGWin32.cxx:6473
void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest) override
Union of rectangle with a region.
Definition TGWin32.cxx:7090
Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y) override
Request Locator position.
Definition TGWin32.cxx:2239
void SetClassHints(Window_t id, char *className, char *resourceName) override
Set the windows class and resource name.
Definition TGWin32.cxx:6485
WinContext_t GetWindowContext(Int_t wid) override
Returns window context for specified win id.
Definition TGWin32.cxx:7448
void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Clear a window area to the bakcground color.
Definition TGWin32.cxx:6349
void DeleteProperty(Window_t, Atom_t &) override
Deletes the specified property on the specified window.
Definition TGWin32.cxx:7478
Window_t GetParent(Window_t id) const override
Return the parent of the window.
Definition TGWin32.cxx:5324
void DrawLineW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Draw a line on specified window.
Definition TGWin32.cxx:1683
void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height) override
Returns the width and height of the image id.
Definition TGWin32.cxx:7227
void Update(Int_t mode=0) override
Flush (mode = 0, default) or synchronize (mode = 1) X output buffer.
Definition TGWin32.cxx:7066
TGWin32()
Default constructor.
Definition TGWin32.cxx:772
void SetCharacterUp(Float_t chupx, Float_t chupy) override
Set character up vector.
Definition TGWin32.cxx:2788
void SetOpacityW(WinContext_t wctxt, Int_t percent) override
Set opacity of a specified window.
Definition TGWin32.cxx:4109
GdkColormap * fColormap
Default colormap, 0 if b/w.
Definition TGWin32.h:102
ULong_t GetPixel(Color_t cindex) override
Return pixel value associated to specified ROOT color number.
Definition TGWin32.cxx:2861
void DrawTextHelper(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, const CharType *text, ETextMode mode)
Definition TGWin32.cxx:1220
void SendEvent(Window_t id, Event_t *ev) override
Send event ev to window id.
Definition TGWin32.cxx:5789
Int_t RequestString(Int_t x, Int_t y, char *text) override
Request a string.
Definition TGWin32.cxx:2394
Int_t AddWindowHandle()
Add new window handle Only for private usage.
Definition TGWin32.cxx:2033
void SetUserThreadId(ULong_t id)
Set user thread id.
Definition TGWin32.cxx:7735
Int_t fBlueDiv
Blue value divider.
Definition TGWin32.h:112
Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev) override
Check if there is for window "id" an event of type "type".
Definition TGWin32.cxx:5755
void GrabButton(Window_t id, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE) override
Establish passive grab on a certain mouse button.
Definition TGWin32.cxx:6408
void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic) override
Draw a cell array.
Definition TGWin32.cxx:1608
GContext_t CreateGC(Drawable_t id, GCValues_t *gval) override
Create a graphics context using the values set in gval (but only for those entries that are in the ma...
Definition TGWin32.cxx:5380
GdkVisual * fVisual
Definition TGWin32.h:101
Int_t fGreenShift
Bits to left shift green.
Definition TGWin32.h:114
Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data) override
Read picture data from file and store in ret_data.
Definition TGWin32.cxx:5624
void DrawBoxW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override
Draw a box on specified window.
Definition TGWin32.cxx:1572
void UpdateWindowW(WinContext_t wctxt, Int_t mode) override
Update current window mode : (1) update (0) sync.
Definition TGWin32.cxx:4091
void MapSubwindows(Window_t id) override
Maps all subwindows for the specified window "id" in top-to-bottom stacking order.
Definition TGWin32.cxx:4567
void Bell(Int_t percent) override
Sets the sound bell. Percent is loudness from -100% to 100%.
Definition TGWin32.cxx:6258
void SetCursor(Int_t wid, ECursor cursor) override
Set the cursor.
Definition TGWin32.cxx:2915
Bool_t IsDNDAware(Window_t win, Atom_t *typelist) override
Checks if Window win is DND aware, and knows any of the DND formats passed in argument.
Definition TGWin32.cxx:7688
void LowerWindow(Window_t id) override
Lower window so it lays below all its siblings.
Definition TGWin32.cxx:4657
void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y) override
Reparent window, make pid the new parent and position the window at position (x,y) in new parent.
Definition TGWin32.cxx:4723
void UnmapWindow(Window_t id) override
Unmap window from screen.
Definition TGWin32.cxx:4605
void CloseDisplay() override
close display (terminate server/gMainThread thread)
Definition TGWin32.cxx:845
void SetWMTransientHint(Window_t id, Window_t main_id) override
Tell window manager that window is a transient window of gdk_parent_root.
Definition TGWin32.cxx:6609
void SetWMPosition(Window_t id, Int_t x, Int_t y) override
Tells the window manager the desired position [x,y] of window "id".
Definition TGWin32.cxx:6536
void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override
Draw text using TrueType fonts on specified window.
Definition TGWin32.cxx:1364
void DestroySubwindows(Window_t id) override
Destroy all internal subwindows.
Definition TGWin32.cxx:4628
unsigned char * GetColorBits(Drawable_t wid, Int_t x, Int_t y, UInt_t width, UInt_t height) override
Gets DIB bits x, y, width, height - position of bitmap returns a pointer on bitmap bits array in form...
Definition TGWin32.cxx:7294
Int_t TextWidth(FontStruct_t font, const char *s, Int_t len) override
Return length of string in pixels. Size depends on font.
Definition TGWin32.cxx:6633
void Sync(Int_t mode) override
Set synchronisation on or off.
Definition TGWin32.cxx:4064
void Warp(Int_t ix, Int_t iy, Window_t id=0) override
Set pointer position.
Definition TGWin32.cxx:4223
void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname) override
Write the pixmap wid in the bitmap file pxname.
Definition TGWin32.cxx:4247
void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox=kTRUE)
Map event mask to or from gdk.
Definition TGWin32.cxx:4864
Float_t fCharacterUpX
Character Up vector along X.
Definition TGWin32.h:106
void GetGCValues(GContext_t gc, GCValues_t &gval) override
Get current values from graphics context gc.
Definition TGWin32.cxx:6653
void SetMarkerSize(Float_t markersize) override
Set marker size index.
Definition TGWin32.cxx:3296
Window_t GetWindowID(Int_t wid) override
Return the X11 window identifier.
Definition TGWin32.cxx:2003
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 TGWin32.cxx:7631
void XorRegion(Region_t rega, Region_t regb, Region_t result) override
Calculate the difference between the union and intersection of two regions.
Definition TGWin32.cxx:7141
Bool_t fHasTTFonts
True when TrueType fonts are used.
Definition TGWin32.h:104
void MapEvent(Event_t &ev, GdkEvent &xev, Bool_t tox=kTRUE)
Map Event_t structure to gdk_event structure.
Definition TGWin32.cxx:5896
void IconifyWindow(Window_t id) override
Iconify the window.
Definition TGWin32.cxx:4711
Int_t fRedShift
Bits to left shift red, -1 if no TrueColor visual.
Definition TGWin32.h:113
Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap, UInt_t width, UInt_t height) override
Create a bitmap (i.e. pixmap with depth 1) from the bitmap data.
Definition TGWin32.cxx:5540
void FreeFontStruct(FontStruct_t fs) override
Free font structure returned by GetFontStruct().
Definition TGWin32.cxx:6675
void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos) override
Copy the pixmap wid at the position xpos, ypos in the specified window.
Definition TGWin32.cxx:4202
Bool_t EqualRegion(Region_t rega, Region_t regb) override
Returns true if two regions are equal.
Definition TGWin32.cxx:7165
void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Draw a filled rectangle. Filling is done according to the gc.
Definition TGWin32.cxx:6705
FontStruct_t GetFontStruct(FontH_t fh) override
Retrieve associated font structure once we have the font handle.
Definition TGWin32.cxx:6667
void GetCharacterUp(Float_t &chupx, Float_t &chupy) override
Return character up vector.
Definition TGWin32.cxx:1841
void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len) override
Draw a string using a specific graphics context in position (x,y).
Definition TGWin32.cxx:6619
void SetAttText(WinContext_t wctxt, const TAttText &att) override
Set text attributes for speicfied window.
Definition TGWin32.cxx:3917
Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg) override
Returns true if the point x,y is in the region.
Definition TGWin32.cxx:7157
std::unordered_map< Int_t, std::unique_ptr< XWindow_t > > fWindows
Definition TGWin32.h:77
void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt) override
FillPolygon fills the region closed by the specified path.
Definition TGWin32.cxx:6955
void SetWMState(Window_t id, EInitialState state) override
Set the initial state of the window. Either kNormalState or kIconicState.
Definition TGWin32.cxx:6586
void DrawPolyLineW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw a line through all points in specified window.
Definition TGWin32.cxx:1712
void DeleteFont(FontStruct_t fs) override
Explicitely delete font structure obtained with LoadQueryFont().
Definition TGWin32.cxx:5371
void GrabPointer(Window_t id, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE, Bool_t owner_events=kTRUE) override
Establish an active pointer grab.
Definition TGWin32.cxx:6433
Int_t fScreenNumber
Screen number.
Definition TGWin32.h:103
void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when) override
XConvertSelection() causes a SelectionRequest event to be sent to the current primary selection owner...
Definition TGWin32.cxx:6801
Bool_t HasTTFonts() const override
Returns True when TrueType fonts are used.
Definition TGWin32.h:158
Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding) override
Create region for the polygon defined by the points array.
Definition TGWin32.cxx:7104
void MapGCValues(GCValues_t &gval, ULong_t &xmask, GdkGCValues &xgval, Bool_t tox=kTRUE)
Map a GCValues_t to a XCGValues structure if tox is true.
Definition TGWin32.cxx:4976
void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n) override
Set clipping rectangles in graphics context.
Definition TGWin32.cxx:7042
void SetTextColor(Color_t cindex) override
Set color index for text.
Definition TGWin32.cxx:4050
void SetWindowName(Window_t id, char *name) override
Set window name.
Definition TGWin32.cxx:6453
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
Return handle to newly created gdk window.
Definition TGWin32.cxx:4759
void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t) override
Changes the active cursor of the specified window.
Definition TGWin32.cxx:7540
void MoveWindow(Int_t wid, Int_t x, Int_t y) override
Move the window wid.
Definition TGWin32.cxx:2015
void WMDeleteNotify(Window_t id) override
Tell WM to send message when window is closed via WM.
Definition TGWin32.cxx:6359
Style_t GetLineStyle() const override
Return current line style.
Definition TGWin32.cxx:3186
void SetForeground(GContext_t gc, ULong_t foreground) override
Set foreground color in graphics context (shortcut for ChangeGC with only foreground mask set).
Definition TGWin32.cxx:7027
void DestroyWindow(Window_t id) override
Destroy window.
Definition TGWin32.cxx:4615
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, and a pointer to the data...
Definition TGWin32.cxx:7492
Int_t EventsPending() override
Returns number of pending events.
Definition TGWin32.cxx:5803
static void Unlock()
Definition TGWin32.cxx:889
void SetPrimarySelectionOwner(Window_t id) override
Makes the window id the current owner of the primary selection.
Definition TGWin32.cxx:6783
void SetLineStyle(Style_t linestyle) override
Set line style.
Definition TGWin32.cxx:3173
void FreeColor(Colormap_t cmap, ULong_t pixel) override
Free color cell with specified pixel value.
Definition TGWin32.cxx:5745
TObject * fRefreshTimer
TGWin32RefreshTimer for GUI thread message handler.
Definition TGWin32.h:117
void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input) override
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition TGWin32.cxx:6524
void QueryColor(Colormap_t cmap, ColorStruct_t &color) override
Fill in the primary color components for a specific pixel value.
Definition TGWin32.cxx:5727
void IntersectRegion(Region_t rega, Region_t regb, Region_t result) override
Compute the intersection of rega and regb and return result region.
Definition TGWin32.cxx:7123
void QueryColors(GdkColormap *cmap, GdkColor *colors, Int_t ncolors)
Returns the current RGB value for the pixel in the XColor structure.
Definition TGWin32.cxx:1091
void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym) override
Convert the keycode from the event structure to a key symbol (according to the modifiers specified in...
Definition TGWin32.cxx:6815
void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Move and resize a window.
Definition TGWin32.cxx:4683
void SetAttFill(WinContext_t wctxt, const TAttFill &att) override
Set fill attributes for specified window.
Definition TGWin32.cxx:3079
Bool_t EmptyRegion(Region_t reg) override
Return true if the region is empty.
Definition TGWin32.cxx:7149
void MapColorStruct(ColorStruct_t *color, GdkColor &xcolor)
Map a ColorStruct_t to a XColor structure.
Definition TGWin32.cxx:5672
Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h) override
Resize a pixmap.
Definition TGWin32.cxx:2670
void SetWMSize(Window_t id, UInt_t w, UInt_t h) override
Tells window manager the desired size of window "id".
Definition TGWin32.cxx:6550
static void Lock()
Definition TGWin32.cxx:881
void ClosePixmap() override
Delete current pixmap.
Definition TGWin32.cxx:1492
Handle_t fXEvent
Current native (GDK) event.
Definition TGWin32.h:116
void RemovePixmap(GdkDrawable *pix)
Remove the pixmap pix.
Definition TGWin32.cxx:2208
void SelectWindow(Int_t wid) override
Select window to which subsequent output is directed.
Definition TGWin32.cxx:2762
Int_t fRedDiv
Red value divider, -1 if no TrueColor visual.
Definition TGWin32.h:110
void SetLineType(Int_t n, Int_t *dash) override
Set line type.
Definition TGWin32.cxx:3165
void SetTextAlign(Short_t talign=11) override
Set text alignment.
Definition TGWin32.cxx:4037
void ChangeProperty(Window_t id, Atom_t property, Atom_t type, UChar_t *data, Int_t len) override
This function alters the property for the specified window and causes the X server to generate a Prop...
Definition TGWin32.cxx:6326
Region_t CreateRegion() override
Create a new empty region.
Definition TGWin32.cxx:7074
const char * DisplayName(const char *dpyName=0) override
Return hostname on which the display is opened.
Definition TGWin32.cxx:1944
void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx, Int_t ny, Int_t xmin, Int_t ymin, Int_t xmax, Int_t ymax, UChar_t *image, Drawable_t id)
Draw image.
Definition TGWin32.cxx:4383
void SetTextSize(Float_t textsize) override
Set current text size.
Definition TGWin32.cxx:1450
void DrawPolyMarker(Int_t n, TPoint *xy) override
Draw n markers with the current attributes at position x, y.
Definition TGWin32.cxx:1766
Display_t GetDisplay() const override
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
Definition TGWin32.cxx:5286
void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override
Draw a box.
Definition TGWin32.cxx:1562
GdkGC * GetGC(Int_t which) const
Return desired Graphics Context ("which" maps directly on gGCList[]).
Definition TGWin32.cxx:1873
void ChangeGC(GContext_t gc, GCValues_t *gval) override
Change entries in an existing graphics context, gc, by values from gval.
Definition TGWin32.cxx:5399
void SetMarkerColor(Color_t cindex) override
Set color index for markers.
Definition TGWin32.cxx:3280
void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab=kTRUE) override
Establish passive grab on a certain key.
Definition TGWin32.cxx:6389
void SubtractRegion(Region_t rega, Region_t regb, Region_t result) override
Subtract rega from regb.
Definition TGWin32.cxx:7132
XColor_t & GetColor(Int_t cid)
Return reference to internal color structure associated to color index cid.
Definition TGWin32.cxx:1851
void DrawLinesSegmentsW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw N segments on specified window n : number of segments xy : list of points, 2*N size.
Definition TGWin32.cxx:1754
void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Draw a rectangle outline.
Definition TGWin32.cxx:6716
void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n) override
Specify a dash pattertn.
Definition TGWin32.cxx:5654
void DeletePixmap(Pixmap_t pmap) override
Explicitely delete pixmap resource.
Definition TGWin32.cxx:5554
void FreeFontNames(char **fontlist) override
Frees the specified the array of strings "fontlist".
Definition TGWin32.cxx:7210
void MapWindow(Window_t id) override
Map window on screen.
Definition TGWin32.cxx:4552
Int_t WriteGIF(char *name) override
Writes the current window into GIF file.
Definition TGWin32.cxx:4287
void DrawFTGlyph(void *source, ULong_t fore, ULong_t back, GdkImage *xim, Int_t bx, Int_t by)
Draw FT_Bitmap bitmap to xim image at position bx,by using specified foreground color.
Definition TGWin32.cxx:1117
void DeleteImage(Drawable_t img) override
Deallocates the memory associated with the image img.
Definition TGWin32.cxx:7279
void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel) override
Overwrites the pixel in the image with the specified pixel value.
Definition TGWin32.cxx:7236
void ConvertSelection(Window_t, Atom_t &, Atom_t &, Atom_t &, Time_t &) override
Get Clipboard data.
Definition TGWin32.cxx:7553
void SetIconName(Window_t id, char *name) override
Set window icon name.
Definition TGWin32.cxx:6463
Bool_t SetSelectionOwner(Window_t, Atom_t &) override
Assigns owner of Clipboard.
Definition TGWin32.cxx:7577
Window_t GetPrimarySelectionOwner() override
Returns the window id of the current owner of the primary selection.
Definition TGWin32.cxx:6774
Width_t GetLineWidth() const override
Return current line width.
Definition TGWin32.cxx:3210
void SetMarkerStyle(Style_t markerstyle) override
Set marker style.
Definition TGWin32.cxx:3312
void DeletePictureData(void *data) override
Delete picture data created by the function ReadPictureDataFromFile.
Definition TGWin32.cxx:5644
void DrawFillArea(Int_t n, TPoint *xy) override
Fill area described by polygon.
Definition TGWin32.cxx:1639
void GetWindowAttributes(Window_t id, WindowAttributes_t &attr) override
Get window attributes and return filled in attributes structure.
Definition TGWin32.cxx:5245
void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Return geometry of window (should be called GetGeometry but signature already used).
Definition TGWin32.cxx:6931
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 TGWin32.cxx:7619
Bool_t CreatePictureFromData(Drawable_t id, char **data, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr) override
Create a pixture pixmap from data.
Definition TGWin32.cxx:5598
Int_t OpenPixmap(UInt_t w, UInt_t h) override
Open a new pixmap.
Definition TGWin32.cxx:2078
Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0) override
If id is NULL - loads the specified gif file at position [x0,y0] in the current window.
Definition TGWin32.cxx:4465
Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height) override
create an image from RGB data.
Definition TGWin32.cxx:7355
Int_t WriteGIFW(WinContext_t wctxt, const char *name) override
Writes the specified window into GIF file.
Definition TGWin32.cxx:4295
void NextEvent(Event_t &event) override
Copies first pending event from event queue to Event_t structure and removes event from queue.
Definition TGWin32.cxx:5821
void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox=kTRUE)
Map to and from X key symbols.
Definition TGWin32.cxx:6828
Bool_t AllocColor(GdkColormap *cmap, GdkColor *color)
Allocate color in colormap.
Definition TGWin32.cxx:1074
void SetAttMarker(WinContext_t wctxt, const TAttMarker &att) override
Set marker attributes for speicfied window.
Definition TGWin32.cxx:3328
Bool_t IsCmdThread() const override
returns kTRUE if we are inside cmd/server thread
Definition TGWin32.cxx:832
void SetClipOFF(Int_t wid) override
Turn off the clipping for the window wid.
Definition TGWin32.cxx:2817
void SetLineWidth(Width_t width) override
Set line width.
Definition TGWin32.cxx:3197
void SetInputFocus(Window_t id) override
Set keyboard input focus to window id.
Definition TGWin32.cxx:6762
void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos) override
Copy the pixmap wid at the position xpos, ypos in the current window.
Definition TGWin32.cxx:1552
Window_t GetCurrentWindow() const override
Return current window pointer. Protected method used by TGWin32TTF.
Definition TGWin32.cxx:1864
void MapRaised(Window_t id) override
Map window on screen and put on top of all windows.
Definition TGWin32.cxx:4578
Style_t GetFillStyle() const override
Return current fill style.
Definition TGWin32.cxx:3069
void ClearWindowW(WinContext_t wctxt) override
Clear specified window.
Definition TGWin32.cxx:1471
void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc, Int_t src_x, Int_t src_y, UInt_t width, UInt_t height, Int_t dest_x, Int_t dest_y) override
Copy a drawable (i.e.
Definition TGWin32.cxx:6268
void SelectInput(Window_t id, UInt_t evmask) override
Defines which input events the window is interested in.
Definition TGWin32.cxx:6741
Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist) override
Return atom handle for atom_name.
Definition TGWin32.cxx:5304
void ResizeWindow(Int_t wid) override
Resize the current window if necessary.
Definition TGWin32.cxx:2716
Int_t OpenDisplay(const char *dpyName=0) override
Open the display. Return -1 if the opening fails, 0 when ok.
Definition TGWin32.cxx:914
void SetDNDAware(Window_t win, Atom_t *typelist) override
Add XdndAware property and the list of drag and drop types to the Window win.
Definition TGWin32.cxx:7707
void UnionRegion(Region_t rega, Region_t regb, Region_t result) override
Compute the union of rega and regb and return result region.
Definition TGWin32.cxx:7114
void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm) override
Set pixmap as window background.
Definition TGWin32.cxx:4749
void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Set clipping region for the window wid.
Definition TGWin32.cxx:2834
Color_t GetFillColor() const override
Return current fill color.
Definition TGWin32.cxx:3044
void GetPasteBuffer(Window_t id, Atom_t atom, TString &text, Int_t &nchar, Bool_t del) override
Get contents of paste buffer atom into string.
Definition TGWin32.cxx:6868
void SetKeyAutoRepeat(Bool_t on=kTRUE) override
Turn key auto repeat on or off.
Definition TGWin32.cxx:6374
void DrawPolyLine(Int_t n, TPoint *xy) override
Draw a line through all points.
Definition TGWin32.cxx:1702
void CopyGC(GContext_t org, GContext_t dest, Mask_t mask) override
Copies graphics context from org to dest.
Definition TGWin32.cxx:5465
Int_t fBlueShift
Bits to left shift blue.
Definition TGWin32.h:115
GdkCursor * fCursors[kNumCursors]
List of cursors.
Definition TGWin32.h:79
void SetLineColor(Color_t cindex) override
Set color index for lines.
Definition TGWin32.cxx:3143
Bool_t Init(void *display=0) override
Initialize Win32 system. Returns kFALSE in case of failure.
Definition TGWin32.cxx:897
void QueryPointer(Int_t &ix, Int_t &iy) override
Query pointer position.
Definition TGWin32.cxx:2194
void SetDrawModeW(WinContext_t wctxt, EDrawMode mode) override
Set window draw mode.
Definition TGWin32.cxx:7748
void UpdateWindow(Int_t mode) override
Update display.
Definition TGWin32.cxx:4077
void GetRegionBox(Region_t reg, Rectangle_t *) override
Return smallest enclosing rectangle.
Definition TGWin32.cxx:7173
virtual ~TGWin32()
destructor.
Definition TGWin32.cxx:814
Int_t AddWindow(ULongptr_t qwid, UInt_t w, UInt_t h) override
Register a window created by Qt as a ROOT window (like InitWindow()).
Definition TGWin32.cxx:7416
Bool_t CreatePictureFromFile(Drawable_t id, const char *filename, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr) override
Create a picture pixmap from data on file.
Definition TGWin32.cxx:5564
void DrawPolyMarkerW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw n markers with the current attributes at position x, y in specified window.
Definition TGWin32.cxx:1776
Bool_t fUseSysPointers
True when using system mouse pointers.
Definition TGWin32.h:105
void SetDoubleBufferOFF() override
Turn double buffer mode off.
Definition TGWin32.cxx:2983
Int_t fGreenDiv
Green value divider.
Definition TGWin32.h:111
UInt_t ScreenWidthMM() const override
Returns the width of the screen in millimeters.
Definition TGWin32.cxx:7468
Int_t AddPixmap(ULongptr_t pix, UInt_t w, UInt_t h) override
register pixmap created by TGWin32GLManager
Definition TGWin32.cxx:7391
Window_t GetDefaultRootWindow() const override
Return handle to the default root window created when calling XOpenDisplay().
Definition TGWin32.cxx:5316
Int_t GetDepth() const override
Get maximum number of planes.
Definition TGWin32.cxx:5294
Colormap_t GetColormap() const override
Returns handle to colormap.
Definition TGWin32.h:259
void SetWindowBackground(Window_t id, ULong_t color) override
Set the window background color.
Definition TGWin32.cxx:4733
FontH_t GetFontHandle(FontStruct_t fs) override
Return handle to font described by font structure.
Definition TGWin32.cxx:5360
EDrawMode GetDrawModeW(WinContext_t wctxt) override
Returns window draw mode.
Definition TGWin32.cxx:7774
void SetInput(Int_t inp)
Set input on or off.
Definition TGWin32.cxx:3135
void RemoveWindow(ULongptr_t qwid) override
Remove a window created by Qt.
Definition TGWin32.cxx:7439
TExMap * fColors
Hash list of colors.
Definition TGWin32.h:78
Drawable_t CreateImage(UInt_t width, UInt_t height) override
Allocates the memory needed for an drawable.
Definition TGWin32.cxx:7218
Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h) override
Creates a pixmap of the width and height you specified and returns a pixmap ID that identifies it.
Definition TGWin32.cxx:5502
TObject()
TObject constructor.
Definition TObject.h:259
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
Description of a X11 color.
Definition TGWin32.h:58
Bool_t fDefined
true if pixel value is defined
Definition TGWin32.h:60
XColor_t()
Definition TGWin32.h:61
GdkColor color
Definition TGWin32.h:59
Description of a X11 window.
Definition TGWin32.cxx:133
TCanvas * style()
Definition style.C:1