mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 04:02:34 +03:00
Continue doxygen error cleanup.
This commit is contained in:
parent
05a64bfde9
commit
5562c9a553
@ -356,12 +356,7 @@ static void gui_window_set_title(struct gui_window *gw, const char *title)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the status bar of a browser window.
|
||||
*
|
||||
* \param w gui_window to update
|
||||
* \param text new status text
|
||||
*/
|
||||
/* exported interface documented in atari/gui.h */
|
||||
void gui_window_set_status(struct gui_window *w, const char *text)
|
||||
{
|
||||
int l;
|
||||
|
@ -164,6 +164,12 @@ struct gui_window *gui_get_input_window(void);
|
||||
char *gui_window_get_url(struct gui_window *gw);
|
||||
char *gui_window_get_title(struct gui_window *gw);
|
||||
|
||||
/**
|
||||
* Set the status bar of a browser window.
|
||||
*
|
||||
* \param w The gui_window to update.
|
||||
* \param text new status text
|
||||
*/
|
||||
void gui_window_set_status(struct gui_window *w, const char *text);
|
||||
void gui_window_set_pointer(struct gui_window *gw, gui_pointer_shape shape);
|
||||
void gui_window_destroy(struct gui_window *w);
|
||||
|
@ -57,18 +57,23 @@ struct bitmap {
|
||||
#warning TODO: add correct locking (not strictly required)
|
||||
|
||||
|
||||
/** Convert to BeOS RGBA32_LITTLE (strictly BGRA) from NetSurf's favoured ABGR format.
|
||||
/**
|
||||
* Convert to BeOS RGBA32_LITTLE (strictly BGRA) from NetSurf's favoured ABGR format.
|
||||
*
|
||||
* Copies the converted data elsewhere. Operation is rotate left 8 bits.
|
||||
*
|
||||
* \param pixels Array of 32-bit values, in the form of ABGR. This will
|
||||
* be overwritten with new data in the form of BGRA.
|
||||
* \param width Width of the bitmap
|
||||
* \param height Height of the bitmap
|
||||
* \param rowstride Number of bytes to skip after each row (this
|
||||
* implementation requires this to be a multiple of 4.)
|
||||
* \param src Source 32-bit pixels arranged in ABGR order.
|
||||
* \param dst Output data in BGRA order.
|
||||
* \param width Width of the bitmap
|
||||
* \param height Height of the bitmap
|
||||
* \param rowstride Number of bytes to skip after each row (this implementation
|
||||
* requires this to be a multiple of 4.)
|
||||
*/
|
||||
static inline void nsbeos_rgba_to_bgra(void *src, void *dst, int width, int height,
|
||||
size_t rowstride)
|
||||
static inline void nsbeos_rgba_to_bgra(void *src,
|
||||
void *dst,
|
||||
int width,
|
||||
int height,
|
||||
size_t rowstride)
|
||||
{
|
||||
struct abgr { uint8 a, b, g, r; };
|
||||
struct rgba { uint8 r, g, b ,a; };
|
||||
|
@ -288,10 +288,9 @@ bool nsfont_paint(const plot_font_style_t *fstyle,
|
||||
/**
|
||||
* Convert a font style to a PangoFontDescription.
|
||||
*
|
||||
* \param fstyle style for this text
|
||||
* \return a new Pango font description
|
||||
* \param font Beos font object.
|
||||
* \param fstyle style for this text
|
||||
*/
|
||||
|
||||
void nsbeos_style_to_font(BFont &font, const plot_font_style_t *fstyle)
|
||||
{
|
||||
float size;
|
||||
|
11
beos/gui.cpp
11
beos/gui.cpp
@ -248,16 +248,15 @@ image_id nsbeos_find_app_path(char *path)
|
||||
/**
|
||||
* Locate a shared resource file by searching known places in order.
|
||||
*
|
||||
* Search order is: ~/config/settings/NetSurf/, ~/.netsurf/, $NETSURFRES/
|
||||
* (where NETSURFRES is an environment variable), and finally the path
|
||||
* specified by the macro at the top of this file.
|
||||
*
|
||||
* \param buf buffer to write to. must be at least PATH_MAX chars
|
||||
* \param filename file to look for
|
||||
* \param def default to return if file not found
|
||||
* \return buf
|
||||
*
|
||||
* Search order is: ~/config/settings/NetSurf/, ~/.netsurf/, $NETSURFRES/
|
||||
* (where NETSURFRES is an environment variable), and finally the path
|
||||
* specified by the #define at the top of this file.
|
||||
* \return path to resource.
|
||||
*/
|
||||
|
||||
static char *find_resource(char *buf, const char *filename, const char *def)
|
||||
{
|
||||
const char *cdir = NULL;
|
||||
|
@ -17,10 +17,7 @@
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* Content handling (implementation).
|
||||
*
|
||||
* This implementation is based on the ::handler_map array, which maps
|
||||
* ::content_type to the functions which implement that type.
|
||||
* Content handling implementation.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
@ -894,20 +891,8 @@ void content_add_error(struct content *c, const char *token,
|
||||
{
|
||||
}
|
||||
|
||||
bool content__set_title(struct content *c, const char *title)
|
||||
{
|
||||
char *new_title = strdup(title);
|
||||
if (new_title == NULL)
|
||||
return false;
|
||||
|
||||
if (c->title != NULL)
|
||||
free(c->title);
|
||||
|
||||
c->title = new_title;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
struct content_rfc5988_link *
|
||||
content_find_rfc5988_link(hlcache_handle *h, lwc_string *rel)
|
||||
{
|
||||
@ -999,40 +984,7 @@ bool content__add_rfc5988_link(struct content *c,
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve computed type of content
|
||||
*
|
||||
* \param c Content to retrieve type of
|
||||
* \return Computed content type
|
||||
*/
|
||||
content_type content_get_type(hlcache_handle *h)
|
||||
{
|
||||
struct content *c = hlcache_handle_get_content(h);
|
||||
|
||||
if (c == NULL)
|
||||
return CONTENT_NONE;
|
||||
|
||||
return c->handler->type();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve mime-type of content
|
||||
*
|
||||
* \param c Content to retrieve mime-type of
|
||||
* \return Pointer to referenced mime-type, or NULL if not found.
|
||||
*/
|
||||
lwc_string *content_get_mime_type(hlcache_handle *h)
|
||||
{
|
||||
return content__get_mime_type(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
lwc_string *content__get_mime_type(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
return NULL;
|
||||
|
||||
return lwc_string_ref(c->mime_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve URL associated with content
|
||||
@ -1048,17 +1000,58 @@ nsurl *content_get_url(struct content *c)
|
||||
return llcache_handle_get_url(c->llcache);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve title associated with content
|
||||
*
|
||||
* \param c Content to retrieve title from
|
||||
* \return Pointer to title, or NULL if not found.
|
||||
*/
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
content_type content_get_type(hlcache_handle *h)
|
||||
{
|
||||
struct content *c = hlcache_handle_get_content(h);
|
||||
|
||||
if (c == NULL)
|
||||
return CONTENT_NONE;
|
||||
|
||||
return c->handler->type();
|
||||
}
|
||||
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
lwc_string *content_get_mime_type(hlcache_handle *h)
|
||||
{
|
||||
return content__get_mime_type(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
lwc_string *content__get_mime_type(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
return NULL;
|
||||
|
||||
return lwc_string_ref(c->mime_type);
|
||||
}
|
||||
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
bool content__set_title(struct content *c, const char *title)
|
||||
{
|
||||
char *new_title = strdup(title);
|
||||
if (new_title == NULL)
|
||||
return false;
|
||||
|
||||
if (c->title != NULL)
|
||||
free(c->title);
|
||||
|
||||
c->title = new_title;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
const char *content_get_title(hlcache_handle *h)
|
||||
{
|
||||
return content__get_title(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
const char *content__get_title(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
@ -1068,17 +1061,14 @@ const char *content__get_title(struct content *c)
|
||||
nsurl_access(llcache_handle_get_url(c->llcache));
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve status of content
|
||||
*
|
||||
* \param c Content to retrieve status of
|
||||
* \return Content status
|
||||
*/
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
content_status content_get_status(hlcache_handle *h)
|
||||
{
|
||||
return content__get_status(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
content_status content__get_status(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
@ -1087,17 +1077,14 @@ content_status content__get_status(struct content *c)
|
||||
return c->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve status message associated with content
|
||||
*
|
||||
* \param c Content to retrieve status message from
|
||||
* \return Pointer to status message, or NULL if not found.
|
||||
*/
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
const char *content_get_status_message(hlcache_handle *h)
|
||||
{
|
||||
return content__get_status_message(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
const char *content__get_status_message(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
@ -1106,17 +1093,14 @@ const char *content__get_status_message(struct content *c)
|
||||
return c->status_message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve width of content
|
||||
*
|
||||
* \param c Content to retrieve width of
|
||||
* \return Content width
|
||||
*/
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
int content_get_width(hlcache_handle *h)
|
||||
{
|
||||
return content__get_width(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
int content__get_width(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
@ -1125,17 +1109,14 @@ int content__get_width(struct content *c)
|
||||
return c->width;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve height of content
|
||||
*
|
||||
* \param c Content to retrieve height of
|
||||
* \return Content height
|
||||
*/
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
int content_get_height(hlcache_handle *h)
|
||||
{
|
||||
return content__get_height(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
int content__get_height(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
@ -1144,17 +1125,14 @@ int content__get_height(struct content *c)
|
||||
return c->height;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve available width of content
|
||||
*
|
||||
* \param h handle to the content.
|
||||
* \return Available width of content.
|
||||
*/
|
||||
|
||||
/* exported interface documented in content/content.h */
|
||||
int content_get_available_width(hlcache_handle *h)
|
||||
{
|
||||
return content__get_available_width(hlcache_handle_get_content(h));
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
int content__get_available_width(struct content *c)
|
||||
{
|
||||
if (c == NULL)
|
||||
@ -1164,18 +1142,13 @@ int content__get_available_width(struct content *c)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve source of content
|
||||
*
|
||||
* \param c Content to retrieve source of
|
||||
* \param size Pointer to location to receive byte size of source
|
||||
* \return Pointer to source data
|
||||
*/
|
||||
/* exported interface documented in content/content.h */
|
||||
const char *content_get_source_data(hlcache_handle *h, unsigned long *size)
|
||||
{
|
||||
return content__get_source_data(hlcache_handle_get_content(h), size);
|
||||
}
|
||||
|
||||
/* exported interface documented in content/content_protected.h */
|
||||
const char *content__get_source_data(struct content *c, unsigned long *size)
|
||||
{
|
||||
const uint8_t *data;
|
||||
|
@ -250,7 +250,6 @@ void content_remove_user(struct content *c,
|
||||
uint32_t content_count_users(struct content *c);
|
||||
bool content_matches_quirks(struct content *c, bool quirks);
|
||||
bool content_is_shareable(struct content *c);
|
||||
content_status content__get_status(struct content *c);
|
||||
|
||||
const struct llcache_handle *content_get_llcache_handle(struct content *c);
|
||||
nsurl *content_get_url(struct content *c);
|
||||
@ -315,19 +314,99 @@ nserror content_debug_dump(struct hlcache_handle *h, FILE *f, enum content_debug
|
||||
*/
|
||||
nserror content_debug(struct hlcache_handle *h, enum content_debug op);
|
||||
|
||||
struct content_rfc5988_link *content_find_rfc5988_link(struct hlcache_handle *c,
|
||||
/**
|
||||
* find link in content that matches the rel string.
|
||||
*
|
||||
* \param h handle to the content to retrieve tyoe of.
|
||||
* \param rel The string to match.
|
||||
* \return A matching rfc5988 link or NULL if none is found.
|
||||
*
|
||||
*/
|
||||
struct content_rfc5988_link *content_find_rfc5988_link(struct hlcache_handle *h,
|
||||
lwc_string *rel);
|
||||
|
||||
/* Member accessors */
|
||||
|
||||
/**
|
||||
* Retrieve computed type of content
|
||||
*
|
||||
* \param h handle to the content to retrieve tyoe of.
|
||||
* \return Computed content type
|
||||
*/
|
||||
content_type content_get_type(struct hlcache_handle *c);
|
||||
lwc_string *content_get_mime_type(struct hlcache_handle *c);
|
||||
const char *content_get_title(struct hlcache_handle *c);
|
||||
content_status content_get_status(struct hlcache_handle *c);
|
||||
const char *content_get_status_message(struct hlcache_handle *c);
|
||||
int content_get_width(struct hlcache_handle *c);
|
||||
int content_get_height(struct hlcache_handle *c);
|
||||
int content_get_available_width(struct hlcache_handle *c);
|
||||
const char *content_get_source_data(struct hlcache_handle *c,
|
||||
|
||||
/**
|
||||
* Retrieve mime-type of content
|
||||
*
|
||||
* \param h handle to the content to retrieve mime type from
|
||||
* \return Pointer to referenced mime type, or NULL if not found.
|
||||
*/
|
||||
lwc_string *content_get_mime_type(struct hlcache_handle *h);
|
||||
|
||||
/**
|
||||
* Retrieve title associated with content
|
||||
*
|
||||
* \param h handle to the content to retrieve title from
|
||||
* \return Pointer to title, or NULL if not found.
|
||||
*/
|
||||
const char *content_get_title(struct hlcache_handle *h);
|
||||
|
||||
/**
|
||||
* Retrieve status of content
|
||||
*
|
||||
* \param h handle to the content to retrieve status from
|
||||
* \return Content status
|
||||
*/
|
||||
content_status content_get_status(struct hlcache_handle *h);
|
||||
|
||||
/**
|
||||
* Retrieve status of content
|
||||
*
|
||||
* \param c Content to retrieve status from.
|
||||
* \return Content status
|
||||
*/
|
||||
content_status content__get_status(struct content *c);
|
||||
|
||||
/**
|
||||
* Retrieve status message associated with content
|
||||
*
|
||||
* \param h handle to the content to retrieve status message from
|
||||
* \return Pointer to status message, or NULL if not found.
|
||||
*/
|
||||
const char *content_get_status_message(struct hlcache_handle *h);
|
||||
|
||||
/**
|
||||
* Retrieve width of content
|
||||
*
|
||||
* \param h handle to the content to get width of.
|
||||
* \return Content width
|
||||
*/
|
||||
int content_get_width(struct hlcache_handle *h);
|
||||
|
||||
/**
|
||||
* Retrieve height of content
|
||||
*
|
||||
* \param h handle to the content to get height of.
|
||||
* \return Content height
|
||||
*/
|
||||
int content_get_height(struct hlcache_handle *h);
|
||||
|
||||
/**
|
||||
* Retrieve available width of content
|
||||
*
|
||||
* \param h handle to the content to get available width of.
|
||||
* \return Available width of content.
|
||||
*/
|
||||
int content_get_available_width(struct hlcache_handle *h);
|
||||
|
||||
/**
|
||||
* Retrieve source of content
|
||||
*
|
||||
* \param h Content handle to retrieve source of
|
||||
* \param size Pointer to location to receive byte size of source
|
||||
* \return Pointer to source data
|
||||
*/
|
||||
const char *content_get_source_data(struct hlcache_handle *h,
|
||||
unsigned long *size);
|
||||
|
||||
/**
|
||||
|
@ -185,14 +185,71 @@ void content__reformat(struct content *c, bool background,
|
||||
void content__request_redraw(struct content *c,
|
||||
int x, int y, int width, int height);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve mime-type of content
|
||||
*
|
||||
* \param c Content to retrieve mime-type of
|
||||
* \return Pointer to referenced mime-type, or NULL if not found.
|
||||
*/
|
||||
lwc_string *content__get_mime_type(struct content *c);
|
||||
|
||||
/**
|
||||
* Set title associated with content
|
||||
*
|
||||
* \param c Content to set title on.
|
||||
* \parm title The new title to set.
|
||||
* \return true on sucess else false.
|
||||
*/
|
||||
bool content__set_title(struct content *c, const char *title);
|
||||
|
||||
lwc_string *content__get_mime_type(struct content *c);
|
||||
/**
|
||||
* Retrieve title associated with content
|
||||
*
|
||||
* \param c Content to retrieve title from
|
||||
* \return Pointer to title, or NULL if not found.
|
||||
*/
|
||||
const char *content__get_title(struct content *c);
|
||||
|
||||
/**
|
||||
* Retrieve status message associated with content
|
||||
*
|
||||
* \param c Content to retrieve status message from
|
||||
* \return Pointer to status message, or NULL if not found.
|
||||
*/
|
||||
const char *content__get_status_message(struct content *c);
|
||||
|
||||
/**
|
||||
* Retrieve width of content
|
||||
*
|
||||
* \param c Content to retrieve width of
|
||||
* \return Content width
|
||||
*/
|
||||
int content__get_width(struct content *c);
|
||||
|
||||
/**
|
||||
* Retrieve height of content
|
||||
*
|
||||
* \param c Content to retrieve height of
|
||||
* \return Content height
|
||||
*/
|
||||
int content__get_height(struct content *c);
|
||||
|
||||
/**
|
||||
* Retrieve available width of content
|
||||
*
|
||||
* \param c content to get available width of.
|
||||
* \return Available width of content.
|
||||
*/
|
||||
int content__get_available_width(struct content *c);
|
||||
|
||||
/**
|
||||
* Retrieve source of content.
|
||||
*
|
||||
* \param c Content to retrieve source of.
|
||||
* \param size Pointer to location to receive byte size of source.
|
||||
* \return Pointer to source data.
|
||||
*/
|
||||
const char *content__get_source_data(struct content *c, unsigned long *size);
|
||||
|
||||
/**
|
||||
|
@ -113,8 +113,7 @@ static void hlcache_clean(void *ignored)
|
||||
if (entry->content == NULL)
|
||||
continue;
|
||||
|
||||
if (content__get_status(entry->content) ==
|
||||
CONTENT_STATUS_LOADING)
|
||||
if (content__get_status(entry->content) == CONTENT_STATUS_LOADING)
|
||||
continue;
|
||||
|
||||
if (content_count_users(entry->content) != 0)
|
||||
|
@ -2257,13 +2257,8 @@ struct nsgtk_scaffolding *nsgtk_new_scaffolding(struct gui_window *toplevel)
|
||||
return g;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the title in the window
|
||||
*
|
||||
* \param gw The gui window to set title on
|
||||
* \param title The title to set (may be NULL)
|
||||
*/
|
||||
void gui_window_set_title(struct gui_window *gw, const char *title)
|
||||
/* exported function documented in gtk/scaffolding.h */
|
||||
void nsgtk_window_set_title(struct gui_window *gw, const char *title)
|
||||
{
|
||||
struct nsgtk_scaffolding *gs = nsgtk_get_scaffold(gw);
|
||||
int title_len;
|
||||
@ -2632,7 +2627,7 @@ void nsgtk_scaffolding_set_top_level(struct gui_window *gw)
|
||||
nsgtk_scaffolding_set_icon(gw);
|
||||
|
||||
/* Ensure the window's title bar is updated */
|
||||
gui_window_set_title(gw, browser_window_get_title(bw));
|
||||
nsgtk_window_set_title(gw, browser_window_get_title(bw));
|
||||
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,14 @@ gboolean nsgtk_window_url_changed(GtkWidget *, GdkEventKey *, gpointer);
|
||||
nserror nsgtk_scaffolding_new_tab(struct gui_window *gw);
|
||||
|
||||
/* core acessors */
|
||||
void gui_window_set_title(struct gui_window *g, const char *title);
|
||||
/**
|
||||
* set the title in the window
|
||||
*
|
||||
* \param gw The gui window to set title on
|
||||
* \param title The title to set which may be NULL
|
||||
*/
|
||||
void nsgtk_window_set_title(struct gui_window *gw, const char *title);
|
||||
|
||||
nserror gui_window_set_url(struct gui_window *g, struct nsurl *url);
|
||||
void gui_window_start_throbber(struct gui_window *g);
|
||||
void gui_window_stop_throbber(struct gui_window *g);
|
||||
|
@ -28,9 +28,10 @@ void nsgtk_tab_add(struct gui_window *window, GtkWidget *tab_contents, bool back
|
||||
*
|
||||
* The tab title will be set to the parameter
|
||||
*
|
||||
* @note currently only called from gui_window_set_title()
|
||||
* @param g the gui window to set tab title for.
|
||||
* @param title The title text which may not be NULL.
|
||||
* \note currently only called from nsgtk_window_set_title()
|
||||
*
|
||||
* \param g the gui window to set tab title for.
|
||||
* \param title The title text which may not be NULL.
|
||||
*/
|
||||
void nsgtk_tab_set_title(struct gui_window *g, const char *title);
|
||||
void nsgtk_tab_options_changed(GtkNotebook *notebook);
|
||||
|
@ -1307,7 +1307,7 @@ static struct gui_window_table window_table = {
|
||||
.start_selection = gui_window_start_selection,
|
||||
|
||||
/* from scaffold */
|
||||
.set_title = gui_window_set_title,
|
||||
.set_title = nsgtk_window_set_title,
|
||||
.set_url = gui_window_set_url,
|
||||
.start_throbber = gui_window_start_throbber,
|
||||
.stop_throbber = gui_window_stop_throbber,
|
||||
|
Loading…
Reference in New Issue
Block a user