add a dissector table for class specific control input/output pdus
[obnox/wireshark/wip.git] / simple_dialog.h
index d5debc33c315e995ca3d1ab2816dfb868bd7140b..5dc657e1454afa71aa0a3e75d42ed7cea31c169d 100644 (file)
@@ -4,8 +4,8 @@
  *
  * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
@@ -43,9 +43,12 @@ typedef enum {
     ESD_TYPE_WARN,          /**< tells the user about a problem; the only button should be "OK" */
     ESD_TYPE_CONFIRMATION,  /**< asks the user for confirmation; there should be more than
                                     one button */
-    ESD_TYPE_ERROR          /**< tells the user about a serious problem; the only button should be "OK" */
+    ESD_TYPE_ERROR,         /**< tells the user about a serious problem; the only button should be "OK" */
+    ESD_TYPE_STOP           /**< tells the user a stop action is in progress, there should be no button */
 } ESD_TYPE_E;
 
+/** display no buttons at all */
+#define ESD_BTN_NONE   0x00
 /** display an "Ok" button */
 #define ESD_BTN_OK     0x01 
 /** display a "Cancel" button */
@@ -126,6 +129,26 @@ typedef void (* simple_dialog_cb_t) (gpointer dialog, gint btn, gpointer data);
  */
 extern void simple_dialog_set_cb(gpointer dialog, simple_dialog_cb_t callback_fct, gpointer data);
 
+/** Close the dialog, useful for "no button" dialogs.
+ *
+ * @param dialog the dialog to close from simple_dialog()
+ */
+extern void simple_dialog_close(gpointer dialog);
+
+/** Add a check button to the dialog (e.g. "Don't show this message again")
+ * 
+ * @param dialog the dialog from simple_dialog()
+ * @param text the text to display 
+ */
+extern void simple_dialog_check_set(gpointer dialog, gchar *text);
+
+/** Get the check buttons state.
+ * 
+ * @param dialog the dialog from simple_dialog()
+ * @return current button state (TRUE is checked)
+ */
+extern gboolean simple_dialog_check_get(gpointer dialog);
+
 /** Surround the primary dialog message text by 
  *  simple_dialog_primary_start() and simple_dialog_primary_end().
  *  To highlight the first sentence (will take effect on GTK2 only).