LibMB 1.12
mbutil.h
1#ifndef _MBUTIL_H_
2#define _MBUTIL_H_
3
4/* libmb
5 * Copyright (C) 2002 Matthew Allum
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23#include <stdio.h>
24#include <unistd.h>
25#include <stdlib.h>
26#include <string.h>
27#include <sys/types.h>
28#include <sys/stat.h>
29#include <dirent.h>
30#include <signal.h>
31#include <errno.h>
32#include <sys/wait.h>
33
34#include <X11/Xlib.h>
35#include <X11/Xutil.h>
36#include <X11/Xatom.h>
37
38#include <libmb/mbconfig.h>
39
47#ifdef __cplusplus
48extern "C" {
49#endif
50
57int mb_exec (const char *cmd);
58
66Window mb_single_instance_get_window(Display *dpy, const char *bin_name);
67
75Bool mb_single_instance_is_starting(Display *dpy, const char *bin_name);
76
83char*
85
92void mb_util_window_activate(Display *dpy, Window win);
93
100Pixmap mb_util_get_root_pixmap(Display *dpy);
101
109char *mb_util_get_theme_full_path(const char *theme_name);
110
112void
114 int x,
115 int y,
116 int width,
117 int height);
118
119
120int
121mb_want_warnings ();
122
123#ifdef __cplusplus
124}
125#endif
126
127
131#endif
Pixmap mb_util_get_root_pixmap(Display *dpy)
Get root pixmap if set.
char * mb_util_get_theme_full_path(const char *theme_name)
Get a full theme path from its name.
Bool mb_single_instance_is_starting(Display *dpy, const char *bin_name)
Test to see if an app is in 'startup' phase.
int mb_exec(const char *cmd)
Exec a command similar to how a shell would, mainly passing quotes.
void mb_util_animate_startup(Display *dpy, int x, int y, int width, int height)
XXX To document XXX.
void mb_util_window_activate(Display *dpy, Window win)
Raise/Activate an existing window.
char * mb_util_get_homedir(void)
Safely returns the current HOME directory or /tmp if not set.
Window mb_single_instance_get_window(Display *dpy, const char *bin_name)
Get window ID of app with specified binary name.