1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Merge pull request #234 from balducci/master

Allow building with -Dlibsixel=false
This commit is contained in:
rkd77 2023-05-28 12:20:26 +02:00 committed by GitHub
commit edac06cd6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 38 additions and 0 deletions

View File

@ -475,7 +475,9 @@ dialog_func(struct window *win, struct term_event *ev)
case EVENT_RESIZE:
case EVENT_REDRAW:
redraw_dialog(dlg_data, 1);
#ifdef CONFIG_LIBSIXEL
win->term->sixel = 0;
#endif
break;
case EVENT_MOUSE:
@ -490,7 +492,9 @@ dialog_func(struct window *win, struct term_event *ev)
case EVENT_ABORT:
dialog_ev_abort(dlg_data);
#ifdef CONFIG_LIBSIXEL
win->term->sixel = 1;
#endif
break;
}
}

View File

@ -1014,7 +1014,9 @@ menu_handler(struct window *win, struct term_event *ev)
* menu->selected here. */
scroll_menu(menu, 0, 1);
display_menu(win->term, menu);
#ifdef CONFIG_LIBSIXEL
win->term->sixel = 0;
#endif
break;
case EVENT_MOUSE:
@ -1028,7 +1030,9 @@ menu_handler(struct window *win, struct term_event *ev)
break;
case EVENT_ABORT:
#ifdef CONFIG_LIBSIXEL
win->term->sixel = 1;
#endif
free_menu_items(menu->items);
break;
}
@ -1369,7 +1373,9 @@ mainmenu_handler(struct window *win, struct term_event *ev)
break;
case EVENT_ABORT:
#ifdef CONFIG_LIBSIXEL
win->term->sixel = 1;
#endif
break;
}
}

View File

@ -78,7 +78,9 @@
#include "network/dns.h"
#include "protocol/uri.h"
#include "terminal/draw.h"
#ifdef CONFIG_LIBSIXEL
#include "terminal/sixel.h"
#endif
#include "util/color.h"
#include "util/error.h"
#include "util/lists.h"

View File

@ -26,7 +26,9 @@
#include "protocol/uri.h"
#include "terminal/color.h"
#include "terminal/draw.h"
#ifdef CONFIG_LIBSIXEL
#include "terminal/sixel.h"
#endif
#include "util/color.h"
#include "util/error.h"
#include "util/memory.h"
@ -57,7 +59,9 @@ struct plain_renderer {
/* Are we doing line compression */
unsigned int compress:1;
#ifdef CONFIG_LIBSIXEL
unsigned int sixel:1;
#endif
};
#define realloc_document_links(doc, size) \

View File

@ -20,7 +20,9 @@
#include "terminal/hardio.h"
#include "terminal/kbd.h"
#include "terminal/screen.h"
#ifdef CONFIG_LIBSIXEL
#include "terminal/sixel.h"
#endif
#include "terminal/terminal.h"
#ifdef CONFIG_TERMINFO
#include "terminal/terminfo.h"

View File

@ -35,7 +35,9 @@
#include "terminal/hardio.h"
#include "terminal/kbd.h"
#include "terminal/screen.h"
#ifdef CONFIG_LIBSIXEL
#include "terminal/sixel.h"
#endif
#include "terminal/terminal.h"
#ifdef CONFIG_TERMINFO
#include "terminal/terminfo.h"
@ -56,7 +58,11 @@ redraw_terminal(struct terminal *term)
{
struct term_event ev;
#ifdef CONFIG_LIBSIXEL
set_redraw_term_event(&ev, term->width, term->height, term->cell_width, term->cell_height);
#else
set_redraw_term_event(&ev, term->width, term->height, 0, 0);
#endif
term_send_event(term, &ev);
}
@ -65,7 +71,11 @@ redraw_terminal_cls(struct terminal *term)
{
struct term_event ev;
#ifdef CONFIG_LIBSIXEL
set_resize_term_event(&ev, term->width, term->height, term->cell_width, term->cell_height);
#else
set_resize_term_event(&ev, term->width, term->height, 0, 0);
#endif
term_send_event(term, &ev);
}

View File

@ -45,7 +45,11 @@ redraw_windows(enum windows_to_redraw which, struct window *win)
return;
}
#ifdef CONFIG_LIBSIXEL
set_redraw_term_event(&ev, term->width, term->height, term->cell_width, term->cell_height);
#else
set_redraw_term_event(&ev, term->width, term->height, 0, 0);
#endif
for (; win != end; win = win->prev) {
if (!inactive_tab(win))
win->handler(win, &ev);
@ -69,7 +73,11 @@ add_window(struct terminal *term, window_handler_T handler, void *data)
win->term = term;
win->type = WINDOW_NORMAL;
add_at_pos((struct window *) &term->windows, win);
#ifdef CONFIG_LIBSIXEL
set_init_term_event(&ev, term->width, term->height, term->cell_width, term->cell_height);
#else
set_init_term_event(&ev, term->width, term->height, 0, 0);
#endif
win->handler(win, &ev);
}

View File

@ -30,7 +30,9 @@
#include "session/location.h"
#include "session/session.h"
#include "terminal/draw.h"
#ifdef CONFIG_LIBSIXEL
#include "terminal/sixel.h"
#endif
#include "terminal/tab.h"
#include "terminal/terminal.h"
#include "util/error.h"