LibMB  1.9
Functions
Various Utility functions

Misc useful functions used by various parts of matchbox. More...

Functions

int mb_exec (const char *cmd)
 Exec a command similar to how a shell would, mainly passing quotes. More...
 
Window mb_single_instance_get_window (Display *dpy, const char *bin_name)
 Get window ID of app with specified binary name. More...
 
Bool mb_single_instance_is_starting (Display *dpy, const char *bin_name)
 Test to see if an app is in 'startup' phase. More...
 
char * mb_util_get_homedir (void)
 Safely returns the current HOME directory or /tmp if not set. More...
 
void mb_util_window_activate (Display *dpy, Window win)
 Raise/Activate an existing window. More...
 
Pixmap mb_util_get_root_pixmap (Display *dpy)
 Get root pixmap if set. More...
 
char * mb_util_get_theme_full_path (const char *theme_name)
 Get a full theme path from its name. More...
 
void mb_util_animate_startup (Display *dpy, int x, int y, int width, int height)
 XXX To document XXX.
 

Detailed Description

Misc useful functions used by various parts of matchbox.

Function Documentation

◆ mb_exec()

int mb_exec ( const char *  cmd)

Exec a command similar to how a shell would, mainly passing quotes.

Parameters
cmdcommand string.
Returns
exec() result

◆ 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.

Parameters
dpyX11 Display
bin_namename of executable ( argv[0] )
Returns
X11 window ID or None if not found.

◆ 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.

Parameters
dpyX11 Display
bin_namename of executable ( argv[0] )
Returns
True / False

◆ mb_util_get_homedir()

char* mb_util_get_homedir ( void  )

Safely returns the current HOME directory or /tmp if not set.

You should not free the value returned.

Returns
home directory or /tmp if not set

◆ mb_util_get_root_pixmap()

Pixmap mb_util_get_root_pixmap ( Display *  dpy)

Get root pixmap if set.

Parameters
dpyX11 Display
Returns
Pixmap of root window or None if not 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.

The function allocates memory for the returned data, this should be freed by the caller.

Parameters
theme_nameTheme name.
Returns
full pull to theme directory or NULL

◆ mb_util_window_activate()

void mb_util_window_activate ( Display *  dpy,
Window  win 
)

Raise/Activate an existing window.

Parameters
dpyX11 Display
winWindow ID to 'activate'