![]() |
![]() |
![]() |
hildon 2.0.6 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Style Properties | Signals |
#define HILDON_WINDOW_LONG_PRESS_TIME HildonWindow; HildonWindowClass; enum HildonWindowClipboardOperation; GtkWidget * hildon_window_new (void
); void hildon_window_add_with_scrollbar (HildonWindow *self
,GtkWidget *child
); GtkMenu * hildon_window_get_menu (HildonWindow *self
); void hildon_window_set_main_menu (HildonWindow *self
,GtkMenu *menu
); void hildon_window_set_menu (HildonWindow *self
,GtkMenu *menu
); void hildon_window_add_toolbar (HildonWindow *self
,GtkToolbar *toolbar
); void hildon_window_remove_toolbar (HildonWindow *self
,GtkToolbar *toolbar
); gboolean hildon_window_get_is_topmost (HildonWindow *self
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----HildonWindow
"borders" GtkBorder* : Read "toolbar-borders" GtkBorder* : Read "borders" GtkBorder* : Read "toolbar-borders" GtkBorder* : Read
The HildonWindow is a GTK widget which represents a top-level window in the Hildon framework. It is derived from the GtkWindow and provides additional commodities specific to the Hildon framework.
Among these windows in the Hildon framework can have a single menu
attached, which is toggled with a hardware key or by tapping
a custom button in the window frame. This menu can be set
by providing a GtkMenu to the hildon_window_set_menu()
method.
Similarly a window in the Hildon framework can have several toolbars
attached. These can be added to the HildonWindow with
hildon_window_add_toolbar()
..
Example 1. Creating a HildonWindow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
HildonWindow *window; GtkToolbar *toolbar; GtkMenu *menu; GdkPixbuf *icon_pixbuf; window = HILDON_WINDOW (hildon_window_new()); toolbar = create_toolbar(); menu = create_menu(); icon_pixbuf = create_icon(); hildon_window_set_menu (window, menu); hildon_window_add_toolbar (window, toolbar); // Can be used to set the window fullscreen gtk_window_fullscreen (GTK_WINDOW (window)); // Used to trigger the blinking of the window's icon in the task navigator gtk_window_set_urgency_hint (GTK_WINDOW (window), TRUE); // Change the window's icon in the task navigator gtk_window_set_icon (GTK_WINDOW (window), icon_pixbuf); |
typedef struct { GtkWindowClass parent_class; /* opera hacks for clip board operation */ void (*clipboard_operation)(HildonWindow *hwindow, int operation); /* Padding for future extension */ void (*_hildon_reserved1)(void); void (*_hildon_reserved2)(void); void (*_hildon_reserved3)(void); } HildonWindowClass;
typedef enum { HILDON_WINDOW_CO_COPY, HILDON_WINDOW_CO_CUT, HILDON_WINDOW_CO_PASTE } HildonWindowClipboardOperation;
GtkWidget * hildon_window_new (void
);
Creates a new HildonWindow.
Returns : |
A HildonWindow .
|
void hildon_window_add_with_scrollbar (HildonWindow *self
,GtkWidget *child
);
Adds the child
to the HildonWindow and creates a scrollbar
for it. Similar as adding first a GtkScrolledWindow
and then the
child
to it.
|
A HildonWindow
|
|
A GtkWidget
|
GtkMenu * hildon_window_get_menu (HildonWindow *self
);
Gets the GtMenu assigned to the HildonAppview. Note that the window is still the owner of the menu.
|
HildonWindow |
Returns : |
The GtkMenu assigned to this application view. |
void hildon_window_set_main_menu (HildonWindow *self
,GtkMenu *menu
);
Sets the menu to be used for this window. This menu overrides
a program-wide menu that may have been set with
hildon_program_set_common_menu()
. Pass NULL
to remove the current
menu. HildonWindow takes ownership of the passed menu and you're
not supposed to free it yourself anymore.
|
A HildonWindow |
|
The GtkMenu to be used for this HildonWindow |
Since Hildon 2.2
void hildon_window_set_menu (HildonWindow *self
,GtkMenu *menu
);
hildon_window_set_menu
is deprecated and should not be used in newly-written code. Hildon 2.2: use hildon_window_set_main_menu()
Sets the menu to be used for this window. This menu overrides a program-wide menu that may have been set with hildon_program_set_common_menu. Pass NULL to remove the current menu. HildonWindow takes ownership of the passed menu and you're not supposed to free it yourself anymore.
Note: hildon_window_set_menu()
calls gtk_widget_show_all()
for the
GtkMenu. To pass control about visibility to the application
developer, hildon_window_set_main_menu()
was introduced, which
doesn't do this.
|
A HildonWindow |
|
The GtkMenu to be used for this HildonWindow |
void hildon_window_add_toolbar (HildonWindow *self
,GtkToolbar *toolbar
);
Adds a toolbar to the window. Note that the toolbar is not automatically shown. You need to call gtk_widget_show_all on it to make it visible. It's also possible to hide the toolbar (without removing it) by calling gtk_widget_hide.
|
A HildonWindow
|
|
A GtkToolbar to add to the HildonWindow |
void hildon_window_remove_toolbar (HildonWindow *self
,GtkToolbar *toolbar
);
Removes a toolbar from the window. Note that this decreases the refference count on the widget. If you want to keep the toolbar alive call g_object_ref before calling this function.
|
A HildonWindow
|
|
A GtkToolbar to remove from the HildonWindow |
gboolean hildon_window_get_is_topmost (HildonWindow *self
);
|
A HildonWindow |
Returns : |
Whether or not the HildonWindow is currenltly activated by the window manager. |
"is-topmost"
property"is-topmost" gboolean : Read
Whether the window is currently activated by the window manager.
Default value: FALSE
"is-topmost"
property"is-topmost" gboolean : Read
Whether the window is currently activated by the window manager.
Default value: FALSE
"toolbar-borders"
style property "toolbar-borders" GtkBorder* : Read
Size of graphical toolbar borders.
"clipboard-operation"
signalvoid user_function (HildonWindow *hildonwindow, gint arg1, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
"clipboard-operation"
signalvoid user_function (HildonWindow *hildonwindow, gint arg1, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |