File: msgbox.h

package info (click to toggle)
tilem 2.0-5.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,136 kB
  • sloc: ansic: 27,147; makefile: 740; sh: 344; xml: 315
file content (67 lines) | stat: -rw-r--r-- 2,648 bytes parent folder | download | duplicates (5)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
 * Tilem II
 * Copyright (c) 2011 Benjamin Moody
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/* Message box macros */

#define messagebox00(prnt, mtyp, tprm, tsec) \
  do {									\
    GtkWidget* mbx;							\
    mbx = gtk_message_dialog_new(GTK_WINDOW(prnt), GTK_DIALOG_MODAL,	\
				 mtyp, GTK_BUTTONS_OK, tprm);		\
    gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(mbx),	\
					       tsec);			\
    gtk_dialog_set_default_response(GTK_DIALOG(mbx), GTK_RESPONSE_OK);	\
    gtk_dialog_run(GTK_DIALOG(mbx));					\
    gtk_widget_destroy(mbx);						\
  } while(0)

#define messagebox01(prnt, mtyp, tprm, tsec, aaaa) \
  do {									\
    GtkWidget* mbx;							\
    mbx = gtk_message_dialog_new(GTK_WINDOW(prnt), GTK_DIALOG_MODAL,	\
				 mtyp, GTK_BUTTONS_OK, tprm);		\
    gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(mbx),	\
					       tsec, (aaaa));		\
    gtk_dialog_set_default_response(GTK_DIALOG(mbx), GTK_RESPONSE_OK);	\
    gtk_dialog_run(GTK_DIALOG(mbx));					\
    gtk_widget_destroy(mbx);						\
  } while(0)

#define messagebox02(prnt, mtyp, tprm, tsec, aaaa, bbbb) \
  do {									\
    GtkWidget* mbx;							\
    mbx = gtk_message_dialog_new(GTK_WINDOW(prnt), GTK_DIALOG_MODAL,	\
				 mtyp, GTK_BUTTONS_OK, tprm);		\
    gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(mbx),	\
					       tsec, (aaaa), (bbbb));	\
    gtk_dialog_set_default_response(GTK_DIALOG(mbx), GTK_RESPONSE_OK);	\
    gtk_dialog_run(GTK_DIALOG(mbx));					\
    gtk_widget_destroy(mbx);						\
  } while(0)

#define messagebox11(prnt, mtyp, tprm, aaaa, tsec, bbbb) \
  do {									\
    GtkWidget* mbx;							\
    mbx = gtk_message_dialog_new(GTK_WINDOW(prnt), GTK_DIALOG_MODAL,	\
				 mtyp, GTK_BUTTONS_OK, tprm, (aaaa));	\
    gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(mbx),	\
					       tsec, (bbbb));		\
    gtk_dialog_set_default_response(GTK_DIALOG(mbx), GTK_RESPONSE_OK);	\
    gtk_dialog_run(GTK_DIALOG(mbx));					\
    gtk_widget_destroy(mbx);						\
  } while(0)