ROX-CLib: rox_resources.c File Reference

- Main Page
- Data Structures
- Files
- Related Pages

- File List
- Globals

# rox_resources.c File Reference

Find internationalized resource files. More...

`#include "rox-clib.h"`
`#include <stdio.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include <unistd.h>`
`#include <glib.h>`
`#include <gtk/gtk.h>`
`#include "rox.h"`
`#include "rox_debug.h"`
`#include "choices.h"`
`#include "rox_resources.h"`

## Functions
gchar * | rox_resources_find (const gchar *app_name, const gchar *leaf, const gchar *lang)
gchar * | rox_resources_find_with_domain (const gchar *app_name, const gchar *leaf, const gchar *lang, const gchar *domain)

## Detailed Description

Find internationalized resource files.

Author:
  Stephen Watson

Version:
  Id
    rox_resources.c,v 1.8 2006/10/06 16:29:38 stephen Exp

## Function Documentation

gchar* rox_resources_find | ( | const gchar * | app_name,
|  | const gchar * | leaf,
|  | const gchar * | lang |
| ) |  |  |

Search choices directories, then APP_DIR for a directory called Resources which contains the file leaf, whether in a sub-directory lang or directly.

Parameters:

  `[in]` | app_name | application name, for seaching choices.
  `[in]` | leaf | name of file to seach for.
  `[in]` | lang | language code, may be ROX_RESOURCES_NO_LANG to not search for sub-directories, or ROX_RESOURCES_DEFAULT_LANG for the sub-directory appropriate for the selected language

Returns:
  the full path if found (pass to g_free when done), otherwise `NULL`

Deprecated:
  Use rox_resources_find_with_domain() instead.

gchar* rox_resources_find_with_domain | ( | const gchar * | app_name,
|  | const gchar * | leaf,
|  | const gchar * | lang,
|  | const gchar * | domain |
| ) |  |  |

Search XDG_CONFIG_DIRS, then APP_DIR for a directory called Resources which contains the file leaf, whether in a sub-directory lang or directly.

Parameters:

  `[in]` | app_name | application name, for seaching choices.
  `[in]` | leaf | name of file to seach for.
  `[in]` | lang | language code, may be ROX_RESOURCES_NO_LANG to not search for sub-directories, or ROX_RESOURCES_DEFAULT_LANG for the sub-directory appropriate for the selected language
  `[in]` | domain | name of domain, or `NULL` (see rox_choices_list_dirs())

Returns:
  the full path if found (pass to g_free when done), otherwise `NULL`