1999-11-18 20:05:24 -08:00
|
|
|
/*
|
2009-01-06 01:08:48 -08:00
|
|
|
* Copyright (C) 1997-2009, Michael Jennings
|
1999-08-17 16:01:18 -07:00
|
|
|
*
|
1999-11-18 20:05:24 -08:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to
|
|
|
|
* deal in the Software without restriction, including without limitation the
|
|
|
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
|
|
* sell copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
1999-08-17 16:01:18 -07:00
|
|
|
*
|
1999-11-18 20:05:24 -08:00
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies of the Software, its documentation and marketing & publicity
|
|
|
|
* materials, and acknowledgment shall be given in the documentation, materials
|
|
|
|
* and software packages that this Software was used.
|
1999-08-17 16:01:18 -07:00
|
|
|
*
|
1999-11-18 20:05:24 -08:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1999-08-17 16:01:18 -07:00
|
|
|
*/
|
|
|
|
|
2003-08-21 21:09:40 -07:00
|
|
|
#ifndef _OPTIONS_H_
|
|
|
|
#define _OPTIONS_H_
|
1999-08-17 18:12:47 -07:00
|
|
|
|
1999-08-17 16:01:18 -07:00
|
|
|
#include <X11/Xfuncproto.h>
|
|
|
|
#include <X11/Intrinsic.h> /* Xlib, Xutil, Xresource, Xfuncproto */
|
|
|
|
|
1999-08-17 18:12:47 -07:00
|
|
|
/************ Macros and Definitions ************/
|
2003-08-24 08:09:32 -07:00
|
|
|
# define VT_OPTIONS_CONSOLE (1LU << 0)
|
|
|
|
# define VT_OPTIONS_VISUAL_BELL (1LU << 1)
|
|
|
|
# define VT_OPTIONS_MAP_ALERT (1LU << 2)
|
|
|
|
# define VT_OPTIONS_REVERSE_VIDEO (1LU << 3)
|
|
|
|
# define VT_OPTIONS_META8 (1LU << 4)
|
|
|
|
# define VT_OPTIONS_HOME_ON_OUTPUT (1LU << 5)
|
|
|
|
# define VT_OPTIONS_HOME_ON_INPUT (1LU << 6)
|
|
|
|
# define VT_OPTIONS_REPORT_AS_KEYSYMS (1LU << 7)
|
|
|
|
# define VT_OPTIONS_PROPORTIONAL (1LU << 8)
|
|
|
|
# define VT_OPTIONS_SECONDARY_SCREEN (1LU << 9)
|
2003-08-25 18:45:11 -07:00
|
|
|
# define VT_OPTIONS_OVERSTRIKE_BOLD (1LU << 10)
|
|
|
|
# define VT_OPTIONS_BOLD_BRIGHTENS_FOREGROUND (1LU << 11)
|
|
|
|
# define VT_OPTIONS_BLINK_BRIGHTENS_BACKGROUND (1LU << 12)
|
|
|
|
# define VT_OPTIONS_COLORS_SUPPRESS_BOLD (1LU << 13)
|
2008-05-14 14:54:45 -07:00
|
|
|
# define VT_OPTIONS_URG_ALERT (1LU << 14)
|
Mon Sep 20 18:32:01 PDT 1999 Michael Jennings <mej@eterm.org>
Lots of changes here. First off, this should fix the background draw
bug with transparency that several people pointed out. While I was
at it, I also cleaned up a lot of other related stuff. Three-state
images should be a lot more robust now.
Then again, some stuff may be broken entirely from this, so let me
know. :-)
For one thing, the various image modes should work as expected now.
You can allow and disallow modes for the various widgets. The
fallback mode is "solid" now, rather than "image," so you can cause
a certain widget to refuse to use an image if you want to. If you
specify an image without specifying a "mode" line that allows the
"image" mode, your image will not appear. <-- READ THIS TWICE! I
had to go back and fix all the theme files because of this, so you
will need to remove your current theme directory and allow Eterm's
"make install" to put the new ones in place; otherwise, everything
will go back to being solid colors. =]
Anytime something changes this drastically, there are bound to be
problems. Let me know if you find any of them. :)
SVN revision: 348
1999-09-20 18:16:46 -07:00
|
|
|
|
2003-08-24 08:09:32 -07:00
|
|
|
# define ETERM_OPTIONS_LOGIN_SHELL (1LU << 0)
|
|
|
|
# define ETERM_OPTIONS_ICONIC (1LU << 1)
|
|
|
|
# define ETERM_OPTIONS_WRITE_UTMP (1LU << 2)
|
|
|
|
# define ETERM_OPTIONS_SCROLLBAR (1LU << 3)
|
|
|
|
# define ETERM_OPTIONS_SCROLLBAR_RIGHT (1LU << 4)
|
|
|
|
# define ETERM_OPTIONS_BORDERLESS (1LU << 5)
|
|
|
|
# define ETERM_OPTIONS_NO_INPUT (1LU << 6)
|
|
|
|
# define ETERM_OPTIONS_NO_CURSOR (1LU << 7)
|
|
|
|
# define ETERM_OPTIONS_PAUSE (1LU << 8)
|
|
|
|
# define ETERM_OPTIONS_XTERM_SELECT (1LU << 9)
|
|
|
|
# define ETERM_OPTIONS_SELECT_WHOLE_LINE (1LU << 10)
|
|
|
|
# define ETERM_OPTIONS_SCROLLBAR_POPUP (1LU << 11)
|
|
|
|
# define ETERM_OPTIONS_SELECT_TRAILING_SPACES (1LU << 12)
|
|
|
|
# define ETERM_OPTIONS_INSTALL (1LU << 13)
|
|
|
|
# define ETERM_OPTIONS_SCROLLBAR_FLOATING (1LU << 14)
|
|
|
|
# define ETERM_OPTIONS_DOUBLE_BUFFER (1LU << 15)
|
|
|
|
# define ETERM_OPTIONS_MBYTE_CURSOR (1LU << 16)
|
|
|
|
# define ETERM_OPTIONS_RESIZE_GRAVITY (1LU << 17)
|
2006-10-30 13:12:12 -08:00
|
|
|
# define ETERM_OPTIONS_STICKY (1LU << 18)
|
2003-08-24 08:09:32 -07:00
|
|
|
|
|
|
|
# define IMAGE_OPTIONS_TRANS (1U << 0)
|
|
|
|
# define IMAGE_OPTIONS_ITRANS (1U << 1)
|
|
|
|
# define IMAGE_OPTIONS_VIEWPORT (1U << 2)
|
1999-08-17 18:12:47 -07:00
|
|
|
|
2000-04-03 16:43:15 -07:00
|
|
|
# define BBAR_FORCE_TOGGLE (0x03)
|
|
|
|
|
Wed Apr 5 21:48:39 PDT 2000 Michael Jennings <mej@eterm.org>
There are now two different sets of settings you can save. You can
save user settings, which are the things that one would generally
consider to be user-specific (toggles, text colors, etc.). You can
also save theme settings, which saves *everything*, including the
stuff that user settings don't include (like imageclasses, menus,
etc.). Settings are saved to user.cfg and theme.cfg, respectively.
Also, Eterm will now detect if it cannot write to the location from
which it got the theme (i.e., a system-wide directory), and will fall
back on ~/.Eterm/themes/<theme>. It WILL create this directory tree
if it does not already exist.
Hopefully this will make more people happy. :-)
SVN revision: 2440
2000-04-05 21:52:52 -07:00
|
|
|
# define SAVE_THEME_CONFIG ((unsigned char) 1)
|
|
|
|
# define SAVE_USER_CONFIG ((unsigned char) 0)
|
|
|
|
|
Mon Jun 11 17:49:55 PDT 2001 Michael Jennings <mej@eterm.org>
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
2001-06-11 18:04:45 -07:00
|
|
|
#define PARSE_TRY_USER_THEME ((unsigned char) 0x01)
|
|
|
|
#define PARSE_TRY_DEFAULT_THEME ((unsigned char) 0x02)
|
|
|
|
#define PARSE_TRY_NO_THEME ((unsigned char) 0x04)
|
|
|
|
#define PARSE_TRY_ALL ((unsigned char) 0x07)
|
1999-08-17 18:12:47 -07:00
|
|
|
|
2003-08-21 20:19:43 -07:00
|
|
|
#define TO_KEYSYM(p,s) do { KeySym sym; \
|
2000-08-30 22:41:44 -07:00
|
|
|
if (s && ((sym = XStringToKeysym(s)) != 0)) *p = sym; \
|
|
|
|
} while (0)
|
|
|
|
#define CHECK_VALID_INDEX(i) (((i) >= image_bg) && ((i) < image_max))
|
1999-08-17 18:12:47 -07:00
|
|
|
|
2010-08-21 06:52:25 -07:00
|
|
|
#define RESET_AND_ASSIGN(var, val) do {if ((var)) FREE(var); (var) = (val);} while (0)
|
1999-08-17 18:12:47 -07:00
|
|
|
|
2003-08-24 08:09:32 -07:00
|
|
|
#define BITFIELD_SET(var, field) ((var) |= (field))
|
|
|
|
#define BITFIELD_CLEAR(var, field) ((var) &= ~(field))
|
|
|
|
#define BITFIELD_IS_SET(var, field) ((var) & (field))
|
|
|
|
|
1999-08-17 18:12:47 -07:00
|
|
|
/************ Structures ************/
|
2000-02-17 21:39:39 -08:00
|
|
|
|
1999-08-17 18:12:47 -07:00
|
|
|
/************ Variables ************/
|
2003-08-24 08:09:32 -07:00
|
|
|
extern unsigned long eterm_options, vt_options, image_options;
|
1999-08-17 18:12:47 -07:00
|
|
|
extern char *theme_dir, *user_dir;
|
2000-11-14 17:30:02 -08:00
|
|
|
extern char **rs_exec_args; /* Args to exec (-e or --exec) */
|
1999-08-17 16:01:18 -07:00
|
|
|
extern char *rs_title; /* Window title */
|
|
|
|
extern char *rs_iconName; /* Icon name */
|
|
|
|
extern char *rs_geometry; /* Geometry string */
|
|
|
|
extern int rs_desktop; /* Startup desktop */
|
|
|
|
extern int rs_saveLines; /* Lines in the scrollback buffer */
|
|
|
|
extern unsigned short rs_min_anchor_size; /* Minimum size, in pixels, of the scrollbar anchor */
|
2000-07-10 14:14:56 -07:00
|
|
|
extern char *rs_finished_title; /* Text added to window title (--pause) */
|
|
|
|
extern char *rs_finished_text; /* Text added to scrollback (--pause) */
|
1999-08-17 18:12:47 -07:00
|
|
|
extern char *rs_term_name;
|
1999-08-17 16:01:18 -07:00
|
|
|
extern char *rs_icon;
|
|
|
|
extern char *rs_scrollbar_type;
|
|
|
|
extern unsigned long rs_scrollbar_width;
|
|
|
|
extern char *rs_scrollbar_type;
|
|
|
|
extern char *rs_anim_pixmap_list;
|
|
|
|
extern char **rs_anim_pixmaps;
|
|
|
|
extern time_t rs_anim_delay;
|
|
|
|
extern char *rs_path;
|
2000-09-17 17:13:07 -07:00
|
|
|
extern char *rs_no_cursor;
|
1999-08-17 18:12:47 -07:00
|
|
|
#ifdef USE_XIM
|
1999-11-12 19:15:18 -08:00
|
|
|
extern char *rs_input_method;
|
|
|
|
extern char *rs_preedit_type;
|
1999-08-17 18:12:47 -07:00
|
|
|
#endif
|
|
|
|
extern char *rs_name;
|
Thu Feb 10 15:10:01 PST 2000 Michael Jennings <mej@eterm.org>
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
2000-02-10 16:25:07 -08:00
|
|
|
extern char *rs_theme;
|
1999-08-17 18:12:47 -07:00
|
|
|
extern char *rs_config_file;
|
2002-05-04 07:25:30 -07:00
|
|
|
#ifdef ESCREEN
|
|
|
|
extern char *rs_url;
|
2002-05-13 15:47:08 -07:00
|
|
|
extern char *rs_hop;
|
2002-10-24 20:57:17 -07:00
|
|
|
extern int rs_delay;
|
|
|
|
extern unsigned char rs_es_dock;
|
|
|
|
extern char *rs_es_font;
|
2002-05-04 07:25:30 -07:00
|
|
|
#endif
|
2004-12-14 15:24:33 -08:00
|
|
|
extern spif_uint32_t rs_opacity;
|
1999-08-17 18:12:47 -07:00
|
|
|
extern unsigned int rs_line_space;
|
2005-02-23 12:38:24 -08:00
|
|
|
extern spif_charptr_t rs_beep_command;
|
2000-05-31 22:24:47 -07:00
|
|
|
extern unsigned int rs_meta_mod, rs_alt_mod, rs_numlock_mod;
|
1999-08-17 18:12:47 -07:00
|
|
|
#ifndef NO_BOLDFONT
|
1999-09-28 12:38:43 -07:00
|
|
|
extern char *rs_boldFont;
|
1999-08-17 18:12:47 -07:00
|
|
|
#endif
|
|
|
|
#ifdef PRINTPIPE
|
|
|
|
extern char *rs_print_pipe;
|
|
|
|
#endif
|
|
|
|
extern char *rs_cutchars;
|
1999-08-17 16:01:18 -07:00
|
|
|
#ifdef CUTCHAR_OPTION
|
2002-10-24 20:57:17 -07:00
|
|
|
extern char *rs_cutchars;
|
1999-08-17 16:01:18 -07:00
|
|
|
#endif
|
1999-08-17 18:12:47 -07:00
|
|
|
extern const char *true_vals[];
|
|
|
|
extern const char *false_vals[];
|
1999-08-17 16:01:18 -07:00
|
|
|
#ifdef KEYSYM_ATTRIBUTE
|
|
|
|
extern unsigned char *KeySym_map[256];
|
|
|
|
#endif
|
|
|
|
#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
|
|
|
|
extern KeySym ks_bigfont;
|
|
|
|
extern KeySym ks_smallfont;
|
|
|
|
#endif
|
|
|
|
|
1999-08-17 18:12:47 -07:00
|
|
|
/************ Function Prototypes ************/
|
1999-08-17 16:01:18 -07:00
|
|
|
_XFUNCPROTOBEGIN
|
|
|
|
|
2006-02-13 11:52:45 -08:00
|
|
|
extern char *spifconf_parse_theme(char **theme, char *spifconf_name, unsigned char fallback);
|
2002-10-04 18:19:41 -07:00
|
|
|
extern void init_libast(void);
|
1999-08-17 18:12:47 -07:00
|
|
|
extern void init_defaults(void);
|
|
|
|
extern void post_parse(void);
|
Wed Apr 5 21:48:39 PDT 2000 Michael Jennings <mej@eterm.org>
There are now two different sets of settings you can save. You can
save user settings, which are the things that one would generally
consider to be user-specific (toggles, text colors, etc.). You can
also save theme settings, which saves *everything*, including the
stuff that user settings don't include (like imageclasses, menus,
etc.). Settings are saved to user.cfg and theme.cfg, respectively.
Also, Eterm will now detect if it cannot write to the location from
which it got the theme (i.e., a system-wide directory), and will fall
back on ~/.Eterm/themes/<theme>. It WILL create this directory tree
if it does not already exist.
Hopefully this will make more people happy. :-)
SVN revision: 2440
2000-04-05 21:52:52 -07:00
|
|
|
unsigned char save_config(char *, unsigned char);
|
1999-08-17 16:01:18 -07:00
|
|
|
|
|
|
|
_XFUNCPROTOEND
|
|
|
|
|
2003-08-21 21:09:40 -07:00
|
|
|
#endif /* _OPTIONS_H_ */
|