wmtime: fix type of arguments to `localtime(3)`
[dockapps.git] / yawmppp / src / gtksetup / msgbox.h
blob7e3d4f34514336c9c3069e5769c1135a97aafb50
1 /* GPL'd (C) 1999-2000 Felipe Bergo -- bergo@seul.org */
3 /*
5 This module is built up of the following files:
7 msgbox.h
8 msgbox.cc _OR_ msgbox.c
9 question.xpm
10 bong.xpm
11 exclamation.xpm
12 info.xpm
16 /* return values */
18 #ifndef FB_MSGBOX_H
19 #define FB_MSGBOX_H
21 #include <gtk/gtk.h>
23 /* ENUMS */
25 typedef enum
27 MSGBOX_ICON_NONE,
28 MSGBOX_ICON_ERROR,
29 MSGBOX_ICON_INFO,
30 MSGBOX_ICON_EXCLAMATION,
31 MSGBOX_ICON_QUESTION
32 } MsgBoxIcon;
34 typedef enum
36 MSGBOX_OK,
37 MSGBOX_OKCANCEL,
38 MSGBOX_YESNO,
39 MSGBOX_YESNOCANCEL
40 } MsgBoxType;
42 typedef enum
44 MSGBOX_R_OK,
45 MSGBOX_R_YES,
46 MSGBOX_R_NO,
47 MSGBOX_R_CANCEL
48 } MsgBoxResult;
50 /* prototype */
53 obs 1: this call blocks until the user picks a choice.
54 obs 2: parent can be NULL.
55 obs 3: you must have a gtk_main loop running before calling it.
58 MsgBoxResult message_box(GtkWindow *parent,
59 char *txt,
60 char *title,
61 MsgBoxType mbt,
62 MsgBoxIcon mbi);
65 excerpt from my 900-page book
67 "The Ultimate Guide to Message Box Icons
68 Felipe Bergo - 0th edition
69 Prentice Room publishers,
70 ISBN 6666-6666-6666"
72 MSGBOX_ICON_NONE No icon.
74 MSGBOX_ICON_ERROR Should be used on errors, i.e.,
75 something wrong really happened.
76 Currently included icon is a white
77 cross in a red circle. "bong.xpm"
79 MSGBOX_ICON_QUESTION Should be used on any questions, like
80 confirmations. Currently included
81 icon is a white question mark in a
82 green circle. "question.xpm"
84 MSGBOX_ICON_EXCLAMATION Should be used on warnings, like when
85 your code tries to allocate a resource
86 and it is busy (and being busy is "normal").
87 Currently included icon is a black exclamation
88 mark in an yellow triangle.
90 MSGBOX_ICON_INFO Should be used on general informative
91 messages, like "Operation Finished",
92 "Scan finished: 999999 blocks,
93 999998 bad, 1 good.", and the like.
94 Currently included icon is a white "i"
95 in a blue square.
97 The return value is an enum of MsgBoxResult type.
100 #endif