From 124e4cd78814e368488d8e86c15f95223f365a44 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 5 Jan 2011 21:02:22 +0000 Subject: Atari frontend (credit: Ole Loots) svn path=/trunk/netsurf/; revision=11218 --- atari/toolbar.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 atari/toolbar.h (limited to 'atari/toolbar.h') diff --git a/atari/toolbar.h b/atari/toolbar.h new file mode 100644 index 000000000..32b93f5c5 --- /dev/null +++ b/atari/toolbar.h @@ -0,0 +1,51 @@ +/* + * Copyright 2010 Ole Loots + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * NetSurf is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * NetSurf is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef NS_ATARI_TOOLBAR_H +#define NS_ATARI_TOOLBAR_H + +CMP_TOOLBAR tb_create( struct gui_window * gw ); +void tb_destroy( CMP_TOOLBAR tb ); + + +static void __CDECL evnt_toolbar_redraw( COMPONENT *c, long buff[8], void *data ); +//static void __CDECL evnt_toolbar_mbutton( COMPONENT *c, long buff[8], void *data ); +static void __CDECL evnt_toolbar_resize( COMPONENT *c, long buff[8], void *data ); + +/* report click to toolbar, relative coords : */ +void tb_click( struct gui_window * gw, short mx, short my, short mb, short kstat ); +void tb_back_click( struct gui_window * gw ); +void tb_reload_click( struct gui_window * gw ); +void tb_forward_click( struct gui_window * gw ); +void tb_home_click( struct gui_window * gw ); +void tb_stop_click( struct gui_window * gw ); + +/* enable / disable buttons etc. */ +void tb_update_buttons( struct gui_window * gw ); +/* handles clicks on url widget: */ +void tb_url_click( struct gui_window * gw, short mx, short my, short mb, short kstat ); +/* handle keybd event while url widget has focus:*/ +bool tb_url_input( struct gui_window * gw, short keycode ); +/* place the caret and adjust scrolling position: */ +void tb_url_place_caret( struct gui_window * gw, int steps, bool abs); +/* set the url: */ +void tb_url_set( struct gui_window * gw, char * text ); + +struct gui_window * tb_gui_window( CMP_TOOLBAR tb ); + +#endif -- cgit v1.2.3