<commit_before>#include "e.h"
#include "e_mod_main.h"
#include "e_mod_config.h"
#include "e_mod_win.h"

/* local function prototypes */
static void _il_sk_win_cb_free(Il_Sk_Win *win);
static void _il_sk_win_cb_resize(E_Win *win);
static void _il_sk_win_cb_back_click(void *data, void *data2);
static void _il_sk_win_cb_close_click(void *data, void *data2);

EAPI int 
e_mod_sk_win_init(void) 
{
   return 1;
}

EAPI int 
e_mod_sk_win_shutdown(void) 
{
   return 1;
}

EAPI Il_Sk_Win *
e_mod_sk_win_new(void) 
{
   Il_Sk_Win *swin;
   E_Zone *zone;
   Evas *evas;
   Ecore_X_Window_State states[2];
   char buff[PATH_MAX];

   snprintf(buff, sizeof(buff), "%s/e-module-illume-softkey.edj", 
            il_sk_cfg->mod_dir);

   swin = E_OBJECT_ALLOC(Il_Sk_Win, IL_SK_WIN_TYPE, _il_sk_win_cb_free);
   if (!swin) return NULL;

   swin->win = e_win_new(e_util_container_number_get(0));
   states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
   states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
   ecore_x_netwm_window_state_set(swin->win->evas_win, states, 2);
   ecore_x_icccm_hints_set(swin->win->evas_win, 0, 0, 0, 0, 0, 0, 0);
   ecore_x_netwm_window_type_set(swin->win->evas_win, ECORE_X_WINDOW_TYPE_DOCK);

   zone = e_util_container_zone_number_get(0, 0);
   e_win_no_remember_set(swin->win, 1);

   e_win_resize_callback_set(swin->win, _il_sk_win_cb_resize);
   e_win_borderless_set(swin->win, 1);
   swin->win->data = swin;
   e_win_title_set(swin->win, _("Illume Softkey"));
   e_win_name_class_set(swin->win, "Illume-Softkey", "Illume-Softkey");

   evas = e_win_evas_get(swin->win);

   swin->o_base = edje_object_add(evas);
   if (!e_theme_edje_object_set(swin->o_base, "base/theme/modules/illume-softkey", 
                                "modules/illume-softkey/window"))
     edje_object_file_set(swin->o_base, buff, "modules/illume-softkey/window");
   evas_object_move(swin->o_base, 0, 0);
   evas_object_show(swin->o_base);

   swin->o_box = e_widget_list_add(evas, 1, 1);
   edje_object_part_swallow(swin->o_base, "e.swallow.buttons", swin->o_box);

   swin->b_back = e_widget_button_add(evas, NULL, "go-previous", 
                                      _il_sk_win_cb_back_click, swin, NULL);
   e_widget_list_object_append(swin->o_box, swin->b_back, 1, 0, 0.5);

   swin->b_close = e_widget_button_add(evas, NULL, "window-close", 
                                       _il_sk_win_cb_close_click, swin, NULL);
   e_widget_list_object_append(swin->o_box, swin->b_close, 1, 0, 0.5);

   e_win_size_min_set(swin->win, zone->w, 48);
   e_win_layer_set(swin->win, 100);
   e_win_show(swin->win);
   e_win_move_resize(swin->win, 0, (zone->h - 48), zone->w, 48);

   return swin;
}
<commit_msg>Don't set layer of window or objects, illume2 will do that. Some minor formatting.<commit_after>#include "e.h"
#include "e_mod_main.h"
#include "e_mod_config.h"
#include "e_mod_win.h"

/* local function prototypes */
static void _il_sk_win_cb_free(Il_Sk_Win *win);
static void _il_sk_win_cb_resize(E_Win *win);
static void _il_sk_win_cb_back_click(void *data, void *data2);
static void _il_sk_win_cb_close_click(void *data, void *data2);

EAPI int 
e_mod_sk_win_init(void) 
{
   return 1;
}

EAPI int 
e_mod_sk_win_shutdown(void) 
{
   return 1;
}

EAPI Il_Sk_Win *
e_mod_sk_win_new(void) 
{
   Il_Sk_Win *swin;
   E_Zone *zone;
   Evas *evas;
   Ecore_X_Window_State states[2];
   char buff[PATH_MAX];

   swin = E_OBJECT_ALLOC(Il_Sk_Win, IL_SK_WIN_TYPE, _il_sk_win_cb_free);
   if (!swin) return NULL;

   snprintf(buff, sizeof(buff), "%s/e-module-illume-softkey.edj", 
            il_sk_cfg->mod_dir);

   swin->win = e_win_new(e_util_container_number_get(0));
   states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
   states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
   ecore_x_netwm_window_state_set(swin->win->evas_win, states, 2);
   ecore_x_icccm_hints_set(swin->win->evas_win, 0, 0, 0, 0, 0, 0, 0);
   ecore_x_netwm_window_type_set(swin->win->evas_win, ECORE_X_WINDOW_TYPE_DOCK);

   e_win_no_remember_set(swin->win, 1);
   e_win_resize_callback_set(swin->win, _il_sk_win_cb_resize);
   e_win_borderless_set(swin->win, 1);
   swin->win->data = swin;
   e_win_title_set(swin->win, _("Illume Softkey"));
   e_win_name_class_set(swin->win, "Illume-Softkey", "Illume-Softkey");

   evas = e_win_evas_get(swin->win);

   zone = e_util_container_zone_number_get(0, 0);

   swin->o_base = edje_object_add(evas);
   if (!e_theme_edje_object_set(swin->o_base, "base/theme/modules/illume-softkey", 
                                "modules/illume-softkey/window"))
     edje_object_file_set(swin->o_base, buff, "modules/illume-softkey/window");
   evas_object_move(swin->o_base, 0, 0);
   evas_object_resize(swin->o_base, zone->w, 48);
   evas_object_show(swin->o_base);

   swin->o_box = e_widget_list_add(evas, 1, 1);
   edje_object_part_swallow(swin->o_base, "e.swallow.buttons", swin->o_box);

   swin->b_back = e_widget_button_add(evas, NULL, "go-previous", 
                                      _il_sk_win_cb_back_click, swin, NULL);
   e_widget_list_object_append(swin->o_box, swin->b_back, 1, 0, 0.5);

   swin->b_close = e_widget_button_add(evas, NULL, "window-close", 
                                       _il_sk_win_cb_close_click, swin, NULL);
   e_widget_list_object_append(swin->o_box, swin->b_close, 1, 0, 0.5);

   e_win_size_min_set(swin->win, zone->w, 48);
   e_win_show(swin->win);
   e_win_move_resize(swin->win, 0, (zone->h - 48), zone->w, 48);

   return swin;
}

{'fraction_non_alphanumeric': 0.13393020281381326, 'fraction_numerical': 0.015348072355198247, 'mean_word_length': 4.193548387096774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 78, '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': '5093287', 'n_tokens_mistral': 2477, 'n_tokens_neox': 2365, 'n_words': 338}