mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-25 15:59:36 +03:00
[project @ 2005-10-30 21:22:19 by bursa]
Add index parameter to content_open(). svn path=/import/netsurf/; revision=1872
This commit is contained in:
parent
f7c3021222
commit
972392ef66
@ -163,7 +163,8 @@ struct handler_entry {
|
||||
int clip_x0, int clip_y0, int clip_x1, int clip_y1,
|
||||
float scale, unsigned long background_colour);
|
||||
void (*open)(struct content *c, struct browser_window *bw,
|
||||
struct content *page, struct box *box,
|
||||
struct content *page, unsigned int index,
|
||||
struct box *box,
|
||||
struct object_params *params);
|
||||
void (*close)(struct content *c);
|
||||
/** There must be one content per user for this type. */
|
||||
@ -928,18 +929,26 @@ void content_stop_check(struct content *c)
|
||||
/**
|
||||
* A window containing the content has been opened.
|
||||
*
|
||||
* \param c content that has been opened
|
||||
* \param bw browser window containing the content
|
||||
* \param page content of type CONTENT_HTML containing c, or 0 if not an
|
||||
* object within a page
|
||||
* \param index index in page->data.html.object, or 0 if not an object
|
||||
* \param box box containing c, or 0 if not an object
|
||||
* \param params object parameters, or 0 if not an object
|
||||
*
|
||||
* Calls the open function for the content.
|
||||
*/
|
||||
|
||||
void content_open(struct content *c, struct browser_window *bw,
|
||||
struct content *page, struct box *box,
|
||||
struct content *page, unsigned int index, struct box *box,
|
||||
struct object_params *params)
|
||||
{
|
||||
assert(c != 0);
|
||||
assert(c->type < CONTENT_UNKNOWN);
|
||||
LOG(("content %s", c->url));
|
||||
if (handler_map[c->type].open)
|
||||
handler_map[c->type].open(c, bw, page, box, params);
|
||||
handler_map[c->type].open(c, bw, page, index, box, params);
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,9 +20,11 @@
|
||||
* Contents have an associated set of users, which are informed by a callback
|
||||
* when the state of the content changes or something interesting happens.
|
||||
*
|
||||
* Optionally, contents may have instances (depending on type). Instances
|
||||
* represent copies of the same URL, for example if a page is open in two
|
||||
* windows, or a page contains the same image twice.
|
||||
* Depending on the type of content, there may be either one content structure
|
||||
* per URL which is shared among all users, or one per URL per user. For
|
||||
* example, CONTENT_JPEGs are shared, while there is one CONTENT_HTML per user
|
||||
* (because each instance of an HTML page may have different parameters such as
|
||||
* window width). This is controlled by no_share in ::handler_map.
|
||||
*
|
||||
* The status of a content follows a fixed order. Certain content functions
|
||||
* change the state, and each change of state results in a message to all users
|
||||
@ -305,7 +307,7 @@ void content_stop(struct content *c,
|
||||
intptr_t p1, intptr_t p2, union content_msg_data data),
|
||||
intptr_t p1, intptr_t p2);
|
||||
void content_open(struct content *c, struct browser_window *bw,
|
||||
struct content *page, struct box *box,
|
||||
struct content *page, unsigned int index, struct box *box,
|
||||
struct object_params *params);
|
||||
void content_close(struct content *c);
|
||||
void content_add_error(struct content *c, const char *token,
|
||||
|
Loading…
Reference in New Issue
Block a user