mbdotdesktop.h
#ifndef _MBDOTDESKTOP_H_
#define _MBDOTDESKTOP_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <locale.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include "libmb/mbconfig.h"
#include "libmb/mbutil.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MBDotDesktop MBDotDesktop;
typedef struct _mbdotdesktopfolderentry
{
unsigned char *name;
unsigned char *icon;
unsigned char *match;
struct _mbdotdesktopfolderentry *parent_entry;
struct _mbdotdesktopfolderentry *next_entry;
} MBDotDesktopFolderEntry;
typedef struct _mbdotdesktopfolders
{
struct _mbdotdesktopfolderentry *entries;
int n_entries;
} MBDotDesktopFolders;
MBDotDesktop *
mb_dotdesktop_new_from_file(const char *filename);
unsigned char *
mb_dotdesktop_get(MBDotDesktop *dd, char *key);
char *
mb_dotdesktop_get_filename(MBDotDesktop *dd);
char *
mb_dotdesktop_get_exec (MBDotDesktop *dd);
void
mb_dotdesktop_free(MBDotDesktop *dd);
char*
mb_dot_desktop_icon_get_full_path (char* theme_name,
int size_wanted,
char* icon_name);
MBDotDesktopFolders *mb_dot_desktop_folders_new(const char *vfolder_path);
void mb_dot_desktop_folders_free(MBDotDesktopFolders* folders);
#define mb_dot_desktop_folders_get_cnt(f) (f)->n_entries
#define mb_dot_desktop_folders_enumerate(ddfolders, ddentry) \
for ( (ddentry) = (ddfolders)->entries; \
(ddentry) != NULL; \
(ddentry) = (ddentry)->next_entry ) \
#define mb_dot_desktop_folder_entry_get_name(f) (f)->name
#define mb_dot_desktop_folder_entry_get_icon(f) (f)->icon
#define mb_dot_desktop_folder_entry_get_match(f) (f)->match
#ifdef __cplusplus
}
#endif
#endif
mb_dotdesktop_get
unsigned char * mb_dotdesktop_get(MBDotDesktop *dd, char *key)
Gets the localised value for a specified key in MBDotDesktop instance.
mb_dot_desktop_folders_free
void mb_dot_desktop_folders_free(MBDotDesktopFolders *folders)
Frees a dotdesktopfolders instance.
mb_dot_desktop_icon_get_full_path
char * mb_dot_desktop_icon_get_full_path(char *theme_name, int size_wanted, char *icon_name)
Gets the full path for an specified icon.
mb_dotdesktop_free
void mb_dotdesktop_free(MBDotDesktop *dd)
Free&#39;s a MBDotDesktop instance.
mb_dotdesktop_new_from_file
MBDotDesktop * mb_dotdesktop_new_from_file(const char *filename)
Parses a .desktop file and creates a localised MBDotDesktop instance.
mb_dot_desktop_folders_new
MBDotDesktopFolders * mb_dot_desktop_folders_new(const char *vfolder_path)
Parses a &#39;vfolder style&#39; directory of .directory entrys used for building simple hireachies of ...
mb_dotdesktop_get_filename
char * mb_dotdesktop_get_filename(MBDotDesktop *dd)
Gets the filename from MBDotDesktop instance.
mb_dotdesktop_get_exec
char * mb_dotdesktop_get_exec(MBDotDesktop *dd)
Get the Exec key from a MBDotDesktop instance, with the %-escapes expanded.
MBDotDesktop
struct MBDotDesktop MBDotDesktop
Opaque type used for representing a parsed .desktop file.
Definition: mbdotdesktop.h:33