Commit Graph

  • 7621f53262 John's fix for the minimize/close/maximize controls no longer working. WIN32 expected us to pass the message on up the chain (or do something else with it), rather than just throwing away the event, for a certain class of events. (See the diffs for more details.) rkrolib 2003-11-10 18:19:53 +0000
  • b1c4e6beb8 A *.dsp file for CallbackMaker in the demos. rkrolib 2003-11-10 17:04:05 +0000
  • 6829d65fb3 New demo from John: CallbackMaker. rkrolib 2003-11-10 16:01:05 +0000
  • 9623350767 Hm. I thought that I already hit this file for style normalization. Oh well... Should be no functional changes. Should be pretty close to in-line with the style of changes that I've been making else- where. rkrolib 2003-11-10 10:00:21 +0000
  • 1023b7eb84 Ooops. Forgot that we already had a call to fgClearCallBacks() in the code and added a second one. I just deleted the new one. Sorry. rkrolib 2003-11-10 09:45:47 +0000
  • f02f918842 Added Nigel's suggested code to clear all but the destroy callback early on, leaving Destroy to be cleared later after the last possible point where it should be invoked. rkrolib 2003-11-10 09:42:14 +0000
  • 6230b2de2a Modified the menus to refer to {border} rather than {FREEGLUT_MENU_BORDER}, in fghDisplayMenuBox(). The local variable was already defined and used for some purposes, so we might as well use it throughout. It does serve to shorten and clarify the code a bit---though I have mixed feelings about creating aliases that way. rkrolib 2003-11-10 01:21:06 +0000
  • fb26d91989 Well, a couple of days have gone by, so I assume that items (a) and (b) in the freeglut_cursor.c file's "Open issues" comment are now satisfactor- ily closed. rkrolib 2003-11-10 00:32:15 +0000
  • 85e34f0062 Applied Braden McDaniel's non-srcdir build patch. cjp 2003-11-08 17:40:42 +0000
  • 6bf9d27035 A first pass over freeglut_menu.c to bring it in line with the rest of freeglut's style. Mostly re-indenting and splitting long lines. For those that may be concerned: No, I didn't do any more arrangments of the form (CONST == a) rather than (a == CONST). (^& rkrolib 2003-11-08 11:28:34 +0000
  • 9c070e4f9b Altered the way that the {random} value (from 0..3) is chosen. rkrolib 2003-11-08 01:56:45 +0000
  • acd65a4212 From John: rkrolib 2003-11-07 17:30:32 +0000
  • d7896b09ab Stripped out the now truly extraneous {braces} in such forms as: rkrolib 2003-11-07 15:50:56 +0000
  • 9108ab693f Adopted Eero Pajarre's suggestion of using a do { ... } while rather than { ... } for the INVOKE_WCB() macro. This lets it be used "more like a function", in that: rkrolib 2003-11-07 15:30:59 +0000
  • 711ab5fdac Pure code janitoring: Shuffled the order of some of the case statements in the UNIX_X11 X event processing loop. (In general, it's nice to have case statements sorted, especially when you have a *huge* switch statement like this. That makes it easier to find the one that you're looking for, and to see if a certain case is defined...) rkrolib 2003-11-07 10:32:38 +0000
  • 6f0ae8796a Combined EnterNotify and LeaveNotify event processing in the UNIX_X11 event loop. rkrolib 2003-11-07 10:26:37 +0000
  • 91a94e44bc Added ReparentNotify case to UNIX_X11 event loop, to catch the extraneous ReparentNotify event types (type 21). rkrolib 2003-11-07 10:22:31 +0000
  • 2ddf15c536 Oh well, I might as well add the call to clear callbacks on window destruction. Also renamed the function to do this: fgClearCallBacks(). Ho-hum. rkrolib 2003-11-07 10:18:10 +0000
  • 89cbd97e02 Added fgInitCallBacks() to freeglut_structure.c. (The function takes an {SFG_Window *}.) Added prototype to freeglut_internal.h. Added use of the function to the window initialization. (Don't count on calloc(), which sets all bits to 0.) rkrolib 2003-11-07 09:55:43 +0000
  • ca361547ec Style normalization; removal of say-nothing-useful comments. rkrolib 2003-11-07 08:46:53 +0000
  • 5621aa7fcb Normalized the style of freeglut_font.c No substantial alterations. rkrolib 2003-11-07 08:25:30 +0000
  • 85b7b49ead Somewhat normalized the style of this file. rkrolib 2003-11-07 08:06:10 +0000
  • d8b2c1d571 Further normalization of the code's style. No substantial changes. rkrolib 2003-11-07 07:57:03 +0000
  • e6b59a4b45 Split one last overlong line in freeglut_cursor.c. rkrolib 2003-11-07 07:48:13 +0000
  • 658305f2c9 Added GLUT_CURSOR_NONE support in UNIX_X11 (well, NetBSD; you lot need to try it on others; (^&). rkrolib 2003-11-07 07:46:08 +0000
  • d8f572533b Further normalized the style of the cursor code. rkrolib 2003-11-07 06:25:20 +0000
  • aeeabeff93 Slight style improvements. Two rules of thumb that are almost always good to apply: rkrolib 2003-11-07 06:12:58 +0000
  • 974e38bfbd Grr. Forgot to enable the "freeglut" C programming mode in EMACS, and had a few TABs in the last commit. This fixes that. Sorry. rkrolib 2003-11-07 05:46:33 +0000
  • 869780207d Minor corrections to the UNIX_X11 mouse-wheel support. In part this reflects that {button} is already shifted to the GLUT numbering, and hence should be counted as 3&4, 5&6, etc. rkrolib 2003-11-07 05:43:34 +0000
  • 2ff70b671c Ooops. I screwed up on part of John's fixes. Sorry. rkrolib 2003-11-06 23:40:21 +0000
  • 65dde7f632 Cleanup pass after committing callback conversion (from structure to array-of-pointers). Mostly deleted commented-out struct-based code. Also added some XXX comments that I though should be pondered. (My own pair of eyes, and one brain cell, were not sufficient at this time to decide what to do for those ponderables. (^&) rkrolib 2003-11-06 23:29:55 +0000
  • 80a523394c Converted the "Callbacks" structure (with named members holding individual callback pointers) to a "CallBacks" array in fgState. (This is to allow us to write a loop to clear all callbacks from windows when the window is dead/dying. Using this, we can safely assign NULL to each in a loop.) rkrolib 2003-11-06 22:09:35 +0000
  • b7dd45a935 From John, a couple of lines needed to be changed to fix the mouse wheel support on WIN32. rkrolib 2003-11-06 21:41:17 +0000
  • 406636047f Update from John: Includes mouse button, mouse motion, and mouse wheel support. rkrolib 2003-11-06 21:38:21 +0000
  • 0b588cdcb7 Multiple changes from John. Style issues, plus a bug-fix to check a pointer before deallocating some memory. rkrolib 2003-11-04 18:47:26 +0000
  • 585433d174 Some changes, mostly from John. Mostly style changes. rkrolib 2003-11-04 18:16:52 +0000
  • d5d4789b6b Per John's emailed desire to have all files obey UNIX EOL conventions, I have stripped out carriage returns from this file. rkrolib 2003-11-04 16:08:26 +0000
  • 3a18a26d74 Update from John: rkrolib 2003-11-04 15:53:49 +0000
  • 8df7ae3c29 Update from John: rkrolib 2003-11-04 15:32:57 +0000
  • cc38ef07e9 Got rid of the G_LOG_DOMAIN junk, per discussion on the mailing list. rkrolib 2003-11-04 01:30:32 +0000
  • 30a7dfb0c4 Minor formatting quibbles. (The brain isn't up to anything more serious at the moment.) rkrolib 2003-11-04 01:17:18 +0000
  • 2c356e1221 Missed a block where one level was 2-space indented. rkrolib 2003-11-04 01:10:13 +0000
  • 9b257588e0 Fixed a memory leak (thanks for the correction, John!). rkrolib 2003-11-03 21:41:07 +0000
  • 7c699fab2f Deleted 3 files (again?) from CVS, on John's request. Old/obsolete MSVC++ project files. (freeglut13.dsp, freeglutdll.dsp, freeglutstatic.dsw) rkrolib 2003-11-03 21:28:54 +0000
  • 5342fe966f * Indentation issues. * Pulled some common code into a nicely packaged function. * Found some pointer/int issues. rkrolib 2003-11-03 21:25:11 +0000
  • fa26d7b700 Heh. rkrolib 2003-11-03 10:56:48 +0000
  • cced36cf2b Extracted some common code to a subroutine, in glutMainLoopEvent(). (The common code was a snippet to compute X keyboard modifiers as a bit-mask of GLUT symbols.) rkrolib 2003-11-03 10:51:26 +0000
  • 9b944ec457 Caught a few more little style issues. rkrolib 2003-11-03 10:31:41 +0000
  • 2ab6b22f80 Added a "case" for an X event that we turn on but do not use. ({MapNotify}). We already caught {MappingNotify} and {UnmapNotify}. rkrolib 2003-11-03 10:29:30 +0000
  • 31c0809e28 * Fixed a bug in the X11 handling of scrollwheel/mouse. The old code, I believe, checked if *either* a wheel or button callback was set, and then decided which to use---and unconditionally called it. I left the "either" check in, but added additional checks before actually doing the invocation. * Lots of reformatting. Massive. The usual suspects, though, and fairly trivial: Re-indenting to standard size, shuffling some spaces to match the freeglut "standard" of: if( ... ) ...and: func( ... ) rkrolib 2003-11-03 10:05:07 +0000
  • 01dc2daa05 Cleaned up one macro definition. rkrolib 2003-10-31 20:51:56 +0000
  • d519c9292d Fit some long lines to 80 columns. rkrolib 2003-10-31 20:49:07 +0000
  • 02e53500a7 Last of the hard TABs in the src/*.c files. rkrolib 2003-10-31 13:40:08 +0000
  • c89d0c24d9 En masse removal of most (I think) of the remaining hard TABs in files. There are still a couple of files that need to be hit. rkrolib 2003-10-31 11:33:12 +0000
  • 5a1317c0f4 Picked up some stray TABs scattered in this file. rkrolib 2003-10-31 11:28:14 +0000
  • d1bfaa5c4b Noted by XXX comments that the XFlush() calls probably shouldn't be there. Flushing the X protocol stack every little bit both adds clutter to the code and may impede performance. rkrolib 2003-10-31 11:25:23 +0000
  • a92096db1a Polished off the say-nothing-new comments and lines-over-80-columns in freeglut_window.c rkrolib 2003-10-31 11:11:48 +0000
  • 350de30921 Missed a few say-nothing-new comments in fgOpenWindow(). Eeep. Should be better now. (^& rkrolib 2003-10-31 06:25:34 +0000
  • a1c14f4cf5 Cleansed fgCloseWindow(): * say-nothing-new comments axed. * de-TABbed. * Made the white-space to be consistant. rkrolib 2003-10-31 06:20:07 +0000
  • 6674df547f Cleaned up fgOpenWindow(): * Removed TABs. * Made indentation consistant. * Deleted say-nothing-new comments. * Changed an *error*check* from an assert to an if(). (The error-check was on window creation; we don't want to lose that if the user compiles with asserts deactivated. Also, assert()s really tell us more about programming errors, rather than run-time errors, so it is a little misleading to use assert() for error-checks, even if you can depend upon assert()s never being compiled away to null statements.) * Added some XXX comments for things that bear some rumination. rkrolib 2003-10-31 06:11:25 +0000
  • ba6ee1d34a Cleanup to fgSetWindow(). The usual suspects: * Removed tabs. * Made indentation consistant. * Killed off say-nothing-new comments. rkrolib 2003-10-31 05:34:19 +0000
  • 570e2aa0b6 Cleanup to fgSetupixelFormat(). Should be no functional changes. rkrolib 2003-10-31 04:25:34 +0000
  • 807042d126 There should be no changes to code functionality, though a fair bit of little changes to the code appearance. rkrolib 2003-10-31 03:37:27 +0000
  • 92b5fb9d59 Finished off most of the issues with freeglut_structure.c, from a stylistic point of view (at least, insofar as: The original file's code was INCON- SISTANT. I did not remove the "!= NULL" stuff, did not address the shortest-branch-first issue for if-else statements, and left some rather ugly "if (x) {... return y} /* else do this */ return NULL;" garbage. This should, I think, be re-written as "if (x) return y; else return NULL;" or even better, "ret = NULL; if (x) ret = y; return ret;" rkrolib 2003-10-30 04:43:08 +0000
  • 191ff25528 Eliminated most of the say-nothing-new comments. rkrolib 2003-10-30 04:36:54 +0000
  • 3eec065016 Forgot to set {direction} explicitly to +/- 1 for freeglut mouse-wheel API on MS-WINDOWS. Oops. rkrolib 2003-10-30 03:51:33 +0000
  • df711af72f Minor fix to allow for multiple ticks to be received at one time by the WIN32 code. Take abs(direction) as the number of ticks, and count it down. rkrolib 2003-10-30 03:20:24 +0000
  • c2f23f0bb2 Grrr. My attempt to commit got aborted, and the commit message was lost. Now I've lost track of what I said I'd done. Something like: rkrolib 2003-10-30 03:08:16 +0000
  • 2682a53352 There is a problem with the way I did glutFullscreen() in my last commit. So I've copied the way the game mode does it. It's not ideal but it works. The glutGet() for the window border sizes will also have to be fixed at some point. cjp 2003-10-29 23:01:56 +0000
  • 1ac66fba61 Rewrote glutFullscreen(). It now correctly places the window in X11. It now uses system dependant code for more efficient use of windowing system calls. cjp 2003-10-29 18:19:17 +0000
  • 3d344ad2de Should be no real changes to the code function. rkrolib 2003-10-29 18:05:48 +0000
  • 1b7f3df686 Should be entirely superficial changes to code style: rkrolib 2003-10-29 17:44:42 +0000
  • 126e447121 Added Thierry's change to include sys/param.h. This lets us pick out version numbers for OS releases corresponding to system headers. rkrolib 2003-10-29 17:29:10 +0000
  • faf725fe15 Deleted some say-nothing-new comments. rkrolib 2003-10-29 07:49:59 +0000
  • 4078f9a7a9 Deleted a bunch of say-nothing-new comments. Someday, there shall be an end to them. rkrolib 2003-10-29 07:18:10 +0000
  • b46806dc31 Previous changes were made without the freeglut major mode in EMACS. Re-tweaked some lines (mostly got rid of some TABs, but also resulted in some changed indentation). rkrolib 2003-10-29 07:13:55 +0000
  • 2abe3abee5 Rewrote the TODO BEFORE THE STABLE RELEASE comment to fit to 80 columns. rkrolib 2003-10-29 06:57:07 +0000
  • 3365de2c4a Got the last of the say-nothing-new comments in freeglut_misc.c. rkrolib 2003-10-29 06:43:32 +0000
  • 9da07cd41f * Fixed a bug that I introduced in fgWarning()/fgError(): I thought that ((a) || (b)) was defined to have value as: (a) if (a) != 0 (b) if (a) == 0 rkrolib 2003-10-29 06:40:51 +0000
  • 4672072aa7 Commit, mostly of work from John: rkrolib 2003-10-28 20:17:39 +0000
  • 12bdb86d17 Re-indentation style changes from John. rkrolib 2003-10-28 19:37:09 +0000
  • 6096e031d5 Converted a few "x != NULL" tests to "x" for clarity. rkrolib 2003-10-27 15:38:14 +0000
  • e4937ca1da Cleaned up a little redundancy in a comment on the {menu_pen_*} variables. rkrolib 2003-10-27 13:51:35 +0000
  • ffdfeec61e Removed about 90 lines of say-nothing-new comments. rkrolib 2003-10-27 13:47:55 +0000
  • 09d6d7342e Propogated a pointer-check from menu-attach to menu-detach. (Apparently, in some cases, the Menu member variable can be NULL.) rkrolib 2003-10-27 06:39:57 +0000
  • 763b02a955 Cosmetic changes (mostly deleted a few more say-nothing-new comments). The functionality of the code should be unchanged. rkrolib 2003-10-27 05:45:48 +0000
  • 914a40acb4 Changed an "#elif TARGET_HOST_UNIX_X11" to "#else", since this simply governed menu aesthetics. I think that it's better to have a default that works than to break completely, should freeglut ever be ported to a new (non-WIN32, non-UNIX/X11) target. rkrolib 2003-10-27 05:36:29 +0000
  • f5a588101e Minor modifications to the menus: rkrolib 2003-10-27 05:32:14 +0000
  • b906986ac4 Cleaned up glutMainLoop() a bit: rkrolib 2003-10-27 05:12:09 +0000
  • 4eeaaaa08c Partially (re-?)unified some of the glutMainLoopEvent() code. The only code that really needs to be system-specific is the window event handling, which in MS-WINDOWS is tucked into a separate function. In UNIX/X11, it's all spilled out into glutMainLoopEvent() for some reason. rkrolib 2003-10-27 05:03:31 +0000
  • 09723d91eb Moved the idle callback out of glutMainLoopEvent() and into glutMainLoop(), per discussion on the list. The code looks okay, to me, though I remain less than wholly convinced that treating idles as special cases is the best way to go. Still, a case can be made for taking "non-event" idle callbacks out of the "event loop". From an organizational perspective, I think that it's an improvement, and it fixes a bug for at least one program. rkrolib 2003-10-26 06:13:50 +0000
  • 9f78016727 Added John's text-positioning modification. rkrolib 2003-10-26 05:59:15 +0000
  • 1ea15ad9e1 Committed change from Nigel to fix the joystick bug. (The joystick code was not setting the GLUT window prior to calling callbacks.) rkrolib 2003-10-26 05:44:07 +0000
  • 9464f61d1f Superficial cleanup of the code. Mostly taking lines such as: rkrolib 2003-10-26 05:38:12 +0000
  • 14801c8908 Added some error-checking (particularly w.r.t. strdup()). rkrolib 2003-10-26 05:19:02 +0000
  • 6f7dc9821f Removed two more bogus "carriage return" references where the comments were in fact talking about a line feed (a.k.a. newline, LF, ^J, \n, ...). rkrolib 2003-10-26 04:44:43 +0000
  • 04c6d13777 Fixed the buglet about failing to report the program's name on error- messages. Please test. (Modified glutInit(), the state structure, and the warn/err functions.) rkrolib 2003-10-26 04:39:27 +0000
  • fb3db77b9a Released 2.0.1 puggles 2003-10-23 21:43:19 +0000
  • f0f690766a Added --disable-replace-glut option to autoconf configure. cjp 2003-10-21 11:41:54 +0000
  • 3a34c44f10 Noted the release of 2.0.0 puggles 2003-10-15 09:25:32 +0000