#include "rox_debug.h"
#include "choices.h"
#include "options.h"
#include "error.h"
#include "infowin.h"
#include "rox_resources.h"
#include "menu.h"
Functions | |
void | rox_init (const char *program, int *argc, char ***argv) |
void | rox_init_with_domain (const char *program, const char *domain, int *argc, char ***argv) |
const gchar * | rox_get_program_name (void) |
const gchar * | rox_get_program_domain (void) |
GdkPixbuf * | rox_get_program_icon (void) |
const gchar * | rox_get_app_dir (void) |
int | rox_clib_version_number (void) |
const char * | rox_clib_version_string (void) |
int | rox_clib_gtk_version_number (void) |
const char * | rox_clib_gtk_version_string (void) |
void | rox_deprecated_warning (const char *func, const char *use) |
void | rox_add_window (GtkWidget *window) |
int | rox_get_n_windows (void) |
void | rox_main_loop (void) |
void | rox_main_quit (void) |
int | rox_is_appdir (const char *path) |
char * | rox_find_appdir (const char *name, gchar **dirs, const char *env_name) |
char * | rox_clib_find (void) |
This is the top level header file for ROX-CLib. It provides the usual facilities required by most ROX programs.
void rox_add_window | ( | GtkWidget * | window | ) |
Add this window to the ones which are being counted. When it is destroyed this will be noted and the window count decreased.
window | Window or other widget to count |
char* rox_clib_find | ( | void | ) |
Return the path to ROX-CLib's AppDir. This tries
NULL
if not found. int rox_clib_gtk_version_number | ( | void | ) |
Returns the version number of the GTK+ library encoded as an int
const char* rox_clib_gtk_version_string | ( | void | ) |
Returns the version number of the GTK+ library as a string
int rox_clib_version_number | ( | void | ) |
Returns the version number of the library encoded as an int
const char* rox_clib_version_string | ( | void | ) |
Returns the version number of the library as a string
void rox_deprecated_warning | ( | const char * | func, | |
const char * | use | |||
) |
Warn about use of a deprecated function and indicate it's replacement. This warning is enabled by ROX_CLIB_DEPRECATION_WARNING=1 and disabled by ROX_CLIB_DEPRECATION_WARNING=0 (the default state depends on the release). This function is for internal use.
[in] | func | name of function that is deprecated |
[in] | use | name or description of replacement |
char* rox_find_appdir | ( | const char * | name, | |
gchar ** | dirs, | |||
const char * | env_name | |||
) |
Return the path to an AppDir.
[in] | name | name of application to find |
[in] | dirs | NULL terminated array of directories to look in. If dirs is NULL then env_name is used instead |
[in] | env_name | if dirs is NULL then this is the name of an environment variable that will contain a colon-separated list of directories. If env_name is NULL "APPDIRPATH" is used. Default values for the variables "APPDIRPATH" and "LIBDIRPATH" are assumed if they are not set. |
NULL
if not found. const gchar* rox_get_app_dir | ( | void | ) |
Returns the application directory.
int rox_get_n_windows | ( | void | ) |
Return the number of windows ROX-CLib is tracking
const gchar* rox_get_program_domain | ( | void | ) |
Returns the program domain as passed to rox_init_with_domain()
NULL
if no domain was given. GdkPixbuf* rox_get_program_icon | ( | void | ) |
Returns the program icon used for the windows
const gchar* rox_get_program_name | ( | void | ) |
void rox_init | ( | const char * | program, | |
int * | argc, | |||
char *** | argv | |||
) |
Initialize the library. Equivalent to rox_init_with_domain(program, NULL, argc, argv).
[in] | program | name of program |
[in,out] | argc | pointer to argc passed to main() |
[in,out] | argv | pointer to argv passed to main() |
void rox_init_with_domain | ( | const char * | program, | |
const char * | domain, | |||
int * | argc, | |||
char *** | argv | |||
) |
Initialize the library. This calls:
Options.xml
in $APP_DIR)
If .DirIcon exists in $APP_DIR it is set as the default icon for all windows.
If the ROX-CLib AppDir can be located by rox_clib_find() then the translations for ROX-CLib are made available from ROX-CLib/Messages. The default location for the applications translations is set to $APP_DIR/Messages.
[in] | program | name of program |
[in] | domain | domain under the control of the programmer. Used in options and choices |
[in,out] | argc | pointer to argc passed to main() |
[in,out] | argv | pointer to argv passed to main() |
int rox_is_appdir | ( | const char * | path | ) |
Confirm that path exists and is a valid AppDir. This includes checking ownership and permissions.
[in] | path | path to object to check |
FALSE
if not a valid AppDir void rox_main_loop | ( | void | ) |
Call gtk_main() repeatedly until either rox_get_n_windows() returns less than one, or rox_main_quit() is called
void rox_main_quit | ( | void | ) |
Cause rox_main_loop() to exit. If rox_main_loop() has been called recursivly only the innermost is exited.