Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2019-02-21 10:39:46 +09:00
commit 6895d3ff2c
667 changed files with 5418 additions and 2662 deletions

7
.ci/bootstrap_eolian.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
mkdir build-eolian-bootstrap
meson --prefix=/usr/ --libdir=/usr/lib -Deolian-bootstrap=true build-eolian-bootstrap
ninja -C build-eolian-bootstrap install
rm -rf build-eolian-bootstrap
ldconfig

View File

@ -77,7 +77,7 @@ else
RELEASE_READY_LINUX_COPTS=" --with-profile=release"
MINGW_COPTS=" --prefix=/ewpi-64-install --host=x86_64-w64-mingw32 --with-eolian-gen=/usr/local/bin/eolian_gen \
MINGW_COPTS=" --prefix=/ewpi-64-install --host=x86_64-w64-mingw32 --with-eolian-gen=/usr/bin/eolian_gen \
--with-edje-cc=/usr/local/bin/edje_cc --with-eet-eet=/usr/local/bin/eet \
--with-bin-elm-prefs-cc=/usr/local/bin/elm_prefs_cc \
--disable-static --with-tests=regular --with-crypto=openssl \
@ -110,6 +110,7 @@ else
if [ "$1" = "mingw" ]; then
OPTS="$OPTS $MINGW_COPTS"
docker exec $(cat $HOME/cid) sh -c 'rm -f /src/config.cache'
docker exec $(cat $HOME/cid) sh -c '.ci/bootstrap_eolian.sh'
fi
docker exec $(cat $HOME/cid) sh -c 'rm -f ~/.ccache/ccache.conf'
travis_fold autoreconf autoreconf

View File

