libkovan  1
The kovan standard library
Buttons

Namespaces

 Button
 

Classes

class  AbstractButton
 The base class for all buttons. More...
 
class  AbstractTextButton
 The base class for all buttons that have text. More...
 
class  ExtraButtons
 Helper methods to manipulate and access the state of the X, Y, and Z buttons. More...
 

Functions

VF EXPORT_SYM void set_a_button_text (const char *text)
 
VF EXPORT_SYM void set_b_button_text (const char *text)
 
VF EXPORT_SYM void set_c_button_text (const char *text)
 
VF EXPORT_SYM void set_x_button_text (const char *text)
 
VF EXPORT_SYM void set_y_button_text (const char *text)
 
VF EXPORT_SYM void set_z_button_text (const char *text)
 
VF EXPORT_SYM int a_button ()
 
VF EXPORT_SYM int b_button ()
 
VF EXPORT_SYM int c_button ()
 
VF EXPORT_SYM int x_button ()
 
VF EXPORT_SYM int y_button ()
 
VF EXPORT_SYM int z_button ()
 
VF EXPORT_SYM int side_button ()
 
VF EXPORT_SYM int black_button ()
 
VF EXPORT_SYM int a_button_clicked ()
 
VF EXPORT_SYM int b_button_clicked ()
 
VF EXPORT_SYM int c_button_clicked ()
 
VF EXPORT_SYM int x_button_clicked ()
 
VF EXPORT_SYM int y_button_clicked ()
 
VF EXPORT_SYM int z_button_clicked ()
 
VF EXPORT_SYM int side_button_clicked ()
 
VF EXPORT_SYM int any_button ()
 
VF EXPORT_SYM void extra_buttons_show ()
 
VF EXPORT_SYM void extra_buttons_hide ()
 
VF EXPORT_SYM int get_extra_buttons_visible ()
 
VF EXPORT_SYM void set_extra_buttons_visible (int visible)
 

Detailed Description

Function Documentation

VF EXPORT_SYM int a_button ( )

Gets the A button's state (pressed or not pressed.)

Returns
1 for pressed, 0 for not pressed
See also
a_button_clicked
VF EXPORT_SYM int a_button_clicked ( )

Gets the A button's state (pressed or not pressed.)

This function blocks until the button is no longer pressed.
Returns
1 for pressed, 0 for not pressed
See also
a_button
VF EXPORT_SYM int any_button ( )

Determines whether or not any of the buttons are pressed.

Returns
1 for pressed, 0 for not pressed
VF EXPORT_SYM int b_button ( )

Gets the B button's state (pressed or not pressed.)

Returns
1 for pressed, 0 for not pressed
See also
b_button_clicked
VF EXPORT_SYM int b_button_clicked ( )

Gets the B button's state (pressed or not pressed.)

This function blocks until the button is no longer pressed.
Returns
1 for pressed, 0 for not pressed
See also
b_button
VF EXPORT_SYM int black_button ( )

Gets the side button's state (pressed or not pressed.)

Deprecated:
Use side_button() instead.
Returns
1 for pressed, 0 for not pressed
See also
side_button
VF EXPORT_SYM int c_button ( )

Gets the C button's state (pressed or not pressed.)

Returns
1 for pressed, 0 for not pressed
See also
c_button_clicked
VF EXPORT_SYM int c_button_clicked ( )

Gets the C button's state (pressed or not pressed.)

This function blocks until the button is no longer pressed.
Returns
1 for pressed, 0 for not pressed
See also
c_button
VF EXPORT_SYM void extra_buttons_hide ( )

Hides the X, Y, and Z buttons. This is the default.

See also
set_extra_buttons_visible
VF EXPORT_SYM void extra_buttons_show ( )

Shows the X, Y, and Z buttons.

See also
set_extra_buttons_visible
VF EXPORT_SYM int get_extra_buttons_visible ( )

Determines whether or not the X, Y, and Z buttons are visible.

See also
set_extra_buttons_visible
VF EXPORT_SYM void set_a_button_text ( const char *  text)

Updates the A button's text.

Parameters
textThe text to display. Limit of 16 characters.
VF EXPORT_SYM void set_b_button_text ( const char *  text)

Updates the B button's text.

Parameters
textThe text to display. Limit of 16 characters.
VF EXPORT_SYM void set_c_button_text ( const char *  text)

Updates the C button's text.

Parameters
textThe text to display. Limit of 16 characters.
VF EXPORT_SYM void set_extra_buttons_visible ( int  visible)

Sets whether or not the X, Y, and Z buttons are visible.

See also
get_extra_buttons_visible
VF EXPORT_SYM void set_x_button_text ( const char *  text)

Updates the X button's text.

Parameters
textThe text to display. Limit of 16 characters.
VF EXPORT_SYM void set_y_button_text ( const char *  text)

Updates the Y button's text.

Parameters
textThe text to display. Limit of 16 characters.
VF EXPORT_SYM void set_z_button_text ( const char *  text)

Updates the Z button's text.

Parameters
textThe text to display. Limit of 16 characters.
VF EXPORT_SYM int side_button ( )

Gets the side button's state (pressed or not pressed.)

Returns
1 for pressed, 0 for not pressed
See also
side_button_clicked
VF EXPORT_SYM int side_button_clicked ( )

Gets the side button's state (pressed or not pressed.)

This function blocks until the button is no longer pressed.
Returns
1 for pressed, 0 for not pressed
See also
side_button
VF EXPORT_SYM int x_button ( )

Gets the X button's state (pressed or not pressed.)

Returns
1 for pressed, 0 for not pressed
Attention
This button is an extra button. Use set_extra_buttons_visible(int) to show this button.
See also
x_button_clicked
VF EXPORT_SYM int x_button_clicked ( )

Gets the X button's state (pressed or not pressed.)

This function blocks until the button is no longer pressed.
Returns
1 for pressed, 0 for not pressed
Attention
This button is an extra button. Use set_extra_buttons_visible(int) to show this button.
See also
x_button
VF EXPORT_SYM int y_button ( )

Gets the Y button's state (pressed or not pressed.)

Returns
1 for pressed, 0 for not pressed
Attention
This button is an extra button. Use set_extra_buttons_visible(int) to show this button.
See also
y_button_clicked
VF EXPORT_SYM int y_button_clicked ( )

Gets the Y button's state (pressed or not pressed.)

This function blocks until the button is no longer pressed.
Returns
1 for pressed, 0 for not pressed
Attention
This button is an extra button. Use set_extra_buttons_visible(int) to show this button.
See also
y_button
VF EXPORT_SYM int z_button ( )

Gets the Z button's state (pressed or not pressed.)

Returns
1 for pressed, 0 for not pressed
Attention
This button is an extra button. Use set_extra_buttons_visible(int) to show this button.
See also
z_button_clicked
VF EXPORT_SYM int z_button_clicked ( )

Gets the Z button's state (pressed or not pressed.)

This function blocks until the button is no longer pressed.
Returns
1 for pressed, 0 for not pressed
Attention
This button is an extra button. Use set_extra_buttons_visible(int) to show this button.
See also
z_button