mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Create a module for src/viewer, which subsumes some existing modules
as submodules
This commit is contained in:
parent
e91b46de5f
commit
7f312c546c
@ -29,9 +29,7 @@
|
||||
#include "protocol/protocol.h"
|
||||
#include "scripting/scripting.h"
|
||||
#include "terminal/terminal.h"
|
||||
#include "viewer/text/marks.h"
|
||||
#include "viewer/text/search.h"
|
||||
#include "viewer/timer.h"
|
||||
#include "viewer/viewer.h"
|
||||
|
||||
|
||||
struct module *main_modules[] = {
|
||||
@ -44,10 +42,7 @@ struct module *main_modules[] = {
|
||||
/* This is also used for version string composing so keep NULL terminated */
|
||||
struct module *builtin_modules[] = {
|
||||
&periodic_saving_module,
|
||||
&timer_module,
|
||||
#ifdef CONFIG_MARKS
|
||||
&viewer_marks_module,
|
||||
#endif
|
||||
&viewer_module,
|
||||
#ifdef CONFIG_CSS
|
||||
&css_module,
|
||||
#endif
|
||||
@ -81,7 +76,6 @@ struct module *builtin_modules[] = {
|
||||
&exmode_module,
|
||||
#endif
|
||||
&goto_url_history_module,
|
||||
&search_history_module,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,6 @@ top_builddir=../..
|
||||
include $(top_builddir)/Makefile.config
|
||||
|
||||
SUBDIRS = dump text
|
||||
OBJS = action.o timer.o
|
||||
OBJS = action.o timer.o viewer.o
|
||||
|
||||
include $(top_srcdir)/Makefile.lib
|
||||
|
31
src/viewer/viewer.c
Normal file
31
src/viewer/viewer.c
Normal file
@ -0,0 +1,31 @@
|
||||
/* Viewer module */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "elinks.h"
|
||||
|
||||
#include "intl/gettext/libintl.h"
|
||||
#include "main/module.h"
|
||||
#include "viewer/text/marks.h"
|
||||
#include "viewer/text/search.h"
|
||||
#include "viewer/timer.h"
|
||||
|
||||
static struct module *viewer_submodules[] = {
|
||||
&search_history_module,
|
||||
&timer_module,
|
||||
#ifdef CONFIG_MARKS
|
||||
&viewer_marks_module,
|
||||
#endif
|
||||
};
|
||||
|
||||
struct module viewer_module = struct_module(
|
||||
/* name: */ N_("Viewer"),
|
||||
/* options: */ NULL,
|
||||
/* hooks: */ NULL,
|
||||
/* submodules: */ viewer_submodules,
|
||||
/* data: */ NULL,
|
||||
/* init: */ NULL,
|
||||
/* done: */ NULL
|
||||
);
|
8
src/viewer/viewer.h
Normal file
8
src/viewer/viewer.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef EL__VIEWER_VIEWER_H
|
||||
#define EL__VIEWER_VIEWER_H
|
||||
|
||||
struct module;
|
||||
|
||||
extern struct module viewer_module;
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user