summaryrefslogtreecommitdiffstats
path: root/src/util.h
blob: f29e58aa2b7b102daba6d3c10674ac7b692fe5f4 (plain)
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
/* 
 *  Copyright (C) 2004 Girish Ramakrishnan All Rights Reserved.
 *	
 * This 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.
 * 
 * This software 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 this software; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 * USA.
 */

// $Id: util.h,v 1.3 2004/11/19 15:44:51 cs19713 Exp $

#ifndef _UTIL_H
#define _UTIL_H

#include <tqstring.h>
#include <X11/Xlib.h>
#include <sys/types.h>

extern bool isNormalWindow(Display *display, Window w);
extern bool isValidWindowId(Display *display, Window w);
extern pid_t pid(Display *display, Window w);
extern void sendMessage(Display *display, Window to, Window w, char *type, 
                       int format, long mask, void *data, int size);
extern bool analyzeWindow(Display *display, Window w, pid_t epid, 
                          const TQString &ename);
extern Window activeWindow(Display *display);
extern Window selectWindow(Display *display, const char **err = 0);
extern void subscribe(Display *display, Window w, long mask, bool set);
extern bool getCardinalProperty(Display *display, Window w, Atom prop, 
                                long *data);

typedef enum { SysTrayAbsent, SysTrayHidden, SysTrayPresent } SysTrayState;

extern SysTrayState sysTrayStatus(Display *display, Window *tray = 0);

#endif