1 /*
2  * Copyright (c) 2015-2016, 2019 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 are met:
7  *     * Redistributions of source code must retain the above copyright
8  *       notice, this list of conditions and the following disclaimer.
9  *     * Redistributions in binary form must reproduce the above copyright
10  *       notice, this list of conditions and the following disclaimer in the
11  *       documentation and/or other materials provided with the distribution.
12  *     * Neither the names of Paul Mattes nor the names of his contributors
13  *       may be used to endorse or promote products derived from this software
14  *       without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY PAUL MATTES "AS IS" AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19  * EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 /*
29  *	async.c
30  *		Asynchronous functions for b3270.
31  */
32 
33 #include "globals.h"
34 
35 #include "b3270proto.h"
36 #include "ctlr.h"
37 #include "lazya.h"
38 #include "screen.h"
39 #include "telnet_gui.h"
40 #include "ui_stream.h"
41 
42 /* stubs1 */
43 
44 bool
screen_selected(int baddr _is_unused)45 screen_selected(int baddr _is_unused)
46 {
47     return false;
48 }
49 
50 void
ring_bell(void)51 ring_bell(void)
52 {
53     ui_vleaf(IndBell, NULL);
54 }
55 
56 static int cw = 7;
57 int *char_width = &cw;
58 
59 static int ch = 7;
60 int *char_height = &ch;
61 
62 void
blink_start(void)63 blink_start(void)
64 {
65 }
66 
67 unsigned
display_heightMM(void)68 display_heightMM(void)
69 {
70     return 100;
71 }
72 
73 unsigned
display_height(void)74 display_height(void)
75 {
76     return 1;
77 }
78 
79 unsigned
display_widthMM(void)80 display_widthMM(void)
81 {
82     return 100;
83 }
84 
85 unsigned
display_width(void)86 display_width(void)
87 {
88     return 1;
89 }
90 
91 void
mcursor_locked(void)92 mcursor_locked(void)
93 {
94 }
95 
96 void
mcursor_normal(void)97 mcursor_normal(void)
98 {
99 }
100 
101 void
mcursor_waiting(void)102 mcursor_waiting(void)
103 {
104 }
105 
106 bool
screen_obscured(void)107 screen_obscured(void)
108 {
109     return false;
110 }
111 
112 unsigned long
screen_window_number(void)113 screen_window_number(void)
114 {
115     return 0L;
116 }
117 
118 bool
screen_has_bg_color(void)119 screen_has_bg_color(void)
120 {
121     return true;
122 }
123 
124 void
screen_132(void)125 screen_132(void)
126 {
127 }
128 
129 void
screen_80(void)130 screen_80(void)
131 {
132 }
133 
134 bool
screen_new_display_charsets(const char * realname,const char * cpname)135 screen_new_display_charsets(const char *realname, const char *cpname)
136 {
137     return true;
138 }
139 
140 void
screen_system_fixup(void)141 screen_system_fixup(void)
142 {
143 }
144 
145 void
telnet_gui_connecting(const char * hostip,const char * portname)146 telnet_gui_connecting(const char *hostip, const char *portname)
147 {
148     ui_vleaf(IndConnectAttempt,
149 	    AttrHostIp, hostip,
150 	    AttrPort, portname,
151 	    NULL);
152 }
153