prefs_util.h.svn-base

来自「SumatraPDF是一款小型开源的pdf阅读工具。虽然玲珑小巧(只有800多K」· SVN-BASE 代码 · 共 39 行

SVN-BASE
39
字号
/* Written by Krzysztof Kowalczyk (http://blog.kowalczyk.info)
   The author disclaims copyright to this source code. */
#ifndef PREFS_H_
#define PREFS_H_

#ifdef __cplusplus
extern "C"
{
#endif

typedef enum pref_type pref_type;
enum pref_type {
    PT_INVALID = 0,
    PT_INT,
    PT_STRING
};

typedef struct prefs_data prefs_data;

/* describes all preferences in a program */
struct prefs_data {
    const TCHAR * name;
    pref_type     type;
    union {
        void *    data_void;
        int *     data_int;
        TCHAR **  data_str;
    } data;
};

TCHAR *prefs_to_tstr(prefs_data *prefs, size_t *tstr_len_cb_ptr);
int prefs_from_tstr(prefs_data *prefs, const TCHAR *str, size_t str_len_cb);

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?