7621f53262John'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
b1c4e6beb8A *.dsp file for CallbackMaker in the demos.
rkrolib
2003-11-10 17:04:05 +0000
6829d65fb3New demo from John: CallbackMaker.
rkrolib
2003-11-10 16:01:05 +0000
9623350767Hm. 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
1023b7eb84Ooops. 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
f02f918842Added 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
6230b2de2aModified 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
fb26d91989Well, 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
6bf9d27035A 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
9c070e4f9bAltered the way that the {random} value (from 0..3) is chosen.
rkrolib
2003-11-08 01:56:45 +0000
d7896b09abStripped out the now truly extraneous {braces} in such forms as:
rkrolib
2003-11-07 15:50:56 +0000
9108ab693fAdopted 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
711ab5fdacPure 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
6f0ae8796aCombined EnterNotify and LeaveNotify event processing in the UNIX_X11 event loop.
rkrolib
2003-11-07 10:26:37 +0000
91a94e44bcAdded ReparentNotify case to UNIX_X11 event loop, to catch the extraneous ReparentNotify event types (type 21).
rkrolib
2003-11-07 10:22:31 +0000
2ddf15c536Oh 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
89cbd97e02Added 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
ca361547ecStyle normalization; removal of say-nothing-useful comments.
rkrolib
2003-11-07 08:46:53 +0000
5621aa7fcbNormalized the style of freeglut_font.c No substantial alterations.
rkrolib
2003-11-07 08:25:30 +0000
85b7b49eadSomewhat normalized the style of this file.
rkrolib
2003-11-07 08:06:10 +0000
d8b2c1d571Further normalization of the code's style. No substantial changes.
rkrolib
2003-11-07 07:57:03 +0000
e6b59a4b45Split one last overlong line in freeglut_cursor.c.
rkrolib
2003-11-07 07:48:13 +0000
658305f2c9Added 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
d8f572533bFurther normalized the style of the cursor code.
rkrolib
2003-11-07 06:25:20 +0000
aeeabeff93Slight style improvements. Two rules of thumb that are almost always good to apply:
rkrolib
2003-11-07 06:12:58 +0000
974e38bfbdGrr. 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
869780207dMinor 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
2ff70b671cOoops. I screwed up on part of John's fixes. Sorry.
rkrolib
2003-11-06 23:40:21 +0000
65dde7f632Cleanup 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
80a523394cConverted 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
b7dd45a935From 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
406636047fUpdate from John: Includes mouse button, mouse motion, and mouse wheel support.
rkrolib
2003-11-06 21:38:21 +0000
0b588cdcb7Multiple 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
d5d4789b6bPer 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
3a18a26d74Update from John:
rkrolib
2003-11-04 15:53:49 +0000
8df7ae3c29Update from John:
rkrolib
2003-11-04 15:32:57 +0000
cc38ef07e9Got rid of the G_LOG_DOMAIN junk, per discussion on the mailing list.
rkrolib
2003-11-04 01:30:32 +0000
30a7dfb0c4Minor formatting quibbles. (The brain isn't up to anything more serious at the moment.)
rkrolib
2003-11-04 01:17:18 +0000
2c356e1221Missed a block where one level was 2-space indented.
rkrolib
2003-11-04 01:10:13 +0000
9b257588e0Fixed a memory leak (thanks for the correction, John!).
rkrolib
2003-11-03 21:41:07 +0000
7c699fab2fDeleted 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
cced36cf2bExtracted 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
9b944ec457Caught a few more little style issues.
rkrolib
2003-11-03 10:31:41 +0000
2ab6b22f80Added 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
01dc2daa05Cleaned up one macro definition.
rkrolib
2003-10-31 20:51:56 +0000
d519c9292dFit some long lines to 80 columns.
rkrolib
2003-10-31 20:49:07 +0000
02e53500a7Last of the hard TABs in the src/*.c files.
rkrolib
2003-10-31 13:40:08 +0000
c89d0c24d9En 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
5a1317c0f4Picked up some stray TABs scattered in this file.
rkrolib
2003-10-31 11:28:14 +0000
d1bfaa5c4bNoted 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
a92096db1aPolished off the say-nothing-new comments and lines-over-80-columns in freeglut_window.c
rkrolib
2003-10-31 11:11:48 +0000
350de30921Missed a few say-nothing-new comments in fgOpenWindow(). Eeep. Should be better now. (^&
rkrolib
2003-10-31 06:25:34 +0000
a1c14f4cf5Cleansed fgCloseWindow(): * say-nothing-new comments axed. * de-TABbed. * Made the white-space to be consistant.
rkrolib
2003-10-31 06:20:07 +0000
6674df547fCleaned 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
ba6ee1d34aCleanup to fgSetWindow(). The usual suspects: * Removed tabs. * Made indentation consistant. * Killed off say-nothing-new comments.
rkrolib
2003-10-31 05:34:19 +0000
570e2aa0b6Cleanup to fgSetupixelFormat(). Should be no functional changes.
rkrolib
2003-10-31 04:25:34 +0000
807042d126There 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
92b5fb9d59Finished 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
191ff25528Eliminated most of the say-nothing-new comments.
rkrolib
2003-10-30 04:36:54 +0000
3eec065016Forgot to set {direction} explicitly to +/- 1 for freeglut mouse-wheel API on MS-WINDOWS. Oops.
rkrolib
2003-10-30 03:51:33 +0000
df711af72fMinor 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
c2f23f0bb2Grrr. 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
2682a53352There 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
1ac66fba61Rewrote 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
3d344ad2deShould be no real changes to the code function.
rkrolib
2003-10-29 18:05:48 +0000
1b7f3df686Should be entirely superficial changes to code style:
rkrolib
2003-10-29 17:44:42 +0000
126e447121Added 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
faf725fe15Deleted some say-nothing-new comments.
rkrolib
2003-10-29 07:49:59 +0000
4078f9a7a9Deleted a bunch of say-nothing-new comments. Someday, there shall be an end to them.
rkrolib
2003-10-29 07:18:10 +0000
b46806dc31Previous 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
2abe3abee5Rewrote the TODO BEFORE THE STABLE RELEASE comment to fit to 80 columns.
rkrolib
2003-10-29 06:57:07 +0000
3365de2c4aGot 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
4672072aa7Commit, mostly of work from John:
rkrolib
2003-10-28 20:17:39 +0000
12bdb86d17Re-indentation style changes from John.
rkrolib
2003-10-28 19:37:09 +0000
6096e031d5Converted a few "x != NULL" tests to "x" for clarity.
rkrolib
2003-10-27 15:38:14 +0000
e4937ca1daCleaned up a little redundancy in a comment on the {menu_pen_*} variables.
rkrolib
2003-10-27 13:51:35 +0000
ffdfeec61eRemoved about 90 lines of say-nothing-new comments.
rkrolib
2003-10-27 13:47:55 +0000
09d6d7342ePropogated 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
763b02a955Cosmetic 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
914a40acb4Changed 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
f5a588101eMinor modifications to the menus:
rkrolib
2003-10-27 05:32:14 +0000
b906986ac4Cleaned up glutMainLoop() a bit:
rkrolib
2003-10-27 05:12:09 +0000
4eeaaaa08cPartially (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
09723d91ebMoved 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
1ea15ad9e1Committed 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
9464f61d1fSuperficial cleanup of the code. Mostly taking lines such as:
rkrolib
2003-10-26 05:38:12 +0000
14801c8908Added some error-checking (particularly w.r.t. strdup()).
rkrolib
2003-10-26 05:19:02 +0000
6f7dc9821fRemoved 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
04c6d13777Fixed 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