version 2.8
VirtualKeyboard

Detailed Description

Keyboard widget. Used to provide a virtual on-screen keyboard.

GWIN allows it to easily create buttons with different styles and check for different meta states such as: PRESSED, CLICKED, RELEASED etc.

Precondition
GFX_USE_GWIN must be set to TRUE in your gfxconf.h
GWIN_NEED_BUTTON must be set to TRUE in your gfxconf.h

Data Structures

struct  GKeyboardObject
 The keyboard widget structure. More...
 

Modules

 Renderings
 Built-in rendering functions for the keyboard widget.
 

Functions

GHandle gwinGKeyboardCreate (GDisplay *g, GKeyboardObject *gb, const GWidgetInit *pInit)
 Create a keyboard widget. More...
 
GSourceHandle gwinKeyboardGetEventSource (GHandle gh)
 Get the keyboard event source for a GWIN virtual keyboard. More...
 
void gwinKeyboardSetLayout (GHandle gh, const struct GVKeyTable *layout)
 Set the layout for the virtual keyboard. More...
 
#define GKEYBOARD_FLG_REVERTSET   0x01
 The internal keyboard flags and other defines. More...
 

Macros

#define GEVENT_GWIN_KEYBOARD   (GEVENT_GWIN_CTRL_FIRST+6)
 The Event Type for a Button Event. More...
 

Typedefs

typedef GEventGWin GEventGWinKeyboard
 A Keyboard Event. More...
 
typedef struct GKeyboardObject GKeyboardObject
 The keyboard widget structure. More...
 

Function Documentation

GHandle gwinGKeyboardCreate ( GDisplay *  g,
GKeyboardObject gb,
const GWidgetInit pInit 
)

Create a keyboard widget.

Returns
NULL if there is no resultant drawing area, otherwise a window handle.
Parameters
[in]gThe GDisplay to display this window on
[in]gbThe GKeyboardObject structure to initialise. If this is NULL the structure is dynamically allocated.
[in]pInitThe initialisation parameters
Note
The drawing color and the background color get set to the current defaults. If you haven't called gwinSetDefaultColor() or gwinSetDefaultBgColor() then these are White and Black respectively.
The font gets set to the current default font. If you haven't called gwinSetDefaultFont() then there is no default font and text drawing operations will no nothing.
A keyboard remembers its normal drawing state. If there is a window manager then it is automatically redrawn if the window is moved or its visibility state is changed.
A keyboard supports mouse input.
Function Class:
Normal API, this function can be invoked by regular system threads.
GSourceHandle gwinKeyboardGetEventSource ( GHandle  gh)

Get the keyboard event source for a GWIN virtual keyboard.

Returns
The event source handle or NULL if this is not a virtual keyboard
Parameters
[in]ghThe GWIN virtual keyboard
Note
Normal GINPUT Keyboard events are returned by this event source.
void gwinKeyboardSetLayout ( GHandle  gh,
const struct GVKeyTable *  layout 
)

Set the layout for the virtual keyboard.

Parameters
[in]ghThe GWIN virtual keyboard
[in]layoutThe keyboard layout to use (described by gwin_keyboard_layout.h)
Note
Changing the layout resets the keyboard to key set 0 of the keyboard and cancels any pending shifts.

Macro Definition Documentation

#define GEVENT_GWIN_KEYBOARD   (GEVENT_GWIN_CTRL_FIRST+6)

The Event Type for a Button Event.

Definition at line 34 of file gwin_keyboard.h.

#define GKEYBOARD_FLG_REVERTSET   0x01

The internal keyboard flags and other defines.

Note
Used only for writing a custom draw routine.

Definition at line 47 of file gwin_keyboard.h.

Typedef Documentation

A Keyboard Event.

Note
There are currently no GEventGWinButton listening flags - use 0 as the flags to gwinAttachListener()

Definition at line 40 of file gwin_keyboard.h.

The keyboard widget structure.

Note
Do not use the members directly - treat it as a black-box.