Commit Graph

52 Commits

Author SHA1 Message Date
Albrecht Schlosser 1fd6f0dd3a Fix STR 3458: "GLUT compatibility mode segfaults"
... "when there's no current window".

Silently ignore GLUT function calls that need a current window if the
current window is NULL, return 0 from functions that return an 'int'.

Check if window is shown in Fl_X11_Gl_Window_Driver::swap_buffers().
This would issue "XRequest.nnn: GLXBadDrawable 0x0" on X11 otherwise.

Note: the chosen implementation to ignore GLUT calls silently appears
to be compatible with GLUT (3.7) whereas FreeGLUT 3.0 would issue error
messages and exit. The latter could be implemented as well but would
be much more work.
2023-10-07 17:14:11 +02:00
Albrecht Schlosser 7b2c770ef7 Fix trailing comma in enums of public headers
Compiler warning: comma at end of enumerator list [-Wpedantic]

Note 1: I decided to fix these warnings although trailing commas in
enums are allowed at least since C++11.

Note 2: I fixed only public headers because these headers may be
compiled in user code. To do: check internal headers.
2023-04-13 20:14:36 +02:00
Matthias Melcher 2971625418 Add GLUT_ELAPSED_TIME simulation 2023-02-20 13:40:27 +01:00
Matthias Melcher 44c874b731
Use `FL_OVERRIDE` for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher
FL_OVERRIDE is defined as `override` for VisualC 2015 and newer
Don't interfere with Fl_Widget::override()
2022-12-30 19:14:36 +01:00
Albrecht Schlosser f09e17c3c5 Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files
- update .fl files and generated files accordingly
- replace 'http://www.fltk.org' URL's with 'https://...'
- replace bug report URL 'str.php' with 'bugs.php'
- remove trailing whitespace
- fix other whitespace errors flagged by Git
- add and/or fix missing or wrong standard headers
- convert tabs to spaces in all source files

