dynwatch

annotate 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
rev   line source
nuclear@0 1 /*
nuclear@0 2 This file is part of dynwatch, a win32 system tray applet which
nuclear@0 3 updates automatically the dyndns entry of quake.gr.
nuclear@0 4
nuclear@0 5 Copyright (c) 2005 John Tsiombikas <nuclear@siggraph.org>
nuclear@0 6
nuclear@0 7 This program is free software; you can redistribute it and/or modify
nuclear@0 8 it under the terms of the GNU General Public License as published by
nuclear@0 9 the Free Software Foundation; either version 2 of the License, or
nuclear@0 10 (at your option) any later version.
nuclear@0 11
nuclear@0 12 This program is distributed in the hope that it will be useful,
nuclear@0 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
nuclear@0 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
nuclear@0 15 GNU General Public License for more details.
nuclear@0 16
nuclear@0 17 You should have received a copy of the GNU General Public License
nuclear@0 18 along with this program; if not, write to the Free Software
nuclear@0 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
nuclear@0 20 */
nuclear@0 21
nuclear@0 22 #include <windows.h>
nuclear@0 23 #include "gui.h"
nuclear@0 24 #include "watch.h"
nuclear@0 25
nuclear@0 26 /* when this is true, the program checks periodically for
nuclear@0 27 * connection status and updates the dynamic dns entry
nuclear@0 28 */
nuclear@0 29 int running;
nuclear@0 30
nuclear@0 31 int WINAPI WinMain(HINSTANCE proc_handle, HINSTANCE prev, char *args, int show) {
nuclear@0 32 MSG msg;
nuclear@0 33
nuclear@0 34 init();
nuclear@0 35 create_gui();
nuclear@0 36
nuclear@0 37 SetTimer(win_main, 0, 20000, 0);
nuclear@0 38
nuclear@0 39 while(GetMessage(&msg, 0, 0, 0)) {
nuclear@0 40 TranslateMessage(&msg);
nuclear@0 41 DispatchMessage(&msg);
nuclear@0 42 }
nuclear@0 43
nuclear@0 44 return 0;
nuclear@0 45 }
nuclear@0 46