mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
fixup amiga build errors
This commit is contained in:
parent
54b7482f78
commit
ba4788108b
@ -215,7 +215,7 @@ void gui_get_clipboard(char **buffer, size_t *length)
|
||||
CloseIFF(iffh);
|
||||
}
|
||||
|
||||
void gui_set_clipboard(const char *buffer, size_t length,
|
||||
static void gui_set_clipboard(const char *buffer, size_t length,
|
||||
nsclipboard_styles styles[], int n_styles)
|
||||
{
|
||||
char *text;
|
||||
@ -376,3 +376,10 @@ bool ami_easy_clipboard_svg(struct hlcache_handle *c)
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct gui_clipboard_table clipboard_table = {
|
||||
.get = gui_get_clipboard,
|
||||
.set = gui_set_clipboard,
|
||||
};
|
||||
|
||||
struct gui_clipboard_table *amiga_clipboard_table = &clipboard_table;
|
||||
|
@ -25,11 +25,11 @@ struct hlcache_handle;
|
||||
struct selection;
|
||||
struct gui_window;
|
||||
struct gui_window_2;
|
||||
struct gui_clipboard_table;
|
||||
|
||||
extern struct gui_clipboard_table *amiga_clipboard_table;
|
||||
|
||||
void gui_start_selection(struct gui_window *g);
|
||||
void gui_get_clipboard(char **buffer, size_t *length);
|
||||
void gui_set_clipboard(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles);
|
||||
|
||||
|
||||
void ami_clipboard_init(void);
|
||||
void ami_clipboard_free(void);
|
||||
|
@ -227,21 +227,6 @@ static nserror gui_download_window_data(struct gui_download_window *dw,
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
static void gui_download_window_error(struct gui_download_window *dw,
|
||||
const char *error_msg)
|
||||
{
|
||||
warn_user("Unwritten","");
|
||||
dw->result = AMINS_DLOAD_ERROR;
|
||||
gui_download_window_done(dw);
|
||||
}
|
||||
|
||||
void ami_download_window_abort(struct gui_download_window *dw)
|
||||
{
|
||||
download_context_abort(dw->ctx);
|
||||
dw->result = AMINS_DLOAD_ABORT;
|
||||
gui_download_window_done(dw);
|
||||
}
|
||||
|
||||
static void gui_download_window_done(struct gui_download_window *dw)
|
||||
{
|
||||
struct dlnode *dln,*dln2 = NULL;
|
||||
@ -299,6 +284,21 @@ static void gui_download_window_done(struct gui_download_window *dw)
|
||||
}
|
||||
}
|
||||
|
||||
static void gui_download_window_error(struct gui_download_window *dw,
|
||||
const char *error_msg)
|
||||
{
|
||||
warn_user("Unwritten","");
|
||||
dw->result = AMINS_DLOAD_ERROR;
|
||||
gui_download_window_done(dw);
|
||||
}
|
||||
|
||||
void ami_download_window_abort(struct gui_download_window *dw)
|
||||
{
|
||||
download_context_abort(dw->ctx);
|
||||
dw->result = AMINS_DLOAD_ABORT;
|
||||
gui_download_window_done(dw);
|
||||
}
|
||||
|
||||
BOOL ami_download_window_event(struct gui_download_window *dw)
|
||||
{
|
||||
/* return TRUE if window destroyed */
|
||||
|
12
amiga/gui.c
12
amiga/gui.c
@ -69,6 +69,7 @@
|
||||
#include "amiga/theme.h"
|
||||
#include "amiga/tree.h"
|
||||
#include "amiga/utf8.h"
|
||||
#include "amiga/sslcert.h"
|
||||
|
||||
/* Custom StringView class */
|
||||
#include "amiga/stringview/stringview.h"
|
||||
@ -202,6 +203,11 @@ static void ami_schedule_redraw_remove(struct gui_window_2 *gwin);
|
||||
|
||||
static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy);
|
||||
static void gui_window_set_scroll(struct gui_window *g, int sx, int sy);
|
||||
static void gui_window_remove_caret(struct gui_window *g);
|
||||
static void gui_set_search_ico(hlcache_handle *ico);
|
||||
static void gui_window_place_caret(struct gui_window *g, int x, int y, int height, const struct rect *clip);
|
||||
|
||||
|
||||
|
||||
/* accessors for default options - user option is updated if it is set as per default */
|
||||
#define nsoption_default_set_int(OPTION, VALUE) \
|
||||
@ -5144,10 +5150,6 @@ static struct gui_window_table amiga_window_table = {
|
||||
.save_link = gui_window_save_link,
|
||||
};
|
||||
|
||||
static struct gui_clipboard_table amiga_clipboard_table = {
|
||||
.get = gui_get_clipboard,
|
||||
.set = gui_set_clipboard,
|
||||
};
|
||||
|
||||
static struct gui_browser_table amiga_browser_table = {
|
||||
.poll = gui_poll,
|
||||
@ -5176,7 +5178,7 @@ int main(int argc, char** argv)
|
||||
struct gui_table amiga_gui_table = {
|
||||
.browser = &amiga_browser_table,
|
||||
.window = &amiga_window_table,
|
||||
.clipboard = &amiga_clipboard_table,
|
||||
.clipboard = amiga_clipboard_table,
|
||||
.download = amiga_download_table,
|
||||
};
|
||||
|
||||
|
@ -24,4 +24,5 @@ void gui_cert_verify(nsurl *url,
|
||||
nserror (*cb)(bool proceed, void *pw), void *cbpw);
|
||||
|
||||
void ami_ssl_free(struct treeview_window *twin);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user