Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CGUIKeyboard Class Referenceabstract

#include <GUIKeyboard.h>

Inheritance diagram for CGUIKeyboard:
ITimerCallback CDarwinEmbedKeyboard CGUIDialogKeyboardGeneric CGUIDialogKeyboardTouch

Public Member Functions

 CGUIKeyboard ()
 
 ~CGUIKeyboard () override=default
 
virtual bool ShowAndGetInput (char_callback_t pCallback, const std::string &initialString, std::string &typedString, const std::string &heading, bool bHiddenInput=false)=0
 each native keyboard needs to implement this function with the following behaviour:
 
virtual void Cancel ()=0
 This call should cancel a currently shown keyboard dialog. The implementation should return false from the modal ShowAndGetInput once anyone calls this method.
 
virtual int GetWindowId () const
 
void OnTimeout () override
 
void startAutoCloseTimer (unsigned int autoCloseMs)
 
void resetAutoCloseTimer ()
 
virtual bool SetTextToKeyboard (const std::string &text, bool closeKeyboard=false)
 
- Public Member Functions inherited from ITimerCallback
virtual ~ITimerCallback ()=default
 

Constructor & Destructor Documentation

◆ CGUIKeyboard()

CGUIKeyboard::CGUIKeyboard ( )
inline

◆ ~CGUIKeyboard()

CGUIKeyboard::~CGUIKeyboard ( )
overridedefault

Member Function Documentation

◆ Cancel()

virtual void CGUIKeyboard::Cancel ( )
pure virtual

This call should cancel a currently shown keyboard dialog. The implementation should return false from the modal ShowAndGetInput once anyone calls this method.

Implemented in CDarwinEmbedKeyboard, CGUIDialogKeyboardGeneric, and CGUIDialogKeyboardTouch.

◆ GetWindowId()

virtual int CGUIKeyboard::GetWindowId ( ) const
inlinevirtual

◆ OnTimeout()

void CGUIKeyboard::OnTimeout ( )
inlineoverridevirtual

Implements ITimerCallback.

◆ resetAutoCloseTimer()

void CGUIKeyboard::resetAutoCloseTimer ( )
inline

◆ SetTextToKeyboard()

virtual bool CGUIKeyboard::SetTextToKeyboard ( const std::string & text,
bool closeKeyboard = false )
inlinevirtual

◆ ShowAndGetInput()

virtual bool CGUIKeyboard::ShowAndGetInput ( char_callback_t pCallback,
const std::string & initialString,
std::string & typedString,
const std::string & heading,
bool bHiddenInput = false )
pure virtual

each native keyboard needs to implement this function with the following behaviour:

Parameters
pCallbackimplementation should call this on each keypress with the current whole string
initialStringimplementation should show that initialstring
typedstringreturns the typed string after close if return is true
headingimplementation should show a heading (e.x. "search for a movie")
bHiddenInputif true the implementation should obfuscate the user input (e.x. by printing "*" for each char)
Returns
- true if typedstring is valid and user has confirmed input - false if typedstring is undefined and user canceled the input

Implemented in CDarwinEmbedKeyboard, CGUIDialogKeyboardGeneric, and CGUIDialogKeyboardTouch.

◆ startAutoCloseTimer()

void CGUIKeyboard::startAutoCloseTimer ( unsigned int autoCloseMs)
inline

The documentation for this class was generated from the following file: