<commit_before>#ifndef XWCLIB_H
#define	XWCLIB_H

#ifdef	__cplusplus
extern "C"
{
#endif

#include "defines.h"
#include "headers.h"

    typedef enum argNames_
    {
        HELP          = 0,
        FRAMERATE     = 1,
        BGCOLOR       = 2,
        AUTOCENTER    = 3,
        FOCUSTIME     = 4,
        TOPOFFSET     = 5,
        LOGLVL        = 6,
        SOURCEID      = 7,
        DAEMON        = 8,
        SINGLEINST    = 9,
        /****************************************/
        /*Write count of possible arguments here*/
        OPTIONS_COUNT = 10
        /****************************************/
    } argNames;

    typedef enum argTypes_
    {
        C_STR, INT, ULONG
    } argTypes;

    typedef struct argument_
    {
        int            m_SynCnt;
        const char **  m_SynStrs;
        argTypes       m_Type;
        argNames       m_Name;
        const char *   m_NameStr;
        Bool           m_IsSet;
        Bool           m_HasValue;
        void       *   m_Value;
    } argument;

    typedef struct arguments_
    {
        int         m_ArgCnt;
        argument ** m_Args;
    } arguments;

    /**
     * Actual structure to hold various program options. Maybe you want to use 
     * type definition `XWCOptions` instead.
     * @sa options
     */
    struct _XWCOptions
    {
        int               autoCenter;  /**< whether to enable autocentering of 
                                        * source window int the xwinclone window 
                                        * (in case source window is smaller than 
                                        * xwinclone's window).\n 1 - enabled, 
                                        * 0 -  disabled, other - enabled*/
        int               topOffset;   /**< Source window top offset (pixels)*/
        XColor            bgColor;     /**< Background color data*/
        const char      * bgColorStr;  /**< Background color string (#rrggbb)*/
        struct timespec   focusDelay;  /**< how long to wait, before you focuse 
                                        * on window you want to be cloned*/
        struct timespec   frameDelay;  /**< how often should xwinclone refresh 
                                        * its content (frames per second)*/
        const char      * exitKeyStr;  /**< string representing exit key 
                                        * (keysymdef.h)*/
        const char      * translationCtrlKeyStr;  /**< string representing
                                                   *  translation control key
                                        * (keysymdef.h)*/
        KeyCode           exitKeyCode; /**< result of exit key string parsing*/
        int               exitKeyMask; /**< Exit key modifier according to X.h*/
        KeyCode           translationCtrlKeyCode; /**< result of translation
                                                   *  control key string
                                                   *  parsing*/
        int               translationCtrlKeyMask; /**< Translation control key
                                                   *  modifier according to
                                                   *  X.h*/
        Window            srcWinId;    /**< Default window id to be used as 
                                        * source*/
        int               isDaemon;    /**< If program considered to be run in 
                                        * daemon mode*/
        int               isSingleton; /**< Allow only one instance of program<commit_msg>Version 0.1e -added background control fields to options struct -added background control argument type<commit_after>#ifndef XWCLIB_H
#define	XWCLIB_H

#ifdef	__cplusplus
extern "C"
{
#endif

#include "defines.h"
#include "headers.h"

    typedef enum argNames_
    {
        HELP          = 0,
        FRAMERATE     = 1,
        BGCOLOR       = 2,
        AUTOCENTER    = 3,
        FOCUSTIME     = 4,
        TOPOFFSET     = 5,
        LOGLVL        = 6,
        SOURCEID      = 7,
        DAEMON        = 8,
        SINGLEINST    = 9,
        BGIMAGE       = 10,
        /****************************************/
        /*Write count of possible arguments here*/
        OPTIONS_COUNT = 11
        /****************************************/
    } argNames;

    typedef enum argTypes_
    {
        C_STR, INT, ULONG
    } argTypes;

    typedef struct argument_
    {
        int            m_SynCnt;
        const char **  m_SynStrs;
        argTypes       m_Type;
        argNames       m_Name;
        const char *   m_NameStr;
        Bool           m_IsSet;
        Bool           m_HasValue;
        void       *   m_Value;
    } argument;

    typedef struct arguments_
    {
        int         m_ArgCnt;
        argument ** m_Args;
    } arguments;

    /**
     * Actual structure to hold various program options. Maybe you want to use 
     * type definition `XWCOptions` instead.
     * @sa options
     */
    struct _XWCOptions
    {
        int               autoCenter;  /**< whether to enable autocentering of 
                                        * source window int the xwinclone window 
                                        * (in case source window is smaller than 
                                        * xwinclone's window).\n 1 - enabled, 
                                        * 0 -  disabled, other - enabled*/
        int               topOffset;   /**< Source window top offset (pixels)*/
        XColor            bgColor;     /**< Background color data*/
        const char      * bgColorStr;  /**< Background color string (#rrggbb)*/
        const char      * bgImgFileStr;/**< Background image file path*/
        Bool              bgImgFileSet;/**< Shows if background image file path
                                        *  was specified*/
        Bool              bgImgStatus; /**< Shows if background image file has
                                        *  been loaded to x server's pixmap*/
        struct timespec   focusDelay;  /**< how long to wait, before you focuse 
                                        * on window you want to be cloned*/
        struct timespec   frameDelay;  /**< how often should xwinclone refresh 
                                        * its content (frames per second)*/
        const char      * exitKeyStr;  /**< string representing exit key 
                                        * (keysymdef.h)*/
        const char      * translationCtrlKeyStr;  /**< string representing
                                                   *  translation control key
                                        * (keysymdef.h)*/
        KeyCode           exitKeyCode; /**< result of exit key string parsing*/
        int               exitKeyMask; /**< Exit key modifier according to X.h*/
        KeyCode           translationCtrlKeyCode; /**< result of translation
                                                   *  control key string
                                                   *  parsing*/
        int               translationCtrlKeyMask; /**< Translation control key
                                                   *  modifier according to
                                                   *  X.h*/
        Window            srcWinId;    /**< Default window id to be used as 
                                        * source*/
        int               isDaemon;    /**< If program considered to be run in 
                                        * daemon mode*/
        int               isSingleton; /**< Allow only one instance of program
{'fraction_non_alphanumeric': 0.08778173190984578, 'fraction_numerical': 0.004217740872545143, 'mean_word_length': 1.065323897659227, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 64, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6969555', 'n_tokens_mistral': 1798, 'n_tokens_neox': 1670, 'n_words': 563}