Logo ROOT   6.10/09
Reference Guide
TGWin32VirtualXProxy.cxx
Go to the documentation of this file.
1 // @(#)root/win32gdk:$Id$
2 // Author: Valeriy Onuchin 08/08/2003
3 
4 
5 /*************************************************************************
6  * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
7  * All rights reserved. *
8  * *
9  * For the licensing terms see $ROOTSYS/LICENSE. *
10  * For the list of contributors see $ROOTSYS/README/CREDITS. *
11  *************************************************************************/
12 
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TGWin32Proxy //
17 // //
18 // This class is the proxy interface to the Win32 graphics system. //
19 // //
20 //////////////////////////////////////////////////////////////////////////
21 
22 #include "TGWin32ProxyDefs.h"
23 #include "TGWin32VirtualXProxy.h"
24 #include "TGWin32.h"
25 #include "TList.h"
26 
28 
29 ////////////////////////////////////////////////////////////////////////////////
30 ////////////////////////////////////////////////////////////////////////////////
31 
33 {
34  return fgRealObject;
35 }
36 
37 RETURN_PROXY_OBJECT(VirtualX)
42 VOID_METHOD_ARG1(VirtualX,ResetAttMarker,Option_t*,toption,1)
43 VOID_METHOD_ARG1(VirtualX,ResetAttFill,Option_t*,option,1)
44 VOID_METHOD_ARG1(VirtualX,ResetAttLine,Option_t*,option,1)
45 VOID_METHOD_ARG1(VirtualX,ResetAttText,Option_t*,option,1)
47 VOID_METHOD_ARG1(VirtualX,SetTextAngle,Float_t,tangle,1)
49 VOID_METHOD_ARG1(VirtualX,SetTextSizePixels,Int_t,npixels,1)
50 VOID_METHOD_ARG1(VirtualX,SetFillColor,Color_t,cindex,1)
51 VOID_METHOD_ARG1(VirtualX,SetMarkerSize,Float_t,markersize,1)
52 VOID_METHOD_ARG1(VirtualX,SetMarkerStyle,Style_t,markerstyle,1)
53 VOID_METHOD_ARG1(VirtualX,SetMarkerColor,Color_t,cindex,1)
54 VOID_METHOD_ARG1(VirtualX,SetLineColor,Color_t,cindex,1)
55 VOID_METHOD_ARG1(VirtualX,SetLineStyle,Style_t,linestyle,1)
56 VOID_METHOD_ARG1(VirtualX,SetLineWidth,Width_t,width,1)
57 VOID_METHOD_ARG1(VirtualX,SetTextAlign,Short_t,talign,1)
58 VOID_METHOD_ARG1(VirtualX,SetTextSize,Float_t,textsize,1)
59 VOID_METHOD_ARG1(VirtualX,SetTextColor,Color_t,cindex,1)
60 VOID_METHOD_ARG1(VirtualX,SetTextFont,Font_t,fontnumber,1)
61 VOID_METHOD_ARG1(VirtualX,SelectWindow,Int_t,wid,0)
65 VOID_METHOD_ARG1(VirtualX,UpdateWindow,Int_t,mode,1)
66 VOID_METHOD_ARG1(VirtualX,SetOpacity,Int_t,percent,1)
68 VOID_METHOD_ARG6(VirtualX,DrawText,Int_t,x,Int_t,y,Float_t,angle,Float_t,mgn,const char*,text,TVirtualX::ETextMode,mode,1)
69 VOID_METHOD_ARG1(VirtualX,Update,Int_t,mode,1)
71 VOID_METHOD_ARG2(VirtualX,GetCharacterUp,Float_t&,chupx,Float_t&,chupy,1)
87 VOID_METHOD_ARG1(VirtualX,Bell,Int_t,percent,1)
88 VOID_METHOD_ARG0(VirtualX,ClosePixmap,1)
89 VOID_METHOD_ARG0(VirtualX,CloseWindow,1)
92 VOID_METHOD_ARG1(VirtualX,SetClipOFF,Int_t,wid,1)
93 VOID_METHOD_ARG1(VirtualX,MapWindow,Window_t,id,1)
95 VOID_METHOD_ARG1(VirtualX,MapRaised,Window_t,id,1)
101 VOID_METHOD_ARG1(VirtualX,DeleteGC,GContext_t,gc,1)
103 VOID_METHOD_ARG1(VirtualX,DeletePixmap,Pixmap_t,pmap,1)
104 VOID_METHOD_ARG1(VirtualX,DeletePictureData,void*,data,1)
111 VOID_METHOD_ARG1(VirtualX,FreeFontNames,char**,fontlist,1)
115 VOID_METHOD_ARG3(VirtualX,Warp,Int_t,ix,Int_t,iy,Window_t,id,1)
116 VOID_METHOD_ARG2(VirtualX,SetCharacterUp,Float_t,chupx,Float_t,chupy,1)
117 VOID_METHOD_ARG2(VirtualX,ChangeGC,GContext_t,gc,GCValues_t*,gval,1)
118 VOID_METHOD_ARG2(VirtualX,SetDoubleBuffer,Int_t,wid,Int_t,mode,1)
119 VOID_METHOD_ARG2(VirtualX,SetLineType,Int_t,n,Int_t*,dash,1)
120 VOID_METHOD_ARG2(VirtualX,SetCursor,Window_t,id,Cursor_t,curid,1)
124 VOID_METHOD_ARG2(VirtualX,FreeColor,Colormap_t,cmap,ULong_t,pixel,1)
125 VOID_METHOD_ARG2(VirtualX,SetWindowName,Window_t,id,char*,name,1)
127 VOID_METHOD_ARG2(VirtualX,SetIconName,Window_t,id,char*,name,1)
129 VOID_METHOD_ARG2(VirtualX,SelectInput,Window_t,id,UInt_t,evmask,1)
130 VOID_METHOD_ARG2(VirtualX,SetForeground,GContext_t,gc,ULong_t,foreground,1)
132 VOID_METHOD_ARG3(VirtualX,CopyPixmap,Int_t,wid,Int_t,xpos,Int_t,ypos,0)
133 VOID_METHOD_ARG3(VirtualX,SetClassHints,Window_t,id,char*,className,char*,resourceName,1)
136 VOID_METHOD_ARG3(VirtualX,ConvertPrimarySelection,Window_t,id,Atom_t,clipboard,Time_t,when,1)
137 VOID_METHOD_ARG3(VirtualX,ReadGIF,Int_t,x0,Int_t,y0,const char*,file,1)
142 VOID_METHOD_ARG4(VirtualX,SetMWMHints,Window_t,id,UInt_t,value,UInt_t,funcs,UInt_t,input,1)
143 VOID_METHOD_ARG4(VirtualX,SetDashes,GContext_t,gc,Int_t,offset,const char*,dash_list,Int_t,n,1)
144 VOID_METHOD_ARG4(VirtualX,WritePixmap,Int_t,wid,UInt_t,w,UInt_t,h,char*,pxname,1)
145 VOID_METHOD_ARG4(VirtualX,SetRGB,Int_t,cindex,Float_t,r,Float_t,g,Float_t,b,1)
147 VOID_METHOD_ARG4(VirtualX,GrabKey,Window_t,id,Int_t,keycode,UInt_t,modifier,Bool_t,grab,1)
155 VOID_METHOD_ARG6(VirtualX,GrabPointer,Window_t,id,UInt_t,evmask,Window_t,confine,Cursor_t,cursor,Bool_t,grab,Bool_t,owner_events,1)
157 VOID_METHOD_ARG6(VirtualX,DrawString,Drawable_t,id,GContext_t,gc,Int_t,x,Int_t,y,const char*,s,Int_t,len,1)
160 VOID_METHOD_ARG7(VirtualX,GrabButton,Window_t,id,EMouseButton,button,UInt_t,modifier,UInt_t,evmask,Window_t,confine,Cursor_t,cursor,Bool_t,grab,1)
162 VOID_METHOD_ARG7(VirtualX,SetWMSizeHints,Window_t,id,UInt_t,wmin,UInt_t,hmin,UInt_t,wmax,UInt_t,hmax,UInt_t,winc,UInt_t,hinc,1)
164 VOID_METHOD_ARG9(VirtualX,CopyArea,Drawable_t,src,Drawable_t,dest,GContext_t,gc,Int_t,src_x,Int_t,src_y,UInt_t,width,UInt_t,height,Int_t,dest_x,Int_t,dest_y,1)
165 VOID_METHOD_ARG2(VirtualX,QueryColor,Colormap_t,cmap,ColorStruct_t&,color,1)
168 VOID_METHOD_ARG4(VirtualX,GetRGB,Int_t,index,Float_t&,r,Float_t&,g,Float_t&,b,1)
169 VOID_METHOD_ARG3(VirtualX,GetFontProperties,FontStruct_t,font,Int_t&,max_ascent,Int_t&,max_descent,1)
171 VOID_METHOD_ARG3(VirtualX,GetImageSize,Drawable_t,id,UInt_t&,width,UInt_t&,height,1)
179 VOID_METHOD_ARG3(VirtualX,GetTextExtent,UInt_t&,w,UInt_t&,h,char*,mess,1)
180 VOID_METHOD_ARG7(VirtualX,TranslateCoordinates,Window_t,src,Window_t,dest,Int_t,src_x,Int_t,src_y,Int_t&,dest_x,Int_t&,dest_y,Window_t&,child,1)
181 VOID_METHOD_ARG8(VirtualX,QueryPointer,Window_t,id,Window_t&,rootw,Window_t&,childw,Int_t&,root_x,Int_t&,root_y,Int_t&,win_x,Int_t&,win_y,UInt_t&,mask,1)
182 VOID_METHOD_ARG0(VirtualX,ClearWindow,1)
185 VOID_METHOD_ARG1(VirtualX,ResizeWindow,Int_t,winid,1)
186 VOID_METHOD_ARG2(VirtualX,SetCursor,Int_t,win,ECursor,cursor,1)
187 VOID_METHOD_ARG2(VirtualX,QueryPointer,Int_t&,ix,Int_t&,iy,1)
188 VOID_METHOD_ARG5(VirtualX,GetPasteBuffer,Window_t,id,Atom_t,atom,TString&,text,Int_t&,nchar,Bool_t,del,1)
189 VOID_METHOD_ARG1(VirtualX,GetPlanes,Int_t&,planes,1)
202 RETURN_METHOD_ARG1(VirtualX,const char*,DisplayName,const char*,dpyName)
203 RETURN_METHOD_ARG1(VirtualX,Bool_t,Init,void*,display)
207 RETURN_METHOD_ARG1(VirtualX,Int_t,WriteGIF,char*,name)
208 RETURN_METHOD_ARG1(VirtualX,FontStruct_t,LoadQueryFont,const char*,font_name)
213 RETURN_METHOD_ARG1(VirtualX,Int_t,OpenDisplay,const char*,dpyName)
216 RETURN_METHOD_ARG2(VirtualX,Atom_t,InternAtom,const char*,atom_name,Bool_t,only_if_exist)
221 RETURN_METHOD_ARG3(VirtualX,Int_t,TextWidth,FontStruct_t,font,const char*,s,Int_t,len)
225 RETURN_METHOD_ARG4(VirtualX,Pixmap_t,CreateBitmap,Drawable_t,id,const char*,bitmap,UInt_t,width,UInt_t,height)
226 RETURN_METHOD_ARG7(VirtualX,Pixmap_t,CreatePixmap,Drawable_t,id,const char*,bitmap,UInt_t,width,UInt_t,height,ULong_t,forecolor,ULong_t,backcolor,Int_t,depth)
227 RETURN_METHOD_ARG11(VirtualX,Window_t,CreateWindow,Window_t,parent,Int_t,x,Int_t,y,UInt_t,w,UInt_t,h,UInt_t,border,Int_t,depth,UInt_t,clss,void*,visual,SetWindowAttributes_t*,attr,UInt_t,wtype)
228 RETURN_METHOD_ARG3(VirtualX,char**,ListFonts,const char*,fontname,Int_t,mx,Int_t&,count)
230 RETURN_METHOD_ARG3(VirtualX,Bool_t,ParseColor,Colormap_t,cmap,const char*,cname,ColorStruct_t&,color)
232 RETURN_METHOD_ARG5(VirtualX,Bool_t,CreatePictureFromFile,Drawable_t,id,const char*,filename,Pixmap_t&,pict,Pixmap_t&,pict_mask,PictureAttributes_t&,attr)
234 RETURN_METHOD_ARG2(VirtualX,Bool_t,ReadPictureDataFromFile,const char*,filename,char***,ret_data)
235 RETURN_METHOD_ARG2(VirtualX,Int_t,SetTextFont,char*,fontname,TVirtualX::ETextSetMode,mode)
238 RETURN_METHOD_ARG5(VirtualX,unsigned char*,GetColorBits,Drawable_t,wid,Int_t,x,Int_t,y,UInt_t,width,UInt_t,height)
239 RETURN_METHOD_ARG3(VirtualX,Pixmap_t,CreatePixmapFromData,unsigned char*,bits,UInt_t,width,UInt_t,height)
241 VOID_METHOD_ARG1(VirtualX,RemoveWindow,ULong_t,qwid,1)
243 
244 VOID_METHOD_ARG2(VirtualX,DeleteProperty,Window_t,win,Atom_t&,prop,1)
245 RETURN_METHOD_ARG11(VirtualX,Int_t,GetProperty,Window_t,win,Atom_t,prop,Long_t,offset,Long_t,length,Bool_t,del,Atom_t,req_type,Atom_t*,act_type,Int_t*,act_format,ULong_t*,nitems,ULong_t*,bytes,unsigned char**,prop_list)
247 VOID_METHOD_ARG5(VirtualX,ConvertSelection,Window_t,win,Atom_t&,sel,Atom_t&,target,Atom_t&,prop,Time_t&,stamp,1)
250 VOID_METHOD_ARG2(VirtualX,SetDNDAware,Window_t,id,Atom_t*,typelist,1)
251 VOID_METHOD_ARG3(VirtualX,SetTypeList,Window_t,win,Atom_t,prop,Atom_t*,typelist,1);
252 RETURN_METHOD_ARG6(VirtualX,Window_t,FindRWindow,Window_t,win,Window_t,dragwin,Window_t,input,int,x,int,y,int,maxd);
253 RETURN_METHOD_ARG2(VirtualX,Bool_t,IsDNDAware,Window_t,win,Atom_t*,typelist);
254 
255 //VOID_METHOD_ARG1(VirtualX,CreateOpenGLContext,Int_t,wid,1)
256 //VOID_METHOD_ARG1(VirtualX,DeleteOpenGLContext,Int_t,wid,1)
257 //VOID_METHOD_ARG1(VirtualX,RemoveWindow,ULong_t,qwid,1)
258 //RETURN_METHOD_ARG1(VirtualX,ExecCommand,UInt_t,TGWin32Command*,code)
259 //RETURN_METHOD_ARG3(VirtualX,Int_t,AddWindow,ULong_t,qwid,UInt_t,w,UInt_t,h)
260 
261 //////////////////////// some non-standard methods /////////////////////////////
262 ////////////////////////////////////////////////////////////////////////////////
263 ///
264 
266 {
267  if (gDebug) printf("CloseDisplay\n");
269 }
270 
271 ////////////////////////////////////////////////////////////////////////////////
272 /// might be thread unsafe (?)
273 
275 {
276  return (Window_t)gdk_window_get_parent((GdkWindow *) id);
277 }
278 
279 ////////////////////////////////////////////////////////////////////////////////
280 /// Convert the keycode from the event structure to a key symbol (according
281 /// to the modifiers specified in the event structure and the current
282 /// keyboard mapping). In buf a null terminated ASCII string is returned
283 /// representing the string that is currently mapped to the key code.
284 
285 void TGWin32VirtualXProxy::LookupString(Event_t * event, char *buf, Int_t buflen,
286  UInt_t & keysym)
287 {
289  fgRealObject->LookupString(event,buf,buflen,keysym);
291 }
292 
293 ////////////////////////////////////////////////////////////////////////////////
294 /// Return number of pending events.
295 
297 {
298  return fgRealObject->EventsPending();
299 }
300 
301 ////////////////////////////////////////////////////////////////////////////////
302 /// Process next event in the queue - if any.
303 
305 {
306  fgRealObject->NextEvent(event);
307 }
308 
309 ////////////////////////////////////////////////////////////////////////////////
310 /// Check if there is for window "id" an event of type "type".
311 
313 {
314  return fgRealObject->CheckEvent(id,type,ev);
315 }
316 
317 ////////////////////////////////////////////////////////////////////////////////
318 /// Send event ev to window id.
319 
321 {
322  fgRealObject->SendEvent(id,ev);
323 }
324 
325 ////////////////////////////////////////////////////////////////////////////////
326 /// Return kTRUE if we are inside cmd/server thread.
327 
329 {
330  return fgRealObject->IsCmdThread();
331 }
332 
333 ////////////////////////////////////////////////////////////////////////////////
334 /// Return a pointer to the current window.
335 
337 {
338  return fgRealObject->GetCurrentWindow();
339 }
340 
const int nx
Definition: kalman.C:16
void DrawPolyMarker(Int_t n, TPoint *xy)
Draws "n" markers with the current attributes at position [x,y].
void SetLineAttributes()
Invoke the DialogCanvas Line attributes.
Handle_t FontStruct_t
Definition: GuiTypes.h:38
FontH_t GetFontHandle(FontStruct_t fs)
Returns the font handle of the specified font structure "fs".
Region_t CreateRegion()
Creates a new empty region.
void SetTextColor(Color_t cindex=1)
Sets the color index "cindex" for text.
Color_t GetLineColor() const
Return the line color.
void RaiseWindow(Window_t id)
Raises the specified window to the top of the stack so that no sibling window obscures it...
void SetLineColor(Color_t cindex)
Sets color index "cindex" for drawing lines.
#define RETURN_METHOD_ARG3(klass, type, method, type1, par1, type2, par2, type3, par3)
#define VOID_METHOD_ARG2(klass, method, type1, par1, type2, par2, sync)
Semi-Abstract base class defining a generic interface to the underlying, low level, native graphics backend (X11, Win32, MacOS, OpenGL...).
Definition: TVirtualX.h:58
Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd)
Recursively search in the children of Window for a Window which is at location x, y and is DND aware...
void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Returns the location and the size of window "id".
void PutImage(Drawable_t id, GContext_t gc, Drawable_t img, Int_t dx, Int_t dy, Int_t x, Int_t y, UInt_t w, UInt_t h)
Combines an image with a rectangle of the specified drawable.
#define VOID_METHOD_ARG8(klass, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5, type6, par6, type7, par7, type8, par8, sync)
Bool_t SetSelectionOwner(Window_t, Atom_t &)
Changes the owner and last-change time for the specified selection.
void IntersectRegion(Region_t rega, Region_t regb, Region_t result)
Computes the intersection of two regions.
Window_t GetParent(Window_t id) const
might be thread unsafe (?)
void SetCharacterUp(Float_t chupx, Float_t chupy)
Sets character up vector.
Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color)
Looks up the string name of a color "cname" with respect to the screen associated with the specified ...
void CopyGC(GContext_t org, GContext_t dest, Mask_t mask)
Copies the specified components from the source GC "org" to the destination GC "dest".
#define RETURN_METHOD_ARG5(klass, type, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5)
Bool_t CreatePictureFromData(Drawable_t id, char **data, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr)
Creates a picture pict from data in bitmap format.
Display_t GetDisplay() const
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
#define RETURN_METHOD_ARG0_CONST(klass, type, method)
void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask)
The Non-rectangular Window Shape Extension adds non-rectangular windows to the System.
EInitialState
Definition: GuiTypes.h:344
void SetLineType(Int_t n, Int_t *dash)
Sets the line type.
short Style_t
Definition: RtypesCore.h:76
Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg)
Returns kTRUE if the point [x, y] is contained in the region reg.
#define RETURN_PROXY_OBJECT(klass)
Handle_t GetNativeEvent() const
Returns the current native event handle.
float Float_t
Definition: RtypesCore.h:53
void DeleteFont(FontStruct_t fs)
Explicitly deletes the font structure "fs" obtained via LoadQueryFont().
float Size_t
Definition: RtypesCore.h:83
UInt_t Mask_t
Definition: GuiTypes.h:40
const char Option_t
Definition: RtypesCore.h:62
Window_t GetWindowID(Int_t wid)
Returns the X11 window identifier.
void ResetAttMarker(Option_t *toption="")
Reset this marker attributes to the default values.
void SetOpacity(Int_t percent)
Sets opacity of the current window.
Color_t GetFillColor() const
Return the fill area color.
Style_t GetLineStyle() const
Return the line style.
Bool_t HasTTFonts() const
Returns True when TrueType fonts are used.
unsigned char * GetColorBits(Drawable_t wid, Int_t x, Int_t y, UInt_t width, UInt_t height)
Returns an array of pixels created from a part of drawable (defined by x, y, w, h) in format: ...
void CloseWindow()
Deletes current window.
void MoveWindow(Int_t wid, Int_t x, Int_t y)
Moves the window "wid" to the specified x and y coordinates.
Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y)
Requests Locator position.
Font_t GetTextFont() const
Return the text font.
virtual void NextEvent(Event_t &event)
The "event" is set to default event.
Definition: TVirtualX.cxx:137
#define RETURN_METHOD_ARG0(klass, type, method)
ULong_t Time_t
Definition: GuiTypes.h:41
Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height)
create pixmap from RGB data.
Int_t SetTextFont(char *fontname, ETextSetMode mode)
Sets text font to specified name "fontname".This function returns 0 if the specified font is found...
Window_t GetInputFocus()
Returns the window id of the window having the input focus.
void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab=kTRUE)
Establishes a passive grab on the keyboard.
TH1 * h
Definition: legend2.C:5
void SetTextSizePixels(Int_t npixels)
Set the text size in pixels.
Bool_t EqualRegion(Region_t rega, Region_t regb)
Returns kTRUE if the two regions have the same offset, size, and shape.
#define VOID_METHOD_ARG7(klass, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5, type6, par6, type7, par7, sync)
void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic)
Draws a cell array.
Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding)
Returns a region for the polygon defined by the points array.
EGEventType
Definition: GuiTypes.h:58
Handle_t Cursor_t
Definition: GuiTypes.h:33
void MapRaised(Window_t id)
Maps the window "id" and all of its subwindows that have had map requests on the screen and put this ...
void SetLineStyle(Style_t linestyle)
Sets the line style.
void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
Paints a rectangular area in the specified window "id" according to the specified dimensions with the...
void SetFillColor(Color_t cindex)
Sets color index "cindex" for fill areas.
void ResizeWindow(Int_t wid)
Resizes the window "wid" if necessary.
void UnmapWindow(Window_t id)
Unmaps the specified window "id".
void MapSubwindows(Window_t id)
Maps all subwindows for the specified window "id" in top-to-bottom stacking order.
void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist)
Add the list of drag and drop types to the Window win.
void ClosePixmap()
Deletes current pixmap.
void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr)
Changes the attributes of the specified window "id" according the values provided in "attr"...
Handle_t GContext_t
Definition: GuiTypes.h:37
Float_t GetTextSize() const
Return the text size.
Basic string class.
Definition: TString.h:129
void GetCharacterUp(Float_t &chupx, Float_t &chupy)
Returns character up vector.
void ChangeProperty(Window_t id, Atom_t property, Atom_t type, UChar_t *data, Int_t len)
Alters the property for the specified window and causes the X server to generate a PropertyNotify eve...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void GetTextExtent(UInt_t &w, UInt_t &h, char *mess)
Returns the size of the specified character string "mess".
void ResetAttLine(Option_t *option="")
Reset this line attributes to default values.
Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist)
Returns the atom identifier associated with the specified "atom_name" string.
void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h)
Changes the size and location of the specified window "id" without raising it.
FontStruct_t GetFontStruct(FontH_t fh)
Retrieves the associated font structure of the font specified font handle "fh".
void ConvertSelection(Window_t, Atom_t &, Atom_t &, Atom_t &, Time_t &)
Requests that the specified selection be converted to the specified target type.
void FreeFontStruct(FontStruct_t fs)
Frees the font structure "fs".
Handle_t Drawable_t
Definition: GuiTypes.h:30
void SetFillAttributes()
Invoke the DialogCanvas Fill attributes.
void SetDoubleBufferOFF()
Turns double buffer mode off.
void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg)
Draws multiple line segments.
void DestroySubwindows(Window_t id)
The DestroySubwindows function destroys all inferior windows of the specified window, in bottom-to-top stacking order.
void SetIconName(Window_t id, char *name)
Sets the window icon name.
void DrawPolyLine(Int_t n, TPoint *xy)
Draws a line through all points in the list.
static std::string format(double x, double y, int digits, int width)
ECursor
Definition: TVirtualX.h:44
void Warp(Int_t ix, Int_t iy, Window_t id=0)
Sets the pointer position.
short Font_t
Definition: RtypesCore.h:75
void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len)
Each character image, as defined by the font in the GC, is treated as an additional mask for a fill o...
void SubtractRegion(Region_t rega, Region_t regb, Region_t result)
Subtracts regb from rega and stores the results in result.
FontStruct_t LoadQueryFont(const char *font_name)
Provides the most common way for accessing a font: opens (loads) the specified font and returns a poi...
Handle_t Display_t
Definition: GuiTypes.h:26
void SetTextAttributes()
Invoke the DialogCanvas Text attributes.
Int_t InitWindow(ULong_t window)
Creates a new window and return window number.
void Update(Int_t mode=0)
Flushes (mode = 0, default) or synchronizes (mode = 1) X output buffer.
const char * DisplayName(const char *=0)
Returns hostname on which the display is opened.
Int_t OpenDisplay(const char *dpyName=0)
Opens connection to display server (if such a thing exist on the current platform).
void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n)
Sets clipping rectangles in graphics context.
Handle_t FontH_t
Definition: GuiTypes.h:34
#define VOID_METHOD_ARG0(klass, method, sync)
void SelectInput(Window_t id, UInt_t evmask)
Defines which input events the window is interested in.
void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt)
Fills the region closed by the specified path.
char ** ListFonts(const char *fontname, Int_t max, Int_t &count)
Returns list of font names matching fontname regexp, like "-*-times-*".
static const double x2[5]
Double_t x[n]
Definition: legend1.C:17
#define RETURN_METHOD_ARG7(klass, type, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5, type6, par6, type7, par7)
void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Gives the window manager minimum and maximum size hints of the window "id".
virtual void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym)
Converts the keycode from the event structure to a key symbol (according to the modifiers specified i...
Definition: TVirtualX.cxx:2009
void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b)
Returns RGB values for color "index".
#define DEBUG_PROFILE_PROXY_STOP(method)
static TVirtualX * fgRealObject
const int ny
Definition: kalman.C:17
Int_t GetDoubleBuffer(Int_t wid)
Queries the double buffer value for the window "wid".
Color_t GetTextColor() const
Return the text color.
Handle_t Atom_t
Definition: GuiTypes.h:36
void SetDoubleBufferON()
Turns double buffer mode on.
void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y)
If the specified window is mapped, ReparentWindow automatically performs an UnmapWindow request on it...
void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm)
Sets the background pixmap of the window "id" to the specified pixmap "pxm".
void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Draws a line.
#define VOID_METHOD_ARG4(klass, method, type1, par1, type2, par2, type3, par3, type4, par4, sync)
void SetMarkerColor(Color_t cindex)
Sets color index "cindex" for markers.
static TVirtualX * RealObject()
void SetWindowBackground(Window_t id, ULong_t color)
Sets the background of the window "id" to the specified color value "color".
void SetWMSize(Window_t id, UInt_t w, UInt_t h)
Tells window manager the desired size of window "id".
void ResetAttFill(Option_t *option="")
Reset this fill attributes to default values.
void LowerWindow(Window_t id)
Lowers the specified window "id" to the bottom of the stack so that it does not obscure any sibling w...
Int_t TextWidth(FontStruct_t font, const char *s, Int_t len)
Return length of the string "s" in pixels. Size depends on font.
void SetTextSize(Float_t textsize=1)
Sets the current text size to "textsize".
void SendEvent(Window_t id, Event_t *ev)
Send event ev to window id.
void SetDNDAware(Window_t win, Atom_t *typelist)
Add XdndAware property and the list of drag and drop types to the Window win.
short Color_t
Definition: RtypesCore.h:79
Window_t GetDefaultRootWindow() const
Returns handle to the default root window created when calling XOpenDisplay().
virtual void SendEvent(Window_t id, Event_t *ev)
Specifies the event "ev" is to be sent to the window "id".
Definition: TVirtualX.cxx:1623
Int_t OpenPixmap(UInt_t w, UInt_t h)
Creates a pixmap of the width "w" and height "h" you specified.
#define RETURN_METHOD_ARG4(klass, type, method, type1, par1, type2, par2, type3, par3, type4, par4)
Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev)
Check if there is for window "id" an event of type "type".
void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n)
Sets the dash-offset and dash-list attributes for dashed line styles in the specified GC...
void FreeFontNames(char **fontlist)
Frees the specified the array of strings "fontlist".
Definition: TPoint.h:31
#define RETURN_METHOD_ARG11(klass, type, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5, type6, par6, type7, par7, type8, par8, type9, par9, type10, par10, type11, par11)
void SetTextAlign(Short_t talign=11)
Sets the text alignment.
void GetPlanes(Int_t &nplanes)
Returns the maximum number of planes.
Bool_t CreatePictureFromFile(Drawable_t id, const char *filename, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr)
Creates a picture pict from data in file "filename".
virtual Window_t GetCurrentWindow() const
pointer to the current internal window used in canvas graphics
Definition: TVirtualX.cxx:2340
point * points
Definition: X3DBuffer.c:20
Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h)
Resizes the specified pixmap "wid".
Int_t RequestString(Int_t x, Int_t y, char *text)
Requests string: text is displayed and can be edited with Emacs-like keybinding.
void SetTextMagnitude(Float_t mgn)
Sets the current text magnification factor to "mgn".
Colormap_t GetColormap() const
Returns handle to colormap.
void SetCursor(Int_t win, ECursor cursor)
The cursor "cursor" will be used when the pointer is in the window "wid".
void SetTextAngle(Float_t tangle=0)
Set the text angle.
void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input)
Sets decoration style.
Int_t GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t, Atom_t *, Int_t *, ULong_t *, ULong_t *, unsigned char **)
Returns the actual type of the property; the actual format of the property; the number of 8-bit...
EMouseButton
Definition: GuiTypes.h:213
TRandom2 r(17)
void RescaleWindow(Int_t wid, UInt_t w, UInt_t h)
Rescales the window "wid".
void SetMarkerStyle(Style_t markerstyle)
Sets marker style.
void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t)
Changes the specified dynamic parameters if the pointer is actively grabbed by the client and if the ...
XPoint xy[kMAXMK]
Definition: TGX11.cxx:122
void SetWMPosition(Window_t id, Int_t x, Int_t y)
Tells the window manager the desired position [x,y] of window "id".
Drawable_t CreateImage(UInt_t width, UInt_t height)
Allocates the memory needed for an drawable.
void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
Draws rectangle outlines of [x,y] [x+w,y] [x+w,y+h] [x,y+h].
void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos)
Copies the pixmap "wid" at the position [xpos,ypos] in the current window.
void NextEvent(Event_t &event)
Process next event in the queue - if any.
Handle_t Visual_t
Definition: GuiTypes.h:27
void UnionRegion(Region_t rega, Region_t regb, Region_t result)
Computes the union of two regions.
Int_t WriteGIF(char *name)
Writes the current window into GIF file.
void DestroyWindow(Window_t id)
Destroys the window "id" as well as all of its subwindows.
#define RETURN_METHOD_ARG1(klass, type, method, type1, par1)
void DeleteGC(GContext_t gc)
Deletes the specified GC "gc".
void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Returns position and size of window "wid".
GContext_t CreateGC(Drawable_t id, GCValues_t *gval)
Creates a graphics context using the provided GCValues_t *gval structure.
#define VOID_METHOD_ARG1(klass, method, type1, par1, sync)
unsigned int UInt_t
Definition: RtypesCore.h:42
void GrabPointer(Window_t id, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE, Bool_t owner_events=kTRUE)
Establishes an active pointer grab.
void SetPrimarySelectionOwner(Window_t id)
Makes the window "id" the current owner of the primary selection.
void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest)
Updates the destination region from a union of the specified rectangle and the specified source regio...
void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent)
Returns the font properties.
void GetPasteBuffer(Window_t id, Atom_t atom, TString &text, Int_t &nchar, Bool_t del)
Gets contents of the paste buffer "atom" into the string "text".
short Short_t
Definition: RtypesCore.h:35
void DeletePixmap(Pixmap_t pmap)
Explicitly deletes the pixmap resource "pmap".
Width_t GetLineWidth() const
Return the line width.
virtual Int_t EventsPending()
Returns the number of events that have been received from the X server but have not been removed from...
Definition: TVirtualX.cxx:1509
#define VOID_METHOD_ARG6(klass, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5, type6, par6, sync)
void SetDrawMode(EDrawMode mode)
Sets the drawing mode.
Style_t GetMarkerStyle() const
Return the marker style.
void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b)
Sets color intensities the specified color index "cindex".
void SetWMState(Window_t id, EInitialState state)
Sets the initial state of the window "id": either kNormalState or kIconicState.
void ClearWindow()
Clears the entire area of the current window.
void IconifyWindow(Window_t id)
Iconifies the window "id".
void SetMarkerSize(Float_t markersize)
Sets marker size index.
void Bell(Int_t percent)
Sets the sound bell. Percent is loudness from -100% to 100%.
Int_t GetScreen() const
Returns screen number.
void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode)
Draws a text string using current font.
Handle_t Colormap_t
Definition: GuiTypes.h:32
short Width_t
Definition: RtypesCore.h:78
Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap, UInt_t width, UInt_t height)
Creates a bitmap (i.e.
void UpdateWindow(Int_t mode)
Updates or synchronises client and server once (not permanent).
Window_t CreateWindow(Window_t parent, Int_t x, Int_t y, UInt_t w, UInt_t h, UInt_t border, Int_t depth, UInt_t clss, void *visual, SetWindowAttributes_t *attr, UInt_t wtype)
Creates an unmapped subwindow for a specified parent window and returns the created window...
Int_t EventsPending()
Return number of pending events.
void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when)
Causes a SelectionRequest event to be sent to the current primary selection owner.
long Long_t
Definition: RtypesCore.h:50
Bool_t IsTransparent() const
void DrawFillArea(Int_t n, TPoint *xy)
Fills area described by the polygon.
ULong_t GetPixel(Color_t cindex)
Returns pixel value associated to specified ROOT color number "cindex".
void MapWindow(Window_t id)
Maps the window "id" and all of its subwindows that have had map requests.
Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data)
Reads picture data from file "filename" and store it in "ret_data".
void DeleteImage(Drawable_t img)
Deallocates the memory associated with the image img.
static const double x1[5]
void ResetAttText(Option_t *toption="")
Reset this text attributes to default values.
void DeleteProperty(Window_t, Atom_t &)
Deletes the specified property only if the property was defined on the specified window and causes th...
TText * text
void GrabButton(Window_t id, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE)
Establishes a passive grab on a certain mouse button.
virtual void CloseDisplay()
Closes connection to display server and destroys all windows.
Definition: TVirtualX.cxx:1207
Window_t GetPrimarySelectionOwner()
Returns the window id of the current owner of the primary selection.
void SetLineWidth(Width_t width)
Sets the line width.
void SetDoubleBuffer(Int_t wid, Int_t mode)
Sets the double buffer on/off on the window "wid".
int type
Definition: TGX11.cxx:120
void DeletePictureData(void *data)
Delete picture data created by the function ReadPictureDataFromFile.
unsigned long ULong_t
Definition: RtypesCore.h:51
void SetFillStyle(Style_t style)
Sets fill area style.
TCanvas * style()
Definition: style.C:1
Double_t y[n]
Definition: legend1.C:17
void SetMarkerAttributes()
Invoke the DialogCanvas Marker attributes.
void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym)
Convert the keycode from the event structure to a key symbol (according to the modifiers specified in...
RETURN_METHOD_ARG2(VirtualX, Bool_t, IsDNDAware, Window_t, win, Atom_t *, typelist)
Float_t GetTextMagnitude()
Returns the current font magnification factor.
void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x, Int_t src_y, Int_t &dest_x, Int_t &dest_y, Window_t &child)
Translates coordinates in one window to the coordinate space of another window.
void SetIconPixmap(Window_t id, Pixmap_t pix)
Sets the icon name pixmap.
void XorRegion(Region_t rega, Region_t regb, Region_t result)
Calculates the difference between the union and intersection of two regions.
void GetGCValues(GContext_t gc, GCValues_t &gval)
Returns the components specified by the mask in "gval" for the specified GC "gc" (see also the GCValu...
void SetWMTransientHint(Window_t id, Window_t main_id)
Tells window manager that the window "id" is a transient window of the window "main_id".
Short_t GetTextAlign() const
Return the text alignment.
void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode)
Draws a box between [x1,y1] and [x2,y2] according to the "mode".
Float_t GetTextAngle() const
Return the text angle.
void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel)
Overwrites the pixel in the image with the specified pixel value.
void ReadGIF(Int_t x0, Int_t y0, const char *file)
#define org(otri, vertexptr)
Definition: triangle.c:1037
virtual Bool_t IsCmdThread() const
Definition: TVirtualX.h:340
void ChangeGC(GContext_t gc, GCValues_t *gval)
Changes the components specified by the mask in gval for the specified GC.
Handle_t Window_t
Definition: GuiTypes.h:28
void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc, Int_t src_x, Int_t src_y, UInt_t width, UInt_t height, Int_t dest_x, Int_t dest_y)
Combines the specified rectangle of "src" with the specified rectangle of "dest" according to the "gc...
void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h)
Fills the specified rectangle defined by [x,y] [x+w,y] [x+w,y+h] [x,y+h].
void SetWindowName(Window_t id, char *name)
Sets the window name.
Bool_t EmptyRegion(Region_t reg)
Returns kTRUE if the region reg is empty.
void GetRegionBox(Region_t reg, Rectangle_t *rect)
Returns smallest enclosing rectangle.
void WMDeleteNotify(Window_t id)
Tells WM to send message when window is closed via WM.
Definition: file.py:1
void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height)
Returns the width and height of the image id.
#define dest(otri, vertexptr)
Definition: triangle.c:1040
void SetKeyAutoRepeat(Bool_t on=kTRUE)
Turns key auto repeat on (kTRUE) or off (kFALSE).
Handle_t Region_t
Definition: GuiTypes.h:31
VOID_METHOD_ARG3(VirtualX, SetTypeList, Window_t, win, Atom_t, prop, Atom_t *, typelist, 1)
Handle_t Pixmap_t
Definition: GuiTypes.h:29
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h)
Sets clipping region for the window "wid".
#define VOID_METHOD_ARG9(klass, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5, type6, par6, type7, par7, type8, par8, type9, par9, sync)
Bool_t IsDNDAware(Window_t win, Atom_t *typelist)
Checks if the Window is DND aware, and knows any of the DND formats passed in argument.
R__EXTERN Int_t gDebug
Definition: Rtypes.h:83
void GetWindowAttributes(Window_t id, WindowAttributes_t &attr)
The WindowAttributes_t structure is set to default.
void SetClassHints(Window_t id, char *className, char *resourceName)
Sets the windows class and resource name.
Color_t GetMarkerColor() const
Return the marker color.
Size_t GetMarkerSize() const
Return the marker size.
Int_t GetDepth() const
Returns depth of screen (number of bit planes).
Int_t KeysymToKeycode(UInt_t keysym)
Converts the "keysym" to the appropriate keycode.
void SetForeground(GContext_t gc, ULong_t foreground)
Sets the foreground color for the specified GC (shortcut for ChangeGC with only foreground mask set)...
double result[121]
unsigned char UChar_t
Definition: RtypesCore.h:34
#define VOID_METHOD_ARG5(klass, method, type1, par1, type2, par2, type3, par3, type4, par4, type5, par5, sync)
RETURN_METHOD_ARG6(VirtualX, Window_t, FindRWindow, Window_t, win, Window_t, dragwin, Window_t, input, int, x, int, y, int, maxd)
void RemoveWindow(ULong_t qwid)
Removes the created by Qt window "qwid".
virtual Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev)
Check if there is for window "id" an event of type "type".
Definition: TVirtualX.cxx:1613
void ChangeProperties(Window_t id, Atom_t property, Atom_t type, Int_t format, UChar_t *data, Int_t len)
Alters the property for the specified window and causes the X server to generate a PropertyNotify eve...
void SetClipOFF(Int_t wid)
Turns off the clipping for the window "wid".
#define DEBUG_PROFILE_PROXY_START(method)
Bool_t Init(void *display=0)
Initializes the X system.
Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h)
Registers a window created by Qt as a ROOT window.
Style_t GetFillStyle() const
Return the fill area style.
void DestroyRegion(Region_t reg)
Destroys the region "reg".
void QueryColor(Colormap_t cmap, ColorStruct_t &color)
Returns the current RGB value for the pixel in the "color" structure.
void SelectWindow(Int_t wid)
Selects the window "wid" to which subsequent output is directed.
void QueryPointer(Int_t &ix, Int_t &iy)
Returns the pointer position.
const Int_t n
Definition: legend1.C:16
Bool_t AllocColor(Colormap_t cmap, ColorStruct_t &color)
Allocates a read-only colormap entry corresponding to the closest RGB value supported by the hardware...
void CloseDisplay()
Closes connection to display server and destroys all windows.
void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname)
Writes the pixmap "wid" in the bitmap file "pxname".
Visual_t GetVisual() const
Returns handle to visual.
Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h)
Creates a pixmap of the specified width and height and returns a pixmap ID that identifies it...
Cursor_t CreateCursor(ECursor cursor)
Creates the specified cursor.
Window_t GetCurrentWindow() const
Return a pointer to the current window.
void FreeColor(Colormap_t cmap, ULong_t pixel)
Frees color cell with specified pixel value.
void SetInputFocus(Window_t id)
Changes the input focus to specified window "id".
Bool_t IsCmdThread() const
Return kTRUE if we are inside cmd/server thread.
ULong_t Handle_t
Definition: GuiTypes.h:25