2008-08-02 18:31:32 +04:00
|
|
|
/*
|
2009-01-11 00:31:21 +03:00
|
|
|
* Copyright 2008-9 Chris Young <chris@unsatisfactorysoftware.co.uk>
|
2008-08-02 18:31:32 +04:00
|
|
|
*
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AMIGA_GUI_H
|
|
|
|
#define AMIGA_GUI_H
|
2008-08-09 02:38:13 +04:00
|
|
|
#include <graphics/rastport.h>
|
2008-08-09 19:19:04 +04:00
|
|
|
#include "amiga/object.h"
|
|
|
|
#include <intuition/classusr.h>
|
2008-08-18 23:07:12 +04:00
|
|
|
#include "desktop/browser.h"
|
2008-08-23 20:17:51 +04:00
|
|
|
#include <dos/dos.h>
|
2008-10-05 03:29:17 +04:00
|
|
|
#include "desktop/gui.h"
|
2008-12-28 15:24:18 +03:00
|
|
|
#ifdef NS_AMIGA_CAIRO
|
|
|
|
#include <cairo/cairo.h>
|
|
|
|
#endif
|
2008-08-09 02:38:13 +04:00
|
|
|
|
2008-08-09 19:19:04 +04:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
GID_MAIN=0,
|
2008-10-05 17:17:18 +04:00
|
|
|
GID_TABLAYOUT,
|
2008-08-09 19:19:04 +04:00
|
|
|
GID_BROWSER,
|
|
|
|
GID_STATUS,
|
|
|
|
GID_URL,
|
|
|
|
GID_STOP,
|
|
|
|
GID_RELOAD,
|
|
|
|
GID_HOME,
|
|
|
|
GID_BACK,
|
|
|
|
GID_FORWARD,
|
2008-09-14 02:39:48 +04:00
|
|
|
GID_THROBBER,
|
2008-10-06 01:20:12 +04:00
|
|
|
GID_CLOSETAB,
|
2008-10-05 03:29:17 +04:00
|
|
|
GID_TABS,
|
2008-08-31 01:32:05 +04:00
|
|
|
GID_USER,
|
|
|
|
GID_PASS,
|
|
|
|
GID_LOGIN,
|
|
|
|
GID_CANCEL,
|
2008-09-28 00:56:25 +04:00
|
|
|
GID_TREEBROWSER,
|
2008-10-12 01:38:04 +04:00
|
|
|
GID_OPEN,
|
2008-10-14 02:34:54 +04:00
|
|
|
GID_LEFT,
|
2008-10-12 01:38:04 +04:00
|
|
|
GID_UP,
|
|
|
|
GID_DOWN,
|
|
|
|
GID_NEWF,
|
|
|
|
GID_NEWB,
|
|
|
|
GID_DEL,
|
2008-12-14 02:23:24 +03:00
|
|
|
GID_NEXT,
|
|
|
|
GID_PREV,
|
|
|
|
GID_SEARCHSTRING,
|
2008-08-09 19:19:04 +04:00
|
|
|
GID_LAST
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
OID_MAIN=0,
|
2008-08-10 13:57:41 +04:00
|
|
|
OID_VSCROLL,
|
|
|
|
OID_HSCROLL,
|
2008-08-18 23:07:12 +04:00
|
|
|
OID_MENU,
|
2008-08-09 19:19:04 +04:00
|
|
|
OID_LAST
|
|
|
|
};
|
|
|
|
|
2009-03-28 15:50:19 +03:00
|
|
|
#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
|
|
|
|
|
2008-12-14 02:23:24 +03:00
|
|
|
struct find_window;
|
2009-03-15 14:21:46 +03:00
|
|
|
struct history_window;
|
2008-12-14 02:23:24 +03:00
|
|
|
|
2008-10-05 03:29:17 +04:00
|
|
|
struct gui_window_2 {
|
2008-08-02 18:31:32 +04:00
|
|
|
struct Window *win;
|
2008-08-09 19:19:04 +04:00
|
|
|
Object *objects[OID_LAST];
|
|
|
|
struct Gadget *gadgets[GID_LAST];
|
|
|
|
struct nsObject *node;
|
2008-09-21 02:07:11 +04:00
|
|
|
struct browser_window *bw;
|
2008-08-23 20:17:51 +04:00
|
|
|
bool redraw_required;
|
2008-09-21 02:07:11 +04:00
|
|
|
int throbber_frame;
|
2008-10-05 03:29:17 +04:00
|
|
|
struct List tab_list;
|
2008-10-05 17:17:18 +04:00
|
|
|
ULONG tabs;
|
|
|
|
ULONG next_tab;
|
2008-08-11 21:53:45 +04:00
|
|
|
struct Hook scrollerhook;
|
2008-08-18 23:07:12 +04:00
|
|
|
struct Hook popuphook;
|
|
|
|
struct form_control *control;
|
|
|
|
browser_mouse_state mouse_state;
|
2008-09-01 22:03:40 +04:00
|
|
|
browser_mouse_state key_state;
|
2008-09-14 02:39:48 +04:00
|
|
|
ULONG throbber_update_count;
|
2008-12-14 02:23:24 +03:00
|
|
|
struct find_window *searchwin;
|
2009-01-11 00:31:21 +03:00
|
|
|
ULONG oldh;
|
|
|
|
ULONG oldv;
|
2008-08-02 18:31:32 +04:00
|
|
|
};
|
|
|
|
|
2008-10-05 03:29:17 +04:00
|
|
|
struct gui_window
|
|
|
|
{
|
|
|
|
struct gui_window_2 *shared;
|
|
|
|
int tab;
|
|
|
|
struct Node *tab_node;
|
2008-10-19 15:33:05 +04:00
|
|
|
int c_x;
|
|
|
|
int c_y;
|
|
|
|
int c_h;
|
2008-11-09 02:08:55 +03:00
|
|
|
int scrollx;
|
|
|
|
int scrolly;
|
2009-03-15 14:21:46 +03:00
|
|
|
struct history_window *hw;
|
2009-03-28 15:50:19 +03:00
|
|
|
struct List dllist;
|
2008-10-05 03:29:17 +04:00
|
|
|
};
|
|
|
|
|
2008-12-26 22:04:57 +03:00
|
|
|
struct gui_globals
|
|
|
|
{
|
|
|
|
struct BitMap *bm;
|
|
|
|
struct RastPort rp;
|
|
|
|
struct Layer_Info *layerinfo;
|
|
|
|
APTR areabuf;
|
|
|
|
APTR tmprasbuf;
|
2008-12-29 04:18:53 +03:00
|
|
|
struct Rectangle rect;
|
2008-12-28 15:24:18 +03:00
|
|
|
#ifdef NS_AMIGA_CAIRO
|
|
|
|
cairo_surface_t *surface;
|
|
|
|
cairo_t *cr;
|
|
|
|
#endif
|
2008-12-26 22:04:57 +03:00
|
|
|
};
|
|
|
|
|
2008-10-05 03:29:17 +04:00
|
|
|
void ami_get_msg(void);
|
|
|
|
void ami_update_pointer(struct Window *win, gui_pointer_shape shape);
|
2008-10-06 11:07:33 +04:00
|
|
|
void ami_close_all_tabs(struct gui_window_2 *gwin);
|
2008-10-06 21:47:31 +04:00
|
|
|
void ami_quit_netsurf(void);
|
2008-10-19 17:01:01 +04:00
|
|
|
void ami_get_theme_filename(char *filename,char *themestring);
|
2009-03-08 19:24:52 +03:00
|
|
|
void ami_clearclipreg(struct RastPort *rp);
|
|
|
|
void ami_do_redraw(struct gui_window_2 *g,bool scroll);
|
2008-10-05 03:29:17 +04:00
|
|
|
|
2008-08-07 22:44:28 +04:00
|
|
|
struct RastPort *currp;
|
2008-08-17 20:22:40 +04:00
|
|
|
struct TextFont *origrpfont;
|
2008-08-31 01:32:05 +04:00
|
|
|
struct MinList *window_list;
|
|
|
|
struct Screen *scrn;
|
|
|
|
STRPTR nsscreentitle;
|
2008-09-04 02:02:41 +04:00
|
|
|
struct FileRequester *filereq;
|
2009-01-11 00:31:21 +03:00
|
|
|
struct FileRequester *savereq;
|
2008-09-21 20:28:45 +04:00
|
|
|
struct MsgPort *sport;
|
2008-09-28 00:56:25 +04:00
|
|
|
bool win_destroyed;
|
2008-10-26 02:22:34 +03:00
|
|
|
struct browser_window *curbw;
|
2008-12-26 22:04:57 +03:00
|
|
|
struct gui_globals glob;
|
2008-08-02 18:31:32 +04:00
|
|
|
#endif
|