Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Data Structures | Defines | Typedefs | Enumerations | Functions
Xw_Extension.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <Xw_Cextern.hxx>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/keysym.h>
#include <X11/XWDFile.h>

Data Structures

struct  XOverlayVisualInfo
struct  XW_EXT_DISPLAY
struct  XW_EXT_COLORMAP
struct  XW_EXT_WIDTHMAP
struct  XW_EXT_TYPEMAP
struct  XW_EXT_FONTMAP
struct  XW_EXT_TILEMAP
struct  XW_EXT_MARKMAP
struct  XW_EXT_IMAGEDATA
struct  XW_EXT_POINT
struct  XW_EXT_CHAR
struct  XW_EXT_SEGMENT
struct  XW_EXT_LMARKER
struct  XW_EXT_PMARKER
struct  XW_EXT_LINE
struct  XW_EXT_POLY
struct  XW_EXT_ARC
struct  XW_EXT_LTEXT
struct  XW_EXT_PTEXT
struct  XW_EXT_IMAGE
struct  XW_EXT_BUFFER
struct  XW_QGL
struct  XW_QGP
struct  XW_QGT
struct  XW_QGM
struct  XW_QGW
struct  XW_ECBK
struct  XW_ICBK
struct  XW_EXT_WINDOW
struct  XW_EXT_ICON

Defines

#define min(a, b)   (a>b ? b : a)
#define max(a, b)   (a<b ? b : a)
#define DRAD   (M_PI/180.)
#define MAXLINES   256
#define MAXPOLYS   256
#define MAXPOINTS   1024
#define MAXSEGMENTS   1024
#define MAXARCS   1024
#define MAXLTEXTS   256
#define MAXPTEXTS   256
#define MAXCHARS   1024
#define MAXIMAGES   8
#define MAXLMARKERS   256
#define MAXPMARKERS   256
#define MAXBUFFERS   8
#define MAXQG   32
#define MAXTYPE   256
#define MAXCOLOR   512
#define MINCOLOR   32
#define FRECOLOR   14
#define MAXWIDTH   256
#define MAXFONT   256
#define MAXTILE   256
#define MAXMARKER   256
#define MAXEVENT   XW_ALLEVENT+1
#define MAXCURSOR   200
#define MAXANGLE   23040
#define MINTEXTSIZE   8
#define _ATTRIBUTES   pwindow->attributes
#define _WINDOW   pwindow->window
#define _PIXMAP   pwindow->pixmap
#define _NWBUFFER   pwindow->nwbuffer
#define _FWBUFFER   pwindow->wbuffers[0]
#define _BWBUFFER   pwindow->wbuffers[1]
#define _DRAWABLE   pwindow->drawable
#define _COLORMAP   (pwindow->pcolormap)
#define _WIDTHMAP   (pwindow->pwidthmap)
#define _TYPEMAP   (pwindow->ptypemap)
#define _FONTMAP   (pwindow->pfontmap)
#define _TILEMAP   (pwindow->ptilemap)
#define _MARKMAP   (pwindow->pmarkmap)
#define _ROOT   (_ATTRIBUTES.root)
#define _SCREEN   (_ATTRIBUTES.screen)
#define _VISUAL   (_ATTRIBUTES.visual)
#define _CLASS   (_VISUAL->class)
#define _X   (_ATTRIBUTES.x)
#define _Y   (_ATTRIBUTES.y)
#define _WIDTH   (_ATTRIBUTES.width)
#define _HEIGHT   (_ATTRIBUTES.height)
#define _STATE   (_ATTRIBUTES.map_state)
#define _DEPTH   (_ATTRIBUTES.depth)
#define _EVENT_MASK   (_ATTRIBUTES.your_event_mask)
#define QGCODE(color, type, width, mode)   ((color<<20)|(type<<12)|(width<<4)|mode)
#define QGCOLOR(code)   ((code>>20)&0xFFF)
#define QGSETCOLOR(code, color)   ((code&0x000FFFFF)|(color<<20))
#define QGTYPE(code)   ((code>>12)&0xFF)
#define QGSETTYPE(code, type)   ((code&0xFFF00FFF)|(type<<12))
#define QGWIDTH(code)   ((code>> 4)&0xFF)
#define QGSETWIDTH(code, width)   ((code&0xFFFFF00F)|(width<<4))
#define QGTILE(code)   ((code>> 4)&0xFF)
#define QGSETTILE(code, mark)   ((code&0xFFFFF00F)|(mark<<4))
#define QGFONT(code)   ((code>> 4)&0xFF)
#define QGSETFONT(code, font)   ((code&0xFFFFF00F)|(font<<4))
#define QGMODE(code)   (code&0xF)
#define QGSETMODE(code, mode)   ((code&0xFFFFFFF0)|mode)
#define ROUND(v)
#define PXPOINT(x)   ((int)((x) / pwindow->xratio))
#define PYPOINT(y)   ((int)(_HEIGHT - ((y) / pwindow->yratio)))
#define PVALUE(v)   ((int)((v) / ((pwindow->xratio+pwindow->yratio)/2.)))
#define UVALUE(v)   ((float)(v) * (pwindow->xratio+pwindow->yratio)/2.)
#define UXPOINT(x)   ((float)(x) * pwindow->xratio)
#define UYPOINT(y)   ((float)(_HEIGHT - (y)) * pwindow->yratio)
#define DISPLAY_TYPE   0
#define _DDISPLAY   pdisplay->display
#define _DSCREEN   (pdisplay->screen)
#define _DVISUAL   (pdisplay->visual)
#define _DCLASS   (pdisplay->visual->class)
#define _DCOLORMAP   pdisplay->colormap
#define _DGC   pdisplay->gc
#define _DROOT   pdisplay->rootwindow
#define _DGRAB   pdisplay->grabwindow
#define _DWIDTH   pdisplay->width
#define _DHEIGHT   pdisplay->height
#define MMPXVALUE(v)   ((float)((v)*WidthMMOfScreen(_DSCREEN))/(float)_DWIDTH)
#define MMPYVALUE(v)   ((float)((v)*HeightMMOfScreen(_DSCREEN))/(float)_DHEIGHT)
#define PMMXVALUE(v)   ((int)((v)*_DWIDTH/(float)WidthMMOfScreen(_DSCREEN)))
#define PMMYVALUE(v)   ((int)((v)*_DHEIGHT/(float)HeightMMOfScreen(_DSCREEN)))
#define COLORMAP_TYPE   2
#define _CDISPLAY   (pcolormap->connexion->display)
#define _CSCREEN   (pcolormap->connexion->screen)
#define _CCOLORMAP   (pcolormap->connexion->colormap)
#define _CROOT   (pcolormap->connexion->rootwindow)
#define _CVISUAL   (pcolormap->visual)
#define _CCLASS   (pcolormap->visual->class)
#define _CINFO   (pcolormap->info)
#define _CGINFO   (pcolormap->ginfo)
#define FREECOLOR   0 /* Free color Index if define[] = 0 */
#define USERCOLOR   1 /* User color Index if define[] = 1 */
#define IMAGECOLOR   2 /* Image color Index if define[] = 2 */
#define HIGHCOLOR   3 /* HighLight color Index if define[] = 3 */
#define BACKCOLOR   4 /* Background color Index if define[] = 4 */
#define SYSTEMCOLOR   5 /* System color Index if define[] = 5 */
#define WIDTHMAP_TYPE   3
#define _WDISPLAY   (pwidthmap->connexion->display)
#define TYPEMAP_TYPE   4
#define _TDISPLAY   (ptypemap->connexion->display)
#define FONTMAP_TYPE   5
#define _FDISPLAY   (pfontmap->connexion->display)
#define TILEMAP_TYPE   6
#define _PDISPLAY   (ptilemap->connexion->display)
#define MARKMAP_TYPE   7
#define _MDISPLAY   (pmarkmap->connexion->display)
#define IMAGE_TYPE   8
#define _ICOLORMAP   (pimage->pcolormap)
#define _IVISUAL   (_ICOLORMAP->visual)
#define _IIMAGE   (pimage->pximage)
#define _ZIMAGE   (pimage->zximage)
#define _IINFO   (pimage->pimageinfo)
#define _BIMAGE   pwindow->qgwind.pimage
#define _BMETHOD   pwindow->qgwind.method
#define _BPIXMAP   pwindow->qgwind.pixmap
#define _BINDEX   pwindow->qgwind.cbufindex
#define _BUFFER(index)   pwindow->qgwind.pbuflist[index]
#define WINDOW_TYPE   1
#define _DISPLAY   (pwindow->connexion->display)
#define ICON_TYPE   10
#define Xw_malloc   malloc
#define Xw_calloc   calloc
#define Xw_free   free

Typedefs

typedef XW_STATUS(* XW_ICALLBACK )()

Enumerations

enum  XW_SERVER_TYPE {
  XW_SERVER_IS_UNKNOWN, XW_SERVER_IS_DEC, XW_SERVER_IS_SUN, XW_SERVER_IS_SGI,
  XW_SERVER_IS_NEC, XW_SERVER_IS_HP
}

Functions

void _XInitImageFuncPtrs ()
XVisualInfo * Xw_get_visual_info ()
XVisualInfo * Xw_get_overlay_visual_info ()
XW_EXT_DISPLAYXw_get_display_structure ()
XW_EXT_DISPLAYXw_add_display_structure ()
XW_STATUS Xw_del_display_structure ()
XW_EXT_WINDOWXw_get_window_structure ()
XW_EXT_WINDOWXw_add_window_structure ()
XW_STATUS Xw_del_window_structure ()
XW_STATUS Xw_reset_attrib ()
XW_STATUS Xw_redraw_buffer ()
XW_STATUS Xw_update_buffer ()
XW_EXT_BUFFERXw_get_buffer_structure ()
XW_EXT_CHARXw_add_text_desc_structure ()
XW_STATUS Xw_del_text_desc_structure ()
XW_EXT_POINTXw_add_line_desc_structure ()
XW_STATUS Xw_del_line_desc_structure ()
XW_EXT_POINTXw_add_point_structure ()
XW_STATUS Xw_del_point_structure ()
void Xw_draw_pixel_points ()
XW_EXT_SEGMENTXw_add_segment_structure ()
XW_STATUS Xw_del_segment_structure ()
void Xw_draw_pixel_segments ()
XW_EXT_LINEXw_add_polyline_structure ()
XW_STATUS Xw_del_polyline_structure ()
void Xw_draw_pixel_lines ()
XW_EXT_ARCXw_add_arc_structure ()
XW_STATUS Xw_del_arc_structure ()
void Xw_draw_pixel_arcs ()
XW_EXT_ARCXw_add_polyarc_structure ()
XW_STATUS Xw_del_polyarc_structure ()
void Xw_draw_pixel_polyarcs ()
XW_EXT_POLYXw_add_polygone_structure ()
XW_STATUS Xw_del_polygone_structure ()
void Xw_draw_pixel_polys ()
XW_EXT_LTEXTXw_add_text_structure ()
XW_STATUS Xw_del_text_structure ()
void Xw_draw_pixel_texts ()
XW_EXT_PTEXTXw_add_polytext_structure ()
XW_STATUS Xw_del_polytext_structure ()
void Xw_draw_pixel_polytexts ()
XW_STATUS Xw_isdefine_markerindex ()
XW_EXT_LMARKERXw_add_lmarker_structure ()
XW_STATUS Xw_del_lmarker_structure ()
void Xw_draw_pixel_lmarkers ()
XW_EXT_PMARKERXw_add_pmarker_structure ()
XW_STATUS Xw_del_pmarker_structure ()
void Xw_draw_pixel_pmarkers ()
Colormap Xw_create_colormap ()
XW_EXT_COLORMAPXw_add_colormap_structure ()
XW_EXT_COLORMAPXw_get_colormap_structure ()
XW_STATUS Xw_del_colormap_structure ()
XW_STATUS Xw_get_color_attrib ()
XW_STATUS Xw_isdefine_colorindex ()
XW_STATUS Xw_ifsystem_colorindex ()
XW_STATUS Xw_ifimage_colorindex ()
XW_STATUS Xw_ifbackground_colorindex ()
XW_STATUS Xw_ifhighlight_colorindex ()
char * Xw_get_filename ()
XW_EXT_WIDTHMAPXw_add_widthmap_structure ()
XW_STATUS Xw_del_widthmap_structure ()
XW_STATUS Xw_isdefine_widthindex ()
XW_EXT_TYPEMAPXw_add_typemap_structure ()
XW_STATUS Xw_del_typemap_structure ()
XW_STATUS Xw_isdefine_typeindex ()
XW_EXT_FONTMAPXw_add_fontmap_structure ()
XW_STATUS Xw_del_fontmap_structure ()
XW_STATUS Xw_isdefine_fontindex ()
XW_EXT_TILEMAPXw_add_tilemap_structure ()
XW_STATUS Xw_del_tilemap_structure ()
XW_STATUS Xw_isdefine_tileindex ()
XW_EXT_MARKMAPXw_add_markmap_structure ()
XW_STATUS Xw_del_markmap_structure ()
XW_EXT_IMAGEDATAXw_add_imagedata_structure ()
XW_STATUS Xw_del_imagedata_structure ()
XW_EXT_IMAGEXw_add_image_structure ()
XW_STATUS Xw_del_image_structure ()
void Xw_draw_pixel_images ()
XW_STATUS Xw_set_internal_event ()
XW_STATUS Xw_alloc_color ()
int Xw_clip_segment ()
int Xw_test ()
int Xw_get_trace ()
void Xw_set_error ()
int Xw_error_handler ()
void Xw_set_synchronize ()
void Xw_longcopy ()
void Xw_shortcopy ()
void Xw_bytecopy ()
int PXPOINT ()
int PYPOINT ()
int PVALUE ()

Define Documentation

#define _ATTRIBUTES   pwindow->attributes
#define _BIMAGE   pwindow->qgwind.pimage
#define _BINDEX   pwindow->qgwind.cbufindex
#define _BMETHOD   pwindow->qgwind.method
#define _BPIXMAP   pwindow->qgwind.pixmap
#define _BUFFER (   index)    pwindow->qgwind.pbuflist[index]
#define _BWBUFFER   pwindow->wbuffers[1]
#define _CCLASS   (pcolormap->visual->class)
#define _CCOLORMAP   (pcolormap->connexion->colormap)
#define _CDISPLAY   (pcolormap->connexion->display)
#define _CGINFO   (pcolormap->ginfo)
#define _CINFO   (pcolormap->info)
#define _CLASS   (_VISUAL->class)
#define _COLORMAP   (pwindow->pcolormap)
#define _CROOT   (pcolormap->connexion->rootwindow)
#define _CSCREEN   (pcolormap->connexion->screen)
#define _CVISUAL   (pcolormap->visual)
#define _DCLASS   (pdisplay->visual->class)
#define _DCOLORMAP   pdisplay->colormap
#define _DDISPLAY   pdisplay->display
#define _DEPTH   (_ATTRIBUTES.depth)
#define _DGC   pdisplay->gc
#define _DGRAB   pdisplay->grabwindow
#define _DHEIGHT   pdisplay->height
#define _DISPLAY   (pwindow->connexion->display)
#define _DRAWABLE   pwindow->drawable
#define _DROOT   pdisplay->rootwindow
#define _DSCREEN   (pdisplay->screen)
#define _DVISUAL   (pdisplay->visual)
#define _DWIDTH   pdisplay->width
#define _EVENT_MASK   (_ATTRIBUTES.your_event_mask)
#define _FDISPLAY   (pfontmap->connexion->display)
#define _FONTMAP   (pwindow->pfontmap)
#define _FWBUFFER   pwindow->wbuffers[0]
#define _HEIGHT   (_ATTRIBUTES.height)
#define _ICOLORMAP   (pimage->pcolormap)
#define _IIMAGE   (pimage->pximage)
#define _IINFO   (pimage->pimageinfo)
#define _IVISUAL   (_ICOLORMAP->visual)
#define _MARKMAP   (pwindow->pmarkmap)
#define _MDISPLAY   (pmarkmap->connexion->display)
#define _NWBUFFER   pwindow->nwbuffer
#define _PDISPLAY   (ptilemap->connexion->display)
#define _PIXMAP   pwindow->pixmap
#define _ROOT   (_ATTRIBUTES.root)
#define _SCREEN   (_ATTRIBUTES.screen)
#define _STATE   (_ATTRIBUTES.map_state)
#define _TDISPLAY   (ptypemap->connexion->display)
#define _TILEMAP   (pwindow->ptilemap)
#define _TYPEMAP   (pwindow->ptypemap)
#define _VISUAL   (_ATTRIBUTES.visual)
#define _WDISPLAY   (pwidthmap->connexion->display)
#define _WIDTH   (_ATTRIBUTES.width)
#define _WIDTHMAP   (pwindow->pwidthmap)
#define _WINDOW   pwindow->window
#define _X   (_ATTRIBUTES.x)
#define _Y   (_ATTRIBUTES.y)
#define _ZIMAGE   (pimage->zximage)
#define BACKCOLOR   4 /* Background color Index if define[] = 4 */
#define COLORMAP_TYPE   2
#define DISPLAY_TYPE   0
#define DRAD   (M_PI/180.)
#define FONTMAP_TYPE   5
#define FRECOLOR   14
#define FREECOLOR   0 /* Free color Index if define[] = 0 */
#define HIGHCOLOR   3 /* HighLight color Index if define[] = 3 */
#define ICON_TYPE   10
#define IMAGE_TYPE   8
#define IMAGECOLOR   2 /* Image color Index if define[] = 2 */
#define MARKMAP_TYPE   7
#define max (   a,
  b 
)    (a<b ? b : a)
#define MAXANGLE   23040
#define MAXARCS   1024
#define MAXBUFFERS   8
#define MAXCHARS   1024
#define MAXCOLOR   512
#define MAXCURSOR   200
#define MAXEVENT   XW_ALLEVENT+1
#define MAXFONT   256
#define MAXIMAGES   8
#define MAXLINES   256
#define MAXLMARKERS   256
#define MAXLTEXTS   256
#define MAXMARKER   256
#define MAXPMARKERS   256
#define MAXPOINTS   1024
#define MAXPOLYS   256
#define MAXPTEXTS   256
#define MAXQG   32
#define MAXSEGMENTS   1024
#define MAXTILE   256
#define MAXTYPE   256
#define MAXWIDTH   256
#define min (   a,
  b 
)    (a>b ? b : a)
#define MINCOLOR   32
#define MINTEXTSIZE   8
#define MMPXVALUE (   v)    ((float)((v)*WidthMMOfScreen(_DSCREEN))/(float)_DWIDTH)
#define MMPYVALUE (   v)    ((float)((v)*HeightMMOfScreen(_DSCREEN))/(float)_DHEIGHT)
#define PMMXVALUE (   v)    ((int)((v)*_DWIDTH/(float)WidthMMOfScreen(_DSCREEN)))
#define PMMYVALUE (   v)    ((int)((v)*_DHEIGHT/(float)HeightMMOfScreen(_DSCREEN)))
#define PVALUE (   v)    ((int)((v) / ((pwindow->xratio+pwindow->yratio)/2.)))
#define PXPOINT (   x)    ((int)((x) / pwindow->xratio))
#define PYPOINT (   y)    ((int)(_HEIGHT - ((y) / pwindow->yratio)))
#define QGCODE (   color,
  type,
  width,
  mode 
)    ((color<<20)|(type<<12)|(width<<4)|mode)
#define QGCOLOR (   code)    ((code>>20)&0xFFF)
#define QGFONT (   code)    ((code>> 4)&0xFF)
#define QGMODE (   code)    (code&0xF)
#define QGSETCOLOR (   code,
  color 
)    ((code&0x000FFFFF)|(color<<20))
#define QGSETFONT (   code,
  font 
)    ((code&0xFFFFF00F)|(font<<4))
#define QGSETMODE (   code,
  mode 
)    ((code&0xFFFFFFF0)|mode)
#define QGSETTILE (   code,
  mark 
)    ((code&0xFFFFF00F)|(mark<<4))
#define QGSETTYPE (   code,
  type 
)    ((code&0xFFF00FFF)|(type<<12))
#define QGSETWIDTH (   code,
  width 
)    ((code&0xFFFFF00F)|(width<<4))
#define QGTILE (   code)    ((code>> 4)&0xFF)
#define QGTYPE (   code)    ((code>>12)&0xFF)
#define QGWIDTH (   code)    ((code>> 4)&0xFF)
#define ROUND (   v)
Value:
( ((v) > 0.) ? ((v) < (float)(INT_MAX-1)) ? \
                 (int)((v)+.5) : INT_MAX : ((v) > (float)(INT_MIN+1)) ? \
                 (int)((v)-.5) : INT_MIN )
#define SYSTEMCOLOR   5 /* System color Index if define[] = 5 */
#define TILEMAP_TYPE   6
#define TYPEMAP_TYPE   4
#define USERCOLOR   1 /* User color Index if define[] = 1 */
#define UVALUE (   v)    ((float)(v) * (pwindow->xratio+pwindow->yratio)/2.)
#define UXPOINT (   x)    ((float)(x) * pwindow->xratio)
#define UYPOINT (   y)    ((float)(_HEIGHT - (y)) * pwindow->yratio)
#define WIDTHMAP_TYPE   3
#define WINDOW_TYPE   1
#define Xw_calloc   calloc
#define Xw_free   free
#define Xw_malloc   malloc

Typedef Documentation

typedef XW_STATUS(* XW_ICALLBACK)()

Enumeration Type Documentation

Enumerator:
XW_SERVER_IS_UNKNOWN 
XW_SERVER_IS_DEC 
XW_SERVER_IS_SUN 
XW_SERVER_IS_SGI 
XW_SERVER_IS_NEC 
XW_SERVER_IS_HP 

Function Documentation

int PVALUE ( )
int PXPOINT ( )
int PYPOINT ( )
Colormap Xw_create_colormap ( )
char* Xw_get_filename ( )
XVisualInfo* Xw_get_overlay_visual_info ( )
XVisualInfo* Xw_get_visual_info ( )
int Xw_test ( )