@ -0,0 +1,98 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
<h1 id="{{id}}" data-uid="{{uid}}" class="text-break">{{>partials/title}}</h1>
<div class="markdown level0 summary">{{{summary}}}</div>
<div class="markdown level0 conceptual">{{{conceptual}}}</div>
{{#inClass}}
<div class="inheritance">
<h5><a href="#collapsible-inheritance" class="expander collapsed" data-toggle="collapse">{{__global.inheritance}}</a></h5>
<div id="collapsible-inheritance" class="collapse">
{{#inheritance}}
<div class="level{{index}}"><xref uid="{{uid}}" text="{{fullName.0.value}}"/></div>
{{/inheritance}}
<div class="level{{level}}"><span class="xref"><b>{{fullName.0.value}}</b></span></div>
{{#derivedClasses}}
<div class="level{{index}}">{{{specName.0.value}}}</div>
{{/derivedClasses}}
</div>
</div>
{{/inClass}}
{{#inheritedMembers.0}}
<h6><strong>{{__global.namespace}}</strong>: {{{namespace.specName.0.value}}}</h6>
<h6><strong>{{__global.assembly}}</strong>: {{assemblies.0}}.dll</h6>
<h5 id="{{id}}_syntax">{{__global.syntax}}</h5>
<div class="codewrapper">
<pre><code class="lang-{{_lang}} hljs">{{syntax.content.0.value}}</code></pre>
</div>
{{#syntax.parameters.0}}
<h5 class="parameters">{{__global.parameters}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.type}}</th>
<th>{{__global.name}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
{{/syntax.parameters.0}}
{{#syntax.parameters}}
<tr>
<td>{{{type.specName.0.value}}}</td>
<td><span class="parametername">{{{id}}}</span></td>
<td>{{{description}}}</td>
</tr>
{{/syntax.parameters}}
{{#syntax.parameters.0}}
</tbody>
</table>
{{/syntax.parameters.0}}
{{#syntax.return}}
<h5 class="returns">{{__global.returns}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.type}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{{type.specName.0.value}}}</td>
<td>{{{description}}}</td>
</tr>
</tbody>
</table>
{{/syntax.return}}
{{#syntax.typeParameters.0}}
<h5 class="typeParameters">{{__global.typeParameters}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.name}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
{{/syntax.typeParameters.0}}
{{#syntax.typeParameters}}
<tr>
<td><span class="parametername">{{{id}}}</span></td>
<td>{{{description}}}</td>
</tr>
{{/syntax.typeParameters}}
{{#syntax.typeParameters.0}}
</tbody>
</table>
{{/syntax.typeParameters.0}}
{{#remarks}}
<h5 id="{{id}}_remarks"><strong>{{__global.remarks}}</strong></h5>
<div class="markdown level0 remarks">{{{remarks}}}</div>
{{/remarks}}
{{#example.0}}
<h5 id="{{id}}_examples"><strong>{{__global.examples}}</strong></h5>
{{/example.0}}
{{#example}}
{{{.}}}
{{/example}}

View File

@ -0,0 +1,242 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
{{>partials/class.header}}
{{#children}}
<h3 id="{{id}}">
<a href="#collapsible-{{id}}" class="expander collapsed" data-toggle="collapse">
{{>partials/classSubtitle}}
</a>
</h3>
<div id="collapsible-{{id}}" class="collapse">
{{#children}}
{{^_disableContribution}}
{{#docurl}}
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="{{docurl}}">{{__global.improveThisDoc}}</a>
</span>{{/docurl}}
{{#sourceurl}}
<span class="small pull-right mobile-hide">
<a href="{{sourceurl}}">{{__global.viewSource}}</a>
</span>{{/sourceurl}}
{{/_disableContribution}}
{{#overload}}
<a id="{{id}}" data-uid="{{uid}}"></a>
{{/overload}}
<h4 id="{{id}}" data-uid="{{uid}}">{{name.0.value}}</h4>
<div class="markdown level1 summary">{{{summary}}}</div>
<div class="markdown level1 conceptual">{{{conceptual}}}</div>
<h5 class="decalaration">{{__global.declaration}}</h5>
{{#syntax}}
<div class="codewrapper">
<pre><code class="lang-{{_lang}} hljs">{{syntax.content.0.value}}</code></pre>
</div>
{{#parameters.0}}
<h5 class="parameters">{{__global.parameters}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.type}}</th>
<th>{{__global.name}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
{{/parameters.0}}
{{#parameters}}
<tr>
<td><xref uid="{{type.fullName.0.value}}" text="{{type.fullName.0.value}}"/></td>
<td><span class="parametername">{{{id}}}</span></td>
<td>{{{description}}}</td>
</tr>
{{/parameters}}
{{#parameters.0}}
</tbody>
</table>
{{/parameters.0}}
{{#return}}
<h5 class="returns">{{__global.returns}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.type}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
<tr>
<td><xref uid="{{type.fullName.0.value}}" text="{{type.fullName.0.value}}"/></td>
<td>{{{description}}}</td>
</tr>
</tbody>
</table>
{{/return}}
{{#typeParameters.0}}
<h5 class="typeParameters">{{__global.typeParameters}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.name}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
{{/typeParameters.0}}
{{#typeParameters}}
<tr>
<td><span class="parametername">{{{id}}}</span></td>
<td>{{{description}}}</td>
</tr>
{{/typeParameters}}
{{#typeParameters.0}}
</tbody>
</table>
{{/typeParameters.0}}
{{#fieldValue}}
<h5 class="fieldValue">{{__global.fieldValue}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.type}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
<tr>
<td><xref uid="{{type.fullName.0.value}}" text="{{type.fullName.0.value}}"/></td>
<td>{{{description}}}</td>
</tr>
</tbody>
</table>
{{/fieldValue}}
{{#propertyValue}}
<h5 class="propertyValue">{{__global.propertyValue}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.type}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
<tr>
<td><xref uid="{{type.fullName.0.value}}" text="{{type.fullName.0.value}}"/></td>
<td>{{{description}}}</td>
</tr>
</tbody>
</table>
{{/propertyValue}}
{{#eventType}}
<h5 class="eventType">{{__global.eventType}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.type}}</th>
<th>{{__global.description}}</th>
</tr>
</thead>
<tbody>
<tr>
<td><xref uid="{{type.fullName.0.value}}" text="{{type.fullName.0.value}}"/></td>
<td>{{{description}}}</td>
</tr>
</tbody>
</table>
{{/eventType}}
{{/syntax}}
{{#overridden}}
<h5 class="overrides">{{__global.overrides}}</h5>
<div><xref uid="{{uid}}" altProperty="fullName" displayProperty="nameWithType"/></div>
{{/overridden}}
{{#remarks}}
<h5 id="{{id}}_remarks">{{__global.remarks}}</h5>
<div class="markdown level1 remarks">{{{remarks}}}</div>
{{/remarks}}
{{#example.0}}
<h5 id="{{id}}_examples">{{__global.examples}}</h5>
{{/example.0}}
{{#example}}
{{{.}}}
{{/example}}
{{#exceptions.0}}
<h5 class="exceptions">{{__global.exceptions}}</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{{__global.type}}</th>
<th>{{__global.condition}}</th>
</tr>
</thead>
<tbody>
{{/exceptions.0}}
{{#exceptions}}
<tr>
<td><xref uid="{{type.fullName.0.value}}" text="{{type.fullName.0.value}}"/></td>
<td>{{{description}}}</td>
</tr>
{{/exceptions}}
{{#exceptions.0}}
</tbody>
</table>
{{/exceptions.0}}
{{#seealso.0}}
<h5 id="{{id}}_seealso">{{__global.seealso}}</h5>
<div class="seealso">
{{/seealso.0}}
{{#seealso}}
{{#isCref}}
<div><xref uid="{{type.fullName.0.value}}" text="{{type.fullName.0.value}}"/></div>
{{/isCref}}
{{^isCref}}
<div>{{{url}}}</div>
{{/isCref}}
{{/seealso}}
{{#seealso.0}}
</div>
{{/seealso.0}}
{{/children}}
</div>
{{/children}}
{{#implements.0}}
<h3><a href="#collapsible-implements" class="expander collapsed" data-toggle="collapse">{{__global.implements}}</a></h3>
<div id="collapsible-implements" class="collapse">
{{/implements.0}}
{{#implements}}
<div>
{{#definition}}
<xref uid="{{definition}}" altProperty="fullName" displayProperty="nameWithType"/>
{{/definition}}
{{^definition}}
<xref uid="{{uid}}" text="{{fullName.0.value}}"/>
{{/definition}}
</div>
{{/implements}}
</div>
{{#extensionMethods.0}}
<h3 id="extensionmethods">{{__global.extensionMethods}}</h3>
{{/extensionMethods.0}}
{{#extensionMethods}}
<div>
{{#definition}}
<xref uid="{{definition}}" altProperty="fullName" displayProperty="nameWithType"/>
{{/definition}}
{{^definition}}
<xref uid="{{uid}}" altProperty="fullName" displayProperty="nameWithType"/>
{{/definition}}
</div>
{{/extensionMethods}}
{{#seealso.0}}
<h3 id="seealso">{{__global.seealso}}</h3>
<div class="seealso">
{{/seealso.0}}
{{#seealso}}
{{#isCref}}
<div><xref uid="{{type.fullName.0.value}}" text="{{type.fullName.0.value}}"/></div>
{{/isCref}}
{{^isCref}}
<div>{{{url}}}</div>
{{/isCref}}
{{/seealso}}
{{#seealso.0}}
</div>
{{/seealso.0}}

View File

@ -0,0 +1,997 @@
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */
html,
body {
font-family: 'Segoe UI', Tahoma, Helvetica, sans-serif;
height: 100%;
}
button,
a {
color: #337ab7;
cursor: pointer;
}
button:hover,
button:focus,
a:hover,
a:focus {
color: #23527c;
text-decoration: none;
}
a.disable,
a.disable:hover {
text-decoration: none;
cursor: default;
color: #000000;
}
h1, h2, h3, h4, h5, h6, .text-break {
word-wrap: break-word;
word-break: break-word;
}
h1 mark,
h2 mark,
h3 mark,
h4 mark,
h5 mark,
h6 mark {
padding: 0;
}
.inheritance .level0:before,
.inheritance .level1:before,
.inheritance .level2:before,
.inheritance .level3:before,
.inheritance .level4:before,
.inheritance .level5:before,
.inheritance .level6:before,
.inheritance .level7:before,
.inheritance .level8:before,
.inheritance .level9:before,
.inheritance .level10:before {
content: '↳';
margin-right: 5px;
}
.inheritance .level0 {
margin-left: 0em;
}
.inheritance .level1 {
margin-left: 1em;
}
.inheritance .level2 {
margin-left: 2em;
}
.inheritance .level3 {
margin-left: 3em;
}
.inheritance .level4 {
margin-left: 4em;
}
.inheritance .level5 {
margin-left: 5em;
}
.inheritance .level6 {
margin-left: 6em;
}
.inheritance .level7 {
margin-left: 7em;
}
.inheritance .level8 {
margin-left: 8em;
}
.inheritance .level9 {
margin-left: 9em;
}
.inheritance .level10 {
margin-left: 10em;
}
span.parametername,
span.paramref,
span.typeparamref {
font-style: italic;
}
span.languagekeyword{
font-weight: bold;
}
svg:hover path {
fill: #ffffff;
}
.hljs {
display: inline;
background-color: inherit;
padding: 0;
}
/* additional spacing fixes */
.btn + .btn {
margin-left: 10px;
}
.btn.pull-right {
margin-left: 10px;
margin-top: 5px;
}
.table {
margin-bottom: 10px;
}
table p {
margin-bottom: 0;
}
table a {
display: inline-block;
}
/* Make hidden attribute compatible with old browser.*/
[hidden] {
display: none !important;
}
h1,
.h1,
h2,
.h2,
h3,
.h3 {
margin-top: 15px;
margin-bottom: 10px;
font-weight: 400;
}
h4,
.h4,
h5,
.h5,
h6,
.h6 {
margin-top: 10px;
margin-bottom: 5px;
}
.navbar {
margin-bottom: 0;
}
#wrapper {
min-height: 100%;
position: relative;
}
/* blends header footer and content together with gradient effect */
.grad-top {
/* For Safari 5.1 to 6.0 */
/* For Opera 11.1 to 12.0 */
/* For Firefox 3.6 to 15 */
background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0));
/* Standard syntax */
height: 5px;
}
.grad-bottom {
/* For Safari 5.1 to 6.0 */
/* For Opera 11.1 to 12.0 */
/* For Firefox 3.6 to 15 */
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05));
/* Standard syntax */
height: 5px;
}
.divider {
margin: 0 5px;
color: #cccccc;
}
hr {
border-color: #cccccc;
}
header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
}
header .navbar {
border-width: 0 0 1px;
border-radius: 0;
}
.navbar-brand {
font-size: inherit;
padding: 0;
}
.navbar-collapse {
margin: 0 -15px;
}
.subnav {
min-height: 40px;
}
.inheritance h5, .inheritedMembers h5{
padding-bottom: 5px;
border-bottom: 1px solid #ccc;
}
.implements h5{
padding-bottom: 5px;
border-bottom: 1px solid #ccc;
}
.expander:after {
content: "\002193";
margin-left: 5px;
color: grey;
}
.expander.collapsed:after {
content: "\002191";
}
article h1, article h2, article h3, article h4{
margin-top: 25px;
}
article h4{
border-bottom: 1px solid #ccc;
}
article span.small.pull-right{
margin-top: 20px;
}
article section {
margin-left: 1em;
}
/*.expand-all {
padding: 10px 0;
}*/
.breadcrumb {
margin: 0;
padding: 10px 0;
background-color: inherit;
white-space: nowrap;
}
.breadcrumb > li + li:before {
content: "\00a0/";
}
#autocollapse.collapsed .navbar-header {
float: none;
}
#autocollapse.collapsed .navbar-toggle {
display: block;
}
#autocollapse.collapsed .navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
#autocollapse.collapsed .navbar-collapse.collapse {
display: none !important;
}
#autocollapse.collapsed .navbar-nav {
float: none !important;
margin: 7.5px -15px;
}
#autocollapse.collapsed .navbar-nav > li {
float: none;
}
#autocollapse.collapsed .navbar-nav > li > a {
padding-top: 10px;
padding-bottom: 10px;
}
#autocollapse.collapsed .collapse.in,
#autocollapse.collapsed .collapsing {
display: block !important;
}
#autocollapse.collapsed .collapse.in .navbar-right,
#autocollapse.collapsed .collapsing .navbar-right {
float: none !important;
}
#autocollapse .form-group {
width: 100%;
}
#autocollapse .form-control {
width: 100%;
}
#autocollapse .navbar-header {
margin-left: 0;
margin-right: 0;
}
#autocollapse .navbar-brand {
margin-left: 0;
}
.collapse.in,
.collapsing {
text-align: unset;
}
.collapsing .navbar-form {
margin: 0 auto;
max-width: 400px;
padding: 10px 15px;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
}
.collapsed .collapse.in .navbar-form {
margin: 0 auto;
max-width: 400px;
padding: 10px 15px;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
}
.navbar .navbar-nav {
display: inline-block;
}
.docs-search {
background: white;
vertical-align: middle;
}
.docs-search > .search-query {
font-size: 14px;
border: 0;
width: 120%;
color: #555;
}
.docs-search > .search-query:focus {
outline: 0;
}
.search-results-frame {
clear: both;
display: table;
width: 100%;
}
.search-results.ng-hide {
display: none;
}
.search-results-container {
padding-bottom: 1em;
border-top: 1px solid #111;
background: rgba(25, 25, 25, 0.5);
}
.search-results-container .search-results-group {
padding-top: 50px !important;
padding: 10px;
}
.search-results-group-heading {
font-family: "Open Sans";
padding-left: 10px;
color: white;
}
.search-close {
position: absolute;
left: 50%;
margin-left: -100px;
color: white;
text-align: center;
padding: 5px;
background: #333;
border-top-right-radius: 5px;
border-top-left-radius: 5px;
width: 200px;
box-shadow: 0 0 10px #111;
}
#search {
display: none;
}
/* Search results display*/
#search-results {
max-width: 960px !important;
margin-top: 120px;
margin-bottom: 115px;
margin-left: auto;
margin-right: auto;
line-height: 1.8;
display: none;
}
#search-results>.search-list {
text-align: center;
font-size: 2.5rem;
margin-bottom: 50px;
}
#search-results p {
text-align: center;
}
#search-results p .index-loading {
animation: index-loading 1.5s infinite linear;
-webkit-animation: index-loading 1.5s infinite linear;
-o-animation: index-loading 1.5s infinite linear;
font-size: 2.5rem;
}
@keyframes index-loading {
from { transform: scale(1) rotate(0deg);}
to { transform: scale(1) rotate(360deg);}
}
@-webkit-keyframes index-loading {
from { -webkit-transform: rotate(0deg);}
to { -webkit-transform: rotate(360deg);}
}
@-o-keyframes index-loading {
from { -o-transform: rotate(0deg);}
to { -o-transform: rotate(360deg);}
}
#search-results .sr-items {
font-size: 24px;
}
.sr-item {
margin-bottom: 25px;
}
.sr-item>.item-href {
font-size: 14px;
color: #093;
}
.sr-item>.item-brief {
font-size: 13px;
}
.pagination>li>a {
color: #47A7A0
}
.pagination>.active>a {
background-color: #47A7A0;
border-color: #47A7A0;
}
.fixed_header {
position: fixed;
width: 100%;
padding-bottom: 10px;
padding-top: 10px;
margin: 0px;
top: 0;
z-index: 9999;
left: 0;
}
.fixed_header+.toc{
margin-top: 50px;
margin-left: 0;
}
.sidenav, .fixed_header, .toc {
background-color: #f1f1f1;
}
.sidetoc {
position: fixed;
width: 260px;
top: 150px;
bottom: 0;
overflow-x: hidden;
overflow-y: auto;
background-color: #f1f1f1;
border-left: 1px solid #e7e7e7;
border-right: 1px solid #e7e7e7;
z-index: 1;
}
.sidetoc.shiftup {
bottom: 70px;
}
body .toc{
background-color: #f1f1f1;
overflow-x: hidden;
}
.sidetoggle.ng-hide {
display: block !important;
}
.sidetoc-expand > .caret {
margin-left: 0px;
margin-top: -2px;
}
.sidetoc-expand > .caret-side {
border-left: 4px solid;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
margin-left: 4px;
margin-top: -4px;
}
.sidetoc-heading {
font-weight: 500;
}
.toc {
margin: 0px 0 0 10px;
padding: 0 10px;
}
.expand-stub {
position: absolute;
left: -10px;
}
.toc .nav > li > a.sidetoc-expand {
position: absolute;
top: 0;
left: 0;
}
.toc .nav > li > a {
color: #666666;
margin-left: 5px;
display: block;
padding: 0;
}
.toc .nav > li > a:hover,
.toc .nav > li > a:focus {
color: #000000;
background: none;
text-decoration: inherit;
}
.toc .nav > li.active > a {
color: #337ab7;
}
.toc .nav > li.active > a:hover,
.toc .nav > li.active > a:focus {
color: #23527c;
}
.toc .nav > li> .expand-stub {
cursor: pointer;
}
.toc .nav > li.active > .expand-stub::before,
.toc .nav > li.in > .expand-stub::before,
.toc .nav > li.in.active > .expand-stub::before,
.toc .nav > li.filtered > .expand-stub::before {
content: "-";
}
.toc .nav > li > .expand-stub::before,
.toc .nav > li.active > .expand-stub::before {
content: "+";
}
.toc .nav > li.filtered > ul,
.toc .nav > li.in > ul {
display: block;
}
.toc .nav > li > ul {
display: none;
}
.toc ul{
font-size: 12px;
margin: 0 0 0 3px;
}
.toc .level1 > li {
font-weight: bold;
margin-top: 10px;
position: relative;
font-size: 16px;
}
.toc .level2 {
font-weight: normal;
margin: 5px 0 0 15px;
font-size: 14px;
}
.toc-toggle {
display: none;
margin: 0 15px 0px 15px;
}
.sidefilter {
position: fixed;
top: 90px;
width: 260px;
background-color: #f1f1f1;
padding: 15px;
border-left: 1px solid #e7e7e7;
border-right: 1px solid #e7e7e7;
z-index: 1;
}
.toc-filter {
border-radius: 5px;
background: #fff;
color: #666666;
padding: 5px;
position: relative;
margin: 0 5px 0 5px;
}
.toc-filter > input {
border: 0;
color: #666666;
padding-left: 20px;
width: 100%;
}
.toc-filter > input:focus {
outline: 0;
}
.toc-filter > .filter-icon {
position: absolute;
top: 10px;
left: 5px;
}
.article {
margin-top: 120px;
margin-bottom: 115px;
}
#_content>a{
margin-top: 105px;
}
.article.grid-right {
margin-left: 280px;
}
.inheritance hr {
margin-top: 5px;
margin-bottom: 5px;
}
.article img {
max-width: 100%;
}
.sideaffix {
margin-top: 50px;
font-size: 12px;
max-height: 100%;
overflow: hidden;
top: 100px;
bottom: 10px;
position: fixed;
}
.sideaffix.shiftup {
bottom: 70px;
}
.affix {
position: relative;
height: 100%;
}
.sideaffix > div.contribution {
margin-bottom: 20px;
}
.sideaffix > div.contribution > ul > li > a.contribution-link {
padding: 6px 10px;
font-weight: bold;
font-size: 14px;
}
.sideaffix > div.contribution > ul > li > a.contribution-link:hover {
background-color: #ffffff;
}
.sideaffix ul.nav > li > a:focus {
background: none;
}
.affix h5 {
font-weight: bold;
text-transform: uppercase;
padding-left: 10px;
font-size: 12px;
}
.affix > ul.level1 {
overflow: hidden;
padding-bottom: 10px;
height: calc(100% - 100px);
margin-right: -20px;
}
.affix ul > li > a:before {
color: #cccccc;
position: absolute;
}
.affix ul > li > a:hover {
background: none;
color: #666666;
}
.affix ul > li.active > a,
.affix ul > li.active > a:before {
color: #337ab7;
}
.affix ul > li > a {
padding: 5px 12px;
color: #666666;
}
.affix > ul > li.active:last-child {
margin-bottom: 50px;
}
.affix > ul > li > a:before {
content: "|";
font-size: 16px;
top: 1px;
left: 0;
}
.affix > ul > li.active > a,
.affix > ul > li.active > a:before {
color: #337ab7;
font-weight: bold;
}
.affix ul ul > li > a {
padding: 2px 15px;
}
.affix ul ul > li > a:before {
content: ">";
font-size: 14px;
top: -1px;
left: 5px;
}
.affix ul > li > a:before,
.affix ul ul {
display: none;
}
.affix ul > li.active > ul,
.affix ul > li.active > a:before,
.affix ul > li > a:hover:before {
display: block;
white-space: nowrap;
}
.codewrapper {
position: relative;
}
.trydiv {
height: 0px;
}
.tryspan {
position: absolute;
top: 0px;
right: 0px;
border-style: solid;
border-radius: 0px 4px;
box-sizing: border-box;
border-width: 1px;
border-color: #cccccc;
text-align: center;
padding: 2px 8px;
background-color: white;
font-size: 12px;
cursor: pointer;
z-index: 100;
display: none;
color: #767676;
}
.tryspan:hover {
background-color: #3b8bd0;
color: white;
border-color: #3b8bd0;
}
.codewrapper:hover .tryspan {
display: block;
}
.sample-response .response-content{
max-height: 200px;
}
footer {
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
}
.footer {
border-top: 1px solid #e7e7e7;
background-color: #f8f8f8;
padding: 15px 0;
}
@media (min-width: 768px) {
#sidetoggle.collapse {
display: block;
}
.topnav .navbar-nav {
float: none;
white-space: nowrap;
}
.topnav .navbar-nav > li {
float: none;
display: inline-block;
}
}
@media only screen and (max-width: 768px) {
#mobile-indicator {
display: block;
}
/* TOC display for responsive */
.article {
margin-top: 30px !important;
}
header {
position: static;
}
.topnav {
text-align: center;
}
.sidenav {
padding: 15px 0;
margin-left: -15px;
margin-right: -15px;
}
.sidefilter {
position: static;
width: auto;
float: none;
border: none;
}
.sidetoc {
position: static;
width: auto;
float: none;
padding-bottom: 0px;
border: none;
}
.toc .nav > li, .toc .nav > li >a {
display: inline-block;
}
.toc li:after {
margin-left: -3px;
margin-right: 5px;
content: ", ";
color: #666666;
}
.toc .level1 > li {
display: block;
}
.toc .level1 > li:after {
display: none;
}
.article.grid-right {
margin-left: 0;
}
.grad-top,
.grad-bottom {
display: none;
}
.toc-toggle {
display: block;
}
.sidetoggle.ng-hide {
display: none !important;
}
/*.expand-all {
display: none;
}*/
.sideaffix {
display: none;
}
.mobile-hide {
display: none;
}
.breadcrumb {
white-space: inherit;
}
/* workaround for #hashtag url is no longer needed*/
h1:before,
h2:before,
h3:before,
h4:before {
content: '';
display: none;
}
}
/* For toc iframe */
@media (max-width: 260px) {
.toc .level2 > li {
display: block;
}
.toc .level2 > li:after {
display: none;
}
}
/* For code snippet line highlight */
pre > code .line-highlight {
background-color: #ffffcc;
}
/* Alerts */
.alert h5 {
text-transform: uppercase;
font-weight: bold;
margin-top: 0;
}
.alert h5:before {
position:relative;
top:1px;
display:inline-block;
font-family:'Glyphicons Halflings';
line-height:1;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
margin-right: 5px;
font-weight: normal;
}
.alert-info h5:before {
content:"\e086"
}
.alert-warning h5:before {
content:"\e127"
}
.alert-danger h5:before {
content:"\e107"
}
/* For Embedded Video */
div.embeddedvideo {
padding-top: 56.25%;
position: relative;
width: 100%;
}
div.embeddedvideo iframe {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
}
/* For printer */
@media print{
.article.grid-right {
margin-top: 0px;
margin-left: 0px;
}
.sideaffix {
display: none;
}
.mobile-hide {
display: none;
}
.footer {
display: none;
}
}
/* For tabbed content */
.tabGroup {
margin-top: 1rem; }
.tabGroup ul[role="tablist"] {
margin: 0;
padding: 0;
list-style: none; }
.tabGroup ul[role="tablist"] > li {
list-style: none;
display: inline-block; }
.tabGroup a[role="tab"] {
color: #6e6e6e;
box-sizing: border-box;
display: inline-block;
padding: 5px 7.5px;
text-decoration: none;
border-bottom: 2px solid #fff; }
.tabGroup a[role="tab"]:hover, .tabGroup a[role="tab"]:focus, .tabGroup a[role="tab"][aria-selected="true"] {
border-bottom: 2px solid #0050C5; }
.tabGroup a[role="tab"][aria-selected="true"] {
color: #222; }
.tabGroup a[role="tab"]:hover, .tabGroup a[role="tab"]:focus {
color: #0050C5; }
.tabGroup a[role="tab"]:focus {
outline: 1px solid #0050C5;
outline-offset: -1px; }
@media (min-width: 768px) {
.tabGroup a[role="tab"] {
padding: 5px 15px; } }
.tabGroup section[role="tabpanel"] {
border: 1px solid #e0e0e0;
padding: 15px;
margin: 0;
overflow: hidden; }
.tabGroup section[role="tabpanel"] > .codeHeader,
.tabGroup section[role="tabpanel"] > pre {
margin-left: -16px;
margin-right: -16px; }
.tabGroup section[role="tabpanel"] > :first-child {
margin-top: 0; }
.tabGroup section[role="tabpanel"] > pre:last-child {
display: block;
margin-bottom: -16px; }
.mainContainer[dir='rtl'] main ul[role="tablist"] {
margin: 0; }

View File

@ -61,7 +61,8 @@
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default"
"default",
"default_efl"
],
"postProcessors": [],
"markdownEngineName": "markdig",

View File

@ -53,7 +53,8 @@ header_checks = [
'langinfo.h',
'locale.h',
'uv.h',
'ws2tcpip.h'
'ws2tcpip.h',
'crt_externs.h'
]
function_checks = [

View File

@ -210,6 +210,7 @@ elif sys_osx == true
sys_lib_extension = 'dylib'
sys_exe_extension = ''
sys_mod_extension = 'dylib'
config_h.set('environ', '(*_NSGetEnviron())')
else
error('System '+host_machine.system()+' not known')
endif
@ -241,6 +242,12 @@ endif
ecore_evas_wayland_engine_include_dir = []
boot_strap_eolian = [
['evil' ,[] , false, true, false, false, false, false, [], []],
['eina' ,[] , false, true, false, false, false, false, [], []],
['eolian' ,[] , false, true, true, false, false, false, ['eina'], []],
]
subprojects = [
# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs
['evil' ,[] , false, true, false, false, false, false, [], []],
@ -303,6 +310,9 @@ test_dirs = []
example_dirs = []
tmp_empty = declare_dependency()
if get_option('eolian-bootstrap')
subprojects = boot_strap_eolian
endif
foreach package : subprojects
package_name = package[0]
@ -403,23 +413,23 @@ foreach package : subprojects
endforeach
#build this later, as the debug services are depending on ecore
subdir(join_paths('src', 'bin', 'efl'))
subdir(join_paths('src', 'generic', 'evas'))
subdir(join_paths('src', 'generic', 'emotion'))
subdir('cmakeconfig')
#build this later, as the debug services are depending on ecore
if get_option('eolian-bootstrap') == false
subdir(join_paths('src', 'bin', 'efl'))
bindings = get_option('bindings')
subdir(join_paths('src', 'generic', 'evas'))
subdir(join_paths('src', 'generic', 'emotion'))
foreach binding : bindings
subdir(join_paths('src', 'bindings', binding))
endforeach
bindings = get_option('bindings')
subdir(join_paths('src', 'edje_external'))
foreach binding : bindings
subdir(join_paths('src', 'bindings', binding))
endforeach
subdir(join_paths('data'))
subdir(join_paths('src', 'edje_external'))
subdir(join_paths('data'))
endif
if get_option('build-tests')
check = dependency('check')

View File

@ -353,3 +353,9 @@ option('elementary-base-dir',
value : '.elementary',
description : 'Put the name of a base directory for elementary data'
)
option('eolian-bootstrap',
type : 'boolean',
value : false,
description : 'Only build efl up to eolian_gen and install eina libeolian and eolian_gen, usefull for cross compiles'
)

View File

@ -49,7 +49,13 @@ ecore_eolian_files_public = \
lib/ecore/efl_boolean_model.eo \
lib/ecore/efl_select_model.eo \
lib/ecore/efl_composite_model.eo \
lib/ecore/efl_view_model.eo
lib/ecore/efl_view_model.eo \
lib/ecore/efl_core_env.eo \
lib/ecore/efl_core_proc_env.eo \
lib/ecore/efl_core_command_line.eo
ecore_test_eolian_files = \
tests/ecore/efl_app_test_cml.eo
ecore_eolian_files = \
$(ecore_eolian_files_legacy) \
@ -58,15 +64,20 @@ ecore_eolian_files = \
ecore_eolian_c = $(ecore_eolian_files:%.eo=%.eo.c)
ecore_eolian_h = $(ecore_eolian_files:%.eo=%.eo.h) \
$(ecore_eolian_files_legacy:%.eo=%.eo.legacy.h)
ecore_test_c = $(ecore_test_eolian_files:%.eo=%.eo.c)
ecore_test_h = $(ecore_test_eolian_files:%.eo=%.eo.h)
BUILT_SOURCES += \
$(ecore_eolian_c) \
$(ecore_eolian_h)
$(ecore_eolian_h) \
$(ecore_test_c) \
$(ecore_test_h)
ecoreeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@
ecoreeolianfiles_DATA = $(ecore_eolian_files_public) lib/ecore/efl_loop_timer.eo
EXTRA_DIST2 += $(ecore_eolian_files)
EXTRA_DIST2 += $(ecore_test_eolian_files)
lib_LTLIBRARIES += lib/ecore/libecore.la
@ -98,6 +109,9 @@ lib/ecore/ecore_job.c \
lib/ecore/ecore_main.c \
lib/ecore/ecore_event_message.c \
lib/ecore/ecore_event_message_handler.c \
lib/ecore/efl_core_command_line.c \
lib/ecore/efl_core_env.c \
lib/ecore/efl_core_proc_env.c \
lib/ecore/efl_app.c \
lib/ecore/efl_loop.c \
lib/ecore/efl_loop_consumer.c \
@ -335,6 +349,8 @@ tests/ecore/efl_app_test_loop.c \
tests/ecore/efl_app_test_loop_fd.c \
tests/ecore/efl_app_test_loop_timer.c \
tests/ecore/efl_app_test_promise.c \
tests/ecore/efl_app_test_cml.c \
tests/ecore/efl_app_test_env.c \
tests/ecore/efl_app_suite.c \
tests/ecore/efl_app_suite.h

View File

@ -64,8 +64,9 @@ efl_eolian_files = \
lib/efl/interfaces/efl_ui_range_display.eo \
lib/efl/interfaces/efl_ui_range_interactive.eo \
lib/efl/interfaces/efl_ui_view.eo \
lib/efl/interfaces/efl_ui_model_connect.eo \
lib/efl/interfaces/efl_ui_property_bind.eo \
lib/efl/interfaces/efl_ui_factory.eo \
lib/efl/interfaces/efl_ui_factory_bind.eo \
lib/efl/interfaces/efl_screen.eo \
lib/efl/interfaces/efl_io_closer.eo \
lib/efl/interfaces/efl_io_positioner.eo \

View File

@ -1627,6 +1627,7 @@ tests_elementary_efl_ui_suite_SOURCES = \
tests/elementary/efl_ui_test_focus_common.h \
tests/elementary/efl_ui_test_focus.c \
tests/elementary/efl_ui_test_focus_sub.c \
tests/elementary/efl_ui_test_box.c \
tests/elementary/efl_ui_test_grid.c \
tests/elementary/efl_ui_test_image.c \
tests/elementary/efl_ui_test_image_zoomable.c \

View File

@ -38,7 +38,7 @@ _class_initializer(Efl_Class *klass)
EFL_OBJECT_OP_FUNC(simple_other_call, _other_call),
);
return efl_class_functions_set(klass, &ops, NULL, NULL);
return efl_class_functions_set(klass, &ops, NULL);
}
static const Efl_Class_Description class_desc = {

View File

@ -65,7 +65,7 @@ _class_initializer(Efl_Class *klass)
EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
);
return efl_class_functions_set(klass, &ops, NULL, NULL);
return efl_class_functions_set(klass, &ops, NULL);
}
static void

View File

@ -71,7 +71,7 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
efl_text_multiline_set(en, EINA_TRUE);
en = _create_label(win, bx);
markup = efl_text_markup_util_text_to_markup(EFL_TEXT_MARKUP_UTIL_CLASS,
markup = efl_text_markup_util_text_to_markup(
"You can use the text -> markup helper\nto make coding easier.");
efl_text_markup_set(en, markup);
free(markup);
@ -80,7 +80,7 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
efl_text_multiline_set(en, EINA_TRUE);
en = _create_label(win, bx);
markup = efl_text_markup_util_markup_to_text(EFL_TEXT_MARKUP_UTIL_CLASS,
markup = efl_text_markup_util_markup_to_text(
"You can use markup -&gt; text helpers<ps>to make coding easier.");
efl_text_set(en, markup);
free(markup);

View File

@ -836,7 +836,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,
efl_gfx_color_set(efl_added, 0, 0, 0, 0),
efl_gfx_stack_raise(efl_added),
efl_gfx_stack_raise_to_top(efl_added),
efl_canvas_object_repeat_events_set(efl_added, EINA_TRUE),
efl_event_callback_add(efl_added, EFL_EVENT_POINTER_WHEEL, _zoomable_mouse_wheel_cb, zoomable)
);

View File

@ -361,6 +361,8 @@ static void page_size_cb(void *data,
efl_pack_end(inbox, efl_added));
size_params = calloc(1, sizeof(Size_Params));
if (!size_params) return;
size_params->slider = sl;
size_params->pager = params->pager;
size_params->params = params;
@ -400,6 +402,8 @@ static void page_size_cb(void *data,
efl_pack_end(inbox, efl_added));
size_params = calloc(1, sizeof(Size_Params));
if (!size_params) return;
size_params->slider = sl;
size_params->pager = params->pager;
size_params->params = params;
@ -456,6 +460,8 @@ static void pack_cb(void *data,
// Pack Begin
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -472,6 +478,8 @@ static void pack_cb(void *data,
// Pack End
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -488,6 +496,8 @@ static void pack_cb(void *data,
// Pack Before
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -504,6 +514,8 @@ static void pack_cb(void *data,
// Pack After
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -520,6 +532,8 @@ static void pack_cb(void *data,
// Pack At
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -539,6 +553,8 @@ static void pack_cb(void *data,
// Unpack At
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -577,6 +593,7 @@ static void current_page_cb(void *data,
Eo *pager = params->pager;
Eo *btn, *box, *sp;
Page_Set_Params *psp = calloc(1, sizeof(Page_Set_Params));
if (!psp) return;
btn = efl_add(EFL_UI_BUTTON_CLASS, navi,
efl_text_set(efl_added, "Back"),
@ -699,6 +716,8 @@ void test_ui_pager(void *data EINA_UNUSED,
efl_content_set(efl_part(layout, "next_btn"), efl_added));
params = calloc(1, sizeof(Params));
if (!params) return;
params->navi = navi;
params->pager = pager;
params->indicator = NULL;

View File

@ -417,6 +417,8 @@ static void page_size_cb(void *data,
efl_pack_end(inbox, efl_added));
size_params = calloc(1, sizeof(Size_Params));
if (!size_params) return;
size_params->slider = sl;
size_params->pager = params->pager;
size_params->params = params;
@ -456,6 +458,8 @@ static void page_size_cb(void *data,
efl_pack_end(inbox, efl_added));
size_params = calloc(1, sizeof(Size_Params));
if (!size_params) return;
size_params->slider = sl;
size_params->pager = params->pager;
size_params->params = params;
@ -570,6 +574,8 @@ static void pack_cb(void *data,
// Pack Begin
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -586,6 +592,8 @@ static void pack_cb(void *data,
// Pack End
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -602,6 +610,8 @@ static void pack_cb(void *data,
// Pack Before
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -618,6 +628,8 @@ static void pack_cb(void *data,
// Pack After
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -634,6 +646,8 @@ static void pack_cb(void *data,
// Pack At
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -653,6 +667,8 @@ static void pack_cb(void *data,
// Unpack At
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
pack_param->pager = pager;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
@ -691,6 +707,7 @@ static void current_page_cb(void *data,
Eo *pager = params->pager;
Eo *btn, *box, *sp;
Page_Set_Params *psp = calloc(1, sizeof(Page_Set_Params));
if (!psp) return;
btn = efl_add(EFL_UI_BUTTON_CLASS, navi,
efl_text_set(efl_added, "Back"),
@ -884,6 +901,8 @@ void test_ui_pager_scroll(void *data EINA_UNUSED,
efl_ui_pager_transition_set(pager, efl_added));
params = calloc(1, sizeof(Params));
if (!params) return;
params->navi = navi;
params->pager = pager;
params->transition = NULL;

View File

@ -92,7 +92,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
/* this one will never be satisfied in legacy */
if (eolian_function_is_beta(fid))
eina_strbuf_append_printf(buf, "#ifdef %s_BETA\n", cnameu);
eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
/* XXX: is this right? we expose potentially internal stuff into legacy */
if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED))
eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu);
@ -125,7 +125,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
eina_stringshare_del(fcn);
Eina_Strbuf *flagbuf = NULL;
int nidx = !legacy || !eolian_function_is_class(fid);
int nidx = !eolian_function_is_class(fid);
eina_strbuf_append_char(buf, '(');
if (nidx)
@ -174,10 +174,10 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
}
eina_strbuf_append(buf, ";\n");
if (eolian_function_is_beta(fid))
eina_strbuf_append_printf(buf, "#endif\n");
if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED))
eina_strbuf_append_printf(buf, "#endif\n");
if (eolian_function_is_beta(fid))
eina_strbuf_append_printf(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
}
void
@ -192,6 +192,10 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
/* class definition */
if (!legacy && eolian_class_is_beta(cl))
{
eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
}
if (!legacy)
{
const Eolian_Documentation *doc = eolian_class_documentation_get(cl);
@ -267,7 +271,7 @@ events:
if (eolian_event_is_beta(ev))
{
eina_strbuf_append_printf(buf, "\n#ifdef %s_BETA\n", cnameu);
eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
}
if (evs == EOLIAN_SCOPE_PROTECTED)
{
@ -292,12 +296,16 @@ events:
if (evs == EOLIAN_SCOPE_PROTECTED)
eina_strbuf_append(buf, "#endif\n");
if (eolian_event_is_beta(ev))
eina_strbuf_append(buf, "#endif\n");
eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
eina_stringshare_del(evn);
}
eina_iterator_free(itr);
}
if (!legacy && eolian_class_is_beta(cl))
{
eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n");
}
free(cname);
free(cnameu);

View File

@ -322,11 +322,118 @@ _gen_function_param_fallback(Eina_Iterator *itr, Eina_Strbuf *fallback_free_owne
return owners;
}
static const char *
_get_reflect_initf(const Eolian_Type *abtp)
{
Eolian_Type_Builtin_Type btp = eolian_type_builtin_type_get(abtp);
const char *initf = NULL;
switch (btp)
{
case EOLIAN_TYPE_BUILTIN_BYTE:
case EOLIAN_TYPE_BUILTIN_CHAR:
initf = "char"; break;
case EOLIAN_TYPE_BUILTIN_UBYTE:
initf = "uchar"; break;
case EOLIAN_TYPE_BUILTIN_SHORT:
case EOLIAN_TYPE_BUILTIN_USHORT:
case EOLIAN_TYPE_BUILTIN_INT:
case EOLIAN_TYPE_BUILTIN_UINT:
case EOLIAN_TYPE_BUILTIN_LONG:
case EOLIAN_TYPE_BUILTIN_ULONG:
case EOLIAN_TYPE_BUILTIN_INT64:
case EOLIAN_TYPE_BUILTIN_UINT64:
case EOLIAN_TYPE_BUILTIN_TIME:
case EOLIAN_TYPE_BUILTIN_FLOAT:
case EOLIAN_TYPE_BUILTIN_DOUBLE:
case EOLIAN_TYPE_BUILTIN_BOOL:
case EOLIAN_TYPE_BUILTIN_STRING:
case EOLIAN_TYPE_BUILTIN_STRINGSHARE:
initf = eolian_type_name_get(abtp); break;
default:
break;
}
return initf;
}
static void
_gen_reflect_get(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt,
const Eolian_Function *fid, Eina_Hash *refh)
{
if (eolian_type_is_ptr(valt))
return;
const Eolian_Type *abtp = eolian_type_aliased_base_get(valt);
const char *initf = _get_reflect_initf(abtp);
if (!initf)
return;
Eolian_Function_Type et = (Eolian_Function_Type)eina_hash_find(refh, &fid);
if (et == EOLIAN_PROP_SET)
eina_hash_set(refh, &fid, (void *)EOLIAN_PROPERTY);
else
eina_hash_set(refh, &fid, (void *)EOLIAN_PROP_GET);
eina_strbuf_append(buf, "\nstatic Eina_Value\n");
eina_strbuf_append_printf(buf, "__eolian_%s_%s_get_reflect(Eo *obj)\n",
cnamel, eolian_function_name_get(fid));
eina_strbuf_append(buf, "{\n");
Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_RETURN);
const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : "";
Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_GET, EINA_FALSE);
eina_strbuf_append_printf(buf, " %s%sval = %s(obj);\n", ct, starsp, fcn);
eina_stringshare_del(fcn);
eina_stringshare_del(ct);
eina_strbuf_append_printf(buf, " return eina_value_%s_init(val);\n", initf);
eina_strbuf_append(buf, "}\n\n");
}
static void
_gen_reflect_set(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt,
const Eolian_Function *fid, Eina_Hash *refh)
{
if (eolian_type_is_ptr(valt))
return;
const Eolian_Type *abtp = eolian_type_aliased_base_get(valt);
const char *initf = _get_reflect_initf(abtp);
if (!initf)
return;
Eolian_Function_Type et = (Eolian_Function_Type)eina_hash_find(refh, &fid);
if (et == EOLIAN_PROP_GET)
eina_hash_set(refh, &fid, (void *)EOLIAN_PROPERTY);
else
eina_hash_set(refh, &fid, (void *)EOLIAN_PROP_SET);
eina_strbuf_append(buf, "\nstatic void\n");
eina_strbuf_append_printf(buf, "__eolian_%s_%s_set_reflect(Eo *obj, Eina_Value val)\n",
cnamel, eolian_function_name_get(fid));
eina_strbuf_append(buf, "{\n");
Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_PARAM);
const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : "";
eina_strbuf_append_printf(buf, " %s%scval;\n", ct, starsp);
eina_stringshare_del(ct);
eina_strbuf_append_printf(buf, " eina_value_%s_convert(&val, &cval);\n", initf);
Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET, EINA_FALSE);
eina_strbuf_append_printf(buf, " %s(obj, cval);\n", fcn);
eina_stringshare_del(fcn);
eina_strbuf_append(buf, " eina_value_flush(&val);\n");
eina_strbuf_append(buf, "}\n\n");
}
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)
const Eolian_Implement *impl, Eina_Strbuf *lbuf,
Eina_Hash *refh)
{
Eina_Bool is_empty = eolian_implement_is_empty(impl, ftype);
Eina_Bool is_auto = eolian_implement_is_auto(impl, ftype);
@ -336,6 +443,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
Eina_Bool var_as_ret = EINA_FALSE;
/* assume we're not generating reflection api by default */
const Eolian_Type *reflect_type = NULL;
const Eolian_Expression *def_ret = NULL;
const Eolian_Type *rtp = eolian_function_return_type_get(fid, ftype);
@ -357,6 +466,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
{
Eolian_Function_Parameter *pr = d1;
rtp = eolian_parameter_type_get(pr);
/* reflect only when returning 1 val */
reflect_type = rtp;
var_as_ret = EINA_TRUE;
def_ret = eolian_parameter_default_value_get(pr);
}
@ -364,7 +475,18 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
}
}
else if (ftype == EOLIAN_PROP_SET)
func_suffix = "_set";
{
func_suffix = "_set";
Eina_Iterator *itr = eolian_property_values_get(fid, ftype);
void *d1, *d2;
/* reflect with 1 value */
if (eina_iterator_next(itr, &d1) && !eina_iterator_next(itr, &d2))
{
Eolian_Function_Parameter *pr = d1;
reflect_type = eolian_parameter_type_get(pr);
}
eina_iterator_free(itr);
}
Eina_Strbuf *params = eina_strbuf_new(); /* par1, par2, par3, ... */
Eina_Strbuf *params_full = eina_strbuf_new(); /* T par1, U par2, ... for decl */
@ -375,6 +497,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
/* property keys */
{
Eina_Iterator *itr = eolian_property_keys_get(fid, ftype);
if (itr) /* has keys: no reflection */
reflect_type = NULL;
Eolian_Function_Parameter *pr;
EINA_ITERATOR_FOREACH(itr, pr)
{
@ -386,8 +510,14 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_strbuf_append(params, ", ");
eina_strbuf_append(params, prn);
eina_strbuf_append_printf(params_full, ", %s", ptn);
eina_strbuf_append_printf(params_full_imp, ", %s", ptn);
if (eina_strbuf_length_get(params_full) || !eolian_function_is_class(fid))
{
eina_strbuf_append(params_full, ", ");
eina_strbuf_append(params_full_imp, ", ");
}
eina_strbuf_append_printf(params_full, "%s", ptn);
eina_strbuf_append_printf(params_full_imp, "%s", ptn);
if (ptn[strlen(ptn) - 1] != '*')
{
eina_strbuf_append_char(params_full, ' ');
@ -470,7 +600,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
if (eina_strbuf_length_get(params))
eina_strbuf_append(params, ", ");
eina_strbuf_append(params_full_imp, ", ");
if (eina_strbuf_length_get(params_full_imp) || !eolian_function_is_class(fid))
eina_strbuf_append(params_full_imp, ", ");
eina_strbuf_append(params_full_imp, ptn);
if (!had_star)
eina_strbuf_append_char(params_full_imp, ' ');
@ -480,7 +611,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_strbuf_append(params_full_imp, " EINA_UNUSED");
eina_strbuf_append(params, prn);
eina_strbuf_append(params_full, ", ");
if (eina_strbuf_length_get(params_full) || !eolian_function_is_class(fid))
eina_strbuf_append(params_full, ", ");
eina_strbuf_append(params_full, ptn);
if (!had_star)
eina_strbuf_append_char(params_full, ' ');
@ -559,12 +691,17 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_strbuf_append(buf, func_suffix);
/* ([const ]Eo *obj, Data_Type *pd, impl_full_params); */
eina_strbuf_append_char(buf, '(');
if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
eina_strbuf_append(buf, "const ");
eina_strbuf_append(buf, "Eo *obj, ");
eina_strbuf_append(buf, dt);
eina_strbuf_append(buf, " *pd");
if (!eolian_function_is_class(fid))
{
if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid))
eina_strbuf_append(buf, "const ");
eina_strbuf_append(buf, "Eo *obj, ");
eina_strbuf_append(buf, dt);
eina_strbuf_append(buf, " *pd");
}
eina_strbuf_append(buf, eina_strbuf_string_get(params_full_imp));
if (eina_strbuf_length_get(params_full_imp) == 0 && eolian_function_is_class(fid))
eina_strbuf_append(buf, "void");
eina_strbuf_append(buf, ");\n\n");
}
@ -635,8 +772,17 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_stringshare_del(dt);
}
if (impl_same_class)
if (impl_same_class && !eolian_function_is_class(fid))
{
/* generate reflection implementation */
if (reflect_type)
{
if (ftype == EOLIAN_PROP_GET)
_gen_reflect_get(buf, cnamel, reflect_type, fid, refh);
else
_gen_reflect_set(buf, cnamel, reflect_type, fid, refh);
}
void *data;
Eina_Iterator *itr = eolian_property_keys_get(fid, ftype);
Eina_Bool has_params = eina_iterator_next(itr, &data);
@ -746,6 +892,36 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid,
eina_stringshare_del(lfn);
eina_stringshare_del(eofn);
}
if (impl_same_class && eolian_function_is_class(fid))
{
eina_strbuf_append(buf, "EOAPI ");
if (rtp)
eina_strbuf_append(buf, eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN));
else
eina_strbuf_append(buf, "void");
eina_strbuf_append(buf, " ");
eina_strbuf_append(buf, eolian_function_full_c_name_get(fid, ftype, EINA_FALSE));
eina_strbuf_append(buf, "(");
if (eina_strbuf_length_get(params_full) == 0)
eina_strbuf_append(buf, "void");
else
eina_strbuf_append_buffer(buf, params_full);
eina_strbuf_append(buf, ")\n");
eina_strbuf_append(buf, "{\n");
eina_strbuf_append_printf(buf, " %s();\n", eolian_class_c_get_function_name_get(cl));
if (rtp)
eina_strbuf_append(buf, " return ");
else
eina_strbuf_append(buf, " ");
eina_strbuf_append_printf(buf, "_%s", ocnamel);
eina_strbuf_append_char(buf, '_');
eina_strbuf_append(buf, eolian_function_name_get(fid));
eina_strbuf_append(buf, func_suffix);
eina_strbuf_append(buf, "(");
eina_strbuf_append_buffer(buf, params);
eina_strbuf_append(buf, ");\n");
eina_strbuf_append(buf, "}\n");
}
free(cname);
free(cnamel);
@ -789,7 +965,33 @@ _gen_opfunc(const Eolian_Function *fid, Eolian_Function_Type ftype,
}
static void
_gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf)
_gen_reflop(const Eolian_Function *fid, Eina_Strbuf *buf, const char *cnamel, Eina_Hash *refh)
{
Eolian_Function_Type aftype = (Eolian_Function_Type)eina_hash_find(refh, &fid);
if (aftype == EOLIAN_UNRESOLVED)
return;
eina_strbuf_append_printf(buf, " {\"%s\", ", eolian_function_name_get(fid));
if (aftype == EOLIAN_PROP_SET || aftype == EOLIAN_PROPERTY)
{
eina_strbuf_append_printf(buf, "__eolian_%s_%s_set_reflect, ",
cnamel, eolian_function_name_get(fid));
}
else
eina_strbuf_append(buf, "NULL, ");
if (aftype == EOLIAN_PROP_GET || aftype == EOLIAN_PROPERTY)
{
eina_strbuf_append_printf(buf, "__eolian_%s_%s_get_reflect},\n",
cnamel, eolian_function_name_get(fid));
}
else
eina_strbuf_append(buf, "NULL},\n");
}
static void
_gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Hash *refh)
{
char *cnamel = NULL, *cnameu = NULL;
eo_gen_class_names_get(cl, NULL, &cnameu, &cnamel);
@ -797,9 +999,11 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf)
eina_strbuf_append(buf, "\nstatic Eina_Bool\n_");
eina_strbuf_append(buf, cnamel);
eina_strbuf_append(buf, "_class_initializer(Efl_Class *klass)\n{\n");
eina_strbuf_append(buf, " const Efl_Object_Ops *opsp = NULL, *copsp = NULL;\n\n");
eina_strbuf_append(buf, " const Efl_Object_Ops *opsp = NULL;\n\n");
eina_strbuf_append(buf, " const Efl_Object_Property_Reflection_Ops *ropsp = NULL;\n\n");
Eina_Strbuf *ops = eina_strbuf_new(), *cops = eina_strbuf_new();
Eina_Strbuf *ops = eina_strbuf_new();
Eina_Strbuf *refls = eina_strbuf_new();
/* start over with clean itearator */
const Eolian_Implement *imp;
@ -810,13 +1014,10 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf)
Eolian_Function_Type ftype;
const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype);
Eina_Strbuf *obuf = ops;
if (eolian_function_is_class(fid))
obuf = cops;
if (eolian_function_is_class(fid)) continue;
if (!eina_strbuf_length_get(obuf))
eina_strbuf_append_printf(obuf, " EFL_OPS_DEFINE(%s,\n",
(obuf == ops) ? "ops" : "cops");
if (!eina_strbuf_length_get(ops))
eina_strbuf_append_printf(ops, " EFL_OPS_DEFINE(ops,\n");
Eina_Bool found_get = !!eina_hash_find(_funcs_params_init_get, &imp);
Eina_Bool found_set = !!eina_hash_find(_funcs_params_init_set, &imp);
@ -827,17 +1028,20 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf)
switch (ftype)
{
case EOLIAN_PROP_GET:
_gen_opfunc(fid, EOLIAN_PROP_GET, obuf, imp, found_get, cnamel, ocnamel);
_gen_opfunc(fid, EOLIAN_PROP_GET, ops, imp, found_get, cnamel, ocnamel);
_gen_reflop(fid, refls, cnamel, refh);
break;
case EOLIAN_PROP_SET:
_gen_opfunc(fid, EOLIAN_PROP_SET, obuf, imp, found_set, cnamel, ocnamel);
_gen_opfunc(fid, EOLIAN_PROP_SET, ops, imp, found_set, cnamel, ocnamel);
_gen_reflop(fid, refls, cnamel, refh);
break;
case EOLIAN_PROPERTY:
_gen_opfunc(fid, EOLIAN_PROP_SET, obuf, imp, found_set, cnamel, ocnamel);
_gen_opfunc(fid, EOLIAN_PROP_GET, obuf, imp, found_get, cnamel, ocnamel);
_gen_opfunc(fid, EOLIAN_PROP_SET, ops, imp, found_set, cnamel, ocnamel);
_gen_opfunc(fid, EOLIAN_PROP_GET, ops, imp, found_get, cnamel, ocnamel);
_gen_reflop(fid, refls, cnamel, refh);
break;
default:
_gen_opfunc(fid, EOLIAN_METHOD, obuf, imp, found_get, cnamel, ocnamel);
_gen_opfunc(fid, EOLIAN_METHOD, ops, imp, found_get, cnamel, ocnamel);
break;
}
@ -864,28 +1068,21 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf)
eina_strbuf_append(buf, " opsp = &ops;\n");
eina_strbuf_append(buf, "#endif\n\n");
}
if (eina_strbuf_length_get(cops))
{
eina_strbuf_append_printf(buf, "#ifndef %s_EXTRA_CLASS_OPS\n", cnameu);
eina_strbuf_append_printf(buf, "#define %s_EXTRA_CLASS_OPS\n", cnameu);
eina_strbuf_append(buf, "#endif\n\n");
eina_strbuf_append_printf(cops, " %s_EXTRA_CLASS_OPS\n );\n", cnameu);
eina_strbuf_append(buf, eina_strbuf_string_get(cops));
eina_strbuf_append(buf, " copsp = &cops;\n\n");
}
else
if (eina_strbuf_length_get(refls))
{
eina_strbuf_append_printf(buf, "#ifdef %s_EXTRA_CLASS_OPS\n", cnameu);
eina_strbuf_append_printf(buf, " EFL_OPS_DEFINE(cops, %s_EXTRA_CLASS_OPS);\n", cnameu);
eina_strbuf_append(buf, " copsp = &cops;\n");
eina_strbuf_append(buf, "#endif\n\n");
eina_strbuf_append(buf, " static const Efl_Object_Property_Reflection refl_table[] = {\n");
eina_strbuf_append_buffer(buf, refls);
eina_strbuf_append(buf, " };\n");
eina_strbuf_append(buf, " static const Efl_Object_Property_Reflection_Ops rops = {\n");
eina_strbuf_append(buf, " refl_table, EINA_C_ARRAY_LENGTH(refl_table)\n");
eina_strbuf_append(buf, " };\n");
eina_strbuf_append(buf, " ropsp = &rops;\n\n");
}
eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, copsp, NULL);\n");
eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, ropsp);\n");
eina_strbuf_free(ops);
eina_strbuf_free(cops);
eina_strbuf_append(buf, "}\n\n");
@ -927,6 +1124,11 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
Eina_Strbuf *lbuf = eina_strbuf_new();
/* Eolian_Function -> Eolian_Function_Type
* maps which parts of which functions are qualified for reflection
*/
Eina_Hash *refh = eina_hash_pointer_new(NULL);
/* method section */
{
Eina_Iterator *itr = eolian_class_implements_get(cl);
@ -939,21 +1141,22 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
{
case EOLIAN_PROP_GET:
case EOLIAN_PROP_SET:
_gen_func(cl, fid, ftype, buf, imp, lbuf);
_gen_func(cl, fid, ftype, buf, imp, lbuf, refh);
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(cl, fid, EOLIAN_PROP_SET, buf, imp, lbuf, refh);
_gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, lbuf, refh);
break;
default:
_gen_func(cl, fid, EOLIAN_METHOD, buf, imp, lbuf);
_gen_func(cl, fid, EOLIAN_METHOD, buf, imp, lbuf, refh);
}
}
eina_iterator_free(itr);
}
/* class initializer - contains method defs */
_gen_initializer(cl, buf);
_gen_initializer(cl, buf, refh);
eina_hash_free(refh);
/* class description */
eina_strbuf_append(buf, "static const Efl_Class_Description _");

View File

@ -147,11 +147,12 @@ struct function_definition_generator
<< (do_super ? " protected " : " private ") << "static extern "
<< eolian_mono::marshall_type(true)
<< " " << string
<< "(System.IntPtr obj"
<< *grammar::attribute_reorder<-1, -1>
<< "(" << (f.is_static ? "" : "System.IntPtr obj")
<< ((!f.is_static && (f.parameters.size() > 0)) ? ", " : "")
<< (grammar::attribute_reorder<-1, -1>
(
(", " << marshall_annotation << " " << marshall_parameter)
)
(marshall_annotation << " " << marshall_parameter)
) % ",")
<< ");\n")
.generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
return false;
@ -169,15 +170,15 @@ struct function_definition_generator
// inherited is set in the constructor, true if this instance is from a pure C# class (not generated).
if (do_super && !f.is_static)
self = "(inherited ? Efl.Eo.Globals.efl_super(" + self + ", this.NativeClass) : " + self + ")";
else
self = name_helpers::klass_get_full_name(f.klass) + "()";
else if (f.is_static)
self = "";
if(!as_generator
(scope_tab << ((do_super && !f.is_static) ? "virtual " : "") << "public " << (f.is_static ? "static " : "") << return_type << " " << string << "(" << (parameter % ", ")
<< ") {\n "
<< eolian_mono::function_definition_preamble() << string << "("
<< self
<< *(", " << argument_invocation ) << ");\n"
<< self << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "")
<< (argument_invocation % ", ") << ");\n"
<< eolian_mono::function_definition_epilogue()
<< " }\n")
.generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.parameters, f, f.c_name, f.parameters, f), context))

View File

@ -104,8 +104,9 @@ namespace Efl {
public void Launch(Efl.Csharp.Components components=Components.Ui) {
Init(components);
Efl.App app = Efl.App.AppMain;
foreach (var arg in Environment.GetCommandLineArgs())
app.AppendArg(arg);
Eina.Array<String> command_line = new Eina.Array<String>();
command_line.Append(Environment.GetCommandLineArgs());
app.SetCommandArray(command_line);
app.ArgumentsEvt += (object sender, LoopArgumentsEvt_Args evt) => {
if (evt.arg.Initialization) {
OnInitialize(evt.arg.Argv);

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT 1
#include <Efl_Core.h>
#include <stdlib.h>
#include <errno.h>

View File

@ -0,0 +1,70 @@
#define EFL_BETA_API_SUPPORT
#define EFL_EO_API_SUPPORT
#include <stdio.h>
#include <string.h>
#include <Eina.h>
#include <Eo.h>
#include <Efl_Core.h>
static void _read_change(void *data EINA_UNUSED, const Efl_Event *ev);
static Eina_Value _task_exit(void *data, Eina_Value v, const Eina_Future *dead EINA_UNUSED);
static void
_read_change(void *data EINA_UNUSED, const Efl_Event *ev)
{
// read output from exe status changed - read what we can
Eo *obj = ev->object;
char buf[4096];
Eina_Rw_Slice rw_slice = EINA_SLICE_ARRAY(buf);
while (efl_io_reader_can_read_get(obj))
{
Eina_Error err = efl_io_reader_read(obj, &rw_slice);
if (!err)
{
buf[rw_slice.len] = 0;
printf("--- READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf);
}
}
}
static Eina_Value
_task_exit(void *data, Eina_Value v, const Eina_Future *dead EINA_UNUSED)
{
// called when the task says it has completed and exited.
// all output to read has stopped
Eo *obj = data;
printf("--- [%p] EXITED exit_code=%i\n", obj, efl_task_exit_code_get(obj));
efl_loop_quit(efl_provider_find(obj, EFL_LOOP_CLASS), eina_value_int_init(99));
efl_del(obj);
return v;
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
{
Eo *app = ev->object;
const Efl_Version *v = efl_app_build_efl_version_get(app);
printf("--- EFL %i.%i.%i\n", v->major, v->minor, v->micro);
Eina_Array *args = eina_array_new(1);
eina_array_push(args, eina_stringshare_add("./efl_exe_test.sh"));
Eo *env = efl_duplicate(efl_env_self());
efl_core_env_set(env, "BLAH", "blahvalue");
Eo *obj = efl_add(EFL_EXE_CLASS, app,
efl_core_command_line_command_array_set(efl_added, args),
efl_exe_env_set(efl_added, env),
efl_task_flags_set(efl_added, EFL_TASK_FLAGS_USE_STDOUT | EFL_TASK_FLAGS_USE_STDIN),
efl_event_callback_add(efl_added, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _read_change, NULL),
eina_future_then(efl_task_run(efl_added), _task_exit, efl_added)
);
efl_unref(env);
char *buf2 = "sample-input\n";
Eina_Slice slice = { strlen(buf2), buf2 };
Eina_Error err = efl_io_writer_write(obj, &slice, NULL);
if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj, efl_core_command_line_command_get(obj), (int)slice.len);
}
EFL_MAIN()

View File

@ -0,0 +1,9 @@
#!/bin/sh
echo "BLAH is $BLAH"
sleep 1
read IN
sleep 1
echo "INPUT is $IN"
sleep 1
exit 7

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Core.h>
static void

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>

View File

@ -18,9 +18,7 @@ class TestMain
Efl.All.Init();
var loop = new Efl.Loop();
var timer = new Efl.LoopTimer(loop, (Efl.LoopTimer t) => {
t.SetInterval(1.0);
});
var timer = new Efl.LoopTimer(loop, interval:1.0);
TestMain listener = new TestMain(loop);

View File

@ -1,6 +1,7 @@
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <ctype.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -123,7 +123,7 @@ main(int argc, char *argv[])
for (i = 1; i < argc; i++)
{
const char *address = argv[i];
Eo *o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, address);
Eo *o = efl_net_ip_address_parse( address);
if (o)
{
_print_ip_addr_info(o);
@ -131,7 +131,7 @@ main(int argc, char *argv[])
}
else
{
Eina_Future *f = efl_net_ip_address_resolve(EFL_NET_IP_ADDRESS_CLASS, address, 0, 0);
Eina_Future *f = efl_net_ip_address_resolve( address, 0, 0);
eina_future_then(f, _resolved, address);
printf("INFO: %s is not numeric, resolving...\n", address);
resolving = eina_list_append(resolving, f);

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>
@ -464,7 +465,7 @@ efl_main(void *data EINA_UNUSED,
efl_net_ssl_context_hostname_set(efl_added, hostname_override),
efl_net_ssl_context_setup(efl_added, cipher, EINA_TRUE));
#else
ssl_ctx = efl_net_ssl_context_default_dialer_get(EFL_NET_SSL_CONTEXT_CLASS);
ssl_ctx = efl_net_ssl_context_default_dialer_get();
fprintf(stderr, "INFO: using default context for dialers.\n");
#endif

View File

@ -1,3 +1,4 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Net.h>
#include <Ecore_Getopt.h>
#include <fcntl.h>

View File

@ -0,0 +1,193 @@
#define EFL_BETA_API_SUPPORT
#define EFL_EO_API_SUPPORT
#include <stdio.h>
#include <string.h>
#include <Eina.h>
#include <Eo.h>
#include <Efl_Core.h>
static void _th_read_change(void *data EINA_UNUSED, const Efl_Event *ev);
static void _th_main(void *data EINA_UNUSED, const Efl_Event *ev);
static void _read_change(void *data EINA_UNUSED, const Efl_Event *ev);
static Eina_Value _task_exit(void *data, Eina_Value v, const Eina_Future *dead EINA_UNUSED);
////////////////////////////////////////////////////////////////////////////
//// thread side of code
static void
_th_timeout(void *data EINA_UNUSED, const Efl_Event *ev)
{
Eo *obj = data;
printf("--- START EXIT [%p]\n", obj);
efl_threadio_outdata_set(obj, (void *)0x9876);
efl_loop_quit(obj, eina_value_int_init(99));
}
static void
_th_read_change(void *data EINA_UNUSED, const Efl_Event *ev)
{
// read input from parent thread/loop status chnaged - read what we can
Eo *obj = ev->object;
char buf[4096];
Eina_Rw_Slice rw_slice = EINA_SLICE_ARRAY(buf);
while (efl_io_reader_can_read_get(obj))
{
Eina_Error err = efl_io_reader_read(obj, &rw_slice);
if (!err)
{
buf[rw_slice.len] = 0;
printf("--- TH READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf);
char *buf2 = "yes-im-here ";
Eina_Slice slice = { strlen(buf2), buf2 };
Eina_Error err = efl_io_writer_write(obj, &slice, NULL);
if (!err)
{
Eina_Accessor *args_access = efl_core_command_line_command_access(obj);
printf("--- TH WRITE [%p] [%s] ok %i bytes\n", obj, efl_core_command_line_command_get(obj), (int)slice.len);
void *s = "";
eina_accessor_data_get(args_access, 1, &s);
if (!strcmp(s, "one"))
efl_add(EFL_LOOP_TIMER_CLASS, obj,
efl_loop_timer_interval_set(efl_added, 2.0),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _th_timeout, obj));
else
efl_add(EFL_LOOP_TIMER_CLASS, obj,
efl_loop_timer_interval_set(efl_added, 1.0),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _th_timeout, obj));
eina_accessor_free(args_access);
}
}
}
}
static void
_th_main(void *data EINA_UNUSED, const Efl_Event *ev)
{
// the "main function" of the thread thayt gets called with arguments
// just like eflm_main for the main loop
Eo *obj = ev->object;
Eina_Accessor *args_access = efl_core_command_line_command_access(obj);
void *s = "", *ss = "";
eina_accessor_data_get(args_access, 0, &s);
eina_accessor_data_get(args_access, 1, &ss);
printf("--- TH main %p, '%s' '%s' indata=%p\n", obj, s, ss, efl_threadio_indata_get(obj));
efl_event_callback_add
(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _th_read_change, NULL);
if (!strcmp(s, "one"))
{
Eina_Array *args = eina_array_new(1);
eina_array_push(args, eina_stringshare_add("number"));
eina_array_push(args, eina_stringshare_add("one"));
Eo *obj2 = efl_add(EFL_THREAD_CLASS, obj,
efl_threadio_indata_set(efl_added, (void *)0x1234),
efl_core_command_line_command_array_set(efl_added, args),
efl_task_flags_set(efl_added, EFL_TASK_FLAGS_USE_STDOUT | EFL_TASK_FLAGS_USE_STDIN),
efl_event_callback_add(efl_added, EFL_LOOP_EVENT_ARGUMENTS, _th_main, NULL),
efl_event_callback_add(efl_added, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _read_change, NULL),
eina_future_then(efl_task_run(efl_added), _task_exit, efl_added)
);
char *buf2 = "hello-out-there2 ";
Eina_Slice slice = { strlen(buf2), buf2 };
Eina_Error err = efl_io_writer_write(obj2, &slice, NULL);
if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj2, efl_core_command_line_command_get(obj), (int)slice.len);
}
eina_accessor_free(args_access);
}
////////////////////////////////////////////////////////////////////////////
//// main loop side of code
static void
_read_change(void *data EINA_UNUSED, const Efl_Event *ev)
{
// read output from thread status chnaged - read what we can
Eo *obj = ev->object;
char buf[4096];
Eina_Rw_Slice rw_slice = EINA_SLICE_ARRAY(buf);
while (efl_io_reader_can_read_get(obj))
{
Eina_Error err = efl_io_reader_read(obj, &rw_slice);
if (!err)
{
buf[rw_slice.len] = 0;
printf("--- READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf);
}
}
}
static Eina_Value
_task_exit(void *data, Eina_Value v, const Eina_Future *dead EINA_UNUSED)
{
// called when the task says it has completed and exited.
// all output to read has stopped
Eo *obj = data;
printf("--- [%p] EXITED exit_code=%i outdata=%p\n", obj, efl_task_exit_code_get(obj), efl_threadio_outdata_get(obj));
efl_del(obj);
return v;
}
////////////////////////////////////////////////////////////////////////////
// just main loop input handling
static void
_stdin_read_change(void *data EINA_UNUSED, const Efl_Event *ev)
{
// read output from thread status chnaged - read what we can
Eo *obj = ev->object;
char buf[4096];
Eina_Rw_Slice rw_slice = EINA_SLICE_ARRAY(buf);
while (efl_io_reader_can_read_get(obj))
{
Eina_Error err = efl_io_reader_read(obj, &rw_slice);
if (!err)
{
buf[rw_slice.len] = 0;
printf("--- STDIN READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf);
}
}
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
{
Eo *app = ev->object;
int threads = 2, i;
Eina_Accessor *args_access = efl_core_command_line_command_access(app);
void *s;
const Efl_Version *v = efl_app_build_efl_version_get(app);
printf("--- EFL %i.%i.%i\n", v->major, v->minor, v->micro);
s = NULL;
eina_accessor_data_get(args_access, 2, &s);
if (s && (!strcmp(s, "-stdinwatch")))
efl_event_callback_add(app, EFL_IO_READER_EVENT_CAN_READ_CHANGED,
_stdin_read_change, NULL);
s = NULL;
eina_accessor_data_get(args_access, 1, &s);
if (s) threads = atoi(s);
for (i = 0; i < threads; i++)
{
Eina_Array *args = eina_array_new(1);
eina_array_push(args, eina_stringshare_add("number"));
eina_array_push(args, eina_stringshare_add("one"));
Eo *obj = efl_add(EFL_THREAD_CLASS, app,
efl_threadio_indata_set(efl_added, (void *)0x5678),
efl_core_command_line_command_array_set(efl_added, args),
efl_task_flags_set(efl_added, EFL_TASK_FLAGS_USE_STDOUT | EFL_TASK_FLAGS_USE_STDIN),
efl_event_callback_add(efl_added, EFL_LOOP_EVENT_ARGUMENTS, _th_main, NULL),
efl_event_callback_add(efl_added, EFL_IO_READER_EVENT_CAN_READ_CHANGED, _read_change, NULL),
eina_future_then(efl_task_run(efl_added), _task_exit, efl_added)
);
char *buf2 = "hello-out-there ";
Eina_Slice slice = { strlen(buf2), buf2 };
Eina_Error err = efl_io_writer_write(obj, &slice, NULL);
if (!err) printf("--- WRITE [%p] [%s] ok %i bytes\n", obj, efl_core_command_line_command_get(obj), (int)slice.len);
}
}
EFL_MAIN()

View File

@ -64,7 +64,7 @@ elementary/label_example_03.c \
elementary/layout_example_01.c \
elementary/layout_example_02.c \
elementary/layout_example_03.c \
elementary/layout_model_connect.c \
elementary/layout_property_bind.c \
elementary/list_example_01.c \
elementary/list_example_02.c \
elementary/list_example_03.c \
@ -283,7 +283,7 @@ elementary/label_example_03 \
elementary/layout_example_01 \
elementary/layout_example_02 \
elementary/layout_example_03 \
elementary/layout_model_connect \
elementary/layout_property_bind \
elementary/list_example_01 \
elementary/list_example_02 \
elementary/list_example_03 \

View File

@ -58,7 +58,7 @@
/layout_example_01
/layout_example_02
/layout_example_03
/layout_model_connect
/layout_property_bind
/list_example_01
/list_example_02
/list_example_03

View File

@ -87,9 +87,9 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
);
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
efl_ui_model_connect(factory, "signal/efl,state,%v", "odd_style");
efl_ui_model_connect(factory, "signal/efl,state,%{selected;unselected}", "selected");
efl_ui_model_connect(factory, "efl.text", "name");
efl_ui_property_bind(factory, "signal/efl,state,%v", "odd_style");
efl_ui_property_bind(factory, "signal/efl,state,%{selected;unselected}", "selected");
efl_ui_property_bind(factory, "efl.text", "name");
efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
li = efl_add(EFL_UI_LIST_VIEW_CLASS, win

View File

@ -33,7 +33,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
efl_ui_model_connect(factory, "efl.text", "filename");
efl_ui_property_bind(factory, "efl.text", "filename");
efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
li = efl_add(EFL_UI_LIST_VIEW_CLASS, win);
@ -45,8 +45,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
imgf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win);
efl_ui_model_connect(imgf, "", "path"); //connect to "path" property
efl_ui_factory_model_connect(factory, "efl.icon", imgf);
efl_ui_property_bind(imgf, "", "path"); //connect to "path" property
efl_ui_factory_bind(factory, "efl.icon", imgf);
elm_win_resize_object_add(win, li);

View File

@ -150,8 +150,8 @@ _realized_1_cb(void *data EINA_UNUSED, const Efl_Event *event)
evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
efl_ui_model_connect(ie->layout, "efl.text", "name");
efl_ui_model_connect(ie->layout, "signal/efl,state,%v", "odd_style");
efl_ui_property_bind(ie->layout, "efl.text", "name");
efl_ui_property_bind(ie->layout, "signal/efl,state,%v", "odd_style");
}
static void
@ -163,7 +163,7 @@ _realized_2_cb(void *data EINA_UNUSED, const Efl_Event *event)
elm_object_focus_allow_set(ie->layout, EINA_TRUE);
evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
efl_ui_model_connect(ie->layout, "efl.text", "occupation");
efl_ui_property_bind(ie->layout, "efl.text", "occupation");
}
static Efl_Model*
@ -222,7 +222,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
priv->model = _make_model();
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
efl_ui_model_connect(factory, "efl.text", "filename");
efl_ui_property_bind(factory, "efl.text", "filename");
efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
priv->list1 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model));
@ -233,8 +233,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
efl_ui_list_view_layout_factory_set(priv->list1, factory);
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
efl_ui_model_connect(factory, "efl.text", "filename");
efl_ui_model_connect(factory, "signal/efl,state,%v", "selected");
efl_ui_property_bind(factory, "efl.text", "filename");
efl_ui_property_bind(factory, "signal/efl,state,%v", "selected");
efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
priv->list2 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model));
efl_event_callback_add(priv->list2, EFL_UI_LIST_VIEW_EVENT_ITEM_REALIZED, _realized_2_cb, priv->list2);

View File

@ -87,8 +87,6 @@ EAPI unsigned int ecore_init_ex(int argc, char **argv);
*/
EAPI unsigned int ecore_shutdown_ex(void);
#ifdef EFL_BETA_API_SUPPORT
/**
* @brief Inform EFL of the version this application was built for.
*
@ -97,7 +95,6 @@ EAPI unsigned int ecore_shutdown_ex(void);
* @since 1.18 (as beta)
*/
EWAPI void efl_build_version_set(int vmaj, int vmin, int vmic, int revision, const char *flavor, const char *build_id);
#endif
/**
* @}
@ -1388,7 +1385,13 @@ enum _Ecore_Fd_Handler_Flags
{
ECORE_FD_READ = 1, /**< Fd Read mask */
ECORE_FD_WRITE = 2, /**< Fd Write mask */
ECORE_FD_ERROR = 4 /**< Fd Error mask */
ECORE_FD_ERROR = 4, /**< Fd Error mask */
/* ECORE_FD_ALWAYS is intended to fix a problem with wayland
* and threads. It causes the fd handler to be called
* in any state, so wayland libs can call read_cancel
* if nothing is available to read. Everyone else should
* stay away. */
ECORE_FD_ALWAYS = 8, /**< Fd Always mask - DO NOT USE! */
};
typedef enum _Ecore_Fd_Handler_Flags Ecore_Fd_Handler_Flags;

View File

@ -26,6 +26,10 @@
* @{
*/
#include "efl_core_env.eo.h"
#include "efl_core_proc_env.eo.h"
#include "efl_core_command_line.eo.h"
#include "efl_loop_message.eo.h"
#include "efl_loop_message_handler.eo.h"

View File

@ -3,10 +3,6 @@
#include <Efl_Config.h>
#ifndef EFL_BETA_API_SUPPORT
#define EFL_BETA_API_SUPPORT
#endif
#include <Eina.h>
#include <Eo.h>
#include <Efl.h>

View File

@ -87,7 +87,7 @@ _ecore_event_filters_call(Eo *obj, Efl_Loop_Data *pd)
Filter *f;
Ecore_Event_Message_Handler_Data *eemhd;
Eo *ecore_event_handler = efl_loop_message_handler_get
(EFL_LOOP_CLASS, obj, ECORE_EVENT_MESSAGE_HANDLER_CLASS);
(obj, ECORE_EVENT_MESSAGE_HANDLER_CLASS);
if (!ecore_event_handler) return;
eemhd = efl_data_scope_get(ecore_event_handler, MY_CLASS);

View File

@ -246,8 +246,7 @@ _ecore_event_init(void)
if ((!choice) || (!choice[0])) choice = "chained_mempool";
_event_msg_handler =
efl_loop_message_handler_get(EFL_LOOP_CLASS,
_mainloop_singleton,
efl_loop_message_handler_get(_mainloop_singleton,
ECORE_EVENT_MESSAGE_HANDLER_CLASS);
if (!_event_msg_handler)
{

View File

@ -248,7 +248,7 @@ _ecore_try_add_to_call_list(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd, Ecore_Fd_Han
DBG("next_ready");
return;
}
if (fdh->read_active || fdh->write_active || fdh->error_active)
if (fdh->read_active || fdh->write_active || fdh->error_active || (fdh->flags & ECORE_FD_ALWAYS))
{
DBG("added");
// make sure next_ready is non-null by pointing to ourselves
@ -583,6 +583,10 @@ _ecore_main_fdh_epoll_mark_active(Eo *obj, Efl_Loop_Data *pd)
fdh->write_active = EINA_TRUE;
fdh->error_active = EINA_TRUE;
}
/* We'll add this one anyway outside this function,
don't want it twice */
if (fdh->flags & ECORE_FD_ALWAYS)
continue;
_ecore_try_add_to_call_list(obj, pd, fdh);
}
@ -1357,6 +1361,9 @@ _ecore_main_fd_handler_add(Eo *obj,
if (is_file)
pd->file_fd_handlers = eina_list_append
(pd->file_fd_handlers, fdh);
if (fdh->flags & ECORE_FD_ALWAYS)
pd->always_fd_handlers = eina_list_append
(pd->always_fd_handlers, fdh);
pd->fd_handlers = (Ecore_Fd_Handler *)
eina_inlist_append(EINA_INLIST_GET(pd->fd_handlers),
EINA_INLIST_GET(fdh));
@ -1664,6 +1671,9 @@ _ecore_main_content_clear(Eo *obj, Efl_Loop_Data *pd)
if (pd->file_fd_handlers)
pd->file_fd_handlers =
eina_list_free(pd->file_fd_handlers);
if (pd->always_fd_handlers)
pd->always_fd_handlers =
eina_list_free(pd->always_fd_handlers);
if (pd->fd_handlers_to_delete)
pd->fd_handlers_to_delete =
eina_list_free(pd->fd_handlers_to_delete);
@ -1741,7 +1751,7 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout)
fd_set rfds, wfds, exfds;
Ecore_Fd_Handler *fdh;
Eina_List *l;
int max_fd, ret;
int max_fd, ret, outval;
#ifndef _WIN32
int err_no;
#endif
@ -1785,17 +1795,17 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout)
{
if (!fdh->delete_me)
{
if (fdh->flags & ECORE_FD_READ)
if ((fdh->flags & ECORE_FD_READ) || (fdh->flags & ECORE_FD_ALWAYS))
{
FD_SET(fdh->fd, &rfds);
if (fdh->fd > max_fd) max_fd = fdh->fd;
}
if (fdh->flags & ECORE_FD_WRITE)
if ((fdh->flags & ECORE_FD_WRITE) || (fdh->flags & ECORE_FD_ALWAYS))
{
FD_SET(fdh->fd, &wfds);
if (fdh->fd > max_fd) max_fd = fdh->fd;
}
if (fdh->flags & ECORE_FD_ERROR)
if ((fdh->flags & ECORE_FD_ERROR) || (fdh->flags & ECORE_FD_ALWAYS))
{
FD_SET(fdh->fd, &exfds);
if (fdh->fd > max_fd) max_fd = fdh->fd;
@ -1815,17 +1825,17 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout)
{
if (!fdh->delete_me)
{
if (fdh->flags & ECORE_FD_READ)
if ((fdh->flags & ECORE_FD_READ) || (fdh->flags & ECORE_FD_ALWAYS))
{
FD_SET(fdh->fd, &rfds);
if (fdh->fd > max_fd) max_fd = fdh->fd;
}
if (fdh->flags & ECORE_FD_WRITE)
if ((fdh->flags & ECORE_FD_WRITE) || (fdh->flags & ECORE_FD_ALWAYS))
{
FD_SET(fdh->fd, &wfds);
if (fdh->fd > max_fd) max_fd = fdh->fd;
}
if (fdh->flags & ECORE_FD_ERROR)
if ((fdh->flags & ECORE_FD_ERROR) || (fdh->flags & ECORE_FD_ALWAYS))
{
FD_SET(fdh->fd, &exfds);
if (fdh->fd > max_fd) max_fd = fdh->fd;
@ -1851,7 +1861,11 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout)
if (ret < 0)
{
#ifndef _WIN32
if (err_no == EINTR) return -1;
if (err_no == EINTR)
{
outval = -1;
goto BAIL;
}
else if (err_no == EBADF) _ecore_main_fd_handlers_bads_rem(obj, pd);
#endif
}
@ -1890,13 +1904,22 @@ _ecore_main_select(Eo *obj, Efl_Loop_Data *pd, double timeout)
_ecore_try_add_to_call_list(obj, pd, fdh);
}
}
outval = 1;
goto BAIL;
}
outval = 0;
BAIL:
EINA_LIST_FOREACH(pd->always_fd_handlers, l, fdh)
_ecore_try_add_to_call_list(obj, pd, fdh);
if (ret > 0)
{
_ecore_main_fd_handlers_cleanup(obj, pd);
#ifdef _WIN32
_ecore_main_win32_handlers_cleanup(obj, pd);
#endif
return 1;
}
return 0;
return outval || pd->always_fd_handlers;
}
#endif
@ -2017,6 +2040,8 @@ _ecore_main_fd_handlers_cleanup(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd)
EINA_INLIST_GET(fdh));
if (fdh->file)
pd->file_fd_handlers = eina_list_remove(pd->file_fd_handlers, fdh);
if (fdh->flags & ECORE_FD_ALWAYS)
pd->always_fd_handlers = eina_list_remove(pd->always_fd_handlers, fdh);
ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
ecore_fd_handler_mp_free(fdh);
pd->fd_handlers_to_delete = eina_list_remove_list
@ -2074,7 +2099,8 @@ _ecore_main_fd_handlers_call(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd)
{
if ((fdh->read_active) ||
(fdh->write_active) ||
(fdh->error_active))
(fdh->error_active) ||
(fdh->flags & ECORE_FD_ALWAYS))
{
fdh->references++;
if (!_ecore_call_fd_cb(fdh->func, fdh->data, fdh))

View File

@ -138,6 +138,7 @@ struct _Efl_Loop_Data
Ecore_Fd_Handler *fd_handlers;
Eina_List *fd_handlers_with_prep;
Eina_List *file_fd_handlers;
Eina_List *always_fd_handlers;
Eina_List *fd_handlers_with_buffer;
Eina_List *fd_handlers_to_delete;
Ecore_Fd_Handler *fd_handlers_to_call;
@ -188,7 +189,6 @@ struct _Efl_Task_Data
{
Eina_Stringshare *command;
Eina_Array *args;
Eina_Hash *env;
Efl_Task_Priority priority;
int exit_code;
Efl_Task_Flags flags;

View File

@ -1,4 +1,4 @@
class Efl.Accelerate_Interpolator extends Efl.Object implements Efl.Interpolator
class @beta Efl.Accelerate_Interpolator extends Efl.Object implements Efl.Interpolator
{
[[Efl accelerate interpolator class

View File

@ -15,7 +15,7 @@
Efl_Version _app_efl_version = { 0, 0, 0, 0, NULL, NULL };
EOLIAN static Efl_App*
_efl_app_app_main_get(const Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
_efl_app_app_main_get(void)
{
if (_mainloop_singleton) return _mainloop_singleton;
_mainloop_singleton = efl_add_ref(EFL_APP_CLASS, NULL);

View File

@ -1,6 +1,6 @@
import efl_types;
class Efl.App extends Efl.Loop
class @beta Efl.App extends Efl.Loop implements Efl.Core.Command_Line
{
[[ ]]
data: null;

View File

@ -37,10 +37,10 @@ _efl_appthread_efl_object_destructor(Eo *obj, Efl_Appthread_Data *pd)
{
if (pd->fd.in >= 0)
{
efl_del(pd->fd.in_handler);
efl_del(pd->fd.out_handler);
efl_del(pd->ctrl.in_handler);
efl_del(pd->ctrl.out_handler);
// efl_del(pd->fd.in_handler);
// efl_del(pd->fd.out_handler);
// efl_del(pd->ctrl.in_handler);
// efl_del(pd->ctrl.out_handler);
close(pd->fd.in);
close(pd->fd.out);
close(pd->ctrl.in);

View File

@ -1,4 +1,4 @@
class Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer
class @beta Efl.Appthread extends Efl.Loop implements Efl.ThreadIO, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line
{
[[ ]]
methods {

View File

@ -1,4 +1,4 @@
class Efl.Boolean_Model extends Efl.Composite_Model
class @beta Efl.Boolean_Model extends Efl.Composite_Model
{
[[Efl boolean model class]]
methods {

View File

@ -1,4 +1,4 @@
class Efl.Bounce_Interpolator extends Efl.Object implements Efl.Interpolator
class @beta Efl.Bounce_Interpolator extends Efl.Object implements Efl.Interpolator
{
[[Efl bounce interpolator class]]
data: Efl_Bounce_Interpolator_Data;

View File

@ -1,4 +1,4 @@
class Efl.Composite_Model extends Efl.Loop_Model implements Efl.Ui.View
class @beta Efl.Composite_Model extends Efl.Loop_Model implements Efl.Ui.View
{
[[Efl model for all composite class which provide a unified API to set source of data.

View File

@ -1,6 +1,6 @@
import eina_types;
class Efl.Container_Model extends Efl.Loop_Model
class @beta Efl.Container_Model extends Efl.Loop_Model
{
[[
Class used to create data models from Eina containers.

View File

@ -1,4 +1,4 @@
class Efl.Container_Model_Item extends Efl.Object implements Efl.Model
class @beta Efl.Container_Model_Item extends Efl.Object implements Efl.Model
{
[[
Used as a child of @Efl.Container_Model.

View File

@ -0,0 +1,273 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#define EFL_CORE_COMMAND_LINE_PROTECTED
#include <Efl_Core.h>
#define MY_CLASS EFL_CORE_COMMAND_LINE_MIXIN
typedef struct {
Eina_Bool filled;
char *string_command;
Eina_Array *command;
} Efl_Core_Command_Line_Data;
static Eina_Array *
_unescape(const char *s)
{
Eina_Array *args;
const char *p;
char *tmp = NULL, *d = NULL;
if (!s) return NULL;
Eina_Bool in_quote_dbl = EINA_FALSE;
Eina_Bool in_quote = EINA_FALSE;
args = eina_array_new(16);
if (!args) return NULL;
for (p = s; *p; p++)
{
if (!tmp) tmp = d = strdup(p);
if (tmp)
{
if (in_quote_dbl)
{
switch (*p)
{
case '\"':
in_quote_dbl = EINA_FALSE;
*d = 0;
eina_array_push(args, eina_stringshare_add(tmp));
free(tmp);
tmp = d = NULL;
break;
case '\\':
p++;
EINA_FALLTHROUGH
default:
*d = *p;
d++;
break;
}
}
else if (in_quote)
{
switch (*p)
{
case '\'':
in_quote = EINA_FALSE;
*d = 0;
eina_array_push(args, eina_stringshare_add(tmp));
free(tmp);
tmp = d = NULL;
break;
case '\\':
p++;
EINA_FALLTHROUGH
default:
*d = *p;
d++;
break;
}
}
else
{
switch (*p)
{
case ' ':
case '\t':
case '\r':
case '\n':
*d = 0;
eina_array_push(args, eina_stringshare_add(tmp));
free(tmp);
tmp = d = NULL;
break;
case '\"':
in_quote_dbl = EINA_TRUE;
break;
case '\'':
in_quote = EINA_TRUE;
break;
case '\\':
p++;
EINA_FALLTHROUGH
default:
*d = *p;
d++;
break;
}
}
}
}
if (tmp)
{
*d = 0;
eina_array_push(args, eina_stringshare_add(tmp));
free(tmp);
}
return args;
}
static char *
_escape(const char *s)
{
Eina_Bool need_quote = EINA_FALSE;
const char *p;
char *s2 = malloc((strlen(s) * 2) + 1 + 2), *d;
if (!s2) return NULL;
for (p = s; *p; p++)
{
switch (*p)
{
case '\'':
case '\"':
case '$':
case '#':
case ';':
case '&':
case '`':
case '|':
case '(':
case ')':
case '[':
case ']':
case '{':
case '}':
case '>':
case '<':
case '\n':
case '\r':
case '\t':
case ' ':
need_quote = EINA_TRUE;
default:
break;
}
}
d = s2;
if (need_quote)
{
*d = '\"';
d++;
}
for (p = s; *p; p++, d++)
{
switch (*p)
{
case '\\':
case '\'':
case '\"':
*d = '\\';
d++;
EINA_FALLTHROUGH
default:
*d = *p;
break;
}
}
if (need_quote)
{
*d = '\"';
d++;
}
*d = 0;
return s2;
}
EOLIAN static const char *
_efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd)
{
return pd->string_command;
}
EOLIAN static Eina_Accessor *
_efl_core_command_line_command_access(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd)
{
return pd->command ? eina_array_accessor_new(pd->command) : NULL;
}
static void
_remove_invalid_chars(char *command)
{
for (unsigned int i = 0; i < strlen(command); ++i)
{
char c = command[i];
if (c < 0x20 || c == 0x7f)
command[i] = '\x12';
}
}
EOLIAN static Eina_Bool
_efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd, Eina_Array *array)
{
EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE);
Eina_Strbuf *command = eina_strbuf_new();
unsigned int i = 0;
pd->command = eina_array_new(eina_array_count(array));
for (i = 0; i < (array ? eina_array_count(array) : 0); ++i)
{
char *content = eina_array_data_get(array, i);
char *param = calloc(1, strlen(content) + 1);
if (!param)
{
free(param);
while (eina_array_count(pd->command) > 0)
eina_stringshare_del(eina_array_pop(pd->command));
eina_array_free(pd->command);
pd->command = NULL;
for (;i < (array ? eina_array_count(array) : 0); ++i)
{
content = eina_array_data_get(array, i);
eina_stringshare_del(content);
}
eina_array_free(array);
return EINA_FALSE;
}
//build the command
if (i != 0)
eina_strbuf_append(command, " ");
eina_strbuf_append(command, _escape(content));
//convert string to stringshare
strcpy(param, content);
_remove_invalid_chars(param);
eina_array_push(pd->command, eina_stringshare_add(param));
free(param);
eina_stringshare_del(content);
}
pd->string_command = eina_strbuf_release(command);
pd->filled = EINA_TRUE;
eina_array_free(array);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
_efl_core_command_line_command_string_set(Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd, const char *str)
{
EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE);
pd->string_command = eina_strdup(str);
_remove_invalid_chars(pd->string_command);
pd->command = _unescape(str);
if (!pd->command)
{
if (pd->string_command)
free(pd->string_command);
pd->string_command = NULL;
return EINA_FALSE;
}
pd->filled = EINA_TRUE;
return EINA_TRUE;
}
#include "efl_core_command_line.eo.c"

View File

@ -0,0 +1,80 @@
mixin @beta Efl.Core.Command_Line {
[[A mixin that implements standard functions for command lines.
This object parses the command line that gets passed, later the object can be accessed via accessor or the string directly.
]]
methods {
@property command {
[[ A commandline that encodes arguments in a command string.
This command is unix shell-style, thus whitespace separates
arguments unless escaped. Also a semi-colon ';', ampersand
'&', pipe/bar '|', hash '#', bracket, square brace, brace
character ('(', ')', '[', ']', '{', '}'), exclamation
mark '!', backquote '`', greator or less than ('>' '<')
character unless escaped or in quotes would cause
args_count/value to not be generated properly, because
it would force complex shell interpretation which
will not be supported in evaluating the arg_count/value
information, but the final shell may interpret this if this
is executed via a command-line shell. To not be a complex
shell command, it should be simple with paths, options
and variable expansions, but nothing more complex involving
the above unescaped characters.
"cat -option /path/file"
"cat 'quoted argument'"
"cat ~/path/escaped\ argument"
"/bin/cat escaped\ argument $VARIABLE"
etc.
It should not try and use "complex shell features" if you
want the arg_count and arg_value set to be correct after
setting the command string. For example none of:
"VAR=x /bin/command && /bin/othercommand >& /dev/null"
"VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &"
etc.
If you set the command the arg_count/value property contents
can change and be completely re-evaluated by parsing the
command string into an argument array set along with
interpreting escapes back into individual argument strings.
]]
get {
}
values {
commandline : string;
}
}
command_access {
[[ Get the accessor which enables access to each argument that got passed to this object. ]]
return : accessor<stringshare>;
}
@property command_array {
[[ Use an array to fill this object
Every element of a string is a argument.
]]
set {
return : bool; [[On success $true, $false otherwise]]
}
values {
array : array<stringshare @owned> @owned; [[An array where every array field is an argument]]
}
}
@property command_string {
[[ Use a string to fill this object
The string will be split at every unescaped ' ', every resulting substring will be a new argument to the command line.
]]
set {
return : bool; [[On success $true, $false otherwise]]
}
values {
str : string; [[A command in form of a string]]
}
}
}
}

View File

@ -0,0 +1,107 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <Ecore.h>
#include <ctype.h>
#include "ecore_private.h"
#define MY_CLASS EFL_CORE_ENV_CLASS
extern char **environ;
typedef struct {
Eina_Hash *env;
} Efl_Core_Env_Data;
static inline Eina_Bool
str_valid(const char *var)
{
return var && var[0] != '\0';
}
static inline Eina_Bool
key_valid(const char *key)
{
if (!key || key[0] == '\0') return EINA_FALSE;
if (isdigit(key[0])) return EINA_FALSE;
for (int i = 0; key[i] != '\0'; ++i) {
if (!isalnum(key[i]) && key[i] != '_') return EINA_FALSE;
}
return EINA_TRUE;
}
EOLIAN static void
_efl_core_env_env_set(Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd, const char *var, const char *value)
{
EINA_SAFETY_ON_FALSE_RETURN(key_valid(var));
if (str_valid(value))
{
Eina_Stringshare *share;
share = eina_hash_set(pd->env, var, eina_stringshare_add(value));
if (share) eina_stringshare_del(share);
}
else
eina_hash_del(pd->env, var, NULL);
}
EOLIAN static const char*
_efl_core_env_env_get(const Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd, const char *var)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(key_valid(var), NULL);
return eina_hash_find(pd->env, var);
}
EOLIAN static void
_efl_core_env_unset(Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd, const char *var)
{
EINA_SAFETY_ON_FALSE_RETURN(key_valid(var));
eina_hash_del_by_key(pd->env, var);
}
EOLIAN static void
_efl_core_env_clear(Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd)
{
eina_hash_free_buckets(pd->env);
}
EOLIAN static Efl_Core_Env*
_efl_core_env_efl_duplicate_duplicate(const Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd)
{
Efl_Core_Env *fork = efl_add_ref(MY_CLASS, NULL);
Eina_Iterator *iter;
Eina_Hash_Tuple *tuple;
iter = eina_hash_iterator_tuple_new(pd->env);
EINA_ITERATOR_FOREACH(iter, tuple)
{
efl_core_env_set(fork, tuple->key, tuple->data);
}
eina_iterator_free(iter);
return fork;
}
EOLIAN static Efl_Object*
_efl_core_env_efl_object_constructor(Eo *obj, Efl_Core_Env_Data *pd)
{
pd->env = eina_hash_string_superfast_new((Eina_Free_Cb)eina_stringshare_del);
return efl_constructor(efl_super(obj, MY_CLASS));
}
EOLIAN static Eina_Iterator*
_efl_core_env_content_get(const Eo *obj EINA_UNUSED, Efl_Core_Env_Data *pd)
{
Eina_Iterator *iter = eina_hash_iterator_key_new(pd->env);
return iter;
}
#include "efl_core_env.eo.c"

View File

@ -0,0 +1,57 @@
class @beta Efl.Core.Env extends Efl.Object implements Efl.Duplicate {
[[This object can maintain a set of key value pairs
A object of this type alone does not apply the object to the system.
For getting the value into the system, see @Efl.Core.Proc_Env.
A object can be forked, which will only copy its values, changes to the returned object will not change the object where it is forked off.
]]
methods {
@property env {
[[ Stored var value pairs of this object.
Var must contain only: underscores ('_'), letters ('a-z', 'A-Z'),
numbers ('0-9'), but the first character may not be a number.
]]
set {
[[ Add a new pair to this object ]]
}
get {
[[ Get the value of the $var, or $null if no such $var exists in the object]]
}
keys {
var: string; [[ The name of the variable ]]
}
values {
value: string; [[ Set var to this value if not $NULL,
otherwise clear this env value if value
is $NULL or if it is an empty string ]]
}
}
unset {
[[ Remove the pair with the matching $var from this object]]
params {
var : string; [[ The name of the variable ]]
}
}
clear {
[[ Remove all pairs from this object]]
}
@property content {
[[ Get the content of this object.
This will return a iterator that contains all keys that are part of this object.
]]
get {
}
values {
iter : iterator<string>;
}
}
}
implements {
Efl.Object.constructor;
Efl.Duplicate.duplicate;
}
}

View File

@ -0,0 +1,147 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <Ecore.h>
#ifdef HAVE_CRT_EXTERNS_H
# include <crt_externs.h>
#endif
#include "ecore_private.h"
#define MY_CLASS EFL_CORE_PROC_ENV_CLASS
static Efl_Core_Env *env = NULL;
typedef struct {
Eina_Bool in_sync;
} Efl_Core_Proc_Env_Data;
static void
_sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd)
{
Eina_List *existing_keys = NULL, *n;
Eina_Iterator *content;
const char *key;
pd->in_sync = EINA_TRUE;
content = efl_core_env_content_get(obj);
EINA_ITERATOR_FOREACH(content, key)
{
existing_keys = eina_list_append(existing_keys, key);
}
if (environ)
{
char **p;
for (p = environ; *p; p++)
{
char **values;
values = eina_str_split(*p, "=", 2);
efl_core_env_set(obj, values[0], values[1]);
EINA_LIST_FOREACH(existing_keys, n, key)
{
if (!strcmp(key, values[0]))
{
existing_keys = eina_list_remove_list(existing_keys, n);
break;
}
}
}
}
EINA_LIST_FOREACH(existing_keys, n, key)
{
efl_core_env_unset(obj, key);
}
pd->in_sync = EINA_FALSE;
}
EOLIAN static const char*
_efl_core_proc_env_efl_core_env_env_get(const Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *var)
{
if (!pd->in_sync)
_sync((Eo*)obj, pd);
return efl_core_env_get(efl_super(obj, MY_CLASS), var);
}
EOLIAN static void
_efl_core_proc_env_efl_core_env_env_set(Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *var, const char *value)
{
efl_core_env_set(efl_super(obj, MY_CLASS), var, value);
if (!pd->in_sync)
{
if (value)
setenv(var, value, 1);
else
unsetenv(var);
}
}
EOLIAN static void
_efl_core_proc_env_efl_core_env_unset(Eo *obj, Efl_Core_Proc_Env_Data *pd, const char *key)
{
efl_core_env_unset(efl_super(obj, MY_CLASS), key);
if (!pd->in_sync)
{
unsetenv(key);
}
}
EOLIAN static void
_efl_core_proc_env_efl_core_env_clear(Eo *obj, Efl_Core_Proc_Env_Data *pd)
{
efl_core_env_clear(efl_super(obj, MY_CLASS));
if (!pd->in_sync)
{
#ifdef HAVE_CLEARENV
clearenv();
#else
environ = NULL;
#endif
}
}
EOLIAN static Efl_Duplicate*
_efl_core_proc_env_efl_duplicate_duplicate(const Eo *obj, Efl_Core_Proc_Env_Data *pd)
{
if (!pd->in_sync)
_sync((Eo*) obj, pd);
return efl_duplicate(efl_super(obj, MY_CLASS));
}
EOLIAN static Eina_Iterator*
_efl_core_proc_env_efl_core_env_content_get(const Eo *obj, Efl_Core_Proc_Env_Data *pd)
{
if (!pd->in_sync)
_sync((Eo*) obj, pd);
return efl_core_env_content_get(efl_super(obj, MY_CLASS));
}
EOLIAN static Efl_Object*
_efl_core_proc_env_efl_object_constructor(Eo *obj, Efl_Core_Proc_Env_Data *pd EINA_UNUSED)
{
EINA_SAFETY_ON_TRUE_RETURN_VAL(!!env, NULL);
obj = efl_constructor(efl_super(obj, MY_CLASS));
return obj;
}
EOLIAN static Efl_Core_Env*
_efl_core_proc_env_self(void)
{
if (!env)
{
efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
env = efl_add_ref(EFL_CORE_PROC_ENV_CLASS, NULL);
efl_domain_current_pop();
efl_wref_add(env, &env);
}
return env;
}
#include "efl_core_proc_env.eo.c"

View File

@ -0,0 +1,21 @@
class @beta Efl.Core.Proc_Env extends Efl.Core.Env
{
eo_prefix : efl_env;
methods {
self @class {
[[Get a instance of this object
The object will apply the environment operations onto this process.
]]
return : Efl.Core.Env;
}
}
implements {
Efl.Core.Env.env { set; get; }
Efl.Core.Env.content { get; }
Efl.Core.Env.unset;
Efl.Core.Env.clear;
Efl.Duplicate.duplicate;
Efl.Object.constructor;
}
}

View File

@ -1,4 +1,4 @@
class Efl.Cubic_Bezier_Interpolator extends Efl.Object implements Efl.Interpolator
class @beta Efl.Cubic_Bezier_Interpolator extends Efl.Object implements Efl.Interpolator
{
[[Efl cubic_bezier interpolator class]]
data: Efl_Cubic_Bezier_Interpolator_Data;

View File

@ -1,4 +1,4 @@
class Efl.Decelerate_Interpolator extends Efl.Object implements Efl.Interpolator
class @beta Efl.Decelerate_Interpolator extends Efl.Object implements Efl.Interpolator
{
[[Efl decelerate interpolator class

View File

@ -1,4 +1,4 @@
class Efl.Divisor_Interpolator extends Efl.Object implements Efl.Interpolator
class @beta Efl.Divisor_Interpolator extends Efl.Object implements Efl.Interpolator
{
[[Efl divisor interpolator class]]
data: Efl_Divisor_Interpolator_Data;

View File

@ -40,6 +40,7 @@ typedef struct _Efl_Exe_Data Efl_Exe_Data;
struct _Efl_Exe_Data
{
Efl_Core_Env *env;
int exit_signal;
Efl_Exe_Flags flags;
#ifdef _WIN32
@ -165,22 +166,6 @@ _exec(const char *cmd, Efl_Exe_Flags flags)
}
}
static Eina_Bool
_foreach_env(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata EINA_UNUSED)
{
int keylen;
char *buf, *s;
if (!data) return EINA_TRUE;
keylen = strlen(key);
buf = alloca(keylen + 1 + strlen(data) + 1);
strcpy(buf, key);
buf[keylen] = '=';
strcpy(buf + keylen + 1, data);
if ((s = strdup(buf))) putenv(s);
return EINA_TRUE;
}
static void
_exe_exit_eval(Eo *obj, Efl_Exe_Data *pd)
{
@ -206,7 +191,7 @@ _exe_exit_eval(Eo *obj, Efl_Exe_Data *pd)
// 128+n Fatal error signal "n" kill -9 $PPID $? returns 137 (128 + 9)
// 130 Script terminated by Control-C Ctl-C Control-C is fatal error signal 2, (130 = 128 + 2, see above)
// 255* Exit status out of range exit -1 exit takes only integer args in the range 0 - 255
//
//
// According to the above table, exit codes 1 - 2,
// 126 - 165, and 255 [1] have special meanings, and
// should therefore be avoided for user-specified exit
@ -300,6 +285,25 @@ _run_clean_cb(Efl_Loop_Consumer *consumer EINA_UNUSED,
//////////////////////////////////////////////////////////////////////////
EOLIAN static void
_efl_exe_env_set(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Core_Env *env)
{
if (pd->env == env) return;
if (!pd->env)
efl_unref(pd->env);
pd->env = env;
if (pd->env)
efl_ref(pd->env);
}
EOLIAN static Efl_Core_Env*
_efl_exe_env_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
{
return pd->env;
}
EOLIAN static void
_efl_exe_signal(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Exe_Signal sig)
{
@ -391,7 +395,7 @@ _efl_exe_efl_task_priority_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
}
EOLIAN static Eina_Future *
_efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
_efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd)
{
#ifdef _WIN32
return EINA_FALSE;
@ -410,7 +414,7 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
if (!td) return NULL;
// get a cmdline to run
cmd = efl_task_command_get(obj);
cmd = efl_core_command_line_command_get(obj);
if (!cmd) return NULL;
ret = pipe(pipe_exited);
@ -564,17 +568,28 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
// clear systemd notify socket... only relevant for systemd world,
// otherwise shouldn't be trouble
putenv("NOTIFY_SOCKET=");
// force the env hash to update from env vars
efl_task_env_get(loop, "HOME");
// actually setenv the env hash (clear what was there before so it is
// actually setenv the env object (clear what was there before so it is
// the only env there)
#ifdef HAVE_CLEARENV
clearenv();
#else
environ = NULL;
#endif
eina_hash_foreach(td->env, _foreach_env, NULL);
if (pd->env)
{
Eina_Iterator *itr;
const char *key;
#ifdef HAVE_CLEARENV
clearenv();
#else
environ = NULL;
#endif
itr = efl_core_env_content_get(pd->env);
EINA_ITERATOR_FOREACH(itr, key)
{
setenv(key, efl_core_env_get(pd->env, key) , 1);
}
efl_unref(pd->env);
pd->env = NULL;
}
// actually execute!
_exec(cmd, pd->flags);

View File

@ -19,7 +19,7 @@ enum Efl.Exe_Flags {
hide_io = 4
}
class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer
class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line
{
[[ ]]
methods {
@ -42,6 +42,23 @@ class Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.C
sig: int; [[ The exit signal, or -1 if no exit signal happened ]]
}
}
@property env {
[[ If $env is $null then the process created by this object is
going to inherit the enviroment of this process.
In case $env is not $null then the environment variables declared
in this object will represent the environment passed to the new process.
]]
get {
[[ Get the object assosiated with this object ]]
}
set {
[[ Set the object assosiated with this object ]]
}
values {
env : Efl.Core.Env; [[$env will be referenced until this object does not need it anymore.]]
}
}
}
implements {
Efl.Object.constructor;

View File

@ -31,8 +31,6 @@
# define __EFL_NET(...)
#endif
#ifdef EFL_BETA_API_SUPPORT
// This file is designed to be included again and again
// so cleanup last inclusion before generating this one.
#undef _EFL_VERSION_MICRO
@ -127,5 +125,3 @@
ecore_shutdown(); \
return real__; \
}
#endif /* EFL_BETA_API_SUPPORT */

View File

@ -1,4 +1,4 @@
class Efl.Generic_Model extends Efl.Loop_Model
class @beta Efl.Generic_Model extends Efl.Loop_Model
{
[[
Generic model that allows any property to be manually set.

View File

@ -1,4 +1,4 @@
class Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer {
class @beta Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer {
[[A wrapper object offering easy to use buffered streams over existing I/O class.
The buffered stream encapsulates an actual @Efl.Io.Reader or

View File

@ -1,4 +1,4 @@
mixin Efl.Io.Closer_Fd requires Efl.Object extends Efl.Io.Closer {
mixin @beta Efl.Io.Closer_Fd requires Efl.Object extends Efl.Io.Closer {
[[Close fd using close(2).
@since 1.19

View File

@ -1,6 +1,6 @@
import eina_types;
class Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer {
class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer {
[[Copy from an @Efl.Io.Reader source to @Efl.Io.Writer destination.
During usage it will keep reference to @.source and

View File

@ -1,4 +1,4 @@
class Efl.Io.File extends Efl.Loop_Fd implements Efl.File, Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io.Closer_Fd, Efl.Io.Sizer_Fd, Efl.Io.Positioner_Fd {
class @beta Efl.Io.File extends Efl.Loop_Fd implements Efl.File, Efl.Io.Reader_Fd, Efl.Io.Writer_Fd, Efl.Io.Closer_Fd, Efl.Io.Sizer_Fd, Efl.Io.Positioner_Fd {
[[File access (open, close, read, write, lseek, ftruncate)
@Efl.Io.Closer.close_on_exec and

View File

@ -1,4 +1,4 @@
mixin Efl.Io.Positioner_Fd extends Efl.Io.Positioner {
mixin @beta Efl.Io.Positioner_Fd extends Efl.Io.Positioner {
[[Positions fd using lseek(2).
@since 1.19

View File

@ -1,4 +1,4 @@
mixin Efl.Io.Reader_Fd extends Efl.Io.Reader {
mixin @beta Efl.Io.Reader_Fd extends Efl.Io.Reader {
[[Reads fd using read(2).
@since 1.19

View File

@ -1,4 +1,4 @@
mixin Efl.Io.Sizer_Fd extends Efl.Io.Sizer {
mixin @beta Efl.Io.Sizer_Fd extends Efl.Io.Sizer {
[[Resizes fd usign ftruncate(2).
@since 1.19

View File

@ -1,4 +1,4 @@
class Efl.Io.Stderr extends Efl.Loop_Fd implements Efl.Io.Writer_Fd {
class @beta Efl.Io.Stderr extends Efl.Loop_Fd implements Efl.Io.Writer_Fd {
[[Application's standard error (stderr).
@since 1.19

View File

@ -1,4 +1,4 @@
class Efl.Io.Stdin extends Efl.Loop_Fd implements Efl.Io.Reader_Fd {
class @beta Efl.Io.Stdin extends Efl.Loop_Fd implements Efl.Io.Reader_Fd {
[[Application's standard input (stdin).
@since 1.19

View File

@ -1,4 +1,4 @@
class Efl.Io.Stdout extends Efl.Loop_Fd implements Efl.Io.Writer_Fd {
class @beta Efl.Io.Stdout extends Efl.Loop_Fd implements Efl.Io.Writer_Fd {
[[Application's standard output (stdout).
@since 1.19

View File

@ -1,4 +1,4 @@
mixin Efl.Io.Writer_Fd extends Efl.Io.Writer {
mixin @beta Efl.Io.Writer_Fd extends Efl.Io.Writer {
[[Writes fd using write(2).
@since 1.19

View File

@ -1,4 +1,4 @@
class Efl.Linear_Interpolator extends Efl.Object implements Efl.Interpolator
class @beta Efl.Linear_Interpolator extends Efl.Object implements Efl.Interpolator
{
[[Efl linear interpolator class]]
data: Efl_Linear_Interpolator_Data;

View File

@ -15,8 +15,6 @@
#include "ecore_main_common.h"
extern char **environ;
typedef struct _Efl_Loop_Promise_Simple_Data Efl_Loop_Promise_Simple_Data;
typedef struct _Efl_Internal_Promise Efl_Internal_Promise;
@ -31,7 +29,7 @@ struct _Efl_Loop_Promise_Simple_Data
GENERIC_ALLOC_SIZE_DECLARE(Efl_Loop_Promise_Simple_Data);
EOLIAN static Efl_Loop_Message_Handler *
_efl_loop_message_handler_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Loop *loop, const Efl_Class *klass)
_efl_loop_message_handler_get(Efl_Loop *loop, const Efl_Class *klass)
{
Message_Handler mh = { 0 }, *mh2;
Efl_Loop_Data *ld = efl_data_scope_get(loop, EFL_LOOP_CLASS);
@ -53,15 +51,10 @@ _efl_loop_message_handler_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Loo
Eo *_mainloop_singleton = NULL;
Efl_Loop_Data *_mainloop_singleton_data = NULL;
extern Eina_Lock _environ_lock;
static Eina_List *_environ_strings_set = NULL;
static void _clean_old_environ(void);
EAPI Eo *
efl_main_loop_get(void)
{
return efl_app_main_get(EFL_APP_CLASS);
return efl_app_main_get();
}
EOLIAN static void
@ -316,7 +309,7 @@ _efl_loop_efl_object_constructor(Eo *obj, Efl_Loop_Data *pd)
pd->epoll_fd = -1;
pd->timer_fd = -1;
pd->future_message_handler = efl_loop_message_handler_get
(EFL_LOOP_CLASS, obj, EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS);
(obj, EFL_LOOP_MESSAGE_FUTURE_HANDLER_CLASS);
return obj;
}
@ -354,16 +347,6 @@ _efl_loop_efl_object_destructor(Eo *obj, Efl_Loop_Data *pd)
{
pd->future_message_handler = NULL;
eina_lock_take(&_environ_lock);
_clean_old_environ();
_environ_strings_set = eina_list_free(_environ_strings_set);
pd->env.environ_ptr = NULL;
free(pd->env.environ_copy);
pd->env.environ_copy = NULL;
eina_lock_release(&_environ_lock);
eina_value_flush(&pd->exit_code);
efl_destructor(efl_super(obj, EFL_LOOP_CLASS));
}
@ -400,17 +383,22 @@ _efl_loop_arguments_cleanup(Eo *o EINA_UNUSED, void *data, const Eina_Future *de
EAPI void
ecore_loop_arguments_send(int argc, const char **argv)
{
Eina_Array *arga;
Eina_Array *arga, *cml;
int i = 0;
efl_task_arg_reset(efl_main_loop_get());
arga = eina_array_new(argc);
cml = eina_array_new(argc);
for (i = 0; i < argc; i++)
{
eina_array_push(arga, eina_stringshare_add(argv[i]));
efl_task_arg_append(efl_main_loop_get(), argv[i]);
Eina_Stringshare *arg;
arg = eina_stringshare_add(argv[i]);
eina_array_push(arga, arg);
arg = eina_stringshare_add(argv[i]);
eina_array_push(cml, arg);
}
efl_core_command_line_command_array_set(efl_app_main_get(), cml);
efl_future_then(efl_main_loop_get(), efl_loop_job(efl_main_loop_get()),
.success = _efl_loop_arguments_send,
.free = _efl_loop_arguments_cleanup,
@ -674,178 +662,6 @@ efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
_app_efl_version.build_id = build_id ? strdup(build_id) : NULL;
}
static void
_env_sync(Efl_Loop_Data *pd, Efl_Task_Data *td)
{
Eina_Bool update = EINA_FALSE;
unsigned int count = 0, i;
char **p;
// count environs
if (environ)
{
for (p = environ; *p; p++) count++;
}
// cached env ptr is the same... so look deeper if things changes
if (pd->env.environ_ptr == environ)
{
// if we have no cached copy then update
if (!pd->env.environ_copy) update = EINA_TRUE;
else
{
// if any ptr in the cached copy doesnt match environ ptr
// then update
for (i = 0; i <= count; i++)
{
if (pd->env.environ_copy[i] != environ[i])
{
update = EINA_TRUE;
break;
}
}
}
}
// cached env ptr changed so we need to update anyway
else update = EINA_TRUE;
if (!update) return;
// things changed - do the update
pd->env.environ_ptr = environ;
free(pd->env.environ_copy);
pd->env.environ_copy = NULL;
if (count > 0)
{
pd->env.environ_copy = malloc((count + 1) * sizeof(char *));
if (pd->env.environ_copy)
{
for (i = 0; i <= count; i++)
pd->env.environ_copy[i] = environ[i];
}
}
// clear previous env hash and rebuild it from environ so it matches
if (td->env) eina_hash_free(td->env);
td->env = eina_hash_string_superfast_new
((Eina_Free_Cb)eina_stringshare_del);
for (i = 0; i < count; i++)
{
char *var;
const char *value;
if (!environ[i]) continue;
if ((value = strchr(environ[i], '=')))
{
if (*value)
{
if ((var = malloc(value - environ[i] + 1)))
{
strncpy(var, environ[i], value - environ[i]);
var[value - environ[i]] = 0;
value++;
eina_hash_add(td->env, var,
eina_stringshare_add(value));
free(var);
}
}
}
}
}
static void
_clean_old_environ(void)
{
char **p;
const char *str;
Eina_List *l, *ll;
Eina_Bool ok;
// clean up old strings no longer in environ
EINA_LIST_FOREACH_SAFE(_environ_strings_set, l, ll, str)
{
ok = EINA_FALSE;
for (p = environ; *p; p++)
{
if (*p == str)
{
ok = EINA_TRUE;
break;
}
}
if (!ok)
{
_environ_strings_set =
eina_list_remove_list(_environ_strings_set, l);
eina_stringshare_del(str);
}
}
}
EOLIAN static void
_efl_loop_efl_task_env_set(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, const char *var, const char *value)
{
char *str, *str2;
size_t varlen, vallen = 0;
if (!var) return;
Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS);
if (!td) return;
varlen = strlen(var);
if (value) vallen = strlen(value);
str = malloc(varlen + 1 + vallen + 1);
if (!str) return;
strcpy(str, var);
str[varlen] = '=';
if (value) strcpy(str + varlen + 1, value);
else str[varlen + 1] = 0;
str2 = (char *)eina_stringshare_add(str);
free(str);
if (!str2) return;
eina_lock_take(&_environ_lock);
if (putenv(str2) != 0)
{
eina_stringshare_del(str2);
eina_lock_release(&_environ_lock);
return;
}
_environ_strings_set = eina_list_append(_environ_strings_set, str2);
eina_lock_release(&_environ_lock);
efl_task_env_set(efl_super(obj, EFL_LOOP_CLASS), var, value);
eina_lock_take(&_environ_lock);
_clean_old_environ();
eina_lock_release(&_environ_lock);
}
EOLIAN static const char *
_efl_loop_efl_task_env_get(const Eo *obj, Efl_Loop_Data *pd, const char *var)
{
Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS);
if (!td) return NULL;
eina_lock_take(&_environ_lock);
_env_sync(pd, td);
eina_lock_release(&_environ_lock);
return efl_task_env_get(efl_super(obj, EFL_LOOP_CLASS), var);
}
EOLIAN static void
_efl_loop_efl_task_env_reset(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd)
{
Efl_Task_Data *td = efl_data_scope_get(obj, EFL_TASK_CLASS);
if (!td) return;
eina_lock_take(&_environ_lock);
#ifdef HAVE_CLEARENV
clearenv();
#else
environ = NULL;
#endif
_env_sync(pd, td);
eina_lock_release(&_environ_lock);
}
EOLIAN static Eina_Future *
_efl_loop_efl_task_run(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED)
{

View File

@ -4,7 +4,7 @@ struct Efl.Loop_Arguments {
initialization: bool; [[Set to $true when the program should initialize its internal state. This happen once per process instance.]]
}
class Efl.Loop extends Efl.Task
class @beta Efl.Loop extends Efl.Task
{
[[The Efl Main Loop
@ -125,8 +125,6 @@ class Efl.Loop extends Efl.Task
Efl.Object.invalidate;
Efl.Object.destructor;
Efl.Object.provider_find;
Efl.Task.env { set; get; }
Efl.Task.env_reset;
Efl.Task.run;
Efl.Task.end;
}

View File

@ -1,4 +1,4 @@
abstract Efl.Loop_Consumer extends Efl.Object
abstract @beta Efl.Loop_Consumer extends Efl.Object
{
[[An @Efl.Loop_Consumer is a class which requires one of the parents to provide
an @Efl.Loop interface when performing @Efl.Object.provider_find. It will enforce this by

View File

@ -1,4 +1,4 @@
class Efl.Loop_Fd extends Efl.Loop_Consumer
class @beta Efl.Loop_Fd extends Efl.Loop_Consumer
{
[[Fds are objects that watch the activity on a given
file descriptor. This file descriptor can be a

View File

@ -7,7 +7,7 @@ enum Efl.Loop_Handler_Flags {
error = 4, [[ Error channel input is desired ]]
}
class Efl.Loop_Handler extends Efl.Object
class @beta Efl.Loop_Handler extends Efl.Object
{
[[ An object that describes an low-level source of I/O to listen to
for available data to be read or written, depending on the OS and data

View File

@ -1,4 +1,4 @@
class Efl.Loop_Message extends Efl.Object
class @beta Efl.Loop_Message extends Efl.Object
{
[[Base message payload object class. Inherit this and extend for
specific message types.]]

View File

@ -1,4 +1,4 @@
class Efl.Loop_Message_Future extends Efl.Loop_Message
class @beta Efl.Loop_Message_Future extends Efl.Loop_Message
{
[[ Used internally for futures on the loop ]]
methods {

View File

@ -1,4 +1,4 @@
class Efl.Loop_Message_Future_Handler extends Efl.Loop_Message_Handler
class @beta Efl.Loop_Message_Future_Handler extends Efl.Loop_Message_Handler
{
[[ Internal use for future on an efl loop - replacing legacy ecore events ]]
methods {

Some files were not shown because too many files have changed in this diff Show More