* - Statistic Windows (several different statistic windows)
*
* See: @ref howto_window_page for details.
- *
+ *
*/
/** @page howto_window_page How to develop a window / dialog
* from it's parent window. Dialogs should be used to ask or note the user something, while windows should
* show data independantly from the main window.
* Dialogs are created by calling dlg_window_new() which in turn will call window_new().
- * After that, dialogs can be developed the same way as windows, all window related functions in gui_utils.h
+ * After that, dialogs can be developed the same way as windows, all window related functions in gui_utils.h
* can be used for both.
*
* @section window_create Create a window
* needed, if the initial size is not appropriate, e.g. when a scrolled_window_new() is used.
* Be sure that the given size is larger than the initial size, otherwise the window might
* clip the content (at least on GTK1)
- * - SIGNAL_CONNECT(my_win, "destroy", my_destroy_cb, NULL) callback, if some cleanup needs to be
+ * - SIGNAL_CONNECT(my_win, "destroy", my_destroy_cb, NULL) callback, if some cleanup needs to be
* done after the window is destroyed, e.g. free up memory, or set the window pointer
* of a singleton window (only one instance allowed, e.g. about dialog) back to zero
* - create and fill in the content and button widgets
* - gtk_widget_show_all() shows all the widgets in the window
- * - window_present() present the window on screen and
+ * - window_present() present the window on screen and
* (if available) set previously saved position and size
*
* @section window_events Events
*
* The following events are usually interesting:
*
- * - "delete_event": the window managers "X" (e.g. upper right edge) of the window
+ * - "delete_event": the window managers "X" (e.g. upper right edge) of the window
* was clicked, default handler will call gtk_widget_destroy()
* - "destroy": everything is already gone, only cleanup of left over ressources
* can/should be done now
*
* @section window_hints Hints
*
- * If you want to save size and position, be sure to call window_destroy() instead of only
+ * If you want to save size and position, be sure to call window_destroy() instead of only
* gtk_widget_destroy(), so you will probably have to SIGNAL_CONNECT to the "delete_event"!
*
* Don't use WIDGET_SET_SIZE() to set the size of a window,
* use gtk_window_set_default_size() for that purpose!
*
- * Be sure to call window_present() / window_destroy() appropriately, if you
+ * Be sure to call window_present() / window_destroy() appropriately, if you
* want to have size and position of the window handled by ui_util.
*
*/
-/** @file
+/** @file
* Utilities for Windows and other user interface functions. See: @ref howto_window_page for details.
* @ingroup dialog_group
* @ingroup windows_group
* @todo Move these window functions to a new file win_utils.h?
* @{ */
-/** Create a new window with the Wireshark icon.
- * If you want to create a dialog, use dlg_window_new() instead.
+/** Create a new window with the Wireshark icon.
+ * If you want to create a dialog, use dlg_window_new() instead.
*
- * @param type window type, typical GTK_WINDOW_TOPLEVEL
+ * @param type window type, typical GTK_WINDOW_TOPLEVEL
* @param title the title for the new window
* @return the newly created window
*/
/** Same as window_new(), but will keep its geometry values (size, position, ...).
* Be sure to use window_present() and window_destroy() appropriately!
- *
- * @param type window type, typical GTK_WINDOW_TOPLEVEL
+ *
+ * @param type window type, typical GTK_WINDOW_TOPLEVEL
* @param title the title for the new window
* @param geom_name the name to distinguish this window, will also be used for the recent file (don't use special chars)
* @return the newly created window
*/
extern GtkWidget *splash_window_new(void);
-/** Present the created window on the top of the screen. This will put the window on top and
+/** Present the created window on the top of the screen. This will put the window on top and
* (if available) set previously saved position and size.
*
* @param win the window from window_new()
typedef void (*window_cancel_button_fct) (GtkWidget *w, gpointer data);
/** Register the default cancel button "Cancel"/"Close"/"Ok" of this window.
- * This will set the callback function for this button, grab this button as the default one and
+ * This will set the callback function for this button, grab this button as the default one and
* set the "ESC" key handler to call the callback function if key is pressed.
*
* @param win the window from window_new()
extern void window_destroy(GtkWidget *win);
/** Default callback handler for cancel button "clicked" signal.
- * Use this for window_set_cancel_button(), if no user specific functionality required,
+ * Use this for window_set_cancel_button(), if no user specific functionality required,
* will simply call window_destroy()
*/
extern void window_cancel_button_cb(GtkWidget *w _U_, gpointer data);
/** Default callback handler if the window managers X of the window was clicked (delete_event).
- * Use this for SIGNAL_CONNECT(), if no user specific functionality required,
+ * Use this for SIGNAL_CONNECT(), if no user specific functionality required,
* will simply call window_destroy()
*/
extern gboolean window_delete_event_cb(GtkWidget *win, GdkEvent *event _U_, gpointer user_data _U_);
*/
extern void window_geom_recent_read_pair(const char *name, const char *key, const char *value);
-/** Raise a top-level window and de-iconify it.
+/** Raise a top-level window and de-iconify it.
* This routine is used if the user has done something to
* ask that a window of a certain type be popped up when there can be only
* one such window and such a window has already been popped up - we
*
* @param str GString that is to be copied to the clipboard.
*/
-extern void copy_to_clipboard(GString *str);
+extern void copy_to_clipboard(GString *str);
+
+#if (GTK_MAJOR_VERSION >= 2)
+/** Copy an array of bytes to the clipboard.
+ * Copies as mime-type application/octet_stream in GTK 2.
+ *
+ * @param data_p Pointer to data to be copied.
+ * @param len Number of bytes in the data to be copied.
+ */
+extern void copy_binary_to_clipboard(const guint8* data_p, int len);
+#endif
/** Create a new window title that includes user-defined preference string.
*
*/
extern gchar *create_user_window_title(const gchar *caption);
-
#endif /* __GTKGUIUI_UTIL_H__ */