The only relevant code changes are in the fluid/ folder where
some .fl files and other source files were used to generate
the '$Id' headers and footers.
2020-07-06 20:28:20 +02:00
Matthias Melcher 5cd9f6fb80 STR #3323: glutAddMenuEntry now has a const label argument 2019-02-02 22:16:16 +01:00
Greg Ercolano 87f339249a Fix for Brain Davis' bug report in fltk.general on 12/20/16.
Subject: Fl_Glut_Window::Fl_Glut_Window(int w, int h, const char *title = 0)... err huh well no, but it should be



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12151 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-12-20 23:27:29 +00:00
Albrecht Schlosser 1358c434b2 Rename misspelled files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12106 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-12 13:28:53 +00:00
Albrecht Schlosser 762df84207 Fix copyright and remove obsolete comment.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-03 11:04:43 +00:00
Albrecht Schlosser e11571a373 Fix compiler warning on Windows 64-bit (STR #2813).
Thanks to Csaba for finding this and providing a patch.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-04-03 10:57:33 +00:00
Fabien Costantini 822bc272fc Fixed linux 64 gcc 4.6.1 compilation problems
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9373 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 02:45:09 +00:00
Greg Ercolano 4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Albrecht Schlosser 3b76848435 Documentation updates, also fixing STR #2574, trying to make clear
which events invisible and inactive widgets can get.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8623 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-24 17:09:41 +00:00
Matthias Melcher e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Matthias Melcher 167d767e0f Changed the copyright to 2009 for header files. Still todo: src and test directory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 16:11:32 +00:00
Ian MacArthur cbfba6feca STR 1948: fix glutIdleFunc so that it does not use the deprecated Fl::set_idle method, and does not interact harmfully with other Fl::add/remove_idle() functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6525 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-11-13 19:42:45 +00:00
Fabien Costantini afd1767241 fixed a glut compilation pb.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6300 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-18 19:35:55 +00:00
Fabien Costantini e8478458bf Doxygen documentation: Fixed most important warnings for the Fl_Widget, Fl_Window, Fl_Valuator classes that should be now a 100% documented. For the rest I drastically reduced the undocumented APIs, but many others (less important) remains.
It looks and feels pretty good now :-)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-18 19:09:34 +00:00
Fabien Costantini e6652d845a Doxygen documentation increment 2: adding more classes, comments not referenced in original doc. hide public enter_(), exit_() functions, made friend Fl_Widget::tooltip(), these should not appear in the public member dox. documentation. added static variables initialisation to 0 in glut for msvc platform compilers."
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6261 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-15 20:56:17 +00:00
Matthias Melcher b6bde2e456 Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-10 23:56:49 +00:00
Matthias Melcher 5ba77af1ec Removed comment about limitations in Glut that were fixed by Mike a while ago (STR #1700)>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5889 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-06-07 17:28:43 +00:00
Matthias Melcher e52cb1cbb9 STR #1614: added missing FL_EXPORT to glutGet()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5715 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-25 00:05:06 +00:00
Michael R Sweet 85c2e38825 Update documentation and move glutDeviceGet() into code so we can return
the correct value for GLUT_NUM_MOUSE_BUTTONS.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5652 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-01 21:11:20 +00:00
Michael R Sweet bda374b386 Add GLUT support functions from FreeGLUT (STR #1522)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5650 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-01 18:10:07 +00:00
Matthias Melcher 2f4706602d Fixed ABI issue with const on glutCreateWindow.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5327 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-17 13:49:46 +00:00
Matthias Melcher c8288bd7b4 Added some GLUT4 functions (STR #1370)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5323 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-17 09:56:59 +00:00
Matthias Melcher ef48f007a1 Added missing const to GLUT call (STR #1371)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5321 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-17 09:05:44 +00:00
Michael R Sweet 1c399af444 Update source file headers with STR web page.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16 00:13:17 +00:00
Michael R Sweet add37faa25 Copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:55:12 +00:00
Michael R Sweet a3d0905c9e Copyright updates and prep for 1.1.5rc1.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11 04:39:01 +00:00
Michael R Sweet 70ca1d156b Fl_Value_Slider::draw_bg() didn't always apply the clipping
rectangle (STR #235)

fl_filename_relative() returned the wrong string if the absolute
pathname was equal to the current working directory (STR #224)

Fl_Help_Dialog didn't correctly restore the scroll position when
going forward/back in the link history if the file changed (STR
#218)

glutGetModifiers() did not mask off extra state bits, confusing
some GLUT-based applications (STR #213)

Fixed mouse capture problems on MacOS X (STR #209, STR #229)

Fl_Sys_Menu_Bar is now built into the library for MacOS X (STR
#229)

Fl_Menu_ now provides item_pathname() methods to get the
"pathname" of a menu item, e.g. "File/Quit" (STR #283)

Fl_Text_Display now provides cursor_color() methods to get and
set the cursor color (STR #271)

Fl_Scroll didn't honor FL_NO_BOX (STR #305)

FLUID declaration blocks didn't support public/private
definitions (STR #301)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-03-11 05:17:12 +00:00
Michael R Sweet 00cb676e11 Copyright update for 1.1.3 release (not quite yet, but soon...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30 21:46:07 +00:00
Michael R Sweet cd5c9b8743 OSX fixes for GLUT/GL window classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2859 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-12-04 04:44:54 +00:00
Michael R Sweet e136d5e145 More FL_EXPORT fun...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-08-14 16:49:38 +00:00
Michael R Sweet 98c9f2cc6b Stereo OpenGL patch from Stuart Levy...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-25 16:41:01 +00:00
Michael R Sweet 64b4177ef4 Copyright updates...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-01 15:11:33 +00:00
Bill Spitzak 97234fb3e2 Replaced remaining _WIN32 symbols with WIN32
Stuff from work:

Removed reference to unused GL/glu.h header file, which is missing on
some Linux systems.

Fl_Gl_Window has a new method to allow you to get and set the context:

  void Fl_Gl_Window::context(void*, int destroy = 0)
  void* Fl_Gl_Window::context() const;

  Return or set a pointer to the GLContext that this window is
  using. This is a system-dependent structure, but it is portable to
  copy the context from one window to another. You can also set it to
  NULL, which will force FLTK to recreate the context the next time
  make_current() is called, this is useful for getting around bugs in
  OpenGL implementations.

  If destroy_flag is true the context will be destroyed by fltk when
  the window is destroyed, or when the mode() is changed, or the next
  time context(x) is called.

Some cleanup of Fl_Gl_Choice to move most of the system dependent
#ifdefs into Fl_Gl_Choice.cxx.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1413 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-03-14 17:20:02 +00:00
Michael R Sweet 94788c4628 Copyright 2001.
FLTK 1.0.11.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-01-22 15:13:41 +00:00
Bill Spitzak f5375b6ab6 Fl_Gl_Window does not set drawbuffer(BACKBUFFER) for single-buffered
windows.

Fl_Input::replace(...) correctly updates the display if the replaced
region does not include the mark, point, or selected region.

Added Fl::add_check(...), Fl::remove_check, and Fl::has_check. These
are similar to idle callbacks but are only called just before it waits
for new events. They can be used to watch for changes in global state
and respond to them.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-12-12 08:57:30 +00:00
Michael R Sweet d244d063ff APIENTRY doesn't need to be used for the font pointers in glut.H
APIENTRY should appear between the return type and function name.

WIN32 is defined by MSVC++, not _WIN32.  Updated the sources to work
with both.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1343 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-12-06 15:45:13 +00:00
Bill Spitzak 45c06ba2c4 One more try to fix the APIENTRY stuff in glut.h. The file gl.h now
defines APIENTRY in all cases.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1339 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-11-28 15:32:07 +00:00
Bill Spitzak 2cbf4041b3 Does not clear Fl::keysym on every event, this makes better back compatability and fixes Win2000
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-10-21 20:01:56 +00:00
Bill Spitzak 12af974293 Another attempt to get glut.h to work on WIN32.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1315 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-10-17 07:30:22 +00:00
Bill Spitzak 4ab82443bd Added a bunch of missing FL_EXTERN's to glut.h (I have not really
tested this, but I believe this is why I keep getting mail about glut
not linking on win32.  If anybody can check this please do so!)

Fix for sliders so that clicking on one with a small (or zero)
slider_size will not move the slider.

I put Fl_Button.H in fl_shortcut.cxx so that it gets the FL_EXTERN for
fl_old_shortcut() (and also assures the declarations match).

Fixed xpaint link in the documentation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-15 05:37:40 +00:00
Michael R Sweet f87393aaa1 OK, now version 1.0.9
Updated email addresses to point to fltk.org domain...

Updated README and CHANGES files accordingly.

Updated makeinclude and Makefile files to put -L../lib before the
LDFLAGS/GLDFLAGS to avoid problem reported by Alexander.

documentation/Makefile wasn't including makeinclude.

Updated FLUID about window to show version 1.0.9.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-05 21:21:24 +00:00
Michael R Sweet 4b561b6e90 Updated copyright notices for all of the 1.0.x files.
Updated the configure script for *BSD and GCC 2.95 (-fno-exceptions)

Added install rule to documentation directory.

Dumped old packages directory; added traditional RPM spec file and EPM
list file (that replace all of the packages stuff)

The FLUID man page is now "fluid.1" for the formatted page and "fluid.man"
for the non-formatted page, since only IRIX uses pack'd formatted man pages.

Whew!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-04-25 22:17:00 +00:00
Michael R Sweet ca41e69c27 Updated headers to support WIN32 and OS/2 DLLs.
Updated VC++ project files.

Removed dummymain.c (no longer needed).


git-svn-id: file:///fltk/svn/fltk/trunk@278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-02-16 22:00:04 +00:00
Michael R Sweet 0a36d98420 Yay, change all copyright notices to be 1998-1999.
git-svn-id: file:///fltk/svn/fltk/trunk@201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-01-07 19:18:01 +00:00
Michael R Sweet 80b1529ef4 Multiple patches from Bill:
- Double-buffered window fixes.
  - Tabs fixes.
  - X/WIN32 fixes.
  - Fl_Input fixes.
  - Support for vsnprintf and friends.
  - Support for printf-style arguments in utility functions.


git-svn-id: file:///fltk/svn/fltk/trunk@52 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-11-05 16:04:53 +00:00
Michael R Sweet 7657a2e4a5 Fixed all the frigging file headings - was missing a $ in the Id string.
Applied some damage bit fixes from Bill Spitzak.


git-svn-id: file:///fltk/svn/fltk/trunk@28 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-21 14:21:44 +00:00