fix warnings and errors in atari frontend
This commit is contained in:
parent
e96bf01339
commit
b23f55c81b
|
@ -28,9 +28,9 @@
|
|||
|
||||
#include "utils/log.h"
|
||||
#include "utils/messages.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/nsoption.h"
|
||||
#include "utils/string.h"
|
||||
#include "netsurf/inttypes.h"
|
||||
#include "netsurf/browser_window.h"
|
||||
#include "netsurf/download.h"
|
||||
#include "desktop/save_complete.h"
|
||||
|
|
|
@ -127,7 +127,7 @@ error:
|
|||
*/
|
||||
static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
|
||||
{
|
||||
GRECT g, g_ro, g2;
|
||||
GRECT g, g2;
|
||||
short retval = 1;
|
||||
int val = 1;
|
||||
struct gemtk_wm_scroll_info_s *slid;
|
||||
|
@ -169,7 +169,6 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
|
|||
|
||||
slid = gemtk_wm_get_scroll_info(gw);
|
||||
gemtk_wm_get_grect(gw, GEMTK_WM_AREA_CONTENT, &g);
|
||||
g_ro = g;
|
||||
|
||||
switch(msg[4]) {
|
||||
|
||||
|
@ -471,67 +470,66 @@ static short preproc_mu_keybd(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
|
|||
{
|
||||
short retval = 0;
|
||||
|
||||
if ((gw->toolbar != NULL) && (gw->toolbar_edit_obj > -1)) {
|
||||
if ((gw->toolbar != NULL) && (gw->toolbar_edit_obj > -1)) {
|
||||
|
||||
short next_edit_obj = gw->toolbar_edit_obj;
|
||||
short next_char = -1;
|
||||
short edit_idx;
|
||||
short r;
|
||||
short next_edit_obj = gw->toolbar_edit_obj;
|
||||
short next_char = -1;
|
||||
short edit_idx;
|
||||
|
||||
DEBUG_PRINT(("%s, gw: %p, toolbar_edit_obj: %d\n", __FUNCTION__, gw,
|
||||
gw->toolbar_edit_obj));
|
||||
DEBUG_PRINT(("%s, gw: %p, toolbar_edit_obj: %d\n",
|
||||
__FUNCTION__, gw,
|
||||
gw->toolbar_edit_obj));
|
||||
|
||||
r = form_wkeybd(gw->toolbar, gw->toolbar_edit_obj, next_edit_obj,
|
||||
ev_out->emo_kreturn,
|
||||
&next_edit_obj, &next_char, gw->handle);
|
||||
form_wkeybd(gw->toolbar, gw->toolbar_edit_obj, next_edit_obj,
|
||||
ev_out->emo_kreturn,
|
||||
&next_edit_obj, &next_char, gw->handle);
|
||||
|
||||
if (next_edit_obj != gw->toolbar_edit_obj) {
|
||||
if (next_edit_obj != gw->toolbar_edit_obj) {
|
||||
gemtk_wm_set_toolbar_edit_obj(gw, next_edit_obj,
|
||||
ev_out->emo_kreturn);
|
||||
} else {
|
||||
if (next_char > 13) {
|
||||
r = objc_wedit(gw->toolbar, gw->toolbar_edit_obj,
|
||||
ev_out->emo_kreturn, &edit_idx,
|
||||
EDCHAR, gw->handle);
|
||||
}
|
||||
}
|
||||
//retval = 1;
|
||||
/*gemtk_wm_send_msg(gw, GEMTK_WM_WM_FORM_KEY, gw->toolbar_edit_obj,
|
||||
ev_out->emo_kreturn, 0, 0);*/
|
||||
}
|
||||
ev_out->emo_kreturn);
|
||||
} else {
|
||||
if (next_char > 13) {
|
||||
objc_wedit(gw->toolbar, gw->toolbar_edit_obj,
|
||||
ev_out->emo_kreturn, &edit_idx,
|
||||
EDCHAR, gw->handle);
|
||||
}
|
||||
}
|
||||
//retval = 1;
|
||||
/*gemtk_wm_send_msg(gw, GEMTK_WM_WM_FORM_KEY, gw->toolbar_edit_obj,
|
||||
ev_out->emo_kreturn, 0, 0);*/
|
||||
}
|
||||
|
||||
if((gw->form != NULL) && (gw->form_edit_obj > -1) ) {
|
||||
if ((gw->form != NULL) && (gw->form_edit_obj > -1)) {
|
||||
|
||||
short next_edit_obj = gw->form_edit_obj;
|
||||
short next_char = -1;
|
||||
short edit_idx;
|
||||
short r;
|
||||
short next_edit_obj = gw->form_edit_obj;
|
||||
short next_char = -1;
|
||||
short edit_idx;
|
||||
|
||||
r = form_wkeybd(gw->form, gw->form_edit_obj, next_edit_obj,
|
||||
ev_out->emo_kreturn,
|
||||
&next_edit_obj, &next_char, gw->handle);
|
||||
form_wkeybd(gw->form, gw->form_edit_obj, next_edit_obj,
|
||||
ev_out->emo_kreturn,
|
||||
&next_edit_obj, &next_char, gw->handle);
|
||||
|
||||
if (next_edit_obj != gw->form_edit_obj) {
|
||||
if (next_edit_obj != gw->form_edit_obj) {
|
||||
|
||||
if(gw->form_edit_obj != -1) {
|
||||
objc_wedit(gw->form, gw->form_edit_obj,
|
||||
ev_out->emo_kreturn, &edit_idx,
|
||||
EDEND, gw->handle);
|
||||
ev_out->emo_kreturn, &edit_idx,
|
||||
EDEND, gw->handle);
|
||||
}
|
||||
|
||||
gw->form_edit_obj = next_edit_obj;
|
||||
gw->form_edit_obj = next_edit_obj;
|
||||
|
||||
objc_wedit(gw->form, gw->form_edit_obj,
|
||||
ev_out->emo_kreturn, &edit_idx,
|
||||
EDINIT, gw->handle);
|
||||
} else {
|
||||
if(next_char > 13)
|
||||
r = objc_wedit(gw->form, gw->form_edit_obj,
|
||||
ev_out->emo_kreturn, &edit_idx,
|
||||
EDCHAR, gw->handle);
|
||||
}
|
||||
}
|
||||
return(retval);
|
||||
objc_wedit(gw->form, gw->form_edit_obj,
|
||||
ev_out->emo_kreturn, &edit_idx,
|
||||
EDINIT, gw->handle);
|
||||
} else {
|
||||
if(next_char > 13)
|
||||
objc_wedit(gw->form, gw->form_edit_obj,
|
||||
ev_out->emo_kreturn, &edit_idx,
|
||||
EDCHAR, gw->handle);
|
||||
}
|
||||
}
|
||||
return(retval);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,6 +49,7 @@ char *gemtk_obj_get_text(OBJECT * tree, short idx)
|
|||
return (p);
|
||||
}
|
||||
|
||||
/*
|
||||
static void set_text(OBJECT *obj, short idx, char * text, int len)
|
||||
{
|
||||
char spare[255];
|
||||
|
@ -63,6 +64,7 @@ static void set_text(OBJECT *obj, short idx, char * text, int len)
|
|||
|
||||
set_string(obj, idx, spare);
|
||||
}
|
||||
*/
|
||||
|
||||
char gemtk_obj_set_str_safe(OBJECT * tree, short idx, const char *txt)
|
||||
{
|
||||
|
|
|
@ -386,13 +386,13 @@ static void atari_window_reformat(struct gui_window *gw)
|
|||
|
||||
static void gui_window_redraw_window(struct gui_window *gw)
|
||||
{
|
||||
CMP_BROWSER b;
|
||||
GRECT rect;
|
||||
if (gw == NULL)
|
||||
return;
|
||||
b = gw->browser;
|
||||
window_get_grect(gw->root, BROWSER_AREA_CONTENT, &rect);
|
||||
window_schedule_redraw_grect(gw->root, &rect);
|
||||
//CMP_BROWSER b;
|
||||
GRECT rect;
|
||||
if (gw == NULL)
|
||||
return;
|
||||
//b = gw->browser;
|
||||
window_get_grect(gw->root, BROWSER_AREA_CONTENT, &rect);
|
||||
window_schedule_redraw_grect(gw->root, &rect);
|
||||
}
|
||||
|
||||
static void gui_window_update_box(struct gui_window *gw, const struct rect *rect)
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
|
||||
#include "utils/log.h"
|
||||
#include "utils/messages.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/nsoption.h"
|
||||
#include "utils/nsurl.h"
|
||||
#include "netsurf/inttypes.h"
|
||||
#include "netsurf/keypress.h"
|
||||
#include "content/content.h"
|
||||
#include "desktop/hotlist.h"
|
||||
|
@ -91,12 +91,12 @@ static void atari_hotlist_draw(struct core_window *cw, int x,
|
|||
|
||||
static void atari_hotlist_keypress(struct core_window *cw, uint32_t ucs4)
|
||||
{
|
||||
GUIWIN *gemtk_win;
|
||||
GRECT area;
|
||||
//GUIWIN *gemtk_win;
|
||||
//GRECT area;
|
||||
LOG("ucs4: %"PRIu32 , ucs4);
|
||||
hotlist_keypress(ucs4);
|
||||
gemtk_win = atari_treeview_get_gemtk_window(cw);
|
||||
atari_treeview_get_grect(cw, TREEVIEW_AREA_CONTENT, &area);
|
||||
//gemtk_win = atari_treeview_get_gemtk_window(cw);
|
||||
//atari_treeview_get_grect(cw, TREEVIEW_AREA_CONTENT, &area);
|
||||
//gemtk_wm_exec_redraw(gemtk_win, &area);
|
||||
}
|
||||
|
||||
|
|
|
@ -262,13 +262,14 @@ static FT_Glyph ft_getglyph(const plot_font_style_t *fstyle, uint32_t ucs4)
|
|||
FT_UInt glyph_index;
|
||||
FTC_ScalerRec srec;
|
||||
FT_Glyph glyph;
|
||||
FT_Error error;
|
||||
//FT_Error error;
|
||||
ftc_faceid_t *ft_face;
|
||||
|
||||
ft_fill_scalar(fstyle, &srec);
|
||||
ft_face = (ftc_faceid_t *)srec.face_id;
|
||||
glyph_index = FTC_CMapCache_Lookup(ft_cmap_cache, srec.face_id, ft_face->cidx, ucs4);
|
||||
error = FTC_ImageCache_LookupScaler(ft_image_cache,
|
||||
//error =
|
||||
FTC_ImageCache_LookupScaler(ft_image_cache,
|
||||
&srec,
|
||||
FT_LOAD_RENDER |
|
||||
FT_LOAD_FORCE_AUTOHINT |
|
||||
|
|
|
@ -161,7 +161,7 @@ static int pixel_pos( FONT_PLOTTER self, const plot_font_style_t * fstyle,const
|
|||
static void draw_glyph1(FONT_PLOTTER self, GRECT *inloc, uint8_t *chrp, int pitch, uint32_t colour )
|
||||
{
|
||||
size_t bmpstride;
|
||||
GRECT clip;
|
||||
//GRECT clip;
|
||||
uint32_t * fontdata;
|
||||
int xloop,yloop;
|
||||
int stride = pitch / 8;
|
||||
|
|
|
@ -680,12 +680,12 @@ void window_close_search(ROOTWIN *rootwin)
|
|||
struct browser_window *bw;
|
||||
struct gui_window *gw;
|
||||
GRECT area;
|
||||
OBJECT *obj;
|
||||
//OBJECT *obj;
|
||||
|
||||
|
||||
gw = rootwin->active_gui_window;
|
||||
bw = gw->browser->bw;
|
||||
obj = gemtk_obj_get_tree(TOOLBAR);
|
||||
//obj = gemtk_obj_get_tree(TOOLBAR);
|
||||
|
||||
if (gw->search != NULL) {
|
||||
nsatari_search_session_destroy(gw->search);
|
||||
|
|
|
@ -593,7 +593,7 @@ static void form_event(int index, int external)
|
|||
else
|
||||
tmp_option_memory_cache_size += 1;
|
||||
|
||||
if( tmp_option_memory_cache_size < 0 )
|
||||
if( tmp_option_memory_cache_size == 0)
|
||||
tmp_option_memory_cache_size = 1;
|
||||
if( tmp_option_memory_cache_size > 999 )
|
||||
tmp_option_memory_cache_size = 999;
|
||||
|
@ -610,7 +610,7 @@ static void form_event(int index, int external)
|
|||
else
|
||||
tmp_option_disc_cache_size += 1;
|
||||
|
||||
if( tmp_option_disc_cache_size < 0 )
|
||||
if( tmp_option_disc_cache_size == 0 )
|
||||
tmp_option_disc_cache_size = 1;
|
||||
if( tmp_option_disc_cache_size > 9999 )
|
||||
tmp_option_disc_cache_size = 9999;
|
||||
|
|
|
@ -366,11 +366,11 @@ static void __CDECL on_keybd_event(struct core_window *cw, EVMULT_OUT *ev_out,
|
|||
}
|
||||
|
||||
|
||||
static void __CDECL on_redraw_event(struct core_window *cw, EVMULT_OUT *ev_out,
|
||||
short msg[8])
|
||||
static void __CDECL on_redraw_event(struct core_window *cw,
|
||||
EVMULT_OUT *ev_out,
|
||||
short msg[8])
|
||||
{
|
||||
GRECT work, clip;
|
||||
struct gemtk_wm_scroll_info_s *slid;
|
||||
struct atari_treeview_window *tv = (struct atari_treeview_window *)cw;
|
||||
|
||||
if (tv == NULL)
|
||||
|
@ -381,7 +381,7 @@ static void __CDECL on_redraw_event(struct core_window *cw, EVMULT_OUT *ev_out,
|
|||
|
||||
atari_treeview_get_grect(cw, TREEVIEW_AREA_CONTENT, &work);
|
||||
//dbg_grect("treeview work: ", &work);
|
||||
slid = gemtk_wm_get_scroll_info(tv->window);
|
||||
gemtk_wm_get_scroll_info(tv->window);
|
||||
|
||||
clip = work;
|
||||
|
||||
|
@ -390,10 +390,10 @@ static void __CDECL on_redraw_event(struct core_window *cw, EVMULT_OUT *ev_out,
|
|||
return;
|
||||
}
|
||||
|
||||
if (atari_treeview_is_iconified(cw) == true) {
|
||||
atari_treeview_redraw_icon(cw, &clip);
|
||||
return;
|
||||
}
|
||||
if (atari_treeview_is_iconified(cw) == true) {
|
||||
atari_treeview_redraw_icon(cw, &clip);
|
||||
return;
|
||||
}
|
||||
|
||||
/* make redraw coords relative to content viewport */
|
||||
clip.g_x -= work.g_x;
|
||||
|
@ -425,8 +425,9 @@ static void __CDECL on_redraw_event(struct core_window *cw, EVMULT_OUT *ev_out,
|
|||
}
|
||||
}
|
||||
|
||||
static void __CDECL on_mbutton_event(struct core_window *cw, EVMULT_OUT *ev_out,
|
||||
short msg[8])
|
||||
static void __CDECL on_mbutton_event(struct core_window *cw,
|
||||
EVMULT_OUT *ev_out,
|
||||
short msg[8])
|
||||
{
|
||||
struct atari_treeview_window *tv = (struct atari_treeview_window *)cw;
|
||||
struct gemtk_wm_scroll_info_s *slid;
|
||||
|
|
Loading…
Reference in New Issue