Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef EFL_BETA_API_SUPPORT
- #define EFL_BETA_API_SUPPORT
- #endif
- #ifndef EFL_EO_API_SUPPORT
- #define EFL_EO_API_SUPPORT
- #endif
- #ifndef ELM_INTERNAL_API_ARGESFSDFEFC
- #define ELM_INTERNAL_API_ARGESFSDFEFC
- #endif
- #include <Elementary.h>
- #include <Eo.h>
- #define ELM_WIDGET_PROTECTED
- #include "elm_widget.h"
- #include "elm_widget_container.h"
- #include "elm_interface_scrollable.h"
- typedef struct
- {
- Eo *bg_1;
- Eo *win_1;
- } _button_1_clicked_info;
- typedef struct
- {
- Eo *bg_1;
- Eo *win_1;
- } _button_2_clicked_info;
- typedef struct
- {
- Eo *win_1;
- } _button_10_clicked_info;
- typedef struct
- {
- Eo *win_1;
- } _button_11_clicked_info;
- typedef struct
- {
- Eo *win_1;
- } _button_12_clicked_info;
- typedef struct
- {
- Eo *win_1;
- } _button_13_clicked_info;
- static void
- _button_1_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
- {
- _button_1_clicked_info *ext_wdgs = data;
- efl_gfx_visible_set(ext_wdgs->bg_1, EINA_FALSE);
- efl_ui_win_alpha_set(ext_wdgs->win_1, EINA_TRUE);
- }
- static void
- _button_2_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
- {
- _button_2_clicked_info *ext_wdgs = data;
- efl_gfx_visible_set(ext_wdgs->bg_1, EINA_TRUE);
- efl_ui_win_alpha_set(ext_wdgs->win_1, EINA_FALSE);
- }
- static void
- _button_10_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
- {
- _button_10_clicked_info *ext_wdgs = data;
- elm_obj_widget_orientation_set(ext_wdgs->win_1, 0);
- }
- static void
- _button_11_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
- {
- _button_11_clicked_info *ext_wdgs = data;
- elm_obj_widget_orientation_set(ext_wdgs->win_1, 90);
- }
- static void
- _button_12_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
- {
- _button_12_clicked_info *ext_wdgs = data;
- elm_obj_widget_orientation_set(ext_wdgs->win_1, 180);
- }
- static void
- _button_13_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
- {
- _button_13_clicked_info *ext_wdgs = data;
- elm_obj_widget_orientation_set(ext_wdgs->win_1, 270);
- }
- void
- win_1_create()
- {
- #if 1
- Eo *win_1 = efl_add(EFL_UI_WIN_CLASS, NULL,
- efl_ui_win_name_set(efl_added, "window-states"),
- efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC));
- #else
- Eo *win_1 = elm_win_add(NULL, "window-states", ELM_WIN_BASIC);
- #endif
- efl_text_set(win_1, "Window States");
- efl_ui_win_autodel_set(win_1, EINA_TRUE);
- efl_gfx_size_set(win_1, 280, 400);
- efl_gfx_visible_set(win_1, EINA_TRUE);
- Eo *bg_1 = efl_add(ELM_BG_CLASS, win_1);
- efl_gfx_size_hint_weight_set(bg_1, 1, 1);
- efl_content_set(win_1, bg_1);
- Eo *box_1 = elm_box_add(win_1);
- efl_gfx_size_hint_weight_set(box_1, 1, 1);
- efl_gfx_visible_set(box_1, EINA_TRUE);
- Eo *box_2 = elm_box_add(box_1);
- elm_box_horizontal_set(box_2, EINA_TRUE);
- elm_box_homogeneous_set(box_2, EINA_TRUE);
- efl_gfx_size_hint_weight_set(box_2, 1, 0);
- efl_gfx_size_hint_align_set(box_2, -1, -1);
- efl_gfx_visible_set(box_2, EINA_TRUE);
- Eo *button_1 = efl_add(EFL_UI_BUTTON_CLASS, box_2);
- elm_obj_widget_part_text_set(button_1, NULL, "Alpha On");
- efl_gfx_size_hint_align_set(button_1, -1, -1);
- efl_gfx_size_hint_weight_set(button_1, 1, 0);
- efl_gfx_visible_set(button_1, EINA_TRUE);
- elm_box_pack_end(box_2, button_1);
- Eo *button_2 = efl_add(EFL_UI_BUTTON_CLASS, box_2);
- elm_obj_widget_part_text_set(button_2, NULL, "Alpha Off");
- efl_gfx_size_hint_align_set(button_2, -1, -1);
- efl_gfx_size_hint_weight_set(button_2, 1, 0);
- efl_gfx_visible_set(button_2, EINA_TRUE);
- elm_box_pack_end(box_2, button_2);
- Eo *button_3 = efl_add(EFL_UI_BUTTON_CLASS, box_2);
- elm_obj_widget_part_text_set(button_3, NULL, "Withdraw");
- efl_gfx_size_hint_align_set(button_3, -1, -1);
- efl_gfx_size_hint_weight_set(button_3, 1, 0);
- efl_gfx_visible_set(button_3, EINA_TRUE);
- elm_box_pack_end(box_2, button_3);
- Eo *button_4 = efl_add(EFL_UI_BUTTON_CLASS, box_2);
- elm_obj_widget_part_text_set(button_4, NULL, "Massive");
- efl_gfx_size_hint_align_set(button_4, -1, -1);
- efl_gfx_size_hint_weight_set(button_4, 1, 0);
- efl_gfx_visible_set(button_4, EINA_TRUE);
- elm_box_pack_end(box_2, button_4);
- Eo *button_5 = efl_add(EFL_UI_BUTTON_CLASS, box_2);
- elm_obj_widget_part_text_set(button_5, NULL, "Move 20 20");
- efl_gfx_size_hint_align_set(button_5, -1, -1);
- efl_gfx_size_hint_weight_set(button_5, 1, 0);
- efl_gfx_visible_set(button_5, EINA_TRUE);
- elm_box_pack_end(box_2, button_5);
- elm_box_pack_end(box_1, box_2);
- Eo *box_3 = elm_box_add(box_1);
- elm_box_horizontal_set(box_3, EINA_TRUE);
- elm_box_homogeneous_set(box_3, EINA_TRUE);
- efl_gfx_size_hint_weight_set(box_3, 1, 0);
- efl_gfx_size_hint_align_set(box_3, -1, -1);
- efl_gfx_visible_set(box_3, EINA_TRUE);
- Eo *button_6 = efl_add(EFL_UI_BUTTON_CLASS, box_3);
- elm_obj_widget_part_text_set(button_6, NULL, "Lower");
- efl_gfx_size_hint_align_set(button_6, -1, -1);
- efl_gfx_size_hint_weight_set(button_6, 1, 0);
- efl_gfx_visible_set(button_6, EINA_TRUE);
- elm_box_pack_end(box_3, button_6);
- Eo *button_7 = efl_add(EFL_UI_BUTTON_CLASS, box_3);
- elm_obj_widget_part_text_set(button_7, NULL, "Iconify and Activate");
- efl_gfx_size_hint_align_set(button_7, -1, -1);
- efl_gfx_size_hint_weight_set(button_7, 1, 0);
- efl_gfx_visible_set(button_7, EINA_TRUE);
- elm_box_pack_end(box_3, button_7);
- Eo *button_8 = efl_add(EFL_UI_BUTTON_CLASS, box_3);
- elm_obj_widget_part_text_set(button_8, NULL, "Iconify and Deiconify");
- efl_gfx_size_hint_align_set(button_8, -1, -1);
- efl_gfx_size_hint_weight_set(button_8, 1, 0);
- efl_gfx_visible_set(button_8, EINA_TRUE);
- elm_box_pack_end(box_3, button_8);
- Eo *button_9 = efl_add(EFL_UI_BUTTON_CLASS, box_3);
- elm_obj_widget_part_text_set(button_9, NULL, "Center");
- efl_gfx_size_hint_weight_set(button_9, 1, 0);
- efl_gfx_size_hint_align_set(button_9, -1, -1);
- efl_gfx_visible_set(button_9, EINA_TRUE);
- elm_box_pack_end(box_3, button_9);
- elm_box_pack_end(box_1, box_3);
- Eo *box_4 = elm_box_add(box_1);
- elm_box_horizontal_set(box_4, EINA_TRUE);
- elm_box_homogeneous_set(box_4, EINA_TRUE);
- efl_gfx_size_hint_weight_set(box_4, 1, 1);
- efl_gfx_size_hint_align_set(box_4, -1, -1);
- efl_gfx_visible_set(box_4, EINA_TRUE);
- Eo *slider_1 = efl_add(EFL_UI_SLIDER_CLASS, box_4);
- elm_obj_widget_part_text_set(slider_1, NULL, "Test");
- efl_ui_range_span_size_set(slider_1, 100);
- efl_gfx_size_hint_align_set(slider_1, 0.5, 0.5);
- efl_gfx_size_hint_weight_set(slider_1, 1, 1);
- efl_ui_slider_indicator_format_set(slider_1, "%3.0f");
- efl_ui_range_min_max_set(slider_1, 50, 150);
- efl_ui_range_value_set(slider_1, 50);
- efl_ui_direction_set(slider_1, EFL_UI_DIR_RTL);
- efl_gfx_visible_set(slider_1, EINA_TRUE);
- elm_box_pack_end(box_4, slider_1);
- elm_box_pack_end(box_1, box_4);
- Eo *check_1 = efl_add(EFL_UI_CHECK_CLASS, box_1);
- elm_obj_widget_part_text_set(check_1, NULL, "resize");
- efl_ui_check_selected_set(check_1, EINA_FALSE);
- efl_gfx_size_hint_weight_set(check_1, 1, 1);
- efl_gfx_size_hint_align_set(check_1, 0.02, 0.99);
- efl_gfx_visible_set(check_1, EINA_TRUE);
- elm_box_pack_end(box_1, check_1);
- Eo *check_2 = efl_add(EFL_UI_CHECK_CLASS, box_1);
- elm_obj_widget_part_text_set(check_2, NULL, "fullscreen");
- efl_ui_check_selected_set(check_2, EINA_FALSE);
- efl_gfx_size_hint_weight_set(check_2, 1, 1);
- efl_gfx_size_hint_align_set(check_2, 0.02, 0.99);
- efl_gfx_visible_set(check_2, EINA_TRUE);
- elm_box_pack_end(box_1, check_2);
- Eo *check_3 = efl_add(EFL_UI_CHECK_CLASS, box_1);
- elm_obj_widget_part_text_set(check_3, NULL, "borderless");
- efl_ui_check_selected_set(check_3, EINA_FALSE);
- efl_gfx_size_hint_weight_set(check_3, 1, 1);
- efl_gfx_size_hint_align_set(check_3, 0.02, 0.99);
- efl_gfx_visible_set(check_3, EINA_TRUE);
- elm_box_pack_end(box_1, check_3);
- Eo *check_4 = efl_add(EFL_UI_CHECK_CLASS, box_1);
- elm_obj_widget_part_text_set(check_4, NULL, "floating");
- efl_ui_check_selected_set(check_4, EINA_FALSE);
- efl_gfx_size_hint_weight_set(check_4, 1, 1);
- efl_gfx_size_hint_align_set(check_4, 0.02, 0.99);
- efl_gfx_visible_set(check_4, EINA_TRUE);
- elm_box_pack_end(box_1, check_4);
- Eo *box_5 = elm_box_add(box_1);
- elm_box_horizontal_set(box_5, EINA_TRUE);
- elm_box_homogeneous_set(box_5, EINA_TRUE);
- efl_gfx_size_hint_weight_set(box_5, 1, 0);
- efl_gfx_size_hint_align_set(box_5, -1, -1);
- efl_gfx_visible_set(box_5, EINA_TRUE);
- Eo *button_10 = efl_add(EFL_UI_BUTTON_CLASS, box_5);
- elm_obj_widget_part_text_set(button_10, NULL, "Rot 0");
- efl_gfx_size_hint_align_set(button_10, -1, -1);
- efl_gfx_size_hint_weight_set(button_10, 1, 0);
- efl_gfx_visible_set(button_10, EINA_TRUE);
- elm_box_pack_end(box_5, button_10);
- Eo *button_11 = efl_add(EFL_UI_BUTTON_CLASS, box_5);
- elm_obj_widget_part_text_set(button_11, NULL, "Rot 90");
- efl_gfx_size_hint_align_set(button_11, -1, -1);
- efl_gfx_size_hint_weight_set(button_11, 1, 0);
- efl_gfx_visible_set(button_11, EINA_TRUE);
- elm_box_pack_end(box_5, button_11);
- Eo *button_12 = efl_add(EFL_UI_BUTTON_CLASS, box_5);
- elm_obj_widget_part_text_set(button_12, NULL, "Rot 180");
- efl_gfx_size_hint_align_set(button_12, -1, -1);
- efl_gfx_size_hint_weight_set(button_12, 1, 0);
- efl_gfx_visible_set(button_12, EINA_TRUE);
- elm_box_pack_end(box_5, button_12);
- Eo *button_13 = efl_add(EFL_UI_BUTTON_CLASS, box_5);
- elm_obj_widget_part_text_set(button_13, NULL, "Rot 270");
- efl_gfx_size_hint_align_set(button_13, -1, -1);
- efl_gfx_size_hint_weight_set(button_13, 1, 0);
- efl_gfx_visible_set(button_13, EINA_TRUE);
- elm_box_pack_end(box_5, button_13);
- Eo *button_14 = efl_add(EFL_UI_BUTTON_CLASS, box_5);
- elm_obj_widget_part_text_set(button_14, NULL, "Move 0 0");
- efl_gfx_size_hint_align_set(button_14, -1, -1);
- efl_gfx_size_hint_weight_set(button_14, 1, 0);
- efl_gfx_visible_set(button_14, EINA_TRUE);
- elm_box_pack_end(box_5, button_14);
- elm_box_pack_end(box_1, box_5);
- Eo *table_1 = elm_table_add(box_1);
- efl_gfx_size_hint_weight_set(table_1, 1, 1);
- efl_gfx_size_hint_align_set(table_1, -1, -1);
- efl_gfx_visible_set(table_1, EINA_TRUE);
- Eo *button_15 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_15, NULL, "Top Left");
- efl_gfx_size_hint_weight_set(button_15, 1, 1);
- efl_gfx_size_hint_align_set(button_15, -1, -1);
- efl_gfx_visible_set(button_15, EINA_TRUE);
- elm_table_pack(table_1, button_15, 0, 0, 1, 1);
- Eo *button_16 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_16, NULL, "Top");
- efl_gfx_size_hint_weight_set(button_16, 1, 1);
- efl_gfx_size_hint_align_set(button_16, -1, -1);
- efl_gfx_visible_set(button_16, EINA_TRUE);
- elm_table_pack(table_1, button_16, 1, 0, 1, 1);
- Eo *button_17 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_17, NULL, "Top Right");
- efl_gfx_size_hint_weight_set(button_17, 1, 1);
- efl_gfx_size_hint_align_set(button_17, -1, -1);
- efl_gfx_visible_set(button_17, EINA_TRUE);
- elm_table_pack(table_1, button_17, 2, 0, 1, 1);
- Eo *button_18 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_18, NULL, "Left");
- efl_gfx_size_hint_weight_set(button_18, 1, 1);
- efl_gfx_size_hint_align_set(button_18, -1, -1);
- efl_gfx_visible_set(button_18, EINA_TRUE);
- elm_table_pack(table_1, button_18, 0, 1, 1, 1);
- Eo *button_19 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_19, NULL, "Move");
- efl_gfx_size_hint_weight_set(button_19, 1, 1);
- efl_gfx_size_hint_align_set(button_19, -1, -1);
- efl_gfx_visible_set(button_19, EINA_TRUE);
- elm_table_pack(table_1, button_19, 1, 1, 1, 1);
- Eo *button_20 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_20, NULL, "Right");
- efl_gfx_size_hint_weight_set(button_20, 1, 1);
- efl_gfx_size_hint_align_set(button_20, -1, -1);
- efl_gfx_visible_set(button_20, EINA_TRUE);
- elm_table_pack(table_1, button_20, 2, 1, 1, 1);
- Eo *button_21 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_21, NULL, "Bot Left");
- efl_gfx_size_hint_weight_set(button_21, 1, 1);
- efl_gfx_size_hint_align_set(button_21, -1, -1);
- efl_gfx_visible_set(button_21, EINA_TRUE);
- elm_table_pack(table_1, button_21, 0, 2, 1, 1);
- Eo *button_22 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_22, NULL, "Bottom");
- efl_gfx_size_hint_weight_set(button_22, 1, 1);
- efl_gfx_size_hint_align_set(button_22, -1, -1);
- efl_gfx_visible_set(button_22, EINA_TRUE);
- elm_table_pack(table_1, button_22, 1, 2, 1, 1);
- Eo *button_23 = efl_add(EFL_UI_BUTTON_CLASS, table_1);
- elm_obj_widget_part_text_set(button_23, NULL, "Bot Right");
- efl_gfx_size_hint_weight_set(button_23, 1, 1);
- efl_gfx_size_hint_align_set(button_23, -1, -1);
- efl_gfx_visible_set(button_23, EINA_TRUE);
- elm_table_pack(table_1, button_23, 2, 2, 1, 1);
- elm_box_pack_end(box_1, table_1);
- efl_content_set(win_1, box_1);
- _button_1_clicked_info *button_1_clicked_info = calloc(1, sizeof(*button_1_clicked_info));
- button_1_clicked_info->bg_1 = bg_1;
- button_1_clicked_info->win_1 = win_1;
- efl_event_callback_add(button_1, EFL_UI_EVENT_CLICKED, _button_1_clicked_cb, button_1_clicked_info);
- _button_2_clicked_info *button_2_clicked_info = calloc(1, sizeof(*button_2_clicked_info));
- button_2_clicked_info->bg_1 = bg_1;
- button_2_clicked_info->win_1 = win_1;
- efl_event_callback_add(button_2, EFL_UI_EVENT_CLICKED, _button_2_clicked_cb, button_2_clicked_info);
- _button_10_clicked_info *button_10_clicked_info = calloc(1, sizeof(*button_10_clicked_info));
- button_10_clicked_info->win_1 = win_1;
- efl_event_callback_add(button_10, EFL_UI_EVENT_CLICKED, _button_10_clicked_cb, button_10_clicked_info);
- _button_11_clicked_info *button_11_clicked_info = calloc(1, sizeof(*button_11_clicked_info));
- button_11_clicked_info->win_1 = win_1;
- efl_event_callback_add(button_11, EFL_UI_EVENT_CLICKED, _button_11_clicked_cb, button_11_clicked_info);
- _button_12_clicked_info *button_12_clicked_info = calloc(1, sizeof(*button_12_clicked_info));
- button_12_clicked_info->win_1 = win_1;
- efl_event_callback_add(button_12, EFL_UI_EVENT_CLICKED, _button_12_clicked_cb, button_12_clicked_info);
- _button_13_clicked_info *button_13_clicked_info = calloc(1, sizeof(*button_13_clicked_info));
- button_13_clicked_info->win_1 = win_1;
- efl_event_callback_add(button_13, EFL_UI_EVENT_CLICKED, _button_13_clicked_cb, button_13_clicked_info);
- }
- EAPI_MAIN void efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
- { win_1_create(NULL); }
- EFL_MAIN()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement