mbutil.h
#ifndef _MBUTIL_H_
#define _MBUTIL_H_
/* libmb
* Copyright (C) 2002 Matthew Allum
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <signal.h>
#include <errno.h>
#include <sys/wait.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <libmb/mbconfig.h>
#ifdef __cplusplus
extern "C" {
#endif
int mb_exec (const char *cmd);
Window mb_single_instance_get_window(Display *dpy, const char *bin_name);
Bool mb_single_instance_is_starting(Display *dpy, const char *bin_name);
char*
mb_util_get_homedir(void);
void mb_util_window_activate(Display *dpy, Window win);
Pixmap mb_util_get_root_pixmap(Display *dpy);
char *mb_util_get_theme_full_path(const char *theme_name);
void
mb_util_animate_startup(Display *dpy,
int x,
int y,
int width,
int height);
int
mb_want_warnings ();
#ifdef __cplusplus
}
#endif
#endif
mb_util_get_root_pixmap
Pixmap mb_util_get_root_pixmap(Display *dpy)
Get root pixmap if set.
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_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_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_util_window_activate
void mb_util_window_activate(Display *dpy, Window win)
Raise/Activate an existing window.
mb_util_get_homedir
char * mb_util_get_homedir(void)
Safely returns the current HOME directory or /tmp if not set.
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.