<commit_before>#ifndef ELM_WIDGET_H
#define ELM_WIDGET_H

/* DO NOT USE THIUS HEADER UNLESS YOU ARE PREPARED FOR BESAKING OF YOUR
 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
 * FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK IT
 * AT RUNTIME
 * 
 * How to make your own widget? like this:
 * 
 * #include <Elementary.h>
 * #include "elm_priv.h"
 * 
 * typedef struct _Widget_Data Widget_Data;
 *    
 * struct _Widget_Data
 * {
 *   // 
 *   Evas_Object *sub;
 *   // add any other widget data here too
 * };
 * 
 * static const char *widtype = NULL;
 * static void _del_hook(Evas_Object *obj);
 * static void _theme_hook(Evas_Object *obj);
 * static void _disable_hook(Evas_Object *obj);
 * static void _sizing_eval(Evas_Object *obj);
 * static void _on_focus_hook(void *data, Evas_Object *obj);
 * 
 * static const char SIG_CLICKED[] = "clicked";
 * static const Evas_Smart_Cb_Description _signals[] = {
 *   {SIG_CLICKED, ""},
 *   {NULL, NULL}
 * };
 * 
 * static void
 * _del_hook(Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    if (!wd) return;
 *    // delete hook - on delete of object delete object struct etc.
 *    free(wd);
 * }
 * 
 * static void
 * _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    if (!wd) return;
 *    // handle focus going in and out - optional, but if you want to, set
 *    // this hook and handle it (eg emit a signal to an edje obj)
 *    if (elm_widget_focus_get(obj))
 *      {
 *         edje_object_signal_emit(wd->sub, "elm,action,focus", "elm");
 *         evas_object_focus_set(wd->sub, EINA_TRUE);
 *      }
 *    else
 *      {
 *         edje_object_signal_emit(wd->sub, "elm,action,unfocus", "elm");
 *         evas_object_focus_set(wd->sub, EINA_FALSE);
 *      }
 * }
 * 
 * static void
 * _theme_hook(Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    if (!wd) return;
 *    // handle change in theme/scale etc. etc.
 *    elm_widget_theme_object_set(obj, wd->sub, "mywidget", "base", 
 *                                elm_widget_style_get(obj));
 * }
 * 
 * static void
 * _disable_hook(Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    if (!wd) return;
 *    // optional, gbut handle if the widget gets disabled or not
 *    if (elm_widget_disabled_get(obj))
 *      edje_object_signal_emit(wd->sub, "elm,state,disabled", "elm");
 *    else
 *      edje_object_signal_emit(wd->sub, "elm,state,enabled", "elm");
 * }
 * 
 * static void
 * _sizing_eval(Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
 *    // 
 *    if (!wd) return;
 *    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
 *    edje_object_size_min_restricted_calc(wd->sub, &minw, &minh, minw, minh);
 *    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
 *    evas_object_size_hint_min_set(obj, minw, minh);
 *    evas_object_size_hint_max_set(obj, maxw, maxh);
 * }
 * 
 * // actual api to create your widget. add more to manipulate it as needed
 * // mark your calls with EAPI to make them "external api" calls.
 * EAPI Evas_Object *
 * elm_mywidget_add(Evas_Object *parent)
 * {
 *    Evas_Object *obj;
 *    Evas *e;
 *    Widget_Data *wd;
 * 
 *    // ALWAYS call this - this checks that your widget matches that of
 *    // elementary and that the api hasn't broken. if it has this returns
 *    // false and you need to handle this error gracefully
 *    if (!elm_widget_api_check(ELM_INTERNAL_API_VERSION)) return NULL;
 * 
 *    // basic - allocate data for widget and fill it
 *    wd = ELM_NEW(Widget_Data);
 *    e = evas_object_evas_get(parent);
 *    obj = elm_widget_add(e);
 *    // give it a type name and set yp a mywidget type string if needed
 *    ELM_SET_WIDTYPE(widtype, "mywidget");
 *    elm_widget_type_set(obj, "mywidget");
 *    // tell the parent widget that we are a sub object
 *    elm_widget_sub_object_add(parent, obj);
 *    // setup hooks we need (some are optional)
 *    elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
 *    elm_widget_data_set(obj, wd);
 *    elm_widget_del_hook_set(obj, _del_hook);
 *    elm_widget_theme_hook_set(obj, _theme_hook);
 *    elm_widget_disable_hook_set(obj, _disable_hook);
 *    // this widget can focus (true, means yes it can, false means it can't)
 *    elm_widget_can_focus_set(obj, 1);
 * 
 *    // for this widget we will ad d1 sub object that is an edje object
 *    wd->sub = edje_object_add(e);
 *    // set the theme. this follows a scheme for group name like this:
 *    //   "elm/WIDGETNAME/ELEMENT/STYLE"
 *    // so here it will be:
 *    //   "elm/mywidget/base/default"
 *    // changing style changes style name from default (all widgets start
 *    // with the default style) and element is for your widget internal
 *    // structure as you see fit
 *    elm_widget_theme_object_set(obj, wd->sub, "mywidget", "base", "default");
 *    // listen to a signal from the edje object to produce widget smart
 *    // callback (like click)
 *    edje_object_signal_callback_add(wd->sub, "elm,action,click", "",
 *                                    _signal_clicked, obj);
 *    // set this sub object as the "resize object". widgets get 1 resize
 *    // object that is zresized along with the object wrapper.
 *    elm_widget_resize_object_set(obj, wd->sub);
 * 
 *    // evaluate sizing of the widget (minimum size calc etc.). optional but
 *    // not a bad idea to do here. it will get queued for later anyway
 *    _sizing_eval(obj);
 * 
 *    // register the smart callback descriptions so we can have some runtime
 *    // info as to what the smart callback strings mean
 *    evas_object_smart_callbacks_descriptions_set(obj, _signals);
 *    return obj;
 * }
 * 
 * // example - do "whatever" to the widget (here just emit a signal)
 * EAPI void
 * elm_mywidget_whatever(Evas_Object *obj)
 * {
 *    // check if type is correct - check will return if it fails
 *    ELM_CHECK_WIDTYPE(obj, widtype);
 *    // get widget data - tyope is correct and sany by this point, so this
 *    // should never fail
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    // do whatever you like
 *    edje_object_signal_emit(wd->sub, "elm,state,action,whatever", "elm");
 * }
 * 
 * // you can add more - you need to see elementary's code to know how to
 * // handle all cases. rememebr this api is not stable and may change. it's
 * // internal
 * 
 */

