| 1 |
/*********************************************************************** |
| 2 |
Copyright (C) 1986-2000 by |
| 3 |
|
| 4 |
F6FBB - Jean-Paul ROUBELAT |
| 5 |
[email protected] |
| 6 |
|
| 7 |
This program is free software: you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License as published by |
| 9 |
the Free Software Foundation, either version 3 of the License, or |
| 10 |
(at your option) any later version. |
| 11 |
|
| 12 |
This program is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 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 |
Parts of code have been taken from many other softwares. |
| 20 |
Thanks for the help. |
| 21 |
***********************************************************************/ |
| 22 |
|
| 23 |
/* |
| 24 |
* Fichier des variables locales |
| 25 |
*/ |
| 26 |
|
| 27 |
#define ENGLISH |
| 28 |
|
| 29 |
#include <stdio.h> |
| 30 |
#include <Xm/Xm.h> |
| 31 |
#include <Xm/Separator.h> |
| 32 |
#include <Xm/PushB.h> |
| 33 |
#include <Xm/PushBG.h> |
| 34 |
#include <Xm/Form.h> |
| 35 |
#include <Xm/RowColumn.h> |
| 36 |
#include <Xm/CascadeB.h> |
| 37 |
#include <Xm/ToggleB.h> |
| 38 |
#include <Xm/Label.h> |
| 39 |
#include <Xm/List.h> |
| 40 |
#include <Xm/ScrollBar.h> |
| 41 |
#include <Xm/SelectioB.h> |
| 42 |
#include <Xm/Text.h> |
| 43 |
#include <Xm/TextF.h> |
| 44 |
#include <Xm/MessageB.h> |
| 45 |
#include <Xm/FileSB.h> |
| 46 |
#include <Xm/ComboBox.h> |
| 47 |
|
| 48 |
#define IDOK 1 |
| 49 |
#define IDCANCEL 0 |
| 50 |
#define IDYES 1 |
| 51 |
#define IDNO 2 |
| 52 |
|
| 53 |
#define MB_OK 0x0000 |
| 54 |
#define MB_OKCANCEL 0x0001 |
| 55 |
#define MB_YESNOCANCEL 0x0003 |
| 56 |
#define MB_YESNO 0x0004 |
| 57 |
|
| 58 |
#define MB_ICONHAND 0x0010 |
| 59 |
#define MB_ICONQUESTION 0x0020 |
| 60 |
#define MB_ICONEXCLAMATION 0x0030 |
| 61 |
#define MB_ICONASTERISK 0x0040 |
| 62 |
#define MB_ICONINFORMATION MB_ICONASTERISK |
| 63 |
|
| 64 |
#define ED_MESSAGE 1 |
| 65 |
#define ED_EDITMSG 2 |
| 66 |
|
| 67 |
#define SEPARATOR 0 |
| 68 |
#define BUTTON 1 |
| 69 |
#define TOGGLE 2 |
| 70 |
#define TOOLBUTTON 3 |
| 71 |
|
| 72 |
#ifndef PUBLIC |
| 73 |
#define PUBLIC extern |
| 74 |
#endif |
| 75 |
|
| 76 |
PUBLIC XtAppContext app_context; |
| 77 |
|
| 78 |
PUBLIC XmRendition r_rend[10]; |
| 79 |
PUBLIC int r_index; |
| 80 |
|
| 81 |
PUBLIC FILE *p_fptr; |
| 82 |
|
| 83 |
PUBLIC Pixel df_pixel; |
| 84 |
PUBLIC Pixel rf_pixel; |
| 85 |
PUBLIC Pixel vf_pixel; |
| 86 |
PUBLIC Pixel bf_pixel; |
| 87 |
PUBLIC Pixel no_pixel; |
| 88 |
PUBLIC Pixel rc_pixel; |
| 89 |
PUBLIC Pixel vc_pixel; |
| 90 |
PUBLIC Pixel bc_pixel; |
| 91 |
|
| 92 |
PUBLIC Widget toplevel; |
| 93 |
PUBLIC Widget form; |
| 94 |
PUBLIC Widget pb; |
| 95 |
PUBLIC Widget MenuBar; |
| 96 |
PUBLIC Widget MenuFile; |
| 97 |
PUBLIC Widget MenuUser; |
| 98 |
PUBLIC Widget MenuEdit; |
| 99 |
PUBLIC Widget MenuWindow; |
| 100 |
PUBLIC Widget MenuOptions; |
| 101 |
PUBLIC Widget MenuConfig; |
| 102 |
PUBLIC Widget MenuPactor; |
| 103 |
PUBLIC Widget MenuHelp; |
| 104 |
PUBLIC Widget ToolBar; |
| 105 |
PUBLIC Widget Jauge; |
| 106 |
|
| 107 |
PUBLIC Widget ListForm; |
| 108 |
PUBLIC Widget ConnectLabel; |
| 109 |
PUBLIC Widget StatForm; |
| 110 |
PUBLIC Widget StatusLabel; |
| 111 |
PUBLIC Widget ConnectList; |
| 112 |
PUBLIC Widget ConnectString; |
| 113 |
PUBLIC Widget StatList; |
| 114 |
|
| 115 |
PUBLIC Widget Footer; |
| 116 |
PUBLIC int foothelp; |
| 117 |
|
| 118 |
PUBLIC int editoron; |
| 119 |
|
| 120 |
#define NB_ICON 16 |
| 121 |
PUBLIC Widget BIcon[NB_ICON]; |
| 122 |
|
| 123 |
#define NB_INIT_B 11 |
| 124 |
PUBLIC Widget Tb[NB_INIT_B]; |
| 125 |
|
| 126 |
PUBLIC Widget ScanSys; |
| 127 |
PUBLIC Widget ScanMsg; |
| 128 |
|
| 129 |
/* Liste des widgets de status */ |
| 130 |
PUBLIC Widget TxtUsed; |
| 131 |
PUBLIC Widget TxtGMem; |
| 132 |
PUBLIC Widget TxtDisk1; |
| 133 |
PUBLIC Widget TxtDisk2; |
| 134 |
PUBLIC Widget TxtMsgs; |
| 135 |
PUBLIC Widget TxtResync; |
| 136 |
PUBLIC Widget TxtState; |
| 137 |
PUBLIC Widget TxtHold; |
| 138 |
PUBLIC Widget TxtPriv; |
| 139 |
|
| 140 |
PUBLIC Widget Used; |
| 141 |
PUBLIC Widget GMem; |
| 142 |
PUBLIC Widget Disk1; |
| 143 |
PUBLIC Widget Disk2; |
| 144 |
PUBLIC Widget Msgs; |
| 145 |
PUBLIC Widget Resync; |
| 146 |
PUBLIC Widget State; |
| 147 |
PUBLIC Widget Hold; |
| 148 |
PUBLIC Widget Priv; |
| 149 |
|
| 150 |
PUBLIC Widget Popup; |
| 151 |
|
| 152 |
PUBLIC Widget Opt[10]; |
| 153 |
|
| 154 |
#define NB_PITEM 5 |
| 155 |
PUBLIC Widget PItem[NB_PITEM]; |
| 156 |
|
| 157 |
PUBLIC int CurrentSelection; |
| 158 |
|
| 159 |
int can_talk (int); |
| 160 |
int editor_on (void); |
| 161 |
int GetChList(void); |
| 162 |
int MessageBox(int, char *, char *, int); |
| 163 |
int record_message (char *ptr, int len); |
| 164 |
int set_callsign (char *buf); |
| 165 |
int SetChList(int clean); |
| 166 |
int talk_to (int channel); |
| 167 |
|
| 168 |
void CreateEditor(char *, char *, char *, int, int); |
| 169 |
void cursor_wait(void); |
| 170 |
void disconnect_channel(int, int); |
| 171 |
void end_edit (int); |
| 172 |
void end_wait(void); |
| 173 |
void FbbRequestUserList (void); |
| 174 |
void FbbSync (void); |
| 175 |
void EditMsgCB(Widget, XtPointer, XtPointer); |
| 176 |
void EditUsrCB(Widget, XtPointer, XtPointer); |
| 177 |
void get_callsign (char *buf); |
| 178 |
void ListCnxCB(Widget, XtPointer, XtPointer); |
| 179 |
void PendingCB(Widget, XtPointer, XtPointer); |
| 180 |
void set_option (int, int); |
| 181 |
void TextFieldGetString(Widget w, char *str, int len, int upcase); |
| 182 |
void HideFbbWindow(int numero, Widget parent); |
| 183 |
void AboutDialog(Widget, XtPointer, XtPointer); |
| 184 |
void CopyDialog(Widget, XtPointer, XtPointer); |
| 185 |
void InfoDialog(Widget, XtPointer, XtPointer); |
| 186 |
void CallsignDialog(Widget, XtPointer, XtPointer); |
| 187 |
|
| 188 |
void EditMessage(Widget); |
| 189 |
void EditUser(Widget); |
| 190 |
void ListCnx(Widget); |
| 191 |
void OptionsCB(Widget w, XtPointer client_data, XtPointer call_data); |
| 192 |
void PendingForward(Widget); |
| 193 |
|
| 194 |
void LabelSetString(Widget, char *, char *); |
| 195 |
void ScanMsgCB (Widget w, XtPointer client_data, XtPointer call_data); |
| 196 |
void ShowFbbWindow(int, Widget); |
| 197 |
void sysop_end(void); |
| 198 |
void TalkToCB (Widget w, XtPointer client_data, XtPointer call_data); |
| 199 |
void ToggleFbbWindow(int numero, Widget parent); |
| 200 |
|
| 201 |
void DisplayInfoDialog(int); |
| 202 |
|
| 203 |
void CreateEditor(char *file, char *preload, char *title, |
| 204 |
int options, int autow); |
| 205 |
|
| 206 |
Widget add_item(int type, Widget menu_pane, char *nom, |
| 207 |
XtPointer callback, XtPointer data, |
| 208 |
char *help, XtPointer HelpCB); |