mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 02:32:44 +03:00
more atari header cleanup
This commit is contained in:
parent
ea08caccb9
commit
9177143266
@ -16,29 +16,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include "utils/log.h"
|
#include "utils/log.h"
|
||||||
#include "utils/messages.h"
|
#include "utils/messages.h"
|
||||||
#include "utils/utils.h"
|
#include "desktop/mouse.h"
|
||||||
#include "utils/nsoption.h"
|
#include "desktop/plotters.h"
|
||||||
#include "content/content.h"
|
|
||||||
#include "content/hlcache.h"
|
|
||||||
#include "content/urldb.h"
|
|
||||||
#include "desktop/cookie_manager.h"
|
#include "desktop/cookie_manager.h"
|
||||||
#include "desktop/tree.h"
|
|
||||||
#include "desktop/core_window.h"
|
#include "desktop/core_window.h"
|
||||||
|
|
||||||
#include "atari/gui.h"
|
|
||||||
#include "atari/misc.h"
|
|
||||||
#include "atari/treeview.h"
|
#include "atari/treeview.h"
|
||||||
#include "atari/cookies.h"
|
#include "atari/cookies.h"
|
||||||
#include "atari/findfile.h"
|
|
||||||
#include "atari/gemtk/gemtk.h"
|
#include "atari/gemtk/gemtk.h"
|
||||||
#include "atari/res/netsurf.rsh"
|
#include "atari/res/netsurf.rsh"
|
||||||
|
|
||||||
|
@ -16,33 +16,17 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <mint/osbind.h>
|
|
||||||
#include <cflib.h>
|
|
||||||
|
|
||||||
#include "utils/log.h"
|
#include "utils/log.h"
|
||||||
#include "utils/messages.h"
|
#include "utils/messages.h"
|
||||||
#include "utils/utils.h"
|
#include "utils/nsoption.h"
|
||||||
#include "desktop/browser.h"
|
#include "desktop/browser.h"
|
||||||
#include "desktop/mouse.h"
|
|
||||||
#include "desktop/textinput.h"
|
#include "desktop/textinput.h"
|
||||||
#include "content/content.h"
|
|
||||||
#include "content/hlcache.h"
|
#include "content/hlcache.h"
|
||||||
#include "content/urldb.h"
|
|
||||||
|
|
||||||
#include "atari/gui.h"
|
#include "atari/gui.h"
|
||||||
#include "atari/rootwin.h"
|
#include "atari/rootwin.h"
|
||||||
#include "atari/misc.h"
|
|
||||||
#include "atari/clipboard.h"
|
#include "atari/clipboard.h"
|
||||||
#include "utils/nsoption.h"
|
#include "atari/gemtk/gemtk.h"
|
||||||
#include "atari/res/netsurf.rsh"
|
#include "atari/res/netsurf.rsh"
|
||||||
#include "atari/ctxmenu.h"
|
#include "atari/ctxmenu.h"
|
||||||
|
|
||||||
|
@ -16,29 +16,16 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <inttypes.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include "utils/log.h"
|
#include "utils/log.h"
|
||||||
#include "utils/messages.h"
|
#include "utils/messages.h"
|
||||||
#include "utils/utils.h"
|
#include "desktop/mouse.h"
|
||||||
#include "utils/nsoption.h"
|
|
||||||
#include "content/content.h"
|
|
||||||
#include "content/hlcache.h"
|
|
||||||
#include "content/urldb.h"
|
|
||||||
#include "desktop/global_history.h"
|
#include "desktop/global_history.h"
|
||||||
#include "desktop/tree.h"
|
|
||||||
#include "desktop/core_window.h"
|
#include "desktop/core_window.h"
|
||||||
|
|
||||||
#include "atari/gui.h"
|
|
||||||
#include "atari/misc.h"
|
|
||||||
#include "atari/treeview.h"
|
#include "atari/treeview.h"
|
||||||
#include "atari/history.h"
|
#include "atari/history.h"
|
||||||
#include "atari/findfile.h"
|
|
||||||
#include "atari/gemtk/gemtk.h"
|
#include "atari/gemtk/gemtk.h"
|
||||||
#include "atari/res/netsurf.rsh"
|
#include "atari/res/netsurf.rsh"
|
||||||
|
|
||||||
@ -47,38 +34,18 @@ extern GRECT desk_area;
|
|||||||
struct atari_global_history_s atari_global_history;
|
struct atari_global_history_s atari_global_history;
|
||||||
|
|
||||||
/* Setup Atari Treeview Callbacks: */
|
/* Setup Atari Treeview Callbacks: */
|
||||||
static nserror atari_global_history_init_phase2(struct core_window *cw,
|
|
||||||
struct core_window_callback_table * default_callbacks);
|
|
||||||
static void atari_global_history_finish(struct core_window *cw);
|
|
||||||
static void atari_global_history_keypress(struct core_window *cw,
|
|
||||||
uint32_t ucs4);
|
|
||||||
static void atari_global_history_mouse_action(struct core_window *cw,
|
|
||||||
browser_mouse_state mouse,
|
|
||||||
int x, int y);
|
|
||||||
static void atari_global_history_draw(struct core_window *cw, int x,
|
|
||||||
int y, struct rect *clip,
|
|
||||||
const struct redraw_context *ctx);
|
|
||||||
static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]);
|
|
||||||
|
|
||||||
static struct atari_treeview_callbacks atari_global_history_treeview_callbacks = {
|
static nserror
|
||||||
.init_phase2 = atari_global_history_init_phase2,
|
atari_global_history_init_phase2(struct core_window *cw,
|
||||||
.finish = atari_global_history_finish,
|
|
||||||
.draw = atari_global_history_draw,
|
|
||||||
.keypress = atari_global_history_keypress,
|
|
||||||
.mouse_action = atari_global_history_mouse_action,
|
|
||||||
.gemtk_user_func = handle_event
|
|
||||||
};
|
|
||||||
|
|
||||||
static nserror atari_global_history_init_phase2(struct core_window *cw,
|
|
||||||
struct core_window_callback_table *cb_t)
|
struct core_window_callback_table *cb_t)
|
||||||
{
|
{
|
||||||
LOG("");
|
LOG("cw %p", cw);
|
||||||
return(global_history_init(cb_t, cw));
|
return(global_history_init(cb_t, cw));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atari_global_history_finish(struct core_window *cw)
|
static void atari_global_history_finish(struct core_window *cw)
|
||||||
{
|
{
|
||||||
LOG("");
|
LOG("cw %p", cw);
|
||||||
global_history_fini();
|
global_history_fini();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,27 +58,31 @@ static void atari_global_history_draw(struct core_window *cw, int x,
|
|||||||
|
|
||||||
static void atari_global_history_keypress(struct core_window *cw, uint32_t ucs4)
|
static void atari_global_history_keypress(struct core_window *cw, uint32_t ucs4)
|
||||||
{
|
{
|
||||||
LOG("ucs4: %lu\n", ucs4);
|
LOG("ucs4: %"PRIu32, ucs4);
|
||||||
global_history_keypress(ucs4);
|
global_history_keypress(ucs4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atari_global_history_mouse_action(struct core_window *cw,
|
static void
|
||||||
|
atari_global_history_mouse_action(struct core_window *cw,
|
||||||
browser_mouse_state mouse,
|
browser_mouse_state mouse,
|
||||||
int x, int y)
|
int x, int y)
|
||||||
{
|
{
|
||||||
LOG("x: %d, y: %d\n", x, y);
|
LOG("x: %d, y: %d\n", x, y);
|
||||||
|
|
||||||
global_history_mouse_action(mouse, x, y);
|
global_history_mouse_action(mouse, x, y);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void atari_global_history_close(void)
|
||||||
|
{
|
||||||
|
atari_treeview_close(atari_global_history.tv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
|
static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
|
||||||
{
|
{
|
||||||
short retval = 0;
|
short retval = 0;
|
||||||
|
|
||||||
LOG("");
|
LOG("win %p", win);
|
||||||
|
|
||||||
if (ev_out->emo_events & MU_MESAG) {
|
if (ev_out->emo_events & MU_MESAG) {
|
||||||
switch (msg[0]) {
|
switch (msg[0]) {
|
||||||
@ -127,7 +98,14 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
|
|||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct atari_treeview_callbacks atari_global_history_treeview_callbacks = {
|
||||||
|
.init_phase2 = atari_global_history_init_phase2,
|
||||||
|
.finish = atari_global_history_finish,
|
||||||
|
.draw = atari_global_history_draw,
|
||||||
|
.keypress = atari_global_history_keypress,
|
||||||
|
.mouse_action = atari_global_history_mouse_action,
|
||||||
|
.gemtk_user_func = handle_event
|
||||||
|
};
|
||||||
|
|
||||||
void atari_global_history_init(void)
|
void atari_global_history_init(void)
|
||||||
{
|
{
|
||||||
@ -186,10 +164,6 @@ void atari_global_history_open(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void atari_global_history_close(void)
|
|
||||||
{
|
|
||||||
atari_treeview_close(atari_global_history.tv);
|
|
||||||
}
|
|
||||||
|
|
||||||
void atari_global_history_destroy(void)
|
void atari_global_history_destroy(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user