mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 05:27:00 +03:00
reduce core header usage
This commit is contained in:
parent
148748b82c
commit
fcde28d97f
@ -29,19 +29,18 @@
|
||||
#include <gadgets/clicktab.h>
|
||||
#include <reaction/reaction_macros.h>
|
||||
|
||||
#include "utils/utils.h"
|
||||
#include "utils/log.h"
|
||||
#include "utils/nsoption.h"
|
||||
#include "utils/nsurl.h"
|
||||
#include "content/hlcache.h"
|
||||
#include "netsurf/browser_window.h"
|
||||
#include "netsurf/window.h"
|
||||
#include "desktop/version.h"
|
||||
|
||||
#include "amiga/arexx.h"
|
||||
#include "amiga/download.h"
|
||||
#include "amiga/gui.h"
|
||||
#include "amiga/download.h"
|
||||
#include "amiga/hotlist.h"
|
||||
#include "amiga/tree.h"
|
||||
#include "amiga/libs.h"
|
||||
#include "amiga/misc.h"
|
||||
#include "amiga/theme.h"
|
||||
|
@ -43,18 +43,15 @@
|
||||
#endif
|
||||
#include "assert.h"
|
||||
|
||||
#include "utils/log.h"
|
||||
#include "utils/nsoption.h"
|
||||
#include "utils/nsurl.h"
|
||||
#include "utils/messages.h"
|
||||
#include "content/hlcache.h"
|
||||
#include "netsurf/mouse.h"
|
||||
#include "netsurf/window.h"
|
||||
#include "netsurf/bitmap.h"
|
||||
|
||||
#include "amiga/gui.h"
|
||||
#include "amiga/bitmap.h"
|
||||
#include "amiga/download.h"
|
||||
#include "amiga/plotters.h"
|
||||
#include "amiga/misc.h"
|
||||
#include "amiga/rtg.h"
|
||||
|
||||
|
@ -62,7 +62,6 @@
|
||||
#include "amiga/bitmap.h"
|
||||
#include "amiga/icon.h"
|
||||
#include "amiga/file.h"
|
||||
#include "amiga/drag.h"
|
||||
#include "amiga/iff_dr2d.h"
|
||||
#include "amiga/libs.h"
|
||||
#include "amiga/misc.h"
|
||||
|
@ -18,15 +18,14 @@
|
||||
|
||||
#ifndef AMIGA_DRAG_H
|
||||
#define AMIGA_DRAG_H
|
||||
|
||||
#include <exec/types.h>
|
||||
#include "netsurf/browser_window.h"
|
||||
#include "netsurf/window.h"
|
||||
|
||||
#define AMI_DRAG_THRESHOLD 10
|
||||
|
||||
struct hlcache_handle;
|
||||
struct Window;
|
||||
|
||||
#define AMI_DRAG_THRESHOLD 10
|
||||
|
||||
int drag_save;
|
||||
void *drag_save_data;
|
||||
struct gui_window *drag_save_gui;
|
||||
@ -41,5 +40,6 @@ void ami_drag_icon_move(void);
|
||||
BOOL ami_drag_in_progress(void);
|
||||
|
||||
void *ami_window_at_pointer(int type);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -4460,7 +4460,7 @@ static void gui_window_destroy(struct gui_window *g)
|
||||
|
||||
if(!g) return;
|
||||
|
||||
if(g->shared->searchwin && (g->shared->searchwin->gwin == g))
|
||||
if (ami_search_get_gwin(g->shared->searchwin) == g)
|
||||
{
|
||||
ami_search_close();
|
||||
win_destroyed = true;
|
||||
|
@ -171,6 +171,13 @@ struct gui_window
|
||||
float scale;
|
||||
};
|
||||
|
||||
struct MinList *window_list;
|
||||
struct Screen *scrn;
|
||||
struct MsgPort *sport;
|
||||
struct gui_window *cur_gw;
|
||||
struct gui_globals browserglob;
|
||||
BOOL ami_autoscroll;
|
||||
|
||||
void ami_get_msg(void);
|
||||
void ami_try_quit(void);
|
||||
void ami_quit_netsurf(void);
|
||||
@ -236,11 +243,5 @@ uint32 ami_gui_get_app_id(void);
|
||||
*/
|
||||
STRPTR ami_gui_get_screen_title(void);
|
||||
|
||||
struct MinList *window_list;
|
||||
struct Screen *scrn;
|
||||
struct MsgPort *sport;
|
||||
struct gui_window *cur_gw;
|
||||
struct gui_globals browserglob;
|
||||
BOOL ami_autoscroll;
|
||||
#endif
|
||||
|
||||
|
@ -21,7 +21,8 @@
|
||||
|
||||
#include <exec/types.h>
|
||||
#include <intuition/classusr.h>
|
||||
#include "amiga/gui.h"
|
||||
|
||||
struct gui_window;
|
||||
|
||||
struct history_window {
|
||||
struct nsObject *node;
|
||||
@ -41,5 +42,6 @@ void ami_history_open(struct gui_window *gw);
|
||||
|
||||
void ami_history_close(struct history_window *hw);
|
||||
BOOL ami_history_event(struct history_window *hw);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -19,16 +19,16 @@
|
||||
#ifndef AMIGA_HOTLIST_H
|
||||
#define AMIGA_HOTLIST_H
|
||||
|
||||
#include "desktop/tree.h"
|
||||
#include "amiga/tree.h"
|
||||
|
||||
struct nsurl;
|
||||
|
||||
void ami_hotlist_initialise(const char *hotlist_file);
|
||||
void ami_hotlist_free(const char *hotlist_file);
|
||||
nserror ami_hotlist_scan(void *userdata, int first_item, const char *folder,
|
||||
bool (*cb_add_item)(void *userdata, int level, int item, const char *title, struct nsurl *url, bool folder));
|
||||
struct treeview_window;
|
||||
|
||||
struct treeview_window *hotlist_window;
|
||||
|
||||
void ami_hotlist_initialise(const char *hotlist_file);
|
||||
|
||||
void ami_hotlist_free(const char *hotlist_file);
|
||||
|
||||
nserror ami_hotlist_scan(void *userdata, int first_item, const char *folder, bool (*cb_add_item)(void *userdata, int level, int item, const char *title, struct nsurl *url, bool folder));
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#ifndef AMIGA_PLOTTERS_H
|
||||
#define AMIGA_PLOTTERS_H
|
||||
|
||||
#include "netsurf/plotters.h"
|
||||
#include <proto/layers.h>
|
||||
#include <proto/graphics.h>
|
||||
@ -44,6 +45,8 @@ struct gui_globals
|
||||
|
||||
extern const struct plotter_table amiplot;
|
||||
|
||||
struct gui_globals *glob;
|
||||
|
||||
void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height, bool force32bit);
|
||||
void ami_free_layers(struct gui_globals *gg);
|
||||
void ami_clearclipreg(struct gui_globals *gg);
|
||||
@ -51,5 +54,4 @@ void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox);
|
||||
void ami_plot_release_pens(struct MinList *shared_pens);
|
||||
bool ami_plot_screen_is_palettemapped(void);
|
||||
|
||||
struct gui_globals *glob;
|
||||
#endif
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include "netsurf/search.h"
|
||||
|
||||
#include "amiga/libs.h"
|
||||
#include "amiga/gui.h"
|
||||
#include "amiga/misc.h"
|
||||
#include "amiga/search.h"
|
||||
#include "amiga/object.h"
|
||||
@ -66,6 +67,13 @@
|
||||
|
||||
static bool search_insert;
|
||||
|
||||
struct find_window {
|
||||
struct nsObject *node;
|
||||
struct Window *win;
|
||||
Object *objects[GID_LAST];
|
||||
struct gui_window *gwin;
|
||||
};
|
||||
|
||||
static struct find_window *fwin = NULL;
|
||||
|
||||
search_flags_t ami_search_flags(void);
|
||||
@ -86,6 +94,14 @@ static struct gui_search_table search_table = {
|
||||
|
||||
struct gui_search_table *amiga_search_table = &search_table;
|
||||
|
||||
struct gui_window *ami_search_get_gwin(struct find_window *fw)
|
||||
{
|
||||
if (fw != NULL) {
|
||||
return fw->gwin;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the displayed search status.
|
||||
*
|
||||
|
@ -19,19 +19,31 @@
|
||||
#ifndef AMIGA_SEARCH_H
|
||||
#define AMIGA_SEARCH_H
|
||||
|
||||
#include "amiga/gui.h"
|
||||
|
||||
struct find_window {
|
||||
struct nsObject *node;
|
||||
struct Window *win;
|
||||
Object *objects[GID_LAST];
|
||||
struct gui_window *gwin;
|
||||
};
|
||||
struct gui_search_table;
|
||||
struct gui_window;
|
||||
|
||||
struct gui_search_table *amiga_search_table;
|
||||
|
||||
/**
|
||||
* Change the displayed search status.
|
||||
*
|
||||
* \param gwin gui window to open search for.
|
||||
*/
|
||||
void ami_search_open(struct gui_window *gwin);
|
||||
|
||||
/**
|
||||
* Process search events
|
||||
*/
|
||||
BOOL ami_search_event(void);
|
||||
|
||||
/**
|
||||
* Close search
|
||||
*/
|
||||
void ami_search_close(void);
|
||||
|
||||
/**
|
||||
* Obtain gui window associated with find window.
|
||||
*/
|
||||
struct gui_window *ami_search_get_gwin(struct find_window *fw);
|
||||
|
||||
#endif
|
||||
|
@ -19,6 +19,11 @@
|
||||
#ifndef AMIGA_THEME_H
|
||||
#define AMIGA_THEME_H
|
||||
|
||||
#include "netsurf/mouse.h"
|
||||
|
||||
struct gui_window_2;
|
||||
struct gui_window;
|
||||
|
||||
#define AMI_GUI_POINTER_BLANK GUI_POINTER_PROGRESS+1
|
||||
#define AMI_GUI_POINTER_DRAG GUI_POINTER_PROGRESS+2
|
||||
#define AMI_LASTPOINTER AMI_GUI_POINTER_DRAG
|
||||
|
Loading…
Reference in New Issue
Block a user