![]() | ![]() | ![]() | PHAT Reference Manual | ![]() |
---|
struct PhatKeyboard; void phat_keyboard_set_adjustment (PhatKeyboard *keyboard, GtkAdjustment *adjustment); GtkAdjustment* phat_keyboard_get_adjustment (PhatKeyboard *keyboard);
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()
.
struct PhatKeyboard { GtkViewport parent; };
The PhatKeyboard-struct struct contains private data only, and should be accessed using the functions below.
void phat_keyboard_set_adjustment (PhatKeyboard *keyboard, GtkAdjustment *adjustment);
Sets the adjustment used by keyboard.
keyboard : | |
adjustment : | a GtkAdjustment |
GtkAdjustment* phat_keyboard_get_adjustment (PhatKeyboard *keyboard);
Retrives the current adjustment in use by keyboard.
keyboard : | |
Returns : | keyboard's current GtkAdjustment |
<<< PhatSliderButton | PhatHKeyboard >>> |