Browse Source

prototypes

pre-master-46
h_vogt 16 years ago
parent
commit
6a7c0eb74d
  1. 3
      ChangeLog
  2. 50
      src/frontend/wdisp/windisp.c
  3. 2
      src/frontend/wdisp/windisp.h

3
ChangeLog

@ -1,3 +1,6 @@
2010-10-16 Holger Vogt
* windisp.h, windisp.c: prototypes
2010-10-16 Robert Larice 2010-10-16 Robert Larice
* configure.ac : * configure.ac :
stronger warning levels, redeclarations, missing prototypes, k&r style ... stronger warning levels, redeclarations, missing prototypes, k&r style ...

50
src/frontend/wdisp/windisp.c

@ -17,6 +17,7 @@
#include "fteext.h" #include "fteext.h"
#include "../plotting/graf.h" #include "../plotting/graf.h"
#include "../plotting/graphdb.h" #include "../plotting/graphdb.h"
#include "windisp.h"
/* /*
* The ngspice.h file included above defines BOOLEAN (via bool.h) and this * The ngspice.h file included above defines BOOLEAN (via bool.h) and this
@ -49,14 +50,19 @@ UINT uMsg, WPARAM wParam, LPARAM lParam);
void WPRINT_PrintInit( HWND hwnd); /* Windows printer init */ void WPRINT_PrintInit( HWND hwnd); /* Windows printer init */
void WaitForIdle(void); /* wait until no more events */ void WaitForIdle(void); /* wait until no more events */
static void WIN_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy); static void WIN_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy);
static void RealClose(void);
static LRESULT HcpyPlot( HWND hwnd);
static LRESULT HcpyPlotBW( HWND hwnd);
static LRESULT PrintPlot( HWND hwnd);
static LRESULT PrintInit( HWND hwnd);
//static void RealClose(void);
/* externals */ /* externals */
extern HINSTANCE hInst; /* application instance */ extern HINSTANCE hInst; /* application instance */
extern int WinLineWidth; /* width of text window */ extern int WinLineWidth; /* width of text window */
extern HWND swString; /* string input window of main window */ extern HWND swString; /* string input window of main window */
extern struct plot *plot_cur;
//extern struct plot *plot_cur;
extern int DevSwitch(char *devname); extern int DevSwitch(char *devname);
extern int NewViewport(GRAPH *pgraph); extern int NewViewport(GRAPH *pgraph);
extern void com_hardcopy(wordlist *wl);
/* defines */ /* defines */
#define RAD_TO_DEG (180.0 / M_PI) #define RAD_TO_DEG (180.0 / M_PI)
@ -100,7 +106,7 @@ WIN_Init() returns 0, if no error ocurred.
WIN_Init() does not yet open a window, this happens only in WIN_NewViewport() WIN_Init() does not yet open a window, this happens only in WIN_NewViewport()
******************************************************************************/ ******************************************************************************/
int WIN_Init( )
int WIN_Init(void)
{ {
char colorstring[BSIZE_SP]; char colorstring[BSIZE_SP];
@ -228,15 +234,15 @@ static int LType( int ColorIndex)
/* postscript hardcopy from a plot window */ /* postscript hardcopy from a plot window */
/* called by SystemMenue / Postscript hardcopy */ /* called by SystemMenue / Postscript hardcopy */
LRESULT HcpyPlot( HWND hwnd)
static LRESULT HcpyPlot( HWND hwnd)
{ {
int colorval = isblack? 0 : 1;
cp_vset("hcopypscolor", CP_NUM, &colorval);
com_hardcopy(NULL);
return 0;
int colorval = isblack? 0 : 1;
cp_vset("hcopypscolor", CP_NUM, &colorval);
com_hardcopy(NULL);
return 0;
} }
LRESULT HcpyPlotBW( HWND hwnd)
static LRESULT HcpyPlotBW( HWND hwnd)
{ {
int bgcolor; int bgcolor;
if (cp_getvar("hcopypscolor", CP_NUM, &bgcolor)) if (cp_getvar("hcopypscolor", CP_NUM, &bgcolor))
@ -248,7 +254,7 @@ LRESULT HcpyPlotBW( HWND hwnd)
/* print a plot window */ /* print a plot window */
/* called by SystemMenue / Print */ /* called by SystemMenue / Print */
LRESULT PrintPlot( HWND hwnd)
static LRESULT PrintPlot( HWND hwnd)
{ {
GRAPH * graph; GRAPH * graph;
GRAPH * temp; GRAPH * temp;
@ -293,7 +299,7 @@ PrintEND:
} }
/* initialze printer */ /* initialze printer */
LRESULT PrintInit( HWND hwnd)
static LRESULT PrintInit( HWND hwnd)
{ {
/* hand over to printer module */ /* hand over to printer module */
WPRINT_PrintInit(hwnd); WPRINT_PrintInit(hwnd);
@ -592,9 +598,9 @@ int WIN_NewViewport( GRAPH * graph)
/* change the background color of all windows (both new and already plotted) /* change the background color of all windows (both new and already plotted)
by assessing the registered window class */ by assessing the registered window class */
if (isblack) if (isblack)
SetClassLong(window, GCLP_HBRBACKGROUND, (int)GetStockObject( BLACK_BRUSH));
SetClassLong(window, GCLP_HBRBACKGROUND, (long)GetStockObject( BLACK_BRUSH));
else else
SetClassLong(window, GCLP_HBRBACKGROUND, (int)GetStockObject( WHITE_BRUSH));
SetClassLong(window, GCLP_HBRBACKGROUND, (long)GetStockObject( WHITE_BRUSH));
wd->wnd = window; wd->wnd = window;
@ -662,14 +668,14 @@ to the printer. Therefore WIN_Close is not allowed to do anything, cancelling
of the structures occurs at program termination. of the structures occurs at program termination.
******************************************************************************/ ******************************************************************************/
int WIN_Close()
int WIN_Close(void)
{ {
return (0); return (0);
} }
/*
static void RealClose(void) static void RealClose(void)
{ {
/* delete window class */
// delete window class
if (IsRegistered) { if (IsRegistered) {
if (TheWndClass.hIcon) { if (TheWndClass.hIcon) {
DestroyIcon( TheWndClass.hIcon); DestroyIcon( TheWndClass.hIcon);
@ -679,8 +685,8 @@ static void RealClose(void)
IsRegistered = FALSE; IsRegistered = FALSE;
} }
} }
int WIN_Clear()
*/
int WIN_Clear(void)
{ {
tpWindowData wd; tpWindowData wd;
if (!currentgraph) return 0; if (!currentgraph) return 0;
@ -863,7 +869,7 @@ int WIN_SetColor( int color)
return (0); return (0);
} }
int WIN_Update()
int WIN_Update(void)
{ {
tpWindowData wd; tpWindowData wd;
if (!currentgraph) return 0; if (!currentgraph) return 0;
@ -876,12 +882,12 @@ int WIN_Update()
wd->FirstFlag = 0; wd->FirstFlag = 0;
return 0; return 0;
} }
int WIN_DiagramReady()
/*
int WIN_DiagramReady(void)
{ {
return 0; return 0;
} }
*/
void RemoveWindow(GRAPH* dgraph) void RemoveWindow(GRAPH* dgraph)
{ {
tpWindowData wd; tpWindowData wd;

2
src/frontend/wdisp/windisp.h

@ -19,6 +19,6 @@ disp_fn_SetLinestyle_t WIN_SetLinestyle;
disp_fn_SetColor_t WIN_SetColor; disp_fn_SetColor_t WIN_SetColor;
disp_fn_Update_t WIN_Update; disp_fn_Update_t WIN_Update;
extern int WIN_DiagramReady();
//extern int WIN_DiagramReady();
#endif /* WINDISP_H */ #endif /* WINDISP_H */
Loading…
Cancel
Save