Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TVirtualX.cxx
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Fons Rademakers 3/12/95
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 /**
13 \defgroup GraphicsBackends Graphics' Backends
14 \ingroup Graphics
15 Graphics' Backends interface classes.
16 Graphics classes interfacing ROOT graphics with the low level
17 native graphics backends(s) like X11, Cocoa, Win32 etc...
18 These classes are not meant to be used directly by ROOT users.
19 */
20 
21 /** \class TVirtualX
22 \ingroup GraphicsBackends
23 \ingroup Base
24 Semi-Abstract base class defining a generic interface to the underlying, low
25 level, native graphics backend (X11, Win32, MacOS, OpenGL...).
26 An instance of TVirtualX itself defines a batch interface to the graphics system.
27 */
28 
29 #include "TVirtualX.h"
30 #include "TString.h"
31 
32 
33 Atom_t gWM_DELETE_WINDOW;
34 Atom_t gMOTIF_WM_HINTS;
35 Atom_t gROOT_MESSAGE;
36 
37 
38 TVirtualX *gGXBatch; //Global pointer to batch graphics interface
39 TVirtualX* (*gPtr2VirtualX)() = 0; // returns pointer to global object
40 
41 
42 ClassImp(TVirtualX);
43 
44 
45 ////////////////////////////////////////////////////////////////////////////////
46 /// Ctor of ABC
47 
48 TVirtualX::TVirtualX(const char *name, const char *title) : TNamed(name, title),
49  TAttLine(1,1,1),TAttFill(1,1),TAttText(11,0,1,62,0.01), TAttMarker(1,1,1),
50  fDrawMode()
51 {
52 }
53 
54 ////////////////////////////////////////////////////////////////////////////////
55 /// Returns gVirtualX global
56 
57 TVirtualX *&TVirtualX::Instance()
58 {
59  static TVirtualX *instance = 0;
60  if (gPtr2VirtualX) instance = gPtr2VirtualX();
61  return instance;
62 }
63 
64 ////////////////////////////////////////////////////////////////////////////////
65 /// The WindowAttributes_t structure is set to default.
66 
67 void TVirtualX::GetWindowAttributes(Window_t /*id*/, WindowAttributes_t &attr)
68 {
69  attr.fX = attr.fY = 0;
70  attr.fWidth = attr.fHeight = 0;
71  attr.fVisual = 0;
72  attr.fMapState = kIsUnmapped;
73  attr.fScreen = 0;
74 }
75 
76 ////////////////////////////////////////////////////////////////////////////////
77 /// Looks up the string name of a color "cname" with respect to the screen
78 /// associated with the specified colormap. It returns the exact color value.
79 /// If the color name is not in the Host Portable Character Encoding,
80 /// the result is implementation dependent.
81 ///
82 /// \param [in] cmap the colormap
83 /// \param [in] cname the color name string; use of uppercase or lowercase
84 /// does not matter
85 /// \param [in] color returns the exact color value for later use
86 ///
87 /// The ColorStruct_t structure is set to default. Let system think we
88 /// could parse color.
89 
90 Bool_t TVirtualX::ParseColor(Colormap_t /*cmap*/, const char * /*cname*/,
91  ColorStruct_t &color)
92 {
93  color.fPixel = 0;
94  color.fRed = 0;
95  color.fGreen = 0;
96  color.fBlue = 0;
97  color.fMask = kDoRed | kDoGreen | kDoBlue;
98 
99  return kTRUE;
100 }
101 
102 ////////////////////////////////////////////////////////////////////////////////
103 /// Allocates a read-only colormap entry corresponding to the closest RGB
104 /// value supported by the hardware. If no cell could be allocated it
105 /// returns kFALSE, otherwise kTRUE.
106 ///
107 /// The pixel value is set to default. Let system think we could allocate
108 /// color.
109 ///
110 /// \param [in] cmap the colormap
111 /// \param [in] color specifies and returns the values actually used in the cmap
112 
113 Bool_t TVirtualX::AllocColor(Colormap_t /*cmap*/, ColorStruct_t &color)
114 {
115  color.fPixel = 0;
116  return kTRUE;
117 }
118 
119 ////////////////////////////////////////////////////////////////////////////////
120 /// Returns the current RGB value for the pixel in the "color" structure
121 ///
122 /// The color components are set to default.
123 ///
124 /// \param [in] cmap the colormap
125 /// \param [in] color specifies and returns the RGB values for the pixel specified
126 /// in the structure
127 
128 void TVirtualX::QueryColor(Colormap_t /*cmap*/, ColorStruct_t &color)
129 {
130  color.fRed = color.fGreen = color.fBlue = 0;
131 }
132 
133 ////////////////////////////////////////////////////////////////////////////////
134 /// The "event" is set to default event.
135 /// This method however, should never be called.
136 
137 void TVirtualX::NextEvent(Event_t &event)
138 {
139  event.fType = kButtonPress;
140  event.fWindow = 0;
141  event.fTime = 0;
142  event.fX = 0;
143  event.fY = 0;
144  event.fXRoot = 0;
145  event.fYRoot = 0;
146  event.fState = 0;
147  event.fCode = 0;
148  event.fWidth = 0;
149  event.fHeight = 0;
150  event.fCount = 0;
151 }
152 
153 ////////////////////////////////////////////////////////////////////////////////
154 /// Gets contents of the paste buffer "atom" into the string "text".
155 /// (nchar = number of characters) If "del" is true deletes the paste
156 /// buffer afterwards.
157 
158 void TVirtualX::GetPasteBuffer(Window_t /*id*/, Atom_t /*atom*/, TString &text,
159  Int_t &nchar, Bool_t /*del*/)
160 {
161  text = "";
162  nchar = 0;
163 }
164 
165 ////////////////////////////////////////////////////////////////////////////////
166 /// Initializes the X system. Returns kFALSE in case of failure.
167 /// It is implementation dependent.
168 
169 Bool_t TVirtualX::Init(void * /*display*/)
170 {
171  return kFALSE;
172 }
173 
174 ////////////////////////////////////////////////////////////////////////////////
175 /// Clears the entire area of the current window.
176 
177 void TVirtualX::ClearWindow()
178 {
179 }
180 
181 ////////////////////////////////////////////////////////////////////////////////
182 /// Deletes current window.
183 
184 void TVirtualX::CloseWindow()
185 {
186 }
187 
188 ////////////////////////////////////////////////////////////////////////////////
189 /// Deletes current pixmap.
190 
191 void TVirtualX::ClosePixmap()
192 {
193 }
194 
195 ////////////////////////////////////////////////////////////////////////////////
196 /// Copies the pixmap "wid" at the position [xpos,ypos] in the current window.
197 
198 void TVirtualX::CopyPixmap(Int_t /*wid*/, Int_t /*xpos*/, Int_t /*ypos*/)
199 {
200 }
201 
202 ////////////////////////////////////////////////////////////////////////////////
203 ///On a HiDPI resolution it can be > 1., this means glViewport should use
204 ///scaled width and height.
205 
206 Double_t TVirtualX::GetOpenGLScalingFactor()
207 {
208  return 1.;
209 }
210 
211 ////////////////////////////////////////////////////////////////////////////////
212 /// Creates OpenGL context for window "wid"
213 
214 void TVirtualX::CreateOpenGLContext(Int_t /*wid*/)
215 {
216 }
217 
218 ////////////////////////////////////////////////////////////////////////////////
219 /// Deletes OpenGL context for window "wid"
220 
221 void TVirtualX::DeleteOpenGLContext(Int_t /*wid*/)
222 {
223 }
224 
225 ////////////////////////////////////////////////////////////////////////////////
226 ///Create window with special pixel format. Noop everywhere except Cocoa.
227 
228 Window_t TVirtualX::CreateOpenGLWindow(Window_t /*parentID*/, UInt_t /*width*/, UInt_t /*height*/, const std::vector<std::pair<UInt_t, Int_t> > &/*format*/)
229 {
230  return Window_t();
231 }
232 
233 ////////////////////////////////////////////////////////////////////////////////
234 /// Creates OpenGL context for window "windowID".
235 
236 Handle_t TVirtualX::CreateOpenGLContext(Window_t /*windowID*/, Handle_t /*shareWith*/)
237 {
238  return Handle_t();
239 }
240 
241 ////////////////////////////////////////////////////////////////////////////////
242 /// Makes context ctx current OpenGL context.
243 
244 Bool_t TVirtualX::MakeOpenGLContextCurrent(Handle_t /*ctx*/, Window_t /*windowID*/)
245 {
246  return kFALSE;
247 }
248 
249 ////////////////////////////////////////////////////////////////////////////////
250 /// Asks OpenGL subsystem about the current OpenGL context.
251 
252 Handle_t TVirtualX::GetCurrentOpenGLContext()
253 {
254  return Handle_t();
255 }
256 
257 ////////////////////////////////////////////////////////////////////////////////
258 /// Flushes OpenGL buffer.
259 
260 void TVirtualX::FlushOpenGLBuffer(Handle_t /*ctx*/)
261 {
262 }
263 
264 ////////////////////////////////////////////////////////////////////////////////
265 /// Draws a box between [x1,y1] and [x2,y2] according to the "mode".
266 ///
267 /// \param [in] x1,y1 left down corner
268 /// \param [in] x2,y2 right up corner
269 /// \param [in] mode drawing mode:
270 /// - mode = 0 hollow (kHollow)
271 /// - mode = 1 solid (kSolid)
272 
273 void TVirtualX::DrawBox(Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, Int_t /*y2*/,
274  EBoxMode /*mode*/)
275 {
276 }
277 
278 ////////////////////////////////////////////////////////////////////////////////
279 /// Draws a cell array. The drawing is done with the pixel precision
280 /// if (x2-x1)/nx (or y) is not a exact pixel number the position of
281 /// the top right corner may be wrong.
282 ///
283 /// \param [in] x1,y1 left down corner
284 /// \param [in] x2,y2 right up corner
285 /// \param [in] nx,ny array size
286 /// \param [in] ic array
287 
288 void TVirtualX::DrawCellArray(Int_t /*x1*/, Int_t /*y1*/,
289  Int_t /*x2*/, Int_t /*y2*/,
290  Int_t /*nx*/, Int_t /*ny*/, Int_t * /*ic*/)
291 {
292 }
293 
294 ////////////////////////////////////////////////////////////////////////////////
295 /// Fills area described by the polygon.
296 ///
297 /// \param [in] n number of points
298 /// \param [in] xy list of points. xy(2,n)
299 
300 void TVirtualX::DrawFillArea(Int_t /*n*/, TPoint * /*xy*/)
301 {
302 }
303 
304 ////////////////////////////////////////////////////////////////////////////////
305 /// Draws a line.
306 ///
307 /// \param [in] x1,y1 begin of line
308 /// \param [in] x2,y2 end of line
309 
310 void TVirtualX::DrawLine(Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, Int_t /*y2*/)
311 {
312 }
313 
314 ////////////////////////////////////////////////////////////////////////////////
315 /// Draws a line through all points in the list.
316 ///
317 /// \param [in] n number of points
318 /// \param [in] xy list of points
319 
320 void TVirtualX::DrawPolyLine(Int_t /*n*/, TPoint * /*xy*/)
321 {
322 }
323 
324 ////////////////////////////////////////////////////////////////////////////////
325 /// Draws "n" markers with the current attributes at position [x,y].
326 ///
327 /// \param [in] n number of markers to draw
328 /// \param [in] xy an array of x,y marker coordinates
329 
330 void TVirtualX::DrawPolyMarker(Int_t /*n*/, TPoint * /*xy*/)
331 {
332 }
333 
334 ////////////////////////////////////////////////////////////////////////////////
335 /// Draws a text string using current font.
336 ///
337 /// \param [in] x,y text position
338 /// \param [in] angle text angle
339 /// \param [in] mgn magnification factor
340 /// \param [in] text text string
341 /// \param [in] mode drawing mode:
342 /// - mode = 0 the background is not drawn (kClear)
343 /// - mode = 1 the background is drawn (kOpaque)
344 
345 void TVirtualX::DrawText(Int_t /*x*/, Int_t /*y*/, Float_t /*angle*/,
346  Float_t /*mgn*/, const char * /*text*/,
347  ETextMode /*mode*/)
348 {
349 }
350 
351 ////////////////////////////////////////////////////////////////////////////////
352 /// Draws a text string using current font.
353 ///
354 /// \param [in] x,y text position
355 /// \param [in] angle text angle
356 /// \param [in] mgn magnification factor
357 /// \param [in] text text string
358 /// \param [in] mode drawing mode:
359 /// - mode = 0 the background is not drawn (kClear)
360 /// - mode = 1 the background is drawn (kOpaque)
361 
362 void TVirtualX::DrawText(Int_t /*x*/, Int_t /*y*/, Float_t /*angle*/,
363  Float_t /*mgn*/, const wchar_t * /*text*/,
364  ETextMode /*mode*/)
365 {
366 }
367 
368 ////////////////////////////////////////////////////////////////////////////////
369 /// Executes the command "code" coming from the other threads (Win32)
370 
371 UInt_t TVirtualX::ExecCommand(TGWin32Command * /*code*/)
372 {
373  return 0;
374 }
375 
376 ////////////////////////////////////////////////////////////////////////////////
377 /// Queries the double buffer value for the window "wid".
378 
379 Int_t TVirtualX::GetDoubleBuffer(Int_t /*wid*/)
380 {
381  return 0;
382 }
383 
384 ////////////////////////////////////////////////////////////////////////////////
385 /// Returns character up vector.
386 
387 void TVirtualX::GetCharacterUp(Float_t &chupx, Float_t &chupy)
388 {
389  chupx = chupy = 0;
390 }
391 
392 ////////////////////////////////////////////////////////////////////////////////
393 /// Returns position and size of window "wid".
394 ///
395 /// \param [in] wid window identifier
396 /// if wid < 0 the size of the display is returned
397 /// \param [in] x, y returned window position
398 /// \param [in] w, h returned window size
399 
400 void TVirtualX::GetGeometry(Int_t /*wid*/, Int_t &x, Int_t &y,
401  UInt_t &w, UInt_t &h)
402 {
403  x = y = 0;
404  w = h = 0;
405 }
406 
407 ////////////////////////////////////////////////////////////////////////////////
408 /// Returns hostname on which the display is opened.
409 
410 const char *TVirtualX::DisplayName(const char *)
411 {
412  return "batch";
413 }
414 
415 ////////////////////////////////////////////////////////////////////////////////
416 /// Returns the current native event handle.
417 
418 Handle_t TVirtualX::GetNativeEvent() const
419 {
420  return 0;
421 }
422 
423 ////////////////////////////////////////////////////////////////////////////////
424 /// Returns pixel value associated to specified ROOT color number "cindex".
425 
426 ULong_t TVirtualX::GetPixel(Color_t /*cindex*/)
427 {
428  return 0;
429 }
430 
431 ////////////////////////////////////////////////////////////////////////////////
432 /// Returns the maximum number of planes.
433 
434 void TVirtualX::GetPlanes(Int_t &nplanes)
435 {
436  nplanes = 0;
437 }
438 
439 ////////////////////////////////////////////////////////////////////////////////
440 /// Returns RGB values for color "index".
441 
442 void TVirtualX::GetRGB(Int_t /*index*/, Float_t &r, Float_t &g, Float_t &b)
443 {
444  r = g = b = 0;
445 }
446 
447 ////////////////////////////////////////////////////////////////////////////////
448 /// Returns the size of the specified character string "mess".
449 ///
450 /// \param [in] w the text width
451 /// \param [in] h the text height
452 /// \param [in] mess the string
453 
454 void TVirtualX::GetTextExtent(UInt_t &w, UInt_t &h, char * /*mess*/)
455 {
456  w = h = 0;
457 }
458 
459 ////////////////////////////////////////////////////////////////////////////////
460 /// Returns the size of the specified character string "mess".
461 ///
462 /// \param [in] w the text width
463 /// \param [in] h the text height
464 /// \param [in] mess the string
465 
466 void TVirtualX::GetTextExtent(UInt_t &w, UInt_t &h, wchar_t * /*mess*/)
467 {
468  w = h = 0;
469 }
470 
471 ////////////////////////////////////////////////////////////////////////////////
472 /// Returns the ascent of the current font (in pixels).
473 /// The ascent of a font is the distance from the baseline
474 /// to the highest position characters extend to
475 
476 Int_t TVirtualX::GetFontAscent() const
477 {
478  return 0;
479 }
480 
481 ////////////////////////////////////////////////////////////////////////////////
482 /// Default version is noop, but in principle what
483 /// ROOT understands as ascent is text related.
484 
485 Int_t TVirtualX::GetFontAscent(const char * /*mess*/) const
486 {
487  return GetFontAscent();
488 }
489 
490 ////////////////////////////////////////////////////////////////////////////////
491 /// Returns the descent of the current font (in pixels.
492 /// The descent is the distance from the base line
493 /// to the lowest point characters extend to.
494 
495 Int_t TVirtualX::GetFontDescent() const
496 {
497  return 0;
498 }
499 
500 ////////////////////////////////////////////////////////////////////////////////
501 /// Default version is noop, but in principle what
502 /// ROOT understands as descent requires a certain text.
503 
504 Int_t TVirtualX::GetFontDescent(const char * /*mess*/) const
505 {
506  return GetFontDescent();
507 }
508 
509 ////////////////////////////////////////////////////////////////////////////////
510 /// Returns the current font magnification factor
511 
512 Float_t TVirtualX::GetTextMagnitude()
513 {
514  return 0;
515 }
516 
517 ////////////////////////////////////////////////////////////////////////////////
518 /// Returns True when TrueType fonts are used
519 
520 Bool_t TVirtualX::HasTTFonts() const
521 {
522  return kFALSE;
523 }
524 
525 ////////////////////////////////////////////////////////////////////////////////
526 /// Returns the X11 window identifier.
527 ///
528 /// \param [in] wid workstation identifier (input)
529 
530 Window_t TVirtualX::GetWindowID(Int_t /*wid*/)
531 {
532  return 0;
533 }
534 
535 ////////////////////////////////////////////////////////////////////////////////
536 /// Creates a new window and return window number.
537 /// Returns -1 if window initialization fails.
538 
539 Int_t TVirtualX::InitWindow(ULong_t /*window*/)
540 {
541  return 0;
542 }
543 
544 ////////////////////////////////////////////////////////////////////////////////
545 /// Registers a window created by Qt as a ROOT window
546 ///
547 /// \param [in] qwid window identifier
548 /// \param [in] w, h the width and height, which define the window size
549 
550 Int_t TVirtualX::AddWindow(ULong_t /*qwid*/, UInt_t /*w*/, UInt_t /*h*/)
551 {
552  return 0;
553 }
554 
555 ////////////////////////////////////////////////////////////////////////////////
556 /// Registers a pixmap created by TGLManager as a ROOT pixmap
557 ///
558 /// \param [in] pixid pixmap identifier
559 /// \param [in] w, h the width and height, which define the pixmap size
560 
561 Int_t TVirtualX::AddPixmap(ULong_t /*pixid*/, UInt_t /*w*/, UInt_t /*h*/)
562 {
563  return 0;
564 }
565 
566 
567 ////////////////////////////////////////////////////////////////////////////////
568 /// Removes the created by Qt window "qwid".
569 
570 void TVirtualX::RemoveWindow(ULong_t /*qwid*/)
571 {
572 }
573 
574 ////////////////////////////////////////////////////////////////////////////////
575 /// Moves the window "wid" to the specified x and y coordinates.
576 /// It does not change the window's size, raise the window, or change
577 /// the mapping state of the window.
578 ///
579 /// \param [in] wid window identifier
580 /// \param [in] x, y coordinates, which define the new position of the window
581 /// relative to its parent.
582 
583 void TVirtualX::MoveWindow(Int_t /*wid*/, Int_t /*x*/, Int_t /*y*/)
584 {
585 }
586 
587 ////////////////////////////////////////////////////////////////////////////////
588 /// Creates a pixmap of the width "w" and height "h" you specified.
589 
590 Int_t TVirtualX::OpenPixmap(UInt_t /*w*/, UInt_t /*h*/)
591 {
592  return 0;
593 }
594 
595 ////////////////////////////////////////////////////////////////////////////////
596 /// Returns the pointer position.
597 
598 void TVirtualX::QueryPointer(Int_t &ix, Int_t &iy)
599 {
600  ix = iy = 0;
601 }
602 
603 ////////////////////////////////////////////////////////////////////////////////
604 /// If id is NULL - loads the specified gif file at position [x0,y0] in the
605 /// current window. Otherwise creates pixmap from gif file
606 
607 Pixmap_t TVirtualX::ReadGIF(Int_t /*x0*/, Int_t /*y0*/, const char * /*file*/,
608  Window_t /*id*/)
609 {
610  return 0;
611 }
612 
613 ////////////////////////////////////////////////////////////////////////////////
614 /// Requests Locator position.
615 ///
616 /// \param [in] x,y cursor position at moment of button press (output)
617 /// \param [in] ctyp cursor type (input)
618 /// - ctyp = 1 tracking cross
619 /// - ctyp = 2 cross-hair
620 /// - ctyp = 3 rubber circle
621 /// - ctyp = 4 rubber band
622 /// - ctyp = 5 rubber rectangle
623 ///
624 /// \param [in] mode input mode
625 /// - mode = 0 request
626 /// - mode = 1 sample
627 ///
628 /// \return
629 /// - in request mode:
630 /// - 1 = left is pressed
631 /// - 2 = middle is pressed
632 /// - 3 = right is pressed
633 /// - in sample mode:
634 /// - 11 = left is released
635 /// - 12 = middle is released
636 /// - 13 = right is released
637 /// - -1 = nothing is pressed or released
638 /// - -2 = leave the window
639 /// - else = keycode (keyboard is pressed)
640 
641 Int_t TVirtualX::RequestLocator(Int_t /*mode*/, Int_t /*ctyp*/,
642  Int_t &x, Int_t &y)
643 {
644  x = y = 0;
645  return 0;
646 }
647 
648 ////////////////////////////////////////////////////////////////////////////////
649 /// Requests string: text is displayed and can be edited with Emacs-like
650 /// keybinding. Returns termination code (0 for ESC, 1 for RETURN)
651 ///
652 /// \param [in] x,y position where text is displayed
653 /// \param [in] text displayed text (as input), edited text (as output)
654 
655 Int_t TVirtualX::RequestString(Int_t /*x*/, Int_t /*y*/, char *text)
656 {
657  if (text) *text = 0;
658  return 0;
659 }
660 
661 ////////////////////////////////////////////////////////////////////////////////
662 /// Rescales the window "wid".
663 ///
664 /// \param [in] wid window identifier
665 /// \param [in] w the width
666 /// \param [in] h the height
667 
668 void TVirtualX::RescaleWindow(Int_t /*wid*/, UInt_t /*w*/, UInt_t /*h*/)
669 {
670 }
671 
672 ////////////////////////////////////////////////////////////////////////////////
673 /// Resizes the specified pixmap "wid".
674 ///
675 /// \param [in] wid window identifier
676 /// \param [in] w, h the width and height which define the pixmap dimensions
677 
678 Int_t TVirtualX::ResizePixmap(Int_t /*wid*/, UInt_t /*w*/, UInt_t /*h*/)
679 {
680  return 0;
681 }
682 
683 ////////////////////////////////////////////////////////////////////////////////
684 /// Resizes the window "wid" if necessary.
685 
686 void TVirtualX::ResizeWindow(Int_t /*wid*/)
687 {
688 }
689 
690 ////////////////////////////////////////////////////////////////////////////////
691 /// Selects the window "wid" to which subsequent output is directed.
692 
693 void TVirtualX::SelectWindow(Int_t /*wid*/)
694 {
695 }
696 
697 ////////////////////////////////////////////////////////////////////////////////
698 /// Selects the pixmap "qpixid".
699 
700 void TVirtualX::SelectPixmap(Int_t /*qpixid*/)
701 {
702 }
703 
704 ////////////////////////////////////////////////////////////////////////////////
705 /// Sets character up vector.
706 
707 void TVirtualX::SetCharacterUp(Float_t /*chupx*/, Float_t /*chupy*/)
708 {
709 }
710 
711 ////////////////////////////////////////////////////////////////////////////////
712 /// Turns off the clipping for the window "wid".
713 
714 void TVirtualX::SetClipOFF(Int_t /*wid*/)
715 {
716 }
717 
718 ////////////////////////////////////////////////////////////////////////////////
719 /// Sets clipping region for the window "wid".
720 ///
721 /// \param [in] wid window identifier
722 /// \param [in] x, y origin of clipping rectangle
723 /// \param [in] w, h the clipping rectangle dimensions
724 
725 void TVirtualX::SetClipRegion(Int_t /*wid*/, Int_t /*x*/, Int_t /*y*/,
726  UInt_t /*w*/, UInt_t /*h*/)
727 {
728 }
729 
730 ////////////////////////////////////////////////////////////////////////////////
731 /// The cursor "cursor" will be used when the pointer is in the
732 /// window "wid".
733 
734 void TVirtualX::SetCursor(Int_t /*win*/, ECursor /*cursor*/)
735 {
736 }
737 
738 ////////////////////////////////////////////////////////////////////////////////
739 /// Sets the double buffer on/off on the window "wid".
740 ///
741 /// \param [in] wid window identifier.
742 /// - 999 means all opened windows.
743 /// \param [in] mode the on/off switch
744 /// - mode = 1 double buffer is on
745 /// - mode = 0 double buffer is off
746 
747 void TVirtualX::SetDoubleBuffer(Int_t /*wid*/, Int_t /*mode*/)
748 {
749 }
750 
751 ////////////////////////////////////////////////////////////////////////////////
752 /// Turns double buffer mode off.
753 
754 void TVirtualX::SetDoubleBufferOFF()
755 {
756 }
757 
758 ////////////////////////////////////////////////////////////////////////////////
759 /// Turns double buffer mode on.
760 
761 void TVirtualX::SetDoubleBufferON()
762 {
763 }
764 
765 ////////////////////////////////////////////////////////////////////////////////
766 /// Sets the drawing mode.
767 ///
768 /// \param [in] mode drawing mode.
769 /// - mode = 1 copy
770 /// - mode = 2 xor
771 /// - mode = 3 invert
772 /// - mode = 4 set the suitable mode for cursor echo according to the vendor
773 
774 void TVirtualX::SetDrawMode(EDrawMode /*mode*/)
775 {
776 }
777 
778 ////////////////////////////////////////////////////////////////////////////////
779 /// Sets color index "cindex" for fill areas.
780 
781 void TVirtualX::SetFillColor(Color_t /*cindex*/)
782 {
783 }
784 
785 ////////////////////////////////////////////////////////////////////////////////
786 /// Sets fill area style.
787 ///
788 /// \param [in] style compound fill area interior style
789 /// - style = 1000 * interiorstyle + styleindex
790 
791 void TVirtualX::SetFillStyle(Style_t /*style*/)
792 {
793 }
794 
795 ////////////////////////////////////////////////////////////////////////////////
796 /// Sets color index "cindex" for drawing lines.
797 
798 void TVirtualX::SetLineColor(Color_t /*cindex*/)
799 {
800 }
801 
802 ////////////////////////////////////////////////////////////////////////////////
803 /// Sets the line type.
804 ///
805 /// \param [in] n length of the dash list
806 /// - n <= 0 use solid lines
807 /// - n > 0 use dashed lines described by dash(n)
808 /// e.g. n = 4,dash = (6,3,1,3) gives a dashed-dotted line
809 /// with dash length 6 and a gap of 7 between dashes
810 /// \param [in] dash(n) dash segment lengths
811 
812 void TVirtualX::SetLineType(Int_t /*n*/, Int_t * /*dash*/)
813 {
814 }
815 
816 ////////////////////////////////////////////////////////////////////////////////
817 /// Sets the line style.
818 ///
819 /// \param [in] linestyle line style.
820 /// - linestyle <= 1 solid
821 /// - linestyle = 2 dashed
822 /// - linestyle = 3 dotted
823 /// - linestyle = 4 dashed-dotted
824 
825 void TVirtualX::SetLineStyle(Style_t /*linestyle*/)
826 {
827 }
828 
829 ////////////////////////////////////////////////////////////////////////////////
830 /// Sets the line width.
831 ///
832 /// \param [in] width the line width in pixels
833 
834 void TVirtualX::SetLineWidth(Width_t /*width*/)
835 {
836 }
837 
838 ////////////////////////////////////////////////////////////////////////////////
839 /// Sets color index "cindex" for markers.
840 
841 void TVirtualX::SetMarkerColor(Color_t /*cindex*/)
842 {
843 }
844 
845 ////////////////////////////////////////////////////////////////////////////////
846 /// Sets marker size index.
847 ///
848 /// \param [in] markersize the marker scale factor
849 
850 void TVirtualX::SetMarkerSize(Float_t /*markersize*/)
851 {
852 }
853 
854 ////////////////////////////////////////////////////////////////////////////////
855 /// Sets marker style.
856 
857 void TVirtualX::SetMarkerStyle(Style_t /*markerstyle*/)
858 {
859 }
860 
861 ////////////////////////////////////////////////////////////////////////////////
862 /// Sets opacity of the current window. This image manipulation routine
863 /// works by adding to a percent amount of neutral to each pixels RGB.
864 /// Since it requires quite some additional color map entries is it
865 /// only supported on displays with more than > 8 color planes (> 256
866 /// colors).
867 
868 void TVirtualX::SetOpacity(Int_t /*percent*/)
869 {
870 }
871 
872 ////////////////////////////////////////////////////////////////////////////////
873 /// Sets color intensities the specified color index "cindex".
874 ///
875 /// \param [in] cindex color index
876 /// \param [in] r, g, b the red, green, blue intensities between 0.0 and 1.0
877 
878 void TVirtualX::SetRGB(Int_t /*cindex*/, Float_t /*r*/, Float_t /*g*/,
879  Float_t /*b*/)
880 {
881 }
882 
883 ////////////////////////////////////////////////////////////////////////////////
884 /// Sets the text alignment.
885 ///
886 /// \param [in] talign text alignment.
887 /// - talign = txalh horizontal text alignment
888 /// - talign = txalv vertical text alignment
889 
890 void TVirtualX::SetTextAlign(Short_t /*talign*/)
891 {
892 }
893 
894 ////////////////////////////////////////////////////////////////////////////////
895 /// Sets the color index "cindex" for text.
896 
897 void TVirtualX::SetTextColor(Color_t /*cindex*/)
898 {
899 }
900 
901 ////////////////////////////////////////////////////////////////////////////////
902 /// Sets text font to specified name "fontname".This function returns 0 if
903 /// the specified font is found, 1 if it is not.
904 ///
905 /// \param [in] fontname font name
906 /// \param [in] mode loading flag
907 /// - mode = 0 search if the font exist (kCheck)
908 /// - mode = 1 search the font and load it if it exists (kLoad)
909 
910 Int_t TVirtualX::SetTextFont(char * /*fontname*/, ETextSetMode /*mode*/)
911 {
912  return 0;
913 }
914 
915 ////////////////////////////////////////////////////////////////////////////////
916 /// Sets the current text font number.
917 
918 void TVirtualX::SetTextFont(Font_t /*fontnumber*/)
919 {
920 }
921 
922 ////////////////////////////////////////////////////////////////////////////////
923 /// Sets the current text magnification factor to "mgn"
924 
925 void TVirtualX::SetTextMagnitude(Float_t /*mgn*/)
926 {
927 }
928 
929 ////////////////////////////////////////////////////////////////////////////////
930 /// Sets the current text size to "textsize"
931 
932 void TVirtualX::SetTextSize(Float_t /*textsize*/)
933 {
934 }
935 
936 ////////////////////////////////////////////////////////////////////////////////
937 /// Set synchronisation on or off.
938 ///
939 /// \param [in] mode synchronisation on/off
940 /// - mode=1 on
941 /// - mode<>0 off
942 
943 void TVirtualX::Sync(Int_t /*mode*/)
944 {
945 }
946 
947 ////////////////////////////////////////////////////////////////////////////////
948 /// Updates or synchronises client and server once (not permanent).
949 /// according to "mode".
950 ///
951 /// \param [in] mode update mode.
952 /// - mode = 1 update
953 /// - mode = 0 sync
954 
955 void TVirtualX::UpdateWindow(Int_t /*mode*/)
956 {
957 }
958 
959 ////////////////////////////////////////////////////////////////////////////////
960 /// Sets the pointer position.
961 ///
962 /// \param [in] ix new X coordinate of pointer
963 /// \param [in] iy new Y coordinate of pointer
964 /// \param [in] id window identifier
965 ///
966 /// Coordinates are relative to the origin of the window id
967 /// or to the origin of the current window if id == 0.
968 
969 void TVirtualX::Warp(Int_t /*ix*/, Int_t /*iy*/, Window_t /*id*/)
970 {
971 }
972 
973 ////////////////////////////////////////////////////////////////////////////////
974 /// Writes the current window into GIF file.
975 /// Returns 1 in case of success, 0 otherwise.
976 
977 Int_t TVirtualX::WriteGIF(char * /*name*/)
978 {
979  return 0;
980 }
981 
982 ////////////////////////////////////////////////////////////////////////////////
983 /// Writes the pixmap "wid" in the bitmap file "pxname".
984 ///
985 /// \param [in] wid the pixmap address
986 /// \param [in] w, h the width and height of the pixmap.
987 /// \param [in] pxname the file name
988 
989 void TVirtualX::WritePixmap(Int_t /*wid*/, UInt_t /*w*/, UInt_t /*h*/,
990  char * /*pxname*/)
991 {
992 }
993 
994 
995 //---- Methods used for GUI -----
996 ////////////////////////////////////////////////////////////////////////////////
997 /// Maps the window "id" and all of its subwindows that have had map
998 /// requests. This function has no effect if the window is already mapped.
999 
1000 void TVirtualX::MapWindow(Window_t /*id*/)
1001 {
1002 }
1003 
1004 ////////////////////////////////////////////////////////////////////////////////
1005 /// Maps all subwindows for the specified window "id" in top-to-bottom
1006 /// stacking order.
1007 
1008 void TVirtualX::MapSubwindows(Window_t /*id*/)
1009 {
1010 }
1011 
1012 ////////////////////////////////////////////////////////////////////////////////
1013 /// Maps the window "id" and all of its subwindows that have had map
1014 /// requests on the screen and put this window on the top of of the
1015 /// stack of all windows.
1016 
1017 void TVirtualX::MapRaised(Window_t /*id*/)
1018 {
1019 }
1020 
1021 ////////////////////////////////////////////////////////////////////////////////
1022 /// Unmaps the specified window "id". If the specified window is already
1023 /// unmapped, this function has no effect. Any child window will no longer
1024 /// be visible (but they are still mapped) until another map call is made
1025 /// on the parent.
1026 
1027 void TVirtualX::UnmapWindow(Window_t /*id*/)
1028 {
1029 }
1030 
1031 ////////////////////////////////////////////////////////////////////////////////
1032 /// Destroys the window "id" as well as all of its subwindows.
1033 /// The window should never be referenced again. If the window specified
1034 /// by the "id" argument is mapped, it is unmapped automatically.
1035 
1036 void TVirtualX::DestroyWindow(Window_t /*id*/)
1037 {
1038 }
1039 
1040 ////////////////////////////////////////////////////////////////////////////////
1041 /// The DestroySubwindows function destroys all inferior windows of the
1042 /// specified window, in bottom-to-top stacking order.
1043 
1044 void TVirtualX::DestroySubwindows(Window_t /*id*/)
1045 {
1046 }
1047 
1048 ////////////////////////////////////////////////////////////////////////////////
1049 /// Raises the specified window to the top of the stack so that no
1050 /// sibling window obscures it.
1051 
1052 void TVirtualX::RaiseWindow(Window_t /*id*/)
1053 {
1054 }
1055 
1056 ////////////////////////////////////////////////////////////////////////////////
1057 /// Lowers the specified window "id" to the bottom of the stack so
1058 /// that it does not obscure any sibling windows.
1059 
1060 void TVirtualX::LowerWindow(Window_t /*id*/)
1061 {
1062 }
1063 
1064 ////////////////////////////////////////////////////////////////////////////////
1065 /// Moves the specified window to the specified x and y coordinates.
1066 /// It does not change the window's size, raise the window, or change
1067 /// the mapping state of the window.
1068 ///
1069 /// \param [in] id window identifier
1070 /// \param [in] x, y coordinates, which define the new position of the window
1071 /// relative to its parent.
1072 
1073 void TVirtualX::MoveWindow(Window_t /*id*/, Int_t /*x*/, Int_t /*y*/)
1074 {
1075 }
1076 
1077 ////////////////////////////////////////////////////////////////////////////////
1078 /// Changes the size and location of the specified window "id" without
1079 /// raising it.
1080 ///
1081 /// \param [in] id window identifier
1082 /// \param [in] x, y coordinates, which define the new position of the window
1083 /// relative to its parent.
1084 /// \param [in] w, h the width and height, which define the interior size of
1085 /// the window
1086 
1087 void TVirtualX::MoveResizeWindow(Window_t /*id*/, Int_t /*x*/, Int_t /*y*/,
1088  UInt_t /*w*/, UInt_t /*h*/)
1089 {
1090 }
1091 
1092 ////////////////////////////////////////////////////////////////////////////////
1093 /// Changes the width and height of the specified window "id", not
1094 /// including its borders. This function does not change the window's
1095 /// upper-left coordinate.
1096 ///
1097 /// \param [in] id window identifier
1098 /// \param [in] w, h the width and height, which are the interior dimensions of
1099 /// the window after the call completes.
1100 
1101 void TVirtualX::ResizeWindow(Window_t /*id*/, UInt_t /*w*/, UInt_t /*h*/)
1102 {
1103 }
1104 
1105 ////////////////////////////////////////////////////////////////////////////////
1106 /// Iconifies the window "id".
1107 
1108 void TVirtualX::IconifyWindow(Window_t /*id*/)
1109 {
1110 }
1111 ////////////////////////////////////////////////////////////////////////////////
1112 /// Notify the low level GUI layer ROOT requires "tgwindow" to be
1113 /// updated
1114 ///
1115 /// Returns kTRUE if the notification was desirable and it was sent
1116 ///
1117 /// At the moment only Qt4 layer needs that
1118 ///
1119 /// One needs explicitly cast the first parameter to TGWindow to make
1120 /// it working in the implementation.
1121 ///
1122 /// One needs to process the notification to confine
1123 /// all paint operations within "expose" / "paint" like low level event
1124 /// or equivalent
1125 
1126 Bool_t TVirtualX::NeedRedraw(ULong_t /*tgwindow*/, Bool_t /*force*/)
1127 {
1128  return kFALSE;
1129 }
1130 
1131 ////////////////////////////////////////////////////////////////////////////////
1132 /// If the specified window is mapped, ReparentWindow automatically
1133 /// performs an UnmapWindow request on it, removes it from its current
1134 /// position in the hierarchy, and inserts it as the child of the specified
1135 /// parent. The window is placed in the stacking order on top with respect
1136 /// to sibling windows.
1137 
1138 void TVirtualX::ReparentWindow(Window_t /*id*/, Window_t /*pid*/,
1139  Int_t /*x*/, Int_t /*y*/)
1140 {
1141 }
1142 
1143 ////////////////////////////////////////////////////////////////////////////////
1144 /// Sets the background of the window "id" to the specified color value
1145 /// "color". Changing the background does not cause the window contents
1146 /// to be changed.
1147 
1148 void TVirtualX::SetWindowBackground(Window_t /*id*/, ULong_t /*color*/)
1149 {
1150 }
1151 
1152 ////////////////////////////////////////////////////////////////////////////////
1153 /// Sets the background pixmap of the window "id" to the specified
1154 /// pixmap "pxm".
1155 
1156 void TVirtualX::SetWindowBackgroundPixmap(Window_t /*id*/, Pixmap_t /*pxm*/)
1157 {
1158 }
1159 
1160 ////////////////////////////////////////////////////////////////////////////////
1161 /// Creates an unmapped subwindow for a specified parent window and returns
1162 /// the created window. The created window is placed on top in the stacking
1163 /// order with respect to siblings. The coordinate system has the X axis
1164 /// horizontal and the Y axis vertical with the origin [0,0] at the
1165 /// upper-left corner. Each window and pixmap has its own coordinate system.
1166 ///
1167 /// \param [in] parent the parent window
1168 /// \param [in] x, y coordinates, the top-left outside corner of the window's
1169 /// borders; relative to the inside of the parent window's borders
1170 /// \param [in] w, h width and height of the created window; do not include the
1171 /// created window's borders
1172 /// \param [in] border the border pixel value of the window
1173 /// \param [in] depth the window's depth
1174 /// \param [in] clss the created window's class; can be InputOutput, InputOnly, or
1175 /// CopyFromParent
1176 /// \param [in] visual the visual type
1177 /// \param [in] attr the structure from which the values are to be taken.
1178 /// \param [in] wtype the window type
1179 
1180 Window_t TVirtualX::CreateWindow(Window_t /*parent*/, Int_t /*x*/, Int_t /*y*/,
1181  UInt_t /*w*/, UInt_t /*h*/,
1182  UInt_t /*border*/, Int_t /*depth*/,
1183  UInt_t /*clss*/, void * /*visual*/,
1184  SetWindowAttributes_t * /*attr*/,
1185  UInt_t /*wtype*/)
1186 {
1187  return 0;
1188 }
1189 
1190 ////////////////////////////////////////////////////////////////////////////////
1191 /// Opens connection to display server (if such a thing exist on the
1192 /// current platform). The encoding and interpretation of the display
1193 /// name.
1194 ///
1195 /// On X11 this method returns on success the X display socket descriptor
1196 /// >0, 0 in case of batch mode, and <0 in case of failure (cannot connect
1197 /// to display dpyName).
1198 
1199 Int_t TVirtualX::OpenDisplay(const char * /*dpyName*/)
1200 {
1201  return 0;
1202 }
1203 
1204 ////////////////////////////////////////////////////////////////////////////////
1205 /// Closes connection to display server and destroys all windows.
1206 
1207 void TVirtualX::CloseDisplay()
1208 {
1209 }
1210 
1211 ////////////////////////////////////////////////////////////////////////////////
1212 /// Returns handle to display (might be useful in some cases where
1213 /// direct X11 manipulation outside of TVirtualX is needed, e.g. GL
1214 /// interface).
1215 
1216 Display_t TVirtualX::GetDisplay() const
1217 {
1218  return 0;
1219 }
1220 
1221 ////////////////////////////////////////////////////////////////////////////////
1222 /// Returns handle to visual.
1223 ///
1224 /// Might be useful in some cases where direct X11 manipulation outside
1225 /// of TVirtualX is needed, e.g. GL interface.
1226 
1227 Visual_t TVirtualX::GetVisual() const
1228 {
1229  return 0;
1230 }
1231 
1232 ////////////////////////////////////////////////////////////////////////////////
1233 /// Returns screen number.
1234 ///
1235 /// Might be useful in some cases where direct X11 manipulation outside
1236 /// of TVirtualX is needed, e.g. GL interface.
1237 
1238 Int_t TVirtualX::GetScreen() const
1239 {
1240  return 0;
1241 }
1242 
1243 ////////////////////////////////////////////////////////////////////////////////
1244 /// Returns depth of screen (number of bit planes).
1245 /// Equivalent to GetPlanes().
1246 
1247 Int_t TVirtualX::GetDepth() const
1248 {
1249  return 0;
1250 }
1251 
1252 ////////////////////////////////////////////////////////////////////////////////
1253 /// Returns handle to colormap.
1254 ///
1255 /// Might be useful in some cases where direct X11 manipulation outside
1256 /// of TVirtualX is needed, e.g. GL interface.
1257 
1258 Colormap_t TVirtualX::GetColormap() const
1259 {
1260  return 0;
1261 }
1262 
1263 ////////////////////////////////////////////////////////////////////////////////
1264 /// Returns handle to the default root window created when calling
1265 /// XOpenDisplay().
1266 
1267 Window_t TVirtualX::GetDefaultRootWindow() const
1268 {
1269  return 0;
1270 }
1271 
1272 ////////////////////////////////////////////////////////////////////////////////
1273 /// Returns the atom identifier associated with the specified "atom_name"
1274 /// string. If "only_if_exists" is False, the atom is created if it does
1275 /// not exist. If the atom name is not in the Host Portable Character
1276 /// Encoding, the result is implementation dependent. Uppercase and
1277 /// lowercase matter; the strings "thing", "Thing", and "thinG" all
1278 /// designate different atoms.
1279 
1280 Atom_t TVirtualX::InternAtom(const char * /*atom_name*/,
1281  Bool_t /*only_if_exist*/)
1282 {
1283  return 0;
1284 }
1285 
1286 ////////////////////////////////////////////////////////////////////////////////
1287 /// Returns the parent of the window "id".
1288 
1289 Window_t TVirtualX::GetParent(Window_t /*id*/) const
1290 {
1291  return 0;
1292 }
1293 
1294 ////////////////////////////////////////////////////////////////////////////////
1295 /// Provides the most common way for accessing a font: opens (loads) the
1296 /// specified font and returns a pointer to the appropriate FontStruct_t
1297 /// structure. If the font does not exist, it returns NULL.
1298 
1299 FontStruct_t TVirtualX::LoadQueryFont(const char * /*font_name*/)
1300 {
1301  return 0;
1302 }
1303 
1304 ////////////////////////////////////////////////////////////////////////////////
1305 /// Returns the font handle of the specified font structure "fs".
1306 
1307 FontH_t TVirtualX::GetFontHandle(FontStruct_t /*fs*/)
1308 {
1309  return 0;
1310 }
1311 
1312 ////////////////////////////////////////////////////////////////////////////////
1313 /// Explicitly deletes the font structure "fs" obtained via LoadQueryFont().
1314 
1315 void TVirtualX::DeleteFont(FontStruct_t /*fs*/)
1316 {
1317 }
1318 
1319 ////////////////////////////////////////////////////////////////////////////////
1320 /// Creates a graphics context using the provided GCValues_t *gval structure.
1321 /// The mask data member of gval specifies which components in the GC are
1322 /// to be set using the information in the specified values structure.
1323 /// It returns a graphics context handle GContext_t that can be used with any
1324 /// destination drawable or O if the creation falls.
1325 
1326 GContext_t TVirtualX::CreateGC(Drawable_t /*id*/, GCValues_t * /*gval*/)
1327 {
1328  return 0;
1329 }
1330 
1331 ////////////////////////////////////////////////////////////////////////////////
1332 /// Changes the components specified by the mask in gval for the specified GC.
1333 ///
1334 /// \param [in] gc specifies the GC to be changed
1335 /// \param [in] gval specifies the mask and the values to be set
1336 ///
1337 /// (see also the GCValues_t structure)
1338 
1339 void TVirtualX::ChangeGC(GContext_t /*gc*/, GCValues_t * /*gval*/)
1340 {
1341 }
1342 
1343 ////////////////////////////////////////////////////////////////////////////////
1344 /// Copies the specified components from the source GC "org" to the
1345 /// destination GC "dest". The "mask" defines which component to copy
1346 /// and it is a data member of GCValues_t.
1347 
1348 void TVirtualX::CopyGC(GContext_t /*org*/, GContext_t /*dest*/, Mask_t /*mask*/)
1349 {
1350 }
1351 
1352 ////////////////////////////////////////////////////////////////////////////////
1353 /// Deletes the specified GC "gc".
1354 
1355 void TVirtualX::DeleteGC(GContext_t /*gc*/)
1356 {
1357 }
1358 
1359 ////////////////////////////////////////////////////////////////////////////////
1360 /// Creates the specified cursor. (just return cursor from cursor pool).
1361 /// The cursor can be:
1362 /// ~~~ {.cpp}
1363 /// kBottomLeft, kBottomRight, kTopLeft, kTopRight,
1364 /// kBottomSide, kLeftSide, kTopSide, kRightSide,
1365 /// kMove, kCross, kArrowHor, kArrowVer,
1366 /// kHand, kRotate, kPointer, kArrowRight,
1367 /// kCaret, kWatch
1368 /// ~~~
1369 
1370 Cursor_t TVirtualX::CreateCursor(ECursor /*cursor*/)
1371 {
1372  return 0;
1373 }
1374 
1375 ////////////////////////////////////////////////////////////////////////////////
1376 /// Sets the cursor "curid" to be used when the pointer is in the
1377 /// window "id".
1378 
1379 void TVirtualX::SetCursor(Window_t /*id*/, Cursor_t /*curid*/)
1380 {
1381 }
1382 
1383 ////////////////////////////////////////////////////////////////////////////////
1384 /// Creates a pixmap of the specified width and height and returns
1385 /// a pixmap ID that identifies it.
1386 
1387 Pixmap_t TVirtualX::CreatePixmap(Drawable_t /*id*/, UInt_t /*w*/, UInt_t /*h*/)
1388 {
1389  return kNone;
1390 }
1391 ////////////////////////////////////////////////////////////////////////////////
1392 /// Creates a pixmap from bitmap data of the width, height, and depth you
1393 /// specified and returns a pixmap that identifies it. The width and height
1394 /// arguments must be nonzero. The depth argument must be one of the depths
1395 /// supported by the screen of the specified drawable.
1396 ///
1397 /// \param [in] id specifies which screen the pixmap is created on
1398 /// \param [in] bitmap the data in bitmap format
1399 /// \param [in] width, height define the dimensions of the pixmap
1400 /// \param [in] forecolor the foreground pixel values to use
1401 /// \param [in] backcolor the background pixel values to use
1402 /// \param [in] depth the depth of the pixmap
1403 
1404 Pixmap_t TVirtualX::CreatePixmap(Drawable_t /*id*/, const char * /*bitmap*/,
1405  UInt_t /*width*/, UInt_t /*height*/,
1406  ULong_t /*forecolor*/, ULong_t /*backcolor*/,
1407  Int_t /*depth*/)
1408 {
1409  return 0;
1410 }
1411 
1412 ////////////////////////////////////////////////////////////////////////////////
1413 /// Creates a bitmap (i.e. pixmap with depth 1) from the bitmap data.
1414 ///
1415 /// \param [in] id specifies which screen the pixmap is created on
1416 /// \param [in] bitmap the data in bitmap format
1417 /// \param [in] width, height define the dimensions of the pixmap
1418 
1419 Pixmap_t TVirtualX::CreateBitmap(Drawable_t /*id*/, const char * /*bitmap*/,
1420  UInt_t /*width*/, UInt_t /*height*/)
1421 {
1422  return 0;
1423 }
1424 
1425 ////////////////////////////////////////////////////////////////////////////////
1426 /// Explicitly deletes the pixmap resource "pmap".
1427 
1428 void TVirtualX::DeletePixmap(Pixmap_t /*pmap*/)
1429 {
1430 }
1431 
1432 ////////////////////////////////////////////////////////////////////////////////
1433 /// Creates a picture pict from data in file "filename". The picture
1434 /// attributes "attr" are used for input and output. Returns kTRUE in
1435 /// case of success, kFALSE otherwise. If the mask "pict_mask" does not
1436 /// exist it is set to kNone.
1437 
1438 Bool_t TVirtualX::CreatePictureFromFile(Drawable_t /*id*/,
1439  const char * /*filename*/,
1440  Pixmap_t &/*pict*/,
1441  Pixmap_t &/*pict_mask*/,
1442  PictureAttributes_t &/*attr*/)
1443 {
1444  return kFALSE;
1445 }
1446 
1447 ////////////////////////////////////////////////////////////////////////////////
1448 /// Creates a picture pict from data in bitmap format. The picture
1449 /// attributes "attr" are used for input and output. Returns kTRUE in
1450 /// case of success, kFALSE otherwise. If the mask "pict_mask" does not
1451 /// exist it is set to kNone.
1452 
1453 Bool_t TVirtualX::CreatePictureFromData(Drawable_t /*id*/, char ** /*data*/,
1454  Pixmap_t &/*pict*/,
1455  Pixmap_t &/*pict_mask*/,
1456  PictureAttributes_t & /*attr*/)
1457 {
1458  return kFALSE;
1459 }
1460 ////////////////////////////////////////////////////////////////////////////////
1461 /// Reads picture data from file "filename" and store it in "ret_data".
1462 /// Returns kTRUE in case of success, kFALSE otherwise.
1463 
1464 Bool_t TVirtualX::ReadPictureDataFromFile(const char * /*filename*/,
1465  char *** /*ret_data*/)
1466 {
1467  return kFALSE;
1468 }
1469 
1470 ////////////////////////////////////////////////////////////////////////////////
1471 /// Delete picture data created by the function ReadPictureDataFromFile.
1472 
1473 void TVirtualX::DeletePictureData(void * /*data*/)
1474 {
1475 }
1476 
1477 ////////////////////////////////////////////////////////////////////////////////
1478 /// Sets the dash-offset and dash-list attributes for dashed line styles
1479 /// in the specified GC. There must be at least one element in the
1480 /// specified dash_list. The initial and alternating elements (second,
1481 /// fourth, and so on) of the dash_list are the even dashes, and the
1482 /// others are the odd dashes. Each element in the "dash_list" array
1483 /// specifies the length (in pixels) of a segment of the pattern.
1484 ///
1485 /// \param [in] gc specifies the GC (see GCValues_t structure)
1486 /// \param [in] offset the phase of the pattern for the dashed line-style you
1487 /// want to set for the specified GC.
1488 /// \param [in] dash_list the dash-list for the dashed line-style you want to set
1489 /// for the specified GC
1490 /// \param [in] n the number of elements in dash_list
1491 /// (see also the GCValues_t structure)
1492 
1493 void TVirtualX::SetDashes(GContext_t /*gc*/, Int_t /*offset*/,
1494  const char * /*dash_list*/, Int_t /*n*/)
1495 {
1496 }
1497 
1498 ////////////////////////////////////////////////////////////////////////////////
1499 /// Frees color cell with specified pixel value.
1500 
1501 void TVirtualX::FreeColor(Colormap_t /*cmap*/, ULong_t /*pixel*/)
1502 {
1503 }
1504 
1505 ////////////////////////////////////////////////////////////////////////////////
1506 /// Returns the number of events that have been received from the X server
1507 /// but have not been removed from the event queue.
1508 
1509 Int_t TVirtualX::EventsPending()
1510 {
1511  return 0;
1512 }
1513 
1514 ////////////////////////////////////////////////////////////////////////////////
1515 /// Sets the sound bell. Percent is loudness from -100% to 100%.
1516 
1517 void TVirtualX::Bell(Int_t /*percent*/)
1518 {
1519 }
1520 
1521 ////////////////////////////////////////////////////////////////////////////////
1522 /// Combines the specified rectangle of "src" with the specified rectangle
1523 /// of "dest" according to the "gc".
1524 ///
1525 /// \param [in] src source rectangle
1526 /// \param [in] dest destination rectangle
1527 /// \param [in] gc graphics context
1528 /// \param [in] src_x, src_y specify the x and y coordinates, which are relative
1529 /// to the origin of the source rectangle and specify
1530 /// upper-left corner.
1531 /// \param [in] width, height the width and height, which are the dimensions of both
1532 /// the source and destination rectangles
1533 /// \param [in] dest_x, dest_y specify the upper-left corner of the destination
1534 /// rectangle
1535 ///
1536 /// GC components in use: function, plane-mask, subwindow-mode,
1537 /// graphics-exposure, clip-x-origin, clip-y-origin, and clip-mask.
1538 /// (see also the GCValues_t structure)
1539 
1540 void TVirtualX::CopyArea(Drawable_t /*src*/, Drawable_t /*dest*/,
1541  GContext_t /*gc*/, Int_t /*src_x*/, Int_t /*src_y*/,
1542  UInt_t /*width*/, UInt_t /*height*/,
1543  Int_t /*dest_x*/, Int_t /*dest_y*/)
1544 {
1545 }
1546 
1547 ////////////////////////////////////////////////////////////////////////////////
1548 /// Changes the attributes of the specified window "id" according the
1549 /// values provided in "attr". The mask data member of "attr" specifies
1550 /// which window attributes are defined in the attributes argument.
1551 /// This mask is the bitwise inclusive OR of the valid attribute mask
1552 /// bits; if it is zero, the attributes are ignored.
1553 
1554 void TVirtualX::ChangeWindowAttributes(Window_t /*id*/,
1555  SetWindowAttributes_t * /*attr*/)
1556 {
1557 }
1558 
1559 ////////////////////////////////////////////////////////////////////////////////
1560 /// Alters the property for the specified window and causes the X server
1561 /// to generate a PropertyNotify event on that window.
1562 ///
1563 /// \param [in] id the window whose property you want to change
1564 /// \param [in] property specifies the property name
1565 /// \param [in] type the type of the property; the X server does not
1566 /// interpret the type but simply passes it back to
1567 /// an application that might ask about the window
1568 /// properties
1569 /// \param [in] data the property data
1570 /// \param [in] len the length of the specified data format
1571 
1572 void TVirtualX::ChangeProperty(Window_t /*id*/, Atom_t /*property*/,
1573  Atom_t /*type*/, UChar_t * /*data*/,
1574  Int_t /*len*/)
1575 {
1576 }
1577 
1578 ////////////////////////////////////////////////////////////////////////////////
1579 /// Uses the components of the specified GC to draw a line between the
1580 /// specified set of points (x1, y1) and (x2, y2).
1581 ///
1582 /// GC components in use: function, plane-mask, line-width, line-style,
1583 /// cap-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin,
1584 /// and clip-mask.
1585 ///
1586 /// GC mode-dependent components: foreground, background, tile, stipple,
1587 /// tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dash-list.
1588 /// (see also the GCValues_t structure)
1589 
1590 void TVirtualX::DrawLine(Drawable_t /*id*/, GContext_t /*gc*/,
1591  Int_t /*x1*/, Int_t /*y1*/, Int_t /*x2*/, Int_t /*y2*/)
1592 {
1593 }
1594 
1595 ////////////////////////////////////////////////////////////////////////////////
1596 /// Paints a rectangular area in the specified window "id" according to
1597 /// the specified dimensions with the window's background pixel or pixmap.
1598 ///
1599 /// \param [in] id specifies the window
1600 /// \param [in] x, y coordinates, which are relative to the origin
1601 /// \param [in] w, h the width and height which define the rectangle dimensions
1602 
1603 void TVirtualX::ClearArea(Window_t /*id*/, Int_t /*x*/, Int_t /*y*/,
1604  UInt_t /*w*/, UInt_t /*h*/)
1605 {
1606 }
1607 
1608 ////////////////////////////////////////////////////////////////////////////////
1609 /// Check if there is for window "id" an event of type "type". If there
1610 /// is it fills in the event structure and return true. If no such event
1611 /// return false.
1612 
1613 Bool_t TVirtualX::CheckEvent(Window_t /*id*/, EGEventType /*type*/,
1614  Event_t &/*ev*/)
1615 {
1616  return kFALSE;
1617 }
1618 
1619 ////////////////////////////////////////////////////////////////////////////////
1620 /// Specifies the event "ev" is to be sent to the window "id".
1621 /// This function requires you to pass an event mask.
1622 
1623 void TVirtualX::SendEvent(Window_t /*id*/, Event_t * /*ev*/)
1624 {
1625 }
1626 
1627 ////////////////////////////////////////////////////////////////////////////////
1628 /// Force processing of event, sent by SendEvent before.
1629 
1630 void TVirtualX::DispatchClientMessage(UInt_t /*messageID*/)
1631 {
1632 }
1633 
1634 ////////////////////////////////////////////////////////////////////////////////
1635 /// Tells WM to send message when window is closed via WM.
1636 
1637 void TVirtualX::WMDeleteNotify(Window_t /*id*/)
1638 {
1639 }
1640 
1641 ////////////////////////////////////////////////////////////////////////////////
1642 /// Turns key auto repeat on (kTRUE) or off (kFALSE).
1643 
1644 void TVirtualX::SetKeyAutoRepeat(Bool_t /*on = kTRUE*/)
1645 {
1646 }
1647 
1648 ////////////////////////////////////////////////////////////////////////////////
1649 /// Establishes a passive grab on the keyboard. In the future, the
1650 /// keyboard is actively grabbed, the last-keyboard-grab time is set
1651 /// to the time at which the key was pressed (as transmitted in the
1652 /// KeyPress event), and the KeyPress event is reported if all of the
1653 /// following conditions are true:
1654 ///
1655 /// - the keyboard is not grabbed and the specified key (which can
1656 /// itself be a modifier key) is logically pressed when the
1657 /// specified modifier keys are logically down, and no other
1658 /// modifier keys are logically down;
1659 /// - either the grab window "id" is an ancestor of (or is) the focus
1660 /// window, or "id" is a descendant of the focus window and contains
1661 /// the pointer;
1662 /// - a passive grab on the same key combination does not exist on any
1663 /// ancestor of grab_window
1664 ///
1665 /// \param [in] id window id
1666 /// \param [in] keycode specifies the KeyCode or AnyKey
1667 /// \param [in] modifier specifies the set of keymasks or AnyModifier; the mask is
1668 /// the bitwise inclusive OR of the valid keymask bits
1669 /// \param [in] grab a switch between grab/ungrab key
1670 /// grab = kTRUE grab the key and modifier
1671 /// grab = kFALSE ungrab the key and modifier
1672 
1673 void TVirtualX::GrabKey(Window_t /*id*/, Int_t /*keycode*/, UInt_t /*modifier*/,
1674  Bool_t /*grab = kTRUE*/)
1675 {
1676 }
1677 
1678 ////////////////////////////////////////////////////////////////////////////////
1679 /// Establishes a passive grab on a certain mouse button. That is, when a
1680 /// certain mouse button is hit while certain modifier's (Shift, Control,
1681 /// Meta, Alt) are active then the mouse will be grabbed for window id.
1682 /// When grab is false, ungrab the mouse button for this button and modifier.
1683 
1684 void TVirtualX::GrabButton(Window_t /*id*/, EMouseButton /*button*/,
1685  UInt_t /*modifier*/, UInt_t /*evmask*/,
1686  Window_t /*confine*/, Cursor_t /*cursor*/,
1687  Bool_t /*grab = kTRUE*/)
1688 {
1689 }
1690 
1691 ////////////////////////////////////////////////////////////////////////////////
1692 /// Establishes an active pointer grab. While an active pointer grab is in
1693 /// effect, further pointer events are only reported to the grabbing
1694 /// client window.
1695 
1696 void TVirtualX::GrabPointer(Window_t /*id*/, UInt_t /*evmask*/,
1697  Window_t /*confine*/, Cursor_t /*cursor*/,
1698  Bool_t /*grab = kTRUE*/,
1699  Bool_t /*owner_events = kTRUE*/)
1700 {
1701 }
1702 
1703 ////////////////////////////////////////////////////////////////////////////////
1704 /// Sets the window name.
1705 
1706 void TVirtualX::SetWindowName(Window_t /*id*/, char * /*name*/)
1707 {
1708 }
1709 
1710 ////////////////////////////////////////////////////////////////////////////////
1711 /// Sets the window icon name.
1712 
1713 void TVirtualX::SetIconName(Window_t /*id*/, char * /*name*/)
1714 {
1715 }
1716 
1717 ////////////////////////////////////////////////////////////////////////////////
1718 /// Sets the icon name pixmap.
1719 
1720 void TVirtualX::SetIconPixmap(Window_t /*id*/, Pixmap_t /*pix*/)
1721 {
1722 }
1723 
1724 ////////////////////////////////////////////////////////////////////////////////
1725 /// Sets the windows class and resource name.
1726 
1727 void TVirtualX::SetClassHints(Window_t /*id*/, char * /*className*/,
1728  char * /*resourceName*/)
1729 {
1730 }
1731 
1732 ////////////////////////////////////////////////////////////////////////////////
1733 /// Sets decoration style.
1734 
1735 void TVirtualX::SetMWMHints(Window_t /*id*/, UInt_t /*value*/, UInt_t /*funcs*/,
1736  UInt_t /*input*/)
1737 {
1738 }
1739 
1740 ////////////////////////////////////////////////////////////////////////////////
1741 /// Tells the window manager the desired position [x,y] of window "id".
1742 
1743 void TVirtualX::SetWMPosition(Window_t /*id*/, Int_t /*x*/, Int_t /*y*/)
1744 {
1745 }
1746 
1747 ////////////////////////////////////////////////////////////////////////////////
1748 /// Tells window manager the desired size of window "id".
1749 ///
1750 /// \param [in] id window identifier
1751 /// \param [in] w the width
1752 /// \param [in] h the height
1753 
1754 void TVirtualX::SetWMSize(Window_t /*id*/, UInt_t /*w*/, UInt_t /*h*/)
1755 {
1756 }
1757 
1758 ////////////////////////////////////////////////////////////////////////////////
1759 /// Gives the window manager minimum and maximum size hints of the window
1760 /// "id". Also specify via "winc" and "hinc" the resize increments.
1761 ///
1762 /// \param [in] id window identifier
1763 /// \param [in] wmin, hmin specify the minimum window size
1764 /// \param [in] wmax, hmax specify the maximum window size
1765 /// \param [in] winc, hinc define an arithmetic progression of sizes into which
1766 /// the window to be resized (minimum to maximum)
1767 
1768 void TVirtualX::SetWMSizeHints(Window_t /*id*/, UInt_t /*wmin*/, UInt_t /*hmin*/,
1769  UInt_t /*wmax*/, UInt_t /*hmax*/,
1770  UInt_t /*winc*/, UInt_t /*hinc*/)
1771 {
1772 }
1773 
1774 ////////////////////////////////////////////////////////////////////////////////
1775 /// Sets the initial state of the window "id": either kNormalState
1776 /// or kIconicState.
1777 
1778 void TVirtualX::SetWMState(Window_t /*id*/, EInitialState /*state*/)
1779 {
1780 }
1781 
1782 ////////////////////////////////////////////////////////////////////////////////
1783 /// Tells window manager that the window "id" is a transient window
1784 /// of the window "main_id". A window manager may decide not to decorate
1785 /// a transient window or may treat it differently in other ways.
1786 
1787 void TVirtualX::SetWMTransientHint(Window_t /*id*/, Window_t /*main_id*/)
1788 {
1789 }
1790 
1791 ////////////////////////////////////////////////////////////////////////////////
1792 /// Each character image, as defined by the font in the GC, is treated as an
1793 /// additional mask for a fill operation on the drawable.
1794 ///
1795 /// \param [in] id the drawable
1796 /// \param [in] gc the GC
1797 /// \param [in] x, y coordinates, which are relative to the origin of the specified
1798 /// drawable and define the origin of the first character
1799 /// \param [in] s the character string
1800 /// \param [in] len the number of characters in the string argument
1801 ///
1802 /// GC components in use: function, plane-mask, fill-style, font,
1803 /// subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
1804 /// GC mode-dependent components: foreground, background, tile, stipple,
1805 /// tile-stipple-x-origin, and tile-stipple-y-origin.
1806 /// (see also the GCValues_t structure)
1807 
1808 void TVirtualX::DrawString(Drawable_t /*id*/, GContext_t /*gc*/, Int_t /*x*/,
1809  Int_t /*y*/, const char * /*s*/, Int_t /*len*/)
1810 {
1811 }
1812 
1813 ////////////////////////////////////////////////////////////////////////////////
1814 /// Return length of the string "s" in pixels. Size depends on font.
1815 
1816 Int_t TVirtualX::TextWidth(FontStruct_t /*font*/, const char * /*s*/,
1817  Int_t /*len*/)
1818 {
1819  return 5;
1820 }
1821 
1822 ////////////////////////////////////////////////////////////////////////////////
1823 /// Returns the font properties.
1824 
1825 void TVirtualX::GetFontProperties(FontStruct_t /*font*/, Int_t &max_ascent,
1826  Int_t &max_descent)
1827 {
1828  max_ascent = 5;
1829  max_descent = 5;
1830 }
1831 
1832 ////////////////////////////////////////////////////////////////////////////////
1833 /// Returns the components specified by the mask in "gval" for the
1834 /// specified GC "gc" (see also the GCValues_t structure)
1835 
1836 void TVirtualX::GetGCValues(GContext_t /*gc*/, GCValues_t &gval)
1837 {
1838  gval.fMask = 0;
1839 }
1840 
1841 ////////////////////////////////////////////////////////////////////////////////
1842 /// Return the font associated with the graphics context gc
1843 
1844 FontStruct_t TVirtualX::GetGCFont(GContext_t /*gc*/)
1845 {
1846  return 0;
1847 }
1848 
1849 ////////////////////////////////////////////////////////////////////////////////
1850 /// Retrieves the associated font structure of the font specified font
1851 /// handle "fh".
1852 ///
1853 /// Free returned FontStruct_t using FreeFontStruct().
1854 
1855 FontStruct_t TVirtualX::GetFontStruct(FontH_t /*fh*/)
1856 {
1857  return 0;
1858 }
1859 
1860 ////////////////////////////////////////////////////////////////////////////////
1861 /// Frees the font structure "fs". The font itself will be freed when
1862 /// no other resource references it.
1863 
1864 void TVirtualX::FreeFontStruct(FontStruct_t /*fs*/)
1865 {
1866 }
1867 
1868 ////////////////////////////////////////////////////////////////////////////////
1869 /// Clears the entire area in the specified window and it is equivalent to
1870 /// ClearArea(id, 0, 0, 0, 0)
1871 
1872 void TVirtualX::ClearWindow(Window_t /*id*/)
1873 {
1874 }
1875 
1876 ////////////////////////////////////////////////////////////////////////////////
1877 /// Converts the "keysym" to the appropriate keycode. For example,
1878 /// keysym is a letter and keycode is the matching keyboard key (which
1879 /// is dependent on the current keyboard mapping). If the specified
1880 /// "keysym" is not defined for any keycode, returns zero.
1881 
1882 Int_t TVirtualX::KeysymToKeycode(UInt_t /*keysym*/)
1883 {
1884  return 0;
1885 }
1886 
1887 ////////////////////////////////////////////////////////////////////////////////
1888 /// Fills the specified rectangle defined by [x,y] [x+w,y] [x+w,y+h] [x,y+h].
1889 /// using the GC you specify.
1890 ///
1891 /// GC components in use are: function, plane-mask, fill-style,
1892 /// subwindow-mode, clip-x-origin, clip-y-origin, clip-mask.
1893 /// GC mode-dependent components: foreground, background, tile, stipple,
1894 /// tile-stipple-x-origin, and tile-stipple-y-origin.
1895 /// (see also the GCValues_t structure)
1896 
1897 void TVirtualX::FillRectangle(Drawable_t /*id*/, GContext_t /*gc*/,
1898  Int_t /*x*/, Int_t /*y*/,
1899  UInt_t /*w*/, UInt_t /*h*/)
1900 {
1901 }
1902 
1903 ////////////////////////////////////////////////////////////////////////////////
1904 /// Draws rectangle outlines of [x,y] [x+w,y] [x+w,y+h] [x,y+h]
1905 ///
1906 /// GC components in use: function, plane-mask, line-width, line-style,
1907 /// cap-style, join-style, fill-style, subwindow-mode, clip-x-origin,
1908 /// clip-y-origin, clip-mask.
1909 /// GC mode-dependent components: foreground, background, tile, stipple,
1910 /// tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, dash-list.
1911 /// (see also the GCValues_t structure)
1912 
1913 void TVirtualX::DrawRectangle(Drawable_t /*id*/, GContext_t /*gc*/,
1914  Int_t /*x*/, Int_t /*y*/,
1915  UInt_t /*w*/, UInt_t /*h*/)
1916 {
1917 }
1918 
1919 ////////////////////////////////////////////////////////////////////////////////
1920 /// Draws multiple line segments. Each line is specified by a pair of points.
1921 ///
1922 /// \param [in] id Drawable identifier
1923 /// \param [in] gc graphics context
1924 /// \param [in] *seg specifies an array of segments
1925 /// \param [in] nseg specifies the number of segments in the array
1926 ///
1927 /// GC components in use: function, plane-mask, line-width, line-style,
1928 /// cap-style, join-style, fill-style, subwindow-mode, clip-x-origin,
1929 /// clip-y-origin, clip-mask.
1930 ///
1931 /// GC mode-dependent components: foreground, background, tile, stipple,
1932 /// tile-stipple-x-origin, tile-stipple-y-origin, dash-offset, and dash-list.
1933 /// (see also the GCValues_t structure)
1934 
1935 void TVirtualX::DrawSegments(Drawable_t /*id*/, GContext_t /*gc*/,
1936  Segment_t * /*seg*/, Int_t /*nseg*/)
1937 {
1938 }
1939 
1940 ////////////////////////////////////////////////////////////////////////////////
1941 /// Defines which input events the window is interested in. By default
1942 /// events are propagated up the window stack. This mask can also be
1943 /// set at window creation time via the SetWindowAttributes_t::fEventMask
1944 /// attribute.
1945 
1946 void TVirtualX::SelectInput(Window_t /*id*/, UInt_t /*evmask*/)
1947 {
1948 }
1949 
1950 ////////////////////////////////////////////////////////////////////////////////
1951 /// Returns the window id of the window having the input focus.
1952 
1953 Window_t TVirtualX::GetInputFocus()
1954 {
1955  return kNone;
1956 }
1957 
1958 ////////////////////////////////////////////////////////////////////////////////
1959 /// Changes the input focus to specified window "id".
1960 
1961 void TVirtualX::SetInputFocus(Window_t /*id*/)
1962 {
1963 }
1964 
1965 ////////////////////////////////////////////////////////////////////////////////
1966 /// Returns the window id of the current owner of the primary selection.
1967 /// That is the window in which, for example some text is selected.
1968 
1969 Window_t TVirtualX::GetPrimarySelectionOwner()
1970 {
1971  return kNone;
1972 }
1973 
1974 ////////////////////////////////////////////////////////////////////////////////
1975 /// Makes the window "id" the current owner of the primary selection.
1976 /// That is the window in which, for example some text is selected.
1977 
1978 void TVirtualX::SetPrimarySelectionOwner(Window_t /*id*/)
1979 {
1980 }
1981 
1982 ////////////////////////////////////////////////////////////////////////////////
1983 /// Causes a SelectionRequest event to be sent to the current primary
1984 /// selection owner. This event specifies the selection property
1985 /// (primary selection), the format into which to convert that data before
1986 /// storing it (target = XA_STRING), the property in which the owner will
1987 /// place the information (sel_property), the window that wants the
1988 /// information (id), and the time of the conversion request (when).
1989 /// The selection owner responds by sending a SelectionNotify event, which
1990 /// confirms the selected atom and type.
1991 
1992 void TVirtualX::ConvertPrimarySelection(Window_t /*id*/, Atom_t /*clipboard*/,
1993  Time_t /*when*/)
1994 {
1995 }
1996 
1997 ////////////////////////////////////////////////////////////////////////////////
1998 /// Converts the keycode from the event structure to a key symbol (according
1999 /// to the modifiers specified in the event structure and the current
2000 /// keyboard mapping). In "buf" a null terminated ASCII string is returned
2001 /// representing the string that is currently mapped to the key code.
2002 ///
2003 /// \param [in] event specifies the event structure to be used
2004 /// \param [in] buf returns the translated characters
2005 /// \param [in] buflen the length of the buffer
2006 /// \param [in] keysym returns the "keysym" computed from the event
2007 /// if this argument is not NULL
2008 
2009 void TVirtualX::LookupString(Event_t * /*event*/, char * /*buf*/,
2010  Int_t /*buflen*/, UInt_t &keysym)
2011 {
2012  keysym = 0;
2013 }
2014 
2015 ////////////////////////////////////////////////////////////////////////////////
2016 /// Translates coordinates in one window to the coordinate space of another
2017 /// window. It takes the "src_x" and "src_y" coordinates relative to the
2018 /// source window's origin and returns these coordinates to "dest_x" and
2019 /// "dest_y" relative to the destination window's origin.
2020 ///
2021 /// \param [in] src the source window
2022 /// \param [in] dest the destination window
2023 /// \param [in] src_x, src_y coordinates within the source window
2024 /// \param [in] dest_x, dest_y coordinates within the destination window
2025 /// \param [in] child returns the child of "dest" if the coordinates
2026 /// are contained in a mapped child of the destination
2027 /// window; otherwise, child is set to 0
2028 
2029 void TVirtualX::TranslateCoordinates(Window_t /*src*/, Window_t /*dest*/,
2030  Int_t /*src_x*/, Int_t /*src_y*/,
2031  Int_t &dest_x, Int_t &dest_y,
2032  Window_t &child)
2033 {
2034  dest_x = dest_y = 0;
2035  child = 0;
2036 }
2037 
2038 ////////////////////////////////////////////////////////////////////////////////
2039 /// Returns the location and the size of window "id"
2040 ///
2041 /// \param [in] id drawable identifier
2042 /// \param [in] x, y coordinates of the upper-left outer corner relative to the
2043 /// parent window's origin
2044 /// \param [in] w, h the inside size of the window, not including the border
2045 
2046 void TVirtualX::GetWindowSize(Drawable_t /*id*/, Int_t &x, Int_t &y,
2047  UInt_t &w, UInt_t &h)
2048 {
2049  x = y = 0;
2050  w = h = 1;
2051 }
2052 
2053 ////////////////////////////////////////////////////////////////////////////////
2054 /// Fills the region closed by the specified path. The path is closed
2055 /// automatically if the last point in the list does not coincide with the
2056 /// first point.
2057 ///
2058 /// \param [in] id window identifier
2059 /// \param [in] gc graphics context
2060 /// \param [in] *points specifies an array of points
2061 /// \param [in] npnt specifies the number of points in the array
2062 ///
2063 /// GC components in use: function, plane-mask, fill-style, fill-rule,
2064 /// subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. GC
2065 /// mode-dependent components: foreground, background, tile, stipple,
2066 /// tile-stipple-x-origin, and tile-stipple-y-origin.
2067 /// (see also the GCValues_t structure)
2068 
2069 void TVirtualX::FillPolygon(Window_t /*id*/, GContext_t /*gc*/, Point_t *
2070  /*points*/, Int_t /*npnt*/) {
2071 }
2072 
2073 ////////////////////////////////////////////////////////////////////////////////
2074 /// Returns the root window the pointer is logically on and the pointer
2075 /// coordinates relative to the root window's origin.
2076 ///
2077 /// \param [in] id specifies the window
2078 /// \param [in] rootw the root window that the pointer is in
2079 /// \param [in] childw the child window that the pointer is located in, if any
2080 /// \param [in] root_x, root_y the pointer coordinates relative to the root window's
2081 /// origin
2082 /// \param [in] win_x, win_y the pointer coordinates relative to the specified
2083 /// window "id"
2084 /// \param [in] mask the current state of the modifier keys and pointer
2085 /// buttons
2086 
2087 void TVirtualX::QueryPointer(Window_t /*id*/, Window_t &rootw, Window_t &childw,
2088  Int_t &root_x, Int_t &root_y, Int_t &win_x,
2089  Int_t &win_y, UInt_t &mask)
2090 {
2091  rootw = childw = kNone;
2092  root_x = root_y = win_x = win_y = 0;
2093  mask = 0;
2094 }
2095 
2096 ////////////////////////////////////////////////////////////////////////////////
2097 /// Sets the foreground color for the specified GC (shortcut for ChangeGC
2098 /// with only foreground mask set).
2099 ///
2100 /// \param [in] gc specifies the GC
2101 /// \param [in] foreground the foreground you want to set
2102 ///
2103 /// (see also the GCValues_t structure)
2104 
2105 void TVirtualX::SetForeground(GContext_t /*gc*/, ULong_t /*foreground*/)
2106 {
2107 }
2108 
2109 ////////////////////////////////////////////////////////////////////////////////
2110 /// Sets clipping rectangles in graphics context. [x,y] specify the origin
2111 /// of the rectangles. "recs" specifies an array of rectangles that define
2112 /// the clipping mask and "n" is the number of rectangles.
2113 /// (see also the GCValues_t structure)
2114 
2115 void TVirtualX::SetClipRectangles(GContext_t /*gc*/, Int_t /*x*/, Int_t /*y*/,
2116  Rectangle_t * /*recs*/, Int_t /*n*/)
2117 {
2118 }
2119 
2120 ////////////////////////////////////////////////////////////////////////////////
2121 /// Flushes (mode = 0, default) or synchronizes (mode = 1) X output buffer.
2122 /// Flush flushes output buffer. Sync flushes buffer and waits till all
2123 /// requests have been processed by X server.
2124 
2125 void TVirtualX::Update(Int_t /*mode = 0*/)
2126 {
2127 }
2128 
2129 ////////////////////////////////////////////////////////////////////////////////
2130 /// Creates a new empty region.
2131 
2132 Region_t TVirtualX::CreateRegion()
2133 {
2134  return 0;
2135 }
2136 
2137 ////////////////////////////////////////////////////////////////////////////////
2138 /// Destroys the region "reg".
2139 
2140 void TVirtualX::DestroyRegion(Region_t /*reg*/)
2141 {
2142 }
2143 
2144 ////////////////////////////////////////////////////////////////////////////////
2145 /// Updates the destination region from a union of the specified rectangle
2146 /// and the specified source region.
2147 ///
2148 /// \param [in] rect specifies the rectangle
2149 /// \param [in] src specifies the source region to be used
2150 /// \param [in] dest returns the destination region
2151 
2152 void TVirtualX::UnionRectWithRegion(Rectangle_t * /*rect*/, Region_t /*src*/,
2153  Region_t /*dest*/)
2154 {
2155 }
2156 
2157 ////////////////////////////////////////////////////////////////////////////////
2158 /// Returns a region for the polygon defined by the points array.
2159 ///
2160 /// \param [in] points specifies an array of points
2161 /// \param [in] np specifies the number of points in the polygon
2162 /// \param [in] winding specifies the winding-rule is set (kTRUE) or not(kFALSE)
2163 
2164 Region_t TVirtualX::PolygonRegion(Point_t * /*points*/, Int_t /*np*/,
2165  Bool_t /*winding*/)
2166 {
2167  return 0;
2168 }
2169 
2170 ////////////////////////////////////////////////////////////////////////////////
2171 /// Computes the union of two regions.
2172 ///
2173 /// \param [in] rega, regb specify the two regions with which you want to perform
2174 /// the computation
2175 /// \param [in] result returns the result of the computation
2176 
2177 void TVirtualX::UnionRegion(Region_t /*rega*/, Region_t /*regb*/,
2178  Region_t /*result*/)
2179 {
2180 }
2181 
2182 ////////////////////////////////////////////////////////////////////////////////
2183 /// Computes the intersection of two regions.
2184 ///
2185 /// \param [in] rega, regb specify the two regions with which you want to perform
2186 /// the computation
2187 /// \param [in] result returns the result of the computation
2188 
2189 void TVirtualX::IntersectRegion(Region_t /*rega*/, Region_t /*regb*/,
2190  Region_t /*result*/)
2191 {
2192 }
2193 
2194 ////////////////////////////////////////////////////////////////////////////////
2195 /// Subtracts regb from rega and stores the results in result.
2196 
2197 void TVirtualX::SubtractRegion(Region_t /*rega*/, Region_t /*regb*/,
2198  Region_t /*result*/)
2199 {
2200 }
2201 
2202 ////////////////////////////////////////////////////////////////////////////////
2203 /// Calculates the difference between the union and intersection of
2204 /// two regions.
2205 ///
2206 /// \param [in] rega, regb specify the two regions with which you want to perform
2207 /// the computation
2208 /// \param [in] result returns the result of the computation
2209 
2210 void TVirtualX::XorRegion(Region_t /*rega*/, Region_t /*regb*/,
2211  Region_t /*result*/)
2212 {
2213 }
2214 
2215 ////////////////////////////////////////////////////////////////////////////////
2216 /// Returns kTRUE if the region reg is empty.
2217 
2218 Bool_t TVirtualX::EmptyRegion(Region_t /*reg*/)
2219 {
2220  return kFALSE;
2221 }
2222 
2223 ////////////////////////////////////////////////////////////////////////////////
2224 /// Returns kTRUE if the point [x, y] is contained in the region reg.
2225 
2226 Bool_t TVirtualX::PointInRegion(Int_t /*x*/, Int_t /*y*/, Region_t /*reg*/)
2227 {
2228  return kFALSE;
2229 }
2230 
2231 ////////////////////////////////////////////////////////////////////////////////
2232 /// Returns kTRUE if the two regions have the same offset, size, and shape.
2233 
2234 Bool_t TVirtualX::EqualRegion(Region_t /*rega*/, Region_t /*regb*/)
2235 {
2236  return kFALSE;
2237 }
2238 
2239 ////////////////////////////////////////////////////////////////////////////////
2240 /// Returns smallest enclosing rectangle.
2241 
2242 void TVirtualX::GetRegionBox(Region_t /*reg*/, Rectangle_t * /*rect*/)
2243 {
2244 }
2245 
2246 ////////////////////////////////////////////////////////////////////////////////
2247 /// Returns list of font names matching fontname regexp, like "-*-times-*".
2248 /// The pattern string can contain any characters, but each asterisk (*)
2249 /// is a wildcard for any number of characters, and each question mark (?)
2250 /// is a wildcard for a single character. If the pattern string is not in
2251 /// the Host Portable Character Encoding, the result is implementation
2252 /// dependent. Use of uppercase or lowercase does not matter. Each returned
2253 /// string is null-terminated.
2254 ///
2255 /// \param [in] fontname specifies the null-terminated pattern string that can
2256 /// contain wildcard characters
2257 /// \param [in] max specifies the maximum number of names to be returned
2258 /// \param [in] count returns the actual number of font names
2259 
2260 char **TVirtualX::ListFonts(const char * /*fontname*/, Int_t /*max*/, Int_t &/*count*/)
2261 {
2262  return 0;
2263 }
2264 
2265 ////////////////////////////////////////////////////////////////////////////////
2266 /// Frees the specified the array of strings "fontlist".
2267 
2268 void TVirtualX::FreeFontNames(char ** /*fontlist*/)
2269 {
2270 }
2271 
2272 ////////////////////////////////////////////////////////////////////////////////
2273 /// Allocates the memory needed for an drawable.
2274 ///
2275 /// \param [in] width the width of the image, in pixels
2276 /// \param [in] height the height of the image, in pixels
2277 
2278 Drawable_t TVirtualX::CreateImage(UInt_t /*width*/, UInt_t /*height*/)
2279 {
2280  return 0;
2281 }
2282 
2283 ////////////////////////////////////////////////////////////////////////////////
2284 /// Returns the width and height of the image id
2285 
2286 void TVirtualX::GetImageSize(Drawable_t /*id*/, UInt_t &/*width*/,
2287  UInt_t &/*height*/)
2288 {
2289 }
2290 
2291 ////////////////////////////////////////////////////////////////////////////////
2292 /// Overwrites the pixel in the image with the specified pixel value.
2293 /// The image must contain the x and y coordinates.
2294 ///
2295 /// \param [in] id specifies the image
2296 /// \param [in] x, y coordinates
2297 /// \param [in] pixel the new pixel value
2298 
2299 void TVirtualX::PutPixel(Drawable_t /*id*/, Int_t /*x*/, Int_t /*y*/,
2300  ULong_t /*pixel*/)
2301 {
2302 }
2303 
2304 ////////////////////////////////////////////////////////////////////////////////
2305 /// Combines an image with a rectangle of the specified drawable. The
2306 /// section of the image defined by the x, y, width, and height arguments
2307 /// is drawn on the specified part of the drawable.
2308 ///
2309 /// \param [in] id the drawable
2310 /// \param [in] gc the GC
2311 /// \param [in] img the image you want combined with the rectangle
2312 /// \param [in] dx the offset in X from the left edge of the image
2313 /// \param [in] dy the offset in Y from the top edge of the image
2314 /// \param [in] x, y coordinates, which are relative to the origin of the
2315 /// drawable and are the coordinates of the subimage
2316 /// \param [in] w, h the width and height of the subimage, which define the
2317 /// rectangle dimensions
2318 ///
2319 /// GC components in use: function, plane-mask, subwindow-mode,
2320 /// clip-x-origin, clip-y-origin, and clip-mask.
2321 /// GC mode-dependent components: foreground and background.
2322 /// (see also the GCValues_t structure)
2323 
2324 void TVirtualX::PutImage(Drawable_t /*id*/, GContext_t /*gc*/,
2325  Drawable_t /*img*/, Int_t /*dx*/, Int_t /*dy*/,
2326  Int_t /*x*/, Int_t /*y*/, UInt_t /*w*/, UInt_t /*h*/)
2327 {
2328 }
2329 
2330 ////////////////////////////////////////////////////////////////////////////////
2331 /// Deallocates the memory associated with the image img
2332 
2333 void TVirtualX::DeleteImage(Drawable_t /*img*/)
2334 {
2335 }
2336 
2337 ////////////////////////////////////////////////////////////////////////////////
2338 /// pointer to the current internal window used in canvas graphics
2339 
2340 Window_t TVirtualX::GetCurrentWindow() const
2341 {
2342  return (Window_t)0;
2343 }
2344 
2345 ////////////////////////////////////////////////////////////////////////////////
2346 /// Returns an array of pixels created from a part of drawable (defined by x, y, w, h)
2347 /// in format:
2348 ///
2349 /// ~~~ {.cpp}
2350 /// b1, g1, r1, 0, b2, g2, r2, 0 ... bn, gn, rn, 0 ..
2351 /// ~~~
2352 ///
2353 /// Pixels are numbered from left to right and from top to bottom.
2354 /// By default all pixels from the whole drawable are returned.
2355 ///
2356 /// Note that return array is 32-bit aligned
2357 
2358 unsigned char *TVirtualX::GetColorBits(Drawable_t /*wid*/, Int_t /*x*/, Int_t /*y*/,
2359  UInt_t /*w*/, UInt_t /*h*/)
2360 {
2361  return 0;
2362 }
2363 
2364 ////////////////////////////////////////////////////////////////////////////////
2365 /// create pixmap from RGB data. RGB data is in format:
2366 ///
2367 /// ~~~ {.cpp}
2368 /// b1, g1, r1, 0, b2, g2, r2, 0 ... bn, gn, rn, 0 ..
2369 /// ~~~
2370 ///
2371 /// Pixels are numbered from left to right and from top to bottom.
2372 /// Note that data must be 32-bit aligned
2373 
2374 Pixmap_t TVirtualX::CreatePixmapFromData(unsigned char * /*bits*/, UInt_t /*width*/,
2375  UInt_t /*height*/)
2376 {
2377  return (Pixmap_t)0;
2378 }
2379 
2380 ////////////////////////////////////////////////////////////////////////////////
2381 /// The Non-rectangular Window Shape Extension adds non-rectangular
2382 /// windows to the System.
2383 /// This allows for making shaped (partially transparent) windows
2384 
2385 void TVirtualX::ShapeCombineMask(Window_t, Int_t, Int_t, Pixmap_t)
2386 {
2387 }
2388 
2389 ////////////////////////////////////////////////////////////////////////////////
2390 /// Returns the width of the screen in millimeters.
2391 
2392 UInt_t TVirtualX::ScreenWidthMM() const
2393 {
2394  return 400;
2395 }
2396 
2397 ////////////////////////////////////////////////////////////////////////////////
2398 /// Deletes the specified property only if the property was defined on the
2399 /// specified window and causes the X server to generate a PropertyNotify
2400 /// event on the window unless the property does not exist.
2401 
2402 void TVirtualX::DeleteProperty(Window_t, Atom_t&)
2403 {
2404 }
2405 
2406 ////////////////////////////////////////////////////////////////////////////////
2407 /// Returns the actual type of the property; the actual format of the property;
2408 /// the number of 8-bit, 16-bit, or 32-bit items transferred; the number of
2409 /// bytes remaining to be read in the property; and a pointer to the data
2410 /// actually returned.
2411 
2412 Int_t TVirtualX::GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t,
2413  Atom_t*, Int_t*, ULong_t*, ULong_t*, unsigned char**)
2414 {
2415  return 0;
2416 }
2417 
2418 ////////////////////////////////////////////////////////////////////////////////
2419 /// Changes the specified dynamic parameters if the pointer is actively
2420 /// grabbed by the client and if the specified time is no earlier than the
2421 /// last-pointer-grab time and no later than the current X server time.
2422 
2423 void TVirtualX::ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t)
2424 {
2425 }
2426 
2427 ////////////////////////////////////////////////////////////////////////////////
2428 /// Requests that the specified selection be converted to the specified
2429 /// target type.
2430 
2431 void TVirtualX::ConvertSelection(Window_t, Atom_t&, Atom_t&, Atom_t&, Time_t&)
2432 {
2433 }
2434 
2435 ////////////////////////////////////////////////////////////////////////////////
2436 /// Changes the owner and last-change time for the specified selection.
2437 
2438 Bool_t TVirtualX::SetSelectionOwner(Window_t, Atom_t&)
2439 {
2440  return kFALSE;
2441 }
2442 
2443 ////////////////////////////////////////////////////////////////////////////////
2444 /// Alters the property for the specified window and causes the X server
2445 /// to generate a PropertyNotify event on that window.
2446 
2447 void TVirtualX::ChangeProperties(Window_t, Atom_t, Atom_t, Int_t, UChar_t *, Int_t)
2448 {
2449 }
2450 
2451 ////////////////////////////////////////////////////////////////////////////////
2452 /// Add XdndAware property and the list of drag and drop types to the
2453 /// Window win.
2454 
2455 void TVirtualX::SetDNDAware(Window_t, Atom_t *)
2456 {
2457 }
2458 
2459 ////////////////////////////////////////////////////////////////////////////////
2460 /// Add the list of drag and drop types to the Window win.
2461 
2462 void TVirtualX::SetTypeList(Window_t, Atom_t, Atom_t *)
2463 {
2464 }
2465 
2466 ////////////////////////////////////////////////////////////////////////////////
2467 /// Recursively search in the children of Window for a Window which is at
2468 /// location x, y and is DND aware, with a maximum depth of maxd.
2469 
2470 Window_t TVirtualX::FindRWindow(Window_t, Window_t, Window_t, int, int, int)
2471 {
2472  return kNone;
2473 }
2474 
2475 ////////////////////////////////////////////////////////////////////////////////
2476 /// Checks if the Window is DND aware, and knows any of the DND formats
2477 /// passed in argument.
2478 
2479 Bool_t TVirtualX::IsDNDAware(Window_t, Atom_t *)
2480 {
2481  return kFALSE;
2482 }
2483 
2484 ////////////////////////////////////////////////////////////////////////////////
2485 /// Start a modal session for a dialog window.
2486 
2487 void TVirtualX::BeginModalSessionFor(Window_t)
2488 {
2489 }
2490 
2491 ////////////////////////////////////////////////////////////////////////////////
2492 /// Returns 1 if window system server supports extension given by the
2493 /// argument, returns 0 in case extension is not supported and returns -1
2494 /// in case of error (like server not initialized).
2495 
2496 Int_t TVirtualX::SupportsExtension(const char *) const
2497 {
2498  return -1;
2499 }
2500 
2501 ////////////////////////////////////////////////////////////////////////////////
2502 /// Map the XftFont with the Graphics Context using it.
2503 
2504 void TVirtualX::MapGCFont(GContext_t, FontStruct_t)
2505 {
2506 }
2507 
2508