summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-01-11 16:45:17 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2012-01-11 16:45:17 +0000
commit6794af012e0b807681eb0e662f5b6d76b615ef9b (patch)
treefed8f6b7147ee6327c1b8bbcf2f2a0e9a98de191
parentd2253eee8faafebc816b403395e875a290f826e1 (diff)
downloadnetsurf-6794af012e0b807681eb0e662f5b6d76b615ef9b.tar.gz
netsurf-6794af012e0b807681eb0e662f5b6d76b615ef9b.tar.bz2
Constify rect param to gui_window_drag_start.
svn path=/trunk/netsurf/; revision=13397
-rwxr-xr-xamiga/gui.c2
-rwxr-xr-xatari/gui.c164
-rw-r--r--beos/beos_window.cpp2
-rw-r--r--cocoa/gui.m2
-rw-r--r--desktop/gui.h2
-rw-r--r--framebuffer/gui.c2
-rw-r--r--gtk/window.c2
-rw-r--r--monkey/browser.c2
-rw-r--r--riscos/window.c2
-rw-r--r--windows/gui.c2
10 files changed, 91 insertions, 91 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 46529e83c..9b5e15423 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3844,7 +3844,7 @@ bool gui_window_scroll_start(struct gui_window *g)
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
DebugPrintF("drag start\n");
return true;
diff --git a/atari/gui.c b/atari/gui.c
index f6f0d9d3d..9726d9f12 100755
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -86,18 +86,18 @@ OBJECT * h_gem_menu;
OBJECT **rsc_trindex;
short vdih;
short rsc_ntree;
-long next_poll;
+long next_poll;
bool rendering = false;
-
+
/* Comandline / Options: */
int cfg_width;
int cfg_height;
-
+
/* Defaults to option_homepage_url, commandline options overwrites that value */
const char * cfg_homepage_url;
-
-/* path to choices file: */
+
+/* path to choices file: */
char options[PATH_MAX];
@@ -108,47 +108,47 @@ void gui_poll(bool active)
int flags = MU_MESAG | MU_KEYBD | MU_BUTTON ;
short mx, my, dummy;
short aestop;
-
- evnt.timer = schedule_run();
+
+ evnt.timer = schedule_run();
if( active || rendering ) {
- if( clock() >= next_poll ) {
+ if( clock() >= next_poll ) {
evnt.timer = 0;
flags |= MU_TIMER;
EvntWindom( flags );
next_poll = clock() + (CLOCKS_PER_SEC>>2);
}
- } else {
- if( input_window != NULL ){
+ } else {
+ if( input_window != NULL ){
wind_get( 0, WF_TOP, &aestop, &winloc[1], &winloc[2], &winloc[3]);
- if( winloc[1] == _AESapid ){
- /* only check for mouse move when netsurf is on top: */
- // move that into m1 event handler
- graf_mkstate( &mx, &my, &dummy, &dummy );
- flags |= MU_M1;
- evnt.m1_flag = MO_LEAVE;
- evnt.m1_w = evnt.m1_h = 1;
- evnt.m1_x = mx;
- evnt.m1_y = my;
+ if( winloc[1] == _AESapid ){
+ /* only check for mouse move when netsurf is on top: */
+ // move that into m1 event handler
+ graf_mkstate( &mx, &my, &dummy, &dummy );
+ flags |= MU_M1;
+ evnt.m1_flag = MO_LEAVE;
+ evnt.m1_w = evnt.m1_h = 1;
+ evnt.m1_x = mx;
+ evnt.m1_y = my;
}
- }
+ }
flags |= MU_TIMER;
- EvntWindom( flags );
+ EvntWindom( flags );
}
struct gui_window * g;
for( g = window_list; g != NULL; g=g->next ) {
if( browser_redraw_required( g ) ){
browser_redraw( g );
- }
- if( g->root->toolbar ){
- if(g->root->toolbar->url.redraw ){
- tb_url_redraw( g );
- }
+ }
+ if( g->root->toolbar ){
+ if(g->root->toolbar->url.redraw ){
+ tb_url_redraw( g );
+ }
}
}
if( evnt.timer != 0 && !active ){
- /* this suits for stuff with lower priority */
+ /* this suits for stuff with lower priority */
/* TBD: really be spare on redraws??? */
atari_treeview_redraw( hl.tv );
}
@@ -171,10 +171,10 @@ gui_create_browser_window(struct browser_window *bw,
LOG(("new window: %p, bw: %p\n", gw, bw));
window_create(gw, bw, WIDGET_STATUSBAR|WIDGET_TOOLBAR|WIDGET_RESIZE|WIDGET_SCROLL );
- if( gw->root->handle ) {
- GRECT pos = {
- app.w/2-(cfg_width/2), (app.h/2)-(cfg_height/2)+16,
- cfg_width, cfg_height
+ if( gw->root->handle ) {
+ GRECT pos = {
+ app.w/2-(cfg_width/2), (app.h/2)-(cfg_height/2)+16,
+ cfg_width, cfg_height
};
window_open( gw , pos );
/* Recalculate windows browser area now */
@@ -272,31 +272,31 @@ void gui_window_set_title(struct gui_window *gw, const char *title)
*/
void gui_window_set_status(struct gui_window *w, const char *text)
{
-
- static char * msg_done = NULL;
- static char * msg_loading = NULL;
- static char * msg_fetch = NULL;
-
- if( msg_done == NULL ){
- msg_done = messages_get("Done");
- msg_loading = messages_get("Loading");
- msg_fetch = messages_get("Fetch");
- }
-
- if( strncmp(msg_done, text, 4) == 0 ){
- rendering = false;
- } else {
- if( !rendering
- &&
- (
- strncmp(msg_loading, text, 4) == 0 ||
- strncmp(msg_fetch, text, 4) == 0)) {
- rendering = true;
- }
+
+ static char * msg_done = NULL;
+ static char * msg_loading = NULL;
+ static char * msg_fetch = NULL;
+
+ if( msg_done == NULL ){
+ msg_done = messages_get("Done");
+ msg_loading = messages_get("Loading");
+ msg_fetch = messages_get("Fetch");
+ }
+
+ if( strncmp(msg_done, text, 4) == 0 ){
+ rendering = false;
+ } else {
+ if( !rendering
+ &&
+ (
+ strncmp(msg_loading, text, 4) == 0 ||
+ strncmp(msg_fetch, text, 4) == 0)) {
+ rendering = true;
+ }
}
if (w == NULL || text == NULL )
return;
- window_set_stauts( w , (char*)text );
+ window_set_stauts( w , (char*)text );
}
void gui_window_redraw_window(struct gui_window *gw)
@@ -306,7 +306,7 @@ void gui_window_redraw_window(struct gui_window *gw)
if (gw == NULL)
return;
b = gw->browser;
- browser_get_rect( gw, BR_CONTENT, &rect );
+ browser_get_rect( gw, BR_CONTENT, &rect );
browser_schedule_redraw( gw, 0, 0, rect.g_w, rect.g_h );
}
@@ -321,7 +321,7 @@ void gui_window_update_box(struct gui_window *gw, const struct rect *rect)
int y0 = rect->y0 - b->scroll.current.y;
int w,h;
w = rect->x1 - rect->x0;
- h = rect->y1 - rect->y0;
+ h = rect->y1 - rect->y0;
browser_schedule_redraw_rect( gw, x0, y0, w,h);
}
@@ -362,7 +362,7 @@ void gui_window_set_scroll(struct gui_window *w, int sx, int sy)
void gui_window_scroll_visible(struct gui_window *w, int x0, int y0, int x1, int y1)
{
LOG(("%s:(%p, %d, %d, %d, %d)", __func__, w, x0, y0, x1, y1));
- gui_window_set_scroll(w,x0,y0);
+ gui_window_set_scroll(w,x0,y0);
browser_schedule_redraw_rect( w, 0, 0, x1-x0,y1-y0);
}
@@ -503,8 +503,8 @@ void gui_window_start_throbber(struct gui_window *w)
{
LGRECT work;
if (w == NULL)
- return;
- if( w->root->toolbar->throbber.running == true )
+ return;
+ if( w->root->toolbar->throbber.running == true )
return;
mt_CompGetLGrect(&app, w->root->toolbar->throbber.comp,
WF_WORKXYWH, &work);
@@ -519,11 +519,11 @@ void gui_window_stop_throbber(struct gui_window *w)
{
LGRECT work;
if (w == NULL)
- return;
- if( w->root->toolbar->throbber.running == false )
- return;
-
- schedule_remove(throbber_advance, w);
+ return;
+ if( w->root->toolbar->throbber.running == false )
+ return;
+
+ schedule_remove(throbber_advance, w);
mt_CompGetLGrect(&app, w->root->toolbar->throbber.comp,
WF_WORKXYWH, &work);
@@ -532,7 +532,7 @@ void gui_window_stop_throbber(struct gui_window *w)
work.g_x, work.g_y, work.g_w, work.g_h );
}
-/* Place caret in window */
+/* Place caret in window */
void gui_window_place_caret(struct gui_window *w, int x, int y, int height)
{
if (w == NULL)
@@ -540,7 +540,7 @@ void gui_window_place_caret(struct gui_window *w, int x, int y, int height)
if( w->browser->caret.current.g_w > 0 )
gui_window_remove_caret( w );
w->browser->caret.requested.g_x = x;
- w->browser->caret.requested.g_y = y;
+ w->browser->caret.requested.g_y = y;
w->browser->caret.requested.g_w = 1;
w->browser->caret.requested.g_h = height;
w->browser->caret.redraw = true;
@@ -550,19 +550,19 @@ void gui_window_place_caret(struct gui_window *w, int x, int y, int height)
/**
* clear window caret
- */
+ */
void
gui_window_remove_caret(struct gui_window *w)
-{
+{
if (w == NULL)
return;
-
- if( w->browser->caret.background.fd_addr != NULL ){
- browser_restore_caret_background( w, NULL );
- w->browser->caret.requested.g_w = 0;
- w->browser->caret.current.g_w = 0;
- }
- return;
+
+ if( w->browser->caret.background.fd_addr != NULL ){
+ browser_restore_caret_background( w, NULL );
+ w->browser->caret.requested.g_w = 0;
+ w->browser->caret.current.g_w = 0;
+ }
+ return;
}
void
@@ -594,7 +594,7 @@ bool gui_window_scroll_start(struct gui_window *w)
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
TODO();
return true;
@@ -806,7 +806,7 @@ void gui_cert_verify(const char *url, const struct ssl_cert_info *certs,
/*bres = verify_ssl_form_do(url, certs, num);
if( bres )
urldb_set_cert_permissions(url, true);
- */
+ */
// TODO: localize string
int b = form_alert(1, "[2][SSL Verify failed, continue?][Continue|Abort]");
bres = (b==1)? true : false;
@@ -861,14 +861,14 @@ process_cmdline(int argc, char** argv)
if ((option_window_width != 0) && (option_window_height != 0)) {
cfg_width = option_window_width;
cfg_height = option_window_height;
- } else {
- if( sys_type() == SYS_TOS ){
- /* on single tasking OS, start as fulled window: */
+ } else {
+ if( sys_type() == SYS_TOS ){
+ /* on single tasking OS, start as fulled window: */
cfg_width = app.w;
- cfg_height = app.h;
+ cfg_height = app.h;
} else {
cfg_width = 600;
- cfg_height = 360;
+ cfg_height = 360;
}
}
@@ -1028,7 +1028,7 @@ int main(int argc, char** argv)
browser_window_create(cfg_homepage_url, 0, 0, true, false);
graf_mouse( ARROW , NULL);
netsurf_main_loop();
- netsurf_exit();
+ netsurf_exit();
LOG(("ApplExit"));
ApplExit();
#ifdef WITH_DBG_LOGFILE
diff --git a/beos/beos_window.cpp b/beos/beos_window.cpp
index 3a87be8f4..2e4db7e4c 100644
--- a/beos/beos_window.cpp
+++ b/beos/beos_window.cpp
@@ -1604,7 +1604,7 @@ bool gui_window_scroll_start(struct gui_window *g)
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
diff --git a/cocoa/gui.m b/cocoa/gui.m
index 5bb29724a..911bc93c3 100644
--- a/cocoa/gui.m
+++ b/cocoa/gui.m
@@ -274,7 +274,7 @@ bool gui_window_scroll_start(struct gui_window *g)
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
diff --git a/desktop/gui.h b/desktop/gui.h
index dcb9160a5..0d3216e9b 100644
--- a/desktop/gui.h
+++ b/desktop/gui.h
@@ -108,7 +108,7 @@ void gui_window_new_content(struct gui_window *g);
bool gui_window_scroll_start(struct gui_window *g);
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect);
+ const struct rect *rect);
void gui_window_save_link(struct gui_window *g, const char *url,
const char *title);
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index 65a58a25e..0cbe1a2e5 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -1494,7 +1494,7 @@ gui_window_scroll_start(struct gui_window *g)
bool
gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
diff --git a/gtk/window.c b/gtk/window.c
index b57c849a5..d2f0d238a 100644
--- a/gtk/window.c
+++ b/gtk/window.c
@@ -989,7 +989,7 @@ bool gui_window_scroll_start(struct gui_window *g)
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
diff --git a/monkey/browser.c b/monkey/browser.c
index 36dd5d5bc..5159b2f1a 100644
--- a/monkey/browser.c
+++ b/monkey/browser.c
@@ -371,7 +371,7 @@ gui_window_remove_caret(struct gui_window *g)
bool
gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
fprintf(stdout, "WINDOW SCROLL_START WIN %u TYPE %i\n);
return false;
diff --git a/riscos/window.c b/riscos/window.c
index a5b4b553c..89d99261c 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -1253,7 +1253,7 @@ bool gui_window_scroll_start(struct gui_window *g)
*/
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
wimp_pointer pointer;
os_error *error;
diff --git a/windows/gui.c b/windows/gui.c
index d75fe065e..f3a2a730d 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -1719,7 +1719,7 @@ bool gui_window_scroll_start(struct gui_window *w)
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}