diff options
author | Jaeun Choi <jaeun12.choi@samsung.com> | 2017-05-16 19:17:44 +0900 |
---|---|---|
committer | Jaeun Choi <jaeun12.choi@samsung.com> | 2017-05-16 22:15:30 +0900 |
commit | 3032cea403dd1c043fea388822113869db96252a (patch) | |
tree | 9fee09aae67f8fdb5483a79d8904ffbb6ac87635 | |
parent | 88f328efd2d92f02c6a680872263227d3ac95f8d (diff) | |
download | efl-3032cea403dd1c043fea388822113869db96252a.tar.gz |
initialize skeleton code for implementing efl_ui_scroller
this commit includes an example
-rw-r--r-- | src/Makefile_Elementary.am | 5 | ||||
-rw-r--r-- | src/examples/elementary/efl_ui_scroller_example.c | 29 | ||||
-rw-r--r-- | src/lib/elementary/Elementary.h | 1 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_scroller.c | 32 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_scroller.eo | 10 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_scroller.h | 3 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_scroller_eo.h | 1 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_widget_scroller.h | 10 |
8 files changed, 91 insertions, 0 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index db6dfa2b2c..a1ba376995 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -122,6 +122,7 @@ elm_public_eolian_files = \ lib/elementary/efl_ui_focus_manager_sub.eo \ lib/elementary/efl_ui_focus_object.eo \ lib/elementary/efl_ui_focus_user.eo \ + lib/elementary/efl_ui_scroller.eo \ $(NULL) # Private classes (not exposed or shipped) @@ -286,6 +287,7 @@ includesunstable_HEADERS = \ lib/elementary/elm_code_indent.h \ lib/elementary/elm_code_file.h \ lib/elementary/elm_code_parse.h \ + lib/elementary/efl_ui_widget_scroller.h \ lib/elementary/elm_code_syntax.h includesunstabledir = $(includedir)/elementary-@VMAJ@ @@ -529,6 +531,8 @@ includesub_HEADERS = \ lib/elementary/elm_win_standard.h \ lib/elementary/elm_helper.h \ lib/elementary/elm_part_helper.h \ + lib/elementary/efl_ui_scroller.h \ + lib/elementary/efl_ui_scroller_eo.h \ $(NULL) includesubdir = $(includedir)/elementary-@VMAJ@/ @@ -678,6 +682,7 @@ lib_elementary_libelementary_la_SOURCES = \ lib/elementary/efl_ui_focus_manager.c \ lib/elementary/efl_ui_focus_manager_sub.c \ lib/elementary/efl_ui_focus_object.c \ + lib/elementary/efl_ui_scroller.c \ $(NULL) diff --git a/src/examples/elementary/efl_ui_scroller_example.c b/src/examples/elementary/efl_ui_scroller_example.c new file mode 100644 index 0000000000..bbc11f63ba --- /dev/null +++ b/src/examples/elementary/efl_ui_scroller_example.c @@ -0,0 +1,29 @@ +//Compile with: +//gcc -g efl_ui_scroller_example.c -o efl_ui_scroller_example `pkg-config --cflags --libs elementary` + +#define EFL_BETA_API_SUPPORT +#define EFL_EO_API_SUPPORT + +#include <Elementary.h> + +EAPI_MAIN int +elm_main(int argc, char **argv) +{ + Eo *win, *scroller, *content; + + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + + win = efl_add(EFL_UI_WIN_CLASS, NULL, "TEST", ELM_WIN_BASIC); + efl_gfx_size_set(win, 300, 400); + efl_gfx_visible_set(win, EINA_TRUE); + + scroller = efl_add(EFL_UI_SCROLLER_CLASS, win); + efl_gfx_visible_set(scroller, EINA_TRUE); + elm_win_resize_object_add(win, scroller); + evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + elm_run(); + + return 0; +} +ELM_MAIN() diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h index db56d7e2ce..27c45ebd7a 100644 --- a/src/lib/elementary/Elementary.h +++ b/src/lib/elementary/Elementary.h @@ -264,6 +264,7 @@ EAPI extern Elm_Version *elm_version; #include <elm_web.h> #include <elm_win.h> #include <elm_win_standard.h> +#include <efl_ui_scroller.h> #ifdef EFL_EO_API_SUPPORT # include <efl_config_global.eo.h> diff --git a/src/lib/elementary/efl_ui_scroller.c b/src/lib/elementary/efl_ui_scroller.c new file mode 100644 index 0000000000..0f1d2e7a8c --- /dev/null +++ b/src/lib/elementary/efl_ui_scroller.c @@ -0,0 +1,32 @@ +#ifdef HAVE_CONFIG_H +# include "elementary_config.h" +#endif + +#define ELM_LAYOUT_PROTECTED + +#include <Elementary.h> +#include "elm_priv.h" +#include "efl_ui_widget_scroller.h" +#include "elm_widget_layout.h" + +#define MY_CLASS EFL_UI_SCROLLER_CLASS +#define MY_CLASS_NAME "Efl_Ui_Scroller" + + +EOLIAN static void +_efl_ui_scroller_efl_canvas_group_group_add(Eo *obj EINA_UNUSED, + Efl_Ui_Scroller_Data *sd EINA_UNUSED) +{ +} + +EOLIAN static Eo * +_efl_ui_scroller_efl_object_constructor(Eo *obj, + Efl_Ui_Scroller_Data *sd EINA_UNUSED) +{ + obj = efl_constructor(efl_super(obj, MY_CLASS)); + + return obj; +} + + +#include "efl_ui_scroller.eo.c" diff --git a/src/lib/elementary/efl_ui_scroller.eo b/src/lib/elementary/efl_ui_scroller.eo new file mode 100644 index 0000000000..bb17c72795 --- /dev/null +++ b/src/lib/elementary/efl_ui_scroller.eo @@ -0,0 +1,10 @@ +class Efl.Ui.Scroller (Elm.Layout, Efl.Ui.Scrollable) +{ + [[Efl ui scroller class]] + event_prefix: efl_ui_scroller; + eo_prefix: efl_ui_scroller; + implements { + Efl.Object.constructor; + Efl.Canvas.Group.group_add; + } +} diff --git a/src/lib/elementary/efl_ui_scroller.h b/src/lib/elementary/efl_ui_scroller.h new file mode 100644 index 0000000000..8b4482f44d --- /dev/null +++ b/src/lib/elementary/efl_ui_scroller.h @@ -0,0 +1,3 @@ +#ifdef EFL_EO_API_SUPPORT +#include "efl_ui_scroller_eo.h" +#endif diff --git a/src/lib/elementary/efl_ui_scroller_eo.h b/src/lib/elementary/efl_ui_scroller_eo.h new file mode 100644 index 0000000000..ac8951865a --- /dev/null +++ b/src/lib/elementary/efl_ui_scroller_eo.h @@ -0,0 +1 @@ +#include "efl_ui_scroller.eo.h" diff --git a/src/lib/elementary/efl_ui_widget_scroller.h b/src/lib/elementary/efl_ui_widget_scroller.h new file mode 100644 index 0000000000..274c9cadd0 --- /dev/null +++ b/src/lib/elementary/efl_ui_widget_scroller.h @@ -0,0 +1,10 @@ +#ifndef EFL_UI_WIDGET_SCROLLER_H +#define EFL_UI_WIDGET_SCROLLER_H + +#include "Elementary.h" + +typedef struct _Efl_Ui_Scroller_Data +{ +} Efl_Ui_Scroller_Data; + +#endif |