1 /* 2 * Copyright (c) 1995-2009, 2014-2015, 2020 Paul Mattes. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * * Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * * Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * * Neither the name of Paul Mattes nor his contributors may be used 14 * to endorse or promote products derived from this software without 15 * specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY PAUL MATTES "AS IS" AND ANY EXPRESS 18 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 * DISCLAIMED. IN NO EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT, 21 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30 /* 31 * xpopups.h 32 * x3270-specific global declarations for popups.c. 33 */ 34 35 /* window placement enumeration */ 36 enum placement { Center, Bottom, Left, Right, InsideRight }; 37 extern enum placement *CenterP; 38 extern enum placement *BottomP; 39 extern enum placement *LeftP; 40 extern enum placement *RightP; 41 extern enum placement *InsideRightP; 42 43 /* form input editing enumeration */ 44 enum form_type { FORM_NO_WHITE, FORM_NO_CC, FORM_AS_IS }; 45 46 Widget create_form_popup(const char *name, XtCallbackProc callback, 47 XtCallbackProc callback2, enum form_type form_type); 48 void error_init(void); 49 void error_popup_init(void); 50 bool error_popup_visible(void); 51 void info_popup_init(void); 52 void PA_confirm_xaction(Widget w, XEvent *event, String *params, 53 Cardinal *num_params); 54 void place_popup(Widget w, XtPointer client_data, XtPointer call_data); 55 void move_popup(Widget w, XtPointer client_data, XtPointer call_data); 56 void popdown_an_error(void); 57 void popup_popup(Widget shell, XtGrabKind grab); 58 void popups_move(void); 59 void printer_popup_init(void); 60 void toplevel_geometry(Position *x, Position *y, Dimension *width, 61 Dimension *height); 62 void add_error_popdown_callback(void (*callback)(void)); 63 void popups_register(void); 64 void popup_a_timed_info(int timeout_ms, const char *format, ...); 65