r13404 chris_y - /trunk/netsurf/amiga/clipboard.c
by netsurf@semichrome.net
Author: chris_y
Date: Sun Jan 15 09:58:26 2012
New Revision: 13404
URL: http://source.netsurf-browser.org?rev=13404&view=rev
Log:
Accept codeset 1 (undefined) as 106 (UTF-8) when pasting from the
clipboard. This should allow us to at least paste from broken ports of
MorphOS apps.
Modified:
trunk/netsurf/amiga/clipboard.c
Modified: trunk/netsurf/amiga/clipboard.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/clipboard.c?rev=134...
==============================================================================
--- trunk/netsurf/amiga/clipboard.c (original)
+++ trunk/netsurf/amiga/clipboard.c Sun Jan 15 09:58:26 2012
@@ -111,6 +111,7 @@
struct ContextNode *cn;
ULONG rlen=0,error;
struct CSet cset;
+ LONG codeset = 0;
char *clip;
STRPTR readbuf = AllocVec(1024,MEMF_PRIVATE | MEMF_CLEAR);
@@ -131,13 +132,15 @@
if((cn)&&(cn->cn_Type == ID_FTXT)&&(cn->cn_ID == ID_CSET))
{
rlen = ReadChunkBytes(iffh,&cset,24);
+ if(cset.CodeSet == 1) codeset = 106;
+ else codeset = cset.CodeSet;
}
if((cn)&&(cn->cn_Type == ID_FTXT)&&(cn->cn_ID == ID_CHRS))
{
while((rlen = ReadChunkBytes(iffh,readbuf,1024)) > 0)
{
- if(cset.CodeSet == 0)
+ if(codeset == 0)
{
utf8_from_local_encoding(readbuf,rlen,&clip);
}
@@ -145,7 +148,7 @@
{
utf8_from_enc(readbuf,
(const char *)ObtainCharsetInfo(DFCS_NUMBER,
- cset.CodeSet, DFCS_MIMENAME),
+ codeset, DFCS_MIMENAME),
rlen, &clip);
}
11 years, 4 months
r13403 chris_y - /trunk/netsurf/amiga/gui.c
by netsurf@semichrome.net
Author: chris_y
Date: Sun Jan 15 09:57:02 2012
New Revision: 13403
URL: http://source.netsurf-browser.org?rev=13403&view=rev
Log:
Fix build
Modified:
trunk/netsurf/amiga/gui.c
Modified: trunk/netsurf/amiga/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui.c?rev=13403&r1=...
==============================================================================
--- trunk/netsurf/amiga/gui.c (original)
+++ trunk/netsurf/amiga/gui.c Sun Jan 15 09:57:02 2012
@@ -3901,13 +3901,13 @@
if(type == GDRAGGING_NONE)
{
- SetWindowAttrs(gwin->win, WA_GrabFocus, 0,
+ SetWindowAttrs(g->shared->win, WA_GrabFocus, 0,
WA_MouseLimits, NULL, TAG_DONE);
- if(gwin->ptr_lock)
- {
- FreeVec(gwin->ptr_lock);
- gwin->ptr_lock = NULL;
+ if(g->shared->ptr_lock)
+ {
+ FreeVec(g->shared->ptr_lock);
+ g->shared->ptr_lock = NULL;
}
}
11 years, 4 months
r13401 chris_y - in /trunk/netsurf/amiga: gui.c gui.h
by netsurf@semichrome.net
Author: chris_y
Date: Wed Jan 11 15:41:55 2012
New Revision: 13401
URL: http://source.netsurf-browser.org?rev=13401&view=rev
Log:
Allow confining the pointer to part of the window during drags. Actually
we aren't acting on this for any current drag types, but if we need to do
so in the future (eg. frame resizing), this is the code to do it. The trap
lasts 10 IntuiTicks so is re-asserted on every mouse move when an active
drag is in effect. Drag type must be set to GDRAGGING_NONE to clear.
Modified:
trunk/netsurf/amiga/gui.c
trunk/netsurf/amiga/gui.h
Modified: trunk/netsurf/amiga/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui.c?rev=13401&r1=...
==============================================================================
--- trunk/netsurf/amiga/gui.c (original)
+++ trunk/netsurf/amiga/gui.c Wed Jan 11 15:41:55 2012
@@ -1090,6 +1090,54 @@
}
}
+struct IBox *ami_ns_rect_to_ibox(struct gui_window_2 *gwin, const struct rect *rect)
+{
+ struct IBox *bbox, *ibox;
+
+ ibox = AllocVec(sizeof(struct IBox), MEMF_CLEAR | MEMF_PRIVATE);
+ if(ibox == NULL) return NULL;
+
+ GetAttr(SPACE_AreaBox, (Object *)gwin->objects[GID_BROWSER], (ULONG *)&bbox);
+
+ ibox->Left = gwin->win->MouseX + (rect->x0 * gwin->bw->scale);
+ ibox->Top = gwin->win->MouseY + (rect->y0 * gwin->bw->scale);
+
+ ibox->Width = (rect->x1 - rect->x0) * gwin->bw->scale;
+ ibox->Height = (rect->y1 - rect->y0) * gwin->bw->scale;
+
+ if(ibox->Left < bbox->Left) ibox->Left = bbox->Left;
+ if(ibox->Top < bbox->Top) ibox->Top = bbox->Top;
+
+ if((ibox->Left > (bbox->Left + bbox->Width)) ||
+ (ibox->Top > (bbox->Top + bbox->Height)) ||
+ (ibox->Width < 0) || (ibox->Height < 0))
+ {
+ FreeVec(ibox);
+ return NULL;
+ }
+
+ return ibox;
+}
+
+void ami_gui_trap_mouse(struct gui_window_2 *gwin)
+{
+ switch(gwin->drag_op)
+ {
+ case GDRAGGING_NONE:
+ case GDRAGGING_SCROLLBAR:
+ case GDRAGGING_OTHER:
+ break;
+
+ default:
+ if(gwin->ptr_lock)
+ {
+ SetWindowAttrs(gwin->win, WA_GrabFocus, 10,
+ WA_MouseLimits, gwin->ptr_lock, TAG_DONE);
+ }
+ break;
+ }
+}
+
void ami_handle_msg(void)
{
struct IntuiMessage *message = NULL;
@@ -1249,6 +1297,8 @@
switch(result & WMHI_CLASSMASK) // class
{
case WMHI_MOUSEMOVE:
+ ami_gui_trap_mouse(gwin); /* re-assert mouse area */
+
drag_x_move = 0;
drag_y_move = 0;
@@ -3846,7 +3896,21 @@
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
const struct rect *rect)
{
- DebugPrintF("drag start\n");
+ g->shared->drag_op = type;
+ if(rect) g->shared->ptr_lock = ami_ns_rect_to_ibox(g->shared, rect);
+
+ if(type == GDRAGGING_NONE)
+ {
+ SetWindowAttrs(gwin->win, WA_GrabFocus, 0,
+ WA_MouseLimits, NULL, TAG_DONE);
+
+ if(gwin->ptr_lock)
+ {
+ FreeVec(gwin->ptr_lock);
+ gwin->ptr_lock = NULL;
+ }
+ }
+
return true;
}
Modified: trunk/netsurf/amiga/gui.h
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui.h?rev=13401&r1=...
==============================================================================
--- trunk/netsurf/amiga/gui.h (original)
+++ trunk/netsurf/amiga/gui.h Wed Jan 11 15:41:55 2012
@@ -106,6 +106,8 @@
struct AppIcon *appicon; /* iconify appicon */
struct DiskObject *dobj; /* iconify appicon */
struct Hook search_ico_hook;
+ gui_drag_type drag_op;
+ struct IBox *ptr_lock;
};
struct gui_window
11 years, 4 months
r13400 mono - in /trunk/netsurf/atari: toolbar.c toolbar.h
by netsurf@semichrome.net
Author: mono
Date: Wed Jan 11 14:35:50 2012
New Revision: 13400
URL: http://source.netsurf-browser.org?rev=13400&view=rev
Log:
Added functions to hide/show the toolbar.
Modified:
trunk/netsurf/atari/toolbar.c
trunk/netsurf/atari/toolbar.h
Modified: trunk/netsurf/atari/toolbar.c
URL: http://source.netsurf-browser.org/trunk/netsurf/atari/toolbar.c?rev=13400...
==============================================================================
--- trunk/netsurf/atari/toolbar.c (original)
+++ trunk/netsurf/atari/toolbar.c Wed Jan 11 14:35:50 2012
@@ -409,7 +409,7 @@
t->url.rdw_area.g_h = ( oldy1 > newy1 ) ?
oldy1 - t->url.rdw_area.g_y : newy1 - t->url.rdw_area.g_y;
}
-}
+}
void tb_url_redraw( struct gui_window * gw )
{
@@ -752,5 +752,25 @@
void tb_stop_click( struct gui_window * gw )
{
browser_window_stop( gw->browser->bw );
-}
-
+}
+
+
+void tb_hide( struct gui_window * gw, short mode )
+{
+ CMP_TOOLBAR tb = gw->root->toolbar;
+ assert( tb != NULL );
+ if( mode == 1 ){
+ tb->hidden = true;
+ tb->comp->rect.g_h = 0;
+ tb->comp->bounds.max_height = 0;
+
+ } else {
+ tb->hidden = false;
+ tb->comp->rect.g_h = TOOLBAR_HEIGHT;
+ tb->comp->bounds.max_height = TOOLBAR_HEIGHT;
+ }
+ gw->browser->reformat_pending = true;
+ browser_update_rects( gw );
+ snd_rdw( gw->root->handle );
+}
+
Modified: trunk/netsurf/atari/toolbar.h
URL: http://source.netsurf-browser.org/trunk/netsurf/atari/toolbar.h?rev=13400...
==============================================================================
--- trunk/netsurf/atari/toolbar.h (original)
+++ trunk/netsurf/atari/toolbar.h Wed Jan 11 14:35:50 2012
@@ -70,7 +70,8 @@
struct s_throbber_widget throbber;
GRECT btdim;
/* size & location of buttons: */
- struct s_tb_button * buttons;
+ struct s_tb_button * buttons;
+ bool hidden;
int btcnt;
};
@@ -96,6 +97,8 @@
void tb_url_set( struct gui_window * gw, char * text );
/* perform redraw of invalidated url textinput areas: */
void tb_url_redraw( struct gui_window * gw );
-struct gui_window * tb_gui_window( CMP_TOOLBAR tb );
+struct gui_window * tb_gui_window( CMP_TOOLBAR tb );
+/* hide toolbar, mode = 1: hide, mode = 0: show */
+void tb_hide( struct gui_window * gw, short mode );
#endif
11 years, 4 months
r13399 mono - in /trunk/netsurf/atari: misc.c misc.h
by netsurf@semichrome.net
Author: mono
Date: Wed Jan 11 14:35:14 2012
New Revision: 13399
URL: http://source.netsurf-browser.org?rev=13399&view=rev
Log:
Removed non declared and unused "cookies_update" function ( some frontends still define the functions), added missing prototypes.
Modified:
trunk/netsurf/atari/misc.c
trunk/netsurf/atari/misc.h
Modified: trunk/netsurf/atari/misc.c
URL: http://source.netsurf-browser.org/trunk/netsurf/atari/misc.c?rev=13399&r1...
==============================================================================
--- trunk/netsurf/atari/misc.c (original)
+++ trunk/netsurf/atari/misc.c Wed Jan 11 14:35:14 2012
@@ -21,11 +21,11 @@
#include <stdio.h>
#include <string.h>
#include <mint/osbind.h>
-#include <mint/cookie.h>
#include <windom.h>
#include "desktop/cookies.h"
-#include "desktop/mouse.h"
+#include "desktop/mouse.h"
+#include "desktop/cookies.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/url.h"
@@ -53,11 +53,6 @@
{
printf("%s\n", error);
exit(1);
-}
-
-bool cookies_update(const char *domain, const struct cookie_data *data)
-{
- return true;
}
/**
Modified: trunk/netsurf/atari/misc.h
URL: http://source.netsurf-browser.org/trunk/netsurf/atari/misc.h?rev=13399&r1...
==============================================================================
--- trunk/netsurf/atari/misc.h (original)
+++ trunk/netsurf/atari/misc.h Wed Jan 11 14:35:14 2012
@@ -43,7 +43,9 @@
OBJECT *get_tree( int idx );
char *get_rsc_string( int idx );
void gem_set_cursor( MFORM_EX * cursor );
-void dbg_grect( char * str, GRECT * r );
+void dbg_grect( char * str, GRECT * r );
+void dbg_lgrect( char * str, LGRECT * r );
+void dbg_pxy( char * str, short * pxy );
void * ldg_open( char * name, short * global );
void * ldg_find( char * name, short * ldg );
int ldg_close( void * ldg, short * global );
11 years, 4 months
r13398 tlsa - in /trunk/netsurf/desktop: browser.c browser.h
by netsurf@semichrome.net
Author: tlsa
Date: Wed Jan 11 10:48:59 2012
New Revision: 13398
URL: http://source.netsurf-browser.org?rev=13398&view=rev
Log:
Constify rect param to browser_window_set_drag_type.
Modified:
trunk/netsurf/desktop/browser.c
trunk/netsurf/desktop/browser.h
Modified: trunk/netsurf/desktop/browser.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/browser.c?rev=133...
==============================================================================
--- trunk/netsurf/desktop/browser.c (original)
+++ trunk/netsurf/desktop/browser.c Wed Jan 11 10:48:59 2012
@@ -380,7 +380,7 @@
/* exported interface, documented in browser.h */
void browser_window_set_drag_type(struct browser_window *bw,
- browser_drag_type type, struct rect *rect)
+ browser_drag_type type, const struct rect *rect)
{
struct browser_window *top_bw = browser_window_get_root(bw);
gui_drag_type gtype;
Modified: trunk/netsurf/desktop/browser.h
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/browser.h?rev=133...
==============================================================================
--- trunk/netsurf/desktop/browser.h (original)
+++ trunk/netsurf/desktop/browser.h Wed Jan 11 10:48:59 2012
@@ -417,7 +417,7 @@
* \param rect area pointer may be confined to, during drag, or NULL
*/
void browser_window_set_drag_type(struct browser_window *bw,
- browser_drag_type type, struct rect *rect);
+ browser_drag_type type, const struct rect *rect);
/*
* Get the root level browser window
11 years, 4 months
r13397 tlsa - in /trunk/netsurf: amiga/gui.c atari/gui.c beos/beos_window.cpp cocoa/gui.m desktop/gui.h framebuffer/gui.c gtk/window.c monkey/browser.c riscos/window.c windows/gui.c
by netsurf@semichrome.net
Author: tlsa
Date: Wed Jan 11 10:45:17 2012
New Revision: 13397
URL: http://source.netsurf-browser.org?rev=13397&view=rev
Log:
Constify rect param to gui_window_drag_start.
Modified:
trunk/netsurf/amiga/gui.c
trunk/netsurf/atari/gui.c
trunk/netsurf/beos/beos_window.cpp
trunk/netsurf/cocoa/gui.m
trunk/netsurf/desktop/gui.h
trunk/netsurf/framebuffer/gui.c
trunk/netsurf/gtk/window.c
trunk/netsurf/monkey/browser.c
trunk/netsurf/riscos/window.c
trunk/netsurf/windows/gui.c
Modified: trunk/netsurf/amiga/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui.c?rev=13397&r1=...
==============================================================================
--- trunk/netsurf/amiga/gui.c (original)
+++ trunk/netsurf/amiga/gui.c Wed Jan 11 10:45:17 2012
@@ -3844,7 +3844,7 @@
}
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;
Modified: trunk/netsurf/atari/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/atari/gui.c?rev=13397&r1=...
==============================================================================
--- trunk/netsurf/atari/gui.c (original)
+++ trunk/netsurf/atari/gui.c Wed Jan 11 10:45:17 2012
@@ -86,18 +86,18 @@
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 @@
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 @@
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_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 @@
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 @@
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_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 @@
{
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 @@
{
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 @@
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 @@
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 @@
/**
* 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_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
TODO();
return true;
@@ -806,7 +806,7 @@
/*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 @@
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 @@
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
Modified: trunk/netsurf/beos/beos_window.cpp
URL: http://source.netsurf-browser.org/trunk/netsurf/beos/beos_window.cpp?rev=...
==============================================================================
--- trunk/netsurf/beos/beos_window.cpp (original)
+++ trunk/netsurf/beos/beos_window.cpp Wed Jan 11 10:45:17 2012
@@ -1604,7 +1604,7 @@
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
Modified: trunk/netsurf/cocoa/gui.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/gui.m?rev=13397&r1=...
==============================================================================
--- trunk/netsurf/cocoa/gui.m (original)
+++ trunk/netsurf/cocoa/gui.m Wed Jan 11 10:45:17 2012
@@ -274,7 +274,7 @@
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
Modified: trunk/netsurf/desktop/gui.h
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/gui.h?rev=13397&r...
==============================================================================
--- trunk/netsurf/desktop/gui.h (original)
+++ trunk/netsurf/desktop/gui.h Wed Jan 11 10:45:17 2012
@@ -108,7 +108,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);
void gui_window_save_link(struct gui_window *g, const char *url,
const char *title);
Modified: trunk/netsurf/framebuffer/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/framebuffer/gui.c?rev=133...
==============================================================================
--- trunk/netsurf/framebuffer/gui.c (original)
+++ trunk/netsurf/framebuffer/gui.c Wed Jan 11 10:45:17 2012
@@ -1494,7 +1494,7 @@
bool
gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
Modified: trunk/netsurf/gtk/window.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/window.c?rev=13397&r1...
==============================================================================
--- trunk/netsurf/gtk/window.c (original)
+++ trunk/netsurf/gtk/window.c Wed Jan 11 10:45:17 2012
@@ -989,7 +989,7 @@
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
Modified: trunk/netsurf/monkey/browser.c
URL: http://source.netsurf-browser.org/trunk/netsurf/monkey/browser.c?rev=1339...
==============================================================================
--- trunk/netsurf/monkey/browser.c (original)
+++ trunk/netsurf/monkey/browser.c Wed Jan 11 10:45:17 2012
@@ -371,7 +371,7 @@
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;
Modified: trunk/netsurf/riscos/window.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/window.c?rev=13397...
==============================================================================
--- trunk/netsurf/riscos/window.c (original)
+++ trunk/netsurf/riscos/window.c Wed Jan 11 10:45:17 2012
@@ -1253,7 +1253,7 @@
*/
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;
Modified: trunk/netsurf/windows/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/gui.c?rev=13397&r...
==============================================================================
--- trunk/netsurf/windows/gui.c (original)
+++ trunk/netsurf/windows/gui.c Wed Jan 11 10:45:17 2012
@@ -1719,7 +1719,7 @@
}
bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
- struct rect *rect)
+ const struct rect *rect)
{
return true;
}
11 years, 4 months
r13396 tlsa - in /trunk/netsurf/render: form.c html_interaction.c
by netsurf@semichrome.net
Author: tlsa
Date: Wed Jan 11 08:29:44 2012
New Revision: 13396
URL: http://source.netsurf-browser.org?rev=13396&view=rev
Log:
Don't need root bw here any more.
Modified:
trunk/netsurf/render/form.c
trunk/netsurf/render/html_interaction.c
Modified: trunk/netsurf/render/form.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/form.c?rev=13396&r...
==============================================================================
--- trunk/netsurf/render/form.c (original)
+++ trunk/netsurf/render/form.c Wed Jan 11 08:29:44 2012
@@ -1269,7 +1269,6 @@
struct form_control *control = client_data;
struct form_select_menu *menu = control->data.select.menu;
html_content *html = (html_content *)menu->c;
- struct browser_window *root_bw;
switch (scrollbar_data->msg) {
case SCROLLBAR_MSG_REDRAW:
@@ -1299,8 +1298,6 @@
DRAGGING_CONTENT_SCROLLBAR, &rect);
menu->scroll_capture = true;
-
- root_bw = browser_window_get_root(html->bw);
}
break;
case SCROLLBAR_MSG_SCROLL_FINISHED:
Modified: trunk/netsurf/render/html_interaction.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/html_interaction.c...
==============================================================================
--- trunk/netsurf/render/html_interaction.c (original)
+++ trunk/netsurf/render/html_interaction.c Wed Jan 11 08:29:44 2012
@@ -817,8 +817,6 @@
html_content *html = (html_content *)data->c;
struct box *box = data->box;
int x, y, box_x, box_y, diff_x, diff_y;
- struct browser_window *root_bw;
-
switch(scrollbar_data->msg) {
case SCROLLBAR_MSG_REDRAW:
@@ -859,8 +857,6 @@
DRAGGING_CONTENT_SCROLLBAR, &rect);
html->scrollbar = scrollbar_data->scrollbar;
-
- root_bw = browser_window_get_root(html->bw);
}
break;
case SCROLLBAR_MSG_SCROLL_FINISHED:
11 years, 4 months
r13395 tlsa - in /trunk/netsurf: amiga/ atari/ beos/ cocoa/ desktop/ framebuffer/ gtk/ monkey/ render/ riscos/ windows/
by netsurf@semichrome.net
Author: tlsa
Date: Wed Jan 11 08:20:26 2012
New Revision: 13395
URL: http://source.netsurf-browser.org?rev=13395&view=rev
Log:
Pass pointer constraints for drag out to front ends. Ensure content scrollbar drag termination always informs the browser window layer that the drag is over.
Modified:
trunk/netsurf/amiga/gui.c
trunk/netsurf/atari/gui.c
trunk/netsurf/beos/beos_window.cpp
trunk/netsurf/cocoa/gui.m
trunk/netsurf/desktop/browser.c
trunk/netsurf/desktop/browser.h
trunk/netsurf/desktop/gui.h
trunk/netsurf/framebuffer/gui.c
trunk/netsurf/gtk/window.c
trunk/netsurf/monkey/browser.c
trunk/netsurf/render/form.c
trunk/netsurf/render/html_interaction.c
trunk/netsurf/riscos/gui.c
trunk/netsurf/riscos/gui.h
trunk/netsurf/riscos/window.c
trunk/netsurf/windows/gui.c
Modified: trunk/netsurf/amiga/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui.c?rev=13395&r1=...
==============================================================================
--- trunk/netsurf/amiga/gui.c (original)
+++ trunk/netsurf/amiga/gui.c Wed Jan 11 08:20:26 2012
@@ -3843,10 +3843,10 @@
return true;
}
-bool gui_window_box_scroll_start(struct gui_window *g,
- int x0, int y0, int x1, int y1)
-{
- DebugPrintF("box scroll start\n");
+bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
+{
+ DebugPrintF("drag start\n");
return true;
}
Modified: trunk/netsurf/atari/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/atari/gui.c?rev=13395&r1=...
==============================================================================
--- trunk/netsurf/atari/gui.c (original)
+++ trunk/netsurf/atari/gui.c Wed Jan 11 08:20:26 2012
@@ -593,8 +593,8 @@
return true;
}
-bool gui_window_box_scroll_start(struct gui_window *w,
- int x0, int y0, int x1, int y1)
+bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
{
TODO();
return true;
Modified: trunk/netsurf/beos/beos_window.cpp
URL: http://source.netsurf-browser.org/trunk/netsurf/beos/beos_window.cpp?rev=...
==============================================================================
--- trunk/netsurf/beos/beos_window.cpp (original)
+++ trunk/netsurf/beos/beos_window.cpp Wed Jan 11 08:20:26 2012
@@ -1603,8 +1603,8 @@
return true;
}
-bool gui_window_box_scroll_start(struct gui_window *g,
- int x0, int y0, int x1, int y1)
+bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
{
return true;
}
Modified: trunk/netsurf/cocoa/gui.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/gui.m?rev=13395&r1=...
==============================================================================
--- trunk/netsurf/cocoa/gui.m (original)
+++ trunk/netsurf/cocoa/gui.m Wed Jan 11 08:20:26 2012
@@ -273,8 +273,8 @@
return true;
}
-bool gui_window_box_scroll_start(struct gui_window *g,
- int x0, int y0, int x1, int y1)
+bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
{
return true;
}
Modified: trunk/netsurf/desktop/browser.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/browser.c?rev=133...
==============================================================================
--- trunk/netsurf/desktop/browser.c (original)
+++ trunk/netsurf/desktop/browser.c Wed Jan 11 08:20:26 2012
@@ -383,16 +383,28 @@
browser_drag_type type, struct rect *rect)
{
struct browser_window *top_bw = browser_window_get_root(bw);
-
- if (type == DRAGGING_NONE)
+ gui_drag_type gtype;
+
+ bw->drag_type = type;
+
+ if (type == DRAGGING_NONE) {
top_bw->drag_window = NULL;
- else
+ } else {
top_bw->drag_window = bw;
- bw->drag_type = type;
-
- /* TODO: inform front end that the core is handling drag,
- * pass rect */
+ switch (type) {
+ case DRAGGING_SCR_X:
+ case DRAGGING_SCR_Y:
+ case DRAGGING_CONTENT_SCROLLBAR:
+ gtype = GDRAGGING_SCROLLBAR;
+ break;
+ default:
+ gtype = GDRAGGING_OTHER;
+ break;
+ }
+
+ gui_window_drag_start(top_bw->window, gtype, rect);
+ }
}
/* exported interface, documented in browser.h */
@@ -2554,10 +2566,8 @@
switch (bw->drag_type) {
case DRAGGING_SELECTION:
- /* Drag handled by content handler */
- break;
-
case DRAGGING_OTHER:
+ case DRAGGING_CONTENT_SCROLLBAR:
/* Drag handled by content handler */
break;
Modified: trunk/netsurf/desktop/browser.h
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/browser.h?rev=133...
==============================================================================
--- trunk/netsurf/desktop/browser.h (original)
+++ trunk/netsurf/desktop/browser.h Wed Jan 11 08:20:26 2012
@@ -63,6 +63,7 @@
DRAGGING_FRAME,
DRAGGING_SCR_X,
DRAGGING_SCR_Y,
+ DRAGGING_CONTENT_SCROLLBAR,
DRAGGING_OTHER
} browser_drag_type;
Modified: trunk/netsurf/desktop/gui.h
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/gui.h?rev=13395&r...
==============================================================================
--- trunk/netsurf/desktop/gui.h (original)
+++ trunk/netsurf/desktop/gui.h Wed Jan 11 08:20:26 2012
@@ -40,6 +40,12 @@
GUI_SAVE_TEXT_SELECTION,
GUI_SAVE_CLIPBOARD_CONTENTS
} gui_save_type;
+
+typedef enum {
+ GDRAGGING_NONE,
+ GDRAGGING_SCROLLBAR,
+ GDRAGGING_OTHER
+} gui_drag_type;
struct gui_window;
struct gui_download_window;
@@ -100,8 +106,10 @@
void gui_window_remove_caret(struct gui_window *g);
void gui_window_new_content(struct gui_window *g);
bool gui_window_scroll_start(struct gui_window *g);
-bool gui_window_box_scroll_start(struct gui_window *g,
- int x0, int y0, int x1, int y1);
+
+bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect);
+
void gui_window_save_link(struct gui_window *g, const char *url,
const char *title);
Modified: trunk/netsurf/framebuffer/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/framebuffer/gui.c?rev=133...
==============================================================================
--- trunk/netsurf/framebuffer/gui.c (original)
+++ trunk/netsurf/framebuffer/gui.c Wed Jan 11 08:20:26 2012
@@ -1493,8 +1493,8 @@
}
bool
-gui_window_box_scroll_start(struct gui_window *g,
- int x0, int y0, int x1, int y1)
+gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
{
return true;
}
Modified: trunk/netsurf/gtk/window.c
URL: http://source.netsurf-browser.org/trunk/netsurf/gtk/window.c?rev=13395&r1...
==============================================================================
--- trunk/netsurf/gtk/window.c (original)
+++ trunk/netsurf/gtk/window.c Wed Jan 11 08:20:26 2012
@@ -988,8 +988,8 @@
return true;
}
-bool gui_window_box_scroll_start(struct gui_window *g,
- int x0, int y0, int x1, int y1)
+bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
{
return true;
}
Modified: trunk/netsurf/monkey/browser.c
URL: http://source.netsurf-browser.org/trunk/netsurf/monkey/browser.c?rev=1339...
==============================================================================
--- trunk/netsurf/monkey/browser.c (original)
+++ trunk/netsurf/monkey/browser.c Wed Jan 11 08:20:26 2012
@@ -370,11 +370,10 @@
}
bool
-gui_window_box_scroll_start(struct gui_window *g,
- int x0, int y0, int x1, int y1)
-{
- fprintf(stdout, "WINDOW SCROLL_START WIN %u X0 %d Y0 %d X1 %d Y1 %d\n",
- g->win_num, x0, y0, x1, y1);
+gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
+{
+ fprintf(stdout, "WINDOW SCROLL_START WIN %u TYPE %i\n);
return false;
}
Modified: trunk/netsurf/render/form.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/form.c?rev=13395&r...
==============================================================================
--- trunk/netsurf/render/form.c (original)
+++ trunk/netsurf/render/form.c Wed Jan 11 08:20:26 2012
@@ -1295,19 +1295,19 @@
.y1 = scrollbar_data->y1
};
- browser_window_set_drag_type(html->bw, DRAGGING_OTHER,
- &rect);
+ browser_window_set_drag_type(html->bw,
+ DRAGGING_CONTENT_SCROLLBAR, &rect);
menu->scroll_capture = true;
root_bw = browser_window_get_root(html->bw);
- gui_window_box_scroll_start(root_bw->window,
- scrollbar_data->x0, scrollbar_data->y0,
- scrollbar_data->x1, scrollbar_data->y1);
}
break;
case SCROLLBAR_MSG_SCROLL_FINISHED:
menu->scroll_capture = false;
+
+ browser_window_set_drag_type(html->bw,
+ DRAGGING_NONE, NULL);
break;
default:
break;
Modified: trunk/netsurf/render/html_interaction.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/html_interaction.c...
==============================================================================
--- trunk/netsurf/render/html_interaction.c (original)
+++ trunk/netsurf/render/html_interaction.c Wed Jan 11 08:20:26 2012
@@ -223,8 +223,7 @@
return;
}
- if (bw->drag_type != DRAGGING_NONE && !mouse &&
- html->scrollbar != NULL) {
+ if (!mouse && html->scrollbar != NULL) {
/* drag end: scrollbar */
html_overflow_scroll_drag_end(html->scrollbar, mouse, x, y);
}
@@ -856,19 +855,19 @@
.x1 = scrollbar_data->x1,
.y1 = scrollbar_data->y1
};
- browser_window_set_drag_type(html->bw, DRAGGING_OTHER,
- &rect);
+ browser_window_set_drag_type(html->bw,
+ DRAGGING_CONTENT_SCROLLBAR, &rect);
html->scrollbar = scrollbar_data->scrollbar;
root_bw = browser_window_get_root(html->bw);
- gui_window_box_scroll_start(root_bw->window,
- scrollbar_data->x0, scrollbar_data->y0,
- scrollbar_data->x1, scrollbar_data->y1);
}
break;
case SCROLLBAR_MSG_SCROLL_FINISHED:
html->scrollbar = NULL;
+
+ browser_window_set_drag_type(html->bw,
+ DRAGGING_NONE, NULL);
browser_window_set_pointer(html->bw,
GUI_POINTER_DEFAULT);
Modified: trunk/netsurf/riscos/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/gui.c?rev=13395&r1...
==============================================================================
--- trunk/netsurf/riscos/gui.c (original)
+++ trunk/netsurf/riscos/gui.c Wed Jan 11 08:20:26 2012
@@ -176,7 +176,7 @@
/** Browser window which the pointer is over, or 0 if none. */
struct gui_window *gui_track_gui_window;
-gui_drag_type gui_current_drag_type;
+ro_gui_drag_type gui_current_drag_type;
wimp_t task_handle; /**< RISC OS wimp task handle. */
static clock_t gui_last_poll; /**< Time of last wimp_poll. */
osspriteop_area *gui_sprites; /**< Sprite area containing pointer and hotlist sprites */
Modified: trunk/netsurf/riscos/gui.h
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/gui.h?rev=13395&r1...
==============================================================================
--- trunk/netsurf/riscos/gui.h (original)
+++ trunk/netsurf/riscos/gui.h Wed Jan 11 08:20:26 2012
@@ -68,9 +68,9 @@
typedef enum { GUI_DRAG_NONE, GUI_DRAG_SELECTION, GUI_DRAG_DOWNLOAD_SAVE,
GUI_DRAG_SAVE, GUI_DRAG_SCROLL, GUI_DRAG_STATUS_RESIZE,
GUI_DRAG_TREEVIEW, GUI_DRAG_BUTTONBAR,
- GUI_DRAG_FRAME } gui_drag_type;
-
-extern gui_drag_type gui_current_drag_type;
+ GUI_DRAG_FRAME } ro_gui_drag_type;
+
+extern ro_gui_drag_type gui_current_drag_type;
/** desktop font, size and style being used */
extern char ro_gui_desktop_font_family[];
Modified: trunk/netsurf/riscos/window.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/window.c?rev=13395...
==============================================================================
--- trunk/netsurf/riscos/window.c (original)
+++ trunk/netsurf/riscos/window.c Wed Jan 11 08:20:26 2012
@@ -1244,45 +1244,62 @@
/**
- * Platform-dependent part of starting a box scrolling operation,
- * for frames and textareas.
- *
- * \param x0 minimum x ordinate of box relative to mouse pointer
- * \param y0 minimum y ordinate
- * \param x1 maximum x ordinate
- * \param y1 maximum y ordinate
+ * Platform-dependent part of starting drag operation.
+ *
+ * \param g gui window containing the drag
+ * \param type type of drag the core is performing
+ * \param rect rectangle to constrain pointer to (relative to drag start coord)
* \return true iff succesful
*/
-bool gui_window_box_scroll_start(struct gui_window *g, int x0, int y0, int x1, int y1)
+bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
{
wimp_pointer pointer;
os_error *error;
wimp_drag drag;
- error = xwimp_get_pointer_info(&pointer);
- if (error) {
- LOG(("xwimp_get_pointer_info 0x%x : %s",
- error->errnum, error->errmess));
- warn_user("WimpError", error->errmess);
- return false;
- }
-
- drag.type = wimp_DRAG_USER_POINT;
- drag.bbox.x0 = pointer.pos.x + (int)(x0 * 2 * g->bw->scale);
- drag.bbox.y0 = pointer.pos.y + (int)(y0 * 2 * g->bw->scale);
- drag.bbox.x1 = pointer.pos.x + (int)(x1 * 2 * g->bw->scale);
- drag.bbox.y1 = pointer.pos.y + (int)(y1 * 2 * g->bw->scale);
-
- error = xwimp_drag_box(&drag);
- if (error) {
- LOG(("xwimp_drag_box: 0x%x : %s",
- error->errnum, error->errmess));
- warn_user("WimpError", error->errmess);
- return false;
- }
-
- gui_current_drag_type = GUI_DRAG_SCROLL;
+ if (rect != NULL) {
+ /* We have a box to constrain the pointer to, for the drag
+ * duration */
+ error = xwimp_get_pointer_info(&pointer);
+ if (error) {
+ LOG(("xwimp_get_pointer_info 0x%x : %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ return false;
+ }
+
+ drag.type = wimp_DRAG_USER_POINT;
+ drag.bbox.x0 = pointer.pos.x +
+ (int)(rect->x0 * 2 * g->bw->scale);
+ drag.bbox.y0 = pointer.pos.y +
+ (int)(rect->y0 * 2 * g->bw->scale);
+ drag.bbox.x1 = pointer.pos.x +
+ (int)(rect->x1 * 2 * g->bw->scale);
+ drag.bbox.y1 = pointer.pos.y +
+ (int)(rect->y1 * 2 * g->bw->scale);
+
+ error = xwimp_drag_box(&drag);
+ if (error) {
+ LOG(("xwimp_drag_box: 0x%x : %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ return false;
+ }
+ }
+
+ switch (type) {
+ case GDRAGGING_SCROLLBAR:
+ /* Dragging a core scrollbar */
+ gui_current_drag_type = GUI_DRAG_SCROLL;
+ break;
+
+ default:
+ /* Not handled here yet */
+ break;
+ }
+
return true;
}
Modified: trunk/netsurf/windows/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/gui.c?rev=13395&r...
==============================================================================
--- trunk/netsurf/windows/gui.c (original)
+++ trunk/netsurf/windows/gui.c Wed Jan 11 08:20:26 2012
@@ -1718,8 +1718,8 @@
return true;
}
-bool gui_window_box_scroll_start(struct gui_window *w,
- int x0, int y0, int x1, int y1)
+bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,
+ struct rect *rect)
{
return true;
}
11 years, 4 months