X11 Work Bench Toolkit  1.0
conf_help.h File Reference

'configuration helper' main header file for the X11 Work Bench Toolkit API More...

#include "platform_helper.h"

Go to the source code of this file.

Data Structures

struct  __XSETTINGS_DATA_COLOR__
 Structure for storing configuration color information, XSettingsTypeColor. More...
 
struct  _CHXSetting_
 Structure for storing settings information internally. More...
 
struct  _CHXSettings_
 Array wrapper for CHXSetting cache. More...
 

Macros

#define GLOBAL_PATH   "/usr/local/etc"
 
#define GLOBAL_XPATH   "/usr/X11R6/etc"
 
#define LOCAL_PATH   "~/"
 
#define LOCAL_CONF_NAME   "settings" /* local conf name will be ~/.appname/settings.conf, or if that is not possible, ~/appname.conf */
 
#define CH_OPEN_TIMEOUT   5000 /* wait up to 5000 milliseconds before timing out */
 
#define CH_FLAGS_DEFAULT   0
 
#define CH_FLAGS_GLOBAL   0x1
 
#define CH_FLAGS_WRITE   0x2
 

Typedefs

typedef struct
__XSETTINGS_DATA_COLOR__ 
XSETTINGS_DATA_COLOR
 Structure for storing configuration color information, XSettingsTypeColor. More...
 
typedef struct _CHXSetting_ CHXSetting
 Structure for storing settings information internally. More...
 
typedef struct _CHXSettings_ CHXSettings
 Array wrapper for CHXSetting cache. More...
 

Enumerations

enum  XSettingsType { XSettingsTypeInteger = 0, XSettingsTypeString = 1, XSettingsTypeColor = 2 }
 Enumeration for 'XSettingsType' which describes the type of setting being cached. More...
 

Functions

void CHRegisterArgs (int argc, char **argv)
 registers arguments from the command line for later use More...
 
void CHOnExit (void)
 frees resources used by Configuration 'helper' functions More...
 
const char *const * CHGetArgV (void)
 retrieves the array of arguments stored by CHRegisterArgs() More...
 
int CHGetArgC (void)
 retrieves the argument count stored by CHRegisterArgs() More...
 
int CHGetResourceString (Display *pDisplay, const char *szIdentifier, char *szData, int cbData)
 Queries desktop resource strings (may become deprecated) More...
 
int CHGetResourceInt (Display *pDisplay, const char *szIdentifier)
 Queryies desktop resource integer values (from strings) (may become deprecated) More...
 
void * CHOpenConfFile (const char *szAppName, int iFlags)
 open configuration file for read/write, optionally creating it, based on application name More...
 
void CHCloseConfFile (void *hFile)
 close configuration file opened by CHOpenConfFile(), but does NOT free memory resources More...
 
void CHDestroyConfFile (void *hFile)
 destroy configuration file opened by CHOpenConfFile(), freeing memory resources (but not the files) More...
 
int CHGetConfFileString (void *hFile, const char *szSection, const char *szIdentifier, char *szData, int cbData)
 obtain a string from a configuration file More...
 
int CHWriteConfFileString (void *hFile, const char *szSection, const char *szIdentifier, const char *szData)
 write a string to a configuration file More...
 
int CHGetConfFileInt (void *hFile, const char *szSection, const char *szIdentifier)
 obtain an integer value from a configuration file More...
 
int CHWriteConfFileInt (void *hFile, const char *szSection, const char *szIdentifier, int iData)
 write an integer value to a configuration file More...
 
void CHSettingsRefresh (Display *pDisplay)
 refresh the internally cached X settings More...
 
const CHXSettingsCHGetXSettings (Display *pDisplay)
 returns a pointer to the cached X settings More...
 
const CHXSettingCHGetXSetting (Display *pDisplay, const char *szSettingName)
 returns a pointer to a specific X setting entry by name More...
 
int CHGetDoubleClickTime (Display *pDisplay)
 returns default double click time (from X settings) More...
 
int CHGetDoubleClickDistance (Display *pDisplay)
 returns default double click distance (from X settings) More...
 
int CHGetDragThreshold (Display *pDisplay)
 returns default drag threshold (from X settings) More...
 
int CHGetCursorBlink (Display *pDisplay)
 returns default cursor blink 'enable' flag (from X settings) More...
 
int CHGetCursorBlinkTime (Display *pDisplay)
 returns default cursor blink time (from X settings) More...
 
char * CHParseXMLTagContents (const char *pTagContents, int cbLength)
 Parses contents of an XML tag, returning as WBAlloc'd string list similar to environment strings. More...
 
const char * CHFindEndOfXMLTag (const char *pTagContents)
 Parses contents of an XML tag to find the end of it. More...
 
char * CHGetFileMimeType (const char *szFileName)
 Get the MIME type for a particular file name or extension. More...
 
char * CHGetMimeDefaultApp (const char *szMimeType)
 Get the default application for a particular MIME type. More...
 
char * CHGetDesktopFileInfo (const char *szDesktopFile, const char *szInfo)
 Get the default application for a particular MIME type. More...
 
void CHDumpConfig (void)
 dump config information using debug output functions More...
 

Detailed Description

'configuration helper' main header file for the X11 Work Bench Toolkit API

X11 Work Bench Toolkit Toolkit API

Definition in file conf_help.h.