[EGIT] [core/efl] master 01/01: popup: remove previous object when setting new content
conr2d pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2086530d0798e44aec163edec894e96bb90675e7 commit 2086530d0798e44aec163edec894e96bb90675e7 Author: JinYong ParkDate: Wed May 31 13:12:59 2017 +0900 popup: remove previous object when setting new content Summary: Other widgets remove previous object when setting new content, but popup does nothing for the part whose name is "default". content_unset can be used to keep previous content object, so content_set (especially with NULL) should be able to delete previous content object for uniformity of the entire widgets. @fix Reviewers: jpeg, singh.amitesh, cedric, raster, conr2d Reviewed By: conr2d Subscribers: minkyu, herb Differential Revision: https://phab.enlightenment.org/D4885 --- src/lib/elementary/elc_popup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index 9f97205afd..58a51c8f34 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -1128,7 +1128,9 @@ _content_set(Evas_Object *obj, _list_del(sd); } + evas_object_del(sd->content); sd->content = content; + if (content) { if (!sd->scroll) --
Re: [E-devel] efl_part and composition
On 31 May 2017 at 10:56, Carsten Haitzlerwrote: > On Tue, 30 May 2017 17:33:22 +0900 Jean-Philippe André > said: > > > Hello, > > > > I have a bit of a technical question here. You may want to skip this if > > you're not familiar with efl_part and efl_composite_attach. > > > > > > I'm currently working on T5315 also known as "Refactoring > Edje/Elm_Layout". > > The goal is to provide a uniform, simple API for both edje and elm_layout > > objects. > > > > Yesterday I've worked on EO API for EXTERNAL parts. Those parts are > similar > > to swallows except that they are filled in automatically with widgets > such > > as "elm/button" or "elm/slider". As a consequence, each EXTERNAL will > > support a certain, unknown, set of APIs. > > > > There is a "param_set" API that allows setting specific parameters on > those > > externals, such as "label" which is the text of a button. But those APIs > > (currently) don't cover all the APIs supported by a widget, and anyway > are > > limited to int/bool/double/string values (eina_value in a more general > > case). > > > > So a solution to exposing as much functionality as possible is to expose > > the internal widget directly. This is > > edje_object_part_external_object_get(). > > > > > > All "part" APIs in Edje.Object are meant to be implemented with > efl_part(). > > > > > > Going forward with EO API I see 3 solutions: > > #1. Do not expose the widget at all, hope that someday we can expose all > > useful features through generic parameter API. > > or keep external usage minimal and limited where this property api is > enough. > > > #2. Expose the internal widget directly (i.e. > > edje_object_part_external_object_get > > () or efl_content_get()) > > i dislike this in the general sense. for a swallow where code directly > placed > and object in that swallow - getting it back ... fine. yes. anything else i > think is leaking internals... :( > > > #3. Expose the widget API through composition, but not the widget itself. > > while this makes sense... i dislike it too because like #2... exposing... > :( > > > Point #3 requires explanation: > > efl_part(edje, "partname") returns a temporary object of a subtype of > class > > Efl.Canvas.Layout.Part. This object is meant to be used for a single > > function call. But in this case, we can compose it with the real widget > > with efl_composite_attach(). Then all the functions of the widget are > > available on the part handle, except Efl.Object base functions (eg. wref, > > data, events, etc...) > > > > > > Right now I've implementewd both #2 and #3. I'm kind of happy with both, > > but would like your opinions. In particular, #3 could be used as a common > > pattern with efl_part() but it has the downside of overexposing internal > > features. > > While I agree on the principle (hide internal objects), we must expose all the necessary features in order for externals to be useful. This includes more than just generic parameters, as we might want access to events for instance. Also all parameters would need to be auto-generated, which is not the case right now. -- Jean-Philippe André -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] [EGIT] [core/efl] master 01/04: Efl text: add Font, Format and Style interfaces
On Mon, 29 May 2017 13:16:31 +0900 Jean-Philippe Andrésaid: > On 29 May 2017 at 05:18, Davide Andreoli wrote: > > > 2017-05-28 15:00 GMT+02:00 Daniel Hirt : > > > herdsman pushed a commit to branch master. > > > > > > http://git.enlightenment.org/core/efl.git/commit/?id= > > da2ef30f2b4d53aa3c1658b83c8c8381743469a0 > > > > > > commit da2ef30f2b4d53aa3c1658b83c8c8381743469a0 > > > Author: Daniel Hirt > > > Date: Mon May 22 17:36:41 2017 +0300 > > > > > > Efl text: add Font, Format and Style interfaces > > > > > > The following text interfaces are added: > > > - Efl.Text.Font: font settings that decide which font to display in > > > the text > > > - Efl.Text.Format: formatting that affects the looks and layout of > > > the text > > > - Efl.Text.Style: decorations and overlays that shouldn't affect > > the > > > font choice or the layout > > > > > > @feature > > > > I think we have another namespacing issue here: > > Efl.Text.Style do not use any namespace, while Efl.Text.Font and Format do, > > > > We discussed this already in chat today and we did not find a successfull > > deal, > > what I think at this point is that we really should find a rule to > > apply to every Iface, > > ...the problem is that we did not find any always-correct rule :( > > > > In short, as I didn't follow that conversation, what were the arguments > against namespacing "style"? > > I also wonder if having 9 color functions is really better than a single > color function and an enum: color1, color2, color3, shadow, underline, > etc...? just like with parts... we debated if we should be passing those part name strings to everything... and came up with efl_part to solve the problem more nicely... in future at least we could use efl_part for this kind of thing... but there is talk of doing a specific style concept in eo like https://phab.enlightenment.org/T5307 so i guess it's a question of where it would belong or if there would be part name conflicts etc. > Also, what objects will implement the below interfaces? I expect > Efl.Canvas.Text for the default style, and some kind of text item object? > > ideas? > > > > > > PS: I stripped down the commit below to only show the new eo interfaces, > > so that > > the issue is more evident > > > > > > > > > +interface Efl.Text.Font { > > > + [[Font settings of the text > > > + > > > + @since 1.20 > > > + ]] > > > + methods { > > > + @property font { > > > + [[The font name and size that is used for the displayed text]] > > > + values { > > > +font: string; > > > +size: int; > > > + } > > > + } > > > + @property font_source { > > > + [[The source that will be used to lookup the font of the text > > > + > > > + The source can be either a path to a font file e.g. > > > + "/path/to/font.ttf", or an eet file e.g. "/path/to/font.eet". > > > + ]] > > > + values { > > > +font_source: string; > > > + } > > > + } > > > + > > > + @property font_fallbacks { > > > + [[Comma-separated list of font fallbacks > > > + > > > + Will be used in case the primary font isn't available. > > > + ]] > > > + values { > > > +font_fallbacks: string; > > > + } > > > + } > > > + > > > + @property font_weight { > > > + [[Type of weight of the displayed font > > > + > > > + Default is $Efl.Text.Font.Weight.normal\. > > > + ]] > > > + values { > > > +font_weight: Efl.Text.Font.Weight; > > > + } > > > + } > > > + > > > + @property font_slant { > > > + [[Type of slant of the displayed font > > > + > > > + Default is $Efl.Text.Font.Slant.normal\. > > > + ]] > > > + values { > > > +style: Efl.Text.Font.Slant; > > > + } > > > + } > > > + > > > + @property font_width { > > > + [[Type of width of the displayed font > > > + > > > + Default is $Efl.Text.Font.Width.normal\. > > > + ]] > > > + values { > > > +width: Efl.Text.Font.Width; > > > + } > > > + } > > > + > > > + @property font_lang { > > > + [[Specific language of the displayed font > > > + > > > + This is used to lookup fonts suitable to the specified > > language, as > > > + well as helping the font shaper backend. > > > + The language $lang can be either a code e.g "en_US", > > > + "auto" to use the system locale, or "none". > > > + ]] > > > + values { > > > +lang: string; > > > + } > > > + } > > > + } > > > +} > > > > > > > +interface Efl.Text.Format { > > > + [[The look and layout of the text > > > + > > > + The text format can affect the
Re: [E-devel] efl_part and composition
On Tue, 30 May 2017 17:33:22 +0900 Jean-Philippe Andrésaid: > Hello, > > I have a bit of a technical question here. You may want to skip this if > you're not familiar with efl_part and efl_composite_attach. > > > I'm currently working on T5315 also known as "Refactoring Edje/Elm_Layout". > The goal is to provide a uniform, simple API for both edje and elm_layout > objects. > > Yesterday I've worked on EO API for EXTERNAL parts. Those parts are similar > to swallows except that they are filled in automatically with widgets such > as "elm/button" or "elm/slider". As a consequence, each EXTERNAL will > support a certain, unknown, set of APIs. > > There is a "param_set" API that allows setting specific parameters on those > externals, such as "label" which is the text of a button. But those APIs > (currently) don't cover all the APIs supported by a widget, and anyway are > limited to int/bool/double/string values (eina_value in a more general > case). > > So a solution to exposing as much functionality as possible is to expose > the internal widget directly. This is > edje_object_part_external_object_get(). > > > All "part" APIs in Edje.Object are meant to be implemented with efl_part(). > > > Going forward with EO API I see 3 solutions: > #1. Do not expose the widget at all, hope that someday we can expose all > useful features through generic parameter API. or keep external usage minimal and limited where this property api is enough. > #2. Expose the internal widget directly (i.e. > edje_object_part_external_object_get > () or efl_content_get()) i dislike this in the general sense. for a swallow where code directly placed and object in that swallow - getting it back ... fine. yes. anything else i think is leaking internals... :( > #3. Expose the widget API through composition, but not the widget itself. while this makes sense... i dislike it too because like #2... exposing... :( > Point #3 requires explanation: > efl_part(edje, "partname") returns a temporary object of a subtype of class > Efl.Canvas.Layout.Part. This object is meant to be used for a single > function call. But in this case, we can compose it with the real widget > with efl_composite_attach(). Then all the functions of the widget are > available on the part handle, except Efl.Object base functions (eg. wref, > data, events, etc...) > > > Right now I've implementewd both #2 and #3. I'm kind of happy with both, > but would like your opinions. In particular, #3 could be used as a common > pattern with efl_part() but it has the downside of overexposing internal > features. > > > Thanks in advance! > > -- > Jean-Philippe André > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] efl_part and composition
Hi Dave, Cedric, On 31 May 2017 at 05:36, Cedric BAILwrote: > On Tue, May 30, 2017 at 12:18 PM, Davide Andreoli > wrote: > > 2017-05-30 10:33 GMT+02:00 Jean-Philippe André : > >> I have a bit of a technical question here. You may want to skip this if > >> you're not familiar with efl_part and efl_composite_attach. > >> > >> > >> I'm currently working on T5315 also known as "Refactoring > Edje/Elm_Layout". > >> The goal is to provide a uniform, simple API for both edje and > elm_layout > >> objects. > >> > >> Yesterday I've worked on EO API for EXTERNAL parts. Those parts are > similar > >> to swallows except that they are filled in automatically with widgets > such > >> as "elm/button" or "elm/slider". As a consequence, each EXTERNAL will > >> support a certain, unknown, set of APIs. > >> > >> There is a "param_set" API that allows setting specific parameters on > those > >> externals, such as "label" which is the text of a button. But those APIs > >> (currently) don't cover all the APIs supported by a widget, and anyway > are > >> limited to int/bool/double/string values (eina_value in a more general > >> case). > > > > IMO param_set should not be exposed in our public API, we already > > have the api of the widget itself, I really cannot see why there should > be > > another different way to change a property of a widget... > > > > I think param_set is there just to be used internally by edje (and maybe > > by the externals implementation) to let the param_set in edc files works. > > Actually that is a good point. param_set should be only used > internally by edje itself, not exposed. I guess this also make your > case for #2 a better solution. > Yes, this is a very good point. Why did I overlook this? I'll remove the extra code and unnecessary complexity I've added. As for #2 I believe it is quite necessary indeed. Despite all our efforts to avoid exposing internal widgets, in this case I can't see how to work around it :) #3 could be seen as a convenience, I'm not sure we have to remove it unless having 2 ways to do the same thing is too confusing or if composing hurts performance too much (during creation of the efl_part handle). Thanks again! -- Jean-Philippe André -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] eolian c++ build break...
so i wake up to this awesome bit of fun: In file included from bin/eolian_cxx/eolian_cxx.cc:25:0: ../src/lib/eolian_cxx/grammar/klass_def.hpp: In member function ‘void efl::eolian::grammar::attributes::type_def::set(const Eolian_Type*)’: ../src/lib/eolian_cxx/grammar/klass_def.hpp:267:72: error: cannot convert ‘const Eolian_Type* {aka const _Eolian_Type*}’ to ‘const Eolian_Unit* {aka const _Eolian_Unit*}’ for argument ‘1’ to ‘const Eolian_Class* eolian_type_class_get(const Eolian_Unit*, const Eolian_Type*)’ Eolian_Class const* klass = eolian_type_class_get(eolian_type); ^ In file included from bin/eolian_cxx/eolian_cxx.cc:20:0: ../src/lib/eolian/Eolian.h:106:16: note: class type ‘const Eolian_Type {aka const _Eolian_Type}’ is incomplete typedef struct _Eolian_Type Eolian_Type; ^~~~ In file included from bin/eolian_cxx/eolian_cxx.cc:25:0: ../src/lib/eolian_cxx/grammar/klass_def.hpp: In lambda function: ../src/lib/eolian_cxx/grammar/klass_def.hpp:675:89: error: cannot convert ‘efl::eina::iterator::value_type* {aka const char*}’ to ‘const Eolian_Unit* {aka const _Eolian_Unit*}’ for argument ‘1’ to ‘const Eolian_Class* eolian_class_get_by_name(const Eolian_Unit*, const char*)’ Eolian_Class const* inherit = ::eolian_class_get_by_name(&*inherit_iterator); ^ ../src/lib/eolian_cxx/grammar/klass_def.hpp: In function ‘const Eolian_Class* efl::eolian::grammar::attributes::get_klass(const efl::eolian::grammar::attributes::klass_name&)’: ../src/lib/eolian_cxx/grammar/klass_def.hpp:723:57: error: cannot convert ‘const char*’ to ‘const Eolian_Unit* {aka const _Eolian_Unit*}’ for argument ‘1’ to const Eolian_Class* eolian_class_get_by_name(const Eolian_Unit*, const char*)’ return ::eolian_class_get_by_name(klass_name.c_str()); ^ bin/eolian_cxx/eolian_cxx.cc: In lambda function: bin/eolian_cxx/eolian_cxx.cc:119:87: error: cannot convert ‘efl::eina::iterator::value_type* {aka const char*}’ to ‘const Eolian_Unit* {aka const _Eolian_Unit*}’ for argument ‘1’ to ‘const Eolian_Class* eolian_class_get_by_name(const Eolian_Unit*, const char*)’ Eolian_Class const* inherit = ::eolian_class_get_by_name(&*inherit_iterator); ^ bin/eolian_cxx/eolian_cxx.cc: In function ‘void eolian_cxx::run(const eolian_cxx::options_type&)’: bin/eolian_cxx/eolian_cxx.cc:215:47: error: cannot convert ‘char*’ to ‘const Eolian_Unit* {aka const _Eolian_Unit*}’ for argument ‘1’ to ‘const Eolian_Class* eolian_class_get_by_file(const Eolian_Unit*, const char*)’ klass = ::eolian_class_get_by_file(base); ^ bin/eolian_cxx/eolian_cxx.cc:247:71: error: cannot convert ‘char*’ to ‘const Eolian_Unit* {aka const _Eolian_Unit*}’ for argument ‘1’ to ‘const Eolian_Class* eolian_class_get_by_file(const Eolian_Unit*, const char*)’ Eolian_Class const* klass = ::eolian_class_get_by_file(base); ^ -- - Codito, ergo sum - "I code, therefore I am" -- The Rasterman (Carsten Haitzler)ras...@rasterman.com -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [apps/terminology] master 02/02: termptyesc: correctly handle DECOM
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=816f60369f0910ce3b3bb7079994a386b535258d commit 816f60369f0910ce3b3bb7079994a386b535258d Author: Boris FaureDate: Wed May 31 00:39:02 2017 +0200 termptyesc: correctly handle DECOM also fix regions with only one argument --- src/bin/termpty.h| 2 +- src/bin/termptyesc.c | 34 +- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/bin/termpty.h b/src/bin/termpty.h index 5ca0193..14f5873 100644 --- a/src/bin/termpty.h +++ b/src/bin/termpty.h @@ -136,7 +136,7 @@ struct _Termpty unsigned char chset[4]; int top_margin, bottom_margin; int had_cr_x, had_cr_y; -int margin_top; // soon, more to come... +unsigned int restrict_cursor : 1; unsigned int multibyte : 1; unsigned int alt_kp : 1; unsigned int insert : 1; diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index 602c294..691902d 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -254,15 +254,19 @@ _handle_esc_csi_reset_mode(Termpty *ty, Eina_Unicode cc, Eina_Unicode *b) ty->termstate.reverse = mode; break; case 6: +/* DECOM */ if (mode) { - ty->termstate.margin_top = ty->cursor_state.cy; + /* set, within margins */ + ty->termstate.restrict_cursor = 1; ty->cursor_state.cx = 0; + ty->cursor_state.cy = ty->termstate.top_margin; } else { + ty->termstate.restrict_cursor = 0; ty->cursor_state.cx = 0; - ty->termstate.margin_top = 0; + ty->cursor_state.cy = 0; } DBG("origin mode (%d): cursor is at 0,0" " cursor limited to screen/start point" @@ -782,14 +786,19 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, ty->w); } break; - case 'A': // cursor up N - case 'e': // cursor up N + case 'A': // cursor up N CUU + case 'e': // cursor up N, VPR arg = _csi_arg_get(); if (arg < 1) arg = 1; DBG("cursor up %d", arg); ty->termstate.wrapnext = 0; ty->cursor_state.cy = MAX(0, ty->cursor_state.cy - arg); TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h); +if (ty->termstate.restrict_cursor && (ty->termstate.top_margin != 0) +&& (ty->cursor_state.cy < ty->termstate.top_margin)) + { + ty->cursor_state.cy = ty->termstate.top_margin; + } break; case 'B': // cursor down N arg = _csi_arg_get(); @@ -798,6 +807,11 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) ty->termstate.wrapnext = 0; ty->cursor_state.cy = MIN(ty->h - 1, ty->cursor_state.cy + arg); TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h); +if (ty->termstate.restrict_cursor && (ty->termstate.bottom_margin != 0) +&& (ty->cursor_state.cy > ty->termstate.bottom_margin)) + { + ty->cursor_state.cy = ty->termstate.bottom_margin; + } break; case 'D': // cursor left N arg = _csi_arg_get(); @@ -834,7 +848,6 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) if (b) { ty->cursor_state.cy = arg; - TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h); arg = _csi_arg_get(); if (arg < 1) arg = 1; arg--; @@ -845,10 +858,10 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) if (b) { ty->cursor_state.cx = arg; - TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, ty->w); } } -ty->cursor_state.cy += ty->termstate.margin_top; +TERMPTY_RESTRICT_FIELD(ty->cursor_state.cx, 0, ty->w); +ty->cursor_state.cy += ty->termstate.top_margin; TERMPTY_RESTRICT_FIELD(ty->cursor_state.cy, 0, ty->h); break; case 'G': // to column N @@ -1061,8 +1074,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) arg2 = _csi_arg_get(); if (!b) { - WRN("failed to give 2 regions args reset region"); - ty->termstate.top_margin
[EGIT] [apps/terminology] master 01/02: s/scroll_y1/top_margin/, s/scroll_y2/bottom_margin/
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=6ce96da8c4561ee9a9b74d6beed152e65af544a5 commit 6ce96da8c4561ee9a9b74d6beed152e65af544a5 Author: Boris FaureDate: Mon May 29 23:26:32 2017 +0200 s/scroll_y1/top_margin/, s/scroll_y2/bottom_margin/ --- src/bin/termpty.h| 2 +- src/bin/termptyesc.c | 38 +++--- src/bin/termptyops.c | 22 +++--- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/bin/termpty.h b/src/bin/termpty.h index c6d93d3..5ca0193 100644 --- a/src/bin/termpty.h +++ b/src/bin/termpty.h @@ -134,7 +134,7 @@ struct _Termpty unsigned char charset; unsigned char charsetch; unsigned char chset[4]; -int scroll_y1, scroll_y2; +int top_margin, bottom_margin; int had_cr_x, had_cr_y; int margin_top; // soon, more to come... unsigned int multibyte : 1; diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index b47f8bc..602c294 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -913,18 +913,18 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) { int sy1, sy2; - sy1 = ty->termstate.scroll_y1; - sy2 = ty->termstate.scroll_y2; - if (ty->termstate.scroll_y2 == 0) + sy1 = ty->termstate.top_margin; + sy2 = ty->termstate.bottom_margin; + if (ty->termstate.bottom_margin == 0) { - ty->termstate.scroll_y1 = ty->cursor_state.cy; - ty->termstate.scroll_y2 = ty->h; + ty->termstate.top_margin = ty->cursor_state.cy; + ty->termstate.bottom_margin = ty->h; } else { - ty->termstate.scroll_y1 = ty->cursor_state.cy; - if (ty->termstate.scroll_y2 <= ty->termstate.scroll_y1) -ty->termstate.scroll_y2 = ty->termstate.scroll_y1 + 1; + ty->termstate.top_margin = ty->cursor_state.cy; + if (ty->termstate.bottom_margin <= ty->termstate.top_margin) +ty->termstate.bottom_margin = ty->termstate.top_margin + 1; } for (i = 0; i < arg; i++) { @@ -933,8 +933,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) else termpty_text_scroll_rev(ty, EINA_TRUE); } - ty->termstate.scroll_y1 = sy1; - ty->termstate.scroll_y2 = sy2; + ty->termstate.top_margin = sy1; + ty->termstate.bottom_margin = sy2; } break; case 'P': // erase and scrollback N chars @@ -1051,8 +1051,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) if (!b) { WRN("no region args reset region"); - ty->termstate.scroll_y1 = 0; - ty->termstate.scroll_y2 = 0; + ty->termstate.top_margin = 0; + ty->termstate.bottom_margin = 0; } else { @@ -1062,26 +1062,26 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) if (!b) { WRN("failed to give 2 regions args reset region"); - ty->termstate.scroll_y1 = 0; - ty->termstate.scroll_y2 = 0; + ty->termstate.top_margin = 0; + ty->termstate.bottom_margin = 0; } else { if (arg > arg2) { DBG("scroll region beginning > end [%i %i]", arg, arg2); - ty->termstate.scroll_y1 = 0; - ty->termstate.scroll_y2 = 0; + ty->termstate.top_margin = 0; + ty->termstate.bottom_margin = 0; } else { DBG("2 regions args: %i %i", arg, arg2); TERMPTY_RESTRICT_FIELD(arg, 1, ty->h); TERMPTY_RESTRICT_FIELD(arg2, 1, ty->h+1); - ty->termstate.scroll_y1 = arg - 1; - ty->termstate.scroll_y2 = arg2; + ty->termstate.top_margin = arg - 1; + ty->termstate.bottom_margin = arg2; if ((arg == 1) && (arg2 == ty->h)) - ty->termstate.scroll_y2 = 0; + ty->termstate.bottom_margin = 0; } } } diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index 698efbb..4edc0c7 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -38,10 +38,10 @@
[EGIT] [tools/edi] master 01/01: exe: add a helper for exe waiting
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=7f3968298058b7d298a0ac7fdc365d559192fe27 commit 7f3968298058b7d298a0ac7fdc365d559192fe27 Author: Andy WilliamsDate: Tue May 30 23:30:39 2017 +0100 exe: add a helper for exe waiting --- src/lib/Edi.h| 1 + src/lib/Makefile.am | 2 ++ src/lib/edi.c| 4 src/lib/edi_exe.c| 33 + src/lib/edi_exe.h| 41 + src/tests/Makefile.am| 1 + src/tests/edi_suite.c| 3 ++- src/tests/edi_suite.h| 1 + src/tests/edi_test_exe.c | 22 ++ 9 files changed, 107 insertions(+), 1 deletion(-) diff --git a/src/lib/Edi.h b/src/lib/Edi.h index 4dd956b..04772a7 100644 --- a/src/lib/Edi.h +++ b/src/lib/Edi.h @@ -37,6 +37,7 @@ extern "C" { #include #include #include +#include /** * @file diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index b3e142a..a4a011c 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -16,6 +16,7 @@ edi_build_provider.h \ edi_builder.h \ edi_create.h \ edi_path.h \ +edi_exe.h \ Edi.h includesdir = $(includedir)/edi-@VMAJ@ @@ -28,6 +29,7 @@ edi_build_provider.c \ edi_builder.c \ edi_create.c \ edi_path.c \ +edi_exe.c \ edi.c libedi_la_LIBADD = @EFL_LIBS@ -lm libedi_la_LDFLAGS = -no-undefined @EFL_LTLIBRARY_FLAGS@ diff --git a/src/lib/edi.c b/src/lib/edi.c index 0573262..47a0171 100644 --- a/src/lib/edi.c +++ b/src/lib/edi.c @@ -7,6 +7,8 @@ #include #include +#include +#include #include #include "Edi.h" @@ -24,6 +26,7 @@ edi_init(void) if (_edi_init > 1) return _edi_init; eina_init(); + ecore_init(); _edi_lib_log_dom = eina_log_domain_register("edi-lib", EINA_COLOR_CYAN); if (_edi_lib_log_dom < 0) @@ -40,6 +43,7 @@ edi_init(void) return _edi_init; shutdown_eina: + ecore_shutdown(); eina_shutdown(); _edi_init--; diff --git a/src/lib/edi_exe.c b/src/lib/edi_exe.c new file mode 100644 index 000..2866500 --- /dev/null +++ b/src/lib/edi_exe.c @@ -0,0 +1,33 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include + +#include "Edi.h" +#include "edi_private.h" + +EAPI int +edi_exe_wait(const char *command) +{ + pid_t pid; + Ecore_Exe *exe; + int exit; + + ecore_thread_main_loop_begin(); + exe = ecore_exe_pipe_run(command, ECORE_EXE_USE_SH | +ECORE_EXE_PIPE_WRITE, NULL); + pid = ecore_exe_pid_get(exe); + ecore_thread_main_loop_end(); + + waitpid(pid, , 0); + + ecore_thread_main_loop_begin(); + ecore_exe_free(exe); + ecore_thread_main_loop_end(); + + return exit; +} + diff --git a/src/lib/edi_exe.h b/src/lib/edi_exe.h new file mode 100644 index 000..ae0bbe4 --- /dev/null +++ b/src/lib/edi_exe.h @@ -0,0 +1,41 @@ +#ifndef EDI_EXE_H_ +# define EDI_EXE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file + * @brief These routines are used for Edi executable management. + */ + +/** + * @brief Executable helpers + * @defgroup Exe + * + * @{ + * + * Functions of executable management. + * + */ + +/** + * Run an executable command and wait for it to return. + * + * @param command The command to execute in a child process. + * @return The return code of the executable. + * + * @ingroup Exe + */ +EAPI int edi_exe_wait(const char *command); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* EDI_EXE_H_ */ diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 19c2ab1..23aefb8 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -9,6 +9,7 @@ clang_include = '$(CLANG_INCLUDE)' edi_suite_SOURCES = \ edi_test_path.c \ +edi_test_exe.c \ edi_test_content_provider.c \ edi_test_language_provider.c \ edi_test_language_provider_c.c \ diff --git a/src/tests/edi_suite.c b/src/tests/edi_suite.c index 0caa1be..118f590 100644 --- a/src/tests/edi_suite.c +++ b/src/tests/edi_suite.c @@ -7,7 +7,7 @@ #include "Edi.h" #include "edi_suite.h" -#define COPYRIGHT "Copyright © 2014 Andy Williams and various contributors (see AUTHORS)." +#define COPYRIGHT "Copyright © 2014-2017 Andy Williams and various contributors (see AUTHORS)." static const struct { const char *name; @@ -15,6 +15,7 @@ static const struct { } tests[] = { { "basic", edi_test_basic }, { "path", edi_test_path }, + { "exe", edi_test_exe }, { "content_provider", edi_test_content_provider }, { "language_provider", edi_test_language_provider }, { "language_provider_c", edi_test_language_provider_c } diff --git a/src/tests/edi_suite.h b/src/tests/edi_suite.h index 22e70da..3b235d7 100644 --- a/src/tests/edi_suite.h +++ b/src/tests/edi_suite.h @@ -8,6 +8,7 @@ void edi_test_basic(TCase *tc); void edi_test_console(TCase *tc); void edi_test_path(TCase *tc); +void edi_test_exe(TCase *tc); void
[EGIT] [core/efl] master 01/01: edje: temporary build fix.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=665856027d85802a29ede6f005674a8294df60fe commit 665856027d85802a29ede6f005674a8294df60fe Author: Cedric BAILDate: Tue May 30 14:03:31 2017 -0700 edje: temporary build fix. Currently Edje_Eo.h does use all the internal eo file for part. This should be fixed soon, but in the mean time we need a usable tree. --- src/Makefile_Edje.am | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index 47ae3739c2..d691162a6c 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -33,9 +33,10 @@ BUILT_SOURCES += \ edjeeolianfilesdir = $(datadir)/eolian/include/edje-@VMAJ@ edjeeolianfiles_DATA = \ $(edje_eolian_files) \ - $(edje_eolian_type_files) + $(edje_eolian_type_files) \ + $(edje_eolian_priv_files) -noinst_DATA += $(edje_eolian_priv_c) $(edje_eolian_priv_h) +noinst_DATA += $(edje_eolian_priv_c) # $(edje_eolian_priv_h) EXTRA_DIST2 += ${edjeeolianfiles_DATA} \ $(edje_eolian_priv_files) @@ -63,7 +64,8 @@ lib/edje/Edje_Legacy.h \ lib/edje/Edje_Edit.h nodist_installed_edjemainheaders_DATA = \ -$(edje_eolian_h) +$(edje_eolian_h) \ + $(edje_eolian_priv_h) lib_edje_libedje_la_SOURCES = \ lib/edje/edje_private.h \ --
Re: [E-devel] efl_part and composition
On Tue, May 30, 2017 at 12:18 PM, Davide Andreoliwrote: > 2017-05-30 10:33 GMT+02:00 Jean-Philippe André : >> I have a bit of a technical question here. You may want to skip this if >> you're not familiar with efl_part and efl_composite_attach. >> >> >> I'm currently working on T5315 also known as "Refactoring Edje/Elm_Layout". >> The goal is to provide a uniform, simple API for both edje and elm_layout >> objects. >> >> Yesterday I've worked on EO API for EXTERNAL parts. Those parts are similar >> to swallows except that they are filled in automatically with widgets such >> as "elm/button" or "elm/slider". As a consequence, each EXTERNAL will >> support a certain, unknown, set of APIs. >> >> There is a "param_set" API that allows setting specific parameters on those >> externals, such as "label" which is the text of a button. But those APIs >> (currently) don't cover all the APIs supported by a widget, and anyway are >> limited to int/bool/double/string values (eina_value in a more general >> case). > > IMO param_set should not be exposed in our public API, we already > have the api of the widget itself, I really cannot see why there should be > another different way to change a property of a widget... > > I think param_set is there just to be used internally by edje (and maybe > by the externals implementation) to let the param_set in edc files works. Actually that is a good point. param_set should be only used internally by edje itself, not exposed. I guess this also make your case for #2 a better solution. Cedric -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] efl_part and composition
Hello, On Tue, May 30, 2017 at 1:33 AM, Jean-Philippe Andréwrote: > Going forward with EO API I see 3 solutions: > #1. Do not expose the widget at all, hope that someday we can expose all > useful features through generic parameter API. That would not work for function, just property, which would make this rather limited. > #2. Expose the internal widget directly (i.e. > edje_object_part_external_object_get > () or efl_content_get()) > #3. Expose the widget API through composition, but not the widget itself. I have my preference for #3 as I prefer hidding internal better. Still I have a concern, as for binding, the only way to use this guys is by doing a dynamic cast. So would efl_ui_something_do(efl_cast(efl_part(obj, "da_button"))) work ? > Right now I've implementewd both #2 and #3. I'm kind of happy with both, > but would like your opinions. In particular, #3 could be used as a common > pattern with efl_part() but it has the downside of overexposing internal > features. In this case it is kind of ok as the theme is doing it on purpose, but it may be an issue, especially between external for legacy component and efl based one. Basically this API should only work for new eo based efl.ui object, not the old legacy one... and obviously the old legacy object should still continue to work with all the existing shortcut. -- Cedric BAIL -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/02: ecore-drm2: Minor formatting fix
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f2a0e5ae4cc1c946eb83fe6b9fe9b702f3ef1acf commit f2a0e5ae4cc1c946eb83fe6b9fe9b702f3ef1acf Author: Chris MichaelDate: Tue May 30 15:56:51 2017 -0400 ecore-drm2: Minor formatting fix NB: No functional changes Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_plane.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c index a75173bcfc..323cc9d0cf 100644 --- a/src/lib/ecore_drm2/ecore_drm2_plane.c +++ b/src/lib/ecore_drm2/ecore_drm2_plane.c @@ -133,8 +133,9 @@ ecore_drm2_plane_release(Ecore_Drm2_Plane *plane) EINA_SAFETY_ON_NULL_RETURN(plane); EINA_SAFETY_ON_TRUE_RETURN(plane->dead); - plane->output->fbs = eina_list_append(plane->output->fbs, - plane->state->fb); + plane->output->fbs = + eina_list_append(plane->output->fbs, plane->state->fb); + plane->dead = EINA_TRUE; plane->state->fb = NULL; plane->state->in_use = EINA_FALSE; @@ -169,8 +170,10 @@ ecore_drm2_plane_fb_set(Ecore_Drm2_Plane *plane, Ecore_Drm2_Fb *fb) if (_fb_atomic_flip_test(plane->output)) { _ecore_drm2_fb_ref(fb); -plane->output->fbs = eina_list_append(plane->output->fbs, - plane->state->fb); + +plane->output->fbs = + eina_list_append(plane->output->fbs, plane->state->fb); + plane->state->fb = fb; return EINA_TRUE; } --
[EGIT] [core/efl] master 02/02: ecore-drm2: Don't free output plane states if not using atomic
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=dc3da871396015507801724b7b844e5865f049d0 commit dc3da871396015507801724b7b844e5865f049d0 Author: Chris MichaelDate: Tue May 30 15:57:07 2017 -0400 ecore-drm2: Don't free output plane states if not using atomic If atomic support is not enabled (kernel or env var), then we will not be filling output plane_states, so no need to free them (if non-atomic). @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 3173165aa5..60e4f8e7d8 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -923,14 +923,14 @@ _output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output) } #endif - EINA_LIST_FREE(output->plane_states, pstate) - free(pstate); - - EINA_LIST_FREE(output->planes, plane) - free(plane); - if (_ecore_drm2_use_atomic) { +EINA_LIST_FREE(output->plane_states, pstate) + free(pstate); + +EINA_LIST_FREE(output->planes, plane) + free(plane); + free(output->conn_state); free(output->crtc_state); } --
Re: [E-devel] [EGIT] [core/efl] master 01/04: Efl text: add Font, Format and Style interfaces
2017-05-29 7:07 GMT+02:00 Daniel Hirt: > Hello, > > On Mon, May 29, 2017 at 7:16 AM, Jean-Philippe André > wrote: > >> On 29 May 2017 at 05:18, Davide Andreoli wrote: >> >> > 2017-05-28 15:00 GMT+02:00 Daniel Hirt : >> > > herdsman pushed a commit to branch master. >> > > >> > > http://git.enlightenment.org/core/efl.git/commit/?id= >> > da2ef30f2b4d53aa3c1658b83c8c8381743469a0 >> > > >> > > commit da2ef30f2b4d53aa3c1658b83c8c8381743469a0 >> > > Author: Daniel Hirt >> > > Date: Mon May 22 17:36:41 2017 +0300 >> > > >> > > Efl text: add Font, Format and Style interfaces >> > > >> > > The following text interfaces are added: >> > > - Efl.Text.Font: font settings that decide which font to display >> in >> > > the text >> > > - Efl.Text.Format: formatting that affects the looks and layout >> of >> > > the text >> > > - Efl.Text.Style: decorations and overlays that shouldn't affect >> > the >> > > font choice or the layout >> > > >> > > @feature >> > >> > I think we have another namespacing issue here: >> > Efl.Text.Style do not use any namespace, while Efl.Text.Font and Format >> do, >> > >> > We discussed this already in chat today and we did not find a successfull >> > deal, >> > what I think at this point is that we really should find a rule to >> > apply to every Iface, >> > ...the problem is that we did not find any always-correct rule :( >> > >> >> In short, as I didn't follow that conversation, what were the arguments >> against namespacing "style"? >> >> > As I understand, it's not only about preventing clashes. Widgets are complex > objects, and having your widget doing: > widget.style_normal_color_set(...) > isn't really better for the user. A better choice might be: > widget.text_style_normal_color_set(...) In real a more better name is "widget.text_normal_color_set(...)" the "style" prefix seems to me unneeded. This let me rise another question: do we really need this 3 interfaces to be splitted as they are? Isn't better to just provide a single "Efl.Text" iface ?? Or I miss a use case where an object would need just 1 or 2 of them? If they can be merged we will simplify the problem and shortening function names. > > A pretty good example from Davide was a combobox with the text widget > in it. There's no guarantee how your object is going to be used in the > future > and how fine the naming of your methods should be, due to unique styles > of inheritance like "composition", which is gaining popularity it seems. > > For common inheritance this is less likely to be a problem. > > >> I also wonder if having 9 color functions is really better than a single >> color function and an enum: color1, color2, color3, shadow, underline, >> etc...? >> >> > I wanted to avoid the enum mess. There's not a single pro I could think of > other than saving ME writing a few extra functions. > > >> Also, what objects will implement the below interfaces? I expect >> Efl.Canvas.Text for the default style, and some kind of text item object? >> >> > Efl.Ui.Text is a composite object, with Efl.Canvas.Text. We still needed the > text API to be exposed this in the documentation of Efl.Ui.Text, so users > know that they can manipulate the text object in this widget. > > >> ideas? >> > >> > >> > PS: I stripped down the commit below to only show the new eo interfaces, >> > so that >> > the issue is more evident >> > >> > >> > >> > > +interface Efl.Text.Font { >> > > + [[Font settings of the text >> > > + >> > > + @since 1.20 >> > > + ]] >> > > + methods { >> > > + @property font { >> > > + [[The font name and size that is used for the displayed >> text]] >> > > + values { >> > > +font: string; >> > > +size: int; >> > > + } >> > > + } >> > > + @property font_source { >> > > + [[The source that will be used to lookup the font of the text >> > > + >> > > + The source can be either a path to a font file e.g. >> > > + "/path/to/font.ttf", or an eet file e.g. >> "/path/to/font.eet". >> > > + ]] >> > > + values { >> > > +font_source: string; >> > > + } >> > > + } >> > > + >> > > + @property font_fallbacks { >> > > + [[Comma-separated list of font fallbacks >> > > + >> > > + Will be used in case the primary font isn't available. >> > > + ]] >> > > + values { >> > > +font_fallbacks: string; >> > > + } >> > > + } >> > > + >> > > + @property font_weight { >> > > + [[Type of weight of the displayed font >> > > + >> > > + Default is $Efl.Text.Font.Weight.normal\. >> > > + ]] >> > > + values { >> > > +font_weight: Efl.Text.Font.Weight; >> > > + } >> > > + } >> > > + >> > > + @property font_slant { >> > >
Re: [E-devel] efl_part and composition
2017-05-30 10:33 GMT+02:00 Jean-Philippe André: > Hello, > > I have a bit of a technical question here. You may want to skip this if > you're not familiar with efl_part and efl_composite_attach. > > > I'm currently working on T5315 also known as "Refactoring Edje/Elm_Layout". > The goal is to provide a uniform, simple API for both edje and elm_layout > objects. > > Yesterday I've worked on EO API for EXTERNAL parts. Those parts are similar > to swallows except that they are filled in automatically with widgets such > as "elm/button" or "elm/slider". As a consequence, each EXTERNAL will > support a certain, unknown, set of APIs. > > There is a "param_set" API that allows setting specific parameters on those > externals, such as "label" which is the text of a button. But those APIs > (currently) don't cover all the APIs supported by a widget, and anyway are > limited to int/bool/double/string values (eina_value in a more general > case). IMO param_set should not be exposed in our public API, we already have the api of the widget itself, I really cannot see why there should be another different way to change a property of a widget... I think param_set is there just to be used internally by edje (and maybe by the externals implementation) to let the param_set in edc files works. > > So a solution to exposing as much functionality as possible is to expose > the internal widget directly. This is > edje_object_part_external_object_get(). > > > All "part" APIs in Edje.Object are meant to be implemented with efl_part(). > > > Going forward with EO API I see 3 solutions: > #1. Do not expose the widget at all, hope that someday we can expose all > useful features through generic parameter API. > #2. Expose the internal widget directly (i.e. > edje_object_part_external_object_get > () or efl_content_get()) > #3. Expose the widget API through composition, but not the widget itself. > > > Point #3 requires explanation: > efl_part(edje, "partname") returns a temporary object of a subtype of class > Efl.Canvas.Layout.Part. This object is meant to be used for a single > function call. But in this case, we can compose it with the real widget > with efl_composite_attach(). Then all the functions of the widget are > available on the part handle, except Efl.Object base functions (eg. wref, > data, events, etc...) > > > Right now I've implementewd both #2 and #3. I'm kind of happy with both, > but would like your opinions. In particular, #3 could be used as a common > pattern with efl_part() but it has the downside of overexposing internal > features. > > > Thanks in advance! > > -- > Jean-Philippe André > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] efl_part and composition
2017-05-30 10:33 GMT+02:00 Jean-Philippe André: > Hello, > > I have a bit of a technical question here. You may want to skip this if > you're not familiar with efl_part and efl_composite_attach. > > > I'm currently working on T5315 also known as "Refactoring Edje/Elm_Layout". > The goal is to provide a uniform, simple API for both edje and elm_layout > objects. > > Yesterday I've worked on EO API for EXTERNAL parts. Those parts are similar > to swallows except that they are filled in automatically with widgets such > as "elm/button" or "elm/slider". As a consequence, each EXTERNAL will > support a certain, unknown, set of APIs. > > There is a "param_set" API that allows setting specific parameters on those > externals, such as "label" which is the text of a button. But those APIs > (currently) don't cover all the APIs supported by a widget, and anyway are > limited to int/bool/double/string values (eina_value in a more general > case). > > So a solution to exposing as much functionality as possible is to expose > the internal widget directly. This is > edje_object_part_external_object_get(). > > > All "part" APIs in Edje.Object are meant to be implemented with efl_part(). > > > Going forward with EO API I see 3 solutions: > #1. Do not expose the widget at all, hope that someday we can expose all > useful features through generic parameter API. > #2. Expose the internal widget directly (i.e. > edje_object_part_external_object_get > () or efl_content_get()) > #3. Expose the widget API through composition, but not the widget itself. > First of all: I'm a fan and a big user of the external parts in edje, I use them everywhere I can (fe my mediacenter themes are heavily based on externals). I think externals are a key-feature if you want your application to be really themable: think, for example, at a gui designer app! the designer is able to fully design the GUI in the designer (instead of putting lots of empty swallow, that do not size correctly and therefore make the gui inside the designer app complete different from the final result) Having said that, I'm totally for the solution #2: just provide a single, simple, and clear function that return the real widget, with a clear notice in the docs that say to not use any unwanted function on the returned obj. The #3 seems to me really over-enginered, complex and difficult to learn. So, for the KISS and the OnlyOneClearWayToDoIt principles I vote to keep #2 and wipe #3 > > Point #3 requires explanation: Simply the fact the #3 "require explanation" is a point in favor of the theory that it is too much complex :) > efl_part(edje, "partname") returns a temporary object of a subtype of class > Efl.Canvas.Layout.Part. This object is meant to be used for a single > function call. But in this case, we can compose it with the real widget > with efl_composite_attach(). Then all the functions of the widget are > available on the part handle, except Efl.Object base functions (eg. wref, > data, events, etc...) No data_* and no events in the returned external part is another big fail of #3 and, really, if no events means you cannot attach any events cb to your external part, this option is totally un-usefull: I never used a single widget in my life without attaching an event to it. > > > Right now I've implementewd both #2 and #3. I'm kind of happy with both, > but would like your opinions. In particular, #3 could be used as a common > pattern with efl_part() but it has the downside of overexposing internal > features. > > > Thanks in advance! > > -- > Jean-Philippe André > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/enlightenment] master 01/01: Don't require dmabuf buffers to be writeable
derekf pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=4fca111eb5c607451720ad406c9da57d3ebc26b5 commit 4fca111eb5c607451720ad406c9da57d3ebc26b5 Author: Derek ForemanDate: Fri May 19 16:47:57 2017 -0500 Don't require dmabuf buffers to be writeable Compositor doesn't need to write to this buffer, and most clients won't allocate them in a way that the compositor can. Relax the test criteria. --- src/bin/e_pixmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index a59c696b8..f1c07442a 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -1081,7 +1081,7 @@ e_pixmap_dmabuf_test(struct linux_dmabuf_buffer *dmabuf) /* This is only legit for ARGB */ size = dmabuf->attributes.height * dmabuf->attributes.stride[0]; - data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf->attributes.fd[0], 0); + data = mmap(NULL, size, PROT_READ, MAP_SHARED, dmabuf->attributes.fd[0], 0); if (data == MAP_FAILED) return EINA_FALSE; munmap(data, size); --
[EGIT] [core/efl] master 06/28: eolian: make by-file variable lookups take unit
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cee3b604a304cc2c6c2e27f75b56ac6914fa6aa9 commit cee3b604a304cc2c6c2e27f75b56ac6914fa6aa9 Author: Daniel KolesaDate: Thu May 18 16:33:31 2017 +0200 eolian: make by-file variable lookups take unit --- src/bindings/luajit/eolian.lua| 12 ++-- src/lib/eolian/Eolian.h | 6 -- src/lib/eolian/database_var_api.c | 6 -- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 8177aa5f78..603feaaebe 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -369,8 +369,8 @@ ffi.cdef [[ Eolian_Value_t eolian_expression_value_get(const Eolian_Expression *expr); const Eolian_Variable *eolian_variable_global_get_by_name(const Eolian_Unit *unit, const char *name); const Eolian_Variable *eolian_variable_constant_get_by_name(const Eolian_Unit *unit, const char *name); -Eina_Iterator *eolian_variable_globals_get_by_file(const char *fname); -Eina_Iterator *eolian_variable_constants_get_by_file(const char *fname); +Eina_Iterator *eolian_variable_globals_get_by_file(const Eolian_Unit *unit, const char *fname); +Eina_Iterator *eolian_variable_constants_get_by_file(const Eolian_Unit *unit, const char *fname); Eina_Iterator *eolian_variable_all_constants_get(void); Eina_Iterator *eolian_variable_all_globals_get(void); Eolian_Variable_Type eolian_variable_type_get(const Eolian_Variable *var); @@ -1374,14 +1374,14 @@ M.variable_constant_get_by_name = function(unit, name) return v end -M.variable_globals_get_by_file = function(fname) +M.variable_globals_get_by_file = function(unit, fname) return Ptr_Iterator("const Eolian_Variable*", -eolian.eolian_variable_globals_get_by_file(fname)) +eolian.eolian_variable_globals_get_by_file(unit, fname)) end -M.variable_constants_get_by_file = function(fname) +M.variable_constants_get_by_file = function(unit, fname) return Ptr_Iterator("const Eolian_Variable*", -eolian.eolian_variable_constants_get_by_file(fname)) +eolian.eolian_variable_constants_get_by_file(unit, fname)) end M.variable_all_constants_get = function() diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 08592a8b39..7c5c1f8de6 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -2077,6 +2077,7 @@ EAPI const Eolian_Variable *eolian_variable_constant_get_by_name(const Eolian_Un /* * @brief Get an iterator to all global variables contained in a file. * + * @param[in] unit the unit to look in * @param[in] fname the file name without full path * @return the iterator or NULL * @@ -2084,11 +2085,12 @@ EAPI const Eolian_Variable *eolian_variable_constant_get_by_name(const Eolian_Un * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_variable_globals_get_by_file(const char *fname); +EAPI Eina_Iterator *eolian_variable_globals_get_by_file(const Eolian_Unit *unit, const char *fname); /* * @brief Get an iterator to all constant variables contained in a file. * + * @param[in] unit the unit to look in * @param[in] fname the file name without full path * @return the iterator or NULL * @@ -2096,7 +2098,7 @@ EAPI Eina_Iterator *eolian_variable_globals_get_by_file(const char *fname); * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_variable_constants_get_by_file(const char *fname); +EAPI Eina_Iterator *eolian_variable_constants_get_by_file(const Eolian_Unit *unit, const char *fname); /* * @brief Get an iterator to all constant variables in the Eolian database. diff --git a/src/lib/eolian/database_var_api.c b/src/lib/eolian/database_var_api.c index 4842ec5959..cc93ac6174 100644 --- a/src/lib/eolian/database_var_api.c +++ b/src/lib/eolian/database_var_api.c @@ -28,7 +28,8 @@ eolian_variable_constant_get_by_name(const Eolian_Unit *unit EINA_UNUSED, } EAPI Eina_Iterator * -eolian_variable_globals_get_by_file(const char *fname) +eolian_variable_globals_get_by_file(const Eolian_Unit *unit EINA_UNUSED, +const char *fname) { if (!_globalsf) return NULL; Eina_Stringshare *shr = eina_stringshare_add(fname); @@ -39,7 +40,8 @@ eolian_variable_globals_get_by_file(const char *fname) } EAPI Eina_Iterator * -eolian_variable_constants_get_by_file(const char *fname) +eolian_variable_constants_get_by_file(const Eolian_Unit *unit EINA_UNUSED, + const char *fname) { if (!_constantsf) return NULL; Eina_Stringshare *shr = eina_stringshare_add(fname); --
[EGIT] [core/efl] master 08/28: eolian: pass unit to class get_by_name/file
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=45a73a08789f0f91ea72cf647f55058e6f3d4813 commit 45a73a08789f0f91ea72cf647f55058e6f3d4813 Author: Daniel KolesaDate: Wed May 24 16:36:23 2017 +0200 eolian: pass unit to class get_by_name/file --- src/bin/eolian/docs.c | 69 - src/bin/eolian/docs.h | 6 ++-- src/bin/eolian/headers.c| 21 +-- src/bin/eolian/main.c | 6 ++-- src/bin/eolian/sources.c| 4 +-- src/bin/eolian/types.c | 24 ++--- src/bindings/luajit/eolian.lua | 12 +++ src/lib/eolian/Eolian.h | 6 ++-- src/lib/eolian/database_class_api.c | 6 ++-- src/lib/eolian/database_type_api.c | 3 +- src/lib/eolian/eo_parser.c | 6 ++-- src/lib/eolian/eolian_database.c| 6 ++-- 12 files changed, 92 insertions(+), 77 deletions(-) diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c index 1e89b550f4..842376c59f 100644 --- a/src/bin/eolian/docs.c +++ b/src/bin/eolian/docs.c @@ -19,7 +19,8 @@ _indent_line(Eina_Strbuf *buf, int ind) : DOC_LINE_LIMIT) static void -_generate_ref(const char *refn, Eina_Strbuf *wbuf, Eina_Bool use_legacy) +_generate_ref(const Eolian_Unit *src, const char *refn, Eina_Strbuf *wbuf, + Eina_Bool use_legacy) { const Eolian_Declaration *decl = eolian_declaration_get_by_name(refn); if (decl) @@ -46,7 +47,7 @@ _generate_ref(const char *refn, Eina_Strbuf *wbuf, Eina_Bool use_legacy) eina_stringshare_del(bname); goto noref; } -_generate_ref(bname, wbuf, use_legacy); +_generate_ref(src, bname, wbuf, use_legacy); eina_strbuf_append(wbuf, sfx); eina_stringshare_del(bname); return; @@ -67,7 +68,7 @@ _generate_ref(const char *refn, Eina_Strbuf *wbuf, Eina_Bool use_legacy) return; } - const Eolian_Class *cl = eolian_class_get_by_name(bname); + const Eolian_Class *cl = eolian_class_get_by_name(src, bname); const Eolian_Function *fn = NULL; /* match methods and properties; we're only figuring out existence */ Eolian_Function_Type ftype = EOLIAN_UNRESOLVED; @@ -83,7 +84,7 @@ _generate_ref(const char *refn, Eina_Strbuf *wbuf, Eina_Bool use_legacy) while ((mname != refn) && (*mname != '.')) --mname; if (mname == refn) goto noref; bname = eina_stringshare_add_length(refn, mname - refn); - cl = eolian_class_get_by_name(bname); + cl = eolian_class_get_by_name(src, bname); eina_stringshare_del(bname); } if (cl) @@ -113,8 +114,8 @@ noref: } static int -_append_section(const char *desc, int ind, int curl, Eina_Strbuf *buf, -Eina_Strbuf *wbuf, Eina_Bool use_legacy) +_append_section(const Eolian_Unit *src, const char *desc, int ind, int curl, +Eina_Strbuf *buf, Eina_Strbuf *wbuf, Eina_Bool use_legacy) { Eina_Bool try_note = EINA_TRUE; while (*desc) @@ -165,7 +166,7 @@ _append_section(const char *desc, int ind, int curl, Eina_Strbuf *buf, ++desc; if (*(desc - 1) == '.') --desc; Eina_Stringshare *refn = eina_stringshare_add_length(ref, desc - ref); - _generate_ref(refn, wbuf, use_legacy); + _generate_ref(src, refn, wbuf, use_legacy); eina_stringshare_del(refn); } else @@ -269,8 +270,8 @@ _append_group(Eina_Strbuf *buf, char *sgrp, int indent) } static void -_gen_doc_brief(const char *summary, const char *since, const char *group, - const char *el, int indent, Eina_Strbuf *buf, +_gen_doc_brief(const Eolian_Unit *src, const char *summary, const char *since, + const char *group, const char *el, int indent, Eina_Strbuf *buf, Eina_Bool use_legacy) { int curl = 4 + indent; @@ -279,7 +280,7 @@ _gen_doc_brief(const char *summary, const char *since, const char *group, eina_strbuf_append(buf, "/**< "); else eina_strbuf_append(buf, "/** "); - curl = _append_section(summary, indent, curl, buf, wbuf, use_legacy); + curl = _append_section(src, summary, indent, curl, buf, wbuf, use_legacy); eina_strbuf_free(wbuf); curl = _append_extra(el, indent, curl, EINA_FALSE, buf); curl = _append_since(since, indent, curl, buf); @@ -300,7 +301,8 @@ _gen_doc_brief(const char *summary, const char *since, const char *group, } static void -_gen_doc_full(const char *summary, const char *description, const char *since, +_gen_doc_full(const Eolian_Unit *src, const char *summary, + const char *description, const char *since, const char *group, const char *el, int indent, Eina_Strbuf *buf,
[EGIT] [core/efl] master 23/28: eolian: doc token ref resolver now takes unit
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a5e66b3421ef96c4b16fbd7a4fc57f739e6c52ff commit a5e66b3421ef96c4b16fbd7a4fc57f739e6c52ff Author: Daniel KolesaDate: Fri May 26 15:01:00 2017 +0200 eolian: doc token ref resolver now takes unit --- src/bindings/luajit/eolian.lua | 6 +++--- src/lib/eolian/Eolian.h| 3 ++- src/lib/eolian/database_validate.c | 3 ++- src/lib/eolian/eolian_database.c | 21 + src/tests/eolian/eolian_parsing.c | 4 ++-- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 19c91bdc4e..473a587aec 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -398,7 +398,7 @@ ffi.cdef [[ void eolian_doc_token_init(Eolian_Doc_Token *tok); Eolian_Doc_Token_Type eolian_doc_token_type_get(const Eolian_Doc_Token *tok); char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok); -Eolian_Doc_Ref_Type eolian_doc_token_ref_get(const Eolian_Doc_Token *tok, const void **data, const void **data2); +Eolian_Doc_Ref_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2); ]] local cutil = require("cutil") @@ -1597,9 +1597,9 @@ M.Eolian_Doc_Token = ffi.metatype("Eolian_Doc_Token", { return ret end, -ref_get = function(self) +ref_get = function(self, unit) local stor = ffi.new("const void *[2]") -local tp = tonumber(eolian.eolian_doc_token_ref_get(self, stor, stor + 1)) +local tp = tonumber(eolian.eolian_doc_token_ref_get(unit, self, stor, stor + 1)) local reft = M.doc_ref_type if tp == reft.CLASS then return tp, ffi.cast("const Eolian_Class *", stor[0]) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 13e4770c23..dc8dfc3f9c 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -2431,12 +2431,13 @@ EAPI char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok); * and the second data is the event, when it's a struct field or enum field * the first data is is the struct/enum and the second data is the field. * + * @param[in] unit the unit to look in * @param[in] tok the token * @param[out] data the primary data * @param[out] data2 the secondary data * @return the kind of reference this is */ -EAPI Eolian_Doc_Ref_Type eolian_doc_token_ref_get(const Eolian_Doc_Token *tok, const void **data, const void **data2); +EAPI Eolian_Doc_Ref_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2); #endif diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index f8dac39aa5..1ce5d4e38f 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -21,7 +21,8 @@ _validate_docstr(Eina_Stringshare *str, const Eolian_Object *info) eolian_doc_token_init(); while (ret && (doc = eolian_documentation_tokenize(doc, ))) if (eolian_doc_token_type_get() == EOLIAN_DOC_TOKEN_REF) -if (eolian_doc_token_ref_get(, NULL, NULL) == EOLIAN_DOC_REF_INVALID) +/* FIXME: pass unit properly */ +if (eolian_doc_token_ref_get(NULL, , NULL, NULL) == EOLIAN_DOC_REF_INVALID) { char *refn = eolian_doc_token_text_get(); fprintf(stderr, "eolian:%s:%d:%d: failed validating reference '%s'\n", diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 8b1c1f0bbb..94804334d8 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -456,7 +456,8 @@ eolian_doc_token_text_get(const Eolian_Doc_Token *tok) } static Eolian_Doc_Ref_Type -_resolve_event(char *name, const void **data, const void **data2) +_resolve_event(const Eolian_Unit *src, char *name, const void **data, + const void **data2) { /* never trust the user */ if (name[0] == ',') @@ -467,8 +468,7 @@ _resolve_event(char *name, const void **data, const void **data2) return EOLIAN_DOC_REF_INVALID; *evname++ = '\0'; - /* FIXME: pass unit properly */ - const Eolian_Class *cl = eolian_class_get_by_name(NULL, name); + const Eolian_Class *cl = eolian_class_get_by_name(src, name); if (!cl) return EOLIAN_DOC_REF_INVALID; @@ -482,8 +482,8 @@ _resolve_event(char *name, const void **data, const void **data2) } EAPI Eolian_Doc_Ref_Type -eolian_doc_token_ref_get(const Eolian_Doc_Token *tok, const void **data, - const void **data2) +eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, + const void **data, const void **data2) { if (tok->type != EOLIAN_DOC_TOKEN_REF)
[EGIT] [core/efl] master 14/28: eolian: pass unit to struct get by name
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9c2dae3531d4dc282a735d5f0705a4eb8af6f4bd commit 9c2dae3531d4dc282a735d5f0705a4eb8af6f4bd Author: Daniel KolesaDate: Thu May 25 15:11:08 2017 +0200 eolian: pass unit to struct get by name --- src/bin/eolian/docs.c | 2 +- src/bindings/luajit/eolian.lua | 6 +++--- src/lib/eolian/Eolian.h| 3 ++- src/lib/eolian/database_type_api.c | 3 ++- src/lib/eolian/eolian_database.c | 3 ++- src/tests/eolian/eolian_parsing.c | 24 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c index 842376c59f..d200c7f458 100644 --- a/src/bin/eolian/docs.c +++ b/src/bin/eolian/docs.c @@ -39,7 +39,7 @@ _generate_ref(const Eolian_Unit *src, const char *refn, Eina_Strbuf *wbuf, Eina_Stringshare *bname = eina_stringshare_add_length(refn, sfx - refn); - const Eolian_Typedecl *tp = eolian_typedecl_struct_get_by_name(bname); + const Eolian_Typedecl *tp = eolian_typedecl_struct_get_by_name(src, bname); if (tp) { if (!eolian_typedecl_struct_field_get(tp, sfx + 1)) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index d63210bef4..c1a0fe601d 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -298,7 +298,7 @@ ffi.cdef [[ Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass); const char *eolian_class_c_get_function_name_get(const Eolian_Class *klass); const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const Eolian_Unit *unit, const char *name); -const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const char *name); +const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const Eolian_Unit *unit, const char *name); const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const char *name); Eina_Iterator *eolian_typedecl_aliases_get_by_file(const char *fname); Eina_Iterator *eolian_typedecl_structs_get_by_file(const char *fname); @@ -1148,8 +1148,8 @@ M.typedecl_alias_get_by_name = function(unit, name) return v end -M.typedecl_struct_get_by_name = function(name) -local v = eolian.eolian_typedecl_struct_get_by_name(name) +M.typedecl_struct_get_by_name = function(unit, name) +local v = eolian.eolian_typedecl_struct_get_by_name(unit, name) if v == nil then return nil end return v end diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 7be3182de3..2e29dd9bc4 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1381,12 +1381,13 @@ EAPI const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const Eolian_Unit /* * @brief Get a struct declaration by name. Supports namespaces. * + * @param[in] unit the unit to look in * @param[in] name the name of the struct * @return the struct or NULL * * @ingroup Eolian */ -EAPI const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const char *name); +EAPI const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const Eolian_Unit *unit, const char *name); /* * @brief Get an enum declaration by name. Supports namespaces. diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index 8d9a5d3612..b589cb40aa 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -19,7 +19,8 @@ eolian_typedecl_alias_get_by_name(const Eolian_Unit *unit EINA_UNUSED, } EAPI const Eolian_Typedecl * -eolian_typedecl_struct_get_by_name(const char *name) +eolian_typedecl_struct_get_by_name(const Eolian_Unit *unit EINA_UNUSED, + const char *name) { if (!_structs) return NULL; Eina_Stringshare *shr = eina_stringshare_add(name); diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index a1b583560d..5cc260ac86 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -539,7 +539,8 @@ eolian_doc_token_ref_get(const Eolian_Doc_Token *tok, const void **data, *suffix++ = '\0'; /* try a struct field */ - const Eolian_Typedecl *tpd = eolian_typedecl_struct_get_by_name(name); + /* FIXME: pass unit properly */ + const Eolian_Typedecl *tpd = eolian_typedecl_struct_get_by_name(NULL, name); if (tpd) { const Eolian_Struct_Type_Field *fld = eolian_typedecl_struct_field_get(tpd, suffix); diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 64a89c2615..3d1de47a7a 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -662,7 +662,7 @@ START_TEST(eolian_struct) fail_if(!eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)); /* named struct */ - fail_if(!(tdl = eolian_typedecl_struct_get_by_name("Named"))); + fail_if(!(tdl = eolian_typedecl_struct_get_by_name(unit,
[EGIT] [core/efl] master 13/28: eolian: pass unit to alias get by name
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=52a0255e38fa483440e9a31e020adff6590ad1f8 commit 52a0255e38fa483440e9a31e020adff6590ad1f8 Author: Daniel KolesaDate: Thu May 25 14:56:44 2017 +0200 eolian: pass unit to alias get by name --- src/bindings/luajit/eolian.lua | 6 +++--- src/lib/eolian/Eolian.h| 3 ++- src/lib/eolian/database_expr.c | 3 ++- src/lib/eolian/database_type_api.c | 3 ++- src/tests/eolian/eolian_parsing.c | 22 +++--- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index ea4b8ab6d1..d63210bef4 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -297,7 +297,7 @@ ffi.cdef [[ Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass); Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass); const char *eolian_class_c_get_function_name_get(const Eolian_Class *klass); -const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const char *name); +const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const Eolian_Unit *unit, const char *name); const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const char *name); const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const char *name); Eina_Iterator *eolian_typedecl_aliases_get_by_file(const char *fname); @@ -1142,8 +1142,8 @@ M.Class = ffi.metatype("Eolian_Class", { } }) -M.typedecl_alias_get_by_name = function(name) -local v = eolian.eolian_typedecl_alias_get_by_name(name) +M.typedecl_alias_get_by_name = function(unit, name) +local v = eolian.eolian_typedecl_alias_get_by_name(unit, name) if v == nil then return nil end return v end diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 266abed438..7be3182de3 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1370,12 +1370,13 @@ EAPI Eina_Stringshare *eolian_class_c_data_type_get(const Eolian_Class *klass); /* * @brief Get an alias type declaration by name. Supports namespaces. * + * @param[in] unit the unit to look in * @param[in] name the name of the alias * @return the alias type or NULL * * @ingroup Eolian */ -EAPI const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const char *name); +EAPI const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const Eolian_Unit *unit, const char *name); /* * @brief Get a struct declaration by name. Supports namespaces. diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c index 5717f8bffd..1cb252660f 100644 --- a/src/lib/eolian/database_expr.c +++ b/src/lib/eolian/database_expr.c @@ -513,7 +513,8 @@ eval_exp(const Eolian_Expression *expr, Eolian_Expression_Mask mask, if (!(mask & EOLIAN_MASK_INT)) return expr_type_error(expr, EOLIAN_MASK_INT, mask); -etpd = eolian_typedecl_alias_get_by_name(fulln); +/* FIXME: pass unit properly */ +etpd = eolian_typedecl_alias_get_by_name(NULL, fulln); while (etpd && etpd->type == EOLIAN_TYPEDECL_ALIAS) { const Eolian_Type *etp = eolian_typedecl_base_type_get(etpd); diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index 14a50b04c2..8d9a5d3612 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -7,7 +7,8 @@ #include "eo_lexer.h" EAPI const Eolian_Typedecl * -eolian_typedecl_alias_get_by_name(const char *name) +eolian_typedecl_alias_get_by_name(const Eolian_Unit *unit EINA_UNUSED, + const char *name) { if (!_aliases) return NULL; Eina_Stringshare *shr = eina_stringshare_add(name); diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index d81da22fcb..64a89c2615 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -329,7 +329,7 @@ START_TEST(eolian_typedef) fail_if(!eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)); /* Basic type */ - fail_if(!(tdl = eolian_typedecl_alias_get_by_name("Evas.Coord"))); + fail_if(!(tdl = eolian_typedecl_alias_get_by_name(unit, "Evas.Coord"))); fail_if(eolian_typedecl_type_get(tdl) != EOLIAN_TYPEDECL_ALIAS); fail_if(!(type_name = eolian_typedecl_name_get(tdl))); fail_if(strcmp(type_name, "Coord")); @@ -348,12 +348,12 @@ START_TEST(eolian_typedef) fail_if(strcmp(file, "typedef.eo")); /* Lowest alias base */ - fail_if(!(tdl = eolian_typedecl_alias_get_by_name("Evas.Coord3"))); + fail_if(!(tdl = eolian_typedecl_alias_get_by_name(unit, "Evas.Coord3"))); fail_if(!(type = eolian_typedecl_aliased_base_get(tdl))); fail_if(strcmp(eolian_type_name_get(type), "int")); /* Complex type */ -
[EGIT] [core/efl] master 26/28: docgen: stub out units so the generator works again
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a72cac2223f2e6baad37551dbcb7b9c0a7acc63b commit a72cac2223f2e6baad37551dbcb7b9c0a7acc63b Author: Daniel KolesaDate: Tue May 30 16:09:59 2017 +0200 docgen: stub out units so the generator works again --- src/scripts/elua/apps/docgen/doctree.lua | 73 +--- 1 file changed, 48 insertions(+), 25 deletions(-) diff --git a/src/scripts/elua/apps/docgen/doctree.lua b/src/scripts/elua/apps/docgen/doctree.lua index 6330e56a72..65f337e890 100644 --- a/src/scripts/elua/apps/docgen/doctree.lua +++ b/src/scripts/elua/apps/docgen/doctree.lua @@ -295,7 +295,8 @@ M.Class = Node:clone { if ret then return ret end -local v = eolian.class_get_by_name(name) +-- FIXME: unit +local v = eolian.class_get_by_name(nil, name) if not v then return nil end @@ -310,7 +311,8 @@ M.Class = Node:clone { if ret then return ret end -local v = eolian.class_get_by_file(name) +-- FIXME: unit +local v = eolian.class_get_by_file(nil, name) if not v then return nil end @@ -322,7 +324,8 @@ M.Class = Node:clone { all_get = function() local ret, had = get_cache(M.Class, "_cache_all") if not had then -for cl in eolian.all_classes_get() do +-- FIXME: unit +for cl in eolian.all_classes_get(nil) do ret[#ret + 1] = M.Class(cl) end end @@ -705,7 +708,8 @@ M.Type = Node:clone { end, class_get = function(self) -return self.type:class_get() +-- FIXME: unit +return self.type:class_get(nil) end, array_size_get = function(self) @@ -893,7 +897,8 @@ M.Typedecl = Node:clone { end, c_type_get = function(self) -return self.typedecl:c_type_get() +-- FIXME: unit +return self.typedecl:c_type_get(nil) end, name_get = function(self) @@ -920,7 +925,8 @@ M.Typedecl = Node:clone { all_aliases_get = function() local ret = {} -for tp in eolian.typedecl_all_aliases_get() do +-- FIXME: unit +for tp in eolian.typedecl_all_aliases_get(nil) do ret[#ret + 1] = M.Typedecl(tp) end return ret @@ -928,7 +934,8 @@ M.Typedecl = Node:clone { all_structs_get = function() local ret = {} -for tp in eolian.typedecl_all_structs_get() do +-- FIXME: unit +for tp in eolian.typedecl_all_structs_get(nil) do ret[#ret + 1] = M.Typedecl(tp) end return ret @@ -936,7 +943,8 @@ M.Typedecl = Node:clone { all_enums_get = function() local ret = {} -for tp in eolian.typedecl_all_enums_get() do +-- FIXME: unit +for tp in eolian.typedecl_all_enums_get(nil) do ret[#ret + 1] = M.Typedecl(tp) end return ret @@ -944,7 +952,8 @@ M.Typedecl = Node:clone { aliases_by_file_get = function(fn) local ret = {} -for tp in eolian.typedecl_aliases_get_by_file(fn) do +-- FIXME: unit +for tp in eolian.typedecl_aliases_get_by_file(nil, fn) do ret[#ret + 1] = M.Typedecl(tp) end return ret @@ -952,7 +961,8 @@ M.Typedecl = Node:clone { structs_by_file_get = function(fn) local ret = {} -for tp in eolian.typedecl_structs_get_by_file(fn) do +-- FIXME: unit +for tp in eolian.typedecl_structs_get_by_file(nil, fn) do ret[#ret + 1] = M.Typedecl(tp) end return ret @@ -960,14 +970,16 @@ M.Typedecl = Node:clone { enums_by_file_get = function(fn) local ret = {} -for tp in eolian.typedecl_enums_get_by_file(fn) do +-- FIXME: unit +for tp in eolian.typedecl_enums_get_by_file(nil, fn) do ret[#ret + 1] = M.Typedecl(tp) end return ret end, alias_by_name_get = function(tn) -local v = eolian.typedecl_alias_get_by_name(tn) +-- FIXME: unit +local v = eolian.typedecl_alias_get_by_name(nil, tn) if not v then return nil end @@ -975,7 +987,8 @@ M.Typedecl = Node:clone { end, struct_by_name_get = function(tn) -local v = eolian.typedecl_struct_get_by_name(tn) +-- FIXME: unit +local v = eolian.typedecl_struct_get_by_name(nil, tn) if not v then return nil end @@ -983,7 +996,8 @@ M.Typedecl = Node:clone { end, enum_by_name_get = function(tn) -local v = eolian.typedecl_enum_get_by_name(tn) +-- FIXME: unit +local v = eolian.typedecl_enum_get_by_name(nil, tn) if not v then return nil end @@ -1261,7 +1275,8 @@ M.Variable = Node:clone {
[EGIT] [core/efl] master 16/28: eolian: use units in by_file getters for typedecls
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4f88aa424de73dfd7b45aa258c618972a534110e commit 4f88aa424de73dfd7b45aa258c618972a534110e Author: Daniel KolesaDate: Thu May 25 15:17:29 2017 +0200 eolian: use units in by_file getters for typedecls --- src/lib/eolian/Eolian.h| 9 ++--- src/lib/eolian/database_type_api.c | 9 ++--- src/tests/eolian/eolian_parsing.c | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index d5fb437a65..aa8d942d7a 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1403,6 +1403,7 @@ EAPI const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const Eolian_Unit * /* * @brief Get an iterator to all aliases contained in a file. * + * @param[in] unit the unit to look in * @param[in] fname the file name without full path * @return the iterator or NULL * @@ -1410,11 +1411,12 @@ EAPI const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const Eolian_Unit * * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_typedecl_aliases_get_by_file(const char *fname); +EAPI Eina_Iterator *eolian_typedecl_aliases_get_by_file(const Eolian_Unit *unit, const char *fname); /* * @brief Get an iterator to all named structs contained in a file. * + * @param[in] unit the unit to look in * @param[in] fname the file name without full path * @return the iterator or NULL * @@ -1422,11 +1424,12 @@ EAPI Eina_Iterator *eolian_typedecl_aliases_get_by_file(const char *fname); * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_typedecl_structs_get_by_file(const char *fname); +EAPI Eina_Iterator *eolian_typedecl_structs_get_by_file(const Eolian_Unit *unit, const char *fname); /* * @brief Get an iterator to all enums contained in a file. * + * @param[in] unit the unit to look in * @param[in] fname the file name without full path * @return the iterator or NULL * @@ -1434,7 +1437,7 @@ EAPI Eina_Iterator *eolian_typedecl_structs_get_by_file(const char *fname); * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_typedecl_enums_get_by_file(const char *fname); +EAPI Eina_Iterator *eolian_typedecl_enums_get_by_file(const Eolian_Unit *unit, const char *fname); /* * @brief Get an iterator to all aliases in the Eolian database. diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index 2261fa7b90..4b16c5889f 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -43,7 +43,8 @@ eolian_typedecl_enum_get_by_name(const Eolian_Unit *unit EINA_UNUSED, } EAPI Eina_Iterator * -eolian_typedecl_aliases_get_by_file(const char *fname) +eolian_typedecl_aliases_get_by_file(const Eolian_Unit *unit EINA_UNUSED, +const char *fname) { if (!_aliasesf) return NULL; Eina_Stringshare *shr = eina_stringshare_add(fname); @@ -54,7 +55,8 @@ eolian_typedecl_aliases_get_by_file(const char *fname) } EAPI Eina_Iterator * -eolian_typedecl_structs_get_by_file(const char *fname) +eolian_typedecl_structs_get_by_file(const Eolian_Unit *unit EINA_UNUSED, +const char *fname) { if (!_structsf) return NULL; Eina_Stringshare *shr = eina_stringshare_add(fname); @@ -65,7 +67,8 @@ eolian_typedecl_structs_get_by_file(const char *fname) } EAPI Eina_Iterator * -eolian_typedecl_enums_get_by_file(const char *fname) +eolian_typedecl_enums_get_by_file(const Eolian_Unit *unit EINA_UNUSED, + const char *fname) { if (!_enumsf) return NULL; Eina_Stringshare *shr = eina_stringshare_add(fname); diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 5f474016c7..84813e783a 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -369,7 +369,7 @@ START_TEST(eolian_typedef) eina_stringshare_del(type_name); /* List */ - fail_if(!(iter = eolian_typedecl_aliases_get_by_file("typedef.eo"))); + fail_if(!(iter = eolian_typedecl_aliases_get_by_file(unit, "typedef.eo"))); fail_if(!eina_iterator_next(iter, (void**))); fail_if(!(type_name = eolian_typedecl_name_get(tdl))); fail_if(strcmp(type_name, "Coord")); --
[EGIT] [core/efl] master 04/28: eolian gen: pass the unit around
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6d453bc6944897c6f0de34f3c7592f608061d320 commit 6d453bc6944897c6f0de34f3c7592f608061d320 Author: Daniel KolesaDate: Tue May 16 16:47:33 2017 +0200 eolian gen: pass the unit around --- src/bin/eolian/headers.c | 3 ++- src/bin/eolian/headers.h | 2 +- src/bin/eolian/main.c| 40 ++-- src/bin/eolian/sources.c | 6 -- src/bin/eolian/sources.h | 4 ++-- src/bin/eolian/types.c | 9 ++--- src/bin/eolian/types.h | 7 +++ 7 files changed, 40 insertions(+), 31 deletions(-) diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c index 2b88f6cd63..27f498e807 100644 --- a/src/bin/eolian/headers.c +++ b/src/bin/eolian/headers.c @@ -183,7 +183,8 @@ _gen_func(const Eolian_Function *fid, Eolian_Function_Type ftype, } void -eo_gen_header_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy) +eo_gen_header_gen(const Eolian_Unit *src EINA_UNUSED, const Eolian_Class *cl, + Eina_Strbuf *buf, Eina_Bool legacy) { if (!cl) return; diff --git a/src/bin/eolian/headers.h b/src/bin/eolian/headers.h index 55b4c071b0..e45d851da5 100644 --- a/src/bin/eolian/headers.h +++ b/src/bin/eolian/headers.h @@ -3,6 +3,6 @@ #include "main.h" -void eo_gen_header_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy); +void eo_gen_header_gen(const Eolian_Unit *src, const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy); #endif diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c index ece44a5ed8..5319fdeeb6 100644 --- a/src/bin/eolian/main.c +++ b/src/bin/eolian/main.c @@ -287,15 +287,16 @@ void eo_gen_class_names_get(const Eolian_Class *cl, char **cname, } static Eina_Bool -_write_header(const char *ofname, const char *ifname, Eina_Bool legacy) +_write_header(const Eolian_Unit *src, const char *ofname, + const char *ifname, Eina_Bool legacy) { INF("generating header: %s (legacy: %d)", ofname, legacy); Eina_Strbuf *buf = eina_strbuf_new(); - eo_gen_types_header_gen(ifname, buf, EINA_TRUE, legacy); + eo_gen_types_header_gen(src, ifname, buf, EINA_TRUE, legacy); buf = _include_guard(ifname, "TYPES", buf); - Eina_Strbuf *cltd = eo_gen_class_typedef_gen(ifname); + Eina_Strbuf *cltd = eo_gen_class_typedef_gen(src, ifname); if (cltd) { cltd = _include_guard(ifname, "CLASS_TYPE", cltd); @@ -305,7 +306,7 @@ _write_header(const char *ofname, const char *ifname, Eina_Bool legacy) } const Eolian_Class *cl = eolian_class_get_by_file(ifname); - eo_gen_header_gen(cl, buf, legacy); + eo_gen_header_gen(src, cl, buf, legacy); if (cl || !legacy) { buf = _include_guard(_get_filename(ofname), NULL, buf); @@ -321,14 +322,15 @@ _write_header(const char *ofname, const char *ifname, Eina_Bool legacy) } static Eina_Bool -_write_stub_header(const char *ofname, const char *ifname) +_write_stub_header(const Eolian_Unit *src, const char *ofname, + const char *ifname) { INF("generating stub header: %s", ofname); Eina_Strbuf *buf = eina_strbuf_new(); - eo_gen_types_header_gen(ifname, buf, EINA_FALSE, EINA_FALSE); + eo_gen_types_header_gen(src, ifname, buf, EINA_FALSE, EINA_FALSE); - Eina_Strbuf *cltd = eo_gen_class_typedef_gen(ifname); + Eina_Strbuf *cltd = eo_gen_class_typedef_gen(src, ifname); if (cltd) { eina_strbuf_prepend_char(buf, '\n'); @@ -344,14 +346,15 @@ _write_stub_header(const char *ofname, const char *ifname) } static Eina_Bool -_write_source(const char *ofname, const char *ifname, Eina_Bool eot) +_write_source(const Eolian_Unit *src, const char *ofname, + const char *ifname, Eina_Bool eot) { INF("generating source: %s", ofname); Eina_Strbuf *buf = eina_strbuf_new(); const Eolian_Class *cl = eolian_class_get_by_file(ifname); - eo_gen_types_source_gen(ifname, buf); - eo_gen_source_gen(cl, buf); + eo_gen_types_source_gen(src, ifname, buf); + eo_gen_source_gen(src, cl, buf); if (cl || (eot && eina_strbuf_length_get(buf))) { if (_write_file(ofname, buf)) @@ -366,7 +369,7 @@ _write_source(const char *ofname, const char *ifname, Eina_Bool eot) } static Eina_Bool -_write_impl(const char *ofname, const char *ifname) +_write_impl(const Eolian_Unit *src, const char *ofname, const char *ifname) { INF("generating impl: %s", ofname); @@ -378,7 +381,7 @@ _write_impl(const char *ofname, const char *ifname) if (!_read_file(ofname, )) return EINA_FALSE; - eo_gen_impl_gen(cl, buf); + eo_gen_impl_gen(src, cl, buf); Eina_Bool ret = _write_file(ofname, buf); eina_strbuf_free(buf); return ret; @@ -485,7 +488,8 @@ main(int argc, char **argv) goto end; } - if (!eolian_file_parse(input)) + const Eolian_Unit *src = eolian_file_parse(input); + if
[EGIT] [core/efl] master 22/28: eolian: type_class_get takes unit
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=81a1d9659a12d3bee981309a3b7eb3a695169f04 commit 81a1d9659a12d3bee981309a3b7eb3a695169f04 Author: Daniel KolesaDate: Fri May 26 14:52:44 2017 +0200 eolian: type_class_get takes unit --- src/bindings/luajit/eolian.lua | 6 +++--- src/lib/eolian/Eolian.h| 3 ++- src/lib/eolian/database_type_api.c | 5 ++--- src/lib/eolian/database_validate.c | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index b59dc37f3d..19c91bdc4e 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -333,7 +333,7 @@ ffi.cdef [[ const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Type *tp); const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Typedecl *tp); -const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp); +const Eolian_Class *eolian_type_class_get(const Eolian_Unit *unit, const Eolian_Type *tp); size_t eolian_type_array_size_get(const Eolian_Type *tp); Eina_Bool eolian_type_is_own(const Eolian_Type *tp); Eina_Bool eolian_type_is_const(const Eolian_Type *tp); @@ -691,8 +691,8 @@ M.Type = ffi.metatype("Eolian_Type", { return v end, -class_get = function(self) -local v = eolian.eolian_type_class_get(self) +class_get = function(self, unit) +local v = eolian.eolian_type_class_get(unit, self) if v == nil then return nil end return v end, diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 97c10d8280..13e4770c23 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1808,12 +1808,13 @@ EAPI const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Type *tp); /* * @brief Get the class associated with an EOLIAN_TYPE_CLASS type. * + * @param[in] unit the unit to look in * @param[in] tp the type. * @return the class or NULL. * * @ingroup Eolian */ -EAPI const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp); +EAPI const Eolian_Class *eolian_type_class_get(const Eolian_Unit *unit, const Eolian_Type *tp); /* * @brief Get the size of an EOLIAN_TYPE_STATIC_ARRAY. diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index ef9d397896..2c8fd9a133 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -311,13 +311,12 @@ eolian_typedecl_aliased_base_get(const Eolian_Typedecl *tp) } EAPI const Eolian_Class * -eolian_type_class_get(const Eolian_Type *tp) +eolian_type_class_get(const Eolian_Unit *unit, const Eolian_Type *tp) { EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL); if (eolian_type_type_get(tp) != EOLIAN_TYPE_CLASS) return NULL; - /* FIXME: pass unit properly */ - return eolian_class_get_by_name(NULL, tp->full_name); + return eolian_class_get_by_name(unit, tp->full_name); } EAPI size_t diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index f361ceac13..f8dac39aa5 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -154,7 +154,8 @@ _validate_type(const Eolian_Type *tp) return _validate_type(tp->base_type); case EOLIAN_TYPE_CLASS: { - if (!eolian_type_class_get(tp)) + /* FIXME: pass unit properly */ + if (!eolian_type_class_get(NULL, tp)) { char buf[256]; snprintf(buf, sizeof(buf), "undefined class %s " --
[EGIT] [core/efl] master 10/28: eolian: update tests according to unit API
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2f9c4cfef2a3a7ec5697a5eba890a0538c63f357 commit 2f9c4cfef2a3a7ec5697a5eba890a0538c63f357 Author: Daniel KolesaDate: Wed May 24 17:35:34 2017 +0200 eolian: update tests according to unit API --- src/tests/eolian/eolian_parsing.c | 104 ++ 1 file changed, 60 insertions(+), 44 deletions(-) diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 4d80a0ba4e..d81da22fcb 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -18,18 +18,19 @@ START_TEST(eolian_namespaces) Eolian_Function_Type func_type; const char *class_name, *val1, *val2; const Eolian_Implement *impl; + const Eolian_Unit *unit; void *dummy; eolian_init(); /* Parsing */ fail_if(!eolian_directory_scan(PACKAGE_DATA_DIR"/data")); - fail_if(!eolian_file_parse(PACKAGE_DATA_DIR"/data/nmsp1_class1.eo")); + fail_if(!(unit = eolian_file_parse(PACKAGE_DATA_DIR"/data/nmsp1_class1.eo"))); /* Classes existence */ - fail_if(!(class11 = eolian_class_get_by_name("nmsp1.class1"))); - fail_if(!(class112 = eolian_class_get_by_name("nmsp1.nmsp11.class2"))); - fail_if(!(class21 = eolian_class_get_by_name("nmsp2.class1"))); - fail_if(!(class_no = eolian_class_get_by_name("no_nmsp"))); + fail_if(!(class11 = eolian_class_get_by_name(unit, "nmsp1.class1"))); + fail_if(!(class112 = eolian_class_get_by_name(unit, "nmsp1.nmsp11.class2"))); + fail_if(!(class21 = eolian_class_get_by_name(unit, "nmsp2.class1"))); + fail_if(!(class_no = eolian_class_get_by_name(unit, "no_nmsp"))); /* Check names and namespaces*/ fail_if(strcmp(eolian_class_name_get(class11), "class1")); @@ -61,11 +62,11 @@ START_TEST(eolian_namespaces) /* Inherits */ fail_if(!(iter = eolian_class_inherits_get(class11))); fail_if(!(eina_iterator_next(iter, (void**)_name))); - fail_if(eolian_class_get_by_name(class_name) != class112); + fail_if(eolian_class_get_by_name(unit, class_name) != class112); fail_if(!(eina_iterator_next(iter, (void**)_name))); - fail_if(eolian_class_get_by_name(class_name) != class21); + fail_if(eolian_class_get_by_name(unit, class_name) != class21); fail_if(!(eina_iterator_next(iter, (void**)_name))); - fail_if(eolian_class_get_by_name(class_name) != class_no); + fail_if(eolian_class_get_by_name(unit, class_name) != class_no); fail_if(eina_iterator_next(iter, )); eina_iterator_free(iter); @@ -98,14 +99,15 @@ START_TEST(eolian_events) const char *name, *type_name; const Eolian_Type *type; const Eolian_Event *ev; + const Eolian_Unit *unit; void *dummy; eolian_init(); /* Parsing */ - fail_if(!eolian_file_parse(PACKAGE_DATA_DIR"/data/events.eo")); + fail_if(!(unit = eolian_file_parse(PACKAGE_DATA_DIR"/data/events.eo"))); /* Class */ - fail_if(!(class = eolian_class_get_by_name("Events"))); + fail_if(!(class = eolian_class_get_by_name(unit, "Events"))); fail_if(strcmp(eolian_class_event_prefix_get(class), "totally_not_events")); /* Events */ @@ -170,15 +172,16 @@ START_TEST(eolian_override) const Eolian_Function *impl_func = NULL; const Eolian_Class *class, *base; const Eolian_Implement *impl; + const Eolian_Unit *unit; eolian_init(); /* Parsing */ fail_if(!eolian_directory_scan(PACKAGE_DATA_DIR"/data")); - fail_if(!eolian_file_parse(PACKAGE_DATA_DIR"/data/override.eo")); + fail_if(!(unit = eolian_file_parse(PACKAGE_DATA_DIR"/data/override.eo"))); /* Class */ - fail_if(!(class = eolian_class_get_by_name("Override"))); - fail_if(!(base = eolian_class_get_by_name("Base"))); + fail_if(!(class = eolian_class_get_by_name(unit, "Override"))); + fail_if(!(base = eolian_class_get_by_name(unit, "Base"))); /* Implements */ fail_if(!(iter = eolian_class_implements_get(class))); @@ -224,11 +227,12 @@ START_TEST(eolian_consts) { const Eolian_Function *fid = NULL; const Eolian_Class *class; + const Eolian_Unit *unit; eolian_init(); /* Parsing */ - fail_if(!eolian_file_parse(PACKAGE_DATA_DIR"/data/consts.eo")); - fail_if(!(class = eolian_class_get_by_name("Consts"))); + fail_if(!(unit = eolian_file_parse(PACKAGE_DATA_DIR"/data/consts.eo"))); + fail_if(!(class = eolian_class_get_by_name(unit, "Consts"))); /* Method */ fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD))); @@ -246,14 +250,15 @@ START_TEST(eolian_ctor_dtor) const Eolian_Class *class, *base; const Eolian_Implement *impl; const Eolian_Constructor *ctor; + const Eolian_Unit *unit; void *dummy; eolian_init(); /* Parsing */ fail_if(!eolian_directory_scan(PACKAGE_DATA_DIR"/data")); - fail_if(!eolian_file_parse(PACKAGE_DATA_DIR"/data/ctor_dtor.eo")); - fail_if(!(class =
[EGIT] [core/efl] master 17/28: eolian: use unit in all getters for typedecls
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=308a3d91a39d7d50eb09d77d4b92ef97adefc0ad commit 308a3d91a39d7d50eb09d77d4b92ef97adefc0ad Author: Daniel KolesaDate: Thu May 25 15:18:57 2017 +0200 eolian: use unit in all getters for typedecls --- src/lib/eolian/Eolian.h| 9 ++--- src/lib/eolian/database_type_api.c | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index aa8d942d7a..54a46b84fc 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1442,35 +1442,38 @@ EAPI Eina_Iterator *eolian_typedecl_enums_get_by_file(const Eolian_Unit *unit, c /* * @brief Get an iterator to all aliases in the Eolian database. * + * @param[in] unit the unit to look in * @return the iterator or NULL * * Thanks to internal caching, this is an O(1) operation. * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_typedecl_all_aliases_get(void); +EAPI Eina_Iterator *eolian_typedecl_all_aliases_get(const Eolian_Unit *unit); /* * @brief Get an iterator to all structs in the Eolian database. * + * @param[in] unit the unit to look in * @return the iterator or NULL * * Thanks to internal caching, this is an O(1) operation. * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_typedecl_all_structs_get(void); +EAPI Eina_Iterator *eolian_typedecl_all_structs_get(const Eolian_Unit *unit); /* * @brief Get an iterator to all enums in the Eolian database. * + * @param[in] unit the unit to look in * @return the iterator or NULL * * Thanks to internal caching, this is an O(1) operation. * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_typedecl_all_enums_get(void); +EAPI Eina_Iterator *eolian_typedecl_all_enums_get(const Eolian_Unit *unit); /* * @brief Get the type of a type declaration. diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index 4b16c5889f..ef9d397896 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -79,19 +79,19 @@ eolian_typedecl_enums_get_by_file(const Eolian_Unit *unit EINA_UNUSED, } EAPI Eina_Iterator * -eolian_typedecl_all_aliases_get(void) +eolian_typedecl_all_aliases_get(const Eolian_Unit *unit EINA_UNUSED) { return (_aliases ? eina_hash_iterator_data_new(_aliases) : NULL); } EAPI Eina_Iterator * -eolian_typedecl_all_structs_get(void) +eolian_typedecl_all_structs_get(const Eolian_Unit *unit EINA_UNUSED) { return (_structs ? eina_hash_iterator_data_new(_structs) : NULL); } EAPI Eina_Iterator * -eolian_typedecl_all_enums_get(void) +eolian_typedecl_all_enums_get(const Eolian_Unit *unit EINA_UNUSED) { return (_enums ? eina_hash_iterator_data_new(_enums) : NULL); } --
[EGIT] [core/efl] master 20/28: eolian: more expr system unit updates
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4125e3f34bf3c6bc3d61aebfbe73263d0eac8b17 commit 4125e3f34bf3c6bc3d61aebfbe73263d0eac8b17 Author: Daniel KolesaDate: Thu May 25 16:10:29 2017 +0200 eolian: more expr system unit updates --- src/lib/eolian/database_expr.c | 5 +++-- src/lib/eolian/database_expr_api.c | 25 + src/lib/eolian/eolian_database.h | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c index d7190e8da1..09be53e7f1 100644 --- a/src/lib/eolian/database_expr.c +++ b/src/lib/eolian/database_expr.c @@ -559,14 +559,15 @@ eval_exp(const Eolian_Unit *unit, const Eolian_Expression *expr, } Eolian_Value -database_expr_eval(const Eolian_Expression *expr, Eolian_Expression_Mask mask) +database_expr_eval(const Eolian_Unit *unit, const Eolian_Expression *expr, + Eolian_Expression_Mask mask) { Eolian_Expression out; Eolian_Value ret; ret.type = EOLIAN_EXPR_UNKNOWN; if (!mask) return ret; - if (!eval_exp(NULL, expr, mask, )) + if (!eval_exp(unit, expr, mask, )) return ret; ret.type = out.type; ret.value = out.value; diff --git a/src/lib/eolian/database_expr_api.c b/src/lib/eolian/database_expr_api.c index 6cfca9466c..acc16ed48d 100644 --- a/src/lib/eolian/database_expr_api.c +++ b/src/lib/eolian/database_expr_api.c @@ -11,11 +11,12 @@ eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m) Eolian_Value err; err.type = EOLIAN_EXPR_UNKNOWN; EINA_SAFETY_ON_NULL_RETURN_VAL(expr, err); - return database_expr_eval(expr, m); + return database_expr_eval(NULL, expr, m); } static Eolian_Value -_eval_type(const Eolian_Expression *expr, const Eolian_Type *type) +_eval_type(const Eolian_Unit *unit, const Eolian_Expression *expr, + const Eolian_Type *type) { Eolian_Value err; err.type = EOLIAN_EXPR_UNKNOWN; @@ -25,21 +26,21 @@ _eval_type(const Eolian_Expression *expr, const Eolian_Type *type) { case EOLIAN_TYPE_CLASS: case EOLIAN_TYPE_COMPLEX: -return database_expr_eval(expr, EOLIAN_MASK_NULL); +return database_expr_eval(unit, expr, EOLIAN_MASK_NULL); case EOLIAN_TYPE_REGULAR: { int kw = eo_lexer_keyword_str_to_id(type->name); if (type->is_ptr) - return database_expr_eval(expr, EOLIAN_MASK_NULL); + return database_expr_eval(unit, expr, EOLIAN_MASK_NULL); if (!kw || kw < KW_byte || kw >= KW_void) { const Eolian_Typedecl *base = eolian_type_typedecl_get(type); if (!base) return err; if (base->type == EOLIAN_TYPEDECL_ALIAS) - return _eval_type(expr, eolian_typedecl_base_type_get(base)); + return _eval_type(unit, expr, eolian_typedecl_base_type_get(base)); else if (base->type == EOLIAN_TYPEDECL_ENUM) - return database_expr_eval(expr, EOLIAN_MASK_INT); + return database_expr_eval(unit, expr, EOLIAN_MASK_INT); return err; } switch (kw) @@ -57,7 +58,7 @@ _eval_type(const Eolian_Expression *expr, const Eolian_Type *type) case KW_ssize: case KW_intptr: case KW_ptrdiff: -return database_expr_eval(expr, EOLIAN_MASK_SINT); +return database_expr_eval(unit, expr, EOLIAN_MASK_SINT); case KW_ubyte: case KW_ushort: case KW_uint: @@ -71,14 +72,14 @@ _eval_type(const Eolian_Expression *expr, const Eolian_Type *type) case KW_size: case KW_uintptr: case KW_time: -return database_expr_eval(expr, EOLIAN_MASK_UINT); +return database_expr_eval(unit, expr, EOLIAN_MASK_UINT); case KW_float: case KW_double: -return database_expr_eval(expr, EOLIAN_MASK_FLOAT); +return database_expr_eval(unit, expr, EOLIAN_MASK_FLOAT); case KW_bool: -return database_expr_eval(expr, EOLIAN_MASK_BOOL); +return database_expr_eval(unit, expr, EOLIAN_MASK_BOOL); case KW_char: -return database_expr_eval(expr, EOLIAN_MASK_CHAR); +return database_expr_eval(unit, expr, EOLIAN_MASK_CHAR); default: return err; } @@ -95,7 +96,7 @@ eolian_expression_eval_type(const Eolian_Expression *expr, Eolian_Value err; err.type = EOLIAN_EXPR_UNKNOWN; EINA_SAFETY_ON_NULL_RETURN_VAL(expr, err); - return _eval_type(expr, type); + return _eval_type(NULL, expr, type); } static void diff --git a/src/lib/eolian/eolian_database.h
[EGIT] [core/efl] master 19/28: eolian: pass unit around in expr eval
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2cfbd3a42b4c0635e715f3ee1e438dd8f8de7692 commit 2cfbd3a42b4c0635e715f3ee1e438dd8f8de7692 Author: Daniel KolesaDate: Thu May 25 16:07:48 2017 +0200 eolian: pass unit around in expr eval --- src/lib/eolian/database_expr.c | 58 +- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c index f0510ddc00..d7190e8da1 100644 --- a/src/lib/eolian/database_expr.c +++ b/src/lib/eolian/database_expr.c @@ -180,11 +180,13 @@ promote(Eolian_Expression *a, Eolian_Expression *b) #undef CONVERT_CASE } -static Eina_Bool eval_exp(const Eolian_Expression *expr, Eolian_Expression_Mask mask, Eolian_Expression *out); +static Eina_Bool eval_exp(const Eolian_Unit *unit, + const Eolian_Expression *expr, + Eolian_Expression_Mask mask, Eolian_Expression *out); static Eina_Bool -eval_unary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, - Eolian_Expression *out) +eval_unary(const Eolian_Unit *unit, const Eolian_Expression *expr, + Eolian_Expression_Mask mask, Eolian_Expression *out) { switch (expr->unop) { @@ -194,7 +196,7 @@ eval_unary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, if (!(mask & EOLIAN_MASK_SIGNED)) return expr_type_error(expr, EOLIAN_MASK_SIGNED, mask); - return eval_exp(expr->expr, EOLIAN_MASK_SIGNED, out); + return eval_exp(unit, expr->expr, EOLIAN_MASK_SIGNED, out); } case EOLIAN_UNOP_UNM: { @@ -203,7 +205,7 @@ eval_unary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, if (!(mask & EOLIAN_MASK_SIGNED)) return expr_type_error(expr, EOLIAN_MASK_SIGNED, mask); - if (!eval_exp(expr->expr, EOLIAN_MASK_SIGNED, )) + if (!eval_exp(unit, expr->expr, EOLIAN_MASK_SIGNED, )) return EINA_FALSE; switch (exp.type) @@ -226,7 +228,7 @@ eval_unary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, if (!(mask & EOLIAN_MASK_BOOL)) return expr_type_error(expr, EOLIAN_MASK_BOOL, mask); - if (!eval_exp(expr->expr, EOLIAN_MASK_NUMBER | EOLIAN_MASK_BOOL, )) + if (!eval_exp(unit, expr->expr, EOLIAN_MASK_NUMBER | EOLIAN_MASK_BOOL, )) return EINA_FALSE; exp.value.b = !(exp.value.ull); @@ -242,7 +244,7 @@ eval_unary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, if (!(mask & EOLIAN_MASK_INT)) return expr_type_error(expr, EOLIAN_MASK_INT, mask); - if (!eval_exp(expr->expr, EOLIAN_MASK_INT, )) + if (!eval_exp(unit, expr->expr, EOLIAN_MASK_INT, )) return EINA_FALSE; switch (exp.type) @@ -269,18 +271,19 @@ eval_unary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, } static Eina_Bool -eval_promote_num(const Eolian_Expression *expr, Eolian_Expression *lhs, - Eolian_Expression *rhs, int mask, int emask) +eval_promote_num(const Eolian_Unit *unit, const Eolian_Expression *expr, + Eolian_Expression *lhs, Eolian_Expression *rhs, int mask, + int emask) { /* make sure the output can be a number */ if (!(mask & EOLIAN_MASK_NUMBER)) return expr_type_error(expr, EOLIAN_MASK_NUMBER, mask); /* eval into primitive value */ - if (!eval_exp(expr->lhs, emask, lhs)) + if (!eval_exp(unit, expr->lhs, emask, lhs)) return EINA_FALSE; - if (!eval_exp(expr->rhs, emask, rhs)) + if (!eval_exp(unit, expr->rhs, emask, rhs)) return EINA_FALSE; /* promote so both sides are of the same type */ @@ -291,8 +294,8 @@ eval_promote_num(const Eolian_Expression *expr, Eolian_Expression *lhs, } static Eina_Bool -eval_binary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, -Eolian_Expression *out) +eval_binary(const Eolian_Unit *unit, const Eolian_Expression *expr, +Eolian_Expression_Mask mask, Eolian_Expression *out) { #define APPLY_CASE(id, expr, lhs, rhs, fnm, op) \ case EOLIAN_EXPR_##id: \ @@ -337,7 +340,7 @@ eval_binary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, int emask = (mask & EOLIAN_MASK_FLOAT) \ ? EOLIAN_MASK_NUMBER \ : EOLIAN_MASK_INT; \ -if (!eval_promote_num(expr, , , mask, emask)) \ +if (!eval_promote_num(unit, expr, , , mask, emask)) \ return EINA_FALSE; \ APPLY_NUM(out, lhs, rhs, op) \ return EINA_TRUE; \ @@ -348,7 +351,7 @@ eval_binary(const Eolian_Expression *expr, Eolian_Expression_Mask mask, { \ Eolian_Expression lhs; \ Eolian_Expression rhs; \ -if (!eval_promote_num(expr, , ,
[EGIT] [core/efl] master 25/28: eolian: use unit in typedecl c_type_get
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d2280f91a18bb430751e3db4fc06085da3cca509 commit d2280f91a18bb430751e3db4fc06085da3cca509 Author: Daniel KolesaDate: Fri May 26 15:09:49 2017 +0200 eolian: use unit in typedecl c_type_get --- src/bin/eolian/types.c | 2 +- src/bindings/luajit/eolian.lua | 6 +++--- src/lib/eolian/Eolian.h| 3 ++- src/lib/eolian/database_type_api.c | 5 ++--- src/tests/eolian/eolian_parsing.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c index 8db220bd1d..c1d4e1fa94 100644 --- a/src/bin/eolian/types.c +++ b/src/bin/eolian/types.c @@ -18,7 +18,7 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp, { case EOLIAN_TYPEDECL_ALIAS: { - Eina_Stringshare *tn = eolian_typedecl_c_type_get(tp); + Eina_Stringshare *tn = eolian_typedecl_c_type_get(src, tp); eina_strbuf_append(buf, tn); eina_stringshare_del(tn); break; diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 473a587aec..056370695d 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -342,7 +342,7 @@ ffi.cdef [[ Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp); const char *eolian_type_c_type_get(const Eolian_Type *tp); -const char *eolian_typedecl_c_type_get(const Eolian_Typedecl *tp); +const char *eolian_typedecl_c_type_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp); const char *eolian_type_name_get(const Eolian_Type *tp); const char *eolian_typedecl_name_get(const Eolian_Typedecl *tp); @@ -624,8 +624,8 @@ M.Typedecl = ffi.metatype("Eolian_Typedecl", { return eolian.eolian_typedecl_is_extern(self) ~= 0 end, -c_type_get = function(self) -local v = eolian.eolian_typedecl_c_type_get(self) +c_type_get = function(self, unit) +local v = eolian.eolian_typedecl_c_type_get(unit, self) if v == nil then return nil end return ffi_stringshare(v) end, diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index dc8dfc3f9c..02ee4f9d91 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1677,6 +1677,7 @@ EAPI Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp); /* * @brief Get the full C type name of the given type. * + * @param[in] unit the unit to look in * @param[in] tp the type declaration. * @return The C type name assuming @c tp is not NULL. * @@ -1686,7 +1687,7 @@ EAPI Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp); * * @ingroup Eolian */ -EAPI Eina_Stringshare *eolian_typedecl_c_type_get(const Eolian_Typedecl *tp); +EAPI Eina_Stringshare *eolian_typedecl_c_type_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp); /* * @brief Get the name of the given type declaration. Keep in mind that the diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index d1dcc4fed0..22d95eecec 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -368,14 +368,13 @@ eolian_type_c_type_get(const Eolian_Type *tp) } EAPI Eina_Stringshare * -eolian_typedecl_c_type_get(const Eolian_Typedecl *tp) +eolian_typedecl_c_type_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp) { Eina_Stringshare *ret; Eina_Strbuf *buf; EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL); buf = eina_strbuf_new(); - /* FIXME: pass unit properly */ - database_typedecl_to_str(NULL, tp, buf); + database_typedecl_to_str(unit, tp, buf); ret = eina_stringshare_add(eina_strbuf_string_get(buf)); eina_strbuf_free(buf); return ret; diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 16645ab198..33acd989f5 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -333,7 +333,7 @@ START_TEST(eolian_typedef) fail_if(eolian_typedecl_type_get(tdl) != EOLIAN_TYPEDECL_ALIAS); fail_if(!(type_name = eolian_typedecl_name_get(tdl))); fail_if(strcmp(type_name, "Coord")); - fail_if(!(type_name = eolian_typedecl_c_type_get(tdl))); + fail_if(!(type_name = eolian_typedecl_c_type_get(unit, tdl))); fail_if(strcmp(type_name, "typedef int Evas_Coord")); eina_stringshare_del(type_name); fail_if(!(type = eolian_typedecl_base_type_get(tdl))); --
[EGIT] [core/efl] master 27/28: eolian: silence a unused warning temporarily
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cc7b354db29af517e7b60f1a9279132cb35b7bfd commit cc7b354db29af517e7b60f1a9279132cb35b7bfd Author: Daniel KolesaDate: Tue May 30 16:42:26 2017 +0200 eolian: silence a unused warning temporarily --- src/lib/eolian/eolian_database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 94804334d8..2850493e2c 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -597,7 +597,7 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, } void -database_unit_del(Eolian_Unit *unit) +database_unit_del(Eolian_Unit *unit EINA_UNUSED) { } --
[EGIT] [core/efl] master 12/28: eolian: return real nil on parse failure
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6d0ee5d2df1b0a479465c82c41a87a9bfc2007e6 commit 6d0ee5d2df1b0a479465c82c41a87a9bfc2007e6 Author: Daniel KolesaDate: Wed May 24 17:41:31 2017 +0200 eolian: return real nil on parse failure --- src/bindings/luajit/eolian.lua | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index c8cb85a809..ea4b8ab6d1 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -449,7 +449,11 @@ M.system_directory_scan = function() end M.file_parse = function(fpath) -return eolian.eolian_file_parse(fpath) +local v = eolian.eolian_file_parse(fpath) +if v == nil then +return nil +end +return v end M.all_eo_files_parse = function() --
[EGIT] [core/efl] master 21/28: eolian: expr eval APIs now take units
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c234b5ee69186ec8dc02e3742d055ff24f0afba6 commit c234b5ee69186ec8dc02e3742d055ff24f0afba6 Author: Daniel KolesaDate: Thu May 25 16:18:10 2017 +0200 eolian: expr eval APIs now take units --- src/bin/eolian/sources.c | 26 +- src/bin/eolian/types.c | 8 src/bindings/luajit/eolian.lua | 12 ++-- src/lib/eolian/Eolian.h| 6 -- src/lib/eolian/database_expr_api.c | 10 ++ src/lib/eolian/database_type.c | 3 ++- src/lib/eolian/database_validate.c | 5 +++-- src/tests/eolian/eolian_parsing.c | 28 ++-- 8 files changed, 52 insertions(+), 46 deletions(-) diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index d58a702ef6..6eb6ad7927 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -69,12 +69,12 @@ _type_exists(const char *tname, Eina_Strbuf *buf) } static void -_append_defval(Eina_Strbuf *buf, const Eolian_Expression *exp, - const Eolian_Type *tp) +_append_defval(const Eolian_Unit *src, Eina_Strbuf *buf, + const Eolian_Expression *exp, const Eolian_Type *tp) { if (exp) { -Eolian_Value val = eolian_expression_eval_type(exp, tp); +Eolian_Value val = eolian_expression_eval_type(src, exp, tp); Eina_Stringshare *lit = eolian_expression_value_to_literal(); if (lit) { @@ -115,9 +115,9 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression *exp, } static void -_gen_func(const Eolian_Class *cl, const Eolian_Function *fid, - Eolian_Function_Type ftype, Eina_Strbuf *buf, - const Eolian_Implement *impl, Eina_Strbuf *lbuf) +_gen_func(const Eolian_Unit *src, const Eolian_Class *cl, + const Eolian_Function *fid, Eolian_Function_Type ftype, + Eina_Strbuf *buf, const Eolian_Implement *impl, Eina_Strbuf *lbuf) { Eina_Bool is_empty = eolian_implement_is_empty(impl, ftype); Eina_Bool is_auto = eolian_implement_is_auto(impl, ftype); @@ -248,7 +248,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, } else if ((ftype != EOLIAN_PROP_SET) && dfv) { - Eolian_Value val = eolian_expression_eval(dfv, EOLIAN_MASK_ALL); + Eolian_Value val = eolian_expression_eval(src, dfv, EOLIAN_MASK_ALL); if (val.type) { Eina_Stringshare *vals = eolian_expression_value_to_literal(); @@ -359,7 +359,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, if (rtp) { eina_strbuf_append(buf, " return "); - _append_defval(buf, def_ret, rtp); + _append_defval(src, buf, def_ret, rtp); eina_strbuf_append(buf, ";\n"); } eina_strbuf_append(buf, "}\n\n"); @@ -420,7 +420,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, if (strcmp(rtpn, "void")) { eina_strbuf_append_printf(buf, ", %s, ", rtpn); - _append_defval(buf, def_ret, rtp); + _append_defval(src, buf, def_ret, rtp); } if (has_params) { @@ -682,14 +682,14 @@ eo_gen_source_gen(const Eolian_Unit *src, { case EOLIAN_PROP_GET: case EOLIAN_PROP_SET: -_gen_func(cl, fid, ftype, buf, imp, lbuf); +_gen_func(src, cl, fid, ftype, buf, imp, lbuf); break; case EOLIAN_PROPERTY: -_gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, lbuf); -_gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, lbuf); +_gen_func(src, cl, fid, EOLIAN_PROP_SET, buf, imp, lbuf); +_gen_func(src, cl, fid, EOLIAN_PROP_GET, buf, imp, lbuf); break; default: -_gen_func(cl, fid, EOLIAN_METHOD, buf, imp, lbuf); +_gen_func(src, cl, fid, EOLIAN_METHOD, buf, imp, lbuf); } } eina_iterator_free(itr); diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c index bd928dc268..8db220bd1d 100644 --- a/src/bin/eolian/types.c +++ b/src/bin/eolian/types.c @@ -97,7 +97,7 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp, else { Eolian_Value val = -eolian_expression_eval(vale, EOLIAN_MASK_INT); +eolian_expression_eval(src, vale, EOLIAN_MASK_INT); const char *lit = eolian_expression_value_to_literal(); eina_strbuf_append_printf(buf, " %s = %s", membn, lit); const char *exp =
[EGIT] [core/efl] master 02/28: eolian: units will contain multiple files
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=91411c5389b84412a983617f7577244e715fb056 commit 91411c5389b84412a983617f7577244e715fb056 Author: Daniel KolesaDate: Fri May 12 13:54:30 2017 +0200 eolian: units will contain multiple files --- src/lib/eolian/eolian_database.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 0feaaf7b61..67ccbec287 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -281,9 +281,8 @@ struct _Eolian_Variable struct _Eolian_Unit { - Eolian_Object base; - Eolian_Class *klass; Eina_List *dependencies; + Eina_List *classes; Eina_List *globals; Eina_List *constants; Eina_List *aliases; --
[EGIT] [core/efl] master 03/28: eolian: make eolian_file_parse return unit
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7da0549970a89c7b7d85451ab78102e6f4289103 commit 7da0549970a89c7b7d85451ab78102e6f4289103 Author: Daniel KolesaDate: Tue May 16 16:13:15 2017 +0200 eolian: make eolian_file_parse return unit --- src/bindings/luajit/eolian.lua | 5 +++-- src/lib/eolian/Eolian.h | 4 ++-- src/lib/eolian/eolian_database.c | 10 ++ src/scripts/elua/modules/lualian.lua | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 0079928c00..d98e047c19 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -28,6 +28,7 @@ ffi.cdef [[ typedef struct _Eolian_Declaration Eolian_Declaration; typedef struct _Eolian_Documentation Eolian_Documentation; typedef struct _Eolian_Value Eolian_Value; +typedef struct _Eolian_Unit Eolian_Unit; typedef enum { @@ -217,7 +218,7 @@ ffi.cdef [[ const char *text, *text_end; } Eolian_Doc_Token; -Eina_Bool eolian_file_parse(const char *filepath); +const Eolian_Unit *eolian_file_parse(const char *filepath); Eina_Iterator *eolian_all_eo_file_paths_get(void); Eina_Iterator *eolian_all_eot_file_paths_get(void); Eina_Iterator *eolian_all_eo_files_get(void); @@ -448,7 +449,7 @@ M.system_directory_scan = function() end M.file_parse = function(fpath) -return eolian.eolian_file_parse(fpath) ~= 0 +return eolian.eolian_file_parse(fpath) end M.all_eo_files_parse = function() diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index e882f2ee71..630b0b487f 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -384,13 +384,13 @@ typedef struct _Eolian_Doc_Token * If it's a filename, it must be scanned for first. * * @param[in] filepath Path to the file to parse. - * @return EINA_TRUE on success, EINA_FALSE on failure. + * @return The unit corresponding to the parsed file or NULL. * * @see eolian_directory_scan * * @ingroup Eolian */ -EAPI Eina_Bool eolian_file_parse(const char *filepath); +EAPI const Eolian_Unit *eolian_file_parse(const char *filepath); /* * @brief Get an iterator to all .eo file names with paths. diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index b86b115689..afd52df193 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -687,12 +687,14 @@ _eolian_file_parse_nodep(const char *filepath) return eo_parser_database_fill(eopath, !is_eo); } -EAPI Eina_Bool +static Eolian_Unit unit_tmp; + +EAPI const Eolian_Unit * eolian_file_parse(const char *filepath) { const char *dep; if (!_eolian_file_parse_nodep(filepath)) - return EINA_FALSE; + return NULL; /* parse doc dependencies (deferred eo files) */ Eina_Iterator *itr = eina_hash_iterator_data_new(_defereos); EINA_ITERATOR_FOREACH(itr, dep) @@ -701,12 +703,12 @@ eolian_file_parse(const char *filepath) { eina_iterator_free(itr); eina_hash_free_buckets(_defereos); - return EINA_FALSE; + return NULL; } } eina_iterator_free(itr); eina_hash_free_buckets(_defereos); - return EINA_TRUE; + return _tmp; } static Eina_Bool _tfile_parse(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED, void *data, void *fdata) diff --git a/src/scripts/elua/modules/lualian.lua b/src/scripts/elua/modules/lualian.lua index f04779fa11..e8e6af541e 100644 --- a/src/scripts/elua/modules/lualian.lua +++ b/src/scripts/elua/modules/lualian.lua @@ -696,7 +696,7 @@ M.system_directory_scan = function() end M.generate = function(fname, fstream) -if not eolian.file_parse(fname) then +if eolian.file_parse(fname) == nil then error("Failed parsing file: " .. fname) end if not eolian.database_validate() then --
[EGIT] [core/efl] master 15/28: eolian: pass unit to enum get by name
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=67bc32d9aced9f486d703db2ed883f5958a1a8fb commit 67bc32d9aced9f486d703db2ed883f5958a1a8fb Author: Daniel KolesaDate: Thu May 25 15:15:04 2017 +0200 eolian: pass unit to enum get by name --- src/bin/eolian/docs.c | 2 +- src/bindings/luajit/eolian.lua | 6 +++--- src/lib/eolian/Eolian.h| 3 ++- src/lib/eolian/database_expr.c | 3 ++- src/lib/eolian/database_type_api.c | 3 ++- src/lib/eolian/eolian_database.c | 3 ++- src/tests/eolian/eolian_parsing.c | 10 +- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c index d200c7f458..2a293697c0 100644 --- a/src/bin/eolian/docs.c +++ b/src/bin/eolian/docs.c @@ -53,7 +53,7 @@ _generate_ref(const Eolian_Unit *src, const char *refn, Eina_Strbuf *wbuf, return; } - tp = eolian_typedecl_enum_get_by_name(bname); + tp = eolian_typedecl_enum_get_by_name(src, bname); if (tp) { const Eolian_Enum_Type_Field *efl = eolian_typedecl_enum_field_get(tp, sfx + 1); diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index c1a0fe601d..f20deecbce 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -299,7 +299,7 @@ ffi.cdef [[ const char *eolian_class_c_get_function_name_get(const Eolian_Class *klass); const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const Eolian_Unit *unit, const char *name); const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const Eolian_Unit *unit, const char *name); -const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const char *name); +const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const Eolian_Unit *unit, const char *name); Eina_Iterator *eolian_typedecl_aliases_get_by_file(const char *fname); Eina_Iterator *eolian_typedecl_structs_get_by_file(const char *fname); Eina_Iterator *eolian_typedecl_enums_get_by_file(const char *fname); @@ -1154,8 +1154,8 @@ M.typedecl_struct_get_by_name = function(unit, name) return v end -M.typedecl_enum_get_by_name = function(name) -local v = eolian.eolian_typedecl_enum_get_by_name(name) +M.typedecl_enum_get_by_name = function(unit, name) +local v = eolian.eolian_typedecl_enum_get_by_name(unit, name) if v == nil then return nil end return v end diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 2e29dd9bc4..d5fb437a65 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1392,12 +1392,13 @@ EAPI const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const Eolian_Unit /* * @brief Get an enum declaration by name. Supports namespaces. * + * @param[in] unit the unit to look in * @param[in] name the name of the struct * @return the struct or NULL * * @ingroup Eolian */ -EAPI const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const char *name); +EAPI const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const Eolian_Unit *unit, const char *name); /* * @brief Get an iterator to all aliases contained in a file. diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c index 1cb252660f..f0510ddc00 100644 --- a/src/lib/eolian/database_expr.c +++ b/src/lib/eolian/database_expr.c @@ -523,7 +523,8 @@ eval_exp(const Eolian_Expression *expr, Eolian_Expression_Mask mask, etpd = eolian_type_typedecl_get(etp); } -if (!etpd) etpd = eolian_typedecl_enum_get_by_name(fulln); +/* FIXME: pass unit properly */ +if (!etpd) etpd = eolian_typedecl_enum_get_by_name(NULL, fulln); if (!etpd || etpd->type != EOLIAN_TYPEDECL_ENUM) { free(fulln); diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index b589cb40aa..2261fa7b90 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -31,7 +31,8 @@ eolian_typedecl_struct_get_by_name(const Eolian_Unit *unit EINA_UNUSED, } EAPI const Eolian_Typedecl * -eolian_typedecl_enum_get_by_name(const char *name) +eolian_typedecl_enum_get_by_name(const Eolian_Unit *unit EINA_UNUSED, + const char *name) { if (!_enums) return NULL; Eina_Stringshare *shr = eina_stringshare_add(name); diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index 5cc260ac86..8b1c1f0bbb 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -553,7 +553,8 @@ eolian_doc_token_ref_get(const Eolian_Doc_Token *tok, const void **data, } /* try an enum field */ - tpd = eolian_typedecl_enum_get_by_name(name); + /* FIXME: pass unit properly */ + tpd = eolian_typedecl_enum_get_by_name(NULL, name); if (tpd)
[EGIT] [core/efl] master 07/28: eolian: make all variable lookups take unit
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=83bf422159750680e0b7ae9add94ad7e4bd0edba commit 83bf422159750680e0b7ae9add94ad7e4bd0edba Author: Daniel KolesaDate: Thu May 18 16:34:58 2017 +0200 eolian: make all variable lookups take unit --- src/bindings/luajit/eolian.lua| 12 ++-- src/lib/eolian/Eolian.h | 4 ++-- src/lib/eolian/database_var_api.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 603feaaebe..5defce5ef1 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -371,8 +371,8 @@ ffi.cdef [[ const Eolian_Variable *eolian_variable_constant_get_by_name(const Eolian_Unit *unit, const char *name); Eina_Iterator *eolian_variable_globals_get_by_file(const Eolian_Unit *unit, const char *fname); Eina_Iterator *eolian_variable_constants_get_by_file(const Eolian_Unit *unit, const char *fname); -Eina_Iterator *eolian_variable_all_constants_get(void); -Eina_Iterator *eolian_variable_all_globals_get(void); +Eina_Iterator *eolian_variable_all_constants_get(const Eolian_Unit *unit); +Eina_Iterator *eolian_variable_all_globals_get(const Eolian_Unit *unit); Eolian_Variable_Type eolian_variable_type_get(const Eolian_Variable *var); const Eolian_Documentation *eolian_variable_documentation_get(const Eolian_Variable *var); const char *eolian_variable_file_get(const Eolian_Variable *var); @@ -1384,14 +1384,14 @@ M.variable_constants_get_by_file = function(unit, fname) eolian.eolian_variable_constants_get_by_file(unit, fname)) end -M.variable_all_constants_get = function() +M.variable_all_constants_get = function(unit) return Ptr_Iterator("const Eolian_Variable *", -eolian.eolian_variable_all_constants_get()) +eolian.eolian_variable_all_constants_get(unit)) end -M.variable_all_globals_get = function() +M.variable_all_globals_get = function(unit) return Ptr_Iterator("const Eolian_Variable *", -eolian.eolian_variable_all_globals_get()) +eolian.eolian_variable_all_globals_get(unit)) end M.Variable = ffi.metatype("Eolian_Variable", { diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 7c5c1f8de6..2631e90715 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -2109,7 +2109,7 @@ EAPI Eina_Iterator *eolian_variable_constants_get_by_file(const Eolian_Unit *uni * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_variable_all_constants_get(void); +EAPI Eina_Iterator *eolian_variable_all_constants_get(const Eolian_Unit *unit); /* * @brief Get an iterator to all global variables in the Eolian database. @@ -2120,7 +2120,7 @@ EAPI Eina_Iterator *eolian_variable_all_constants_get(void); * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_variable_all_globals_get(void); +EAPI Eina_Iterator *eolian_variable_all_globals_get(const Eolian_Unit *unit); /* * @brief Get the type of a variable (global, constant) diff --git a/src/lib/eolian/database_var_api.c b/src/lib/eolian/database_var_api.c index cc93ac6174..a0c593d50d 100644 --- a/src/lib/eolian/database_var_api.c +++ b/src/lib/eolian/database_var_api.c @@ -52,13 +52,13 @@ eolian_variable_constants_get_by_file(const Eolian_Unit *unit EINA_UNUSED, } EAPI Eina_Iterator * -eolian_variable_all_constants_get(void) +eolian_variable_all_constants_get(const Eolian_Unit *unit EINA_UNUSED) { return (_constants ? eina_hash_iterator_data_new(_constants) : NULL); } EAPI Eina_Iterator * -eolian_variable_all_globals_get(void) +eolian_variable_all_globals_get(const Eolian_Unit *unit EINA_UNUSED) { return (_globals ? eina_hash_iterator_data_new(_globals) : NULL); } --
[EGIT] [core/efl] master 09/28: eolian: pass unit to all_classes_get
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9699d074bc4bfb40b87d96b2f7a80e9bb784a871 commit 9699d074bc4bfb40b87d96b2f7a80e9bb784a871 Author: Daniel KolesaDate: Wed May 24 17:28:48 2017 +0200 eolian: pass unit to all_classes_get --- src/bindings/luajit/eolian.lua | 6 +++--- src/lib/eolian/Eolian.h | 3 ++- src/lib/eolian/database_class_api.c | 2 +- src/lib/eolian/database_validate.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index f4d62850b8..c8cb85a809 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -237,7 +237,7 @@ ffi.cdef [[ const char *eolian_class_name_get(const Eolian_Class *klass); Eina_Iterator *eolian_class_namespaces_get(const Eolian_Class *klass); Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass); -Eina_Iterator *eolian_all_classes_get(void); +Eina_Iterator *eolian_all_classes_get(const Eolian_Unit *unit); const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass); const char *eolian_class_legacy_prefix_get(const Eolian_Class *klass); const char *eolian_class_eo_prefix_get(const Eolian_Class *klass); @@ -1020,9 +1020,9 @@ M.class_get_by_file = function(unit, fname) return v end -M.all_classes_get = function() +M.all_classes_get = function(unit) return Ptr_Iterator("const Eolian_Class*", -eolian.eolian_all_classes_get()) +eolian.eolian_all_classes_get(unit)) end M.class_type = { diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 89cb7ef8a2..266abed438 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -592,11 +592,12 @@ EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass); /* * @brief Returns an iterator to all the classes stored into the database. * + * @param[in] unit the unit to look in * @return the iterator * * @ingroup Eolian */ -EAPI Eina_Iterator *eolian_all_classes_get(void); +EAPI Eina_Iterator *eolian_all_classes_get(const Eolian_Unit *unit); /* * @brief Returns the documentation of a class. diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c index 674ceefd69..68e9338283 100644 --- a/src/lib/eolian/database_class_api.c +++ b/src/lib/eolian/database_class_api.c @@ -60,7 +60,7 @@ eolian_class_type_get(const Eolian_Class *cl) } EAPI Eina_Iterator * -eolian_all_classes_get(void) +eolian_all_classes_get(const Eolian_Unit *unit EINA_UNUSED) { return (_classes ? eina_hash_iterator_data_new(_classes) : NULL); } diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index 2b31d712d6..0b2c0ce155 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -324,7 +324,8 @@ database_validate() { const Eolian_Class *cl; - Eina_Iterator *iter = eolian_all_classes_get(); + /* FIXME: pass unit properly */ + Eina_Iterator *iter = eolian_all_classes_get(NULL); EINA_ITERATOR_FOREACH(iter, cl) if (!_validate_class(cl)) { --
[EGIT] [core/efl] master 01/28: eolian: initial structure for units
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5f4c2f7b798ec1eceae536471996e35768b8809a commit 5f4c2f7b798ec1eceae536471996e35768b8809a Author: Daniel KolesaDate: Thu May 11 16:35:19 2017 +0200 eolian: initial structure for units Units are Eolian files (eo/eot). Each unit contains information about its class, dependencies, variables and types. This allows for saner checking to be done. --- src/lib/eolian/Eolian.h | 6 ++ src/lib/eolian/eolian_database.c | 8 src/lib/eolian/eolian_database.h | 14 ++ 3 files changed, 28 insertions(+) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index c7b632434b..e882f2ee71 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -171,6 +171,12 @@ typedef struct _Eolian_Declaration Eolian_Declaration; */ typedef struct _Eolian_Documentation Eolian_Documentation; +/* Unit information + * + * @ingroup Eolian + */ +typedef struct _Eolian_Unit Eolian_Unit; + typedef enum { EOLIAN_UNRESOLVED = 0, diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index d4551e794d..b86b115689 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -23,6 +23,7 @@ Eina_Hash *_filenames = NULL; Eina_Hash *_tfilenames = NULL; Eina_Hash *_decls = NULL; Eina_Hash *_declsf = NULL; +Eina_Hash *_units = NULL; Eina_Hash *_parsedeos = NULL; Eina_Hash *_parsingeos = NULL; @@ -61,6 +62,7 @@ database_init() _parsedeos = eina_hash_string_small_new(NULL); _parsingeos = eina_hash_string_small_new(NULL); _defereos = eina_hash_string_small_new(NULL); + _units = eina_hash_stringshared_new(EINA_FREE_CB(database_unit_del)); return ++_database_init_count; } @@ -95,6 +97,7 @@ database_shutdown() eina_hash_free(_parsedeos ); _parsedeos = NULL; eina_hash_free(_parsingeos); _parsingeos = NULL; eina_hash_free(_defereos ); _defereos = NULL; +eina_hash_free(_units ); _units = NULL; eina_shutdown(); } return _database_init_count; @@ -592,6 +595,11 @@ eolian_doc_token_ref_get(const Eolian_Doc_Token *tok, const void **data, return EOLIAN_DOC_REF_FUNC; } +void +database_unit_del(Eolian_Unit *unit) +{ +} + #define EO_SUFFIX ".eo" #define EOT_SUFFIX ".eot" diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 9c54615f90..0feaaf7b61 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -279,6 +279,18 @@ struct _Eolian_Variable Eina_Bool is_extern :1; }; +struct _Eolian_Unit +{ + Eolian_Object base; + Eolian_Class *klass; + Eina_List *dependencies; + Eina_List *globals; + Eina_List *constants; + Eina_List *aliases; + Eina_List *structs; + Eina_List *enums; +}; + int database_init(void); int database_shutdown(void); @@ -290,6 +302,8 @@ void database_decl_add(Eina_Stringshare *name, Eolian_Declaration_Type type, void database_doc_del(Eolian_Documentation *doc); +void database_unit_del(Eolian_Unit *unit); + /* types */ void database_type_add(Eolian_Typedecl *def); --
[EGIT] [core/efl] master 11/28: elua: update for unit api usage
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bf2ac6c93710f36882f91c7895a04bb8dce8ce3d commit bf2ac6c93710f36882f91c7895a04bb8dce8ce3d Author: Daniel KolesaDate: Wed May 24 17:40:51 2017 +0200 elua: update for unit api usage --- src/scripts/elua/modules/lualian.lua | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/scripts/elua/modules/lualian.lua b/src/scripts/elua/modules/lualian.lua index e8e6af541e..cfcb1484d9 100644 --- a/src/scripts/elua/modules/lualian.lua +++ b/src/scripts/elua/modules/lualian.lua @@ -15,6 +15,8 @@ local func_type = eolian.function_type local obj_scope = eolian.object_scope local param_dir = eolian.parameter_dir +local gen_unit + cutil.init_module(function() dom = log.Domain("lualian") if not dom:is_valid() then @@ -669,7 +671,7 @@ local gen_class = function(klass) local mixins = {} -- also includes ifaces, they're separated later for i = 1, #inherits do local v = inherits[i] -local tp = eolian.class_get_by_name(v):type_get() +local tp = eolian.class_get_by_name(gen_unit, v):type_get() if tp == class_type.REGULAR or tp == class_type.ABSTRACT then parents[#parents + 1] = v elseif tp == class_type.INTERFACE or tp == class_type.MIXIN then @@ -696,14 +698,16 @@ M.system_directory_scan = function() end M.generate = function(fname, fstream) -if eolian.file_parse(fname) == nil then +local unit = eolian.file_parse(fname) +if unit == nil then error("Failed parsing file: " .. fname) end +gen_unit = unit if not eolian.database_validate() then error("Failed validating database.") end local sfn = fname:match(".*[\\/](.+)$") or fname -local klass = eolian.class_get_by_file(sfn) +local klass = eolian.class_get_by_file(unit, sfn) File(fname, klass, { gen_class(klass) }):generate(fstream or io.stdout) end --
[EGIT] [core/efl] master 18/28: eolian: update lua bindings with new unit apis
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0bf6fd629757ce57b328c9160696e65323e8cbfb commit 0bf6fd629757ce57b328c9160696e65323e8cbfb Author: Daniel KolesaDate: Thu May 25 15:20:12 2017 +0200 eolian: update lua bindings with new unit apis --- src/bindings/luajit/eolian.lua | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index f20deecbce..25fd292e36 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -300,12 +300,12 @@ ffi.cdef [[ const Eolian_Typedecl *eolian_typedecl_alias_get_by_name(const Eolian_Unit *unit, const char *name); const Eolian_Typedecl *eolian_typedecl_struct_get_by_name(const Eolian_Unit *unit, const char *name); const Eolian_Typedecl *eolian_typedecl_enum_get_by_name(const Eolian_Unit *unit, const char *name); -Eina_Iterator *eolian_typedecl_aliases_get_by_file(const char *fname); -Eina_Iterator *eolian_typedecl_structs_get_by_file(const char *fname); -Eina_Iterator *eolian_typedecl_enums_get_by_file(const char *fname); -Eina_Iterator *eolian_typedecl_all_aliases_get(void); -Eina_Iterator *eolian_typedecl_all_structs_get(void); -Eina_Iterator *eolian_typedecl_all_enums_get(void); +Eina_Iterator *eolian_typedecl_aliases_get_by_file(const Eolian_Unit *unit, const char *fname); +Eina_Iterator *eolian_typedecl_structs_get_by_file(const Eolian_Unit *unit, const char *fname); +Eina_Iterator *eolian_typedecl_enums_get_by_file(const Eolian_Unit *unit, const char *fname); +Eina_Iterator *eolian_typedecl_all_aliases_get(const Eolian_Unit *unit); +Eina_Iterator *eolian_typedecl_all_structs_get(const Eolian_Unit *unit); +Eina_Iterator *eolian_typedecl_all_enums_get(const Eolian_Unit *unit); Eolian_Type_Type eolian_type_type_get(const Eolian_Type *tp); Eolian_Typedecl_Type eolian_typedecl_type_get(const Eolian_Typedecl *tp); Eina_Iterator *eolian_typedecl_struct_fields_get(const Eolian_Typedecl *tp); @@ -1160,34 +1160,34 @@ M.typedecl_enum_get_by_name = function(unit, name) return v end -M.typedecl_aliases_get_by_file = function(fname) +M.typedecl_aliases_get_by_file = function(unit, fname) return Ptr_Iterator("const Eolian_Typedecl *", -eolian.eolian_type_aliases_get_by_file(self)) +eolian.eolian_type_aliases_get_by_file(unit, self)) end -M.typedecl_structs_get_by_file = function(fname) +M.typedecl_structs_get_by_file = function(unit, fname) return Ptr_Iterator("const Eolian_Typedecl *", -eolian.eolian_type_structs_get_by_file(self)) +eolian.eolian_type_structs_get_by_file(unit, self)) end -M.typedecl_enums_get_by_file = function(fname) +M.typedecl_enums_get_by_file = function(unit, fname) return Ptr_Iterator("const Eolian_Typedecl *", -eolian.eolian_type_enums_get_by_file(self)) +eolian.eolian_type_enums_get_by_file(unit, self)) end -M.typedecl_all_aliases_get = function() +M.typedecl_all_aliases_get = function(unit) return Ptr_Iterator("const Eolian_Typedecl *", -eolian.eolian_typedecl_all_aliases_get()) +eolian.eolian_typedecl_all_aliases_get(unit)) end -M.typedecl_all_structs_get = function() +M.typedecl_all_structs_get = function(unit) return Ptr_Iterator("const Eolian_Typedecl *", -eolian.eolian_typedecl_all_structs_get()) +eolian.eolian_typedecl_all_structs_get(unit)) end -M.typedecl_all_enums_get = function() +M.typedecl_all_enums_get = function(unit) return Ptr_Iterator("const Eolian_Typedecl *", -eolian.eolian_typedecl_all_enums_get()) +eolian.eolian_typedecl_all_enums_get(unit)) end M.expression_type = { --
[EGIT] [core/efl] master 05/28: eolian: make by-name variable lookups take unit
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=653cf6bac37f6d74bd18d1088a7fb2ce6d661bc2 commit 653cf6bac37f6d74bd18d1088a7fb2ce6d661bc2 Author: Daniel KolesaDate: Thu May 18 16:31:03 2017 +0200 eolian: make by-name variable lookups take unit --- src/bindings/luajit/eolian.lua| 12 ++-- src/lib/eolian/Eolian.h | 6 -- src/lib/eolian/database_expr.c| 3 ++- src/lib/eolian/database_var_api.c | 6 -- src/tests/eolian/eolian_parsing.c | 23 +-- 5 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index d98e047c19..8177aa5f78 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -367,8 +367,8 @@ ffi.cdef [[ Eolian_Unary_Operator eolian_expression_unary_operator_get(const Eolian_Expression *expr); const Eolian_Expression *eolian_expression_unary_expression_get(const Eolian_Expression *expr); Eolian_Value_t eolian_expression_value_get(const Eolian_Expression *expr); -const Eolian_Variable *eolian_variable_global_get_by_name(const char *name); -const Eolian_Variable *eolian_variable_constant_get_by_name(const char *name); +const Eolian_Variable *eolian_variable_global_get_by_name(const Eolian_Unit *unit, const char *name); +const Eolian_Variable *eolian_variable_constant_get_by_name(const Eolian_Unit *unit, const char *name); Eina_Iterator *eolian_variable_globals_get_by_file(const char *fname); Eina_Iterator *eolian_variable_constants_get_by_file(const char *fname); Eina_Iterator *eolian_variable_all_constants_get(void); @@ -1362,14 +1362,14 @@ M.Expression = ffi.metatype("Eolian_Expression", { } }) -M.variable_global_get_by_name = function(name) -local v = eolian.eolian_variable_global_get_by_name(name) +M.variable_global_get_by_name = function(unit, name) +local v = eolian.eolian_variable_global_get_by_name(unit, name) if v == nil then return nil end return v end -M.variable_constant_get_by_name = function(name) -local v = eolian.eolian_variable_constant_get_by_name(name) +M.variable_constant_get_by_name = function(unit, name) +local v = eolian.eolian_variable_constant_get_by_name(unit, name) if v == nil then return nil end return v end diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 630b0b487f..08592a8b39 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -2055,22 +2055,24 @@ EAPI Eolian_Value eolian_expression_value_get(const Eolian_Expression *expr); /* * @brief Get a global variable by name. Supports namespaces. * + * @param[in] unit the unit to look in * @param[in] name the name of the variable * @return the variable handle or NULL * * @ingroup Eolian */ -EAPI const Eolian_Variable *eolian_variable_global_get_by_name(const char *name); +EAPI const Eolian_Variable *eolian_variable_global_get_by_name(const Eolian_Unit *unit, const char *name); /* * @brief Get a constant variable by name. Supports namespaces. * + * @param[in] unit the unit to look in * @param[in] name the name of the variable * @return the variable handle or NULL * * @ingroup Eolian */ -EAPI const Eolian_Variable *eolian_variable_constant_get_by_name(const char *name); +EAPI const Eolian_Variable *eolian_variable_constant_get_by_name(const Eolian_Unit *unit, const char *name); /* * @brief Get an iterator to all global variables contained in a file. diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c index 45f89a9530..5717f8bffd 100644 --- a/src/lib/eolian/database_expr.c +++ b/src/lib/eolian/database_expr.c @@ -493,8 +493,9 @@ eval_exp(const Eolian_Expression *expr, Eolian_Expression_Mask mask, } case EOLIAN_EXPR_NAME: { + /* FIXME: pass unit properly */ const Eolian_Variable *var = eolian_variable_constant_get_by_name - (expr->value.s); + (NULL, expr->value.s); const Eolian_Expression *exp = NULL; if (!var) diff --git a/src/lib/eolian/database_var_api.c b/src/lib/eolian/database_var_api.c index 0e1af2dbe1..4842ec5959 100644 --- a/src/lib/eolian/database_var_api.c +++ b/src/lib/eolian/database_var_api.c @@ -6,7 +6,8 @@ #include "eolian_database.h" EAPI const Eolian_Variable * -eolian_variable_global_get_by_name(const char *name) +eolian_variable_global_get_by_name(const Eolian_Unit *unit EINA_UNUSED, + const char *name) { if (!_globals) return NULL; Eina_Stringshare *shr = eina_stringshare_add(name); @@ -16,7 +17,8 @@ eolian_variable_global_get_by_name(const char *name) } EAPI const Eolian_Variable * -eolian_variable_constant_get_by_name(const char *name) +eolian_variable_constant_get_by_name(const Eolian_Unit *unit EINA_UNUSED, +
[EGIT] [core/efl] master 24/28: eolian: pass unit in internal type serialization
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d4c835545b59259a0a4fd0c9ed86b46b616b264e commit d4c835545b59259a0a4fd0c9ed86b46b616b264e Author: Daniel KolesaDate: Fri May 26 15:04:49 2017 +0200 eolian: pass unit in internal type serialization --- src/lib/eolian/database_type.c | 11 ++- src/lib/eolian/database_type_api.c | 3 ++- src/lib/eolian/eolian_database.h | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 761f723d64..0b2202383a 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -147,7 +147,8 @@ _stype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf) } static void -_etype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf) +_etype_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp, + Eina_Strbuf *buf) { Eolian_Enum_Type_Field *ef; Eina_List *l; @@ -165,8 +166,7 @@ _etype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf) eina_strbuf_append(buf, ef->name); if (ef->value) { - /* FIXME: pass unit properly */ - Eolian_Value val = eolian_expression_eval(NULL, ef->value, + Eolian_Value val = eolian_expression_eval(src, ef->value, EOLIAN_MASK_INT); const char *ret; eina_strbuf_append(buf, " = "); @@ -217,7 +217,8 @@ _atype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf) } void -database_typedecl_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf) +database_typedecl_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp, + Eina_Strbuf *buf) { switch (tp->type) { @@ -225,7 +226,7 @@ database_typedecl_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf) _atype_to_str(tp, buf); break; case EOLIAN_TYPEDECL_ENUM: -_etype_to_str(tp, buf); +_etype_to_str(src, tp, buf); break; case EOLIAN_TYPEDECL_STRUCT: case EOLIAN_TYPEDECL_STRUCT_OPAQUE: diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index 2c8fd9a133..d1dcc4fed0 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -374,7 +374,8 @@ eolian_typedecl_c_type_get(const Eolian_Typedecl *tp) Eina_Strbuf *buf; EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL); buf = eina_strbuf_new(); - database_typedecl_to_str(tp, buf); + /* FIXME: pass unit properly */ + database_typedecl_to_str(NULL, tp, buf); ret = eina_stringshare_add(eina_strbuf_string_get(buf)); eina_strbuf_free(buf); return ret; diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index 263e207b0d..85ac333cbd 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -312,7 +312,7 @@ void database_type_del(Eolian_Type *tp); void database_typedecl_del(Eolian_Typedecl *tp); void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name); -void database_typedecl_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf); +void database_typedecl_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp, Eina_Strbuf *buf); /* expressions */ --
[EGIT] [core/efl] master 28/28: eolian: add new unit API
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=43eb1b16303dc0c413d9bd9b35c726e5798b4acb commit 43eb1b16303dc0c413d9bd9b35c726e5798b4acb Merge: bd189f69f2 cc7b354db2 Author: Daniel KolesaDate: Tue May 30 17:18:31 2017 +0200 eolian: add new unit API The idea of units (as in translation units) is to encapsulate a single parser pass into a structure to prevent leakage of data from other passes (therefore catching error cases that couldn't be caught before). The internals of the unit system are currently not implemented, this batch merely switches all the relevant APIs to use units as well as updates various things that use those APIs; implementation will come afterwards. @feature src/bin/eolian/docs.c| 73 ++- src/bin/eolian/docs.h| 6 +- src/bin/eolian/headers.c | 22 ++-- src/bin/eolian/headers.h | 2 +- src/bin/eolian/main.c| 46 --- src/bin/eolian/sources.c | 34 ++--- src/bin/eolian/sources.h | 4 +- src/bin/eolian/types.c | 35 ++--- src/bin/eolian/types.h | 7 +- src/bindings/luajit/eolian.lua | 147 +++-- src/lib/eolian/Eolian.h | 77 +++ src/lib/eolian/database_class_api.c | 8 +- src/lib/eolian/database_expr.c | 58 src/lib/eolian/database_expr_api.c | 31 +++-- src/lib/eolian/database_type.c | 10 +- src/lib/eolian/database_type_api.c | 32 +++-- src/lib/eolian/database_validate.c | 14 +- src/lib/eolian/database_var_api.c| 16 ++- src/lib/eolian/eo_parser.c | 6 +- src/lib/eolian/eolian_database.c | 35 +++-- src/lib/eolian/eolian_database.h | 17 ++- src/scripts/elua/apps/docgen/doctree.lua | 73 +++ src/scripts/elua/modules/lualian.lua | 10 +- src/tests/eolian/eolian_parsing.c| 219 +-- 24 files changed, 563 insertions(+), 419 deletions(-) --
[EGIT] [core/efl] master 01/03: ecore-drm2: Remove useless return
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ac2c82b87116a11aaac2e200cdfb60b716059171 commit ac2c82b87116a11aaac2e200cdfb60b716059171 Author: Chris MichaelDate: Tue May 30 10:59:25 2017 -0400 ecore-drm2: Remove useless return This 'return' statement here is just useless as the code can fall through and the function will return 0 anwyay. Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_fb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index f2c54e3057..59e2c5a214 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c @@ -524,7 +524,6 @@ _fb_flip(Ecore_Drm2_Output *output) { output->next.fb = fb; _ecore_drm2_fb_ref(output->next.fb); -return 0; } return 0; --
[EGIT] [core/efl] master 03/03: ecore-drm2: Don't fill device atomic state if atomic is disabled
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bd189f69f2926b479b334c30650606645d7fa245 commit bd189f69f2926b479b334c30650606645d7fa245 Author: Chris MichaelDate: Tue May 30 11:01:22 2017 -0400 ecore-drm2: Don't fill device atomic state if atomic is disabled If atomic support is disabled (via kernel or env var), then we do not need to fill device atomic state as it will not be used anyway. @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_device.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 73805c82b4..41d2128604 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -639,9 +639,12 @@ ecore_drm2_device_open(Ecore_Drm2_Device *device) } } - device->state = calloc(1, sizeof(Ecore_Drm2_Atomic_State)); - if (device->state) - _drm2_atomic_state_fill(device->state, device->fd); + if (_ecore_drm2_use_atomic) + { +device->state = calloc(1, sizeof(Ecore_Drm2_Atomic_State)); +if (device->state) + _drm2_atomic_state_fill(device->state, device->fd); + } device->active_hdlr = ecore_event_handler_add(ELPUT_EVENT_SESSION_ACTIVE, @@ -674,7 +677,8 @@ ecore_drm2_device_free(Ecore_Drm2_Device *device) { EINA_SAFETY_ON_NULL_RETURN(device); - _drm2_atomic_state_free(device->state); + if (_ecore_drm2_use_atomic) + _drm2_atomic_state_free(device->state); ecore_event_handler_del(device->active_hdlr); ecore_event_handler_del(device->device_change_hdlr); --
[EGIT] [core/efl] master 02/03: ecore-drm2: Don't fill output atomic states if not using atomic
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ba4042da1e25ee8ff0f95be242b5a865a0141669 commit ba4042da1e25ee8ff0f95be242b5a865a0141669 Author: Chris MichaelDate: Tue May 30 11:00:20 2017 -0400 ecore-drm2: Don't fill output atomic states if not using atomic If atomic support is not enabled (kernel or env var), then we should not be filling in output atomic state @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm2/ecore_drm2_outputs.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index ae1a0c9654..3173165aa5 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -766,12 +766,15 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne output->ocrtc = sym_drmModeGetCrtc(dev->fd, output->crtc_id); - output->crtc_state = - _output_crtc_state_get(dev->state, output->crtc_id); - output->conn_state = - _output_conn_state_get(dev->state, output->conn_id); - output->plane_states = - _output_plane_states_get(dev->state, output->crtc_id, output->pipe); + if (_ecore_drm2_use_atomic) + { +output->crtc_state = + _output_crtc_state_get(dev->state, output->crtc_id); +output->conn_state = + _output_conn_state_get(dev->state, output->conn_id); +output->plane_states = + _output_plane_states_get(dev->state, output->crtc_id, output->pipe); + } output->dpms = _output_dpms_property_get(dev->fd, conn); @@ -926,8 +929,11 @@ _output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output) EINA_LIST_FREE(output->planes, plane) free(plane); - free(output->conn_state); - free(output->crtc_state); + if (_ecore_drm2_use_atomic) + { +free(output->conn_state); +free(output->crtc_state); + } EINA_LIST_FREE(output->modes, mode) { --
[EGIT] [core/efl] master 01/01: efl_ui_image_zoomable: fix wrong initial value for zoom mode
ami pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e7b302d89fd4e145b997efb9dc6b4430b7c91a02 commit e7b302d89fd4e145b997efb9dc6b4430b7c91a02 Author: Taehyub KimDate: Tue May 30 20:33:16 2017 +0900 efl_ui_image_zoomable: fix wrong initial value for zoom mode Summary: fix wrong initial value for ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL mode @fix Test Plan: 1. set zoom mode of photocam to ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL in text_photocam.c example 2. run elementary_test -to photocam 3. check it is working well Reviewers: jpeg, cedric, raster, Hermet, singh.amitesh Reviewed By: singh.amitesh Differential Revision: https://phab.enlightenment.org/D4921 --- src/lib/elementary/efl_ui_image_zoomable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index 8a93f6521f..ff1d944626 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -1944,7 +1944,7 @@ _efl_ui_image_zoomable_efl_ui_zoom_zoom_set(Eo *obj, Efl_Ui_Image_Zoomable_Data if ((sd->size.imw < 1) || (sd->size.imh < 1)) { sd->size.nw = 0; - sd->size.nw = 0; + sd->size.nh = 0; } else { --
[EGIT] [core/efl] master 01/01: evas: Fix don't redraw map_sufarce issue
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e250a27922ade39b098b4fc5235ce304482e8f64 commit e250a27922ade39b098b4fc5235ce304482e8f64 Author: jiin.moonDate: Tue May 30 19:25:37 2017 +0900 evas: Fix don't redraw map_sufarce issue Summary: map_surface does not redraw in below case. 1) parent and child are smart object and has map. 3) drawing objects. 4) apply new map to child object. Test Plan: sample code Reviewers: jpeg, cedric, jypark Differential Revision: https://phab.enlightenment.org/D4889 --- src/lib/evas/canvas/evas_map.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c index df84657b96..09e65d853e 100644 --- a/src/lib/evas/canvas/evas_map.c +++ b/src/lib/evas/canvas/evas_map.c @@ -543,6 +543,10 @@ evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map) !memcmp(>persp, >map->cur.map->persp, sizeof(map->persp))) return; } + /* changed_pchange means map's change. + * This flag will be used to decide whether to redraw the map surface. + * And value of flag would be EINA_FALSE after rendering. */ + obj->changed_pchange = EINA_TRUE; if ((!map) || (map->count < 4)) { --
[EGIT] [core/efl] master 01/01: evas: Set modifiers & locks on global key events
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=eb27724eb9c32a954c2f75b45307a207d0ea6fca commit eb27724eb9c32a954c2f75b45307a207d0ea6fca Author: Jean-Philippe AndreDate: Tue May 30 19:16:48 2017 +0900 evas: Set modifiers & locks on global key events Fixes T5510 --- src/lib/evas/canvas/evas_events.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index afab40fcbd..c73e81cfd4 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -4004,6 +4004,9 @@ _evas_canvas_event_key_cb(void *data, const Efl_Event *event) ev->device = _evas_event_legacy_device_get(e->evas, EINA_FALSE); } + ev->modifiers = >modifiers; + ev->locks = >locks; + if (ev->pressed) _canvas_event_feed_key_down_internal(e, ev); else --
[E-devel] efl_part and composition
Hello, I have a bit of a technical question here. You may want to skip this if you're not familiar with efl_part and efl_composite_attach. I'm currently working on T5315 also known as "Refactoring Edje/Elm_Layout". The goal is to provide a uniform, simple API for both edje and elm_layout objects. Yesterday I've worked on EO API for EXTERNAL parts. Those parts are similar to swallows except that they are filled in automatically with widgets such as "elm/button" or "elm/slider". As a consequence, each EXTERNAL will support a certain, unknown, set of APIs. There is a "param_set" API that allows setting specific parameters on those externals, such as "label" which is the text of a button. But those APIs (currently) don't cover all the APIs supported by a widget, and anyway are limited to int/bool/double/string values (eina_value in a more general case). So a solution to exposing as much functionality as possible is to expose the internal widget directly. This is edje_object_part_external_object_get(). All "part" APIs in Edje.Object are meant to be implemented with efl_part(). Going forward with EO API I see 3 solutions: #1. Do not expose the widget at all, hope that someday we can expose all useful features through generic parameter API. #2. Expose the internal widget directly (i.e. edje_object_part_external_object_get () or efl_content_get()) #3. Expose the widget API through composition, but not the widget itself. Point #3 requires explanation: efl_part(edje, "partname") returns a temporary object of a subtype of class Efl.Canvas.Layout.Part. This object is meant to be used for a single function call. But in this case, we can compose it with the real widget with efl_composite_attach(). Then all the functions of the widget are available on the part handle, except Efl.Object base functions (eg. wref, data, events, etc...) Right now I've implementewd both #2 and #3. I'm kind of happy with both, but would like your opinions. In particular, #3 could be used as a common pattern with efl_part() but it has the downside of overexposing internal features. Thanks in advance! -- Jean-Philippe André -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[EGIT] [core/efl] master 01/01: elm_code: fix wrong selection delete
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0b67bfc0315fdf7fed800652d10b76b7a17a7051 commit 0b67bfc0315fdf7fed800652d10b76b7a17a7051 Author: YeongJong LeeDate: Tue May 30 08:33:10 2017 +0100 elm_code: fix wrong selection delete Summary: If multi selection have 0 column and delete the selection, 0 + 1 column also deleted This fix that bug. Also, remove needless code. Test Plan: 1. select multi line with 0 column. 2. delete the selection Reviewers: ajwillia.ms Reviewed By: ajwillia.ms Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4922 --- src/lib/elementary/elm_code_widget_selection.c | 25 +-- .../elementary/elm_code_test_widget_selection.c| 50 -- 2 files changed, 56 insertions(+), 19 deletions(-) diff --git a/src/lib/elementary/elm_code_widget_selection.c b/src/lib/elementary/elm_code_widget_selection.c index c8c1dacde8..9cac479d3e 100644 --- a/src/lib/elementary/elm_code_widget_selection.c +++ b/src/lib/elementary/elm_code_widget_selection.c @@ -186,7 +186,8 @@ _elm_code_widget_selection_delete_multi(Elm_Code_Widget *widget, Elm_Code_Widget { Elm_Code_Line *line; const char *first, *last; - unsigned int last_length, start, end, length, i; + unsigned int last_length, start, length, i; + int end; char *content; Elm_Code_Widget_Selection_Data *selection; @@ -200,22 +201,16 @@ _elm_code_widget_selection_delete_multi(Elm_Code_Widget *widget, Elm_Code_Widget line = elm_code_file_line_get(pd->code->file, selection->end_line); last = elm_code_line_text_get(line, _length); - end = elm_code_widget_line_text_position_for_column_get(widget, line, selection->end_col); + end = (int)elm_code_widget_line_text_position_for_column_get(widget, line, selection->end_col); - if (last_length == end) - { -length = start + last_length - end; -content = malloc(sizeof(char) * length); -strncpy(content, first, start); - } - else - { -length = start + last_length - (end + 1); -content = malloc(sizeof(char) * length); -strncpy(content, first, start); + if (selection->end_col == 0) + end = -1; -strncpy(content + start, last + end + 1, last_length - (end + 1)); - } + length = start + last_length - (end + 1); + content = malloc(sizeof(char) * length); + strncpy(content, first, start); + if (last_length > 0) + strncpy(content + start, last + end + 1, last_length - (end + 1)); for (i = line->number; i > selection->start_line; i--) elm_code_file_line_remove(pd->code->file, i); diff --git a/src/tests/elementary/elm_code_test_widget_selection.c b/src/tests/elementary/elm_code_test_widget_selection.c index e394300af6..db046a0155 100644 --- a/src/tests/elementary/elm_code_test_widget_selection.c +++ b/src/tests/elementary/elm_code_test_widget_selection.c @@ -346,13 +346,14 @@ START_TEST (elm_code_test_widget_selection_delete_twoline) file = elm_code_file_new(code); elm_code_file_line_append(file, "text", 4, NULL); elm_code_file_line_append(file, "TEXT", 4, NULL); + elm_code_file_line_append(file, "remove", 6, NULL); win = elm_win_add(NULL, "code", ELM_WIN_BASIC); widget = elm_code_widget_add(win, code); line = elm_code_file_line_get(file, 1); text = elm_code_line_text_get(line, NULL); ck_assert_str_eq("text", text); - ck_assert_int_eq(2, elm_code_file_lines_get(file)); + ck_assert_int_eq(3, elm_code_file_lines_get(file)); elm_code_widget_selection_start(widget, 1, 3); elm_code_widget_selection_end(widget, 2, 2); @@ -361,6 +362,15 @@ START_TEST (elm_code_test_widget_selection_delete_twoline) line = elm_code_file_line_get(file, 1); text = elm_code_line_text_get(line, ); ck_assert_strn_eq("teXT", text, length); + ck_assert_int_eq(2, elm_code_file_lines_get(file)); + + elm_code_widget_selection_start(widget, 1, 5); + elm_code_widget_selection_end(widget, 2, 0); + elm_code_widget_selection_delete(widget); + + line = elm_code_file_line_get(file, 1); + text = elm_code_line_text_get(line, ); + ck_assert_strn_eq("teXTremove", text, length); ck_assert_int_eq(1, elm_code_file_lines_get(file)); elm_code_free(code); @@ -383,13 +393,14 @@ START_TEST (elm_code_test_widget_selection_reverse_delete_twoline) file = elm_code_file_new(code); elm_code_file_line_append(file, "text", 4, NULL); elm_code_file_line_append(file, "TEXT", 4, NULL); + elm_code_file_line_append(file, "remove", 6, NULL); win = elm_win_add(NULL, "code", ELM_WIN_BASIC); widget = elm_code_widget_add(win, code); line = elm_code_file_line_get(file, 1); text = elm_code_line_text_get(line, NULL); ck_assert_str_eq("text", text); - ck_assert_int_eq(2, elm_code_file_lines_get(file)); +
[EGIT] [tools/edi] master 01/01: edi_file_screens: refactor UI create/rm/rdir and add directory and file renaming method.
ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=37759291c540bcf1b3db493ed632fcfa0eb45d1e commit 37759291c540bcf1b3db493ed632fcfa0eb45d1e Author: Al PooleDate: Tue May 30 08:30:24 2017 +0100 edi_file_screens: refactor UI create/rm/rdir and add directory and file renaming method. Summary: Add this to the filepanel menus also. Reviewers: ajwillia.ms Differential Revision: https://phab.enlightenment.org/D4920 --- src/bin/Makefile.am| 2 + src/bin/edi_file.c | 187 - src/bin/edi_file.h | 21 +-- src/bin/edi_filepanel.c| 25 ++- src/bin/edi_main.c | 7 +- src/bin/{edi_file.c => screens/edi_file_screens.c} | 145 src/bin/{edi_file.h => screens/edi_file_screens.h} | 29 ++-- 7 files changed, 154 insertions(+), 262 deletions(-) diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 60169a6..97a3d66 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -26,6 +26,7 @@ language/edi_language_provider.h \ editor/edi_editor.h \ edi_content_provider.h \ screens/edi_screens.h \ +screens/edi_file_screens.h \ edi_filepanel.h \ edi_file.h \ edi_logpanel.h \ @@ -46,6 +47,7 @@ screens/edi_welcome.c \ screens/edi_about.c \ screens/edi_settings_font.c \ screens/edi_settings.c \ +screens/edi_file_screens.c \ edi_filepanel.c \ edi_file.c \ edi_logpanel.c \ diff --git a/src/bin/edi_file.c b/src/bin/edi_file.c index 1a06d8b..fe7ada0 100644 --- a/src/bin/edi_file.c +++ b/src/bin/edi_file.c @@ -1,11 +1,7 @@ #include "Edi.h" -#include "mainview/edi_mainview.h" #include "edi_file.h" #include "edi_private.h" -static Evas_Object *_parent_obj, *_popup, *_popup_dir, *_edi_file_message_popup; -static const char *_directory_path; - Eina_Bool edi_file_path_hidden(const char *path) { @@ -21,186 +17,3 @@ edi_file_path_hidden(const char *path) return EINA_FALSE; } -static void -_edi_file_message_close_cb(void *data EINA_UNUSED, - Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - Evas_Object *popup = data; - evas_object_del(popup); -} - -static void -_edi_file_message_open(const char *message) -{ - Evas_Object *popup, *button; - - _edi_file_message_popup = popup = elm_popup_add(_parent_obj); - elm_object_part_text_set(popup, "title,text", - message); - - button = elm_button_add(popup); - elm_object_text_set(button, "Ok"); - elm_object_part_content_set(popup, "button1", button); - evas_object_smart_callback_add(button, "clicked", - _edi_file_message_close_cb, popup); - - evas_object_show(popup); -} - -static void -_edi_file_popup_cancel_cb(void *data, Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - evas_object_del((Evas_Object *)data); - eina_stringshare_del(_directory_path); - _directory_path = NULL; -} - -static void -_edi_file_create_file_cb(void *data, - Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - const char *name; - char *path; - const char *directory = _directory_path; - FILE *f; - - if (!ecore_file_is_dir(directory)) - return; - - name = elm_entry_entry_get((Evas_Object *) data); - if (!name || strlen(name) == 0) - { -_edi_file_message_open("Please enter a file name."); -return; - } - - path = edi_path_append(directory, name); - if ((ecore_file_exists(path) && ecore_file_is_dir(path)) || - !ecore_file_exists(path)) - { -f = fopen(path, "w"); -if (f) - { - fclose(f); - edi_mainview_open_path(path); - } -else - _edi_file_message_open("Unable to write file."); - } - - eina_stringshare_del(_directory_path); - _directory_path = NULL; - - evas_object_del(_popup); - free(path); -} - -static void -_edi_file_create_dir_cb(void *data, - Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - const char *name; - char *path; - const char *directory = _directory_path; - - if (!ecore_file_is_dir(directory)) return; - - name = elm_entry_entry_get((Evas_Object *) data); - if (!name || strlen(name) == 0) - { -_edi_file_message_open("Please enter a directory name."); -return; - } - - path = edi_path_append(directory, name); - - mkdir(path, 0755); - - eina_stringshare_del(_directory_path); - _directory_path = NULL; - - evas_object_del(_popup_dir); - free(path); -} - -void -edi_file_create_file(Evas_Object *parent, const char *directory) -{ - Evas_Object *popup, *box, *input, *button; - - _parent_obj
[EGIT] [core/efl] master 01/01: elm_toolbar: added to ensure different sizes of items in shrink mode.
jaehyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a4e54adb0c329c149ac03233aaf4c3d4c69b8b01 commit a4e54adb0c329c149ac03233aaf4c3d4c69b8b01 Author: Bowon RyuDate: Fri May 26 13:01:56 2017 +0900 elm_toolbar: added to ensure different sizes of items in shrink mode. Change-Id: I9f8a14e77a8859c9a7543e442f8355d5ef5c0d3d Signed-off-by: Bowon Ryu --- src/lib/elementary/elm_toolbar.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 95b57e0c9c..8db974b6fe 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -3514,6 +3514,12 @@ _elm_toolbar_shrink_mode_set(Eo *obj, Elm_Toolbar_Data *sd, Elm_Toolbar_Shrink_M sd->more_item = _item_new(obj, "go-down", "More", NULL, NULL); _resizing_eval_item(sd->more_item); } + else if (shrink_mode == ELM_TOOLBAR_SHRINK_SCROLL) + { +elm_toolbar_homogeneous_set(obj, EINA_FALSE); +elm_interface_scrollable_policy_set + (obj, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF); + } else elm_interface_scrollable_policy_set (obj, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF); --
[EGIT] [core/efl] master 01/01: elm_widget: optimize memory alignment for focus related fields
conr2d pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=74ef504aa85dfe0a01e3117fa3fdcebd4a341526 commit 74ef504aa85dfe0a01e3117fa3fdcebd4a341526 Author: Jeeyong UmDate: Tue May 30 15:36:17 2017 +0900 elm_widget: optimize memory alignment for focus related fields --- src/lib/elementary/elm_widget.h | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index f9aa7a0e55..fa391c637b 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -432,6 +432,19 @@ typedef struct _Elm_Widget_Smart_Data Elm_Focus_Move_Policy focus_move_policy; Elm_Focus_Region_Show_Modefocus_region_show_mode; + struct { + Efl_Ui_Focus_Manager *manager; //manager which is currently regsitered in + Eina_Bool logical; + } focus; + struct { + int child_count; + Efl_Ui_Focus_Object *parent; + } logical; + struct { + Efl_Ui_Focus_Manager *manager; + Efl_Ui_Focus_User *provider; + } manager; + Eina_Bool drag_x_locked : 1; Eina_Bool drag_y_locked : 1; @@ -456,18 +469,6 @@ typedef struct _Elm_Widget_Smart_Data Eina_Bool on_create : 1; /**< This is true when the widget is on creation(general widget constructor). */ Eina_Bool on_destroy: 1; /**< This is true when the widget is on destruction(general widget destructor). */ Eina_Bool provider_lookup : 1; /**< This is true when efl_provider_find is currently walking the tree */ - struct { - Efl_Ui_Focus_Manager *manager; //manager which is currently regsitered in - Eina_Bool logical; - } focus; - struct { - int child_count; - Efl_Ui_Focus_Object *parent; - } logical; - struct { - Efl_Ui_Focus_Manager *manager; - Efl_Ui_Focus_User *provider; - } manager; } Elm_Widget_Smart_Data; /** --
Re: [E-devel] [EGIT] [core/efl] master 03/03: edje: Implement EO API for message_send
Hello. On 05/30/2017 04:19 AM, Jean-Philippe André wrote: I bumped the version to 0.9.10 as other test suites require at least that version. I also removed this specific _nonnull macro (to require 0.9.10 and not 0.11.0). Thanks for taking care of both. regards Stefan Schmidt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] Disabled all Jenkins builds (to see if that helps server stability)
Hello. On 05/30/2017 01:41 AM, Carsten Haitzler (The Rasterman) wrote: On Mon, 29 May 2017 12:41:41 +0200 Stefan Schmidtsaid: Hello. Once again I had problems with the E server being over capacity and returning 503 when accessing phab. I often heard claims that the load of Jenkins jobs trigger the bug we see here. To actually see if the load due to Jenkins jobs is related to this I now disabled all build triggers on Jenkins. That means no Jenkins jobs are going to run until I enable these again. be more careful with your commits. Right now the last builds are being performed and after that we should have no new ones. I will go an re-enable them again if we either see the same server instabilities without Jenkins running (which proves in my book hat Jenkins is not the culprit) or in something like 2 or 3 weeks even if we have no server problems. In the later case we will have to see what to do. regards Stefan Schmidt i seriously doubt it's jenkins. once e.org gets into this state it doesn't get out without a reboot... and the times i have looked (run top on e5 the host machine) it's been relatively quiet and not overloaded. I also doubt that the load from Jenkins is the culprit. Beber mentioned several times that he thinks its connected. Turning them off for a while might help us to either proof or dismiss this. regards Stefan Schmidt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel