ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OpenGLArea.c File Reference
#include "OpenGLAreaP.h"
#include <X11/StringDefs.h>
#include <GL/glx.h>
#include <stdio.h>
#include <stdlib.h>
+ Include dependency graph for OpenGLArea.c:

Go to the source code of this file.

Macros

#define athis   ((OpenGLAreaWidget)This)->openGLArea
 
#define acur   ((OpenGLAreaWidget)a_current)->openGLArea
 
#define CWarn   printf
 
#define CWarnF   printf
 
#define IFMOD(a_field)   if(athis.a_field != acur.a_field)
 

Functions

static void InitializeClass (void)
 
static void InitializeWidget (Widget, Widget, ArgList, Cardinal *)
 
static void RealizeWidget (Widget, XtValueMask *, XSetWindowAttributes *)
 
static void DestroyWidget (Widget)
 
static void ChangeWidgetSize (Widget)
 
static void DrawWidget (Widget, XEvent *, Region)
 
static Boolean SetValues (Widget, Widget, Widget, ArgList, Cardinal *)
 
static void EventHandler (Widget, XtPointer, XEvent *, Boolean *)
 
static int MakeCurrent (Widget)
 
static void XWidgetInstallColormap (Widget)
 
static void XWidgetUninstallColormap (Widget)
 
static Widget XWidgetGetShell (Widget)
 
void OpenGLAreaPaint (Widget This)
 
int OpenGLAreaWrite_gl2ps (Widget w, const char *f, const char *o)
 

Variables

static XtResource resources []
 
OpenGLAreaClassRec openGLAreaClassRec
 
WidgetClass openGLAreaWidgetClass = (WidgetClass) &openGLAreaClassRec
 

Macro Definition Documentation

#define acur   ((OpenGLAreaWidget)a_current)->openGLArea

Definition at line 36 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 36 of file OpenGLArea.c

Referenced by SetValues().

#define athis   ((OpenGLAreaWidget)This)->openGLArea

Definition at line 35 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 35 of file OpenGLArea.c

Referenced by DestroyWidget(), InitializeWidget(), MakeCurrent(), RealizeWidget(), and SetValues().

#define CWarn   printf

Definition at line 37 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 37 of file OpenGLArea.c

Referenced by InitializeWidget(), and SetValues().

#define CWarnF   printf

Definition at line 38 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 38 of file OpenGLArea.c

Referenced by XWidgetInstallColormap(), and XWidgetUninstallColormap().

#define IFMOD (   a_field)    if(athis.a_field != acur.a_field)

Definition at line 250 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 250 of file OpenGLArea.c

Referenced by SetValues().

Function Documentation

static void ChangeWidgetSize ( Widget  This)
static

Definition at line 269 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 269 of file OpenGLArea.c

References printf().

+ Here is the call graph for this function:

static void DestroyWidget ( Widget  This)
static

Definition at line 237 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 237 of file OpenGLArea.c

References athis, Acts::TrackStatePropMask::None, and XWidgetUninstallColormap().

+ Here is the call graph for this function:

static void DrawWidget ( Widget  This,
XEvent *  a_event,
Region  a_region 
)
static

Definition at line 283 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 283 of file OpenGLArea.c

References XoAnyCallbackStruct::event, MakeCurrent(), Acts::TrackStatePropMask::None, printf(), XoAnyCallbackStruct::reason, XoCR_PAINT, and XoNpaintCallback.

+ Here is the call graph for this function:

static void EventHandler ( Widget  This,
XtPointer  a_tag,
XEvent *  a_event,
Boolean *  a_continue 
)
static

Definition at line 407 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 407 of file OpenGLArea.c

References XoAnyCallbackStruct::event, XoAnyCallbackStruct::reason, XoCR_EVENT, and XoNeventCallback.

Referenced by InitializeWidget().

+ Here is the caller graph for this function:

static void InitializeClass ( void  )
static

Definition at line 102 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 102 of file OpenGLArea.c

static void InitializeWidget ( Widget  a_request,
Widget  This,
ArgList  a_args,
Cardinal *  a_argn 
)
static

Definition at line 104 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 104 of file OpenGLArea.c

References athis, CWarn, error, EventHandler(), L, Acts::TrackStatePropMask::None, and printf().

+ Here is the call graph for this function:

static int MakeCurrent ( Widget  This)
static

Definition at line 400 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 400 of file OpenGLArea.c

References athis.

Referenced by DrawWidget(), and OpenGLAreaPaint().

+ Here is the caller graph for this function:

void OpenGLAreaPaint ( Widget  This)

Definition at line 317 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 317 of file OpenGLArea.c

References XoAnyCallbackStruct::event, MakeCurrent(), Acts::TrackStatePropMask::None, XoAnyCallbackStruct::reason, XoCR_PAINT, and XoNpaintCallback.

+ Here is the call graph for this function:

int OpenGLAreaWrite_gl2ps ( Widget  w,
const char *  f,
const char *  o 
)

Definition at line 392 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 392 of file OpenGLArea.c

static void RealizeWidget ( Widget  This,
XtValueMask *  a_mask,
XSetWindowAttributes *  a_watbs 
)
static

Definition at line 213 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 213 of file OpenGLArea.c

References athis, printf(), and XWidgetInstallColormap().

+ Here is the call graph for this function:

static Boolean SetValues ( Widget  a_current,
Widget  a_request,
Widget  This,
ArgList  a_args,
Cardinal *  a_argn 
)
static

Definition at line 251 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 251 of file OpenGLArea.c

References acur, athis, CWarn, and IFMOD.

Widget XWidgetGetShell ( Widget  This)
static

Definition at line 518 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 518 of file OpenGLArea.c

Referenced by XWidgetInstallColormap(), and XWidgetUninstallColormap().

+ Here is the caller graph for this function:

static void XWidgetInstallColormap ( Widget  This)
static

Definition at line 419 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 419 of file OpenGLArea.c

References CWarnF, PHG4TpcDefs::Window, and XWidgetGetShell().

Referenced by RealizeWidget().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void XWidgetUninstallColormap ( Widget  This)
static

Definition at line 478 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 478 of file OpenGLArea.c

References CWarnF, PHG4TpcDefs::Window, and XWidgetGetShell().

Referenced by DestroyWidget().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

OpenGLAreaClassRec openGLAreaClassRec

Definition at line 49 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 49 of file OpenGLArea.c

WidgetClass openGLAreaWidgetClass = (WidgetClass) &openGLAreaClassRec

Definition at line 100 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 100 of file OpenGLArea.c

XtResource resources[]
static
Initial value:
= {
{XoNdoubleBufferOn,"DoubleBufferOn",XtRBoolean,sizeof(Boolean),
XtOffset(OpenGLAreaWidget,openGLArea.doubleBufferOn),XtRImmediate,(XtPointer)True},
{XoNpaintCallback,XtCCallback,XtRCallback,sizeof(XtCallbackList),
XtOffset(OpenGLAreaWidget,openGLArea.paintCallback),XtRImmediate,(XtPointer)NULL},
{XoNeventCallback,XtCCallback,XtRCallback,sizeof(XtCallbackList),
XtOffset(OpenGLAreaWidget,openGLArea.eventCallback),XtRImmediate,(XtPointer)NULL}
}

Definition at line 40 of file OpenGLArea.c.

View newest version in sPHENIX GitHub at line 40 of file OpenGLArea.c