PhatKeyboard

Name

PhatKeyboard -- a base class for PhatHKeyboard and PhatVKeyboard

Synopsis



struct      PhatKeyboard;
void        phat_keyboard_set_adjustment    (PhatKeyboard *keyboard,
                                             GtkAdjustment *adjustment);
GtkAdjustment* phat_keyboard_get_adjustment (PhatKeyboard *keyboard);


Description

The PhatKeyboard widget family provides a simple piano-like keyboard. Since it is derived from GtkViewport, it comes with the ability to scroll. You don't have to worry about the values of the GtkAdjustment it uses, just share said adjustment with a scrollbar and you'll be in business.

PhatKeyboard is an abstract base class, from which PhatHKeyboard and PhatVKeyboard are derived. To create a new keyboard, call either phat_hkeyboard_new() or phat_vkeyboard_new().

Details

struct PhatKeyboard

struct PhatKeyboard {

    GtkViewport parent;

};

The PhatKeyboard-struct struct contains private data only, and should be accessed using the functions below.


phat_keyboard_set_adjustment ()

void        phat_keyboard_set_adjustment    (PhatKeyboard *keyboard,
                                             GtkAdjustment *adjustment);

Sets the adjustment used by keyboard.

keyboard :

a PhatKeyboard

adjustment :

a GtkAdjustment


phat_keyboard_get_adjustment ()

GtkAdjustment* phat_keyboard_get_adjustment (PhatKeyboard *keyboard);

Retrives the current adjustment in use by keyboard.

keyboard :

a PhatKeyboard

Returns :

keyboard's current GtkAdjustment

See Also

PhatHKeyboard and PhatVKeyboard, to create new instances of PhatKeyboard.