Logo ROOT  
Reference Guide
TGX11.cxx File Reference
#include "TROOT.h"
#include "TColor.h"
#include "TGX11.h"
#include "TPoint.h"
#include "TMath.h"
#include "TStorage.h"
#include "TStyle.h"
#include "TExMap.h"
#include "TEnv.h"
#include "TString.h"
#include "TObjString.h"
#include "TObjArray.h"
#include "RStipples.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
#include <X11/xpm.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
Include dependency graph for TGX11.cxx:

Functions

static Int_t DummyX11ErrorHandler (Display *, XErrorEvent *)
 Dummy error handler for X11. Used by FindUsableVisual(). More...
 
static void GetPixel (int y, int width, Byte_t *scline)
 Get pixels in line y and put in array scline. More...
 
int GIFdecode (Byte_t *gifArr, Byte_t *pixArr, int *Width, int *Height, int *Ncols, Byte_t *R, Byte_t *G, Byte_t *B)
 
long GIFencode (int Width, int Height, Int_t Ncol, Byte_t R[], Byte_t G[], Byte_t B[], Byte_t ScLine[], void(*get_scline)(int, int, Byte_t *), void(*pb)(Byte_t))
 
int GIFinfo (Byte_t *gifArr, int *Width, int *Height, int *Ncols)
 
int GIFquantize (UInt_t width, UInt_t height, Int_t *ncol, Byte_t *red, Byte_t *green, Byte_t *blue, Byte_t *outputBuf, Byte_t *outputCmap)
 
static void PutByte (Byte_t b)
 Put byte b in output stream. More...
 
int XRotDrawAlignedImageString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
 A front end to XRotPaintAlignedString: -does alignment, paints background. More...
 
int XRotDrawAlignedString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *, int)
 A front end to XRotPaintAlignedString: -does alignment, no background. More...
 
int XRotDrawImageString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
 A front end to XRotPaintAlignedString: -no alignment, paints background. More...
 
int XRotDrawString (Display *, XFontStruct *, float, Drawable, GC, int, int, char *)
 A front end to XRotPaintAlignedString: -no alignment, no background. More...
 
void XRotSetBoundingBoxPad (int)
 Set the padding used when calculating bounding boxes. More...
 
void XRotSetMagnification (float)
 Set the font magnification factor for all subsequent operations. More...
 
XPoint * XRotTextExtents (Display *, XFontStruct *, float, int, int, char *, int)
 Calculate the bounding box some text will have when painted. More...
 
float XRotVersion (char *, int)
 Return version/copyright information. More...
 

Variables

static int gCapStyle = CapButt
 
static Int_t gCurrentFontNumber = 0
 
static XWindow_t * gCws
 
static int gDashLength = 0
 
static char gDashList [10]
 
static int gDashOffset = 0
 
static int gDashSize = 0
 
static Int_t gFillHollow
 
static Pixmap gFillPattern = 0
 
struct {
   XFontStruct *   id
 
   char   name [80]
 
gFont [kMAXFONT]
 
static GC * gGCdash = &gGClist[5]
 
static GC gGCecho
 
static GC * gGCfill = &gGClist[2]
 
static GC * gGCinvt = &gGClist[4]
 
static GC * gGCline = &gGClist[0]
 
static GC gGClist [kMAXGC]
 
static GC * gGCmark = &gGClist[1]
 
static GC * gGCpxmp = &gGClist[6]
 
static GC * gGCtext = &gGClist[3]
 
static int gJoinStyle = JoinMiter
 
static ULong_t gKeybdMask
 
static int gLineStyle = LineSolid
 
static int gLineWidth = 0
 
struct {
   int   n
 
   int   type
 
   XPoint   xy [kMAXMK]
 
gMarker
 
static int gMarkerCapStyle = CapRound
 
static int gMarkerJoinStyle = JoinRound
 
static int gMarkerLineStyle = LineSolid
 
static int gMarkerLineWidth = 0
 
static ULong_t gMouseMask
 
static Cursor gNullCursor = 0
 
static FILE * gOut
 
static XFontStruct * gTextFont
 
static XWindow_t * gTws
 
static XImage * gXimage = 0
 
const Int_t kBIGGEST_RGB_VALUE = 65535
 
const Int_t kMAXFONT = 4
 
const int kMAXGC = 7
 
const Int_t kMAXMK = 100
 
const char null_cursor_bits []
 

Function Documentation

◆ DummyX11ErrorHandler()

static Int_t DummyX11ErrorHandler ( Display *  ,
XErrorEvent *   
)
static

Dummy error handler for X11. Used by FindUsableVisual().

Definition at line 838 of file TGX11.cxx.

◆ GetPixel()

static void GetPixel ( int  y,
int  width,
Byte_t scline 
)
static

Get pixels in line y and put in array scline.

Definition at line 3307 of file TGX11.cxx.

◆ GIFdecode()

int GIFdecode ( Byte_t gifArr,
Byte_t pixArr,
int Width,
int Height,
int Ncols,
Byte_t R,
Byte_t G,
Byte_t B 
)

Definition at line 149 of file gifdecode.c.

◆ GIFencode()

long GIFencode ( int  Width,
int  Height,
Int_t  Ncol,
Byte_t  R[],
Byte_t  G[],
Byte_t  B[],
Byte_t  ScLine[],
void(*)(int, int, Byte_t *)  get_scline,
void(*)(Byte_t pb 
)

◆ GIFinfo()

int GIFinfo ( Byte_t gifArr,
int Width,
int Height,
int Ncols 
)

Definition at line 80 of file gifdecode.c.

◆ GIFquantize()

int GIFquantize ( UInt_t  width,
UInt_t  height,
Int_t ncol,
Byte_t red,
Byte_t green,
Byte_t blue,
Byte_t outputBuf,
Byte_t outputCmap 
)

◆ PutByte()

static void PutByte ( Byte_t  b)
static

Put byte b in output stream.

Definition at line 3316 of file TGX11.cxx.

◆ XRotDrawAlignedImageString()

int XRotDrawAlignedImageString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  text,
int  align 
)

A front end to XRotPaintAlignedString: -does alignment, paints background.

Definition at line 325 of file Rotated.cxx.

◆ XRotDrawAlignedString()

int XRotDrawAlignedString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  text,
int  align 
)

A front end to XRotPaintAlignedString: -does alignment, no background.

Definition at line 314 of file Rotated.cxx.

◆ XRotDrawImageString()

int XRotDrawImageString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  str 
)

A front end to XRotPaintAlignedString: -no alignment, paints background.

Definition at line 303 of file Rotated.cxx.

◆ XRotDrawString()

int XRotDrawString ( Display *  dpy,
XFontStruct *  font,
float  angle,
Drawable  drawable,
GC  gc,
int  x,
int  y,
char *  str 
)

A front end to XRotPaintAlignedString: -no alignment, no background.

Definition at line 292 of file Rotated.cxx.

◆ XRotSetBoundingBoxPad()

void XRotSetBoundingBoxPad ( int  p)

Set the padding used when calculating bounding boxes.

Definition at line 257 of file Rotated.cxx.

◆ XRotSetMagnification()

void XRotSetMagnification ( float  m)

Set the font magnification factor for all subsequent operations.

Definition at line 248 of file Rotated.cxx.

◆ XRotTextExtents()

XPoint * XRotTextExtents ( Display *  ,
XFontStruct *  font,
float  angle,
int  x,
int  y,
char *  text,
int  align 
)

Calculate the bounding box some text will have when painted.

Definition at line 1350 of file Rotated.cxx.

◆ XRotVersion()

float XRotVersion ( char *  str,
int  n 
)

Return version/copyright information.

Definition at line 238 of file Rotated.cxx.

Variable Documentation

◆ gCapStyle

int gCapStyle = CapButt
static

Definition at line 134 of file TGX11.cxx.

◆ gCurrentFontNumber

Int_t gCurrentFontNumber = 0
static

Definition at line 113 of file TGX11.cxx.

◆ gCws

XWindow_t* gCws
static

Definition at line 80 of file TGX11.cxx.

◆ gDashLength

int gDashLength = 0
static

Definition at line 137 of file TGX11.cxx.

◆ gDashList

char gDashList[10]
static

Definition at line 136 of file TGX11.cxx.

◆ gDashOffset

int gDashOffset = 0
static

Definition at line 138 of file TGX11.cxx.

◆ gDashSize

int gDashSize = 0
static

Definition at line 139 of file TGX11.cxx.

◆ gFillHollow

