Reverting last change for now. Something's very wrong here.
SVN revision: 347
This commit is contained in:
parent
933cb583be
commit
e4070d2075
25
ChangeLog
25
ChangeLog
|
@ -2402,28 +2402,3 @@ Thu Sep 16 16:21:22 PDT 1999 Michael Jennings <mej@eterm.org>
|
|||
from the themes for the time being.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Mon Sep 20 16:08:41 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. :)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
|
@ -28,7 +28,7 @@ install-data-hook:
|
|||
for i in `ls -1 | grep -v CVS | grep -v \.cvsignore | grep -v pixmaps.list` ; do \
|
||||
echo $(INSTALL_DATA) $$i $(DESTDIR)${pixmapdir} ; \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)${pixmapdir} ; \
|
||||
done ; cd .. ; \
|
||||
done ; \
|
||||
done)
|
||||
@for i in tiled-pixmaps.list scaled-pixmaps.list pixmaps.list ; do \
|
||||
if test -f $(DESTDIR)${pixmapdir}/$$i ; then \
|
||||
|
|
31
src/events.c
31
src/events.c
|
@ -229,23 +229,22 @@ handle_property_notify(event_t * ev)
|
|||
|
||||
D_EVENTS(("handle_property_notify(ev [0x%08x] on window 0x%08x)\n", ev, ev->xany.window));
|
||||
|
||||
if (background_is_trans()) {
|
||||
if (((Options & Opt_pixmapTrans) || (images[image_bg].mode & MODE_TRANS)) && (desktop_window != None)) {
|
||||
if (ev->xany.window == TermWin.parent) {
|
||||
prop = XInternAtom(Xdisplay, "_WIN_WORKSPACE", True);
|
||||
if ((prop == None) || (ev->xproperty.atom != prop)) {
|
||||
return 0;
|
||||
}
|
||||
XSelectInput(Xdisplay, desktop_window, None);
|
||||
desktop_window = get_desktop_window();
|
||||
XSelectInput(Xdisplay, desktop_window, PropertyChangeMask);
|
||||
if (desktop_pixmap != None) {
|
||||
free_desktop_pixmap();
|
||||
}
|
||||
desktop_window = get_desktop_window();
|
||||
if (desktop_window == None) {
|
||||
FOREACH_IMAGE(if (image_mode_is(idx, MODE_TRANS)) {image_set_mode(idx, MODE_IMAGE); image_allow_mode(idx, ALLOW_IMAGE);});
|
||||
return 1;
|
||||
}
|
||||
XSelectInput(Xdisplay, desktop_window, PropertyChangeMask);
|
||||
redraw_all_images();
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
scrollbar_show(0);
|
||||
|
||||
} else if (ev->xany.window == desktop_window) {
|
||||
prop = XInternAtom(Xdisplay, "_XROOTPMAP_ID", True);
|
||||
if ((prop == None) || (ev->xproperty.atom != prop)) {
|
||||
|
@ -254,7 +253,9 @@ handle_property_notify(event_t * ev)
|
|||
if (desktop_pixmap != None) {
|
||||
free_desktop_pixmap();
|
||||
}
|
||||
redraw_all_images();
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
scrollbar_show(0);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
@ -344,9 +345,10 @@ handle_focus_in(event_t * ev)
|
|||
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &primary_data), 0);
|
||||
if (!TermWin.focus) {
|
||||
TermWin.focus = 1;
|
||||
if (images[image_bg].norm != images[image_bg].selected) {
|
||||
if (background_is_pixmap() && (images[image_bg].norm != images[image_bg].selected)) {
|
||||
images[image_bg].current = images[image_bg].selected;
|
||||
redraw_image(image_bg);
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
}
|
||||
if (Options & Opt_scrollbar_popup) {
|
||||
map_scrollbar(Options & Opt_scrollBar);
|
||||
|
@ -368,9 +370,10 @@ handle_focus_out(event_t * ev)
|
|||
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &primary_data), 0);
|
||||
if (TermWin.focus) {
|
||||
TermWin.focus = 0;
|
||||
if (images[image_bg].norm != images[image_bg].selected) {
|
||||
if (background_is_pixmap() && (images[image_bg].norm != images[image_bg].selected)) {
|
||||
images[image_bg].current = images[image_bg].norm;
|
||||
redraw_image(image_bg);
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
}
|
||||
if (Options & Opt_scrollbar_popup) {
|
||||
map_scrollbar(0);
|
||||
|
@ -397,7 +400,7 @@ handle_configure_notify(event_t * ev)
|
|||
#ifdef USE_XIM
|
||||
xim_set_status_position();
|
||||
#endif
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
unsigned char
|
||||
|
|
14
src/menus.c
14
src/menus.c
|
@ -638,6 +638,8 @@ unsigned char
|
|||
menuitem_set_action(menuitem_t * item, unsigned char type, char *action)
|
||||
{
|
||||
|
||||
unsigned long len;
|
||||
|
||||
ASSERT_RVAL(item != NULL, 0);
|
||||
|
||||
item->type = type;
|
||||
|
@ -768,9 +770,7 @@ menuitem_select(menu_t * menu, menuitem_t * item)
|
|||
XMoveWindow(Xdisplay, menu->swin, item->x, item->y);
|
||||
XMapWindow(Xdisplay, menu->swin);
|
||||
if (item->type == MENUITEM_SUBMENU) {
|
||||
if (image_mode_is(image_submenu, MODE_IMAGE) && image_mode_is(image_submenu, ALLOW_IMAGE)) {
|
||||
paste_simage(images[image_submenu].selected, menu->swin, 0, 0, item->w - MENU_VGAP, item->h);
|
||||
}
|
||||
paste_simage(images[image_submenu].selected, menu->swin, 0, 0, item->w - MENU_VGAP, item->h);
|
||||
} else {
|
||||
render_simage(images[image_menu].selected, menu->swin, item->w - MENU_VGAP, item->h, image_menu, 0);
|
||||
}
|
||||
|
@ -792,9 +792,7 @@ menuitem_deselect(menu_t * menu, menuitem_t * item)
|
|||
XUnmapWindow(Xdisplay, menu->swin);
|
||||
if (find_item_in_menu(menu, item) != (unsigned short) -1) {
|
||||
if (item->type == MENUITEM_SUBMENU) {
|
||||
if (image_mode_is(image_submenu, MODE_IMAGE) && image_mode_is(image_submenu, ALLOW_IMAGE)) {
|
||||
paste_simage(images[image_submenu].norm, menu->win, item->x, item->y, item->w - MENU_VGAP, item->h);
|
||||
}
|
||||
paste_simage(images[image_submenu].norm, menu->win, item->x, item->y, item->w - MENU_VGAP, item->h);
|
||||
}
|
||||
draw_string(menu->win, menu->gc, 2 * MENU_HGAP, item->y + item->h - MENU_VGAP, item->text, item->len);
|
||||
if (item->rtext) {
|
||||
|
@ -933,9 +931,7 @@ menu_draw(menu_t * menu)
|
|||
}
|
||||
switch (item->type) {
|
||||
case MENUITEM_SUBMENU:
|
||||
if (image_mode_is(image_submenu, MODE_IMAGE) && image_mode_is(image_submenu, ALLOW_IMAGE)) {
|
||||
paste_simage(images[image_submenu].norm, menu->win, item->x, item->y, item->w - MENU_VGAP, item->h);
|
||||
}
|
||||
paste_simage(images[image_submenu].norm, menu->win, item->x, item->y, item->w - MENU_VGAP, item->h);
|
||||
break;
|
||||
case MENUITEM_STRING:
|
||||
#if 0
|
||||
|
|
|
@ -47,8 +47,7 @@
|
|||
#define MENU_VGAP 4
|
||||
#define MENU_CLICK_TIME 20
|
||||
|
||||
#define menu_is_pixmapped() ((images[image_menu].current->iml->im) && (images[image_menu].mode & MODE_MASK))
|
||||
#define menu_submenu_is_pixmapped() ((images[image_submenu].current->iml->im) && (images[image_submenu].mode & MODE_MASK))
|
||||
#define menu_is_pixmapped() (images[image_menu].current->iml->im)
|
||||
|
||||
/************ Structures ************/
|
||||
typedef struct menu_t_struct menu_t;
|
||||
|
|
|
@ -174,6 +174,7 @@ parse_escaped_string(char *str)
|
|||
|
||||
register char *pold, *pnew;
|
||||
unsigned char i;
|
||||
size_t len = strlen(str);
|
||||
|
||||
D_STRINGS(("parse_escaped_string(\"%s\")\n", str));
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ eterm_func builtins[] =
|
|||
{"appname", builtin_appname, 0},
|
||||
{(char *) NULL, (eterm_function_ptr) NULL, 0}
|
||||
};
|
||||
unsigned long Options = (Opt_scrollBar), image_toggles = 0;
|
||||
unsigned long Options = (Opt_scrollBar);
|
||||
static menu_t *curmenu;
|
||||
char *theme_dir = NULL, *user_dir = NULL;
|
||||
char **rs_execArgs = NULL; /* Args to exec (-e or --exec) */
|
||||
|
@ -264,6 +264,10 @@ char *rs_anim_pixmap_list = NULL;
|
|||
char **rs_anim_pixmaps = NULL;
|
||||
time_t rs_anim_delay = 0;
|
||||
# endif
|
||||
# ifdef PIXMAP_OFFSET
|
||||
char *rs_viewport_mode = NULL;
|
||||
const char *rs_pixmapTrans = NULL;
|
||||
# endif
|
||||
static char *rs_pixmaps[image_max];
|
||||
#endif
|
||||
char *rs_noCursor = NULL;
|
||||
|
@ -376,12 +380,14 @@ static const struct {
|
|||
OPT_LONG("trough-pixmap", "scrollbar background (trough) pixmap [scaling optional]", &rs_pixmaps[image_sb]),
|
||||
OPT_LONG("anchor-pixmap", "scrollbar anchor pixmap [scaling optional]", &rs_pixmaps[image_sa]),
|
||||
OPT_LONG("menu-pixmap", "menu pixmap [scaling optional]", &rs_pixmaps[image_menu]),
|
||||
OPT_BOOL('O', "trans", "creates a pseudo-transparent Eterm", NULL, &image_toggles, IMOPT_TRANS),
|
||||
OPT_BLONG("viewport-mode", "use viewport mode for the background image", NULL, &image_toggles, IMOPT_VIEWPORT),
|
||||
OPT_BOOL('@', "scale", "scale rather than tile", &rs_pixmapScale, &Options, Opt_pixmapScale),
|
||||
# ifdef PIXMAP_OFFSET
|
||||
OPT_BOOL('O', "trans", "creates a pseudo-transparent Eterm", &rs_pixmapTrans, &Options, Opt_pixmapTrans),
|
||||
OPT_LONG("cmod", "image color modifier (\"brightness contrast gamma\")", &rs_cmod_image),
|
||||
OPT_LONG("cmod-red", "red-only color modifier (\"brightness contrast gamma\")", &rs_cmod_red),
|
||||
OPT_LONG("cmod-green", "green-only color modifier (\"brightness contrast gamma\")", &rs_cmod_green),
|
||||
OPT_LONG("cmod-blue", "blue-only color modifier (\"brightness contrast gamma\")", &rs_cmod_blue),
|
||||
# endif
|
||||
OPT_STR('p', "path", "pixmap file search path", &rs_path),
|
||||
# ifdef BACKGROUND_CYCLING_SUPPORT
|
||||
OPT_STR('N', "anim", "a delay and list of pixmaps for cycling", &rs_anim_pixmap_list),
|
||||
|
@ -430,6 +436,9 @@ static const struct {
|
|||
OPT_BLONG("select-line", "triple-click selects whole line", &rs_select_whole_line, &Options, Opt_select_whole_line),
|
||||
OPT_BLONG("select-trailing-spaces", "do not skip trailing spaces when selecting", &rs_select_trailing_spaces, &Options, Opt_select_trailing_spaces),
|
||||
OPT_BLONG("report-as-keysyms", "report special keys as keysyms", &rs_report_as_keysyms, &Options, Opt_report_as_keysyms),
|
||||
#ifdef PIXMAP_OFFSET
|
||||
OPT_BLONG("viewport-mode", "use viewport mode for the background image", &rs_viewport_mode, &Options, Opt_viewport_mode),
|
||||
#endif
|
||||
|
||||
/* =======[ Keyboard options ]======= */
|
||||
#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
|
||||
|
@ -2462,13 +2471,13 @@ parse_image(char *buff)
|
|||
return;
|
||||
}
|
||||
if (!BEG_STRCASECMP(mode, "image ")) {
|
||||
images[idx].mode = (MODE_IMAGE | ALLOW_IMAGE);
|
||||
images[idx].mode = MODE_IMAGE;
|
||||
} else if (!BEG_STRCASECMP(mode, "trans ")) {
|
||||
images[idx].mode = (MODE_TRANS | ALLOW_TRANS);
|
||||
images[idx].mode = MODE_TRANS;
|
||||
} else if (!BEG_STRCASECMP(mode, "viewport ")) {
|
||||
images[idx].mode = (MODE_VIEWPORT | ALLOW_VIEWPORT);
|
||||
images[idx].mode = MODE_VIEWPORT;
|
||||
} else if (!BEG_STRCASECMP(mode, "auto ")) {
|
||||
images[idx].mode = (MODE_AUTO | ALLOW_AUTO);
|
||||
images[idx].mode = MODE_AUTO;
|
||||
} else {
|
||||
print_error("Parse error in file %s, line %lu: Invalid mode \"%s\"", file_peek_path(), file_peek_line(), mode);
|
||||
}
|
||||
|
@ -2671,7 +2680,7 @@ parse_actions(char *buff)
|
|||
unsigned short mod = MOD_NONE;
|
||||
unsigned char button = BUTTON_NONE;
|
||||
KeySym keysym = 0;
|
||||
char *str;
|
||||
char *to, *str;
|
||||
unsigned short i;
|
||||
|
||||
ASSERT(buff != NULL);
|
||||
|
@ -2842,16 +2851,16 @@ parse_menuitem(char *buff)
|
|||
void
|
||||
parse_xim(char *buff)
|
||||
{
|
||||
|
||||
#ifdef USE_XIM
|
||||
ASSERT(buff != NULL);
|
||||
|
||||
#ifdef USE_XIM
|
||||
if (!BEG_STRCASECMP(buff, "input_method ")) {
|
||||
rs_inputMethod = Word(2, buff);
|
||||
} else if (!BEG_STRCASECMP(buff, "preedit_type ")) {
|
||||
rs_preeditType = Word(2, buff);
|
||||
} else {
|
||||
print_error("Parse error in file %s, line %lu: Attribute \"%s\" is not valid within context xim",
|
||||
print_error("Parse error in file %s, line %lu:\n"
|
||||
"Attribute \"%s\" is not valid within context xim",
|
||||
file_peek_path(), file_peek_line(), buff);
|
||||
}
|
||||
#else
|
||||
|
@ -2863,22 +2872,23 @@ parse_xim(char *buff)
|
|||
void
|
||||
parse_multichar(char *buff)
|
||||
{
|
||||
|
||||
#ifdef MULTI_CHARSET
|
||||
ASSERT(buff != NULL);
|
||||
|
||||
#ifdef MULTI_CHARSET
|
||||
if (!BEG_STRCASECMP(buff, "encoding ")) {
|
||||
if ((rs_multchar_encoding = Word(2, buff)) != NULL) {
|
||||
if (BEG_STRCASECMP(rs_multchar_encoding, "eucj")
|
||||
&& BEG_STRCASECMP(rs_multchar_encoding, "sjis")
|
||||
&& BEG_STRCASECMP(rs_multchar_encoding, "euckr")) {
|
||||
print_error("Parse error in file %s, line %lu: Invalid multichar encoding mode \"%s\"",
|
||||
print_error("Parse error in file %s, line %lu:"
|
||||
" Invalid multichar encoding mode \"%s\"",
|
||||
file_peek_path(), file_peek_line(), rs_multchar_encoding);
|
||||
return;
|
||||
}
|
||||
set_multichar_encoding(rs_multchar_encoding);
|
||||
} else {
|
||||
print_error("Parse error in file %s, line %lu: Invalid parameter list \"\" for attribute encoding",
|
||||
print_error("Parse error in file %s, line %lu: "
|
||||
" Invalid parameter list \"\" for attribute encoding",
|
||||
file_peek_path(), file_peek_line());
|
||||
}
|
||||
} else if (!BEG_STRCASECMP(buff, "font ")) {
|
||||
|
@ -2887,7 +2897,8 @@ parse_multichar(char *buff)
|
|||
unsigned char n;
|
||||
|
||||
if (NumWords(buff) != 3) {
|
||||
print_error("Parse error in file %s, line %lu: Invalid parameter list \"%s\" for attribute font",
|
||||
print_error("Parse error in file %s, line %lu:"
|
||||
" Invalid parameter list \"%s\" for attribute font",
|
||||
file_peek_path(), file_peek_line(), (tmp ? tmp : ""));
|
||||
return;
|
||||
}
|
||||
|
@ -2896,21 +2907,25 @@ parse_multichar(char *buff)
|
|||
if (n <= 4) {
|
||||
rs_mfont[n] = Word(2, tmp);
|
||||
} else {
|
||||
print_error("Parse error in file %s, line %lu: Invalid font index %d",
|
||||
print_error("Parse error in file %s, line %lu:"
|
||||
" Invalid font index %d",
|
||||
file_peek_path(), file_peek_line(), n);
|
||||
}
|
||||
} else {
|
||||
tmp = Word(1, tmp);
|
||||
print_error("Parse error in file %s, line %lu: Invalid font index \"%s\"",
|
||||
print_error("Parse error in file %s, line %lu:"
|
||||
" Invalid font index \"%s\"",
|
||||
file_peek_path(), file_peek_line(), (tmp ? tmp : ""));
|
||||
FREE(tmp);
|
||||
}
|
||||
} else {
|
||||
print_error("Parse error in file %s, line %lu: Attribute \"%s\" is not valid within context multichar",
|
||||
print_error("Parse error in file %s, line %lu:"
|
||||
" Attribute \"%s\" is not valid within context multichar",
|
||||
file_peek_path(), file_peek_line(), buff);
|
||||
}
|
||||
#else
|
||||
print_warning("Multichar support was not compiled in, ignoring entire context");
|
||||
print_warning("Multichar support was not compiled in,"
|
||||
" ignoring entire context");
|
||||
file_poke_skip(1);
|
||||
#endif
|
||||
}
|
||||
|
@ -3342,13 +3357,6 @@ post_parse(void)
|
|||
if (!(images[i].clicked)) {
|
||||
images[i].clicked = images[i].selected;
|
||||
}
|
||||
if ((image_toggles & IMOPT_TRANS) && (image_mode_is(i, ALLOW_TRANS))) {
|
||||
D_PIXMAP(("Detected transparency option. Enabling transparency on image %s\n", get_image_type(i)));
|
||||
image_set_mode(i, MODE_TRANS);
|
||||
} else if ((image_toggles & IMOPT_VIEWPORT) && (image_mode_is(i, ALLOW_VIEWPORT))) {
|
||||
D_PIXMAP(("Detected viewport option. Enabling viewport mode on image %s\n", get_image_type(i)));
|
||||
image_set_mode(i, MODE_VIEWPORT);
|
||||
}
|
||||
}
|
||||
|
||||
if (rs_cmod_image) {
|
||||
|
|
|
@ -59,25 +59,25 @@
|
|||
# define Opt_utmpLogging (1LU << 6)
|
||||
# define Opt_scrollBar (1LU << 7)
|
||||
# define Opt_meta8 (1LU << 8)
|
||||
# define Opt_exec (1LU << 9)
|
||||
# define Opt_homeOnEcho (1LU << 10)
|
||||
# define Opt_homeOnRefresh (1LU << 11)
|
||||
# define Opt_scrollBar_right (1LU << 12)
|
||||
# define Opt_borderless (1LU << 13)
|
||||
# define Opt_backing_store (1LU << 14)
|
||||
# define Opt_noCursor (1LU << 15)
|
||||
# define Opt_pause (1LU << 16)
|
||||
# define Opt_homeOnInput (1LU << 17)
|
||||
# define Opt_report_as_keysyms (1LU << 18)
|
||||
# define Opt_xterm_select (1LU << 19)
|
||||
# define Opt_select_whole_line (1LU << 20)
|
||||
# define Opt_scrollbar_popup (1LU << 21)
|
||||
# define Opt_select_trailing_spaces (1LU << 22)
|
||||
# define Opt_install (1LU << 23)
|
||||
# define Opt_scrollBar_floating (1LU << 24)
|
||||
|
||||
# define IMOPT_TRANS (1U << 0)
|
||||
# define IMOPT_VIEWPORT (1U << 1)
|
||||
# define Opt_pixmapScale (1LU << 9)
|
||||
# define Opt_exec (1LU << 10)
|
||||
# define Opt_homeOnEcho (1LU << 11)
|
||||
# define Opt_homeOnRefresh (1LU << 12)
|
||||
# define Opt_scrollBar_floating (1LU << 13)
|
||||
# define Opt_scrollBar_right (1LU << 14)
|
||||
# define Opt_borderless (1LU << 15)
|
||||
# define Opt_pixmapTrans (1LU << 16)
|
||||
# define Opt_backing_store (1LU << 17)
|
||||
# define Opt_noCursor (1LU << 18)
|
||||
# define Opt_pause (1LU << 19)
|
||||
# define Opt_homeOnInput (1LU << 20)
|
||||
# define Opt_report_as_keysyms (1LU << 21)
|
||||
# define Opt_xterm_select (1LU << 22)
|
||||
# define Opt_select_whole_line (1LU << 23)
|
||||
# define Opt_viewport_mode (1LU << 24)
|
||||
# define Opt_scrollbar_popup (1LU << 25)
|
||||
# define Opt_select_trailing_spaces (1LU << 26)
|
||||
# define Opt_install (1LU << 27)
|
||||
|
||||
#define BOOL_OPT_ISTRUE(s) (!strcasecmp((s), true_vals[0]) || !strcasecmp((s), true_vals[1]) \
|
||||
|| !strcasecmp((s), true_vals[2]) || !strcasecmp((s), true_vals[3]))
|
||||
|
@ -205,7 +205,7 @@ typedef struct eterm_function_struct {
|
|||
} eterm_func;
|
||||
|
||||
/************ Variables ************/
|
||||
extern unsigned long Options, image_toggles;
|
||||
extern unsigned long Options;
|
||||
extern char *theme_dir, *user_dir;
|
||||
extern char **rs_execArgs; /* Args to exec (-e or --exec) */
|
||||
extern char *rs_title; /* Window title */
|
||||
|
|
83
src/pixmap.c
83
src/pixmap.c
|
@ -80,7 +80,7 @@ image_t images[image_max] =
|
|||
#endif
|
||||
|
||||
#ifdef PIXMAP_SUPPORT
|
||||
const char *
|
||||
inline const char *
|
||||
get_image_type(unsigned short type)
|
||||
{
|
||||
|
||||
|
@ -338,39 +338,7 @@ paste_simage(simage_t * simg, Window win, unsigned short x, unsigned short y, un
|
|||
}
|
||||
|
||||
void
|
||||
redraw_image(unsigned char which) {
|
||||
|
||||
switch (which) {
|
||||
case image_bg:
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 0);
|
||||
scr_touch();
|
||||
break;
|
||||
case image_up:
|
||||
render_simage(images[image_up].current, scrollbar_get_uparrow_win(), scrollbar_arrow_width(), scrollbar_arrow_width(), image_up, 0);
|
||||
scrollbar_show(0);
|
||||
break;
|
||||
case image_down:
|
||||
render_simage(images[image_down].current, scrollbar_get_downarrow_win(), scrollbar_arrow_width(), scrollbar_arrow_width(), image_down, 0);
|
||||
scrollbar_show(0);
|
||||
break;
|
||||
# ifdef PIXMAP_SCROLLBAR
|
||||
case image_sb:
|
||||
render_simage(images[image_sb].current, scrollbar_get_win(), scrollbar_trough_width(), scrollbar_trough_height(), image_sb, 0);
|
||||
scrollbar_show(0);
|
||||
break;
|
||||
case image_sa:
|
||||
render_simage(images[image_sa].current, scrollbar_get_anchor_win(), scrollbar_anchor_width(), scrollbar_anchor_height(), image_sa, 0);
|
||||
scrollbar_show(0);
|
||||
break;
|
||||
# endif
|
||||
default:
|
||||
D_PIXMAP(("redraw_image(): Bad value %u\n", which));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
render_simage(simage_t * simg, Window win, unsigned short width, unsigned short height, unsigned char which, renderop_t renderop)
|
||||
render_simage(simage_t * simg, Window win, unsigned short width, unsigned short height, int which, renderop_t renderop)
|
||||
{
|
||||
|
||||
XGCValues gcvalue;
|
||||
|
@ -397,10 +365,10 @@ render_simage(simage_t * simg, Window win, unsigned short width, unsigned short
|
|||
ASSERT(simg->iml != NULL);
|
||||
ASSERT(simg->pmap != NULL);
|
||||
|
||||
D_PIXMAP(("render_simage(): Rendering simg->iml->im 0x%08x (%s) at %hux%hu onto window 0x%08x\n", simg->iml->im, get_image_type(which), width, height, win));
|
||||
D_PIXMAP(("render_simage(): Image mode is 0x%02x\n", images[which].mode));
|
||||
D_PIXMAP(("render_simage(): Rendering simg->iml->im 0x%08x (%s) at %hux%hu onto window 0x%08x\n", simg->iml->im, get_image_type(which),
|
||||
width, height, win));
|
||||
|
||||
if ((which == image_bg) && image_mode_is(image_bg, MODE_VIEWPORT)) {
|
||||
if (which == image_bg && (Options & Opt_viewport_mode)) {
|
||||
width = scr->width;
|
||||
height = scr->height;
|
||||
}
|
||||
|
@ -444,14 +412,16 @@ render_simage(simage_t * simg, Window win, unsigned short width, unsigned short
|
|||
}
|
||||
|
||||
# ifdef PIXMAP_OFFSET
|
||||
if (image_mode_is(which, MODE_TRANS) && image_mode_is(which, ALLOW_TRANS)) {
|
||||
if (((Options & Opt_pixmapTrans) || (images[which].mode & MODE_TRANS)) && (images[which].mode & ALLOW_TRANS)) {
|
||||
if (desktop_window == None) {
|
||||
get_desktop_window();
|
||||
}
|
||||
if (desktop_window == None) {
|
||||
print_error("Unable to locate desktop window. If you are running Enlightenment, please\n"
|
||||
"restart. If not, please set your background image with Esetroot, then try again.");
|
||||
FOREACH_IMAGE(if (image_mode_is(idx, MODE_TRANS)) {image_set_mode(idx, MODE_IMAGE); image_allow_mode(idx, ALLOW_IMAGE);});
|
||||
Options &= ~(Opt_pixmapTrans);
|
||||
images[which].mode |= (MODE_IMAGE | ALLOW_IMAGE);
|
||||
images[which].mode &= ~(MODE_TRANS | ALLOW_TRANS);
|
||||
render_simage(simg, win, width, height, which, renderop);
|
||||
return;
|
||||
}
|
||||
|
@ -483,7 +453,7 @@ render_simage(simage_t * simg, Window win, unsigned short width, unsigned short
|
|||
XFreePixmap(Xdisplay, simg->pmap->pixmap);
|
||||
}
|
||||
simg->pmap->pixmap = XCreatePixmap(Xdisplay, win, width, height, Xdepth);
|
||||
D_PIXMAP(("desktop_pixmap == 0x%08x, simg->pmap->pixmap == 0x%08x\n", desktop_pixmap, simg->pmap->pixmap));
|
||||
D_PIXMAP(("desktop_pixmap == %08x, simg->pmap->pixmap == %08x\n", desktop_pixmap, simg->pmap->pixmap));
|
||||
if (simg->pmap->pixmap != None) {
|
||||
XGetGeometry(Xdisplay, desktop_pixmap, &w, &px, &py, &pw, &ph, &pb, &pd);
|
||||
if ((pw <= 0) || (ph <= 0)) {
|
||||
|
@ -511,8 +481,9 @@ render_simage(simage_t * simg, Window win, unsigned short width, unsigned short
|
|||
D_PIXMAP(("Setting background of window 0x%08x to the background color\n", win));
|
||||
XSetWindowBackground(Xdisplay, win, PixColors[bgColor]);
|
||||
}
|
||||
} else if (image_mode_is(which, MODE_VIEWPORT) && image_mode_is(which, ALLOW_VIEWPORT)) {
|
||||
D_PIXMAP(("Viewport mode enabled. viewport_pixmap == 0x%08x and simg->pmap->pixmap == 0x%08x\n", viewport_pixmap, simg->pmap->pixmap));
|
||||
} else if (((Options & Opt_viewport_mode) || (images[which].mode & MODE_VIEWPORT)) && (images[which].mode & ALLOW_VIEWPORT)) {
|
||||
D_PIXMAP(("Viewport mode enabled. viewport_pixmap == 0x%08x and simg->pmap->pixmap == 0x%08x\n",
|
||||
viewport_pixmap, simg->pmap->pixmap));
|
||||
if (viewport_pixmap == None) {
|
||||
imlib_t *tmp_iml = images[image_bg].current->iml;
|
||||
|
||||
|
@ -574,7 +545,8 @@ render_simage(simage_t * simg, Window win, unsigned short width, unsigned short
|
|||
XSetWindowBackgroundPixmap(Xdisplay, win, simg->pmap->pixmap);
|
||||
} else
|
||||
# endif
|
||||
if (image_mode_is(which, MODE_IMAGE) && image_mode_is(which, ALLOW_IMAGE)) {
|
||||
{
|
||||
|
||||
if (simg->iml->im) {
|
||||
int w = simg->pmap->w;
|
||||
int h = simg->pmap->h;
|
||||
|
@ -692,31 +664,6 @@ render_simage(simage_t * simg, Window win, unsigned short width, unsigned short
|
|||
D_PIXMAP(("Setting background of window 0x%08x to 0x%08x\n", win, simg->pmap->pixmap));
|
||||
XSetWindowBackgroundPixmap(Xdisplay, win, simg->pmap->pixmap);
|
||||
}
|
||||
} else {
|
||||
unsigned short cidx;
|
||||
|
||||
switch (which) {
|
||||
case image_up:
|
||||
case image_down:
|
||||
case image_left:
|
||||
case image_right:
|
||||
# ifdef PIXMAP_SCROLLBAR
|
||||
case image_sb:
|
||||
case image_sa:
|
||||
# endif
|
||||
cidx = (TermWin.focus ? scrollColor : unfocusedScrollColor);
|
||||
break;
|
||||
case image_menu:
|
||||
case image_submenu:
|
||||
cidx = (TermWin.focus ? menuColor : unfocusedMenuColor);
|
||||
break;
|
||||
default:
|
||||
cidx = bgColor;
|
||||
break;
|
||||
}
|
||||
|
||||
XSetWindowBackground(Xdisplay, win, PixColors[cidx]);
|
||||
image_set_mode(which, MODE_SOLID);
|
||||
}
|
||||
XClearWindow(Xdisplay, win);
|
||||
XFreeGC(Xdisplay, gc);
|
||||
|
|
41
src/pixmap.h
41
src/pixmap.h
|
@ -32,8 +32,7 @@
|
|||
/************ Macros and Definitions ************/
|
||||
#ifdef PIXMAP_SUPPORT
|
||||
# define background_is_image() (images[image_bg].current && images[image_bg].current->iml && images[image_bg].current->iml->im)
|
||||
# define background_is_trans() (images[image_bg].mode & MODE_TRANS)
|
||||
# define background_is_pixmap() (background_is_image() || background_is_trans())
|
||||
# define background_is_pixmap() (background_is_image() || Options & Opt_pixmapTrans)
|
||||
# define delete_simage(simg) do { \
|
||||
Imlib_free_pixmap(imlib_id, (simg)->pmap->pixmap); \
|
||||
Imlib_destroy_image(imlib_id, (simg)->iml->im); \
|
||||
|
@ -44,9 +43,8 @@
|
|||
# define CONVERT_TINT_GREEN(t) (((t) & 0x00ff00) >> 8)
|
||||
# define CONVERT_TINT_BLUE(t) ((t) & 0x0000ff)
|
||||
#else
|
||||
# define background_is_image() ((int)0)
|
||||
# define background_is_trans() ((int)0)
|
||||
# define background_is_pixmap() ((int)0)
|
||||
# define background_is_image() ((int)0)
|
||||
# define delete_simage(simg) ((void)0)
|
||||
#endif
|
||||
#define PIXMAP_EXT NULL
|
||||
|
@ -79,27 +77,16 @@ enum {
|
|||
#define OP_SCALE (OP_HSCALE | OP_VSCALE)
|
||||
|
||||
/* Image modes */
|
||||
#define MODE_SOLID 0x00
|
||||
#define MODE_IMAGE 0x01
|
||||
#define MODE_TRANS 0x02
|
||||
#define MODE_VIEWPORT 0x04
|
||||
#define MODE_AUTO 0x08
|
||||
#define MODE_MASK 0x0f
|
||||
#define ALLOW_SOLID 0x00
|
||||
#define ALLOW_IMAGE 0x10
|
||||
#define ALLOW_TRANS 0x20
|
||||
#define ALLOW_VIEWPORT 0x40
|
||||
#define ALLOW_AUTO 0x80
|
||||
#define ALLOW_MASK 0xf0
|
||||
|
||||
/* Helper macros */
|
||||
#define FOREACH_IMAGE(x) do {unsigned char idx; for (idx = 0; idx < image_max; idx++) { x } } while (0)
|
||||
#define redraw_all_images() do {render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 0); \
|
||||
scr_touch(); scrollbar_show(0);} while (0)
|
||||
#define image_set_mode(which, bit) do {images[which].mode &= ~(MODE_MASK); images[which].mode |= (bit);} while (0)
|
||||
#define image_allow_mode(which, bit) (images[which].mode |= (bit))
|
||||
#define image_disallow_mode(which, bit) (images[which].mode &= ~(bit))
|
||||
#define image_mode_is(which, bit) (images[which].mode & (bit))
|
||||
#define MODE_IMAGE 0x00
|
||||
#define MODE_TRANS 0x01
|
||||
#define MODE_VIEWPORT 0x02
|
||||
#define MODE_AUTO 0x04
|
||||
#define MODE_MASK 0x07
|
||||
#define ALLOW_IMAGE 0x00
|
||||
#define ALLOW_TRANS 0x10
|
||||
#define ALLOW_VIEWPORT 0x20
|
||||
#define ALLOW_AUTO 0x40
|
||||
#define ALLOW_MASK 0x70
|
||||
|
||||
/* Elements of an simage to be reset */
|
||||
#define RESET_NONE (0UL)
|
||||
|
@ -156,13 +143,11 @@ extern Window desktop_window;
|
|||
/************ Function Prototypes ************/
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
extern const char *get_image_type(unsigned short);
|
||||
extern unsigned short parse_pixmap_ops(char *);
|
||||
extern unsigned short set_pixmap_scale(const char *, pixmap_t *);
|
||||
extern void reset_simage(simage_t *, unsigned long);
|
||||
extern void paste_simage(simage_t *, Window, unsigned short, unsigned short, unsigned short, unsigned short);
|
||||
extern void redraw_image(unsigned char);
|
||||
extern void render_simage(simage_t *, Window, unsigned short, unsigned short, unsigned char, renderop_t);
|
||||
extern void render_simage(simage_t *, Window, unsigned short, unsigned short, int, renderop_t);
|
||||
#ifdef USE_POSIX_THREADS
|
||||
extern void init_bg_pixmap_thread(void *);
|
||||
#endif
|
||||
|
|
|
@ -241,7 +241,6 @@ scrollbar_event_init_dispatcher(void)
|
|||
|
||||
MEMSET(&scrollbar_event_data, 0, sizeof(event_dispatcher_data_t));
|
||||
|
||||
EVENT_DATA_ADD_HANDLER(scrollbar_event_data, ConfigureNotify, sb_handle_configure_notify);
|
||||
EVENT_DATA_ADD_HANDLER(scrollbar_event_data, EnterNotify, sb_handle_enter_notify);
|
||||
EVENT_DATA_ADD_HANDLER(scrollbar_event_data, LeaveNotify, sb_handle_leave_notify);
|
||||
EVENT_DATA_ADD_HANDLER(scrollbar_event_data, FocusIn, sb_handle_focus_in);
|
||||
|
@ -266,18 +265,6 @@ scrollbar_event_init_dispatcher(void)
|
|||
|
||||
}
|
||||
|
||||
unsigned char
|
||||
sb_handle_configure_notify(event_t * ev)
|
||||
{
|
||||
|
||||
D_EVENTS(("sb_handle_configure_notify(ev [0x%08x] on window 0x%08x)\n", ev, ev->xany.window));
|
||||
|
||||
REQUIRE_RVAL(XEVENT_IS_PARENT(ev, &scrollbar_event_data), 0);
|
||||
|
||||
redraw_image(image_sb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned char
|
||||
sb_handle_enter_notify(event_t * ev)
|
||||
{
|
||||
|
@ -706,11 +693,19 @@ scrollbar_show(short mouseoffset)
|
|||
gcvalue.foreground = (Xdepth <= 2 ? PixColors[fgColor] : PixColors[scrollColor]);
|
||||
scrollbarGC = XCreateGC(Xdisplay, scrollBar.win, GCForeground, &gcvalue);
|
||||
|
||||
if ((Options & Opt_scrollBar_floating) && !scrollbar_is_pixmapped() && !background_is_pixmap()) {
|
||||
XSetWindowBackground(Xdisplay, scrollBar.win, PixColors[bgColor]);
|
||||
} else {
|
||||
if (scrollbar_is_pixmapped() || (Options & (Opt_scrollBar_floating | Opt_pixmapTrans))) {
|
||||
render_simage(images[image_sb].current, scrollBar.win, scrollbar_trough_width(), scrollbar_trough_height(), image_sb, 0);
|
||||
} else if (Options & Opt_scrollBar_floating) {
|
||||
if (background_is_pixmap()) {
|
||||
/* FIXME: Extend the bg pixmap into the scrollbar window here? -- mej */
|
||||
XSetWindowBackground(Xdisplay, scrollBar.win, gcvalue.foreground);
|
||||
} else {
|
||||
XSetWindowBackground(Xdisplay, scrollBar.win, PixColors[bgColor]);
|
||||
}
|
||||
} else {
|
||||
XSetWindowBackground(Xdisplay, scrollBar.win, gcvalue.foreground);
|
||||
}
|
||||
XClearWindow(Xdisplay, scrollBar.win);
|
||||
gcvalue.foreground = PixColors[topShadowColor];
|
||||
topShadowGC = XCreateGC(Xdisplay, scrollBar.win, GCForeground, &gcvalue);
|
||||
|
||||
|
@ -727,7 +722,7 @@ scrollbar_show(short mouseoffset)
|
|||
focus = TermWin.focus;
|
||||
gcvalue.foreground = PixColors[focus ? scrollColor : unfocusedScrollColor];
|
||||
# ifdef PIXMAP_OFFSET
|
||||
if (!((Options & Opt_scrollBar_floating) && image_mode_is(image_sb, (MODE_TRANS | MODE_VIEWPORT)))) {
|
||||
if (!((Options & Opt_pixmapTrans) && (Options & Opt_scrollBar_floating))) {
|
||||
# endif
|
||||
if (scrollbar_is_pixmapped()) {
|
||||
XSetWindowBackgroundPixmap(Xdisplay, scrollBar.win, images[image_sb].current->pmap->pixmap);
|
||||
|
|
|
@ -51,33 +51,33 @@
|
|||
|
||||
/* The various scrollbar elements */
|
||||
#ifdef PIXMAP_SCROLLBAR
|
||||
# define scrollbar_win_is_scrollbar(w) (scrollbar_visible() && (w) == scrollBar.win)
|
||||
# define scrollbar_win_is_uparrow(w) ((w) == scrollBar.up_win)
|
||||
# define scrollbar_win_is_downarrow(w) ((w) == scrollBar.dn_win)
|
||||
# define scrollbar_win_is_anchor(w) ((w) == scrollBar.sa_win)
|
||||
# define scrollbar_is_pixmapped() ((images[image_sb].current->iml->im) && (images[image_sb].mode & MODE_MASK))
|
||||
# define scrollbar_uparrow_is_pixmapped() ((images[image_up].current->iml->im) && (images[image_up].mode & MODE_MASK))
|
||||
# define scrollbar_downarrow_is_pixmapped() ((images[image_down].current->iml->im) && (images[image_down].mode & MODE_MASK))
|
||||
# define scrollbar_anchor_is_pixmapped() ((images[image_sa].current->iml->im) && (images[image_sa].mode & MODE_MASK))
|
||||
# define scrollbar_upButton(w, y) ( scrollbar_uparrow_is_pixmapped() ? scrollbar_win_is_uparrow(w) \
|
||||
: ((scrollBar.type == SCROLLBAR_NEXT && (y) > scrollBar.end && (y) <= scrollbar_dn_loc()) \
|
||||
|| (scrollBar.type != SCROLLBAR_NEXT && (y) < scrollBar.beg)))
|
||||
# define scrollbar_dnButton(w, y) ( scrollbar_downarrow_is_pixmapped() ? scrollbar_win_is_downarrow(w) \
|
||||
: ((scrollBar.type == SCROLLBAR_NEXT && (y) > scrollbar_dn_loc()) \
|
||||
|| (scrollBar.type != SCROLLBAR_NEXT && (y) > scrollBar.end)))
|
||||
# define scrollbar_win_is_scrollbar(w) (scrollbar_visible() && (w) == scrollBar.win)
|
||||
# define scrollbar_win_is_uparrow(w) ((w) == scrollBar.up_win)
|
||||
# define scrollbar_win_is_downarrow(w) ((w) == scrollBar.dn_win)
|
||||
# define scrollbar_win_is_anchor(w) ((w) == scrollBar.sa_win)
|
||||
# define scrollbar_is_pixmapped() (images[image_sb].current->iml->im)
|
||||
# define scrollbar_uparrow_is_pixmapped() (images[image_up].current->iml->im)
|
||||
# define scrollbar_downarrow_is_pixmapped() (images[image_down].current->iml->im)
|
||||
# define scrollbar_anchor_is_pixmapped() (images[image_sa].current->iml->im)
|
||||
# define scrollbar_upButton(w, y) ( scrollbar_uparrow_is_pixmapped() ? scrollbar_win_is_uparrow(w) \
|
||||
: ((scrollBar.type == SCROLLBAR_NEXT && (y) > scrollBar.end && (y) <= scrollbar_dn_loc()) \
|
||||
|| (scrollBar.type != SCROLLBAR_NEXT && (y) < scrollBar.beg)))
|
||||
# define scrollbar_dnButton(w, y) ( scrollbar_downarrow_is_pixmapped() ? scrollbar_win_is_downarrow(w) \
|
||||
: ((scrollBar.type == SCROLLBAR_NEXT && (y) > scrollbar_dn_loc()) \
|
||||
|| (scrollBar.type != SCROLLBAR_NEXT && (y) > scrollBar.end)))
|
||||
#else
|
||||
# define scrollbar_win_is_scrollbar(w) (scrollbar_visible() && (w) == scrollBar.win)
|
||||
# define scrollbar_win_is_uparrow(w) (0)
|
||||
# define scrollbar_win_is_downarrow(w) (0)
|
||||
# define scrollbar_win_is_anchor(w) (0)
|
||||
# define scrollbar_is_pixmapped() (0)
|
||||
# define scrollbar_uparrow_is_pixmapped() (0)
|
||||
# define scrollbar_win_is_scrollbar(w) (scrollbar_visible() && (w) == scrollBar.win)
|
||||
# define scrollbar_win_is_uparrow(w) (0)
|
||||
# define scrollbar_win_is_downarrow(w) (0)
|
||||
# define scrollbar_win_is_anchor(w) (0)
|
||||
# define scrollbar_is_pixmapped() (0)
|
||||
# define scrollbar_uparrow_is_pixmapped() (0)
|
||||
# define scrollbar_downarrow_is_pixmapped() (0)
|
||||
# define scrollbar_anchor_is_pixmapped() (0)
|
||||
# define scrollbar_upButton(w, y) ((scrollBar.type == SCROLLBAR_NEXT && (y) > scrollBar.end && (y) <= scrollbar_dn_loc()) \
|
||||
|| (scrollBar.type != SCROLLBAR_NEXT && (y) < scrollBar.beg))
|
||||
# define scrollbar_dnButton(w, y) ((scrollBar.type == SCROLLBAR_NEXT && (y) > scrollbar_dn_loc()) \
|
||||
|| (scrollBar.type != SCROLLBAR_NEXT && (y) > scrollBar.end))
|
||||
# define scrollbar_anchor_is_pixmapped() (0)
|
||||
# define scrollbar_upButton(w, y) ((scrollBar.type == SCROLLBAR_NEXT && (y) > scrollBar.end && (y) <= scrollbar_dn_loc()) \
|
||||
|| (scrollBar.type != SCROLLBAR_NEXT && (y) < scrollBar.beg))
|
||||
# define scrollbar_dnButton(w, y) ((scrollBar.type == SCROLLBAR_NEXT && (y) > scrollbar_dn_loc()) \
|
||||
|| (scrollBar.type != SCROLLBAR_NEXT && (y) > scrollBar.end))
|
||||
#endif
|
||||
|
||||
/* Scrollbar dimensions */
|
||||
|
@ -142,7 +142,6 @@ extern void Draw_up_button(int, int, int);
|
|||
extern void Draw_dn_button(int, int, int);
|
||||
extern void scrollbar_init(void);
|
||||
extern void scrollbar_event_init_dispatcher(void);
|
||||
extern unsigned char sb_handle_configure_notify(event_t *);
|
||||
extern unsigned char sb_handle_enter_notify(event_t *);
|
||||
extern unsigned char sb_handle_leave_notify(event_t *);
|
||||
extern unsigned char sb_handle_focus_in(event_t *);
|
||||
|
|
124
src/term.c
124
src/term.c
|
@ -937,7 +937,7 @@ process_csi_seq(void)
|
|||
break;
|
||||
case 9:
|
||||
#ifdef PIXMAP_OFFSET
|
||||
if (image_mode_is(image_bg, MODE_TRANS)) {
|
||||
if (Options & Opt_pixmapTrans) {
|
||||
char tbuff[70];
|
||||
char shading = 0;
|
||||
unsigned long tint = 0xffffff;
|
||||
|
@ -1629,7 +1629,7 @@ xterm_seq(int op, const char *str)
|
|||
|
||||
XColor xcol;
|
||||
char *nstr, *tnstr, *orig_tnstr;
|
||||
unsigned char eterm_seq_op, which = 0;
|
||||
unsigned char eterm_seq_op;
|
||||
#ifdef PIXMAP_SUPPORT
|
||||
unsigned char changed = 0, scaled = 0;
|
||||
char *color, *mod, *valptr;
|
||||
|
@ -1645,9 +1645,6 @@ xterm_seq(int op, const char *str)
|
|||
switch (op) {
|
||||
case XTerm_title:
|
||||
set_title(str);
|
||||
break;
|
||||
case XTerm_prop:
|
||||
|
||||
break;
|
||||
case XTerm_name:
|
||||
set_title(str); /* drop */
|
||||
|
@ -1689,10 +1686,10 @@ xterm_seq(int op, const char *str)
|
|||
may not be needed.
|
||||
*/
|
||||
|
||||
D_CMD(("Got XTerm_EtermSeq sequence\n"));
|
||||
D_EVENTS(("Got XTerm_EtermSeq sequence\n"));
|
||||
nstr = strsep(&tnstr, ";");
|
||||
eterm_seq_op = (unsigned char) strtol(nstr, (char **) NULL, 10);
|
||||
D_CMD((" XTerm_EtermSeq operation is %d\n", eterm_seq_op));
|
||||
D_EVENTS((" XTerm_EtermSeq operation is %d\n", eterm_seq_op));
|
||||
/* Yes, there is order to the numbers for this stuff. And here it is:
|
||||
0-9 Transparency Configuration
|
||||
10-14 Scrollbar Configuration
|
||||
|
@ -1707,72 +1704,40 @@ xterm_seq(int op, const char *str)
|
|||
#ifdef PIXMAP_OFFSET
|
||||
case 0:
|
||||
nstr = strsep(&tnstr, ";");
|
||||
if (nstr) {
|
||||
if (BOOL_OPT_ISTRUE(nstr)) {
|
||||
D_CMD((" Request to enable transparency.\n"));
|
||||
FOREACH_IMAGE(if (!image_mode_is(idx, MODE_TRANS) && image_mode_is(idx, ALLOW_TRANS)) { \
|
||||
image_set_mode(idx, MODE_TRANS); \
|
||||
if (images[idx].current->pmap->pixmap != None) { \
|
||||
Imlib_free_pixmap(imlib_id, images[idx].current->pmap->pixmap); \
|
||||
} \
|
||||
images[idx].current->pmap->pixmap = None; \
|
||||
});
|
||||
} else if (BOOL_OPT_ISFALSE(nstr)) {
|
||||
D_CMD((" Request to disable transparency.\n"));
|
||||
FOREACH_IMAGE(if (image_mode_is(idx, MODE_TRANS)) {if (image_mode_is(idx, ALLOW_IMAGE)) {image_set_mode(idx, MODE_IMAGE);} else {image_set_mode(idx, MODE_SOLID);}});
|
||||
} else {
|
||||
D_CMD((" Bad boolean value in transparency request.\n"));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
D_CMD((" Request to toggle transparency.\n"));
|
||||
FOREACH_IMAGE(if (!image_mode_is(idx, MODE_TRANS) && image_mode_is(idx, ALLOW_TRANS)) { \
|
||||
image_set_mode(idx, MODE_TRANS); \
|
||||
if (images[idx].current->pmap->pixmap != None) { \
|
||||
Imlib_free_pixmap(imlib_id, images[idx].current->pmap->pixmap); \
|
||||
} \
|
||||
images[idx].current->pmap->pixmap = None; \
|
||||
} else if (image_mode_is(idx, MODE_TRANS)) {if (image_mode_is(idx, ALLOW_IMAGE)) {image_set_mode(idx, MODE_IMAGE);} else {image_set_mode(idx, MODE_SOLID);}});
|
||||
}
|
||||
redraw_all_images();
|
||||
OPT_SET_OR_TOGGLE_NEG(nstr, Options, Opt_pixmapTrans);
|
||||
if (Options & Opt_pixmapTrans) {
|
||||
Options &= ~(Opt_pixmapTrans);
|
||||
} else {
|
||||
Options |= Opt_pixmapTrans;
|
||||
if (images[image_bg].current->pmap->pixmap != None) {
|
||||
Imlib_free_pixmap(imlib_id, images[image_bg].current->pmap->pixmap);
|
||||
}
|
||||
images[image_bg].current->pmap->pixmap = None;
|
||||
}
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
render_simage(images[image_sb].current, scrollBar.win, scrollbar_trough_width(), scrollbar_trough_height(), image_sb, 0);
|
||||
scrollbar_show(0);
|
||||
break;
|
||||
case 1:
|
||||
if ((color = strsep(&tnstr, ";")) == NULL) {
|
||||
color = strsep(&tnstr, ";");
|
||||
if (!color) {
|
||||
break;
|
||||
}
|
||||
if ((strlen(color) == 2) || (!strcasecmp(color, "down"))) {
|
||||
/* They specified an image index */
|
||||
if (!strcasecmp(color, "bg")) {
|
||||
which = image_bg;
|
||||
} else if (!strcasecmp(color, "sb")) {
|
||||
which = image_sb;
|
||||
} else if (!strcasecmp(color, "sa")) {
|
||||
which = image_sa;
|
||||
} else if (!strcasecmp(color, "up")) {
|
||||
which = image_up;
|
||||
} else if (!strcasecmp(color, "down")) {
|
||||
which = image_down;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
if ((color = strsep(&tnstr, ";")) == NULL) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
which = image_bg;
|
||||
}
|
||||
if ((mod = strsep(&tnstr, ";")) == NULL) {
|
||||
mod = strsep(&tnstr, ";");
|
||||
if (!mod) {
|
||||
break;
|
||||
}
|
||||
if ((valptr = strsep(&tnstr, ";")) == NULL) {
|
||||
valptr = strsep(&tnstr, ";");
|
||||
if (!valptr) {
|
||||
break;
|
||||
}
|
||||
D_CMD(("Modifying the %s attribute of the %s color modifier of the %s image to be %s\n", mod, color, get_image_type(which), valptr));
|
||||
if (image_mode_is(which, MODE_TRANS) && (desktop_pixmap != None)) {
|
||||
D_EVENTS(("Modifying the %s attribute of the %s color modifier to be %s\n", mod, color, valptr));
|
||||
if (Options & Opt_pixmapTrans && desktop_pixmap != None) {
|
||||
free_desktop_pixmap();
|
||||
desktop_pixmap = None; /* Force the re-read */
|
||||
}
|
||||
if (image_mode_is(which, MODE_VIEWPORT) && (viewport_pixmap != None)) {
|
||||
if (Options & Opt_viewport_mode && viewport_pixmap != None) {
|
||||
XFreePixmap(Xdisplay, viewport_pixmap);
|
||||
viewport_pixmap = None; /* Force the re-read */
|
||||
}
|
||||
|
@ -1836,18 +1801,19 @@ xterm_seq(int op, const char *str)
|
|||
iml->bmod->gamma = (int) strtol(valptr, (char **) NULL, 0);
|
||||
}
|
||||
}
|
||||
redraw_all_images();
|
||||
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
break;
|
||||
case 3:
|
||||
if (desktop_pixmap != None) {
|
||||
free_desktop_pixmap();
|
||||
}
|
||||
get_desktop_window();
|
||||
if (desktop_window == None) {
|
||||
FOREACH_IMAGE(if (image_mode_is(idx, MODE_TRANS)) {image_set_mode(idx, MODE_IMAGE); image_allow_mode(idx, ALLOW_IMAGE);});
|
||||
break;
|
||||
}
|
||||
redraw_all_images();
|
||||
if (Options & Opt_pixmapTrans) {
|
||||
get_desktop_window();
|
||||
if (desktop_pixmap != None) {
|
||||
free_desktop_pixmap();
|
||||
}
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case 10:
|
||||
|
@ -1932,8 +1898,9 @@ xterm_seq(int op, const char *str)
|
|||
break;
|
||||
case 24:
|
||||
nstr = strsep(&tnstr, ";");
|
||||
FOREACH_IMAGE(if (!image_mode_is(idx, MODE_VIEWPORT) && image_mode_is(idx, ALLOW_VIEWPORT)) {image_set_mode(idx, MODE_VIEWPORT);});
|
||||
redraw_all_images();
|
||||
OPT_SET_OR_TOGGLE(nstr, Options, Opt_viewport_mode);
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
break;
|
||||
case 25:
|
||||
nstr = strsep(&tnstr, ";");
|
||||
|
@ -2005,7 +1972,11 @@ xterm_seq(int op, const char *str)
|
|||
|
||||
case XTerm_Pixmap:
|
||||
#ifdef PIXMAP_SUPPORT
|
||||
FOREACH_IMAGE(if (!image_mode_is(idx, MODE_IMAGE) && image_mode_is(idx, ALLOW_IMAGE)) {image_set_mode(idx, MODE_IMAGE);});
|
||||
# ifdef PIXMAP_OFFSET
|
||||
if (Options & Opt_pixmapTrans) {
|
||||
Options &= ~(Opt_pixmapTrans);
|
||||
}
|
||||
# endif
|
||||
if (!strcmp(str, ";")) {
|
||||
load_image("", image_bg);
|
||||
bg_needs_update = 1;
|
||||
|
@ -2027,7 +1998,8 @@ xterm_seq(int op, const char *str)
|
|||
}
|
||||
}
|
||||
if ((changed) || (bg_needs_update)) {
|
||||
redraw_image(image_bg);
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
scr_touch();
|
||||
}
|
||||
#endif /* PIXMAP_SUPPORT */
|
||||
break;
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
# define XTerm_name 0
|
||||
# define XTerm_iconName 1
|
||||
# define XTerm_title 2
|
||||
# define XTerm_prop 3
|
||||
# define XTerm_logfile 46
|
||||
# define XTerm_font 50
|
||||
|
||||
|
|
|
@ -151,8 +151,8 @@ Create_Windows(int argc, char *argv[])
|
|||
XWMHints wmHint;
|
||||
Atom prop = None;
|
||||
CARD32 val;
|
||||
int i, x = 0, y = 0, flags;
|
||||
unsigned int width = 0, height = 0;
|
||||
int i, x, y, flags;
|
||||
unsigned int width, height;
|
||||
unsigned int r, g, b;
|
||||
MWMHints mwmhints;
|
||||
|
||||
|
@ -348,9 +348,7 @@ Create_Windows(int argc, char *argv[])
|
|||
szHint.y = y;
|
||||
szHint.flags |= USPosition;
|
||||
}
|
||||
if (flags) {
|
||||
D_X11(("Geometry values after parsing: %dx%d%+d%+d\n", width, height, x, y));
|
||||
}
|
||||
D_X11(("Geometry values after parsing: %dx%d%+d%+d\n", width, height, x, y));
|
||||
|
||||
/* parent window - reverse video so we can see placement errors
|
||||
* sub-window placement & size in resize_subwindows()
|
||||
|
@ -500,9 +498,11 @@ resize_subwindows(int width, int height)
|
|||
}
|
||||
#endif
|
||||
width -= scrollbar_trough_width();
|
||||
XMoveResizeWindow(Xdisplay, scrollBar.win, ((Options & Opt_scrollBar_right) ? (width) : (x)), 0, scrollbar_trough_width(), height);
|
||||
XMoveResizeWindow(Xdisplay, scrollBar.win,
|
||||
((Options & Opt_scrollBar_right) ? (width) : (x)),
|
||||
0, scrollbar_trough_width(), height);
|
||||
if (scrollbar_is_pixmapped()) {
|
||||
scrollbar_show(0);
|
||||
render_simage(images[image_sb].current, scrollBar.win, scrollbar_trough_width(), scrollbar_trough_height(), image_sb, 0);
|
||||
}
|
||||
if (!(Options & Opt_scrollBar_right)) {
|
||||
x = scrollbar_trough_width();
|
||||
|
@ -514,39 +514,40 @@ resize_subwindows(int width, int height)
|
|||
if (old_width)
|
||||
Gr_Resize(old_width, old_height);
|
||||
#endif
|
||||
if (!(background_is_pixmap())) {
|
||||
XClearWindow(Xdisplay, TermWin.vt);
|
||||
if (!(background_is_pixmap()))
|
||||
XSetWindowBackground(Xdisplay, TermWin.vt, PixColors[bgColor]);
|
||||
XClearWindow(Xdisplay, TermWin.vt);
|
||||
scr_touch();
|
||||
} else {
|
||||
|
||||
#ifdef PIXMAP_SUPPORT
|
||||
# ifdef USE_POSIX_THREADS
|
||||
|
||||
D_PIXMAP(("resize_subwindows(): start_bg_thread()\n"));
|
||||
pthread_attr_init(&resize_sub_thr_attr);
|
||||
D_PIXMAP(("resize_subwindows(): start_bg_thread()\n"));
|
||||
pthread_attr_init(&resize_sub_thr_attr);
|
||||
|
||||
# ifdef MUTEX_SYNCH
|
||||
if (pthread_mutex_trylock(&mutex) == EBUSY) {
|
||||
D_THREADS(("resize_subwindows(): mutex locked, bbl\n"));
|
||||
} else {
|
||||
D_THREADS(("pthread_mutex_trylock(&mutex): "));
|
||||
pthread_mutex_unlock(&mutex);
|
||||
D_THREADS(("pthread_mutex_unlock(&mutex)\n"));
|
||||
}
|
||||
if (pthread_mutex_trylock(&mutex) == EBUSY) {
|
||||
D_THREADS(("resize_subwindows(): mutex locked, bbl\n"));
|
||||
} else {
|
||||
D_THREADS(("pthread_mutex_trylock(&mutex): "));
|
||||
pthread_mutex_unlock(&mutex);
|
||||
D_THREADS(("pthread_mutex_unlock(&mutex)\n"));
|
||||
}
|
||||
# endif
|
||||
|
||||
if (!(pthread_create(&resize_sub_thr, &resize_sub_thr_attr, (void *) &render_bg_thread, NULL))) {
|
||||
/* bg_set = 0; */
|
||||
D_THREADS(("thread created\n"));
|
||||
} else {
|
||||
D_THREADS(("pthread_create() failed!\n"));
|
||||
}
|
||||
if (!(pthread_create(&resize_sub_thr, &resize_sub_thr_attr,
|
||||
(void *) &render_bg_thread, NULL))) {
|
||||
/* bg_set = 0; */
|
||||
D_THREADS(("thread created\n"));
|
||||
} else {
|
||||
D_THREADS(("pthread_create() failed!\n"));
|
||||
}
|
||||
|
||||
# else
|
||||
redraw_image(image_bg);
|
||||
D_PIXMAP(("resize_subwindows(): render_pixmap(TermWin.vt)\n"));
|
||||
render_simage(images[image_bg].current, TermWin.vt, TermWin_TotalWidth(), TermWin_TotalHeight(), image_bg, 1);
|
||||
XSync(Xdisplay, 0);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -600,8 +601,11 @@ resize_window1(unsigned int width, unsigned int height)
|
|||
if (curr_screen >= 0) /* this is not the first time thru */
|
||||
scr_change_screen(curr_screen);
|
||||
first_time = 0;
|
||||
} else if (image_mode_is(image_bg, MODE_TRANS) || image_mode_is(image_bg, MODE_VIEWPORT)) {
|
||||
} else if (((Options & Opt_pixmapTrans) || (images[image_bg].mode & MODE_TRANS))
|
||||
|| ((Options & Opt_viewport_mode) || (images[image_bg].mode & MODE_VIEWPORT))) {
|
||||
resize_subwindows(width, height);
|
||||
scrollbar_show(0);
|
||||
scr_touch();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,24 +44,24 @@ begin main
|
|||
# The colors below are taken from Rasterman's .Xdefaults file. They are intended to
|
||||
# display ANSI art properly when combined with a good ANSI-art font (like vga or
|
||||
# Rasterman's nexus font).
|
||||
color 0 0 0 0
|
||||
color 1 0xaa 0 0
|
||||
color 2 0 0210 0
|
||||
color 3 0xaa 0x55 0x22
|
||||
color 4 0 0 0xaa
|
||||
color 5 0xaa 0 0xaa
|
||||
color 6 0 0xaa 0xaa
|
||||
color 7 0xaa 0xaa 0xaa
|
||||
color 8 0x44 0x44 0x44
|
||||
color 9 0xff 0x44 0x44
|
||||
color 10 0x44 0xff 0x44
|
||||
color 11 0xff 0xff 0x44
|
||||
color 12 0x44 0x44 0xff
|
||||
color 13 0xff 0x44 0xff
|
||||
color 14 0x44 0xff 0xff
|
||||
color 15 #ffffff
|
||||
color bd #ffffff
|
||||
color ul #ffffff
|
||||
# color 0 0 0 0
|
||||
# color 1 0xaa 0 0
|
||||
# color 2 0 0210 0
|
||||
# color 3 0xaa 0x55 0x22
|
||||
# color 4 0 0 0xaa
|
||||
# color 5 0xaa 0 0xaa
|
||||
# color 6 0 0xaa 0xaa
|
||||
# color 7 0xaa 0xaa 0xaa
|
||||
# color 8 0x44 0x44 0x44
|
||||
# color 9 0xff 0x44 0x44
|
||||
# color 10 0x44 0xff 0x44
|
||||
# color 11 0xff 0xff 0x44
|
||||
# color 12 0x44 0x44 0xff
|
||||
# color 13 0xff 0x44 0xff
|
||||
# color 14 0x44 0xff 0xff
|
||||
# color 15 #ffffff
|
||||
# color bd #ffffff
|
||||
# color ul #ffffff
|
||||
|
||||
# This ends the color section. Any text after the word "end" is
|
||||
# assumed to be a comment and ignored.
|
||||
|
@ -121,7 +121,7 @@ begin main
|
|||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
|
||||
# Set the image border. This is a portion of the image which will be kept at its actual size when
|
||||
# scaling. Use this for beveled images (buttons, etc.).
|
||||
|
@ -133,7 +133,7 @@ begin main
|
|||
# The rest of the images.
|
||||
begin image
|
||||
type trough
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
state normal
|
||||
file bar_vertical_3.png
|
||||
# Here is how you specify the geometry string separately. See the man page for its syntax.
|
||||
|
@ -142,7 +142,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type anchor
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_vertical_1.png
|
||||
geom :scale
|
||||
|
@ -154,7 +153,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type up_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_up_1.png
|
||||
geom :scale
|
||||
|
@ -170,7 +168,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type down_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_down_1.png
|
||||
geom :scale
|
||||
|
@ -186,7 +183,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type menu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_horizontal_1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
@ -198,7 +194,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type submenu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file menu1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
|
|
@ -43,24 +43,24 @@ begin main
|
|||
|
||||
# These colors are taken from Alfredo Kojima's cEterm script. Lots of
|
||||
# people seem to like them. :-)
|
||||
color 0 0 0 0
|
||||
color 1 0x9e 0x18 0x28
|
||||
color 2 0x9e 0x18 0x28
|
||||
color 3 #968a38
|
||||
color 4 #414171
|
||||
color 5 #963c59
|
||||
color 6 #418179
|
||||
color 7 gray
|
||||
color 8 gray40
|
||||
color 9 #cf6171
|
||||
color 10 #c5f779
|
||||
color 11 #fff796
|
||||
color 12 #4186be
|
||||
color 13 #cf9ebe
|
||||
color 14 #71bebe
|
||||
color 15 white
|
||||
color bd white
|
||||
color ul white
|
||||
color 0 0 0 0
|
||||
color 1 0x9e 0x18 0x28
|
||||
color 2 0x9e 0x18 0x28
|
||||
color 3 #968a38
|
||||
color 4 #414171
|
||||
color 5 #963c59
|
||||
color 6 #418179
|
||||
color 7 gray
|
||||
color 8 gray40
|
||||
color 9 #cf6171
|
||||
color 10 #c5f779
|
||||
color 11 #fff796
|
||||
color 12 #4186be
|
||||
color 13 #cf9ebe
|
||||
color 14 #71bebe
|
||||
color 15 white
|
||||
color bd white
|
||||
color ul white
|
||||
|
||||
# This ends the color section. Any text after the word "end" is
|
||||
# assumed to be a comment and ignored.
|
||||
|
@ -120,7 +120,7 @@ begin main
|
|||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
|
||||
# Set the image border. This is a portion of the image which will be kept at its actual size when
|
||||
# scaling. Use this for beveled images (buttons, etc.).
|
||||
|
@ -132,7 +132,7 @@ begin main
|
|||
# The rest of the images.
|
||||
begin image
|
||||
type trough
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
state normal
|
||||
file bar_vertical_3.png
|
||||
# Here is how you specify the geometry string separately. See the man page for its syntax.
|
||||
|
@ -141,7 +141,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type anchor
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_vertical_1.png
|
||||
geom :scale
|
||||
|
@ -153,7 +152,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type up_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_up_1.png
|
||||
geom :scale
|
||||
|
@ -169,7 +167,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type down_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_down_1.png
|
||||
geom :scale
|
||||
|
@ -185,7 +182,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type menu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_horizontal_1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
@ -197,7 +193,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type submenu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file menu1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
|
|
@ -44,24 +44,24 @@ begin main
|
|||
# The colors below are taken from Rasterman's .Xdefaults file. They are intended to
|
||||
# display ANSI art properly when combined with a good ANSI-art font (like vga or
|
||||
# Rasterman's nexus font).
|
||||
color 0 0 0 0
|
||||
color 1 0xaa 0 0
|
||||
color 2 0 0210 0
|
||||
color 3 0xaa 0x55 0x22
|
||||
color 4 0 0 0xaa
|
||||
color 5 0xaa 0 0xaa
|
||||
color 6 0 0xaa 0xaa
|
||||
color 7 0xaa 0xaa 0xaa
|
||||
color 8 0x44 0x44 0x44
|
||||
color 9 0xff 0x44 0x44
|
||||
color 10 0x44 0xff 0x44
|
||||
color 11 0xff 0xff 0x44
|
||||
color 12 0x44 0x44 0xff
|
||||
color 13 0xff 0x44 0xff
|
||||
color 14 0x44 0xff 0xff
|
||||
color 15 #ffffff
|
||||
color bd #ffffff
|
||||
color ul #ffffff
|
||||
# color 0 0 0 0
|
||||
# color 1 0xaa 0 0
|
||||
# color 2 0 0210 0
|
||||
# color 3 0xaa 0x55 0x22
|
||||
# color 4 0 0 0xaa
|
||||
# color 5 0xaa 0 0xaa
|
||||
# color 6 0 0xaa 0xaa
|
||||
# color 7 0xaa 0xaa 0xaa
|
||||
# color 8 0x44 0x44 0x44
|
||||
# color 9 0xff 0x44 0x44
|
||||
# color 10 0x44 0xff 0x44
|
||||
# color 11 0xff 0xff 0x44
|
||||
# color 12 0x44 0x44 0xff
|
||||
# color 13 0xff 0x44 0xff
|
||||
# color 14 0x44 0xff 0xff
|
||||
# color 15 #ffffff
|
||||
# color bd #ffffff
|
||||
# color ul #ffffff
|
||||
|
||||
# This ends the color section. Any text after the word "end" is
|
||||
# assumed to be a comment and ignored.
|
||||
|
@ -121,7 +121,7 @@ begin main
|
|||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
|
||||
# Set the image border. This is a portion of the image which will be kept at its actual size when
|
||||
# scaling. Use this for beveled images (buttons, etc.).
|
||||
|
@ -133,7 +133,7 @@ begin main
|
|||
# The rest of the images.
|
||||
begin image
|
||||
type trough
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
state normal
|
||||
file bar_vertical_3.png
|
||||
# Here is how you specify the geometry string separately. See the man page for its syntax.
|
||||
|
@ -142,7 +142,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type anchor
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_vertical_1.png
|
||||
geom :scale
|
||||
|
@ -154,7 +153,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type up_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_up_1.png
|
||||
geom :scale
|
||||
|
@ -170,7 +168,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type down_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_down_1.png
|
||||
geom :scale
|
||||
|
@ -186,7 +183,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type menu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_horizontal_1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
@ -198,7 +194,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type submenu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file menu1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
|
|
@ -44,24 +44,24 @@ begin main
|
|||
# The colors below are taken from Rasterman's .Xdefaults file. They are intended to
|
||||
# display ANSI art properly when combined with a good ANSI-art font (like vga or
|
||||
# Rasterman's nexus font).
|
||||
color 0 0 0 0
|
||||
color 1 0xaa 0 0
|
||||
color 2 0 0210 0
|
||||
color 3 0xaa 0x55 0x22
|
||||
color 4 0 0 0xaa
|
||||
color 5 0xaa 0 0xaa
|
||||
color 6 0 0xaa 0xaa
|
||||
color 7 0xaa 0xaa 0xaa
|
||||
color 8 0x44 0x44 0x44
|
||||
color 9 0xff 0x44 0x44
|
||||
color 10 0x44 0xff 0x44
|
||||
color 11 0xff 0xff 0x44
|
||||
color 12 0x44 0x44 0xff
|
||||
color 13 0xff 0x44 0xff
|
||||
color 14 0x44 0xff 0xff
|
||||
color 15 #ffffff
|
||||
color bd #ffffff
|
||||
color ul #ffffff
|
||||
# color 0 0 0 0
|
||||
# color 1 0xaa 0 0
|
||||
# color 2 0 0210 0
|
||||
# color 3 0xaa 0x55 0x22
|
||||
# color 4 0 0 0xaa
|
||||
# color 5 0xaa 0 0xaa
|
||||
# color 6 0 0xaa 0xaa
|
||||
# color 7 0xaa 0xaa 0xaa
|
||||
# color 8 0x44 0x44 0x44
|
||||
# color 9 0xff 0x44 0x44
|
||||
# color 10 0x44 0xff 0x44
|
||||
# color 11 0xff 0xff 0x44
|
||||
# color 12 0x44 0x44 0xff
|
||||
# color 13 0xff 0x44 0xff
|
||||
# color 14 0x44 0xff 0xff
|
||||
# color 15 #ffffff
|
||||
# color bd #ffffff
|
||||
# color ul #ffffff
|
||||
|
||||
# This ends the color section. Any text after the word "end" is
|
||||
# assumed to be a comment and ignored.
|
||||
|
@ -121,7 +121,7 @@ begin main
|
|||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
|
||||
# Set the image border. This is a portion of the image which will be kept at its actual size when
|
||||
# scaling. Use this for beveled images (buttons, etc.).
|
||||
|
@ -133,7 +133,7 @@ begin main
|
|||
# The rest of the images.
|
||||
begin image
|
||||
type trough
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
state normal
|
||||
file bar_vertical_3.png
|
||||
# Here is how you specify the geometry string separately. See the man page for its syntax.
|
||||
|
@ -142,7 +142,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type anchor
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_vertical_1.png
|
||||
geom :scale
|
||||
|
@ -154,7 +153,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type up_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_up_1.png
|
||||
geom :scale
|
||||
|
@ -170,7 +168,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type down_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_down_1.png
|
||||
geom :scale
|
||||
|
@ -186,7 +183,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type menu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_horizontal_1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
@ -198,7 +194,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type submenu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file menu1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
|
|
@ -44,24 +44,24 @@ begin main
|
|||
# The colors below are taken from Rasterman's .Xdefaults file. They are intended to
|
||||
# display ANSI art properly when combined with a good ANSI-art font (like vga or
|
||||
# Rasterman's nexus font).
|
||||
color 0 0 0 0
|
||||
color 1 0xaa 0 0
|
||||
color 2 0 0210 0
|
||||
color 3 0xaa 0x55 0x22
|
||||
color 4 0 0 0xaa
|
||||
color 5 0xaa 0 0xaa
|
||||
color 6 0 0xaa 0xaa
|
||||
color 7 0xaa 0xaa 0xaa
|
||||
color 8 0x44 0x44 0x44
|
||||
color 9 0xff 0x44 0x44
|
||||
color 10 0x44 0xff 0x44
|
||||
color 11 0xff 0xff 0x44
|
||||
color 12 0x44 0x44 0xff
|
||||
color 13 0xff 0x44 0xff
|
||||
color 14 0x44 0xff 0xff
|
||||
color 15 #ffffff
|
||||
color bd #ffffff
|
||||
color ul #ffffff
|
||||
color 0 0 0 0
|
||||
color 1 0xaa 0 0
|
||||
color 2 0 0210 0
|
||||
color 3 0xaa 0x55 0x22
|
||||
color 4 0 0 0xaa
|
||||
color 5 0xaa 0 0xaa
|
||||
color 6 0 0xaa 0xaa
|
||||
color 7 0xaa 0xaa 0xaa
|
||||
color 8 0x44 0x44 0x44
|
||||
color 9 0xff 0x44 0x44
|
||||
color 10 0x44 0xff 0x44
|
||||
color 11 0xff 0xff 0x44
|
||||
color 12 0x44 0x44 0xff
|
||||
color 13 0xff 0x44 0xff
|
||||
color 14 0x44 0xff 0xff
|
||||
color 15 #ffffff
|
||||
color bd #ffffff
|
||||
color ul #ffffff
|
||||
|
||||
# This ends the color section. Any text after the word "end" is
|
||||
# assumed to be a comment and ignored.
|
||||
|
@ -111,11 +111,6 @@ begin main
|
|||
# trough, anchor, menu, or submenu
|
||||
type background
|
||||
|
||||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode image allow image trans viewport auto
|
||||
|
||||
# Next you should set the state. This is either normal, selected, or clicked.
|
||||
state normal
|
||||
|
||||
|
@ -123,6 +118,11 @@ begin main
|
|||
# an @ sign. That way, you can include the geometries in your pixmaps.list file.
|
||||
file %random(`cat pixmaps.list`)
|
||||
|
||||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode image allow trans viewport
|
||||
|
||||
# Set the image border. This is a portion of the image which will be kept at its actual size when
|
||||
# scaling. Use this for beveled images (buttons, etc.).
|
||||
border 0 0 0 0
|
||||
|
@ -133,7 +133,7 @@ begin main
|
|||
# The rest of the images.
|
||||
begin image
|
||||
type trough
|
||||
mode image allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
state normal
|
||||
file bar_vertical_3.png
|
||||
# Here is how you specify the geometry string separately. See the man page for its syntax.
|
||||
|
@ -142,7 +142,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type anchor
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_vertical_1.png
|
||||
geom :scale
|
||||
|
@ -154,7 +153,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type up_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_up_1.png
|
||||
geom :scale
|
||||
|
@ -170,7 +168,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type down_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_down_1.png
|
||||
geom :scale
|
||||
|
@ -186,7 +183,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type menu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_horizontal_1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
@ -198,7 +194,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type submenu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file menu1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Eterm-0.9>
|
||||
<Eterm-0.8>
|
||||
# ^- This must be the first line of any Eterm config file!
|
||||
# Format is: <Eterm-VERSION> where VERSION is replaced by
|
||||
# the version it was written for,
|
||||
|
@ -44,24 +44,24 @@ begin main
|
|||
# The colors below are taken from Rasterman's .Xdefaults file. They are intended to
|
||||
# display ANSI art properly when combined with a good ANSI-art font (like vga or
|
||||
# Rasterman's nexus font).
|
||||
color 0 0 0 0
|
||||
color 1 0xaa 0 0
|
||||
color 2 0 0210 0
|
||||
color 3 0xaa 0x55 0x22
|
||||
color 4 0 0 0xaa
|
||||
color 5 0xaa 0 0xaa
|
||||
color 6 0 0xaa 0xaa
|
||||
color 7 0xaa 0xaa 0xaa
|
||||
color 8 0x44 0x44 0x44
|
||||
color 9 0xff 0x44 0x44
|
||||
color 10 0x44 0xff 0x44
|
||||
color 11 0xff 0xff 0x44
|
||||
color 12 0x44 0x44 0xff
|
||||
color 13 0xff 0x44 0xff
|
||||
color 14 0x44 0xff 0xff
|
||||
color 15 #ffffff
|
||||
color bd #ffffff
|
||||
color ul #ffffff
|
||||
# color 0 0 0 0
|
||||
# color 1 0xaa 0 0
|
||||
# color 2 0 0210 0
|
||||
# color 3 0xaa 0x55 0x22
|
||||
# color 4 0 0 0xaa
|
||||
# color 5 0xaa 0 0xaa
|
||||
# color 6 0 0xaa 0xaa
|
||||
# color 7 0xaa 0xaa 0xaa
|
||||
# color 8 0x44 0x44 0x44
|
||||
# color 9 0xff 0x44 0x44
|
||||
# color 10 0x44 0xff 0x44
|
||||
# color 11 0xff 0xff 0x44
|
||||
# color 12 0x44 0x44 0xff
|
||||
# color 13 0xff 0x44 0xff
|
||||
# color 14 0x44 0xff 0xff
|
||||
# color 15 #ffffff
|
||||
# color bd #ffffff
|
||||
# color ul #ffffff
|
||||
|
||||
# This ends the color section. Any text after the word "end" is
|
||||
# assumed to be a comment and ignored.
|
||||
|
@ -111,11 +111,6 @@ begin main
|
|||
# trough, anchor, menu, or submenu
|
||||
type background
|
||||
|
||||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode image allow image trans viewport auto
|
||||
|
||||
# Next you should set the state. This is either normal, selected, or clicked.
|
||||
state normal
|
||||
|
||||
|
@ -123,6 +118,11 @@ begin main
|
|||
# an @ sign. That way, you can include the geometries in your pixmaps.list file.
|
||||
file %random(`cat pixmaps.list`)
|
||||
|
||||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode image allow trans viewport
|
||||
|
||||
# Set the image border. This is a portion of the image which will be kept at its actual size when
|
||||
# scaling. Use this for beveled images (buttons, etc.).
|
||||
border 0 0 0 0
|
||||
|
@ -132,7 +132,6 @@ begin main
|
|||
|
||||
begin image
|
||||
type menu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_horizontal_1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
@ -144,7 +143,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type submenu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file menu1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
|
|
@ -44,24 +44,24 @@ begin main
|
|||
# The colors below are taken from Rasterman's .Xdefaults file. They are intended to
|
||||
# display ANSI art properly when combined with a good ANSI-art font (like vga or
|
||||
# Rasterman's nexus font).
|
||||
color 0 0 0 0
|
||||
color 1 0xaa 0 0
|
||||
color 2 0 0210 0
|
||||
color 3 0xaa 0x55 0x22
|
||||
color 4 0 0 0xaa
|
||||
color 5 0xaa 0 0xaa
|
||||
color 6 0 0xaa 0xaa
|
||||
color 7 0xaa 0xaa 0xaa
|
||||
color 8 0x44 0x44 0x44
|
||||
color 9 0xff 0x44 0x44
|
||||
color 10 0x44 0xff 0x44
|
||||
color 11 0xff 0xff 0x44
|
||||
color 12 0x44 0x44 0xff
|
||||
color 13 0xff 0x44 0xff
|
||||
color 14 0x44 0xff 0xff
|
||||
color 15 #ffffff
|
||||
color bd #ffffff
|
||||
color ul #ffffff
|
||||
# color 0 0 0 0
|
||||
# color 1 0xaa 0 0
|
||||
# color 2 0 0210 0
|
||||
# color 3 0xaa 0x55 0x22
|
||||
# color 4 0 0 0xaa
|
||||
# color 5 0xaa 0 0xaa
|
||||
# color 6 0 0xaa 0xaa
|
||||
# color 7 0xaa 0xaa 0xaa
|
||||
# color 8 0x44 0x44 0x44
|
||||
# color 9 0xff 0x44 0x44
|
||||
# color 10 0x44 0xff 0x44
|
||||
# color 11 0xff 0xff 0x44
|
||||
# color 12 0x44 0x44 0xff
|
||||
# color 13 0xff 0x44 0xff
|
||||
# color 14 0x44 0xff 0xff
|
||||
# color 15 #ffffff
|
||||
# color bd #ffffff
|
||||
# color ul #ffffff
|
||||
|
||||
# This ends the color section. Any text after the word "end" is
|
||||
# assumed to be a comment and ignored.
|
||||
|
@ -121,7 +121,7 @@ begin main
|
|||
# The mode line. This defines the startup mode for the image, as well as what modes are allowed.
|
||||
# Valid modes are "image" (to display the image file), "trans" (to be transparent), or "viewport"
|
||||
# (for viewport mode). Syntax is "mode <startup_mode> allow <allowed_modes>".
|
||||
mode trans allow image trans viewport auto
|
||||
mode trans allow image trans viewport
|
||||
|
||||
# Set the image border. This is a portion of the image which will be kept at its actual size when
|
||||
# scaling. Use this for beveled images (buttons, etc.).
|
||||
|
@ -133,7 +133,7 @@ begin main
|
|||
# The rest of the images.
|
||||
begin image
|
||||
type trough
|
||||
mode trans allow image trans viewport auto
|
||||
mode image allow trans viewport
|
||||
state normal
|
||||
file bar_vertical_3.png
|
||||
# Here is how you specify the geometry string separately. See the man page for its syntax.
|
||||
|
@ -142,7 +142,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type anchor
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_vertical_1.png
|
||||
geom :scale
|
||||
|
@ -154,7 +153,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type up_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_up_1.png
|
||||
geom :scale
|
||||
|
@ -170,7 +168,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type down_arrow
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file button_arrow_down_1.png
|
||||
geom :scale
|
||||
|
@ -186,7 +183,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type menu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file bar_horizontal_1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
@ -198,7 +194,6 @@ begin main
|
|||
end image
|
||||
begin image
|
||||
type submenu
|
||||
mode image allow image auto
|
||||
state normal
|
||||
file menu1.png
|
||||
geom 100x100+0+0:scale
|
||||
|
@ -296,7 +291,7 @@ begin main
|
|||
borderless true
|
||||
|
||||
# If true, Eterm will use save-unders.
|
||||
backing_store true
|
||||
save_under true
|
||||
|
||||
end toggles
|
||||
|
||||
|
|
Loading…
Reference in New Issue