![]() |
![]() |
![]() |
hildon-extras Reference Manual | ![]() |
---|---|---|---|---|
HeFullscreenButton; HeFullscreenButton* he_fullscreen_button_new (GtkWindow *parent_window); void he_fullscreen_button_disable (HeFullscreenButton *self); void he_fullscreen_button_enable (HeFullscreenButton *self); GtkWidget* he_fullscreen_button_get_overlay (HeFullscreenButton *self); GtkWindow* he_fullscreen_button_get_window (HeFullscreenButton *self);
HeFullscreenButton is a semi-transparent button which is automatically displayed whenever it's parent window enters fullscreen state. It's always displayed in the lower right corner of the parent window.
The button is automatically hidden after 5 seconds of mouse click inactivity. If the user clicks the parent window the button is shown for another 5 seconds.
If the user clicks the button, the "clicked" signal is
emitted. If you did not provide a signal handler for the
"clicked" signal, then the
default handler will call gtk_window_unfullscreen()
on the parent window.
If you provide a signal handler, the default handler will not be called
at all.
So, if your application has just one window, it will be enough if you create an instance of HeFullscreenButton with this window as parent. Now if your window switches to fullscreen the HeFullscreenButton is automatically shown and can be used to leave fullscreen mode. In this case you don't have to provide a signal handler and you don't have to take care of the buttons destruction.
HeFullscreenButton* he_fullscreen_button_new (GtkWindow *parent_window);
Create new full screen button instance. This function attaches the full screen button to the given parent window. By default, the button automatically becomes visible if the parent window changes to fullscreen and vice versa. Change the "act-on-state-change" property to modify this behaviour.
If you destroy the parent window, this HeFullscreenButton instance get destroyed as well.
Pass it a HildonWindow (or one of its deriatives) to ensure the widget disables/ enables itself on focus-out/focus-in respectively.
parent_window : |
A GtkWindow instance. |
Returns : | New HeFullscreenButton instance. |
void he_fullscreen_button_disable (HeFullscreenButton *self);
Hides the full screen button and releases mouse and key event signal emission hooks.
Note: The button may be hidden automatically by itself
if you have not set the "act-on-state-change" property to
FALSE
.
self : |
A HeFullscreenButton instance. |
void he_fullscreen_button_enable (HeFullscreenButton *self);
This function makes the full screen button visible and hooks mouse and key event signal emissions. The button is hidden after some time and is reshown when ever one of the signal hooks are activated.
Note: The button may be shown automatically by itself
if you have not set the "act-on-state-change" property to
FALSE
.
self : |
A HeFullscreenButton instance. |
GtkWidget* he_fullscreen_button_get_overlay (HeFullscreenButton *self);
Returns the GtkWidget displaying the actual overlaid button.
self : |
An instance of HeFullscreenButton |
Returns : | The GtkWidget of the overlaid button. This widget belongs to HeFullscreenButton and must not be destroyed or modified. |
GtkWindow* he_fullscreen_button_get_window (HeFullscreenButton *self);
Returns the GtkWindow that this HeFullscreenButton is attached to.
self : |
An instance of HeFullscreenButton |
Returns : | The GtkWindow to which this button is attached to |
"act-on-state-change"
property"act-on-state-change" gboolean : Read / Write
Whether to automatically enable/disable the button when its parent window fullscreens/unfullscreens itself.
Default value: TRUE
"clicked"
signalvoid user_function (HeFullscreenButton *button, gpointer user_data) : Run Last
Emitted when the HeFullscreenButton was clicked by the user.
button : |
The HeFullscreenButton that was clicked |
user_data : |
user data set when the signal handler was connected. |