Add missing declaration for make_bigz
[sxemacs] / src / extw-Xlib.c
1 /* Common code between client and shell widgets; not Xt-specific.
2    Copyright (C) 1993, 1994 Sun Microsystems, Inc.
3
4 This file is part of SXEmacs
5
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
18
19
20 /* Synched up with: Not in FSF. */
21
22 /* Written by Ben Wing, September 1993. */
23
24 #ifdef emacs
25
26 #include <config.h>
27
28 #ifndef EXTERNAL_WIDGET
29 ERROR ! This ought not be getting compiled if EXTERNAL_WIDGET
30         is undefined
31 #endif
32 #endif
33 #include <X11/Xlib.h>
34 #include "ui/X11/extw-Xlib.h"
35         int extw_which_side;
36
37 static int atoms_initialized;
38 Atom a_EXTW_QUERY_GEOMETRY, a_EXTW_GEOMETRY_MANAGER, a_EXTW_WIDGET_GEOMETRY,
39     a_EXTW_NOTIFY;
40
41 void extw_initialize_atoms(Display * display)
42 {
43         if (!atoms_initialized) {
44                 a_EXTW_QUERY_GEOMETRY =
45                     XInternAtom(display, "EXTW_QUERY_GEOMETRY", False);
46                 a_EXTW_GEOMETRY_MANAGER =
47                     XInternAtom(display, "EXTW_GEOMETRY_MANAGER", False);
48                 a_EXTW_WIDGET_GEOMETRY =
49                     XInternAtom(display, "EXTW_WIDGET_GEOMETRY", False);
50                 a_EXTW_NOTIFY = XInternAtom(display, "EXTW_NOTIFY", False);
51                 atoms_initialized = 1;
52         }
53
54 }
55
56 /* send a notification to the other-side widget. */
57
58 void
59 extw_send_notify_3(Display * display, Window win, en_extw_notify type,
60                    long data0, long data1, long data2)
61 {
62         XClientMessageEvent xev;
63
64         xev.type = ClientMessage;
65         xev.message_type = a_EXTW_NOTIFY;
66         xev.format = 32;
67         xev.display = display;
68         xev.window = win;
69         xev.data.l[0] = extw_which_side;
70         xev.data.l[1] = type;
71         xev.data.l[2] = data0;
72         xev.data.l[3] = data1;
73         xev.data.l[4] = data2;
74
75         /* UGGGHHHH!  All I want to do is ensure that the ClientMessage gets
76            received.  Unfortunately X doesn't provide any simple way to do
77            that but instead has this event_mask bogosity in XSendEvent. */
78
79         XSendEvent(display, win, False,
80                    extw_which_side == extw_shell_send ? 0 : StructureNotifyMask,
81                    (XEvent *) & xev);
82 }