NetSurf
Data Structures | Macros | Functions | Variables
osk.c File Reference
#include <stdbool.h>
#include <limits.h>
#include <libnsfb.h>
#include <libnsfb_plot.h>
#include <libnsfb_event.h>
#include <libnsfb_cursor.h>
#include "utils/log.h"
#include "netsurf/browser_window.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
#include "framebuffer/image_data.h"
#include "widget.h"
Include dependency graph for osk.c:

Go to the source code of this file.

Data Structures

struct  kbd_button_s
 

Macros

#define KEYCOUNT   58
 

Functions

static int osk_close (fbtk_widget_t *widget, fbtk_callback_info *cbi)
 
static int osk_click (fbtk_widget_t *widget, fbtk_callback_info *cbi)
 
void fbtk_enable_oskb (fbtk_widget_t *fbtk)
 enable the on screen keyboard for input More...
 
void map_osk (void)
 show the osk. More...
 

Variables

static struct kbd_button_s kbdbase [KEYCOUNT]
 
static fbtk_widget_tosk
 

Macro Definition Documentation

◆ KEYCOUNT

#define KEYCOUNT   58

Definition at line 47 of file osk.c.

Function Documentation

◆ fbtk_enable_oskb()

void fbtk_enable_oskb ( fbtk_widget_t widget)

enable the on screen keyboard for input

Parameters
widgetWidget to be given input focus.

Definition at line 138 of file osk.c.

References FB_COLOUR_BLACK, FB_FRAME_COLOUR, fbtk, fbtk_create_button(), fbtk_create_text_button(), fbtk_create_window(), fbtk_get_height(), fbtk_get_root_widget(), fbtk_get_width(), fbtk_set_text(), kbd_button_s::h, kbdbase, KEYCOUNT, osk, osk_click(), osk_close(), osk_image, root, kbd_button_s::t, kbd_button_s::w, kbd_button_s::x, and kbd_button_s::y.

Referenced by main().

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

◆ map_osk()

void map_osk ( void  )

show the osk.

Definition at line 189 of file osk.c.

References fbtk_set_mapping(), fbtk_set_zorder(), and osk.

Referenced by fb_osk_click().

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

◆ osk_click()

static int osk_click ( fbtk_widget_t widget,
fbtk_callback_info cbi 
)
static

Definition at line 124 of file osk.c.

References fbtk_callback_info::context, fbtk_callback_info::event, fbtk_input(), and kbd_button_s::keycode.

Referenced by fbtk_enable_oskb().

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

◆ osk_close()

static int osk_close ( fbtk_widget_t widget,
fbtk_callback_info cbi 
)
static

Definition at line 113 of file osk.c.

References fbtk_callback_info::event, fbtk_set_mapping(), and osk.

Referenced by fbtk_enable_oskb().

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

Variable Documentation

◆ kbdbase

struct kbd_button_s kbdbase[KEYCOUNT]
static

Definition at line 49 of file osk.c.

Referenced by fbtk_enable_oskb().

◆ osk

fbtk_widget_t* osk
static

Definition at line 110 of file osk.c.

Referenced by fbtk_enable_oskb(), map_osk(), and osk_close().