<commit_before>#ifndef MAKISE_E_SLIDER_H
#define MAKISE_E_SLIDER_H       1

#include "makise_config.h"

#if ( MAKISE_E_SLIDER > 0 )

#ifdef __cplusplus
extern "C" {
#endif

#include "makise_e.h"

typedef enum {
    MSlider_Type_Read,
    MSlider_Type_ReadWrite,
} MSlider_Type;

#define _MSlider_is_horizontal(x) (x->position.width >= x->position.height)

typedef struct _MSlider MSlider;

typedef struct _MSlider {
    MakiseGUI*          gui;
    MElement            el;

    int32_t*            value;                                                      //pointer to value
    int32_t             value_max;                                                  //minimal possible value
    int32_t             value_min;                                                  //max possible value

    MSlider_Type        type;                                                       //is slider readonly or you can control it

    void                ( *onchange )   ( MSlider* b, int32_t val );                 //When value changed by user
    void                ( *onfocus )    ( MSlider* b, MFocusEnum type );             //type == M_G_FOCUS_GET when focus recieved and M_G_FOCUS_LEAVE when dropped.

    MakiseStyle*        style;
    uint8_t             state;                                                       //focus state
} MSlider;

void m_create_slider( MSlider*          b,
                      MContainer*       c,
                      MPosition         pos,
                      int32_t*          value,
                      int32_t           value_min,
                      int32_t           value_max,
                      MSlider_Type      type,
                      void              ( *onchange )   ( MSlider* b, int32_t val ),
                      void              ( *onfocus )    ( MSlider* b, MFocusEnum type ),
                      MakiseStyle*      style );

#ifdef __cplusplus
}
#endif
<commit_msg>Оформление makise_e_slider.h.<commit_after>#ifndef MAKISE_E_SLIDER_H
#define MAKISE_E_SLIDER_H       1

#include "makise_config.h"

#if ( MAKISE_E_SLIDER > 0 )

#ifdef __cplusplus
extern "C" {
#endif

#include "makise_e.h"

typedef enum {
    MSlider_Type_Read,
    MSlider_Type_ReadWrite,
} MSlider_Type;

#define _MSlider_is_horizontal(x) (x->position.width >= x->position.height)

typedef struct _MSlider MSlider;

typedef struct _MSlider {
    MakiseGUI*          gui;
    MElement            el;

    int32_t*            value;                                                      //pointer to value
    int32_t             value_max;                                                  //minimal possible value
    int32_t             value_min;                                                  //max possible value

    MSlider_Type        type;                                                       //is slider readonly or you can control it

    void                ( *onchange )   ( MSlider* b, int32_t val );                 // When value changed by user
    void                ( *onfocus )    ( MSlider* b, MFocusEnum type );             // type == M_G_FOCUS_GET when focus recieved and M_G_FOCUS_LEAVE when dropped.

    MakiseStyle*        style;
    uint8_t             state;                                                       //focus state
} MSlider;

void m_create_slider( MSlider*          b,
                      MContainer*       c,
                      MPosition         pos,
                      int32_t*          value,
                      int32_t           value_min,
                      int32_t           value_max,
                      MSlider_Type      type,
                      void              ( *onchange )   ( MSlider* b, int32_t val ),
                      void              ( *onfocus )    ( MSlider* b, MFocusEnum type ),
                      MakiseStyle*      style );

#ifdef __cplusplus
}
#endif

{'fraction_non_alphanumeric': 0.0629190304280557, 'fraction_numerical': 0.009798865394533264, 'mean_word_length': 1.0589171974522293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4111678', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1036, 'n_words': 257}