Utility Functions and Macros

Utility Functions and Macros — Various utility functions and macros.

Synopsis

gchar *             mpl_icon_theme_lookup_icon_file     (GtkIconTheme *theme,
                                                         const gchar *icon_name,
                                                         gint icon_size);
gchar *             mpl_utils_get_thumbnail_path        (const gchar *uri);
#define             MEEGO_PANEL_CHECK_VERSION           (major,
                                                         minor,
                                                         micro)
#define             MEEGO_PANEL_MAJOR_VERSION
#define             MEEGO_PANEL_MINOR_VERSION
#define             MEEGO_PANEL_MICRO_VERSION
#define             MEEGO_PANEL_VERSION
#define             MEEGO_PANEL_VERSION_S
#define             MEEGO_PANEL_VERSION_HEX

Description

Miscellaneous utility functions and macros for Panels.

Details

mpl_icon_theme_lookup_icon_file ()

gchar *             mpl_icon_theme_lookup_icon_file     (GtkIconTheme *theme,
                                                         const gchar *icon_name,
                                                         gint icon_size);

Looks up icon of given name and size in the supplied GtkIconTheme, prioritizing Meego-specific icons: if an icon exists that matches 'netbook-' + icon_name, this is returned instead of an icon for the unprefixed name. If the icon_name is an absolute path, no lookup is performed, and a copy of icon_name is returned.

theme :

GtkIconTheme

icon_name :

name of the icon

icon_size :

size of the icon

Returns :

path to the icon, or NULL if suitable icon was not found in the theme. The returned string must be freed with g_free() when no longer needed.

mpl_utils_get_thumbnail_path ()

gchar *             mpl_utils_get_thumbnail_path        (const gchar *uri);

Retrieves the path to thumbnail for an image identified by uri. The thumbnails are searched for in ~/.bk-thumbnails, ~/thumbnails/large and ~/thumbnails/normal, in that order.

uri :

image uri

Returns :

path to the thumbnail, or NULL if thumbnail does not exist. The retured string must be freed with g_free() when no longer needed.

MEEGO_PANEL_CHECK_VERSION()

#define             MEEGO_PANEL_CHECK_VERSION(major,minor,micro)

Evaluates to TRUE if the version of the meego-panel library is greater than major, minor and micro

major :

major version, like 1 in 1.2.3

minor :

minor version, like 2 in 1.2.3

micro :

micro version, like 3 in 1.2.3

MEEGO_PANEL_MAJOR_VERSION

#define MEEGO_PANEL_MAJOR_VERSION   (0)

The major version of the meego-panel library (1, if MEEGO_PANEL_VERSION is 1.2.3)


MEEGO_PANEL_MINOR_VERSION

#define MEEGO_PANEL_MINOR_VERSION   (76)

The minor version of the meego-panel library (2, if MEEGO_PANEL_VERSION is 1.2.3)


MEEGO_PANEL_MICRO_VERSION

#define MEEGO_PANEL_MICRO_VERSION   (10)

The micro version of the meego-panel library (3, if MEEGO_PANEL_VERSION is 1.2.3)


MEEGO_PANEL_VERSION

#define MEEGO_PANEL_VERSION         0.76.10

The full version of the meego-panel library, like 1.2.3


MEEGO_PANEL_VERSION_S

#define MEEGO_PANEL_VERSION_S       "0.76.10"

The full version of the meego-panel library, in string form (suited for string concatenation)


MEEGO_PANEL_VERSION_HEX

#define             MEEGO_PANEL_VERSION_HEX

Numerically encoded version of the meego-panel library, like 0x010203