summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
new file mode 100644
index 0000000..5d27cc1
--- /dev/null
+++ b/src/util.h
@@ -0,0 +1,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 <qstring.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 QString &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
+