NetSurf
Functions
window.c File Reference
#include <stdbool.h>
#include <stdlib.h>
#include <libnsfb.h>
#include <libnsfb_plot.h>
#include "netsurf/browser_window.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
#include "widget.h"
Include dependency graph for window.c:

Go to the source code of this file.

Functions

static int fb_redraw_window (fbtk_widget_t *widget, fbtk_callback_info *cbi)
 Window redraw callback. More...
 
fbtk_widget_tfbtk_create_window (fbtk_widget_t *parent, int x, int y, int width, int height, colour bg)
 Create a window widget. More...
 

Function Documentation

◆ fb_redraw_window()

static int fb_redraw_window ( fbtk_widget_t widget,
fbtk_callback_info cbi 
)
static

Window redraw callback.

Called when a window requires redrawing.

Parameters
widgetThe widget to be redrawn.
cbiThe callback parameters.
Returns
The callback result.

Definition at line 43 of file window.c.

References fbtk_widget_s::bg, fbtk_get_bbox(), fbtk_get_nsfb(), and nsfb.

Referenced by fbtk_create_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fbtk_create_window()

fbtk_widget_t * fbtk_create_window ( fbtk_widget_t parent,
int  x,
int  y,
int  width,
int  height,
colour  bg 
)

Create a window widget.

Parameters
parentThe parent window or the root widget for a top level window.
xThe x location relative to the parent window.
ythe y location relative to the parent window.
widthThe width of the window. 0 indicates parents width should be used. Negative value indicates parents width less the value should be used. The width is limited to lie within the parent window.
heightThe height of the window limited in a similar way to the /a width.
bgThe background colour.
Returns
new window widget handle or NULL on error.

Definition at line 66 of file window.c.

References fbtk_widget_s::bg, fb_redraw_window(), FB_WIDGET_TYPE_WINDOW, FBTK_CBT_REDRAW, fbtk_set_handler(), fbtk_widget_new(), height, parent, and width.

Referenced by create_normal_browser_window(), create_toolbar(), fb_corewindow_init(), and fbtk_enable_oskb().

Here is the call graph for this function:
Here is the caller graph for this function: