2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
#ifndef EL__VIEWER_TEXT_SEARCH_H
|
|
|
|
#define EL__VIEWER_TEXT_SEARCH_H
|
|
|
|
|
|
|
|
#include "config/kbdbind.h"
|
|
|
|
#include "document/view.h"
|
|
|
|
#include "viewer/action.h"
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
struct module;
|
|
|
|
struct session;
|
|
|
|
struct terminal;
|
|
|
|
|
|
|
|
extern struct module search_history_module;
|
|
|
|
|
|
|
|
void draw_searched(struct terminal *term, struct document_view *doc_view);
|
|
|
|
|
|
|
|
enum frame_event_status find_next(struct session *ses, struct document_view *doc_view, int direction);
|
2018-04-14 15:49:52 -04:00
|
|
|
enum frame_event_status move_search_next(struct session *ses, struct document_view *doc_view);
|
|
|
|
enum frame_event_status move_search_prev(struct session *ses, struct document_view *doc_view);
|
|
|
|
|
2022-02-11 13:57:36 -05:00
|
|
|
void search_for(struct session *ses, const char *str);
|
2005-09-15 09:58:31 -04:00
|
|
|
enum frame_event_status search_dlg(struct session *ses, struct document_view *doc_view, int direction);
|
|
|
|
enum frame_event_status search_typeahead(struct session *ses, struct document_view *doc_view, action_id_T action_id);
|
|
|
|
|
|
|
|
static inline int has_search_word(struct document_view *doc_view)
|
|
|
|
{
|
|
|
|
return (doc_view->search_word
|
|
|
|
&& *doc_view->search_word
|
|
|
|
&& (*doc_view->search_word)[0]);
|
|
|
|
}
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#endif
|