summary refs log tree commit diff stats
path: root/plugins/xtray/xtray.h
blob: 21ec67a283f6d606035e2c8230ade48cd9244a4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* X-Tray
 * Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
 *
 * X-Tray is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * X-Tray is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with X-Tray; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef _XTRAY_H
#define _XTRAY_H

/******************** Globals *************************/
extern HWND				g_hXchatWnd;
extern HWND				g_hHotkeyWnd;
extern HWND				g_hPrefDlg;
extern HMENU			g_hTrayMenu;
extern HICON			g_hIcons[11];
extern HANDLE			g_hInstance;
extern unsigned int		g_dwPrefs;
extern TCHAR			g_szAway[512];
extern int				g_iTime;
extern WNDPROC			g_hOldProc;
extern struct _xchat_plugin *ph;
/******************************************************/

/******************** Messages ************************/
#define WM_TRAYMSG WM_APP
/******************************************************/

/********************* Events *************************/
#define CHAN_HILIGHT			1
#define CHAN_INVITE				2
#define CHAN_TOPIC_CHANGE		3
#define CHAN_BANNED				4
#define CHAN_KICKED				5

#define CTCP_GENERIC			6
#define PMSG_RECEIVE			7

#define SERV_KILLED				8
#define SERV_NOTICE				9
#define SERV_DISCONNECT			10

#define PREF_AOM				11 // away on minimize
#define PREF_TOT				12 // Tray on Taskbar
#define PREF_AMAE				13 // alert me about events
#define PREF_OSBWM				14 // Only Show Balloon When Minimized
#define PREF_UWIOB				15 // Use Window Instead of Balloon
#define PREF_KAOI				16 // Keep alerts open indefinately
#define PREF_MIOC				17 // Minimize instead of close
#define PREF_BLINK				18 // blink icon
#define PREF_CICO				19 // change icon - not implemented
#define PREF_DNSIT				20 // Do not show in taskbar
/******************************************************/
#endif

#ifdef _WIN64
/* use replacement with the same value, and use SetWindowLongPtr instead
   of SetWindowLong. more info:

   http://msdn.microsoft.com/en-us/library/ms633591.aspx
   http://msdn.microsoft.com/en-us/library/ms644898.aspx */
#define GWL_HWNDPARENT GWLP_HWNDPARENT
#endif
">, int); int buf_get_line (char *, char **, int *, int len); char *nocasestrstr (const char *text, const char *tofind); char *country (char *); void country_search (char *pattern, void *ud, void (*print)(void *, char *, ...)); char *get_sys_str (int with_cpu); void util_exec (const char *cmd); #define STRIP_COLOR 1 #define STRIP_ATTRIB 2 #define STRIP_HIDDEN 4 #define STRIP_ESCMARKUP 8 #define STRIP_ALL 7 gchar *strip_color (const char *text, int len, int flags); int strip_color2 (const char *src, int len, char *dst, int flags); int strip_hidden_attribute (char *src, char *dst); char *errorstring (int err); int waitline (int sok, char *buf, int bufsize, int); #ifdef WIN32 int waitline2 (GIOChannel *source, char *buf, int bufsize); int get_cpu_arch (void); #else #define waitline2(source,buf,size) waitline(serv->childread,buf,size,0) #endif unsigned long make_ping_time (void); void move_file (char *src_dir, char *dst_dir, char *fname, int dccpermissions); int token_foreach (char *str, char sep, int (*callback) (char *str, void *ud), void *ud); guint32 str_hash (const char *key); guint32 str_ihash (const unsigned char *key); void safe_strcpy (char *dest, const char *src, int bytes_left); void canonalize_key (char *key); int portable_mode (void); char *encode_sasl_pass_plain (char *user, char *pass); char *challengeauth_response (const char *username, const char *password, const char *challenge); size_t strftime_validated (char *dest, size_t destsize, const char *format, const struct tm *time); gsize strftime_utf8 (char *dest, gsize destsize, const char *format, time_t time); #endif