summaryrefslogtreecommitdiff
path: root/src/scrollbar.c
Commit message (Collapse)AuthorAgeFilesLines
* src/*.c, Eterm.spec: Various build fixesMichael Jennings2020-02-281-1/+1
| | | | | | | | | | | | | | | Several changes here to make it build on RHEL/CentOS 8: - Replace outdated MEMSET() macro with (g)libc memset() - Update Release field to use `git describe` just like LibAST - Fix `make distcheck` by adding an uninstall-hook for src/gdb.scr - At long last, remove the ancient RPM %changelog content - Fix incompatibility with my traditional choices for CFLAGS (-O0 -g3) and modern RHEL security/hardening goop which, due to being implemented in the GCC optimizer, is rendered non-functional by building with -O0! - Rename backgrounds tarball so that it doesn't have the Eterm version in its name since, shockingly, it never changes based on the version of Eterm!
* Revert and re-apply badnull patchLucas De Marchi2010-08-261-1/+1
| | | | | | | | | | | Revert previous patch generated by badnull.cocci script, and apply the new one. The main difference is that assert and assert-like functions are not touched anymore. SVN revision: 51650
* Revert coccinelle changes.Michael Jennings2010-08-231-1/+1
| | | | | | | | | | Using !! instead of != NULL results in significantly and unacceptably less readable code, and I refuse to accept those changes. Unfortunately, since they were all done at once, I have to revert the whole thing. Oh well. :( SVN revision: 51583
* Convert (hopefully) all comparisons to NULLLucas De Marchi2010-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply badzero.cocci, badnull.coci and badnull2.cocci This should convert all cases where there's a comparison to NULL to simpler forms. This patch applies the following transformations: code before patch ||code after patch =============================================================== return a == NULL; return !a; return a != NULL; return !!a; func(a == NULL); func(!a); func(a != NULL); func(!!a); b = a == NULL; b = !a; b = a != NULL; b = !!a; b = a == NULL ? c : d; b = !a ? c : d; b = a != NULL ? c : d; b = a ? c : d; other cases: a == NULL !a a != NULL a SVN revision: 51487
* Tue Jan 6 01:08:47 2009 Michael Jennings (mej)Michael Jennings2009-01-061-1/+1
| | | | | | | | Update copyright dates and fix a bad license. ---------------------------------------------------------------------- SVN revision: 38480
* Mon Feb 13 14:51:56 2006 Michael Jennings (mej)Michael Jennings2006-02-131-1/+1
| | | | | | | | Update to libast 0.6+ API. ---------------------------------------------------------------------- SVN revision: 20440
* Wed Jan 4 04:22:13 2006 Michael Jennings (mej)Michael Jennings2006-01-041-1/+1
| | | | | | | | Update copyright dates. ---------------------------------------------------------------------- SVN revision: 19522
* Mon Apr 18 21:49:08 2005 Michael Jennings (mej)Michael Jennings2005-04-191-55/+71
| | | | | | | | Re-indent code. ---------------------------------------------------------------------- SVN revision: 14229
* Fri Jun 25 17:48:24 2004 Michael Jennings (mej)Michael Jennings2004-06-251-1/+2
| | | | | | | | | | Chris Schoeneman <crs23@bigfoot.com> pointed out that Eterm didn't get keypresses if another app (like synergy) decided to listen for its events. This should correct that behavior. ---------------------------------------------------------------------- SVN revision: 10583
* Sun Jan 11 17:09:07 2004 Michael Jennings (mej)Michael Jennings2004-01-111-1/+1
| | | | | | | It's too bad you can't just say, "Copyright 1997-2999." SVN revision: 8349
* Sun Aug 24 11:07:54 2003 Michael Jennings (mej)Michael Jennings2003-08-241-8/+8
| | | | | | | | | | | | I redid the options variables and constants to try and make things more standardized, and to make room for future toggles as well. This should make David Lloyd a bit happier, 'cause now we can get his patch in here. :) Hopefully I didn't break anything.... SVN revision: 7370
* Thu Aug 21 23:51:12 2003 Michael Jennings (mej)Michael Jennings2003-08-221-8/+8
| | | | | | | Oops, that wasn't *quite* what I had in mind.... SVN revision: 7362
* Thu Aug 21 23:18:23 2003 Michael Jennings (mej)Michael Jennings2003-08-221-8/+8
| | | | | | | | A few cosmetic changes to the source code, and a fix for Debian Bug #176274 reported by Gerhard Tonn <GerhardTonn@gammatau.de>. SVN revision: 7361
* Wed Feb 19 16:17:00 2003 Michael Jennings (mej)Michael Jennings2003-02-191-1/+1
| | | | | | | Updated copyright statements for 2003. SVN revision: 6698
* Sun Jul 14 00:49:34 2002 Michael Jennings (mej)Michael Jennings2002-07-141-2/+7
| | | | | | | | | Fixed bug pointed out by JC Wong <catalyst@gmx.net> where resizing a window which had had transparency toggled on would reveal a black spot at the bottom of the scrollbar. SVN revision: 6340
* Sat Jun 8 11:41:37 2002 Michael Jennings (mej)Michael Jennings2002-06-081-2/+2
| | | | | | | Escreen update with Twin support from Azundris <scream@azundris.com>. SVN revision: 6307
* Sun Jun 2 20:23:07 2002 Michael Jennings (mej)Michael Jennings2002-06-031-24/+20
| | | | | | | Latest Escreen patch along with twin support from Azundris. SVN revision: 6297
* Sat May 4 10:23:38 2002 Michael Jennings (mej)Michael Jennings2002-05-041-754/+777
| | | | | | | | | | | Ran reformat-code on the tree. Also merged in Azundris' Escreen patch. It's disabled by default for the moment pending further testing, but you can enable it manually by defining ESCREEN. SVN revision: 6202
* Sun Feb 3 15:51:38 2002 Michael Jennings (mej)Michael Jennings2002-02-031-1/+1
| | | | | | | Apparently I forgot to commit these copyright date changes. :( SVN revision: 5895
* Wed Jun 13 21:13:51 PDT 2001 Michael Jennings <mej@eterm.org>Michael Jennings2001-06-141-1/+1
| | | | | | | | | | | | | There is now a new mechanism for dealing with the background image collection, including a new update script. Please read the newly- rewritten bg/README.backgrounds for details. Also, I'm trying to flesh out the Contributors list in that file, but my memory isn't cooperating. So if you contributed one of the backgrounds, or know someone who did, please let me know. SVN revision: 4810
* Mon Jun 11 17:49:55 PDT 2001 Michael Jennings <mej@eterm.org>Michael Jennings2001-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Okay, first off, I removed 3 scaled backgrounds. See www.kainx.org or my post to enlightenment-devel for details. Second, I redid the default bindings for the mouse wheel. Basically, the wheel alone will scroll by pages. Ctrl+wheel will scroll by pages in groups of 5. Shift+wheel will scroll by a single line. If you hold down the Alt key, the same combinations will work the same way, but instead of scrolling within Eterm, they'll scroll the application in the terminal (by sending PgUp/PgDn and up/down arrows). This works in less, bash, and any other application which groks those keys. I also added a --without-mousewheel option to configure that will turn off the default scrollwheel bindings. Of course, you can always use action bindings in the config file to bind/rebind these any way you like. While I was at it, I found and fixed a bug in the handling of the Alt and Meta keys. I added a scroll() function to the script stuff which allows you to bind keys/buttons to scroll up and down. While I was at it, I added comments to script.c for each function you can use. And finally, the config file parser was moved to libast. SVN revision: 4806
* Mon Oct 30 07:45:16 PST 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-10-301-9/+15
| | | | | | | | | | | | | Several small changes, like freeing pixmaps which won't be needed later, reducing the default Imlib2 cache size to 0 bytes (we don't really use it well), and an image path bugfix spotted by Teodor Zlatanov <tzz@iglou.com>. The big change, of course, is the disappearance of libmej and the new dependency on libast, which is now distributed separately. SVN revision: 3793
* Sun Sep 17 18:54:26 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-09-181-1/+2
| | | | | | | | Fixed XErrors caused by calling XTranslateCoordinates with a pixmap. This was visible using the glass theme. SVN revision: 3522
* Sun Sep 17 17:29:26 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-09-181-4/+4
| | | | | | | Got rid of the useless backing_store option. SVN revision: 3520
* Fri Sep 1 21:03:53 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-09-021-9/+9
| | | | | | | | | | | | | I'm working on some deallocators now. The idea is that when Eterm exits and memory debugging is on, several routines get called to free the in-use memory (menus, font cache, etc.) that we still know about. Anything left after that would be either unavoidable leaks (like environment variables...read the putenv() man page sometime...sigh) or genuine memory leaks that need fixing. I'm down to about 4.5K of leftover malloc'd memory now. Making progress.... SVN revision: 3295
* Thu Aug 31 23:02:10 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-09-011-5/+5
| | | | | | | | Still more big changes. Working on adding pixmap and GC tracking to libmej using the existing allocation tracking routines. SVN revision: 3291
* Wed Aug 30 22:58:18 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-08-311-4/+1
| | | | | | | | | Massive reorganization/rewrite to libmej. It should now be 100% independent of Eterm. There still may be some gremlins in the memory debugging code, so don't use too high a number with --debug.... SVN revision: 3282
* Tue Aug 22 21:21:20 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-08-231-0/+13
| | | | | | | | | | Color modifiers for images now work once again. Please report any problems you find with them as soon as possible; I want to get 0.9.1 out the door in the fairly near future since the TODO list for 0.9.2 is already sizeable. SVN revision: 3241
* Sun May 28 14:45:03 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-05-281-5/+5
| | | | | | | | | | | | | | | | | My attempt to track down the strange X errors have revealed that a pixmap given to me by Imlib2 is getting freed somehow behind my back. Probably because this part of Imlib2 hadn't been tested before Eterm was converted. =P It doesn't seem to happen in XFree86 4.0; I'm wondering if XFree 4 is smart enough to detect double-frees of old XID's and just ignore them? Well, I'm going to have to add some debugging code to Imlib2 and see if I can track down where it's freeing my pixmaps. But I have some errands to run first, so I'm going to commit this for now. It shouldn't actually change any functionality. SVN revision: 2722
* Tue May 2 16:56:47 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-05-021-0/+2
| | | | | | | | | | | | | | | After getting sick of hearing people whining about the obscure error messages that resulted from trying to build without pixmap support, I hacked it until it at least built without it. I also added warnings to configure.in so that people would know if that happened. It's still not very happy running that way, which is something I need to fix. But hopefully it will stop the whining. Yeah, right. =P SVN revision: 2590
* Wed Apr 12 21:18:19 PDT 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-04-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial commit with Imlib2 support. READ THIS CAREFULLY. There is important information in this commit message that will keep you from getting screwed. First off, support for Imlib 1.x is GONE. It is no longer supported as of now. If you want to continue using it, do NOT install this version. I tried to support both for awhile, but the code ended up being way too ugly and hackish. Imlib2 is the future. And trust me, when you see what we do with this future, you'll be happy for the switch. The good news is that most of the basics work. Transparency still works, and the basic image stuff works. Most users won't notice any major problems, so long as your Imlib2 is 100% up-to-date. However, a few things still don't work: 1. Auto mode is a bit broken. You'll get X errors in XFree86 4.0. Don't use it if you're running XFree 4. 2. Color modifiers for images don't work. At all. 3. Transparency shading/tinting will not work in 8bpp or lower. Life blows sometimes. Sorry. Time for a real video card. :-) 4. The built-in icon is broken. 5. You WILL need to update your theme.cfg files. The borders on the horizontal and vertical bar images were incorrect when combined with the new anti-aliased scaling. The horizontal bars should have a right border of 3. Vertical bars should have a bottom border of 3. The menu images should have both right *and* bottom borders of 3. You can either make those changes by hand, or use the --with-theme-update option to autogen.sh. Your call. I think that covers everything I've run into. I will point out that I don't really take advantage of a lot of the Imlib2 features just yet. My first priority is to make all the stuff that worked before work again (or at least the important stuff). Then I'll work on new features. So there it is. If you're not ready for it, don't use it. But if you are, I hope you like it. SVN revision: 2478
* Tue Feb 15 19:31:04 PST 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-02-161-5/+7
| | | | | | | | | | | | | | | | | The buttonbar can now be toggled on and off both in the config file and via an escape sequence. The themes in CVS use Ctrl-Shift-Button3. You can also specify in the config file whether to dock the buttonbar at the top or the bottom of the Eterm window. You can't move it on the fly yet, but that will come. I also fixed resizing so that the term window didn't redraw itself unnecessarily. Hopefully I didn't break anything in the process. :-) Plus, I fixed poor handling of X-generated ConfigureNotify events, and the terminfo stuff is now done at install time instead of build time. SVN revision: 2077
* Thu Feb 10 15:10:01 PST 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-02-111-21/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first public availability of the work thus far on Eterm 0.9.1. There's quite a bit of new stuff here. * Added scrollbar thumb support. * Completely redid the terminfo/termcap stuff. The terminfo file is now compiled (by tic) and installed by default (unless you specify --without-terminfo). The config files still say xterm, though, because some programs (like SLang and GNU mc) use the silly algorithm of "Is $TERM set to xterm?" to detect mouse reporting support in a terminal. =P But if you don't ever use xterm, you can use Eterm's termcap and just name it "xterm" instead. Thanks to Marius Gedminas <mgedmin@takas.lt> for his patch that started this whole revamp. * Added the kEsetroot script for KDE users from Dax Games <dgames@isoc.net>. * You can now configure the Home and End emulation via --with-home= and --with-end= options to configure. The --with-terminfo option is also new, and --enable-xim is now the default. * Added a new image state, disabled, for when Eterm loses focus. This is supported by all widgets (well, all those that could possibly be on screen when Eterm lost focus), even the background image. So you could actually have all your images darken on focus out and restore to normal on focus in. * Widget colors formerly dealt with as colors (menu text color, scrollbar color, etc.) are now handled by the imageclasses. Each image state can have a foreground and background color defined. The current exception is the background image; I hope to add that later. The foreground is the text color and the background is the object color (for solid color mode). So menu text color is set by the menu imageclass. And again, for unfocused colors, use the disabled state of the imageclass. * Proportionally-spaced fonts are now handled much better. They are still forced into evenly-spaced columns (it's a terminal for crying out loud!) but at least you don't end up with Eterm's wider than your screen. :-) * Home on refresh is gone, as is home on echo. It's now much simpler. There are two options: home on output, and home on input, the former being a combination of echo and refresh. Also, keypresses that don't necessarily have corresonding output can trigger a home on input, like Ctrl-End or whatever...ones that don't have special meaning. Credit to Darren Stuart Embry <dse@louisville.edu> for pointing out this issue and the one with "m-" in font names. * I finally got around to re-merging the new parser stuff from my work on the Not Game. Closed up some old potential behavior quirks with theme parsing. * Added a new escape sequence to fork-and-exec a program. Also added a scrollback search capability to highlight all occurances of a string in your scrollback buffer. Use the new "Etsearch" utility to access it. "Etsearch string" to search for a string, then "Etsearch" by itself to reset the highlighting. * And of course, the biggie. Eterm now supports a completely- customizeable buttonbar. Not a menubar, a buttonbar. It can have an arbitrary number of buttons, and each button can perform an action, just like a menuitem. So a button could bring up a menu (like a menubar) or launch a program (like a launchbar) or perform an operation (like a toolbar). Each button can have an icon, text, or both. And you can have buttons left- or right-justified in the buttonbar. You will eventually be able to have an arbitrary number of buttonbars, but I'm still working on that. As with any change this big, things could very easily be broken. So beware. :-) I have tested this myself, and everything seems to work, but I can't test every possibility. Let me know if you find anything that's broken, and enjoy! SVN revision: 2048
* Fri Jan 21 12:52:26 PST 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-01-211-2/+1
| | | | | | | | Fixed an off-by-one error in the scrollbar click-handling pointed out by Malcolm Tredinnick <malcolmt@smart.net.au>. SVN revision: 1958
* Wed Jan 5 21:23:56 PST 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-01-051-1/+1
| | | | | | | Copyright date updates. SVN revision: 1860
* Mon Jan 3 12:47:59 PST 2000 Michael Jennings <mej@eterm.org>Michael Jennings2000-01-031-22/+0
| | | | | | | | Fixed the bug with a solid scrollbar not updating colors when the focus changed. Pointed out by cirin <stevenr@houston.rr.com>. SVN revision: 1824
* Fri Nov 19 18:43:58 PST 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-11-201-3/+32
| | | | | | | | Fixed some other stuff I found, and cleaned up the remaining occurances of calls to the old scrollbar_show() function. SVN revision: 1343
* Fri Nov 19 16:55:22 PST 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-11-191-19/+21
| | | | | | | | | Okay, I think I have everything back in working order. PLEASE test this thoroughly, as an awful lot has changed. Let me know what I broke. :) SVN revision: 1339
* Thu Nov 18 21:47:02 PST 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-11-191-615/+610
| | | | | | | | | | I've rewritten almost the entire scrollbar. It mostly works, but it still has issues. I've put an #error directive in so that it won't compile; take it out if you *really* wanna try it. It's much more efficient than before. SVN revision: 1333
* Fri Nov 12 19:37:35 PST 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-11-131-3/+58
| | | | | | | | | | | | | | | | Okay, I've fixed a lot here. First off, I fixed the bug Gnea <gnea@rochester.rr.com> pointed out with toggling Max Size in E. Turned out to be a symptom of a much larger problem, but it should be fixed now. Then I corrected the XIM issues pointed out by Sung-Hyun Nam <namsh@lgic.co.kr> and Jerome De Greef <jerome_degreef@hotmail.com>, as well as a stupid typo on my part that Jerome happened upon. Next I fixed the bug Adam Lucas <ALucas@wcom.net> spotted with changing the scrollbar type. While fixing that, I also fixed changing the scrollbar width. Both operations are a lot smoother and cleaner now. SVN revision: 1292
* Tue Nov 2 16:53:56 PST 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-11-021-3/+11
| | | | | | | | | | Several bugs fixed here, most notably a potential seg fault in Esetroot, and remembering an Eterm's size works again. Also a minor redraw speedup. And %exec() now works properly instead of just causing Eterm to crash. :-) SVN revision: 1153
* Fri Oct 29 16:43:19 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now apply additional color modifiers to the various widgets in transparent mode that further modify the background. So, in other words, you could have a scrollbar anchor that, in the normal state, is darker than the transparent background, and in selected/clicked state, is brighter. Or any variation on that theme. :-) Once you've got this version going, try the following changes to your trans theme's config file: begin image type anchor mode trans allow image trans auto state normal file bar_vertical_1.png geom :scale border 3 3 2 2 cmod image 192 bevel up 1 1 1 1 state selected file bar_vertical_2.png geom :scale border 3 3 2 2 cmod image 320 bevel up 1 1 1 1 end image You'll see what I'm talking about. :-) SVN revision: 1043
* Thu Oct 28 13:12:17 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-281-40/+44
| | | | | | | | | | | | | | I fixed the popup scrollbar bug with transparency, but I fixed lots more than that. I removed a lot of duplicate event handling, lots of duplicate redraws, and lots of unnecessary transparency updates. In doing so, I fixed the latency problem people had been reporting with several shaded/tinted transparent Eterms while changing desktops. I also threw solid color transparency support in the mix while I was at it. All in all, you should notice significant speedups in transparent Eterms. SVN revision: 1031
* Wed Oct 27 18:46:04 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-271-8/+9
| | | | | | | | | | | Fixed lots of issues revealed by the -ansi -pedantic flags. The only warnings you get with those flags now are implicit declaration warnings for non-ANSI functions and warnings specific to certain OS's and their non-ANSI implementations of ANSI functions, neither of which I can do much about. :-) SVN revision: 1010
* Wed Oct 27 14:11:11 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-271-9/+9
| | | | | | | 64-bit cleanliness changes. SVN revision: 998
* Tue Oct 12 16:24:20 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-121-0/+3
| | | | | | | | Fixed a scrollbar refresh bug pointed out by Sung-Hyun Nam <namsh@lgic.co.kr>. SVN revision: 802
* Mon Oct 11 15:54:52 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-111-15/+32
| | | | | | | | | | Lots of cleanups here, including a couple fixes for bugs noticed by Tom Gilbert <gilbertt@tomgilbert.freeserve.co.uk> and Martin Tyler <martin@boo.org>. Also removed the requirement of glibc 2.1 for using SVR4-style pty's (/dev/pts/*) under Linux. SVN revision: 798
* Thu Oct 7 18:48:31 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-071-2/+2
| | | | | | | | | Shaved off around 100 KB of memory usage per Eterm by moving more code into the shared library, removing lots of unneeded variables, and fixing some small leaks here and there. SVN revision: 710
* Thu Oct 7 16:39:48 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-071-4/+4
| | | | | | | | raster pointed out that the "clicked" image for the scrollbar anchor wasn't working. It is now. :-) SVN revision: 707
* Thu Oct 7 16:12:38 PDT 1999 Michael Jennings <mej@eterm.org>Michael Jennings1999-10-071-7/+24
| | | | | | | | | | | | | | | | | | | | | | | Auto mode has been fixed to work with the newest E. If you don't have the newest E, it won't work. So don't bug me about it; just upgrade. Your version of E must be dated October 7th or later, or all bets are off. I also cleaned up some stuff to save lots of unnecessary redraws and (if you're in auto mode) E IPC transactions. A bug in the value set for $IFS was also fixed. Thanks to Kimball Thurston <kimball@sgrail.com> for pointing out my oversight. Furthermore, I added a parameter to the --enable-multi-charset option for configure. You can now specify =utf-8 to get UTF-8 fonts for the multi-byte mode stuff. If you pass =kanji (or no value at all), you will still get the old Kanji fonts. If you use multi-byte Eterm and have a set of fonts for other setups (Big 5, Cyrillic, etc.), please let me know and I'll add a parameter for those too. SVN revision: 706