wmclockmon: update change-log
[dockapps.git] / yawmppp / src / thinppp / thinppp.h
blob505a235e15af72c0f003bcf43b76778269b52020
2 /* DEFINES */
4 #include <gtk/gtk.h>
6 #define MAX_ISPS 40
8 #define START_ACTION (NULL)
9 #define STOP_ACTION (NULL)
10 #define SPEED_ACTION (NULL)
11 #define IFDOWN_ACTION (NULL)
13 #define STAMP_FILE "/var/run/ppp0.pid"
15 /* leds */
17 #define LED_PWR_X (226)
18 #define LED_PWR_Y (5)
19 #define LED_SND_X (255)
20 #define LED_SND_Y (5)
21 #define LED_RCV_X (242)
22 #define LED_RCV_Y (5)
24 #define LED_PPP_RX (1)
25 #define LED_PPP_TX (2)
26 #define LED_PPP_POWER (3)
28 #define LED_ON_X (1)
29 #define LED_ON_Y (1)
30 #define LED_OFF_X (34)
31 #define LED_OFF_Y (1)
32 #define LED_ERR_X (23)
33 #define LED_ERR_Y (1)
34 #define LED_WTE_X (12)
35 #define LED_WTE_Y (1)
36 #define LED_SZE_X (10)
37 #define LED_SZE_Y (10)
39 #define LED_GREEN (1)
40 #define LED_RED (2)
41 #define LED_YELLOW (3)
42 #define LED_DARK (4)
44 /* buttons */
46 #define BUT_V (1)
47 #define BUT_X (2)
48 #define BUT_REW (3)
49 #define BUT_FF (4)
50 #define BUT_CONF (5)
51 #define BUT_LOG (6)
52 #define BUT_KILL (7)
53 #define BUT_DRAG (8)
55 #define BUT_V_X (112)
56 #define BUT_V_Y (5)
57 #define BUT_X_X (124)
58 #define BUT_X_Y (5)
59 #define BUT_R_X (53)
60 #define BUT_R_Y (5)
61 #define BUT_F_X (65)
62 #define BUT_F_Y (5)
63 #define BUT_C_X (273)
64 #define BUT_C_Y (5)
65 #define BUT_L_X (285)
66 #define BUT_L_Y (5)
68 #define BUT_K_X (302)
69 #define BUT_K_Y (1)
71 #define BUT_K_SRC_X (0)
72 #define BUT_K_SRC_Y (30)
74 /* displays */
76 #define TIMER_SRC_Y (176)
77 #define TIMER_DES_Y (6)
78 #define TIMER_DES_X (141)
79 #define TIMER_SZE_X (6)
81 #define ISP_BASE_X (82)
82 #define ISP_BASE_Y (6)
84 #define ERR_DEST_X (195)
85 #define ERR_DEST_Y (6)
87 #define ERR_SRC_X (0)
88 #define ERR_SRC_Y (94)
90 #define UPPER_ABC_BASE_X (1)
91 #define UPPER_ABC_BASE_Y (124)
92 #define LOWER_ABC_BASE_X (1)
93 #define LOWER_ABC_BASE_Y (148)
94 #define DIGIT_BASE_X (11)
95 #define DIGIT_BASE_Y (164)
96 #define SPACE_BASE_X (11)
97 #define SPACE_BASE_Y (140)
99 #define HIST_SRC_X (58)
100 #define HIST_SRC_Y (92)
102 #define BUT_V_SRC_X (0)
103 #define BUT_V_SRC_Y (70)
104 #define BUT_X_SRC_X (12)
105 #define BUT_X_SRC_Y (70)
107 #define BUT_R_SRC_X (0)
108 #define BUT_R_SRC_Y (82)
109 #define BUT_F_SRC_X (12)
110 #define BUT_F_SRC_Y (82)
112 #define BUT_C_SRC_X (0)
113 #define BUT_C_SRC_Y (58)
114 #define BUT_L_SRC_X (12)
115 #define BUT_L_SRC_Y (58)
117 #define BUT_UP_INC (24)
119 #define ORANGE_LED_TIMEOUT (60)
121 void create_thinppp(void);
122 gboolean exposed(GtkWidget *w,GdkEventExpose *gee,gpointer data);
123 gboolean bpress(GtkWidget *w,GdkEventButton *geb,gpointer data);
124 gboolean brelease(GtkWidget *w,GdkEventButton *geb,gpointer data);
125 gboolean bmotion(GtkWidget *w,GdkEventMotion *geb,gpointer data);
126 gboolean wdestroy(GtkWidget *w,GdkEvent *ev,gpointer data);
128 void refresh(void);
130 void setled(int index,int type);
131 void paste_xpm(int dx,int dy,int sx,int sy,int w,int h);
132 void DrawISPName (void);
133 void draw_isp_char (int pos, char letter);
134 void DrawTime (int i, int j);
135 void DrawStats (int num, int size, int x_left, int y_bottom);
136 void PrintLittle (int i, int *k);
137 void DrawSpeedInd (char *speed_action);
138 void DrawLoadInd (int speed);
140 void init_ppp(void);
141 gint thinppp(gpointer data);
143 void sigusr_handler(int signum);
144 void make_delayed_update(void);
145 void usage (void);
146 void printversion (void);
148 void grab_me(void);
149 void ungrab_me(void);
150 gboolean inbox(int x,int y,int bx,int by,int bw,int bh);
152 void read_initial_position(void);
153 void save_initial_position(void);