dynwatch

view gui.h @ 0:ce3c5e4c75bf

dynwatch DynDNS updater for windows
author John Tsiombikas <nuclear@siggraph.org>
date Wed, 18 May 2011 05:53:29 +0300
parents
children
line source
1 /*
2 This file is part of dynwatch, a win32 system tray applet which
3 updates automatically the dyndns entry of quake.gr.
5 Copyright (c) 2005 John Tsiombikas <nuclear@siggraph.org>
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 2 of the License, or
10 (at your option) any later version.
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.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
22 #ifndef _GUI_H_
23 #define _GUI_H_
25 #include <windows.h>
27 typedef long (CALLBACK *msg_handler_t)(HWND, unsigned int, unsigned int, long);
29 /* widgets */
30 extern HWND win_main, bn_exit, bn_tray, bn_config;
31 extern HWND win_cfg, lb_dnshost, lb_user, lb_pass, lb_hosts;
32 extern HWND en_dnshost, en_user, en_pass, en_hosts;
33 extern HWND bn_ok, bn_cancel;
35 /* state, 1 = minimized to system tray, 0 = window visible */
36 extern int trayfied;
38 void create_gui(void);
40 void tray(int trayfy);
41 HWND create_window(const char *title, int xsz, int ysz, const char *class_name);
42 HWND create_button(const char *title, int x, int y, int xsz, int ysz, HWND parent);
43 HWND create_label(const char *text, int x, int y, int xsz, int ysz, HWND parent);
44 HWND create_entry(const char *text, int x, int y, int xsz, int ysz, HWND parent);
46 void en_set_text(HWND entry, const char *text);
47 const char *en_get_text(HWND entry);
49 void reg_win_class(const char *class_name, msg_handler_t handler);
51 #endif /* _GUI_H_ */