LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
gfxsettings.cpp File Reference
#include "Common.h"
#include "gfxsettings.h"
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include <math.h>
#include <cstdlib>
Include dependency graph for gfxsettings.cpp:

Macros

#define SETTINGS_TRACE(...)   (void)0
 
#define DEFAULT_MAX_SIZE   10485760
 
#define KEY_STRING(cat, var)
 
#define KEY_STRING_EX(cat, name, var)
 
#define KEY_MEMORY_STRING(cat, var)
 
#define KEY_BOOLEAN(cat, name, var)
 
#define KEY_DOUBLE(cat, var)
 
#define KEY_UINTEGER(cat, var)
 
#define KEY_UINTEGER_EX(cat, name, var)
 
#define KEY_INTEGER(cat, var)
 
#define KEY_INTEGER_EX(cat, name, var)
 
#define KEYS_SIZE(cat, namew, nameh, var)
 

Functions

unsigned long _MemStringToBytes (const char *ptr)
 
unsigned long __MemStringToBytes (const char *ptr)
 

Macro Definition Documentation

#define DEFAULT_MAX_SIZE   10485760
#define KEY_BOOLEAN (   cat,
  name,
  var 
)
Value:
{\
gboolean _vb;\
GError* _error = 0;\
_vb=g_key_file_get_boolean(keyfile,cat,name,&_error);\
if( !_error ) { var=_vb; }\
else g_error_free(_error); \
}
#define KEY_DOUBLE (   cat,
  var 
)
Value:
{\
double _v;\
GError* _error = 0;\
_v=g_key_file_get_double(keyfile,cat,#var,&_error);\
if( !_error ) { var=_v; }\
else g_error_free(_error); \
}
#define KEY_INTEGER (   cat,
  var 
)
Value:
{\
qint32 _v; \
GError* _error = 0; \
_v=(qint32)g_key_file_get_integer(keyfile,cat,#var,&_error); \
if( !_error ) { var=_v; } \
else { g_error_free(_error); } \
}
#define KEY_INTEGER_EX (   cat,
  name,
  var 
)
Value:
{\
qint32 _v;\
GError* _error = 0;\
_v=(qint32)g_key_file_get_integer(keyfile,cat,name,&_error);\
if( !_error ) { var=_v; }\
else g_error_free(_error); \
}
#define KEY_MEMORY_STRING (   cat,
  var 
)
Value:
{\
gchar* _vs;\
GError* _error = 0;\
_vs=g_key_file_get_string(keyfile,cat,#var,&_error);\
if( !_error && _vs ) { var=::__MemStringToBytes((const char*)_vs); g_free(_vs); }\
else g_error_free(_error); \
}
#define KEY_STRING (   cat,
  var 
)
Value:
{\
gchar* _vs;\
GError* _error = 0;\
_vs=g_key_file_get_string(keyfile,cat,#var,&_error);\
if( !_error && _vs ) { var=(const char*)_vs; g_free(_vs); }\
else g_error_free(_error); \
}
#define KEY_STRING_EX (   cat,
  name,
  var 
)
Value:
{\
gchar* _vs;\
GError* _error = 0;\
_vs=g_key_file_get_string(keyfile,cat,name,&_error);\
if( !_error && _vs ) { var=(const char*)_vs; g_free(_vs); }\
else g_error_free(_error); \
}
#define KEY_UINTEGER (   cat,
  var 
)
Value:
{\
quint32 _v; \
GError* _error = 0; \
_v=(quint32)g_key_file_get_integer(keyfile,cat,#var,&_error); \
if( !_error ) { var=_v; } \
else { g_error_free(_error); } \
}
#define KEY_UINTEGER_EX (   cat,
  name,
  var 
)
Value:
{\
quint32 _v;\
GError* _error = 0;\
_v=(quint32)g_key_file_get_integer(keyfile,cat,name,&_error);\
if( !_error ) { var=_v; }\
else g_error_free(_error); \
}
#define KEYS_SIZE (   cat,
  namew,
  nameh,
  var 
)
Value:
{ \
qint32 _v; \
GError * _error = 0;\
_v = (qint32)g_key_file_get_integer(keyfile,cat,namew,&_error);\
if (!_error) { \
var.setWidth(_v); \
} \
else { \
g_error_free(_error); \
} \
_error = 0; \
_v = (qint32)g_key_file_get_integer(keyfile,cat,nameh,&_error);\
if (!_error) { \
var.setHeight(_v); \
} \
else { \
g_error_free(_error); \
} \
}
#define SETTINGS_TRACE (   ...)    (void)0

Function Documentation

unsigned long __MemStringToBytes ( const char *  ptr)
unsigned long _MemStringToBytes ( const char *  ptr)