Int_t gFillHollow
static

Definition at line 100 of file TGX11.cxx.

◆ gFillPattern

Pixmap gFillPattern = 0
static

Definition at line 101 of file TGX11.cxx.

◆ 

struct { ... } gFont[kMAXFONT]

◆ gGCdash

GC* gGCdash = &gGClist[5]
static

Definition at line 95 of file TGX11.cxx.

◆ gGCecho

GC gGCecho
static

Definition at line 98 of file TGX11.cxx.

◆ gGCfill

GC* gGCfill = &gGClist[2]
static

Definition at line 92 of file TGX11.cxx.

◆ gGCinvt

GC* gGCinvt = &gGClist[4]
static

Definition at line 94 of file TGX11.cxx.

◆ gGCline

GC* gGCline = &gGClist[0]
static

Definition at line 90 of file TGX11.cxx.

◆ gGClist

GC gGClist[kMAXGC]
static

Definition at line 89 of file TGX11.cxx.

◆ gGCmark

GC* gGCmark = &gGClist[1]
static

Definition at line 91 of file TGX11.cxx.

◆ gGCpxmp

GC* gGCpxmp = &gGClist[6]
static

Definition at line 96 of file TGX11.cxx.

◆ gGCtext

GC* gGCtext = &gGClist[3]
static

Definition at line 93 of file TGX11.cxx.

◆ gJoinStyle

int gJoinStyle = JoinMiter
static

Definition at line 135 of file TGX11.cxx.

◆ gKeybdMask

ULong_t gKeybdMask
static
Initial value:
= ButtonPressMask | KeyPressMask |
EnterWindowMask | LeaveWindowMask

Definition at line 148 of file TGX11.cxx.

◆ gLineStyle

int gLineStyle = LineSolid
static

Definition at line 133 of file TGX11.cxx.

◆ gLineWidth

int gLineWidth = 0
static

Definition at line 132 of file TGX11.cxx.

◆ 

struct { ... } gMarker

◆ gMarkerCapStyle

int gMarkerCapStyle = CapRound
static

Definition at line 126 of file TGX11.cxx.

◆ gMarkerJoinStyle

int gMarkerJoinStyle = JoinRound
static

Definition at line 127 of file TGX11.cxx.

◆ gMarkerLineStyle

int gMarkerLineStyle = LineSolid
static

Definition at line 125 of file TGX11.cxx.

◆ gMarkerLineWidth

int gMarkerLineWidth = 0
static

Definition at line 124 of file TGX11.cxx.

◆ gMouseMask

ULong_t gMouseMask
static
Initial value:
= ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask |
PointerMotionMask | KeyPressMask |
KeyReleaseMask

Definition at line 144 of file TGX11.cxx.

◆ gNullCursor

Cursor gNullCursor = 0
static

Definition at line 158 of file TGX11.cxx.

◆ gOut

FILE* gOut
static

Definition at line 3292 of file TGX11.cxx.

◆ gTextFont

XFontStruct* gTextFont
static

Definition at line 112 of file TGX11.cxx.

◆ gTws

XWindow_t* gTws
static

Definition at line 81 of file TGX11.cxx.

◆ gXimage

XImage* gXimage = 0
static

Definition at line 3293 of file TGX11.cxx.

◆ id

XFontStruct* id

Definition at line 108 of file TGX11.cxx.

◆ kBIGGEST_RGB_VALUE

const Int_t kBIGGEST_RGB_VALUE = 65535

Definition at line 83 of file TGX11.cxx.

◆ kMAXFONT

const Int_t kMAXFONT = 4

Definition at line 106 of file TGX11.cxx.

◆ kMAXGC

const int kMAXGC = 7

Definition at line 88 of file TGX11.cxx.

◆ kMAXMK

const Int_t kMAXMK = 100

Definition at line 118 of file TGX11.cxx.

◆ n

int n

Definition at line 121 of file TGX11.cxx.

◆ name

char name[80]

Definition at line 109 of file TGX11.cxx.

◆ null_cursor_bits

const char null_cursor_bits[]
Initial value:
= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}

Definition at line 154 of file TGX11.cxx.

◆ type

int type

Definition at line 120 of file TGX11.cxx.

◆ xy

XPoint xy[kMAXMK]

Definition at line 122 of file TGX11.cxx.