diff --git a/FL/glut.H b/FL/glut.H index 9e727d6f6..3ab680519 100644 --- a/FL/glut.H +++ b/FL/glut.H @@ -1,5 +1,5 @@ // -// "$Id: glut.H,v 1.6.2.6 2000/11/28 15:32:07 spitzak Exp $" +// "$Id: glut.H,v 1.6.2.7 2000/12/06 15:45:12 easysw Exp $" // // GLUT emulation header file for the Fast Light Tool Kit (FLTK). // @@ -428,14 +428,14 @@ FL_EXPORT int glutBitmapWidth(void *font, int character); extern "C" { -extern APIENTRY int glutExtensionSupported(char *name); +extern int APIENTRY glutExtensionSupported(char *name); /* Stroke font opaque addresses (use constants instead in source code). */ -extern APIENTRY void *glutStrokeRoman; -extern APIENTRY void *glutStrokeMonoRoman; +extern void *glutStrokeRoman; +extern void *glutStrokeMonoRoman; /* Stroke font constants (use these in GLUT program). */ -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) # define GLUT_STROKE_ROMAN ((void*)0) # define GLUT_STROKE_MONO_ROMAN ((void*)1) #else @@ -444,33 +444,33 @@ extern APIENTRY void *glutStrokeMonoRoman; #endif /* GLUT font sub-API */ -extern APIENTRY void glutStrokeCharacter(void *font, int character); -extern APIENTRY int glutStrokeWidth(void *font, int character); +extern void APIENTRY glutStrokeCharacter(void *font, int character); +extern int APIENTRY glutStrokeWidth(void *font, int character); /* GLUT pre-built models sub-API */ -extern APIENTRY void glutWireSphere(GLdouble radius, GLint slices, GLint stacks); -extern APIENTRY void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); -extern APIENTRY void glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -extern APIENTRY void glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); -extern APIENTRY void glutWireCube(GLdouble size); -extern APIENTRY void glutSolidCube(GLdouble size); -extern APIENTRY void glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -extern APIENTRY void glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); -extern APIENTRY void glutWireDodecahedron(); -extern APIENTRY void glutSolidDodecahedron(); -extern APIENTRY void glutWireTeapot(GLdouble size); -extern APIENTRY void glutSolidTeapot(GLdouble size); -extern APIENTRY void glutWireOctahedron(); -extern APIENTRY void glutSolidOctahedron(); -extern APIENTRY void glutWireTetrahedron(); -extern APIENTRY void glutSolidTetrahedron(); -extern APIENTRY void glutWireIcosahedron(); -extern APIENTRY void glutSolidIcosahedron(); +extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); +extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); +extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +extern void APIENTRY glutWireCube(GLdouble size); +extern void APIENTRY glutSolidCube(GLdouble size); +extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +extern void APIENTRY glutWireDodecahedron(); +extern void APIENTRY glutSolidDodecahedron(); +extern void APIENTRY glutWireTeapot(GLdouble size); +extern void APIENTRY glutSolidTeapot(GLdouble size); +extern void APIENTRY glutWireOctahedron(); +extern void APIENTRY glutSolidOctahedron(); +extern void APIENTRY glutWireTetrahedron(); +extern void APIENTRY glutSolidTetrahedron(); +extern void APIENTRY glutWireIcosahedron(); +extern void APIENTRY glutSolidIcosahedron(); } #endif /* __glut_h__ */ // -// End of "$Id: glut.H,v 1.6.2.6 2000/11/28 15:32:07 spitzak Exp $". +// End of "$Id: glut.H,v 1.6.2.7 2000/12/06 15:45:12 easysw Exp $". // diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx index 17eb82376..e50721cbc 100644 --- a/src/Fl_Gl_Overlay.cxx +++ b/src/Fl_Gl_Overlay.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.12 2000/09/15 07:52:51 spitzak Exp $" +// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.13 2000/12/06 15:45:12 easysw Exp $" // // OpenGL overlay code for the Fast Light Tool Kit (FLTK). // @@ -34,7 +34,7 @@ #if HAVE_GL_OVERLAY -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(WIN32) // Methods on Fl_Gl_Window that create an overlay window. Because // many programs don't need the overlay, this is seperated into this @@ -122,7 +122,7 @@ int Fl_Gl_Window::can_do_overlay() {return 0;} void Fl_Gl_Window::make_overlay() { if (!overlay) { #if HAVE_GL_OVERLAY -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) HDC hdc = fl_private_dc(this, mode_,&g); GLXContext context = wglCreateLayerContext(hdc, 1); if (context) { // we found a usable overlay context @@ -172,7 +172,7 @@ void Fl_Gl_Window::make_overlay() { void Fl_Gl_Window::redraw_overlay() { if (!shown()) return; make_overlay(); -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(WIN32) if (overlay != this) ((Fl_Gl_Window*)overlay)->redraw(); else @@ -184,7 +184,7 @@ void Fl_Gl_Window::make_overlay_current() { make_overlay(); #if HAVE_GL_OVERLAY if (overlay != this) { -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) fl_set_gl_context(this, (GLXContext)overlay); // if (fl_overlay_depth) // wglRealizeLayerPalette(Fl_X::i(this)->private_dc, 1, TRUE); @@ -198,7 +198,7 @@ void Fl_Gl_Window::make_overlay_current() { void Fl_Gl_Window::hide_overlay() { #if HAVE_GL_OVERLAY -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) // nothing needs to be done? Or should it be erased? #else if (overlay && overlay!=this) ((Fl_Gl_Window*)overlay)->hide(); @@ -209,5 +209,5 @@ void Fl_Gl_Window::hide_overlay() { #endif // -// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.12 2000/09/15 07:52:51 spitzak Exp $". +// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.13 2000/12/06 15:45:12 easysw Exp $". // diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 7cecd53e8..f04cb7e7c 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Window.cxx,v 1.12.2.17 2000/09/15 07:52:51 spitzak Exp $" +// "$Id: Fl_Gl_Window.cxx,v 1.12.2.18 2000/12/06 15:45:13 easysw Exp $" // // OpenGL window code for the Fast Light Tool Kit (FLTK). // @@ -63,7 +63,7 @@ int Fl_Gl_Window::can_do(int a, const int *b) { } void Fl_Gl_Window::show() { -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(WIN32) if (!shown()) { if (!g) { g = Fl_Gl_Choice::find(mode_,alist); @@ -78,7 +78,7 @@ void Fl_Gl_Window::show() { void Fl_Gl_Window::invalidate() { valid(0); -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(WIN32) if (overlay) ((Fl_Gl_Window*)overlay)->valid(0); #endif } @@ -86,7 +86,7 @@ void Fl_Gl_Window::invalidate() { int Fl_Gl_Window::mode(int m, const int *a) { if (m == mode_ && a == alist) return 0; mode_ = m; alist = a; -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) // destroy context and g: if (shown()) {hide(); show();} #else @@ -104,7 +104,7 @@ int Fl_Gl_Window::mode(int m, const int *a) { void Fl_Gl_Window::make_current() { if (!context) { -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) context = wglCreateContext(fl_private_dc(this, mode_,&g)); if (fl_first_context) wglShareLists(fl_first_context, (GLXContext)context); else fl_first_context = (GLXContext)context; @@ -115,7 +115,7 @@ void Fl_Gl_Window::make_current() { valid(0); } fl_set_gl_context(this, (GLXContext)context); -#if defined(_WIN32) && USE_COLORMAP +#if (defined(_WIN32) || defined(WIN32)) && USE_COLORMAP if (fl_palette) { fl_GetDC(fl_xid(this)); SelectPalette(fl_gc, fl_palette, FALSE); @@ -142,7 +142,7 @@ void Fl_Gl_Window::ortho() { } void Fl_Gl_Window::swap_buffers() { -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) #if HAVE_GL_OVERLAY // Do not swap the overlay, to match GLX: wglSwapLayerBuffers(Fl_X::i(this)->private_dc, WGL_SWAP_MAIN_PLANE); @@ -161,14 +161,14 @@ int fl_overlay_depth = 0; void Fl_Gl_Window::flush() { uchar save_valid = valid_; -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) // SGI 320 messes up overlay with user-defined cursors: bool fixcursor = Fl_X::i(this)->cursor && Fl_X::i(this)->cursor != fl_default_cursor; if (fixcursor) SetCursor(0); #endif -#if HAVE_GL_OVERLAY && defined(_WIN32) +#if HAVE_GL_OVERLAY && (defined(_WIN32) || defined(WIN32)) // Draw into hardware overlay planes: if (overlay && overlay != this && (damage()&(FL_DAMAGE_OVERLAY|FL_DAMAGE_EXPOSE) || !save_valid)) { @@ -228,7 +228,7 @@ void Fl_Gl_Window::flush() { static Fl_Gl_Window* ortho_window = 0; int init = !ortho_context; if (init) { -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) ortho_context = wglCreateContext(Fl_X::i(this)->private_dc); #else ortho_context =glXCreateContext(fl_display,g->vis,fl_first_context,1); @@ -274,7 +274,7 @@ void Fl_Gl_Window::flush() { } -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) if (fixcursor) SetCursor(Fl_X::i(this)->cursor); #endif valid(1); @@ -283,7 +283,7 @@ void Fl_Gl_Window::flush() { void Fl_Gl_Window::resize(int X,int Y,int W,int H) { if (W != w() || H != h()) { valid(0); -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(WIN32) if (!resizable() && overlay && overlay != this) ((Fl_Gl_Window*)overlay)->resize(0,0,W,H); #endif @@ -295,7 +295,7 @@ void Fl_Gl_Window::hide() { if (context) { fl_no_gl_context(); if (context != fl_first_context) { -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) wglDeleteContext((GLXContext)context); #else glXDestroyContext(fl_display, (GLXContext)context); @@ -308,7 +308,7 @@ void Fl_Gl_Window::hide() { //#endif context = 0; } -#if HAVE_GL_OVERLAY && defined(_WIN32) +#if HAVE_GL_OVERLAY && (defined(_WIN32) || defined(WIN32)) if (overlay && overlay != this && (GLXContext)overlay != fl_first_context) { wglDeleteContext((GLXContext)overlay); overlay = 0; @@ -337,5 +337,5 @@ void Fl_Gl_Window::draw_overlay() {} #endif // -// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.17 2000/09/15 07:52:51 spitzak Exp $". +// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.18 2000/12/06 15:45:13 easysw Exp $". // diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx index b2e7721b8..53b51b495 100644 --- a/src/Fl_compose.cxx +++ b/src/Fl_compose.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_compose.cxx,v 1.1.2.4 2000/06/05 21:21:00 mike Exp $" +// "$Id: Fl_compose.cxx,v 1.1.2.5 2000/12/06 15:45:13 easysw Exp $" // // Character compose processing for the Fast Light Tool Kit (FLTK). // @@ -30,7 +30,7 @@ static const char* const compose_pairs = "`A'A^A~A:A*AAE,C`E'E^E:E`I'I^I:I-D~N`O'O^O~O:Ox O/`U'U^U:U'YTHss" "`a'a^a~a:a*aae,c`e'e^e:e`i'i^i:i-d~n`o'o^o~o:o-:o/`u'u^u:u'yth:y"; -#ifndef _WIN32 // X only +#if !defined(_WIN32) && !defined(WIN32) // X only // X dead-key lookup table. This turns a dead-key keysym into the // first of two characters for one of the compose sequences. These // keysyms start at 0xFE50. @@ -113,7 +113,7 @@ int Fl::compose(int& del) { return 1; } -#ifndef _WIN32 // X only +#if !defined(_WIN32) && !defined(WIN32) // X only // See if they typed a dead key. This gets it into the same state as // typing prefix+accent: if (i >= 0xfe50 && i <= 0xfe5b) { diff --git a/src/fl_file_chooser.cxx b/src/fl_file_chooser.cxx index 1dc390ce3..22f55bdf3 100644 --- a/src/fl_file_chooser.cxx +++ b/src/fl_file_chooser.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_file_chooser.cxx,v 1.10.2.6 2000/08/20 04:35:16 spitzak Exp $" +// "$Id: fl_file_chooser.cxx,v 1.10.2.7 2000/12/06 15:45:13 easysw Exp $" // // File chooser widget for the Fast Light Tool Kit (FLTK). // @@ -231,7 +231,7 @@ int FCB::get(char* buf) { for (dirent** r = q+1; n && r < last; r++) { if (!item_height(*r, 0)) continue; int i; -#ifdef _WIN32 +#if defined(_WIN32) || defined(WIN32) for (i=0; id_name[i])==tolower((*r)->d_name[i]); i++) {} #else for (i=0; id_name[i]==(*r)->d_name[i]; i++) {} @@ -632,5 +632,5 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname) } // -// End of "$Id: fl_file_chooser.cxx,v 1.10.2.6 2000/08/20 04:35:16 spitzak Exp $". +// End of "$Id: fl_file_chooser.cxx,v 1.10.2.7 2000/12/06 15:45:13 easysw Exp $". //