dynwatch
diff tray.c @ 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tray.c Wed May 18 05:53:29 2011 +0300 1.3 @@ -0,0 +1,46 @@ 1.4 +/* 1.5 +This file is part of dynwatch, a win32 system tray applet which 1.6 +updates automatically the dyndns entry of quake.gr. 1.7 + 1.8 +Copyright (c) 2005 John Tsiombikas <nuclear@siggraph.org> 1.9 + 1.10 +This program is free software; you can redistribute it and/or modify 1.11 +it under the terms of the GNU General Public License as published by 1.12 +the Free Software Foundation; either version 2 of the License, or 1.13 +(at your option) any later version. 1.14 + 1.15 +This program is distributed in the hope that it will be useful, 1.16 +but WITHOUT ANY WARRANTY; without even the implied warranty of 1.17 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1.18 +GNU General Public License for more details. 1.19 + 1.20 +You should have received a copy of the GNU General Public License 1.21 +along with this program; if not, write to the Free Software 1.22 +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1.23 +*/ 1.24 + 1.25 +#include <windows.h> 1.26 +#include "gui.h" 1.27 +#include "watch.h" 1.28 + 1.29 +/* when this is true, the program checks periodically for 1.30 + * connection status and updates the dynamic dns entry 1.31 + */ 1.32 +int running; 1.33 + 1.34 +int WINAPI WinMain(HINSTANCE proc_handle, HINSTANCE prev, char *args, int show) { 1.35 + MSG msg; 1.36 + 1.37 + init(); 1.38 + create_gui(); 1.39 + 1.40 + SetTimer(win_main, 0, 20000, 0); 1.41 + 1.42 + while(GetMessage(&msg, 0, 0, 0)) { 1.43 + TranslateMessage(&msg); 1.44 + DispatchMessage(&msg); 1.45 + } 1.46 + 1.47 + return 0; 1.48 +} 1.49 +