mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -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 "protocol/protocol.h"
|
||||||
#include "scripting/scripting.h"
|
#include "scripting/scripting.h"
|
||||||
#include "terminal/terminal.h"
|
#include "terminal/terminal.h"
|
||||||
#include "viewer/text/marks.h"
|
#include "viewer/viewer.h"
|
||||||
#include "viewer/text/search.h"
|
|
||||||
#include "viewer/timer.h"
|
|
||||||
|
|
||||||
|
|
||||||
struct module *main_modules[] = {
|
struct module *main_modules[] = {
|
||||||
@ -44,10 +42,7 @@ struct module *main_modules[] = {
|
|||||||
/* This is also used for version string composing so keep NULL terminated */
|
/* This is also used for version string composing so keep NULL terminated */
|
||||||
struct module *builtin_modules[] = {
|
struct module *builtin_modules[] = {
|
||||||
&periodic_saving_module,
|
&periodic_saving_module,
|
||||||
&timer_module,
|
&viewer_module,
|
||||||
#ifdef CONFIG_MARKS
|
|
||||||
&viewer_marks_module,
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_CSS
|
#ifdef CONFIG_CSS
|
||||||
&css_module,
|
&css_module,
|
||||||
#endif
|
#endif
|
||||||
@ -81,7 +76,6 @@ struct module *builtin_modules[] = {
|
|||||||
&exmode_module,
|
&exmode_module,
|
||||||
#endif
|
#endif
|
||||||
&goto_url_history_module,
|
&goto_url_history_module,
|
||||||
&search_history_module,
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@ top_builddir=../..
|
|||||||
include $(top_builddir)/Makefile.config
|
include $(top_builddir)/Makefile.config
|
||||||
|
|
||||||
SUBDIRS = dump text
|
SUBDIRS = dump text
|
||||||
OBJS = action.o timer.o
|
OBJS = action.o timer.o viewer.o
|
||||||
|
|
||||||
include $(top_srcdir)/Makefile.lib
|
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…
x
Reference in New Issue
Block a user