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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
#include <stdio.h>
#include <X11/Xlib.h>
#include <xview/xview.h>
#include <xview/notice.h>
#include "generic.h"
void tnotice_no_choice(p, x, y, s)
void *p;
int x, y;
char *s;
{
(void) notice_prompt(titem_xview_window(p), NULL,
NOTICE_MESSAGE_STRINGS, s, NULL,
NOTICE_FOCUS_XY, x, y,
NOTICE_BUTTON_NO, "Ok",
NULL);
}
void tnotice_no_choice_2line(p, x, y, s1, s2)
void *p;
int x, y;
char *s1, *s2;
{
(void) notice_prompt(titem_xview_window(p), NULL,
NOTICE_MESSAGE_STRINGS, s1, s2, NULL,
NOTICE_FOCUS_XY, x, y,
NOTICE_BUTTON_NO, "Ok",
NULL);
}
int tnotice_yes_no(p, x, y, s, yes, no)
void *p;
int x, y;
char *s;
char *yes, *no;
{
int result;
result = notice_prompt(titem_xview_window(p), NULL,
NOTICE_MESSAGE_STRINGS, s, NULL,
NOTICE_FOCUS_XY, x, y,
NOTICE_BUTTON_YES, yes,
NOTICE_BUTTON_NO, no,
NULL);
if(result==NOTICE_YES)
return(1);
else if(result==NOTICE_NO)
return(0);
else
return(-1);
}
int tnotice_2line_2answer(p, x, y, s1, s2, a1, a2)
void *p;
int x, y;
char *s1, *s2;
char *a1, *a2;
{
int result;
result = notice_prompt(titem_xview_window(p), NULL,
NOTICE_MESSAGE_STRINGS,
s1, s2,
NULL,
NOTICE_FOCUS_XY, x, y,
NOTICE_BUTTON, a1, 101,
NOTICE_BUTTON, a2, 102,
NULL);
if(result==101)
return(1);
else if(result==102)
return(2);
else
return(-1);
}
int tnotice_3line_3answer(p, x, y, s1, s2, s3, a1, a2, a3)
void *p;
int x, y;
char *s1, *s2, *s3;
char *a1, *a2, *a3;
{
int result;
result = notice_prompt(titem_xview_window(p), NULL,
NOTICE_MESSAGE_STRINGS,
s1, s2, s3,
NULL,
NOTICE_FOCUS_XY, x, y,
NOTICE_BUTTON, a1, 101,
NOTICE_BUTTON, a2, 102,
NOTICE_BUTTON, a3, 103,
NULL);
if(result==101)
return(1);
else if(result==102)
return(2);
else if(result==103)
return(3);
else
return(-1);
}
|