#ifndef ELM_INTERAL_API_MDFGELQ 
# warning "You are using an internal elementary API. This API is not stable"
# warning "and is subject to change. You use this at your own risk."
# warning "Remember to call elm_widget_api_check(ELM_INTERNAL_API_VERSION);"
# warning "in your widgets before you call any other elm_widget calls to do"
# warning "a correct runtime version check."
#endif
#define ELM_INTERNAL_API_VERSION 7000

typedef struct _Elm_Tooltip Elm_Tooltip;
typedef struct _Elm_Cursor Elm_Cursor;
typedef struct _Elm_Widget_Item Elm_Widget_Item; /**< base structure for all widget items that are not Elm_Widget themselves */

struct _Elm_Widget_Item
{<commit_msg>spelling<commit_after>#ifndef ELM_WIDGET_H
#define ELM_WIDGET_H

/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BESAKING OF YOUR
 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
 * FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK IT
 * AT RUNTIME
 * 
 * How to make your own widget? like this:
 * 
 * #include <Elementary.h>
 * #include "elm_priv.h"
 * 
 * typedef struct _Widget_Data Widget_Data;
 *    
 * struct _Widget_Data
 * {
 *   // 
 *   Evas_Object *sub;
 *   // add any other widget data here too
 * };
 * 
 * static const char *widtype = NULL;
 * static void _del_hook(Evas_Object *obj);
 * static void _theme_hook(Evas_Object *obj);
 * static void _disable_hook(Evas_Object *obj);
 * static void _sizing_eval(Evas_Object *obj);
 * static void _on_focus_hook(void *data, Evas_Object *obj);
 * 
 * static const char SIG_CLICKED[] = "clicked";
 * static const Evas_Smart_Cb_Description _signals[] = {
 *   {SIG_CLICKED, ""},
 *   {NULL, NULL}
 * };
 * 
 * static void
 * _del_hook(Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    if (!wd) return;
 *    // delete hook - on delete of object delete object struct etc.
 *    free(wd);
 * }
 * 
 * static void
 * _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    if (!wd) return;
 *    // handle focus going in and out - optional, but if you want to, set
 *    // this hook and handle it (eg emit a signal to an edje obj)
 *    if (elm_widget_focus_get(obj))
 *      {
 *         edje_object_signal_emit(wd->sub, "elm,action,focus", "elm");
 *         evas_object_focus_set(wd->sub, EINA_TRUE);
 *      }
 *    else
 *      {
 *         edje_object_signal_emit(wd->sub, "elm,action,unfocus", "elm");
 *         evas_object_focus_set(wd->sub, EINA_FALSE);
 *      }
 * }
 * 
 * static void
 * _theme_hook(Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    if (!wd) return;
 *    // handle change in theme/scale etc. etc.
 *    elm_widget_theme_object_set(obj, wd->sub, "mywidget", "base", 
 *                                elm_widget_style_get(obj));
 * }
 * 
 * static void
 * _disable_hook(Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    if (!wd) return;
 *    // optional, gbut handle if the widget gets disabled or not
 *    if (elm_widget_disabled_get(obj))
 *      edje_object_signal_emit(wd->sub, "elm,state,disabled", "elm");
 *    else
 *      edje_object_signal_emit(wd->sub, "elm,state,enabled", "elm");
 * }
 * 
 * static void
 * _sizing_eval(Evas_Object *obj)
 * {
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
 *    // 
 *    if (!wd) return;
 *    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
 *    edje_object_size_min_restricted_calc(wd->sub, &minw, &minh, minw, minh);
 *    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
 *    evas_object_size_hint_min_set(obj, minw, minh);
 *    evas_object_size_hint_max_set(obj, maxw, maxh);
 * }
 * 
 * // actual api to create your widget. add more to manipulate it as needed
 * // mark your calls with EAPI to make them "external api" calls.
 * EAPI Evas_Object *
 * elm_mywidget_add(Evas_Object *parent)
 * {
 *    Evas_Object *obj;
 *    Evas *e;
 *    Widget_Data *wd;
 * 
 *    // ALWAYS call this - this checks that your widget matches that of
 *    // elementary and that the api hasn't broken. if it has this returns
 *    // false and you need to handle this error gracefully
 *    if (!elm_widget_api_check(ELM_INTERNAL_API_VERSION)) return NULL;
 * 
 *    // basic - allocate data for widget and fill it
 *    wd = ELM_NEW(Widget_Data);
 *    e = evas_object_evas_get(parent);
 *    obj = elm_widget_add(e);
 *    // give it a type name and set yp a mywidget type string if needed
 *    ELM_SET_WIDTYPE(widtype, "mywidget");
 *    elm_widget_type_set(obj, "mywidget");
 *    // tell the parent widget that we are a sub object
 *    elm_widget_sub_object_add(parent, obj);
 *    // setup hooks we need (some are optional)
 *    elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
 *    elm_widget_data_set(obj, wd);
 *    elm_widget_del_hook_set(obj, _del_hook);
 *    elm_widget_theme_hook_set(obj, _theme_hook);
 *    elm_widget_disable_hook_set(obj, _disable_hook);
 *    // this widget can focus (true, means yes it can, false means it can't)
 *    elm_widget_can_focus_set(obj, 1);
 * 
 *    // for this widget we will ad d1 sub object that is an edje object
 *    wd->sub = edje_object_add(e);
 *    // set the theme. this follows a scheme for group name like this:
 *    //   "elm/WIDGETNAME/ELEMENT/STYLE"
 *    // so here it will be:
 *    //   "elm/mywidget/base/default"
 *    // changing style changes style name from default (all widgets start
 *    // with the default style) and element is for your widget internal
 *    // structure as you see fit
 *    elm_widget_theme_object_set(obj, wd->sub, "mywidget", "base", "default");
 *    // listen to a signal from the edje object to produce widget smart
 *    // callback (like click)
 *    edje_object_signal_callback_add(wd->sub, "elm,action,click", "",
 *                                    _signal_clicked, obj);
 *    // set this sub object as the "resize object". widgets get 1 resize
 *    // object that is zresized along with the object wrapper.
 *    elm_widget_resize_object_set(obj, wd->sub);
 * 
 *    // evaluate sizing of the widget (minimum size calc etc.). optional but
 *    // not a bad idea to do here. it will get queued for later anyway
 *    _sizing_eval(obj);
 * 
 *    // register the smart callback descriptions so we can have some runtime
 *    // info as to what the smart callback strings mean
 *    evas_object_smart_callbacks_descriptions_set(obj, _signals);
 *    return obj;
 * }
 * 
 * // example - do "whatever" to the widget (here just emit a signal)
 * EAPI void
 * elm_mywidget_whatever(Evas_Object *obj)
 * {
 *    // check if type is correct - check will return if it fails
 *    ELM_CHECK_WIDTYPE(obj, widtype);
 *    // get widget data - tyope is correct and sany by this point, so this
 *    // should never fail
 *    Widget_Data *wd = elm_widget_data_get(obj);
 *    // do whatever you like
 *    edje_object_signal_emit(wd->sub, "elm,state,action,whatever", "elm");
 * }
 * 
 * // you can add more - you need to see elementary's code to know how to
 * // handle all cases. remember this api is not stable and may change. it's
 * // internal
 * 
 */

#ifndef ELM_INTERAL_API_MDFGELQ 
# warning "You are using an internal elementary API. This API is not stable"
# warning "and is subject to change. You use this at your own risk."
# warning "Remember to call elm_widget_api_check(ELM_INTERNAL_API_VERSION);"
# warning "in your widgets before you call any other elm_widget calls to do"
# warning "a correct runtime version check."
#endif
#define ELM_INTERNAL_API_VERSION 7000

typedef struct _Elm_Tooltip Elm_Tooltip;
typedef struct _Elm_Cursor Elm_Cursor;
typedef struct _Elm_Widget_Item Elm_Widget_Item; /**< base structure for all widget items that are not Elm_Widget themselves */

struct _Elm_Widget_Item
{
{'fraction_non_alphanumeric': 0.11041926110419262, 'fraction_numerical': 0.0020755500207555004, 'mean_word_length': 3.1549295774647885, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5246574', 'n_tokens_mistral': 5038, 'n_tokens_neox': 4893, 'n_words': 1464}