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

Go to the source code of this file.

Functions

void * fbtk_get_userpw (fbtk_widget_t *widget)
 Get the user context from a widget. More...
 
fbtk_widget_tfbtk_create_user (fbtk_widget_t *parent, int x, int y, int width, int height, void *pw)
 Create a user widget. More...
 

Function Documentation

◆ fbtk_create_user()

fbtk_widget_t * fbtk_create_user ( fbtk_widget_t window,
int  x,
int  y,
int  width,
int  height,
void *  pw 
)

Create a user widget.

Create a widget which is to be handled entirely by the calling application.

Parameters
windowThe window to add the user widget to.
xX coordinate of widget.
yY coordinate of widget.
widthWidth of the widget
heightHeight of the widget
pwThe private pointer which can be read using fbtk_get_userpw
Returns
new widget handle or NULL on error.

Definition at line 43 of file user.c.

References FB_WIDGET_TYPE_USER, fbtk_widget_new(), height, fbtk_widget_s::mapped, parent, fbtk_widget_s::pw, fbtk_widget_s::u, fbtk_widget_s::user, and width.

Referenced by create_browser_widget(), and fb_corewindow_init().

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

◆ fbtk_get_userpw()

void * fbtk_get_userpw ( fbtk_widget_t widget)

Get the user context from a widget.

Parameters
widgetThe widget to get the context from.
Returns
The context or NULL.

Definition at line 32 of file user.c.

References FB_WIDGET_TYPE_USER, fbtk_widget_s::pw, fbtk_widget_s::type, fbtk_widget_s::u, and fbtk_widget_s::user.

Referenced by fb_browser_window_click(), fb_browser_window_destroy(), fb_browser_window_move(), fb_browser_window_redraw(), fb_queue_redraw(), fb_window_invalidate_area(), gui_window_get_scroll(), gui_window_place_caret(), gui_window_remove_caret_cb(), gui_window_set_scroll(), widget_scroll_x(), and widget_scroll_y().

Here is the caller graph for this function: