Skip to content
Snippets Groups Projects
Commit dadc6031 authored by birken's avatar birken
Browse files

new structure for graphics. adapted to structure in dev. added

preliminary support for covise interface.

[[Imported from SVN: r4530]]
parent 3aac9188
No related branches found
No related tags found
No related merge requests found
......@@ -10,10 +10,20 @@
# include configuration and all makefile macro definitions
include ../ug.conf
OBJECTS = graphics.o
# local C compiler flags
LCFLAGS = -I../include
# $(GRAPE) is set to ON or OFF in ug.conf
all: $(GRAPE) UGGRAPH
all: $(OBJECTS) $(GRAPE) UGGRAPH $(COVISE_TARGET)
$(ARCH_AR) $(ARCH_ARFLAGS) ../lib/libug$(DIM).a $(OBJECTS)
.c.o:
$(ARCH_CC) $(UG_CFLAGS) $(LCFLAGS) $<
ar: $(GRAPE)
cd uggraph; make -f Makefile.uggraph ar; cd ..;
......@@ -30,7 +40,15 @@ OFF:
cd grape; make -f Makefile.grape; cd ..;
COVISE_ON:
echo "creating covise-if"
cd covise; make -f Makefile.covise; cd ..;
COVISE_OFF:
clean:
rm -f *.o
cd uggraph; make -f Makefile.uggraph clean; cd ..;
cd grape; make -f Makefile.grape clean; cd ..;
......@@ -39,3 +57,4 @@ extract:
cd grape; make -f Makefile.grape extract; cd ..;
xmc: extract all clean
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
/****************************************************************************/
/* */
/* File: graphics.c */
/* */
/* Purpose: common functions for graphical interfaces */
/* */
/* Author: Stefan Lang, Klaus Birken */
/* Institut fuer Computeranwendungen III */
/* Universitaet Stuttgart */
/* Pfaffenwaldring 27 */
/* 70569 Stuttgart */
/* email: ug@ica3.uni-stuttgart.de */
/* */
/* History: 971216 begin */
/* */
/* Remarks: */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* include files */
/* system include files */
/* application include files */
/* */
/****************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
/* low module */
#include "compiler.h"
/*
#include "fileopen.h"
#include "misc.h"
#include "ugenv.h"
#include "defaults.h"
#include "debug.h"
#include "ugstruct.h"
*/
#include "general.h"
/* gm module */
#include "gm.h"
#include "uggraph/initgraph.h"
#ifdef _COVISE
#include "covise/coviseif.h"
#endif
/****************************************************************************/
/* */
/* defines in the following order */
/* */
/* compile time constants defining static data size (i.e. arrays) */
/* other constants */
/* macros */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* data structures used in this source file (exported data structures are */
/* in the corresponding include file!) */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* definition of exported global variables */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* definition of variables global to this source file only (static!) */
/* */
/****************************************************************************/
/* RCS string */
static char RCS_ID("$Header$",UG_RCS_STRING);
/****************************************************************************/
/* */
/* forward declarations of functions used before they are defined */
/* */
/****************************************************************************/
/****************************************************************************/
/*D
InitGraphics - Initialize all graphical interfaces at startup
SYNOPSIS:
INT InitGraphics (void);
DESCRIPTION:
This function initializes all graphical interfaces at startup.
It must be extended when a new graphical interfaces is added.
RETURN VALUE:
INT
.n 0 if ok
.n 1 if some error occured.
D*/
/****************************************************************************/
INT InitGraphics (void)
{
INT error;
/* init UG-graphics */
error = InitUGGraph();
if (error!=0)
return(error);
#ifdef _COVISE
/* init Covise interface */
error = InitCoviseIF();
if (error!=0)
return(error);
#endif
return(0); /* no error */
}
INT ExitGraphics (void)
{
INT error;
#ifdef _COVISE
/* close Covise interface */
error = ExitCoviseIF();
if (error!=0)
return(error);
#endif
return(0); /* no error */
}
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
/****************************************************************************/
/* */
/* File: graphics.h */
/* */
/* Purpose: implements a simple but portable graphical user interface */
/* */
/* Author: Stefan Lang, Klaus Birken */
/* Institut fuer Computeranwendungen III */
/* Universitaet Stuttgart */
/* Pfaffenwaldring 27 */
/* 70569 Stuttgart */
/* email: ug@ica3.uni-stuttgart.de */
/* */
/* History: 971216 begin */
/* */
/* Remarks: */
/* */
/****************************************************************************/
/* RCS_ID
$Header$
*/
/****************************************************************************/
/* */
/* auto include mechanism and other include files */
/* */
/****************************************************************************/
#ifndef __GRAPHICS_H__
#define __GRAPHICS_H__
#include <stdio.h>
#ifndef __COMPILER__
#include "compiler.h"
#endif
#ifndef __UGENV__
#include "ugenv.h"
#endif
/****************************************************************************/
/* */
/* constants */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* macros */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* data types */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* function exported by this module */
/* */
/****************************************************************************/
/* initialization and clean up */
INT InitGraphics (void);
INT ExitGraphics (void);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment