Drag fixup. Add some documentation.

This commit is contained in:
Michael Drake 2013-02-08 15:05:07 +00:00
parent 4747bbbfb2
commit 9c20ff9592
3 changed files with 13 additions and 2 deletions

View File

@ -396,6 +396,8 @@ void browser_window_set_drag_type(struct browser_window *bw,
top_bw->drag_window = bw;
switch (type) {
case DRAGGING_SELECTION:
return;
case DRAGGING_SCR_X:
case DRAGGING_SCR_Y:
case DRAGGING_CONTENT_SCROLLBAR:
@ -1554,10 +1556,10 @@ nserror browser_window_callback(hlcache_handle *c,
bdt = DRAGGING_NONE;
break;
case CONTENT_DRAG_SCROLL:
bdt = DRAGGING_SELECTION;
bdt = DRAGGING_CONTENT_SCROLLBAR;
break;
case CONTENT_DRAG_SELECTION:
bdt = DRAGGING_CONTENT_SCROLLBAR;
bdt = DRAGGING_SELECTION;
break;
}
browser_window_set_drag_type(bw, bdt, event->data.drag.rect);

View File

@ -943,6 +943,7 @@ void html_overflow_scroll_drag_end(struct scrollbar *scrollbar,
}
}
/* Documented in html_internal.h */
void html_set_drag_type(html_content *html, html_drag_type drag_type,
union html_drag_owner drag_owner, const struct rect *rect)
{

View File

@ -141,6 +141,14 @@ void html_set_status(html_content *c, const char *extra);
void html__redraw_a_box(html_content *html, struct box *box);
/**
* Set our drag status, and inform whatever owns the content
*
* \param html HTML content
* \param drag_type Type of drag
* \param drag_owner What owns the drag
* \param rect Pointer movement bounds
*/
void html_set_drag_type(html_content *html, html_drag_type drag_type,
union html_drag_owner drag_owner, const struct rect *rect);