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
48 extern "C" {
49 #endif
50 
57 int mb_exec (const char *cmd);
58 
66 Window mb_single_instance_get_window(Display *dpy, const char *bin_name);
67 
75 Bool mb_single_instance_is_starting(Display *dpy, const char *bin_name);
76 
83 char*
85 
92 void mb_util_window_activate(Display *dpy, Window win);
93 
100 Pixmap mb_util_get_root_pixmap(Display *dpy);
101 
109 char *mb_util_get_theme_full_path(const char *theme_name);
110 
112 void
113 mb_util_animate_startup(Display *dpy,
114  int x,
115  int y,
116  int width,
117  int height);
118 
119 
120 int
121 mb_want_warnings ();
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 
131 #endif
mb_util_window_activate
void mb_util_window_activate(Display *dpy, Window win)
Raise/Activate an existing window.
mb_util_get_theme_full_path
char * mb_util_get_theme_full_path(const char *theme_name)
Get a full theme path from its name.
mb_single_instance_get_window
Window mb_single_instance_get_window(Display *dpy, const char *bin_name)
Get window ID of app with specified binary name.
mb_util_get_root_pixmap
Pixmap mb_util_get_root_pixmap(Display *dpy)
Get root pixmap if set.
mb_exec
int mb_exec(const char *cmd)
Exec a command similar to how a shell would, mainly passing quotes.
mb_util_animate_startup
void mb_util_animate_startup(Display *dpy, int x, int y, int width, int height)
XXX To document XXX.
mb_single_instance_is_starting
Bool mb_single_instance_is_starting(Display *dpy, const char *bin_name)
Test to see if an app is in 'startup' phase.
mb_util_get_homedir
char * mb_util_get_homedir(void)
Safely returns the current HOME directory or /tmp if not set.