forked from enlightenment/efl
Merge branch 'master' into feature/themes/flat
This commit is contained in:
commit
e6f3d3af26
|
@ -18,8 +18,8 @@ jobs:
|
|||
include:
|
||||
- os: osx
|
||||
env: BUILDSYSTEM=ninja
|
||||
- os: linux
|
||||
env: DISTRO=Fedora29-mingw CI_BUILD_TYPE=mingw
|
||||
#- os: linux
|
||||
#env: DISTRO=Fedora29-mingw CI_BUILD_TYPE=mingw
|
||||
- os: linux
|
||||
env: DISTRO=Fedora29 CI_BUILD_TYPE=options-enabled
|
||||
- os: linux
|
||||
|
|
2
README
2
README
|
@ -426,7 +426,7 @@ COMPILING AND INSTALLING
|
|||
make
|
||||
sudo make install
|
||||
|
||||
If you have doxygen, then you csan build documentation with:
|
||||
If you have doxygen, then you can build documentation with:
|
||||
|
||||
make doc
|
||||
|
||||
|
|
15
configure.ac
15
configure.ac
|
@ -298,6 +298,7 @@ if test "x${have_win32}" = "xyes" ; then
|
|||
# autotools macro and CXX is always set to g++ even if
|
||||
# it's not found. So we are using an internal variable
|
||||
# that does the work for now, may get broken in the future.
|
||||
AC_DEFINE([_POSIX_C_SOURCE], [200809L], [Define the POSIX version])
|
||||
if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
|
||||
AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
|
||||
fi
|
||||
|
@ -810,10 +811,14 @@ EFL_SELECT_WINDOWS_VERSION
|
|||
|
||||
### Checks for libraries
|
||||
|
||||
EFL_ADD_LIBS([EVIL], [-lpsapi -lole32 -lws2_32 -lsecur32 -luuid])
|
||||
EFL_ADD_LIBS([EVIL], [-lpsapi -lole32 -lws2_32 -lsecur32 -luuid -lregex])
|
||||
|
||||
### Checks for header files
|
||||
|
||||
AC_CHECK_HEADERS([regex.h fnmatch.h],
|
||||
[],
|
||||
[AC_MSG_ERROR([regex.h or fnmatch.h can not be found])])
|
||||
|
||||
### Checks for types
|
||||
|
||||
### Checks for structures
|
||||
|
@ -839,6 +844,14 @@ AC_SUBST([EVIL_CXXFLAGS])
|
|||
|
||||
### Checks for library functions
|
||||
|
||||
AC_SEARCH_LIBS([regcomp], [regex],
|
||||
[],
|
||||
[AC_MSG_ERROR([regcomp() can not be found in libregex])])
|
||||
|
||||
AC_SEARCH_LIBS([fnmatch], [regex],
|
||||
[],
|
||||
[AC_MSG_ERROR([fnmatch() can not be found in libregex])])
|
||||
|
||||
EFL_LIB_END_OPTIONAL([Evil])
|
||||
|
||||
AC_SUBST([USE_EVIL_CFLAGS])
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
efl_version: 1 22;
|
||||
|
||||
#include "macros.edc"
|
||||
|
||||
externals.external: "elm";
|
||||
|
|
|
@ -21,6 +21,7 @@ group { "efl/navigation_layout";
|
|||
relative: 0.0 1.0;
|
||||
}
|
||||
rel2.to_x: "base";
|
||||
align: 0.5 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ PROJECT_LOGO =
|
|||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = .
|
||||
OUTPUT_DIRECTORY = @top_builddir@/
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||
|
@ -594,7 +594,8 @@ WARN_LOGFILE =
|
|||
# with spaces.
|
||||
|
||||
INPUT = @top_srcdir@/src/lib \
|
||||
@top_srcdir@/elm_intro.h \
|
||||
@top_builddir@/src/lib \
|
||||
@top_builddir@/elm_intro.h \
|
||||
@srcdir@/index_elm.dox \
|
||||
@srcdir@/main.dox \
|
||||
@srcdir@/pkgconfig.dox \
|
||||
|
|
|
@ -12,15 +12,13 @@
|
|||
{{/inheritance}}
|
||||
<div class="level{{level}}"><span class="xref"><b>{{fullName.0.value}}</b></span></div>
|
||||
{{#derivedClasses}}
|
||||
<div class="level{{index}}">{{{specName.0.value}}}</div>
|
||||
<div class="level{{index}}"><xref uid="{{uid}}" text="{{fullName.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>
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
|
||||
{{#isNamespace}}
|
||||
Namespace {{fullName.0.value}}
|
||||
{{/isNamespace}}
|
||||
{{#inClass}}
|
||||
Class {{fullName.0.value}}
|
||||
{{/inClass}}
|
||||
{{#inStruct}}
|
||||
Struct {{fullName.0.value}}
|
||||
{{/inStruct}}
|
||||
{{#inInterface}}
|
||||
Interface {{fullName.0.value}}
|
||||
{{/inInterface}}
|
||||
{{#inEnum}}
|
||||
Enum {{fullName.0.value}}
|
||||
{{/inEnum}}
|
||||
{{#inDelegate}}
|
||||
Delegate {{fullName.0.value}}
|
||||
{{/inDelegate}}
|
||||
{{#inConstructor}}
|
||||
Constructor {{fullName.0.value}}
|
||||
{{/inConstructor}}
|
||||
{{#inField}}
|
||||
Field {{fullName.0.value}}
|
||||
{{/inField}}
|
||||
{{#inProperty}}
|
||||
Property {{fullName.0.value}}
|
||||
{{/inProperty}}
|
||||
{{#inMethod}}
|
||||
Method {{fullName.0.value}}
|
||||
{{/inMethod}}
|
||||
{{#inEvent}}
|
||||
Event {{fullName.0.value}}
|
||||
{{/inEvent}}
|
||||
{{#inOperator}}
|
||||
Operator {{fullName.0.value}}
|
||||
{{/inOperator}}
|
||||
{{#inEii}}
|
||||
Explict Interface Implementation {{fullName.0.value}}
|
||||
{{/inEii}}
|
||||
{{#inPackage}}
|
||||
Package {{fullName.0.value}}
|
||||
{{/inPackage}}
|
|
@ -1,8 +1,10 @@
|
|||
apiRules:
|
||||
- exclude:
|
||||
uidRegex: ^.*NativeInherit$
|
||||
uidRegex: ^.*NativeMethods$
|
||||
- exclude:
|
||||
uidRegex: ^.*NativeStruct$
|
||||
- exclude:
|
||||
uidRegex: ^.*Concrete$
|
||||
- include:
|
||||
uidRegex: ^Efl
|
||||
- include:
|
||||
|
|
|
@ -22,5 +22,19 @@ for f in `ls api/*.yml`; do
|
|||
sed -e 's/\(<xref href=\\"[^\\]*\)\\"/\1?displayProperty=fullName\\"/g' -i $f
|
||||
done;
|
||||
|
||||
# Add missing references to derived classes, so they can be rendered with
|
||||
# their full name.
|
||||
# https://github.com/dotnet/docfx/issues/3769#issuecomment-485616064
|
||||
for f in `grep -l derivedClasses api/*.yml`; do
|
||||
sed "1,/^ derivedClasses:$/d" $f > /tmp/efl_docfx_gendoc
|
||||
sed -i "/^ [^-]/,$ d" /tmp/efl_docfx_gendoc
|
||||
sed -i "/^[^ ]/,$ d" /tmp/efl_docfx_gendoc
|
||||
while read dash class
|
||||
do
|
||||
sed -i "s/^references:$/references:\n- uid: $class\n fullName: $class/g" $f
|
||||
done <<< "$(cat /tmp/efl_docfx_gendoc)"
|
||||
done;
|
||||
rm -rf /tmp/efl_docfx_gendoc
|
||||
|
||||
# DocFX Step 2: Generate HTML files
|
||||
mono bin/docfx.exe build docfx.json && echo "Docs ready in the _site folder!"
|
||||
|
|
|
@ -693,7 +693,7 @@
|
|||
* not seeing its front face.
|
||||
* @until evas_object_map_enable_set
|
||||
*
|
||||
* And we free this map, since since we messed too much with it and for the
|
||||
* And we free this map, since we messed too much with it and for the
|
||||
* last object we want something cleaner.
|
||||
* @until evas_map_free
|
||||
*
|
||||
|
|
|
@ -0,0 +1,202 @@
|
|||
doc_target = []
|
||||
|
||||
text_filter_properties= [
|
||||
['Blend Example', 'Sans', '24', 'blend'],
|
||||
['Blur', 'Sans:style=bold', '32', 'blur'],
|
||||
['Bump', 'Sans:style=bold', '64', 'bump'],
|
||||
['Curve', 'Sans:style=bold', '64', 'curve'],
|
||||
['Grow - Contour', 'Sans:style=bold', '32', 'grow'],
|
||||
['Mask', 'Sans:style=bold', '64', 'mask'],
|
||||
['Transform - Mirror effect', 'Sans', '50', 'transform'],
|
||||
]
|
||||
widget_previews = [
|
||||
['actionslider', 'preview-00.png', 'widget_preview_actionslider', '120', '30'],
|
||||
['bg', 'preview-00.png', 'widget_preview_bg', '50', '50'],
|
||||
['box', 'preview-00.png', 'widget_preview_box', '200', '160'],
|
||||
['bubble', 'preview-00.png', 'widget_preview_bubble1', '160', '50'],
|
||||
['bubble', 'preview-01.png', 'widget_preview_bubble2', '160', '50'],
|
||||
['bubble', 'preview-02.png', 'widget_preview_bubble3', '160', '50'],
|
||||
['button', 'preview-00.png', 'widget_preview_button1', '160', '50'],
|
||||
['button', 'preview-01.png', 'widget_preview_button2', '160', '50'],
|
||||
['button', 'preview-02.png', 'widget_preview_button3', '160', '50'],
|
||||
['calendar', 'preview-00.png', 'widget_preview_calendar', '300', '300'],
|
||||
['check', 'preview-00.png', 'widget_preview_check1', '160', '50'],
|
||||
['check', 'preview-01.png', 'widget_preview_check2', '160', '50'],
|
||||
['check', 'preview-02.png', 'widget_preview_check3', '160', '50'],
|
||||
['clock', 'preview-00.png', 'widget_preview_clock', '200', '100'],
|
||||
['colorselector', 'preview-00.png', 'widget_preview_colorselector', '320', '300'],
|
||||
['conformant', 'preview-00.png', 'widget_preview_conformant', '200', '400'],
|
||||
['combobox', 'preview-00.png', 'widget_preview_combobox', '300', '300'],
|
||||
['ctxpopup', 'preview-00.png', 'widget_preview_ctxpopup', '200', '130'],
|
||||
['datetime', 'preview-00.png', 'widget_preview_datetime1', '360', '60'],
|
||||
['datetime', 'preview-01.png', 'widget_preview_datetime2', '200', '60'],
|
||||
['datetime', 'preview-02.png', 'widget_preview_datetime3', '200', '60'],
|
||||
['dayselector', 'preview-00.png', 'widget_preview_dayselector', '350', '50'],
|
||||
['diskselector', 'preview-00.png', 'widget_preview_diskselector', '120', '50'],
|
||||
['entry', 'preview-00.png', 'widget_preview_entry1', '160', '50'],
|
||||
['entry', 'preview-01.png', 'widget_preview_entry2', '160', '50'],
|
||||
['entry', 'preview-02.png', 'widget_preview_entry3', '160', '50'],
|
||||
['entry', 'preview-03.png', 'widget_preview_entry4', '160', '50'],
|
||||
['fileselector', 'preview-00.png', 'widget_preview_fileselector', '300', '300'],
|
||||
['fileselector_button', 'preview-00.png', 'widget_preview_fileselector_button1', '200', '50'],
|
||||
['fileselector_button', 'preview-01.png', 'widget_preview_fileselector_button2', '200', '50'],
|
||||
['fileselector_button', 'preview-02.png', 'widget_preview_fileselector_button3', '160', '50'],
|
||||
['fileselector_entry', 'preview-00.png', 'widget_preview_fileselector_entry', '70', '50'],
|
||||
['flip', 'preview-00.png', 'widget_preview_flip', '100', '100'],
|
||||
['flipselector', 'preview-00.png', 'widget_preview_flipselector', '100', '60'],
|
||||
['frame', 'preview-00.png', 'widget_preview_frame', '100', '50'],
|
||||
['gengrid', 'preview-00.png', 'widget_preview_gengrid', '200', '160'],
|
||||
['genlist', 'preview-00.png', 'widget_preview_genlist1', '200', '200'],
|
||||
['genlist', 'preview-01.png', 'widget_preview_genlist2', '200', '160'],
|
||||
['genlist', 'preview-02.png', 'widget_preview_genlist3', '200', '160'],
|
||||
['genlist', 'preview-03.png', 'widget_preview_genlist4', '200', '160'],
|
||||
['genlist', 'preview-04.png', 'widget_preview_genlist5', '200', '160'],
|
||||
['hover', 'preview-00.png', 'widget_preview_hover', '90', '170'],
|
||||
['hoversel', 'preview-00.png', 'widget_preview_hoversel', '90', '170'],
|
||||
['icon', 'preview-00.png', 'widget_preview_icon', '50', '50'],
|
||||
['image', 'preview-00.png', 'widget_preview_image', '50', '50'],
|
||||
['index', 'preview-00.png', 'widget_preview_index', '200', '160'],
|
||||
['inwin', 'preview-00.png', 'widget_preview_inwin1', '200', '160'],
|
||||
['inwin', 'preview-01.png', 'widget_preview_inwin2', '200', '160'],
|
||||
['inwin', 'preview-02.png', 'widget_preview_inwin3', '200', '160'],
|
||||
['label', 'preview-00.png', 'widget_preview_label', '70', '30'],
|
||||
['layout', 'preview-00.png', 'widget_preview_layout', '200', '160'],
|
||||
['list', 'preview-00.png', 'widget_preview_list', '200', '200'],
|
||||
['map', 'preview-00.png', 'widget_preview_map', '256', '256'],
|
||||
['mapbuf', 'preview-00.png', 'widget_preview_mapbuf', '200', '200'],
|
||||
['menu', 'preview-00.png', 'widget_preview_menu', '100', '100'],
|
||||
['notify', 'preview-00.png', 'widget_preview_notify', '60', '30'],
|
||||
['nstate', 'preview-00.png', 'widget_preview_nstate', '45', '28'],
|
||||
['panel', 'preview-00.png', 'widget_preview_panel', '150', '50'],
|
||||
['panes', 'preview-00.png', 'widget_preview_panes', '200', '100'],
|
||||
['photocam', 'preview-00.png', 'widget_preview_photocam', '243', '162'],
|
||||
['popup', 'preview-00.png', 'widget_preview_popup', '480', '400'],
|
||||
['prefs', 'preview-00.png', 'widget_preview_prefs', '200', '160'],
|
||||
['prefs', 'preview-00.png', 'widget_preview_prefs', '280', '250'],
|
||||
['progressbar', 'preview-00.png', 'widget_preview_progressbar', '150', '50'],
|
||||
['radio', 'preview-00.png', 'widget_preview_radio', '60', '20'],
|
||||
['scroller', 'preview-00.png', 'widget_preview_scroller', '100', '30'],
|
||||
['segment_control', 'preview-00.png', 'widget_preview_segment_control', '240', '120'],
|
||||
['separator', 'preview-00.png', 'widget_preview_separator', '10', '80'],
|
||||
['slider', 'preview-00.png', 'widget_preview_slider', '200', '100'],
|
||||
['slideshow', 'preview-00.png', 'widget_preview_slideshow', '50', '50'],
|
||||
['spinner', 'preview-00.png', 'widget_preview_spinner', '160', '30'],
|
||||
['table', 'preview-00.png', 'widget_preview_table', '100', '100'],
|
||||
['thumb', 'preview-00.png', 'widget_preview_thumb', '100', '100'],
|
||||
['toolbar', 'preview-00.png', 'widget_preview_toolbar', '300', '100'],
|
||||
['web', 'preview-00.png', 'widget_preview_web', '300', '300'],
|
||||
['win', 'preview-00.png', 'widget_preview_win', '200', '200'],
|
||||
]
|
||||
|
||||
preview_text_filter = executable('preview_text_filter',
|
||||
join_paths('previews', 'preview_text_filter.c'),
|
||||
include_directories : config_dir,
|
||||
dependencies: [ecore_evas],
|
||||
build_by_default: false,
|
||||
)
|
||||
|
||||
widget_preview_eps = custom_target('widget_preview_prefs_epc',
|
||||
input: join_paths('widgets', 'widget_preview_prefs.epc'),
|
||||
output: 'widget_preview_prefs.epb',
|
||||
command: elm_prefs_cc_exe + ['@INPUT@', '@OUTPUT@'],
|
||||
build_by_default: false,
|
||||
depends: [elm_prefs_cc]
|
||||
)
|
||||
|
||||
shot_sh = find_program('shot.sh')
|
||||
tar = find_program('tar')
|
||||
convert = find_program('convert')
|
||||
|
||||
foreach text_filter_property : text_filter_properties
|
||||
text = text_filter_property[0]
|
||||
font = text_filter_property[1]
|
||||
size = text_filter_property[2]
|
||||
name = text_filter_property[3]
|
||||
filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 'examples', 'evas', 'filters', 'filter_'+name+'.lua'))
|
||||
|
||||
doc_target += custom_target('preview_text_filters_'+name,
|
||||
command: [env, 'EFL_RUN_IN_TREE=1', preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, size],
|
||||
depends: preview_text_filter,
|
||||
output: 'filter_'+name+'.png',
|
||||
build_by_default: false
|
||||
)
|
||||
endforeach
|
||||
|
||||
foreach widget_preview : widget_previews
|
||||
binary = widget_preview[2]
|
||||
|
||||
if get_variable(binary, preview_text_filter) == preview_text_filter
|
||||
tmp = executable(binary,
|
||||
join_paths('widgets', binary+'.c'),
|
||||
dependencies: elementary,
|
||||
build_by_default: false,
|
||||
c_args : [
|
||||
'-DPACKAGE_DATA_DIR="'+meson.current_build_dir()+'"',
|
||||
'-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
|
||||
'-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"',
|
||||
'-DDOCW_DIR="'+meson.current_build_dir()+'"']
|
||||
)
|
||||
set_variable(binary, tmp)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
foreach widget_preview : widget_previews
|
||||
directory = widget_preview[0]
|
||||
ss = widget_preview[1]
|
||||
binary = widget_preview[2]
|
||||
x = widget_preview[3]
|
||||
y = widget_preview[4]
|
||||
|
||||
widget_executable = get_variable(binary)
|
||||
|
||||
screen_shot_dir = join_paths(meson.build_root(), 'html', 'img', 'widget', directory)
|
||||
|
||||
create_preview = custom_target('widget_preview_'+('_'.join([directory, ss, x, y])),
|
||||
command: [shot_sh, screen_shot_dir, ss, widget_executable.full_path(), x, y],
|
||||
output: '-'.join([directory, ss, x, y]),
|
||||
depends: [widget_executable, widget_preview_eps],
|
||||
build_by_default: false,
|
||||
)
|
||||
convert_preview = []
|
||||
#
|
||||
# This does not work see https://github.com/the-paperless-project/paperless/issues/439 for more details
|
||||
# for now this means that no images will be in the latex documentation
|
||||
#
|
||||
#convert_preview = custom_target('convert_preview_'+('_'.join([directory, ss, x, y])),
|
||||
# command: [convert, join_paths(screen_shot_dir, ss), join_paths(screen_shot_dir, ss.split('.')[0]+'.eps')],
|
||||
# output: '-'.join([directory, ss, x, y])+'.eps',
|
||||
# depends: [create_preview],
|
||||
# build_by_default: false,
|
||||
#)
|
||||
doc_target += [create_preview, convert_preview]
|
||||
endforeach
|
||||
|
||||
doc_target += custom_target('doxygen',
|
||||
command: [doxygen, join_paths(meson.current_build_dir(), 'Doxyfile')],
|
||||
output: ['empty'],
|
||||
build_by_default: false
|
||||
)
|
||||
|
||||
compress_target = custom_target('package_doc_tar',
|
||||
command: [tar, '-C', meson.build_root(), '-cf', 'efl-'+meson.version()+'.tar', 'html', 'man'],
|
||||
output: 'efl-'+meson.version()+'.tar',
|
||||
depends: doc_target,
|
||||
build_by_default: false
|
||||
)
|
||||
|
||||
run_target('doc',
|
||||
command: ['echo', 'Documentation sucessfully build!'],
|
||||
depends: compress_target,
|
||||
)
|
||||
|
||||
doxyfile_conf = configuration_data()
|
||||
doxyfile_conf.merge_from(config_h)
|
||||
doxyfile_conf.set('srcdir', meson.current_source_dir())
|
||||
doxyfile_conf.set('top_builddir', meson.build_root())
|
||||
doxyfile_conf.set('top_srcdir', meson.source_root())
|
||||
|
||||
configure_file(
|
||||
input: 'Doxyfile.in',
|
||||
output: 'Doxyfile',
|
||||
configuration: doxyfile_conf,
|
||||
)
|
|
@ -12,6 +12,7 @@ export ELM_DISPLAY=shot
|
|||
export ILLUME_KBD=0,0,240,123
|
||||
export ILLUME_IND=0,0,240,32
|
||||
export ILLUME_STK=0,288,240,32
|
||||
export EFL_RUN_IN_TREE=1
|
||||
|
||||
mkdir -p $DIR || true
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
Elm_Genlist_Item_Class gic = { 0 };
|
||||
Elm_Object_Item *glit, *glit_top;
|
||||
gic.item_style = "default";
|
||||
gic.func.text_get = _text_get;
|
||||
|
|
|
@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
Elm_Genlist_Item_Class gic = { 0 };
|
||||
gic.item_style = "double_label";
|
||||
gic.func.text_get = _text_get;
|
||||
gic.func.content_get = _content_get;
|
||||
|
|
|
@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
Elm_Genlist_Item_Class gic = { 0 };
|
||||
gic.item_style = "icon_top_text_bottom";
|
||||
gic.func.text_get = _text_get;
|
||||
gic.func.content_get = _content_get;
|
||||
|
|
|
@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
Elm_Genlist_Item_Class gic = { 0 };
|
||||
gic.item_style = "group_index";
|
||||
gic.func.text_get = _text_get;
|
||||
gic.func.content_get = _content_get;
|
||||
|
|
|
@ -33,7 +33,7 @@ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|||
elm_win_resize_object_add(win, genlist);
|
||||
evas_object_show(genlist);
|
||||
|
||||
Elm_Genlist_Item_Class gic;
|
||||
Elm_Genlist_Item_Class gic = { 0 };
|
||||
gic.item_style = "default";
|
||||
gic.func.text_get = _text_get;
|
||||
gic.func.content_get = _content_get;
|
||||
|
|
|
@ -189,12 +189,29 @@ if (cc.has_header('sys/mman.h'))
|
|||
config_h.set10('HAVE_MMAN_H', true)
|
||||
endif
|
||||
|
||||
regexp = []
|
||||
if sys_windows == true
|
||||
regexp = cc.find_library('regex',
|
||||
has_headers: ['regex.h', 'fnmatch.h'],
|
||||
required: true)
|
||||
if regexp.found() == false
|
||||
error('regex can not be found')
|
||||
endif
|
||||
else
|
||||
if cc.has_header_symbol('fnmatch.h', 'fnmatch') == false
|
||||
error('fnmatch can not be found')
|
||||
endif
|
||||
if cc.has_header_symbol('regex.h', 'regcomp') == false
|
||||
error('regcomp can not be found')
|
||||
endif
|
||||
endif
|
||||
|
||||
config_h.set('VMAJ', version_major)
|
||||
config_h.set('VMIN', version_minor)
|
||||
config_h.set('VMIC', version_micro)
|
||||
config_h.set('VREV', '0')
|
||||
|
||||
#jpeg detection ... life is a bit more complex there
|
||||
#jpeg detection ... life is a bit more complex there
|
||||
|
||||
jpeg = dependency('libjpeg', required: false)
|
||||
if jpeg.found() == false
|
||||
|
@ -214,4 +231,6 @@ config_h.set('SIZEOF_LONG', cc.sizeof('long'))
|
|||
if sys_windows == true
|
||||
config_h.set('HAVE_DLSYM', '1')
|
||||
config_h.set('HAVE_NOTIFY_WIN32', '1')
|
||||
config_h.set10('HAVE_WINDOWS_H', true)
|
||||
config_h.set10('HAVE_DDRAW_H', true)
|
||||
endif
|
||||
|
|
41
meson.build
41
meson.build
|
@ -102,6 +102,7 @@ foreach lang : ['c', 'objc', 'cpp']
|
|||
add_global_arguments('-DEFL_BUILD=1', language: lang)
|
||||
add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang)
|
||||
if sys_windows == true
|
||||
add_global_arguments('-D_POSIX_C_SOURCE=200809L', language: lang)
|
||||
if (get_option('windows-version') == 'vista')
|
||||
add_global_arguments('-DWINVER=0x060', language: lang)
|
||||
add_global_arguments('-D_WIN32_WINNT=0x0600', language: lang)
|
||||
|
@ -248,6 +249,27 @@ boot_strap_eolian = [
|
|||
['eolian' ,[] , false, true, true, false, false, false, ['eina'], []],
|
||||
]
|
||||
|
||||
evas_lib = ['evas' ,[], false, true, false, false, true, true, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']]
|
||||
evas_img_modules = ['evas' ,[], true, false, false, false, false, false, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']]
|
||||
evas_engines = [join_paths('evas', 'engines'),[], true, false, false, false, false, false, [], []]
|
||||
evas_goal = ['evas_goal' ,[], false, true, false, false, false, false, ['eina', 'efl', 'eo'], []]
|
||||
|
||||
if get_option('evas-modules') == 'static'
|
||||
evas_settings = [
|
||||
evas_lib,
|
||||
evas_img_modules,
|
||||
evas_engines,
|
||||
evas_goal,
|
||||
]
|
||||
else
|
||||
evas_settings = [
|
||||
evas_lib,
|
||||
evas_img_modules,
|
||||
evas_goal,
|
||||
evas_engines,
|
||||
]
|
||||
endif
|
||||
|
||||
subprojects = [
|
||||
# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs
|
||||
['evil' ,[] , false, true, false, false, false, false, [], []],
|
||||
|
@ -270,14 +292,13 @@ subprojects = [
|
|||
['ecore_fb' ,['fb'] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_wl2' ,['wl'] , true, true, false, false, false, false, ['eina'], ['libdrm']],
|
||||
['ecore_sdl' ,['sdl'] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_win32' ,[] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_ipc' ,[] , false, true, false, false, false, false, ['eina'], []],
|
||||
['ecore_buffer' ,['buffer'] , true, true, true, false, false, false, ['eina'], []],
|
||||
['ector' ,[] , false, true, false, false, true, false, ['eina', 'efl'], ['draw', 'triangulator', 'freetype']],
|
||||
['elput' ,['drm'] , false, true, false, false, true, false, ['eina', 'eldbus'], []],
|
||||
['ecore_drm2' ,['drm'] , false, true, false, false, false, false, ['ecore'], ['libdrm']],
|
||||
['ecore_cocoa' ,['cocoa'] , false, true, false, false, false, false, ['eina'], []],
|
||||
['evas' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']],
|
||||
['evas_goal' ,[] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
|
||||
['ecore_cocoa' ,['cocoa'] , false, true, false, false, false, false, ['eina'], []]] + evas_settings +[
|
||||
['ecore_input_evas' ,[] , false, true, false, false, false, false, ['eina', 'evas'], []],
|
||||
['ecore_evas' ,[] , true, true, true, false, false, false, ['evas', 'ector'], []],
|
||||
['ecore_imf' ,[] , true, true, false, false, false, false, ['eina'], []],
|
||||
|
@ -323,7 +344,7 @@ foreach package : subprojects
|
|||
]
|
||||
automatic_pkgfile = true
|
||||
if package[1].length() == 0 or get_option(package[1][0])
|
||||
config_h.set('HAVE_'+package_name.to_upper(), '1')
|
||||
config_h.set('HAVE_'+package_name.to_upper().underscorify(), '1')
|
||||
|
||||
dir_package_include = join_paths(dir_include, package_version_name)
|
||||
dir_package_modules = join_paths(dir_lib, package_name, 'modules')
|
||||
|
@ -376,7 +397,7 @@ foreach package : subprojects
|
|||
example_dirs += [package_name]
|
||||
endif
|
||||
|
||||
set_variable('build_'+package_name, true)
|
||||
set_variable('build_'+package_name.underscorify(), true)
|
||||
|
||||
# generate automatic pc files for libraries
|
||||
if automatic_pkgfile == true and package[3]
|
||||
|
@ -419,7 +440,9 @@ if get_option('eolian-bootstrap') == false
|
|||
subdir(join_paths('src', 'bin', 'efl'))
|
||||
|
||||
subdir(join_paths('src', 'generic', 'evas'))
|
||||
subdir(join_paths('src', 'generic', 'emotion'))
|
||||
if sys_windows == false
|
||||
subdir(join_paths('src', 'generic', 'emotion'))
|
||||
endif
|
||||
|
||||
bindings = get_option('bindings')
|
||||
bindings_order = ['luajit', 'cxx', 'mono']
|
||||
|
@ -459,6 +482,12 @@ foreach evas_loader_map_inst : evas_loader_map
|
|||
meson.add_install_script('meson/evas_loader_conf.sh', evas_loader_original, evas_loader_link_types)
|
||||
endforeach
|
||||
|
||||
doxygen = find_program('doxygen', required : false)
|
||||
|
||||
if get_option('eolian-bootstrap') == false and doxygen.found()
|
||||
subdir('doc')
|
||||
endif
|
||||
|
||||
#
|
||||
# Configure files
|
||||
#
|
||||
|
|
|
@ -13,10 +13,10 @@ loader_name="$(echo "$loader" | cut -f 1 -d '.')"
|
|||
|
||||
original_ext="$(echo "$loader" | tail -c 4)"
|
||||
if test "$original_ext" = "$ext" ; then
|
||||
mv "$DESTDIR"/"$original_loader" "$DESTDIR"/"$loader_dir"/"$original_name"
|
||||
mv "$DESTDIR""$original_loader" "$DESTDIR""$loader_dir"/"$original_name"
|
||||
fi
|
||||
|
||||
shift
|
||||
for x in "$@"; do
|
||||
ln -sf "$original_name" "$DESTDIR"/"$loader_dir"/"$loader_name"."$x"
|
||||
ln -sf "$original_name" "$DESTDIR""$loader_dir"/"$loader_name"."$x"
|
||||
done
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
# as meson's library() call can't track files other than the generated
|
||||
# efl_mono.dll
|
||||
|
||||
cp $1 $2
|
||||
cp "$1" "$DESTDIR$2"
|
||||
|
|
|
@ -4,5 +4,5 @@ for x in "$@" ; do
|
|||
dir="$(dirname $x)"
|
||||
filename="$(basename $x)"
|
||||
ext="${filename##*.}"
|
||||
mv "$DESTDIR"/"$x" "$DESTDIR"/"$dir"/module."$ext"
|
||||
mv "$DESTDIR""$x" "$DESTDIR""$dir"/module."$ext"
|
||||
done
|
||||
|
|
|
@ -26,7 +26,7 @@ installed_eflcxxextraheadersdir = $(includedir)/efl-cxx-@VMAJ@/cxx
|
|||
dist_installed_eflcxxextraheaders_DATA = lib/efl/cxx/efl_part_impl.hh
|
||||
|
||||
installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/
|
||||
dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Elementary.hh
|
||||
dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Efl_Ui.hh
|
||||
|
||||
installed_evascxxmainheadersdir = $(includedir)/evas-cxx-@VMAJ@/
|
||||
dist_installed_evascxxmainheaders_DATA = lib/evas/Evas.hh
|
||||
|
@ -218,18 +218,18 @@ TESTS_EINA_CXX_OBJNAME = tests_eina_cxx_
|
|||
endif
|
||||
|
||||
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_iterator.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_iterator.$(OBJEXT): tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
|
||||
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-simple.$(OBJEXT): tests/eina_cxx/simple.eo.c tests/eina_cxx/simple.eo.h
|
||||
tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-simple.$(OBJEXT): tests/eina_cxx/eina_simple.eo.c tests/eina_cxx/eina_simple.eo.h
|
||||
|
||||
CLEANFILES += \
|
||||
tests/eina_cxx/simple.eo.c \
|
||||
tests/eina_cxx/simple.eo.h \
|
||||
tests/eina_cxx/simple.eo.hh \
|
||||
tests/eina_cxx/simple.eo.impl.hh
|
||||
tests/eina_cxx/eina_simple.eo.c \
|
||||
tests/eina_cxx/eina_simple.eo.h \
|
||||
tests/eina_cxx/eina_simple.eo.hh \
|
||||
tests/eina_cxx/eina_simple.eo.impl.hh
|
||||
|
||||
tests_eina_cxx_eina_cxx_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||
-DTESTS_WD=\"`pwd`\" \
|
||||
|
@ -407,4 +407,4 @@ endif
|
|||
endif
|
||||
|
||||
EXTRA_DIST2 += \
|
||||
tests/eina_cxx/simple.eo
|
||||
tests/eina_cxx/eina_simple.eo
|
||||
|
|
|
@ -49,7 +49,8 @@ ecore_eolian_files_public = \
|
|||
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
|
||||
lib/ecore/efl_core_command_line.eo \
|
||||
lib/ecore/efl_filter_model.eo
|
||||
|
||||
ecore_test_eolian_files = \
|
||||
tests/ecore/efl_app_test_cml.eo \
|
||||
|
@ -157,6 +158,7 @@ lib/ecore/efl_composite_model_private.h \
|
|||
lib/ecore/efl_model_accessor_view.c \
|
||||
lib/ecore/efl_model_accessor_view_private.h \
|
||||
lib/ecore/efl_view_model.c \
|
||||
lib/ecore/efl_filter_model.c \
|
||||
lib/ecore/efl_linear_interpolator.c \
|
||||
lib/ecore/efl_accelerate_interpolator.c \
|
||||
lib/ecore/efl_decelerate_interpolator.c \
|
||||
|
|
|
@ -23,7 +23,6 @@ edje_eolian_priv_files = \
|
|||
|
||||
edje_eolian_c = $(edje_eolian_files:%.eo=%.eo.c)
|
||||
edje_eolian_h = $(edje_eolian_files:%.eo=%.eo.h) \
|
||||
$(edje_eolian_files:%.eo=%.eo.legacy.h) \
|
||||
$(edje_eolian_type_files:%.eot=%.eot.h)
|
||||
|
||||
edje_eolian_priv_c = $(edje_eolian_priv_files:%.eo=%.eo.c)
|
||||
|
|
|
@ -52,6 +52,7 @@ efl_eolian_files = \
|
|||
lib/efl/interfaces/efl_orientation.eo \
|
||||
lib/efl/interfaces/efl_container.eo \
|
||||
lib/efl/interfaces/efl_content.eo \
|
||||
lib/efl/interfaces/efl_gfx_arrangement.eo \
|
||||
lib/efl/interfaces/efl_pack.eo \
|
||||
lib/efl/interfaces/efl_pack_layout.eo \
|
||||
lib/efl/interfaces/efl_pack_linear.eo \
|
||||
|
|
|
@ -140,15 +140,7 @@ lib/evas/canvas/evas_canvas3d_node.eo.cs \
|
|||
lib/evas/canvas/evas_canvas3d_object.eo.cs \
|
||||
lib/evas/canvas/evas_canvas3d_primitive.eo.cs \
|
||||
lib/evas/canvas/evas_canvas3d_scene.eo.cs \
|
||||
lib/evas/canvas/evas_canvas3d_texture.eo.cs \
|
||||
lib/evas/canvas/efl_canvas_vg_object.eo.cs \
|
||||
lib/evas/canvas/efl_vg.eo.cs \
|
||||
lib/evas/canvas/efl_vg_container.eo.cs \
|
||||
lib/evas/canvas/efl_vg_gradient.eo.cs \
|
||||
lib/evas/canvas/efl_vg_gradient_radial.eo.cs \
|
||||
lib/evas/canvas/efl_vg_gradient_linear.eo.cs \
|
||||
lib/evas/canvas/efl_vg_root_node.eo.cs \
|
||||
lib/evas/canvas/efl_vg_shape.eo.cs
|
||||
lib/evas/canvas/evas_canvas3d_texture.eo.cs
|
||||
|
||||
efl_eolian_blacklisted_files = \
|
||||
lib/efl/interfaces/efl_io_buffer.eo.cs \
|
||||
|
|
|
@ -198,7 +198,6 @@ elm_eolian_type_files = \
|
|||
|
||||
elm_public_eolian_c = $(elm_public_eolian_files:%.eo=%.eo.c)
|
||||
elm_public_eolian_h = $(elm_public_eolian_files:%.eo=%.eo.h) \
|
||||
$(elm_public_eolian_files:%.eo=%.eo.legacy.h) \
|
||||
$(elm_eolian_type_files:%.eot=%.eot.h)
|
||||
|
||||
elm_private_eolian_c = $(elm_private_eolian_files:%.eo=%.eo.c)
|
||||
|
@ -206,7 +205,6 @@ elm_private_eolian_h = $(elm_private_eolian_files:%.eo=%.eo.h)
|
|||
|
||||
elm_legacy_eolian_c = $(elm_legacy_eolian_files:%.eo=%.eo.c)
|
||||
elm_legacy_eolian_eo_h = $(elm_legacy_eolian_files:%.eo=%.eo.h)
|
||||
elm_legacy_eolian_legacy_h = $(elm_legacy_eolian_files:%.eo=%.eo.legacy.h)
|
||||
|
||||
BUILT_SOURCES += \
|
||||
$(elm_public_eolian_c) \
|
||||
|
@ -214,8 +212,7 @@ BUILT_SOURCES += \
|
|||
$(elm_private_eolian_c) \
|
||||
$(elm_private_eolian_h) \
|
||||
$(elm_legacy_eolian_c) \
|
||||
$(elm_legacy_eolian_eo_h) \
|
||||
$(elm_legacy_eolian_legacy_h)
|
||||
$(elm_legacy_eolian_eo_h)
|
||||
|
||||
if INSTALL_EO_FILES
|
||||
elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@
|
||||
|
@ -773,8 +770,7 @@ includesunstable_HEADERS = \
|
|||
includesunstabledir = $(includedir)/elementary-@VMAJ@
|
||||
|
||||
nodist_includesunstable_HEADERS = \
|
||||
$(elm_public_eolian_h) \
|
||||
$(elm_legacy_eolian_legacy_h)
|
||||
$(elm_public_eolian_h)
|
||||
|
||||
includesub_HEADERS = \
|
||||
lib/elementary/elc_ctxpopup.h \
|
||||
|
|
|
@ -81,7 +81,7 @@ tests/eolian/data/class_simple.eo \
|
|||
tests/eolian/data/complex_type.eo \
|
||||
tests/eolian/data/consts.eo \
|
||||
tests/eolian/data/ctor_dtor.eo \
|
||||
tests/eolian/data/docs.eo \
|
||||
tests/eolian/data/eo_docs.eo \
|
||||
tests/eolian/data/enum.eo \
|
||||
tests/eolian/data/events.eo \
|
||||
tests/eolian/data/extern.eo \
|
||||
|
|
|
@ -3,14 +3,13 @@ AM_V_EOL = $(am__v_EOL_@AM_V@)
|
|||
am__v_EOL_ = $(am__v_EOL_@AM_DEFAULT_V@)
|
||||
am__v_EOL_0 = @echo " EOLIAN " $@;
|
||||
|
||||
SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
|
||||
SUFFIXES = .eo .eo.c .eo.h .eot .eot.h
|
||||
|
||||
|
||||
#disable rules for subdir builds to avoid recursive dependencies
|
||||
../%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
|
||||
../%.eo.h: %.eo ${_EOLIAN_GEN_DEP}
|
||||
../%.eot.h: %.eot ${_EOLIAN_GEN_DEP}
|
||||
../%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
|
||||
|
||||
%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
|
||||
$(AM_V_EOL) \
|
||||
|
@ -26,8 +25,3 @@ SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
|
|||
$(AM_V_EOL) \
|
||||
$(MKDIR_P) $(@D); \
|
||||
$(EOLIAN_GEN) $(EOLIAN_FLAGS) $(EOLIAN_GEN_FLAGS) -gh -o h:$@ $<
|
||||
|
||||
%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
|
||||
$(AM_V_EOL) \
|
||||
$(MKDIR_P) $(@D); \
|
||||
$(EOLIAN_GEN) $(EOLIAN_FLAGS) $(EOLIAN_GEN_FLAGS) -gl -o l:$@ $<
|
||||
|
|
|
@ -85,12 +85,10 @@ evas_gesture_eolian_priv_h = $(evas_gesture_eolian_priv_files:%.eo=%.eo.h)
|
|||
|
||||
evas_canvas_eolian_pub_c = $(evas_canvas_eolian_pub_files:%.eo=%.eo.c)
|
||||
evas_canvas_eolian_pub_h = $(evas_canvas_eolian_pub_files:%.eo=%.eo.h) \
|
||||
$(evas_canvas_eolian_pub_files:%.eo=%.eo.legacy.h) \
|
||||
$(evas_canvas_eolian_type_files:%.eot=%.eot.h)
|
||||
|
||||
evas_gesture_eolian_pub_c = $(evas_gesture_eolian_pub_files:%.eo=%.eo.c)
|
||||
evas_gesture_eolian_pub_h = $(evas_gesture_eolian_pub_files:%.eo=%.eo.h) \
|
||||
$(evas_gesture_eolian_pub_files:%.eo=%.eo.legacy.h) \
|
||||
$(evas_gesture_eolian_type_files:%.eot=%.eot.h)
|
||||
|
||||
evas_eolian_files = $(evas_canvas_eolian_pub_files) \
|
||||
|
@ -590,6 +588,7 @@ lib/evas/common/evas_map_image_internal.c \
|
|||
lib/evas/common/evas_map_image_core.c \
|
||||
lib/evas/common/evas_map_image_loop.c \
|
||||
lib/evas/common/evas_map_image_aa.c \
|
||||
lib/evas/common/evas_map_image_internal_high.c \
|
||||
lib/evas/common/evas_scale_smooth_scaler.c \
|
||||
lib/evas/common/evas_scale_smooth_scaler_down.c \
|
||||
lib/evas/common/evas_scale_smooth_scaler_downx.c \
|
||||
|
@ -976,7 +975,6 @@ $(NULL)
|
|||
|
||||
evas_gl_generic_eolian_c = $(evas_gl_generic_eolian_files:%.eo=%.eo.c)
|
||||
evas_gl_generic_eolian_h = $(evas_gl_generic_eolian_files:%.eo=%.eo.h) \
|
||||
$(evas_gl_generic_eolian_files:%.eo=%.eo.legacy.h) \
|
||||
$(evas_gl_generic_eolian_type_files:%.eot=%.eot.h)
|
||||
|
||||
BUILT_SOURCES += \
|
||||
|
@ -2210,6 +2208,7 @@ modules_evas_image_loaders_tgv_module_la_CPPFLAGS = \
|
|||
-I$(top_builddir)/src/lib/efl \
|
||||
-I$(top_srcdir)/src/static_libs/rg_etc \
|
||||
-I$(top_srcdir)/src/lib/evas/ \
|
||||
-I$(top_srcdir)/src/lib/evas/include \
|
||||
-DEFL_BUILD \
|
||||
@EVAS_CFLAGS@ \
|
||||
@NEON_CFLAGS@
|
||||
|
@ -2247,6 +2246,7 @@ modules_evas_image_savers_tgv_module_la_CPPFLAGS = \
|
|||
-I$(top_builddir)/src/lib/efl \
|
||||
-I$(top_srcdir)/src/static_libs/rg_etc \
|
||||
-I$(top_srcdir)/src/lib/evas/ \
|
||||
-I$(top_srcdir)/src/lib/evas/include \
|
||||
-DEFL_BUILD \
|
||||
@EVAS_CFLAGS@
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ lib/evil/evil_string.h \
|
|||
lib/evil/evil_time.h \
|
||||
lib/evil/evil_unistd.h \
|
||||
lib/evil/evil_util.h \
|
||||
lib/evil/fnmatch.h \
|
||||
lib/evil/pwd.h
|
||||
|
||||
evilmmanheadersdir = $(includedir)/evil-@VMAJ@/sys
|
||||
|
@ -31,8 +30,6 @@ lib/evil/sys/mman.h
|
|||
lib_evil_libevil_la_SOURCES = \
|
||||
lib/evil/evil_dlfcn.c \
|
||||
lib/evil/evil_fcntl.c \
|
||||
lib/evil/evil_fnmatch.c \
|
||||
lib/evil/evil_fnmatch_list_of_states.c \
|
||||
lib/evil/evil_langinfo.c \
|
||||
lib/evil/evil_locale.c \
|
||||
lib/evil/evil_main.c \
|
||||
|
@ -44,33 +41,14 @@ lib/evil/evil_string.c \
|
|||
lib/evil/evil_time.c \
|
||||
lib/evil/evil_unistd.c \
|
||||
lib/evil/evil_util.c \
|
||||
lib/evil/evil_private.h \
|
||||
lib/evil/evil_fnmatch_private.h
|
||||
lib/evil/evil_private.h
|
||||
|
||||
lib_evil_libevil_la_CPPFLAGS = @EVIL_CPPFLAGS@ -DEFL_BUILD
|
||||
lib_evil_libevil_la_CFLAGS = @EVIL_CFLAGS@ @EVIL_CFLAGS_WRN@ -D__USE_MINGW_ANSI_STDIO
|
||||
lib_evil_libevil_la_LIBADD = @EVIL_LIBS@
|
||||
lib_evil_libevil_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
|
||||
|
||||
# regex
|
||||
|
||||
dist_install_evilheaders_DATA += \
|
||||
lib/evil/regex/regex.h
|
||||
|
||||
lib_evil_libevil_la_SOURCES += \
|
||||
lib/evil/regex/regcomp.c \
|
||||
lib/evil/regex/regerror.c \
|
||||
lib/evil/regex/regexec.c \
|
||||
lib/evil/regex/regfree.c \
|
||||
lib/evil/regex/cclass.h \
|
||||
lib/evil/regex/cname.h \
|
||||
lib/evil/regex/regex2.h \
|
||||
lib/evil/regex/utils.h
|
||||
|
||||
lib_evil_libevil_la_CPPFLAGS += \
|
||||
-I$(top_srcdir)/src/lib/evil \
|
||||
-I$(top_srcdir)/src/lib/evil/regex \
|
||||
-DPOSIX_MISTAKE
|
||||
lib_evil_libevil_la_CPPFLAGS += -I$(top_srcdir)/src/lib/evil
|
||||
|
||||
### Unit tests
|
||||
|
||||
|
@ -83,7 +61,6 @@ tests_evil_evil_suite_SOURCES = \
|
|||
tests/evil/evil_suite.c \
|
||||
tests/evil/evil_suite.h \
|
||||
tests/evil/evil_test_dlfcn.c \
|
||||
tests/evil/evil_test_libgen.c \
|
||||
tests/evil/evil_test_main.c \
|
||||
tests/evil/evil_test_stdio.c \
|
||||
tests/evil/evil_test_stdlib.c \
|
||||
|
@ -103,9 +80,3 @@ tests_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
|
|||
endif
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST2 += \
|
||||
lib/evil/regex/regerror.ih \
|
||||
lib/evil/regex/engine.ih \
|
||||
lib/evil/regex/regcomp.ih \
|
||||
lib/evil/regex/engine.c
|
||||
|
|
|
@ -81,6 +81,7 @@ static void
|
|||
eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
|
||||
{
|
||||
Eina_Counter *cnt;
|
||||
char *result;
|
||||
|
||||
cnt = eina_counter_new(str->name);
|
||||
|
||||
|
@ -96,7 +97,9 @@ eina_bench_e17_stringshare(Eina_Stringshare_Test *str)
|
|||
|
||||
eina_counter_stop(cnt, 1);
|
||||
|
||||
fprintf(stderr, "For `%s`:\n%s\n", str->name,eina_counter_dump(cnt));
|
||||
result = eina_counter_dump(cnt);
|
||||
fprintf(stderr, "For `%s`:\n%s\n", str->name, result);
|
||||
free(result);
|
||||
|
||||
eina_counter_free(cnt);
|
||||
}
|
||||
|
|
|
@ -36,8 +36,12 @@ if meson.is_cross_build()
|
|||
edje_cc_exe = [_edje_cc]
|
||||
edje_depends = []
|
||||
else
|
||||
env = find_program('env', native: true)
|
||||
edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
|
||||
if sys_windows == true
|
||||
edje_cc_exe = [edje_cc.full_path()]
|
||||
else
|
||||
env = find_program('env', native: true)
|
||||
edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
|
||||
endif
|
||||
edje_depends = [edje_cc, epp]
|
||||
endif
|
||||
|
||||
|
|
|
@ -11,14 +11,16 @@ config_h.set('STRICT_SPEC', '1')
|
|||
|
||||
efreetd = executable('efreetd',
|
||||
efreetd_src,
|
||||
dependencies: [efreet, ecore, ecore_ipc, ecore_file, eio],
|
||||
dependencies: [efreet, ecore, ecore_ipc, ecore_file, eio, intl],
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
)
|
||||
|
||||
efreet_bin_deps = [efreet, ecore, eet, ecore_file, intl]
|
||||
|
||||
efreet_desktop_cache_create = executable('efreet_desktop_cache_create',
|
||||
'efreet_desktop_cache_create.c',
|
||||
dependencies: [efreet, ecore, eet, ecore_file],
|
||||
dependencies: efreet_bin_deps,
|
||||
install: true,
|
||||
install_dir : join_paths(dir_lib, 'efreet', version_name),
|
||||
c_args : package_c_args,
|
||||
|
@ -26,7 +28,7 @@ efreet_desktop_cache_create = executable('efreet_desktop_cache_create',
|
|||
|
||||
efreet_icon_cache_create = executable('efreet_icon_cache_create',
|
||||
'efreet_icon_cache_create.c',
|
||||
dependencies: [efreet, ecore, eet, ecore_file],
|
||||
dependencies: efreet_bin_deps,
|
||||
install: true,
|
||||
install_dir : join_paths(dir_lib, 'efreet', version_name),
|
||||
c_args : package_c_args,
|
||||
|
@ -34,7 +36,7 @@ efreet_icon_cache_create = executable('efreet_icon_cache_create',
|
|||
|
||||
efreet_mime_cache_create = executable('efreet_mime_cache_create',
|
||||
'efreet_mime_cache_create.c',
|
||||
dependencies: [efreet, ecore, eet, ecore_file],
|
||||
dependencies: efreet_bin_deps,
|
||||
install: true,
|
||||
install_dir : join_paths(dir_lib, 'efreet', version_name),
|
||||
c_args : package_c_args,
|
||||
|
|
|
@ -194,7 +194,7 @@ _atos(const char *prog, const char *bin_dir, const char *bin_name, unsigned long
|
|||
if ((spaces == func_space_count) && (func_done == EINA_FALSE))
|
||||
{
|
||||
*s = '\0';
|
||||
*func_name = strndup(buf, (int)(s - &(buf[0])));
|
||||
*func_name = eina_strndup(buf, (int)(s - &(buf[0])));
|
||||
func_done = EINA_TRUE;
|
||||
}
|
||||
else if (*s == '(')
|
||||
|
@ -208,7 +208,7 @@ _atos(const char *prog, const char *bin_dir, const char *bin_name, unsigned long
|
|||
else if ((*s == ':') && (func_done == EINA_TRUE))
|
||||
{
|
||||
*s = '\0';
|
||||
*file_name = strndup(f1, (int)(s - f1));
|
||||
*file_name = eina_strndup(f1, (int)(s - f1));
|
||||
s++;
|
||||
len = strlen(s);
|
||||
s[len - 1] = '\0'; /* Remove the closing parenthesis */
|
||||
|
@ -266,7 +266,7 @@ bt_input_translate(const char *line, char **comment)
|
|||
(int)(fileend - filestart), filestart,
|
||||
(int)(addrend - addrstart), addrstart,
|
||||
(int)(baseend - basestart), basestart);
|
||||
*comment = strndup(line, addrstart - line);
|
||||
*comment = eina_strndup(line, addrstart - line);
|
||||
return local;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <direct.h> /* getcwd */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ENVIRON
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
|
|
@ -201,25 +201,6 @@ _grid_item_getcb(Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *xposret, int
|
|||
return item;
|
||||
}
|
||||
|
||||
static inline char *
|
||||
_strndup(const char *str, size_t len)
|
||||
{
|
||||
const char *p;
|
||||
char *ret;
|
||||
size_t slen;
|
||||
|
||||
for (slen = 0, p = str;
|
||||
(slen < len) && (*p);
|
||||
p++, slen++);
|
||||
|
||||
ret = malloc(slen + 1);
|
||||
if (!ret) return NULL;
|
||||
|
||||
if (slen > 0) memcpy(ret, str, slen);
|
||||
ret[slen] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
_gl_poscb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Evas_Coord x, Evas_Coord y, int xposret, int yposret, Elm_Xdnd_Action action EINA_UNUSED)
|
||||
{
|
||||
|
@ -237,7 +218,7 @@ _gl_dropcb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Elm_Se
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
|
||||
|
@ -292,7 +273,7 @@ _grid_dropcb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, Elm_
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
char *s = _drag_data_extract(&p);
|
||||
|
@ -1000,7 +981,7 @@ static Eina_Bool _drop_box_button_new_cb(void *data, Evas_Object *obj, Elm_Selec
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
char *s = _drag_data_extract(&p);
|
||||
|
@ -1034,7 +1015,7 @@ static Eina_Bool _drop_but_icon_change_cb(void *data, Evas_Object *obj, Elm_Sele
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
char *s = _drag_data_extract(&p);
|
||||
|
@ -1062,7 +1043,7 @@ static Eina_Bool _drop_bg_change_cb(void *data EINA_UNUSED, Evas_Object *obj, El
|
|||
if (ev->len <= 0)
|
||||
return EINA_FALSE;
|
||||
|
||||
char *dd = _strndup(ev->data, ev->len);
|
||||
char *dd = eina_strndup(ev->data, ev->len);
|
||||
if (!dd) return EINA_FALSE;
|
||||
char *p = dd;
|
||||
char *s = _drag_data_extract(&p);
|
||||
|
|
|
@ -125,7 +125,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
|||
efl_ui_win_autodel_set(efl_added, 1));
|
||||
|
||||
table = efl_add(EFL_UI_TABLE_CLASS, win,
|
||||
efl_pack_padding_set(efl_added, 5, 5, 1));
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 5, 5, 1));
|
||||
efl_content_set(win, table);
|
||||
|
||||
// Objects below the snapshot
|
||||
|
|
|
@ -387,9 +387,9 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
|
||||
efl_pack_padding_set(efl_added, 5, 5, 1),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 5, 5, 1),
|
||||
efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
|
||||
efl_pack_align_set(efl_added, 0, 0.5));
|
||||
efl_gfx_arrangement_content_align_set(efl_added, 0, 0.5));
|
||||
efl_pack(box, box2);
|
||||
|
||||
for (size_t k = 0; k < EINA_C_ARRAY_LENGTH(images); k++)
|
||||
|
@ -456,7 +456,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_align_set(efl_added, 0.5, 0.5));
|
||||
efl_gfx_arrangement_content_align_set(efl_added, 0.5, 0.5));
|
||||
efl_pack(flip, box2);
|
||||
|
||||
// Note: No TEXT object with EO APIs
|
||||
|
@ -472,7 +472,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
|
||||
efl_pack_align_set(efl_added, 0.5, 0.5));
|
||||
efl_gfx_arrangement_content_align_set(efl_added, 0.5, 0.5));
|
||||
efl_pack(flip, box2);
|
||||
|
||||
const struct { const char *name, *code; } programs [] = {
|
||||
|
|
|
@ -76,7 +76,7 @@ padding_slider_cb(void *data, const Efl_Event *event)
|
|||
Eo *win = data, *box;
|
||||
|
||||
box = efl_key_wref_get(win, "box");
|
||||
efl_pack_padding_set(box, val, val, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(box, val, val, EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -97,8 +97,8 @@ alignh_slider_cb(void *data, const Efl_Event *event)
|
|||
|
||||
box = efl_key_wref_get(win, "box");
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_pack_align_get(box, NULL, &av);
|
||||
efl_pack_align_set(box, val, av);
|
||||
efl_gfx_arrangement_content_align_get(box, NULL, &av);
|
||||
efl_gfx_arrangement_content_align_set(box, val, av);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -109,8 +109,8 @@ alignv_slider_cb(void *data, const Efl_Event *event)
|
|||
|
||||
box = efl_key_wref_get(win, "box");
|
||||
val = elm_slider_value_get(event->object);
|
||||
efl_pack_align_get(box, &ah, NULL);
|
||||
efl_pack_align_set(box, ah, val);
|
||||
efl_gfx_arrangement_content_align_get(box, &ah, NULL);
|
||||
efl_gfx_arrangement_content_align_set(box, ah, val);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -240,7 +240,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
elm_win_resize_object_add(win, vbox);
|
||||
|
||||
|
@ -256,7 +256,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
hbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
efl_content_set(f, hbox);
|
||||
efl_pack_padding_set(hbox, 10, 0, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(hbox, 10, 0, EINA_TRUE);
|
||||
|
||||
|
||||
/* weights radio group */
|
||||
|
@ -533,7 +533,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
|||
bx = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
efl_key_wref_set(win, "box", bx);
|
||||
efl_pack_padding_set(bx, 10, 10, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(bx, 10, 10, EINA_TRUE);
|
||||
efl_gfx_hint_align_set(bx, 0.5, 0.5);
|
||||
efl_gfx_hint_weight_set(bx, 1, 1);
|
||||
efl_content_set(f, bx);
|
||||
|
|
|
@ -443,12 +443,12 @@ static void pack_cb(void *data,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Pack", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
in_box1 = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
|
||||
sp1 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box1,
|
||||
|
@ -458,7 +458,7 @@ static void pack_cb(void *data,
|
|||
efl_ui_pager_current_page_get(pager)));
|
||||
|
||||
in_box2 = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
|
||||
sp2 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box2);
|
||||
|
@ -628,7 +628,7 @@ static void current_page_cb(void *data,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Current Page", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
|
@ -674,7 +674,7 @@ static void indicator_cb(void *data,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Indicator", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@ static void padding_cb(void *data,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Padding Size", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
|
@ -522,7 +522,7 @@ static void side_page_num_cb(void *data,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Side Page Num", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
|
@ -555,12 +555,12 @@ static void pack_cb(void *data,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Pack", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
in_box1 = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
|
||||
sp1 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box1,
|
||||
|
@ -570,7 +570,7 @@ static void pack_cb(void *data,
|
|||
efl_ui_pager_current_page_get(pager)));
|
||||
|
||||
in_box2 = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
|
||||
sp2 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box2);
|
||||
|
@ -739,7 +739,7 @@ static void current_page_cb(void *data,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Current Page", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
|
@ -787,7 +787,7 @@ static void scroll_block_cb(void *data,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Scroll Block", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
|
@ -826,7 +826,7 @@ static void loop_cb(void *data EINA_UNUSED,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Loop", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
|
@ -875,7 +875,7 @@ static void indicator_cb(void *data EINA_UNUSED,
|
|||
back_btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Indicator", btn, NULL,
|
||||
efl_added, NULL));
|
||||
|
||||
|
|
|
@ -15,6 +15,21 @@ typedef enum {
|
|||
BOTTOM
|
||||
} Options;
|
||||
|
||||
static void
|
||||
_btn_color_clicked_cb(void *data, const Efl_Event *event EINA_UNUSED)
|
||||
{
|
||||
Eo *layout = data;
|
||||
|
||||
static Eina_Bool changed = EINA_TRUE;
|
||||
|
||||
if (changed)
|
||||
efl_gfx_color_set(layout, 0, 88, 204, 255);
|
||||
else
|
||||
efl_gfx_color_set(layout, 255, 255, 255, 255);
|
||||
|
||||
changed = !changed;
|
||||
}
|
||||
|
||||
static void
|
||||
_btn_clicked_to_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
|
@ -59,7 +74,6 @@ _btn_clicked_to_cb(void *data, const Efl_Event *event)
|
|||
break;
|
||||
}
|
||||
efl_text_set(obj, ((to == layout) ? "parent" : (char *)efl_text_get(to)));
|
||||
efl_pack_layout_request(layout);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -87,7 +101,6 @@ _slider_changed_relative_cb(void *data, const Efl_Event *event)
|
|||
efl_ui_relative_layout_relation_bottom_set(layout, btn, NULL, val);
|
||||
break;
|
||||
}
|
||||
efl_pack_layout_request(layout);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -105,8 +118,6 @@ _slider_changed_align_cb(void *data, const Efl_Event *event)
|
|||
efl_gfx_hint_align_set(btn, val, y);
|
||||
else if (opt == 'y')
|
||||
efl_gfx_hint_align_set(btn, x, val);
|
||||
|
||||
efl_pack_layout_request(layout);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -139,7 +150,7 @@ _setter_add(Eo *vbox, Eo *btn, Options option)
|
|||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, hbox,
|
||||
|
@ -181,13 +192,13 @@ _button_frame_add(Eo *box, Eo *btn)
|
|||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, f,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_gfx_hint_margin_set(efl_added, 2, 2, 2, 2),
|
||||
efl_content_set(f, efl_added));
|
||||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
efl_add(EFL_CANVAS_RECTANGLE_CLASS, hbox,
|
||||
|
@ -220,7 +231,7 @@ _button_frame_add(Eo *box, Eo *btn)
|
|||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, hbox,
|
||||
|
@ -240,7 +251,7 @@ _button_frame_add(Eo *box, Eo *btn)
|
|||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
|
||||
efl_pack(vbox, efl_added));
|
||||
|
||||
efl_add(EFL_UI_TEXT_CLASS, hbox,
|
||||
|
@ -271,7 +282,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
|
|||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
|
||||
efl_content_set(win, efl_added));
|
||||
|
||||
|
@ -283,7 +294,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
|
|||
|
||||
hbox = efl_add(EFL_UI_BOX_CLASS, f,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_padding_set(efl_added, 10, 0, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 0, EINA_TRUE),
|
||||
efl_content_set(f, efl_added));
|
||||
|
||||
/* contents */
|
||||
|
@ -297,6 +308,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
|
|||
btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout,
|
||||
efl_text_set(efl_added, "button1"),
|
||||
efl_gfx_hint_align_set(efl_added, 0.0, 0.0),
|
||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_color_clicked_cb, layout),
|
||||
efl_ui_relative_layout_relation_right_set(layout, efl_added, layout, 0.0),
|
||||
efl_ui_relative_layout_relation_bottom_set(layout, efl_added, layout, 0.0));
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ _current_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Current", btn, NULL, efl_added, NULL));
|
||||
|
||||
sp = efl_add(EFL_UI_SPIN_BUTTON_CLASS, box,
|
||||
|
@ -337,7 +337,7 @@ _pack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Pack", btn, NULL, efl_added, NULL));
|
||||
|
||||
/* Pack Begin */
|
||||
|
@ -365,7 +365,7 @@ _pack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
efl_pack_end(box, efl_added));
|
||||
|
||||
in_box = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_end(box, efl_added));
|
||||
|
||||
|
@ -441,7 +441,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Unpack", btn, NULL, efl_added, NULL));
|
||||
|
||||
/* Clear */
|
||||
|
@ -465,7 +465,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
efl_pack_end(box, efl_added));
|
||||
|
||||
in_box = efl_add(EFL_UI_BOX_CLASS, box,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||
efl_pack_end(box, efl_added));
|
||||
|
||||
|
@ -536,7 +536,7 @@ _tab_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Tab", btn, NULL, efl_added, NULL));
|
||||
|
||||
label_check = efl_add(EFL_UI_CHECK_CLASS, box,
|
||||
|
@ -589,7 +589,7 @@ _transition_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
|
||||
|
||||
box = efl_add(EFL_UI_BOX_CLASS, navi,
|
||||
efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
|
||||
elm_naviframe_item_push(navi, "Transition", btn, NULL, efl_added, NULL));
|
||||
|
||||
btn = efl_add(EFL_UI_BUTTON_CLASS, box,
|
||||
|
|
|
@ -79,7 +79,7 @@ static void
|
|||
padding_slider_cb(void *data, const Efl_Event *event)
|
||||
{
|
||||
int val = elm_slider_value_get(event->object);
|
||||
efl_pack_padding_set(data, val, val, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(data, val, val, EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -199,7 +199,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_hint_weight_set(vbox, 1, 1);
|
||||
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
elm_win_resize_object_add(win, vbox);
|
||||
|
@ -220,7 +220,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
hbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
elm_object_content_set(f, hbox);
|
||||
efl_pack_padding_set(hbox, 10, 0, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(hbox, 10, 0, EINA_TRUE);
|
||||
|
||||
|
||||
/* weights radio group */
|
||||
|
@ -568,7 +568,7 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
|
||||
vbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
|
||||
efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
|
||||
efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
|
||||
elm_win_resize_object_add(win, vbox);
|
||||
efl_gfx_entity_visible_set(vbox, 1);
|
||||
|
@ -589,7 +589,7 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
hbox = efl_add(EFL_UI_BOX_CLASS, win,
|
||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
|
||||
elm_object_content_set(f, hbox);
|
||||
efl_pack_padding_set(hbox, 5, 0, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_padding_set(hbox, 5, 0, EINA_TRUE);
|
||||
efl_gfx_entity_visible_set(hbox, 1);
|
||||
|
||||
ico = elm_icon_add(win);
|
||||
|
|
|
@ -19,8 +19,7 @@ _indent_line(Eina_Strbuf *buf, int ind)
|
|||
: DOC_LINE_LIMIT)
|
||||
|
||||
static void
|
||||
_generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
|
||||
Eina_Bool use_legacy)
|
||||
_generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf)
|
||||
{
|
||||
const Eolian_Object *decl = eolian_state_object_by_name_get(state, refn);
|
||||
if (decl)
|
||||
|
@ -54,7 +53,7 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
|
|||
eina_stringshare_del(bname);
|
||||
goto noref;
|
||||
}
|
||||
_generate_ref(state, bname, wbuf, use_legacy);
|
||||
_generate_ref(state, bname, wbuf);
|
||||
eina_strbuf_append(wbuf, sfx);
|
||||
eina_stringshare_del(bname);
|
||||
return;
|
||||
|
@ -96,7 +95,7 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
|
|||
}
|
||||
if (cl)
|
||||
{
|
||||
char *meth = strndup(mname + 1, sfx - mname - 1);
|
||||
char *meth = eina_strndup(mname + 1, sfx - mname - 1);
|
||||
fn = eolian_class_function_by_name_get(cl, meth, ftype);
|
||||
if (ftype == EOLIAN_UNRESOLVED)
|
||||
ftype = eolian_function_type_get(fn);
|
||||
|
@ -122,7 +121,7 @@ noref:
|
|||
|
||||
static int
|
||||
_append_section(const Eolian_State *state, const char *desc, int ind, int curl,
|
||||
Eina_Strbuf *buf, Eina_Strbuf *wbuf, Eina_Bool use_legacy)
|
||||
Eina_Strbuf *buf, Eina_Strbuf *wbuf)
|
||||
{
|
||||
Eina_Bool try_note = EINA_TRUE;
|
||||
while (*desc)
|
||||
|
@ -173,7 +172,7 @@ _append_section(const Eolian_State *state, const char *desc, int ind, int curl,
|
|||
++desc;
|
||||
if (*(desc - 1) == '.') --desc;
|
||||
Eina_Stringshare *refn = eina_stringshare_add_length(ref, desc - ref);
|
||||
_generate_ref(state, refn, wbuf, use_legacy);
|
||||
_generate_ref(state, refn, wbuf);
|
||||
eina_stringshare_del(refn);
|
||||
}
|
||||
else
|
||||
|
@ -278,8 +277,7 @@ _append_group(Eina_Strbuf *buf, char *sgrp, int indent)
|
|||
|
||||
static void
|
||||
_gen_doc_brief(const Eolian_State *state, const char *summary, const char *since,
|
||||
const char *group, const char *el, int indent, Eina_Strbuf *buf,
|
||||
Eina_Bool use_legacy)
|
||||
const char *group, const char *el, int indent, Eina_Strbuf *buf)
|
||||
{
|
||||
int curl = 4 + indent;
|
||||
Eina_Strbuf *wbuf = eina_strbuf_new();
|
||||
|
@ -287,7 +285,7 @@ _gen_doc_brief(const Eolian_State *state, const char *summary, const char *since
|
|||
eina_strbuf_append(buf, "/**< ");
|
||||
else
|
||||
eina_strbuf_append(buf, "/** ");
|
||||
curl = _append_section(state, summary, indent, curl, buf, wbuf, use_legacy);
|
||||
curl = _append_section(state, summary, indent, curl, buf, wbuf);
|
||||
eina_strbuf_free(wbuf);
|
||||
curl = _append_extra(el, indent, curl, EINA_FALSE, buf);
|
||||
curl = _append_since(since, indent, curl, buf);
|
||||
|
@ -310,8 +308,7 @@ _gen_doc_brief(const Eolian_State *state, const char *summary, const char *since
|
|||
static void
|
||||
_gen_doc_full(const Eolian_State *state, const char *summary,
|
||||
const char *description, const char *since,
|
||||
const char *group, const char *el, int indent, Eina_Strbuf *buf,
|
||||
Eina_Bool use_legacy)
|
||||
const char *group, const char *el, int indent, Eina_Strbuf *buf)
|
||||
{
|
||||
int curl = 0;
|
||||
Eina_Strbuf *wbuf = eina_strbuf_new();
|
||||
|
@ -322,13 +319,13 @@ _gen_doc_full(const Eolian_State *state, const char *summary,
|
|||
curl += _indent_line(buf, indent);
|
||||
eina_strbuf_append(buf, " * @brief ");
|
||||
curl += sizeof(" * @brief ") - 1;
|
||||
_append_section(state, summary, indent, curl, buf, wbuf, use_legacy);
|
||||
_append_section(state, summary, indent, curl, buf, wbuf);
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
_indent_line(buf, indent);
|
||||
eina_strbuf_append(buf, " *\n");
|
||||
curl = _indent_line(buf, indent);
|
||||
eina_strbuf_append(buf, " * ");
|
||||
_append_section(state, description, indent, curl + 3, buf, wbuf, use_legacy);
|
||||
_append_section(state, description, indent, curl + 3, buf, wbuf);
|
||||
curl = _append_extra(el, indent, curl, EINA_TRUE, buf);
|
||||
curl = _append_since(since, indent, curl, buf);
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
|
@ -346,8 +343,7 @@ _gen_doc_full(const Eolian_State *state, const char *summary,
|
|||
|
||||
static Eina_Strbuf *
|
||||
_gen_doc_buf(const Eolian_State *state, const Eolian_Documentation *doc,
|
||||
const char *group, const char *el, int indent,
|
||||
Eina_Bool use_legacy)
|
||||
const char *group, const char *el, int indent)
|
||||
{
|
||||
if (!doc) return NULL;
|
||||
|
||||
|
@ -357,17 +353,17 @@ _gen_doc_buf(const Eolian_State *state, const Eolian_Documentation *doc,
|
|||
|
||||
Eina_Strbuf *buf = eina_strbuf_new();
|
||||
if (!desc)
|
||||
_gen_doc_brief(state, sum, since, group, el, indent, buf, use_legacy);
|
||||
_gen_doc_brief(state, sum, since, group, el, indent, buf);
|
||||
else
|
||||
_gen_doc_full(state, sum, desc, since, group, el, indent, buf, use_legacy);
|
||||
_gen_doc_full(state, sum, desc, since, group, el, indent, buf);
|
||||
return buf;
|
||||
}
|
||||
|
||||
Eina_Strbuf *
|
||||
eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc,
|
||||
const char *group, int indent, Eina_Bool use_legacy)
|
||||
const char *group, int indent)
|
||||
{
|
||||
return _gen_doc_buf(state, doc, group, NULL, indent, use_legacy);
|
||||
return _gen_doc_buf(state, doc, group, NULL, indent);
|
||||
}
|
||||
|
||||
Eina_Strbuf *
|
||||
|
@ -403,7 +399,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const Eolian_Event *ev,
|
|||
return bufs;
|
||||
}
|
||||
|
||||
return _gen_doc_buf(state, doc, group, p, 0, EINA_FALSE);
|
||||
return _gen_doc_buf(state, doc, group, p, 0);
|
||||
}
|
||||
|
||||
Eina_Strbuf *
|
||||
|
@ -517,7 +513,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
|
|||
if (!desc && !par && !vpar && !rdoc && (ftype == EOLIAN_METHOD || !pdoc))
|
||||
{
|
||||
_gen_doc_brief(state, sum ? sum : "No description supplied.", since, group,
|
||||
NULL, indent, buf, EINA_FALSE);
|
||||
NULL, indent, buf);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
@ -528,7 +524,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
|
|||
eina_strbuf_append(buf, " * @brief ");
|
||||
curl += sizeof(" * @brief ") - 1;
|
||||
_append_section(state, sum ? sum : "No description supplied.",
|
||||
indent, curl, buf, wbuf, EINA_FALSE);
|
||||
indent, curl, buf, wbuf);
|
||||
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
if (desc || since || par || rdoc || pdoc)
|
||||
|
@ -541,7 +537,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
|
|||
{
|
||||
curl = _indent_line(buf, indent);
|
||||
eina_strbuf_append(buf, " * ");
|
||||
_append_section(state, desc, indent, curl + 3, buf, wbuf, EINA_FALSE);
|
||||
_append_section(state, desc, indent, curl + 3, buf, wbuf);
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
if (par || rdoc || pdoc || since)
|
||||
{
|
||||
|
@ -556,7 +552,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
|
|||
curl = _indent_line(buf, indent);
|
||||
eina_strbuf_append(buf, " * ");
|
||||
_append_section(state, eolian_documentation_summary_get(pdoc), indent,
|
||||
curl + 3, buf, wbuf, EINA_FALSE);
|
||||
curl + 3, buf, wbuf);
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
if (pdesc)
|
||||
{
|
||||
|
@ -564,7 +560,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
|
|||
eina_strbuf_append(buf, " *\n");
|
||||
curl = _indent_line(buf, indent);
|
||||
eina_strbuf_append(buf, " * ");
|
||||
_append_section(state, pdesc, indent, curl + 3, buf, wbuf, EINA_FALSE);
|
||||
_append_section(state, pdesc, indent, curl + 3, buf, wbuf);
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
}
|
||||
if (par || rdoc || since)
|
||||
|
@ -619,7 +615,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
|
|||
eina_strbuf_append_char(buf, ' ');
|
||||
curl += 1;
|
||||
_append_section(state, eolian_documentation_summary_get(adoc),
|
||||
indent, curl, buf, wbuf, EINA_FALSE);
|
||||
indent, curl, buf, wbuf);
|
||||
}
|
||||
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
|
@ -652,7 +648,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
|
|||
eina_strbuf_append(buf, " * @return ");
|
||||
curl += sizeof(" * @return ") - 1;
|
||||
_append_section(state, eolian_documentation_summary_get(rdoc), indent,
|
||||
curl, buf, wbuf, EINA_FALSE);
|
||||
curl, buf, wbuf);
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
if (since)
|
||||
{
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
* @param[in] doc the documentation
|
||||
* @param[in] group the group to use (can be NULL)
|
||||
* @param[in] indent by how many spaces to indent the comment from second line
|
||||
* @param[in] use_legacy whether to use legacy names
|
||||
*
|
||||
* @return A documentation comment
|
||||
*
|
||||
*/
|
||||
Eina_Strbuf *eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc, const char *group, int indent, Eina_Bool use_legacy);
|
||||
Eina_Strbuf *eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Documentation *doc, const char *group, int indent);
|
||||
|
||||
/*
|
||||
* @brief Generate function documentation
|
||||
|
|
|
@ -176,9 +176,9 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid,
|
|||
|
||||
void
|
||||
eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
|
||||
Eina_Strbuf *buf, Eina_Bool legacy)
|
||||
Eina_Strbuf *buf)
|
||||
{
|
||||
if (!cl || legacy)
|
||||
if (!cl)
|
||||
return;
|
||||
|
||||
Eina_Iterator *itr;
|
||||
|
@ -196,7 +196,7 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
|
|||
if (doc)
|
||||
{
|
||||
Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
|
||||
eolian_class_name_get(cl), 0, EINA_FALSE);
|
||||
eolian_class_name_get(cl), 0);
|
||||
if (cdoc)
|
||||
{
|
||||
eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
#include "main.h"
|
||||
|
||||
void eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype);
|
||||
void eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy);
|
||||
void eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, Eina_Strbuf *buf);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -11,17 +11,16 @@ int _eolian_gen_log_dom = -1;
|
|||
enum
|
||||
{
|
||||
GEN_H = 1 << 0,
|
||||
GEN_H_LEGACY = 1 << 1,
|
||||
GEN_H_STUB = 1 << 2,
|
||||
GEN_C = 1 << 3,
|
||||
GEN_C_IMPL = 1 << 4,
|
||||
GEN_D = 1 << 5,
|
||||
GEN_D_FULL = 1 << 6
|
||||
GEN_H_STUB = 1 << 1,
|
||||
GEN_C = 1 << 2,
|
||||
GEN_C_IMPL = 1 << 3,
|
||||
GEN_D = 1 << 4,
|
||||
GEN_D_FULL = 1 << 5
|
||||
};
|
||||
|
||||
static const char *_dexts[7] =
|
||||
static const char *_dexts[6] =
|
||||
{
|
||||
".h", ".legacy.h", ".stub.h", ".c", ".c", ".d", ".d"
|
||||
".h", ".stub.h", ".c", ".c", ".d", ".d"
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -48,7 +47,6 @@ _print_usage(const char *progn, FILE *outf)
|
|||
"\n"
|
||||
"Available types:\n"
|
||||
" h: C header file (.eo.h/.eot.h)\n"
|
||||
" l: Legacy C header file (.eo.legacy.h/.eot.legacy.h)\n"
|
||||
" s: Stub C header file (.eo.stub.h/.eot.stub.h)\n"
|
||||
" c: C source file (.eo.c)\n"
|
||||
" i: Implementation file (.c, merged with existing)\n"
|
||||
|
@ -86,10 +84,6 @@ _try_set_out(char t, char **outs, const char *val, int *what)
|
|||
pos = _get_bit_pos(GEN_H);
|
||||
*what |= GEN_H;
|
||||
break;
|
||||
case 'l':
|
||||
pos = _get_bit_pos(GEN_H_LEGACY);
|
||||
*what |= GEN_H_LEGACY;
|
||||
break;
|
||||
case 's':
|
||||
pos = _get_bit_pos(GEN_H_STUB);
|
||||
*what |= GEN_H_STUB;
|
||||
|
@ -331,13 +325,13 @@ void eo_gen_class_names_get(const Eolian_Class *cl, char **cname,
|
|||
|
||||
static Eina_Bool
|
||||
_write_header(const Eolian_State *eos, const Eolian_State *state, const char *ofname,
|
||||
const char *ifname, Eina_Bool legacy)
|
||||
const char *ifname)
|
||||
{
|
||||
INF("generating header: %s (legacy: %d)", ofname, legacy);
|
||||
INF("generating header: %s", ofname);
|
||||
Eina_Strbuf *buf = eina_strbuf_new();
|
||||
|
||||
eo_gen_types_header_gen(state, eolian_state_objects_by_file_get(eos, ifname),
|
||||
buf, EINA_TRUE, legacy);
|
||||
buf, EINA_TRUE);
|
||||
buf = _include_guard(ifname, "TYPES", buf);
|
||||
|
||||
Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname);
|
||||
|
@ -349,16 +343,13 @@ _write_header(const Eolian_State *eos, const Eolian_State *state, const char *of
|
|||
eina_strbuf_free(cltd);
|
||||
}
|
||||
|
||||
const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname);
|
||||
eo_gen_header_gen(state, cl, buf, legacy);
|
||||
if (cl || !legacy)
|
||||
eo_gen_header_gen(state, eolian_state_class_by_file_get(eos, ifname), buf);
|
||||
|
||||
buf = _include_guard(_get_filename(ofname), NULL, buf);
|
||||
if (_write_file(ofname, buf))
|
||||
{
|
||||
buf = _include_guard(_get_filename(ofname), NULL, buf);
|
||||
if (_write_file(ofname, buf))
|
||||
{
|
||||
eina_strbuf_free(buf);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
eina_strbuf_free(buf);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
eina_strbuf_free(buf);
|
||||
|
@ -373,7 +364,7 @@ _write_stub_header(const Eolian_State *eos, const Eolian_State *state, const cha
|
|||
Eina_Strbuf *buf = eina_strbuf_new();
|
||||
|
||||
eo_gen_types_header_gen(state, eolian_state_objects_by_file_get(eos, ifname),
|
||||
buf, EINA_FALSE, EINA_FALSE);
|
||||
buf, EINA_FALSE);
|
||||
|
||||
Eina_Strbuf *cltd = eo_gen_class_typedef_gen(eos, ifname);
|
||||
if (cltd)
|
||||
|
@ -476,7 +467,6 @@ _write_deps(const Eolian_State *eos, const char *ofname, const char *ifname,
|
|||
eina_strbuf_append_char(dbuf, '\n');
|
||||
|
||||
_append_dep_line(buf, dbuf, outs, gen_what, GEN_H);
|
||||
_append_dep_line(buf, dbuf, outs, gen_what, GEN_H_LEGACY);
|
||||
_append_dep_line(buf, dbuf, outs, gen_what, GEN_H_STUB);
|
||||
|
||||
if (gen_what & GEN_D_FULL)
|
||||
|
@ -498,7 +488,7 @@ main(int argc, char **argv)
|
|||
int pret = 1;
|
||||
|
||||
char *outs[sizeof(_dexts) / sizeof(void *)] = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
NULL, NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
char *basen = NULL;
|
||||
Eina_List *includes = NULL;
|
||||
|
@ -540,9 +530,6 @@ main(int argc, char **argv)
|
|||
case 'h':
|
||||
gen_what |= GEN_H;
|
||||
break;
|
||||
case 'l':
|
||||
gen_what |= GEN_H_LEGACY;
|
||||
break;
|
||||
case 's':
|
||||
gen_what |= GEN_H_STUB;
|
||||
break;
|
||||
|
@ -631,7 +618,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (!eolian_state_file_parse(eos, input))
|
||||
if (!eolian_state_file_path_parse(eos, input))
|
||||
{
|
||||
fprintf(stderr, "eolian: could not parse file '%s'\n", input);
|
||||
goto end;
|
||||
|
@ -646,9 +633,7 @@ main(int argc, char **argv)
|
|||
|
||||
Eina_Bool succ = EINA_TRUE;
|
||||
if (gen_what & GEN_H)
|
||||
succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H)], eobn, EINA_FALSE);
|
||||
if (succ && (gen_what & GEN_H_LEGACY))
|
||||
succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H_LEGACY)], eobn, EINA_TRUE);
|
||||
succ = _write_header(eos, eos, outs[_get_bit_pos(GEN_H)], eobn);
|
||||
if (succ && (gen_what & GEN_H_STUB))
|
||||
succ = _write_stub_header(eos, eos, outs[_get_bit_pos(GEN_H_STUB)], eobn);
|
||||
if (succ && (gen_what & GEN_C))
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
static Eina_Strbuf *
|
||||
_type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
||||
Eina_Bool full, Eina_Bool legacy)
|
||||
Eina_Bool full)
|
||||
{
|
||||
char *grp = strdup(eolian_typedecl_name_get(tp));
|
||||
char *p = strrchr(grp, '.');
|
||||
if (p) *p = '\0';
|
||||
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_typedecl_documentation_get(tp),
|
||||
grp, 0, legacy);
|
||||
grp, 0);
|
||||
free(grp);
|
||||
if (!buf) buf = eina_strbuf_new();
|
||||
else eina_strbuf_append_char(buf, '\n');
|
||||
|
@ -54,7 +54,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
|||
if (nl)
|
||||
{
|
||||
Eina_Strbuf *fbuf = eo_gen_docs_full_gen(state, fdoc, NULL,
|
||||
strlen(nl), legacy);
|
||||
strlen(nl));
|
||||
if (fbuf)
|
||||
eina_strbuf_append_printf(buf, " %s",
|
||||
eina_strbuf_string_get(fbuf));
|
||||
|
@ -108,7 +108,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
|||
if (nl)
|
||||
{
|
||||
Eina_Strbuf *fbuf = eo_gen_docs_full_gen(state, fdoc, NULL,
|
||||
strlen(nl), legacy);
|
||||
strlen(nl));
|
||||
if (fbuf)
|
||||
eina_strbuf_append_printf(buf, " %s",
|
||||
eina_strbuf_string_get(fbuf));
|
||||
|
@ -166,13 +166,13 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
|||
}
|
||||
|
||||
static Eina_Strbuf *
|
||||
_var_generate(const Eolian_State *state, const Eolian_Variable *vr, Eina_Bool legacy)
|
||||
_var_generate(const Eolian_State *state, const Eolian_Variable *vr)
|
||||
{
|
||||
char *fn = strdup(eolian_variable_name_get(vr));
|
||||
char *p = strrchr(fn, '.');
|
||||
if (p) *p = '\0';
|
||||
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_variable_documentation_get(vr),
|
||||
fn, 0, legacy);
|
||||
fn, 0);
|
||||
if (p)
|
||||
{
|
||||
*p = '_';
|
||||
|
@ -216,7 +216,7 @@ _var_generate(const Eolian_State *state, const Eolian_Variable *vr, Eina_Bool le
|
|||
|
||||
void eo_gen_types_header_gen(const Eolian_State *state,
|
||||
Eina_Iterator *itr, Eina_Strbuf *buf,
|
||||
Eina_Bool full, Eina_Bool legacy)
|
||||
Eina_Bool full)
|
||||
{
|
||||
const Eolian_Object *decl;
|
||||
EINA_ITERATOR_FOREACH(itr, decl)
|
||||
|
@ -229,7 +229,7 @@ void eo_gen_types_header_gen(const Eolian_State *state,
|
|||
if (!vr || eolian_variable_is_extern(vr))
|
||||
continue;
|
||||
|
||||
Eina_Strbuf *vbuf = _var_generate(state, vr, legacy);
|
||||
Eina_Strbuf *vbuf = _var_generate(state, vr);
|
||||
if (vbuf)
|
||||
{
|
||||
eina_strbuf_append(buf, eina_strbuf_string_get(vbuf));
|
||||
|
@ -259,7 +259,7 @@ void eo_gen_types_header_gen(const Eolian_State *state,
|
|||
continue;
|
||||
}
|
||||
|
||||
Eina_Strbuf *tbuf = _type_generate(state, tp, full, legacy);
|
||||
Eina_Strbuf *tbuf = _type_generate(state, tp, full);
|
||||
if (tbuf)
|
||||
{
|
||||
eina_strbuf_append(buf, eina_strbuf_string_get(tbuf));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef EOLIAN_GEN_TYPES_H
|
||||
#define EOLIAN_GEN_TYPES_H
|
||||
|
||||
void eo_gen_types_header_gen(const Eolian_State *state, Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Bool full, Eina_Bool legacy);
|
||||
void eo_gen_types_header_gen(const Eolian_State *state, Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Bool full);
|
||||
void eo_gen_types_source_gen(Eina_Iterator *itr, Eina_Strbuf *buf);
|
||||
Eina_Strbuf *eo_gen_class_typedef_gen(const Eolian_State *eos, const char *eof);
|
||||
|
||||
|
|
|
@ -315,7 +315,7 @@ run(options_type const& opts)
|
|||
|
||||
for(auto&& name : opts.in_files)
|
||||
{
|
||||
Eolian_Unit const* unit = ::eolian_state_file_parse(opts.state, name.c_str());
|
||||
Eolian_Unit const* unit = ::eolian_state_file_path_parse(opts.state, name.c_str());
|
||||
if(!unit)
|
||||
{
|
||||
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
|
||||
|
@ -398,7 +398,7 @@ database_load(options_type const& opts)
|
|||
<< "No input file.";
|
||||
assert(false && "Error parsing input file");
|
||||
}
|
||||
if (!opts.main_header && !::eolian_state_file_parse(opts.state, opts.in_files[0].c_str()))
|
||||
if (!opts.main_header && !::eolian_state_file_path_parse(opts.state, opts.in_files[0].c_str()))
|
||||
{
|
||||
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
|
||||
<< "Failed parsing: " << opts.in_files[0] << ".";
|
||||
|
|
|
@ -33,20 +33,34 @@ struct alias_definition_generator
|
|||
if (!name_helpers::open_namespaces(sink, alias.namespaces, context))
|
||||
return false;
|
||||
|
||||
std::string alias_type;
|
||||
if (!as_generator(eolian_mono::type).generate(std::back_inserter(alias_type), alias.base_type, context))
|
||||
return false;
|
||||
|
||||
std::string const alias_name = utils::remove_all(alias.eolian_name, '_');
|
||||
if (!as_generator(
|
||||
"public struct " << alias_name << " {\n"
|
||||
<< scope_tab << "private " << type << " payload;\n"
|
||||
<< scope_tab << "public static implicit operator " << alias_name << "(" << type << " x)\n"
|
||||
documentation
|
||||
<< "public struct " << alias_name << "\n"
|
||||
<< "{\n"
|
||||
<< scope_tab << "private " << alias_type << " payload;\n\n"
|
||||
|
||||
<< scope_tab << "/// <summary>Converts an instance of " << alias_type << " to this struct.</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"value\">The value to be converted.</param>\n"
|
||||
<< scope_tab << "/// <returns>A struct with the given value.</returns>\n"
|
||||
<< scope_tab << "public static implicit operator " << alias_name << "(" << alias_type << " value)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "return new " << alias_name << "{payload=x};\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "public static implicit operator " << type << "(" << alias_name << " x)\n"
|
||||
<< scope_tab << scope_tab << "return new " << alias_name << "{payload=value};\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
|
||||
<< scope_tab << "/// <summary>Converts an instance of this struct to " << alias_type << ".</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"value\">The value to be converted packed in this struct.</param>\n"
|
||||
<< scope_tab << "/// <returns>The actual value the alias is wrapping.</returns>\n"
|
||||
<< scope_tab << "public static implicit operator " << alias_type << "(" << alias_name << " value)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "return x.payload;\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< "}\n"
|
||||
).generate(sink, std::make_tuple(alias.base_type, alias.base_type, alias.base_type), context))
|
||||
<< scope_tab << scope_tab << "return value.payload;\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
<< "}\n\n"
|
||||
).generate(sink, alias, context))
|
||||
return false;
|
||||
|
||||
if (!name_helpers::close_namespaces(sink, alias.namespaces, context))
|
||||
|
|
|
@ -54,8 +54,20 @@ struct async_function_declaration_generator
|
|||
return true;
|
||||
|
||||
if (!as_generator(
|
||||
scope_tab << "System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") <<
|
||||
" System.Threading.CancellationToken token=default(System.Threading.CancellationToken));\n"
|
||||
scope_tab << "/// <summary>Async wrapper for <see cref=\"" << name_helpers::managed_method_name(f) << "\" />.</summary>\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
// generate_parameter is not a proper as_generator-compatible generator, so we had to do an old fashioned loop
|
||||
for (auto&& param : f.parameters)
|
||||
if (!documentation(1).generate_parameter(sink, param, context))
|
||||
return false;
|
||||
|
||||
if (!as_generator(
|
||||
scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n"
|
||||
<< scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n"
|
||||
<< scope_tab << "System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") <<
|
||||
" System.Threading.CancellationToken token = default(System.Threading.CancellationToken));\n\n"
|
||||
).generate(sink, f.parameters, context))
|
||||
return false;
|
||||
|
||||
|
@ -88,12 +100,24 @@ struct async_function_definition_generator
|
|||
|
||||
std::transform(f.parameters.begin(), f.parameters.end(), std::back_inserter(param_forwarding), parameter_forwarding);
|
||||
|
||||
if (!as_generator(
|
||||
scope_tab << "/// <summary>Async wrapper for <see cref=\"" << name_helpers::managed_method_name(f) << "\" />.</summary>\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
// generate_parameter is not a proper as_generator-compatible generator, so we had to do an old fashioned loop
|
||||
for (auto&& param : f.parameters)
|
||||
if (!documentation(1).generate_parameter(sink, param, context))
|
||||
return false;
|
||||
|
||||
if(!as_generator(
|
||||
scope_tab << "public System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token=default(System.Threading.CancellationToken))\n"
|
||||
scope_tab << "/// <param name=\"token\">Token to notify the async operation of external request to cancel.</param>\n"
|
||||
<< scope_tab << "/// <returns>An async task wrapping the result of the operation.</returns>\n"
|
||||
<< scope_tab << "public System.Threading.Tasks.Task<Eina.Value> " << name_helpers::managed_async_method_name(f) << "(" << *(parameter << ",") << " System.Threading.CancellationToken token = default(System.Threading.CancellationToken))\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "Eina.Future future = " << name_helpers::managed_method_name(f) << "(" << (string % ",") << ");\n"
|
||||
<< scope_tab << scope_tab << "return Efl.Eo.Globals.WrapAsync(future, token);\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
).generate(sink, std::make_tuple(f.parameters, param_forwarding), context))
|
||||
return false;
|
||||
return true;
|
||||
|
|
|
@ -74,8 +74,7 @@ struct documentation_generator
|
|||
if (blacklist::is_function_blacklisted(
|
||||
::eolian_function_full_c_name_get(function, ftype))) return "";
|
||||
name += ".";
|
||||
name += name_helpers::managed_method_name(
|
||||
::eolian_object_short_name_get(klass), eo_name);
|
||||
name += name_helpers::managed_method_name({function, ftype, NULL, eolian_object_unit_get(EOLIAN_OBJECT(function))});
|
||||
break;
|
||||
case ::EOLIAN_PROP_SET:
|
||||
name += ".Set";
|
||||
|
@ -118,7 +117,7 @@ struct documentation_generator
|
|||
case attributes::function_type::prop_get:
|
||||
if (blacklist::is_function_blacklisted(func.c_name))return "";
|
||||
if (!name.empty()) name += ".";
|
||||
name += name_helpers::managed_method_name(func.klass.eolian_name, func.name);
|
||||
name += name_helpers::managed_method_name(func);
|
||||
break;
|
||||
default:
|
||||
// No need to deal with property as function_defs are converted to get/set when building a given klass_def.
|
||||
|
@ -285,6 +284,9 @@ struct documentation_generator
|
|||
template<typename OutputIterator, typename Context>
|
||||
bool generate_tag(OutputIterator sink, std::string const& tag, std::string const &text, Context const& context, std::string tag_params = "") const
|
||||
{
|
||||
if (text == "")
|
||||
return true;
|
||||
|
||||
if (!as_generator(scope_tab(scope_size) << "/// ").generate(sink, attributes::unused, context)) return false;
|
||||
if (!generate_opening_tag(sink, tag, context, tag_params)) return false;
|
||||
if (!generate_escaped_content(sink, text, context)) return false;
|
||||
|
@ -429,7 +431,7 @@ struct documentation_generator
|
|||
|
||||
return generate_all_tag_examples(sink,
|
||||
name_helpers::klass_full_concrete_or_interface_name(func.klass),
|
||||
name_helpers::managed_method_name(func.klass.eolian_name, func.name),
|
||||
name_helpers::managed_method_name(func),
|
||||
context);
|
||||
}
|
||||
|
||||
|
@ -448,7 +450,7 @@ struct documentation_generator
|
|||
|
||||
return generate_all_tag_examples(sink,
|
||||
name_helpers::klass_full_concrete_or_interface_name(func.klass),
|
||||
name_helpers::managed_method_name(func.klass.eolian_name, func.name),
|
||||
name_helpers::managed_method_name(func),
|
||||
context);
|
||||
}
|
||||
|
||||
|
@ -485,7 +487,7 @@ struct documentation_generator
|
|||
for (auto &¶m : ctor.function.parameters)
|
||||
{
|
||||
if (!as_generator(
|
||||
scope_tab << "///<param name=\"" << constructor_parameter_name(ctor) << "\">" << summary << " See <see cref=\"" << function_conversion(func) << "\"/></param>\n"
|
||||
scope_tab << "/// <param name=\"" << constructor_parameter_name(ctor) << "\">" << summary << " See <see cref=\"" << function_conversion(func) << "\"/></param>\n"
|
||||
).generate(sink, param, context))
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ struct enum_definition_generator
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
|
||||
if(!as_generator("}\n\n").generate(sink, attributes::unused, context)) return false;
|
||||
|
||||
if(!name_helpers::close_namespaces(sink, enum_.namespaces, context))
|
||||
return false;
|
||||
|
|
|
@ -34,12 +34,14 @@ struct native_function_definition_generator
|
|||
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "native_function_definition_generator: " << f.c_name << std::endl;
|
||||
if(blacklist::is_function_blacklisted(f, context))
|
||||
return true;
|
||||
else
|
||||
{
|
||||
|
||||
auto const& indent = current_indentation(context);
|
||||
|
||||
// Delegate for the C# method we will export to EO as a method implementation.
|
||||
if(!as_generator
|
||||
("\n\n" << scope_tab
|
||||
<< eolian_mono::marshall_annotation(true)
|
||||
<< " private delegate "
|
||||
(
|
||||
indent << eolian_mono::marshall_annotation(true) << "\n"
|
||||
<< indent << "private delegate "
|
||||
<< eolian_mono::marshall_type(true)
|
||||
<< " "
|
||||
<< string
|
||||
|
@ -49,14 +51,15 @@ struct native_function_definition_generator
|
|||
(
|
||||
(marshall_annotation << " " << marshall_parameter)
|
||||
) % ", ")
|
||||
<< ");\n")
|
||||
<< ");\n\n")
|
||||
.generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
|
||||
return false;
|
||||
|
||||
// API delegate is the wrapper for the Eo methods exported from C that we will use from C#.
|
||||
if(!as_generator
|
||||
("\n\n" << scope_tab
|
||||
<< eolian_mono::marshall_annotation(true)
|
||||
<< " public delegate "
|
||||
(
|
||||
indent << eolian_mono::marshall_annotation(true) << "\n"
|
||||
<< indent << "public delegate "
|
||||
<< eolian_mono::marshall_type(true)
|
||||
<< " "
|
||||
<< string << "_api_delegate(" << (f.is_static ? "" : "System.IntPtr obj")
|
||||
|
@ -65,17 +68,18 @@ struct native_function_definition_generator
|
|||
(
|
||||
(marshall_annotation << " " << marshall_parameter)
|
||||
) % ", ")
|
||||
<< ");\n")
|
||||
<< ");\n\n")
|
||||
.generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
|
||||
return false;
|
||||
|
||||
// Delegate holder (so it can't be collected).
|
||||
if(!as_generator
|
||||
(scope_tab
|
||||
<< " public static Efl.Eo.FunctionWrapper<" << string << "_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
|
||||
<< string << "_api_delegate>(_Module, \"" << string << "\");\n")
|
||||
(indent << "public static Efl.Eo.FunctionWrapper<" << string << "_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
|
||||
<< string << "_api_delegate>(Module, \"" << string << "\");\n\n")
|
||||
.generate(sink, std::make_tuple(f.c_name, f.c_name, f.c_name, f.c_name), context))
|
||||
return false;
|
||||
|
||||
// Actual method implementation to be called from C.
|
||||
std::string return_type;
|
||||
if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context))
|
||||
return false;
|
||||
|
@ -92,34 +96,37 @@ struct native_function_definition_generator
|
|||
self = "";
|
||||
|
||||
if(!as_generator
|
||||
(scope_tab
|
||||
<< " private static "
|
||||
(indent << "private static "
|
||||
<< eolian_mono::marshall_type(true) << " "
|
||||
<< string
|
||||
<< "(System.IntPtr obj, System.IntPtr pd"
|
||||
<< *(", " << marshall_parameter)
|
||||
<< ")\n"
|
||||
<< scope_tab << "{\n"
|
||||
/****/
|
||||
<< scope_tab << scope_tab << "Eina.Log.Debug(\"function " << string << " was called\");\n"
|
||||
/****/
|
||||
<< scope_tab << scope_tab << "Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);\n"
|
||||
<< scope_tab << scope_tab << "if(wrapper != null) {\n"
|
||||
<< scope_tab << scope_tab << scope_tab << eolian_mono::native_function_definition_preamble()
|
||||
<< scope_tab << scope_tab << scope_tab << "try {\n"
|
||||
<< scope_tab << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "")
|
||||
<< indent << "{\n"
|
||||
<< indent << scope_tab << "Eina.Log.Debug(\"function " << string << " was called\");\n"
|
||||
<< indent << scope_tab << "Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);\n"
|
||||
<< indent << scope_tab << "if (wrapper != null)\n"
|
||||
<< indent << scope_tab << "{\n"
|
||||
<< eolian_mono::native_function_definition_preamble()
|
||||
<< indent << scope_tab << scope_tab << "try\n"
|
||||
<< indent << scope_tab << scope_tab << "{\n"
|
||||
<< indent << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "")
|
||||
<< (f.is_static ? "" : "((") << klass_cast_name << (f.is_static ? "." : ")wrapper).") << string
|
||||
<< "(" << (native_argument_invocation % ", ") << ");\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "} catch (Exception e) {\n"
|
||||
<< scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n"
|
||||
<< scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "}\n"
|
||||
<< eolian_mono::native_function_definition_epilogue(*klass)
|
||||
<< scope_tab << scope_tab << "} else {\n"
|
||||
<< scope_tab << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << string
|
||||
<< indent << scope_tab << scope_tab << "}\n"
|
||||
<< indent << scope_tab << scope_tab << "catch (Exception e)\n"
|
||||
<< indent << scope_tab << scope_tab << "{\n"
|
||||
<< indent << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n"
|
||||
<< indent << scope_tab << scope_tab << scope_tab << "Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);\n"
|
||||
<< indent << scope_tab << scope_tab << "}\n\n"
|
||||
<< eolian_mono::native_function_definition_epilogue(*klass) << "\n"
|
||||
<< indent << scope_tab << "}\n"
|
||||
<< indent << scope_tab << "else\n"
|
||||
<< indent << scope_tab << "{\n"
|
||||
<< indent << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << string
|
||||
<< "_ptr.Value.Delegate(" << self << ((!f.is_static && f.parameters.size() > 0) ? ", " : "") << (argument % ", ") << ");\n"
|
||||
<< scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< indent << scope_tab << "}\n"
|
||||
<< indent << "}\n\n"
|
||||
)
|
||||
.generate(sink, std::make_tuple(f.return_type, escape_keyword(f.name), f.parameters
|
||||
, /***/f.c_name/***/
|
||||
|
@ -139,11 +146,11 @@ struct native_function_definition_generator
|
|||
|
||||
// This is the delegate that will be passed to Eo to be called from C.
|
||||
if(!as_generator(
|
||||
scope_tab << "private static " << f.c_name << "_delegate " << f.c_name << "_static_delegate;\n"
|
||||
indent << "private static " << f.c_name << "_delegate " << f.c_name << "_static_delegate;\n\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -261,7 +268,7 @@ struct property_wrapper_definition_generator
|
|||
std::string managed_name = name_helpers::property_managed_name(property);
|
||||
|
||||
if (!as_generator(
|
||||
scope_tab << documentation
|
||||
documentation(1)
|
||||
<< scope_tab << (interface ? "" : "public ") << (is_static ? "static " : "") << type(true) << " " << managed_name << " {\n"
|
||||
).generate(sink, std::make_tuple(property, prop_type), context))
|
||||
return false;
|
||||
|
|
|
@ -30,35 +30,34 @@ struct function_registration_generator
|
|||
bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
|
||||
{
|
||||
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "function_registration_generator: " << f.name << std::endl;
|
||||
auto const& indent = current_indentation(context);
|
||||
|
||||
if(blacklist::is_function_blacklisted(f, context) || f.is_static) // Static methods aren't overrideable
|
||||
return true;
|
||||
else
|
||||
{
|
||||
// auto index = index_generator();
|
||||
|
||||
if(!as_generator(
|
||||
scope_tab << scope_tab << "if (" << f.c_name << "_static_delegate == null)\n"
|
||||
<< scope_tab << scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" <<
|
||||
escape_keyword(f.name) << ");\n"
|
||||
indent << "if (" << f.c_name << "_static_delegate == null)\n"
|
||||
<< indent << "{\n"
|
||||
<< indent << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" << escape_keyword(f.name) << ");\n"
|
||||
<< indent << "}\n\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
if(!as_generator
|
||||
(scope_tab << scope_tab
|
||||
<< "if (methods.FirstOrDefault(m => m.Name == \"" << string << "\") != null)\n"
|
||||
<< scope_tab << scope_tab << scope_tab
|
||||
<< "descs.Add(new Efl_Op_Description() {"
|
||||
if(!as_generator(
|
||||
indent << "if (methods.FirstOrDefault(m => m.Name == \"" << string << "\") != null)\n"
|
||||
<< indent << "{\n"
|
||||
<< indent << scope_tab << "descs.Add(new Efl_Op_Description() {"
|
||||
#ifdef _WIN32
|
||||
<< "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")"
|
||||
#else
|
||||
<< "api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, \"" << string << "\")"
|
||||
<< "api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, \"" << string << "\")"
|
||||
#endif
|
||||
<< ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n"
|
||||
<< ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate) });\n"
|
||||
<< indent << "}\n\n"
|
||||
)
|
||||
.generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.c_name, f.c_name), context))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -35,24 +35,30 @@ template <typename OutputIterator, typename Context>
|
|||
static bool generate_equals_method(OutputIterator sink, Context const &context)
|
||||
{
|
||||
return as_generator(
|
||||
scope_tab << "///<summary>Verifies if the given object is equal to this one.</summary>\n"
|
||||
<< scope_tab << "public override bool Equals(object obj)\n"
|
||||
scope_tab << "/// <summary>Verifies if the given object is equal to this one.</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"instance\">The object to compare to.</param>\n"
|
||||
<< scope_tab << "/// <returns>True if both objects point to the same native object.</returns>\n"
|
||||
<< scope_tab << "public override bool Equals(object instance)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "var other = obj as Efl.Object;\n"
|
||||
<< scope_tab << scope_tab << "var other = instance as Efl.Object;\n"
|
||||
<< scope_tab << scope_tab << "if (other == null)\n"
|
||||
<< scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "return false;\n"
|
||||
<< scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << scope_tab << "return this.NativeHandle == other.NativeHandle;\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
<< scope_tab << "/// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>\n"
|
||||
<< scope_tab << "/// <returns>The value of the pointer, to be used as the hash code of this object.</returns>\n"
|
||||
<< scope_tab << "public override int GetHashCode()\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "return this.NativeHandle.ToInt32();\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "///<summary>Turns the native pointer into a string representation.</summary>\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
<< scope_tab << "/// <summary>Turns the native pointer into a string representation.</summary>\n"
|
||||
<< scope_tab << "/// <returns>A string with the type and the native pointer for this object.</returns>\n"
|
||||
<< scope_tab << "public override String ToString()\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "return $\"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]\";\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
).generate(sink, nullptr, context);
|
||||
}
|
||||
|
||||
|
@ -82,6 +88,8 @@ struct klass
|
|||
{
|
||||
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "klass_generator: " << cls.eolian_name << std::endl;
|
||||
|
||||
auto const& indent = current_indentation(context);
|
||||
|
||||
if (blacklist::is_class_blacklisted(cls, context))
|
||||
{
|
||||
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "class " << cls.eolian_name << " is blacklisted. Skipping." << std::endl;
|
||||
|
@ -125,7 +133,7 @@ struct klass
|
|||
return false;
|
||||
|
||||
// Mark the interface with the proper native Efl_Class* getter
|
||||
if(!as_generator(lit("[") << name_helpers::klass_native_inherit_name(cls) << "]\n")
|
||||
if(!as_generator(lit("[") << name_helpers::klass_full_native_inherit_name(cls) << "]\n")
|
||||
.generate(sink, attributes::unused, iface_cxt))
|
||||
return false;
|
||||
|
||||
|
@ -203,10 +211,12 @@ struct klass
|
|||
auto concrete_name = name_helpers::klass_concrete_name(cls);
|
||||
auto interface_name = name_helpers::klass_interface_name(cls);
|
||||
|
||||
// We can't make these internal yet as they have methods that are used by
|
||||
// other classes that implement the interface.
|
||||
if(!as_generator
|
||||
(
|
||||
documentation
|
||||
<< "sealed internal class " << concrete_name << " : " << "\n"
|
||||
<< "sealed public class " << concrete_name << " : " << "\n"
|
||||
<< (klass_full_concrete_or_interface_name % ",") << "\n"
|
||||
<< (inherit_classes.size() > 0 ? ", " : "" ) << interface_name << "\n"
|
||||
<< scope_tab << *(", " << name_helpers::klass_full_concrete_or_interface_name) << "\n"
|
||||
|
@ -223,7 +233,8 @@ struct klass
|
|||
scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(concrete_cxt).actual_library_name(cls.filename)
|
||||
<< ")] internal static extern System.IntPtr\n"
|
||||
<< scope_tab << scope_tab << name_helpers::klass_get_name(cls) << "();\n"
|
||||
<< scope_tab << "///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
|
||||
<< scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << interface_name << "\"/> class.\n"
|
||||
<< scope_tab << "/// Internal usage: This is used when interacting with C code and should not be used directly.</summary>\n"
|
||||
<< scope_tab << "private " << concrete_name << "(System.IntPtr raw)" << (root ? "" : " : base(raw)") << "\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << (root ? "handle = raw;\n" : "")
|
||||
|
@ -274,6 +285,8 @@ struct klass
|
|||
).generate(sink, attributes::unused, concrete_cxt))
|
||||
return false;
|
||||
|
||||
if(!generate_native_inherit_class(sink, cls, change_indentation(indent.inc(), context)))
|
||||
return true;
|
||||
|
||||
if(!as_generator("}\n").generate(sink, attributes::unused, concrete_cxt)) return false;
|
||||
}
|
||||
|
@ -289,7 +302,7 @@ struct klass
|
|||
if(!as_generator
|
||||
(
|
||||
documentation
|
||||
<< "[" << name_helpers::klass_native_inherit_name(cls) << "]\n"
|
||||
<< "[" << name_helpers::klass_full_native_inherit_name(cls) << "]\n"
|
||||
<< "public " << class_type << " " << name_helpers::klass_concrete_name(cls) << " : "
|
||||
<< (klass_full_concrete_or_interface_name % ",") // classes
|
||||
<< (inherit_classes.empty() ? "" : ",")
|
||||
|
@ -351,11 +364,24 @@ struct klass
|
|||
).generate(sink, attributes::unused, inherit_cxt))
|
||||
return false;
|
||||
|
||||
if(!generate_native_inherit_class(sink, cls, change_indentation(indent.inc(), context)))
|
||||
return true;
|
||||
|
||||
if(!as_generator("}\n").generate(sink, attributes::unused, inherit_cxt)) return false;
|
||||
}
|
||||
|
||||
// Native Inherit class
|
||||
//if(class_type == "class")
|
||||
|
||||
if(!name_helpers::close_namespaces(sink, cls.namespaces, context))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// NativeInherit class. Contains function pointers for the native Eo methods and delegates that are registered in Eo as virtual method implementations
|
||||
// These delegates are called from C to C#, checking whether the C# subclass reimplemented it.
|
||||
template <typename OutputIterator, typename Context>
|
||||
bool generate_native_inherit_class(OutputIterator sink, attributes::klass_def const& cls, Context const& context) const
|
||||
{
|
||||
{
|
||||
auto inative_cxt = context_add_tag(class_context{class_context::inherit_native,
|
||||
name_helpers::klass_full_concrete_or_interface_name(cls)},
|
||||
|
@ -363,6 +389,9 @@ struct klass
|
|||
auto native_inherit_name = name_helpers::klass_native_inherit_name(cls);
|
||||
auto inherit_name = name_helpers::klass_inherit_name(cls);
|
||||
auto implementable_methods = helpers::get_all_implementable_methods(cls);
|
||||
bool root = !helpers::has_regular_ancestor(cls);
|
||||
auto const& indent = current_indentation(inative_cxt);
|
||||
|
||||
std::string base_name;
|
||||
if(!root)
|
||||
{
|
||||
|
@ -372,12 +401,28 @@ struct klass
|
|||
|
||||
if(!as_generator
|
||||
(
|
||||
"public class " << native_inherit_name << " " << (root ? " : Efl.Eo.NativeClass" : (": " + base_name)) <<"{\n"
|
||||
<< scope_tab << "public " << (root ? "" : "new ") << " static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule("
|
||||
<< context_find_tag<library_context>(context).actual_library_name(cls.filename) << ");\n"
|
||||
<< scope_tab << "public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "var descs = new System.Collections.Generic.List<Efl_Op_Description>();\n"
|
||||
indent << lit("/// <summary>Wrapper for native methods and virtual method delegates.\n")
|
||||
<< indent << "/// For internal use by generated code only.</summary>\n"
|
||||
<< indent << "public " << (root ? "" : "new " ) << "class " << native_inherit_name << " " << (root ? " : Efl.Eo.NativeClass" : (": " + base_name)) <<"\n"
|
||||
<< indent << "{\n"
|
||||
).generate(sink, attributes::unused, inative_cxt))
|
||||
return false;
|
||||
|
||||
if(implementable_methods.size() >= 1)
|
||||
{
|
||||
if(!as_generator(
|
||||
indent << scope_tab << "private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule("
|
||||
<< indent << context_find_tag<library_context>(context).actual_library_name(cls.filename) << ");\n"
|
||||
).generate(sink, attributes::unused, inative_cxt))
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!as_generator(
|
||||
indent << scope_tab << "/// <summary>Gets the list of Eo operations to override.</summary>\n"
|
||||
<< indent << scope_tab << "/// <returns>The list of Eo operations to be overload.</returns>\n"
|
||||
<< indent << scope_tab << "public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)\n"
|
||||
<< indent << scope_tab << "{\n"
|
||||
<< indent << scope_tab << scope_tab << "var descs = new System.Collections.Generic.List<Efl_Op_Description>();\n"
|
||||
)
|
||||
.generate(sink, attributes::unused, inative_cxt))
|
||||
return false;
|
||||
|
@ -387,54 +432,46 @@ struct klass
|
|||
// only non-registrable methods like class functions, leading to unused `methods` variable.
|
||||
std::string tmp_registration;
|
||||
if(!as_generator(*(function_registration(cls)))
|
||||
.generate(std::back_inserter(tmp_registration), implementable_methods, inative_cxt))
|
||||
.generate(std::back_inserter(tmp_registration), implementable_methods, change_indentation(indent.inc(2), inative_cxt)))
|
||||
return false;
|
||||
|
||||
if (tmp_registration.find("methods") != std::string::npos)
|
||||
if (!as_generator(
|
||||
scope_tab << scope_tab << "var methods = Efl.Eo.Globals.GetUserMethods(type);\n"
|
||||
indent << scope_tab << scope_tab << "var methods = Efl.Eo.Globals.GetUserMethods(type);\n\n"
|
||||
<< tmp_registration
|
||||
).generate(sink, attributes::unused, inative_cxt))
|
||||
return false;
|
||||
|
||||
|
||||
if(!root)
|
||||
if(!as_generator(scope_tab << scope_tab << "descs.AddRange(base.GetEoOps(type));\n").generate(sink, attributes::unused, inative_cxt))
|
||||
if(!as_generator(indent << scope_tab << scope_tab << "descs.AddRange(base.GetEoOps(type));\n").generate(sink, attributes::unused, inative_cxt))
|
||||
return false;
|
||||
|
||||
if(!as_generator(
|
||||
scope_tab << scope_tab << "return descs;\n"
|
||||
<< scope_tab << "}\n"
|
||||
indent << scope_tab << scope_tab << "return descs;\n"
|
||||
<< indent << scope_tab << "}\n"
|
||||
).generate(sink, attributes::unused, inative_cxt))
|
||||
return false;
|
||||
|
||||
// Attribute getter of the native 'Efl_Class *' handle (for proper inheritance from additional explicit interfaces)
|
||||
if(!as_generator(
|
||||
scope_tab << "public override IntPtr GetEflClass()\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n"
|
||||
<< scope_tab << "}\n"
|
||||
).generate(sink, attributes::unused, inative_cxt))
|
||||
return false;
|
||||
|
||||
if(!as_generator(
|
||||
scope_tab << "public static " << (root ? "" : "new ") << " IntPtr GetEflClassStatic()\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n"
|
||||
<< scope_tab << "}\n"
|
||||
indent << scope_tab << "/// <summary>Returns the Eo class for the native methods of this class.</summary>\n"
|
||||
<< indent << scope_tab << "/// <returns>The native class pointer.</returns>\n"
|
||||
<< indent << scope_tab << "public override IntPtr GetEflClass()\n"
|
||||
<< indent << scope_tab << "{\n"
|
||||
<< indent << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n"
|
||||
<< indent << scope_tab << "}\n\n"
|
||||
).generate(sink, attributes::unused, inative_cxt))
|
||||
return false;
|
||||
|
||||
// Native method definitions
|
||||
if(!as_generator(*(native_function_definition(cls)))
|
||||
.generate(sink, implementable_methods, inative_cxt)) return false;
|
||||
if(!as_generator(
|
||||
indent << scope_tab << "#pragma warning disable CA1707, CS1591, SA1300, SA1600\n\n"
|
||||
<< *(native_function_definition(cls))
|
||||
<< indent << scope_tab << "#pragma warning restore CA1707, CS1591, SA1300, SA1600\n\n")
|
||||
.generate(sink, implementable_methods, change_indentation(indent.inc(), inative_cxt))) return false;
|
||||
|
||||
if(!as_generator("}\n").generate(sink, attributes::unused, inative_cxt)) return false;
|
||||
}
|
||||
|
||||
if(!name_helpers::close_namespaces(sink, cls.namespaces, context))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -457,14 +494,20 @@ struct klass
|
|||
|
||||
if(!as_generator(
|
||||
scope_tab << "///<summary>Pointer to the native class description.</summary>\n"
|
||||
<< scope_tab << "public " << raw_klass_modifier << "System.IntPtr NativeClass {\n"
|
||||
<< scope_tab << scope_tab << "get {\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "if (((object)this).GetType() == typeof (" << inherit_name << "))\n"
|
||||
<< scope_tab << scope_tab << scope_tab << scope_tab << "return " << native_inherit_full_name << ".GetEflClassStatic();\n"
|
||||
<< scope_tab << "public " << raw_klass_modifier << "System.IntPtr NativeClass\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "get\n"
|
||||
<< scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "if (((object)this).GetType() == typeof(" << inherit_name << "))\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << scope_tab << "return GetEflClassStatic();\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "else\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << scope_tab << "return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
|
@ -473,15 +516,19 @@ struct klass
|
|||
return true;
|
||||
|
||||
if (cls.get_all_events().size() > 0)
|
||||
if (!as_generator(scope_tab << visibility << "Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)> eoEvents = new Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)>();\n"
|
||||
<< scope_tab << visibility << "readonly object eventLock = new object();\n")
|
||||
if (!as_generator(
|
||||
scope_tab << "/// <summary>Internal usage by derived classes to track native events.</summary>\n"
|
||||
<< scope_tab << visibility << "Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)> eoEvents = new Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)>();\n"
|
||||
<< scope_tab << "/// <summary>Internal usage by derived classes to lock native event handlers.</summary>\n"
|
||||
<< scope_tab << visibility << "readonly object eventLock = new object();\n")
|
||||
.generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
if (is_inherit)
|
||||
{
|
||||
if (!as_generator(
|
||||
scope_tab << "protected bool inherited;\n"
|
||||
scope_tab << "/// <summary>Internal usage to detect whether this instance is from a generated class or not.</summary>\n"
|
||||
<< scope_tab << "protected bool inherited;\n"
|
||||
).generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
}
|
||||
|
@ -489,9 +536,10 @@ struct klass
|
|||
return as_generator(
|
||||
scope_tab << visibility << " System.IntPtr handle;\n"
|
||||
<< scope_tab << "///<summary>Pointer to the native instance.</summary>\n"
|
||||
<< scope_tab << "public System.IntPtr NativeHandle {\n"
|
||||
<< scope_tab << "public System.IntPtr NativeHandle\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "get { return handle; }\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
).generate(sink, attributes::unused, context);
|
||||
}
|
||||
|
||||
|
@ -500,7 +548,6 @@ struct klass
|
|||
{
|
||||
bool root = !helpers::has_regular_ancestor(cls);
|
||||
auto inherit_name = name_helpers::klass_concrete_name(cls);
|
||||
auto native_inherit_name = name_helpers::klass_native_inherit_name(cls);
|
||||
|
||||
if(!as_generator(
|
||||
scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(context).actual_library_name(cls.filename)
|
||||
|
@ -518,22 +565,24 @@ struct klass
|
|||
|
||||
// Public (API) constructors
|
||||
if (!as_generator(
|
||||
scope_tab << "///<summary>Creates a new instance.</summary>\n"
|
||||
<< scope_tab << "///<param name=\"parent\">Parent instance.</param>\n"
|
||||
scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"parent\">Parent instance.</param>\n"
|
||||
<< *(documentation)
|
||||
// For constructors with arguments, the parent is also required, as optional parameters can't come before non-optional paramenters.
|
||||
<< scope_tab << "public " << inherit_name << "(Efl.Object parent" << ((constructors.size() > 0) ? "" : "= null") << "\n"
|
||||
<< scope_tab << scope_tab << scope_tab << *(", " << constructor_param ) << ") :\n"
|
||||
<< scope_tab << scope_tab << (root ? "this" : "base") << "(" << name_helpers::klass_get_name(cls) << "(), typeof(" << inherit_name << "), parent)\n"
|
||||
<< scope_tab << scope_tab << scope_tab << *(", " << constructor_param ) << ") : "
|
||||
<< (root ? "this" : "base") << "(" << name_helpers::klass_get_name(cls) << "(), typeof(" << inherit_name << "), parent)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< *(scope_tab << scope_tab << constructor_invocation << "\n" )
|
||||
<< (*(scope_tab << scope_tab << constructor_invocation << "\n"))
|
||||
<< scope_tab << scope_tab << "FinishInstantiation();\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
<< scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
|
||||
<< scope_tab << "/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"raw\">The native pointer to be wrapped.</param>\n"
|
||||
<< scope_tab << "protected " << inherit_name << "(System.IntPtr raw)" << (root ? "" : " : base(raw)") << "\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << (root ? "handle = raw;\n" : "")
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
).generate(sink, std::make_tuple(constructors, constructors, constructors), context))
|
||||
return false;
|
||||
|
||||
|
@ -558,8 +607,14 @@ struct klass
|
|||
if (!root)
|
||||
{
|
||||
return as_generator(
|
||||
scope_tab << "///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>\n"
|
||||
<< scope_tab << "protected " << inherit_name << "(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}\n"
|
||||
scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
|
||||
<< scope_tab << "/// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"baseKlass\">The pointer to the base native Eo class.</param>\n"
|
||||
<< scope_tab << "/// <param name=\"managedType\">The managed type of the public constructor that originated this call.</param>\n"
|
||||
<< scope_tab << "/// <param name=\"parent\">The Efl.Object parent of this instance.</param>\n"
|
||||
<< scope_tab << "protected " << inherit_name << "(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
).generate(sink, attributes::unused, context);
|
||||
|
||||
}
|
||||
|
@ -567,25 +622,34 @@ struct klass
|
|||
// Detailed constructors go only in root classes.
|
||||
return as_generator(
|
||||
/// Actual root costructor that creates class and instantiates
|
||||
scope_tab << "protected " << inherit_name << "(IntPtr base_klass, System.Type managed_type, Efl.Object parent)\n"
|
||||
scope_tab << "/// <summary>Initializes a new instance of the <see cref=\"" << inherit_name << "\"/> class.\n"
|
||||
<< scope_tab << "/// Internal usage: Constructor to actually call the native library constructors. C# subclasses\n"
|
||||
<< scope_tab << "/// must use the public constructor only.</summary>\n"
|
||||
<< scope_tab << "/// <param name=\"baseKlass\">The pointer to the base native Eo class.</param>\n"
|
||||
<< scope_tab << "/// <param name=\"managedType\">The managed type of the public constructor that originated this call.</param>\n"
|
||||
<< scope_tab << "/// <param name=\"parent\">The Efl.Object parent of this instance.</param>\n"
|
||||
<< scope_tab << "protected " << inherit_name << "(IntPtr baseKlass, System.Type managedType, Efl.Object parent)\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "inherited = ((object)this).GetType() != managed_type;\n"
|
||||
<< scope_tab << scope_tab << "IntPtr actual_klass = base_klass;\n"
|
||||
<< scope_tab << scope_tab << "if (inherited) {\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "actual_klass = Efl.Eo.ClassRegister.GetInheritKlassOrRegister(base_klass, ((object)this).GetType());\n"
|
||||
<< scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << scope_tab << "inherited = ((object)this).GetType() != managedType;\n"
|
||||
<< scope_tab << scope_tab << "IntPtr actual_klass = baseKlass;\n"
|
||||
<< scope_tab << scope_tab << "if (inherited)\n"
|
||||
<< scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "actual_klass = Efl.Eo.ClassRegister.GetInheritKlassOrRegister(baseKlass, ((object)this).GetType());\n"
|
||||
<< scope_tab << scope_tab << "}\n\n"
|
||||
<< scope_tab << scope_tab << "handle = Efl.Eo.Globals.instantiate_start(actual_klass, parent);\n"
|
||||
<< scope_tab << scope_tab << "if (inherited)\n"
|
||||
<< scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "Efl.Eo.Globals.PrivateDataSet(this);\n"
|
||||
<< scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
|
||||
<< scope_tab << "/// <summary>Finishes instantiating this object.\n"
|
||||
<< scope_tab << "/// Internal usage by generated code.</summary>\n"
|
||||
<< scope_tab << "protected void FinishInstantiation()\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "handle = Efl.Eo.Globals.instantiate_end(handle);\n"
|
||||
<< scope_tab << scope_tab << "Eina.Error.RaiseIfUnhandledException();\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
|
||||
).generate(sink, attributes::unused, context);
|
||||
}
|
||||
|
@ -597,7 +661,7 @@ struct klass
|
|||
if (helpers::has_regular_ancestor(cls))
|
||||
return true;
|
||||
|
||||
std::string visibility = is_inherit_context(context) ? "protected virtual " : "";
|
||||
std::string visibility = is_inherit_context(context) ? "protected virtual " : "private ";
|
||||
|
||||
auto inherit_name = name_helpers::klass_concrete_name(cls);
|
||||
|
||||
|
@ -647,7 +711,7 @@ struct klass
|
|||
<< scope_tab << scope_tab << scope_tab << scope_tab << "}\n\n"
|
||||
<< scope_tab << scope_tab << scope_tab << scope_tab << "Monitor.Exit(Efl.All.InitLock);\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << scope_tab << "}\n\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
|
||||
<< scope_tab << "///<summary>Releases the underlying native instance.</summary>\n"
|
||||
|
@ -734,7 +798,7 @@ struct klass
|
|||
<< scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Trying to remove proxy for event {key} when it is nothing registered.\");\n"
|
||||
<< scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << "}\n"
|
||||
<< scope_tab << "}\n\n"
|
||||
)
|
||||
.generate(sink, NULL, context))
|
||||
return false;
|
||||
|
|
|
@ -51,71 +51,71 @@ struct marshall_annotation_visitor_generate
|
|||
match const parameter_match_table[] =
|
||||
{
|
||||
// signed primitives
|
||||
{"bool", nullptr, [&] { return " [MarshalAs(UnmanagedType.U1)]"; }},
|
||||
{"bool", nullptr, [&] { return "[MarshalAs(UnmanagedType.U1)]"; }},
|
||||
{"string", true, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
|
||||
}},
|
||||
{"string", false, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
|
||||
}},
|
||||
{"mstring", true, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
|
||||
}},
|
||||
{"mstring", false, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
|
||||
}},
|
||||
{"stringshare", true, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
|
||||
}},
|
||||
{"stringshare", false, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
|
||||
}},
|
||||
{"any_value_ptr", true, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
|
||||
}},
|
||||
{"any_value_ptr", false, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
|
||||
}},
|
||||
{"strbuf", true, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
|
||||
}},
|
||||
{"strbuf", false, [&] {
|
||||
return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
|
||||
return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
|
||||
}},
|
||||
};
|
||||
match const return_match_table[] =
|
||||
{
|
||||
// signed primitives
|
||||
{"bool", nullptr, [&] { return " [return: MarshalAs(UnmanagedType.U1)]"; }},
|
||||
{"bool", nullptr, [&] { return "[return: MarshalAs(UnmanagedType.U1)]"; }},
|
||||
{"string", true, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
|
||||
}},
|
||||
{"string", nullptr, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
|
||||
}},
|
||||
{"mstring", true, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
|
||||
}},
|
||||
{"mstring", false, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
|
||||
}},
|
||||
{"stringshare", true, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
|
||||
}},
|
||||
{"stringshare", false, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
|
||||
}},
|
||||
{"any_value_ptr", true, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
|
||||
}},
|
||||
{"any_value_ptr", false, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
|
||||
}},
|
||||
{"strbuf", true, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
|
||||
}},
|
||||
{"strbuf", false, [&] {
|
||||
return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
|
||||
return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
|
||||
}},
|
||||
};
|
||||
|
||||
|
|
|
@ -176,22 +176,22 @@ inline std::string managed_namespace(std::string const& ns)
|
|||
return escape_keyword(utils::remove_all(ns, '_'));
|
||||
}
|
||||
|
||||
inline std::string managed_method_name(std::string const& klass, std::string const& name)
|
||||
inline std::string managed_method_name(attributes::function_def const& f)
|
||||
{
|
||||
std::vector<std::string> names = utils::split(name, '_');
|
||||
std::vector<std::string> names = utils::split(f.name, '_');
|
||||
|
||||
name_helpers::reorder_verb(names);
|
||||
|
||||
std::string candidate = escape_keyword(utils::to_pascal_case(names));
|
||||
|
||||
// Some eolian methods have the same name as their parent class
|
||||
if (candidate == klass)
|
||||
if (candidate == klass_concrete_or_interface_name(f.klass))
|
||||
candidate = "Do" + candidate;
|
||||
|
||||
// Avoid clashing with System.Object.GetType
|
||||
if (candidate == "GetType" || candidate == "SetType")
|
||||
{
|
||||
candidate.insert(3, klass);
|
||||
candidate.insert(3, f.klass.eolian_name);
|
||||
}
|
||||
|
||||
return candidate;
|
||||
|
@ -203,11 +203,6 @@ inline std::string managed_name(std::string const& name, char separator='_')
|
|||
return utils::to_pascal_case(tokens);
|
||||
}
|
||||
|
||||
inline std::string managed_method_name(attributes::function_def const& f)
|
||||
{
|
||||
return managed_method_name(f.klass.eolian_name, f.name);
|
||||
}
|
||||
|
||||
inline std::string alias_full_eolian_name(attributes::alias_def const& alias)
|
||||
{
|
||||
|
||||
|
@ -287,7 +282,7 @@ inline std::string property_managed_name(attributes::property_def const& propert
|
|||
inline std::string managed_part_name(attributes::part_def const& part)
|
||||
{
|
||||
std::vector<std::string> names = utils::split(part.name, '_');
|
||||
return utils::to_pascal_case(names);
|
||||
return utils::to_pascal_case(names) + "Part";
|
||||
}
|
||||
|
||||
// Class name translation (interface/concrete/inherit/etc)
|
||||
|
@ -398,29 +393,15 @@ inline std::string klass_inherit_name(T const& klass)
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
inline std::string klass_native_inherit_name(T const& klass)
|
||||
inline std::string klass_native_inherit_name(EINA_UNUSED T const& klass)
|
||||
{
|
||||
switch(klass.type)
|
||||
{
|
||||
case attributes::class_type::abstract_:
|
||||
case attributes::class_type::regular:
|
||||
return klass_concrete_name(klass) + "NativeInherit";
|
||||
default:
|
||||
return klass_interface_name(klass) + "NativeInherit";
|
||||
}
|
||||
return "NativeMethods";
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline std::string klass_full_native_inherit_name(T const& klass)
|
||||
{
|
||||
switch(klass.type)
|
||||
{
|
||||
case attributes::class_type::abstract_:
|
||||
case attributes::class_type::regular:
|
||||
return klass_full_concrete_name(klass) + "NativeInherit";
|
||||
default:
|
||||
return klass_full_interface_name(klass) + "NativeInherit";
|
||||
}
|
||||
return klass_full_concrete_name(klass) + "." + klass_native_inherit_name(klass);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
@ -465,14 +446,14 @@ bool open_namespaces(OutputIterator sink, std::vector<std::string> namespaces, C
|
|||
{
|
||||
std::transform(namespaces.begin(), namespaces.end(), namespaces.begin(), managed_namespace);
|
||||
|
||||
auto open_namespace = *("namespace " << string << " { ") << "\n";
|
||||
auto open_namespace = *("namespace " << string << " {\n\n");
|
||||
return as_generator(open_namespace).generate(sink, namespaces, context);
|
||||
}
|
||||
|
||||
template<typename OutputIterator, typename Context>
|
||||
bool close_namespaces(OutputIterator sink, std::vector<std::string> const& namespaces, Context const& context)
|
||||
{
|
||||
auto close_namespace = *(lit("} ")) << "\n";
|
||||
auto close_namespace = (lit("}") % "\n\n" ) << "\n\n";
|
||||
return as_generator(close_namespace).generate(sink, namespaces, context);
|
||||
}
|
||||
|
||||
|
|
|
@ -389,22 +389,22 @@ inline std::string direction_modifier(attributes::parameter_def const& param)
|
|||
{
|
||||
if (param.direction == attributes::parameter_direction::inout)
|
||||
{
|
||||
return " ref ";
|
||||
return "ref ";
|
||||
}
|
||||
else if (param.direction != attributes::parameter_direction::in)
|
||||
{
|
||||
if (param.type.c_type == "Eina_Slice" || param.type.c_type == "Eina_Rw_Slice")
|
||||
return " ref ";
|
||||
return "ref ";
|
||||
else
|
||||
return " out ";
|
||||
return "out ";
|
||||
}
|
||||
else if (param.direction == attributes::parameter_direction::in && param.type.is_ptr)
|
||||
{
|
||||
auto regular = efl::eina::get<attributes::regular_type_def>(¶m.type.original_type);
|
||||
if (helpers::need_struct_conversion(regular))
|
||||
return " ref "; // Don't add ref on Marshal if it is ptr
|
||||
return "ref "; // Don't add ref on Marshal if it is ptr
|
||||
}
|
||||
return " ";
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string marshall_direction_modifier(attributes::parameter_def const& param)
|
||||
|
@ -1477,7 +1477,8 @@ struct constructor_invocation_generator
|
|||
if (!as_generator(
|
||||
"if (" <<
|
||||
(efl::eolian::grammar::attribute_reorder<-1>
|
||||
("Efl.Eo.Globals.ParamHelperCheck(" << constructor_parameter_name(ctor) << ")") % "||") << ")\n"
|
||||
("Efl.Eo.Globals.ParamHelperCheck(" << constructor_parameter_name(ctor) << ")") % " || ") << ")\n"
|
||||
<< scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << name_helpers::managed_method_name(ctor.function) << "("
|
||||
).generate(sink, params, context))
|
||||
return false;
|
||||
|
@ -1493,7 +1494,9 @@ struct constructor_invocation_generator
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!as_generator(");").generate(sink, attributes::unused, context))
|
||||
if (!as_generator(
|
||||
");\n"
|
||||
<< scope_tab << scope_tab << "}\n").generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -22,12 +22,12 @@ struct part_definition_generator
|
|||
return true;
|
||||
|
||||
auto part_klass_name = name_helpers::klass_full_concrete_or_interface_name(part.klass);
|
||||
return as_generator(scope_tab << documentation
|
||||
return as_generator(documentation(1)
|
||||
<< scope_tab << "public " << part_klass_name << " " << name_helpers::managed_part_name(part) << "\n"
|
||||
<< scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << "get\n"
|
||||
<< scope_tab << scope_tab << "{\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "return Efl.IPartNativeInherit.efl_part_get_ptr.Value.Delegate(NativeHandle, \"" << part.name << "\") as " << part_klass_name << ";\n"
|
||||
<< scope_tab << scope_tab << scope_tab << "return GetPart(\"" << part.name << "\") as " << part_klass_name << ";\n"
|
||||
<< scope_tab << scope_tab << "}\n"
|
||||
<< scope_tab << "}\n"
|
||||
).generate(sink, part.documentation, context);
|
||||
|
|
|
@ -267,7 +267,8 @@ struct struct_internal_definition_generator
|
|||
auto const& indent = current_indentation(context);
|
||||
if (!as_generator
|
||||
(
|
||||
indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n"
|
||||
indent << "#pragma warning disable CS1591\n\n"
|
||||
<< indent << "///<summary>Internal wrapper for struct " << string << ".</summary>\n"
|
||||
<< indent << "[StructLayout(LayoutKind.Sequential)]\n"
|
||||
<< indent << "public struct " << string << "\n"
|
||||
<< indent << "{\n"
|
||||
|
@ -367,7 +368,9 @@ struct struct_internal_definition_generator
|
|||
return false;
|
||||
|
||||
// close internal class
|
||||
if(!as_generator(indent << "}\n\n").generate(sink, attributes::unused, context)) return false;
|
||||
if(!as_generator(indent << "}\n\n"
|
||||
<< indent << "#pragma warning restore CS1591\n\n"
|
||||
).generate(sink, attributes::unused, context)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -400,7 +403,7 @@ struct struct_definition_generator
|
|||
field_name[0] = std::toupper(field_name[0]); // Hack to allow 'static' as a field name
|
||||
if (!as_generator
|
||||
(
|
||||
indent << scope_tab << documentation
|
||||
documentation(indent.n + 1)
|
||||
<< indent << scope_tab << "public " << type << " " << string << ";\n"
|
||||
)
|
||||
.generate(sink, std::make_tuple(field, field.type, name_helpers::to_field_name(field.name)), context))
|
||||
|
@ -435,7 +438,9 @@ struct struct_definition_generator
|
|||
}
|
||||
|
||||
if(!as_generator(
|
||||
indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
|
||||
indent << scope_tab << "///<summary>Implicit conversion to the managed representation from a native pointer.</summary>\n"
|
||||
<< indent << scope_tab << "///<param name=\"ptr\">Native pointer to be converted.</param>\n"
|
||||
<< indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n"
|
||||
<< indent << scope_tab << "{\n"
|
||||
<< indent << scope_tab << scope_tab << "var tmp = (" << struct_name << ".NativeStruct)Marshal.PtrToStructure(ptr, typeof(" << struct_name << ".NativeStruct));\n"
|
||||
<< indent << scope_tab << scope_tab << "return tmp;\n"
|
||||
|
|
|
@ -18,7 +18,7 @@ struct field_argument_default_generator
|
|||
template<typename OutputIterator, typename Context>
|
||||
bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
|
||||
{
|
||||
if (!as_generator(type << " " << string << "=default(" << type << ")")
|
||||
if (!as_generator(type << " " << string << " = default(" << type << ")")
|
||||
.generate(sink, std::make_tuple(field.type, name_helpers::to_field_name(field.name), field.type), context))
|
||||
return false;
|
||||
return true;
|
||||
|
|
|
@ -34,7 +34,7 @@ struct constant_definition_generator
|
|||
if (!name_helpers::open_namespaces(sink, constant.namespaces, context))
|
||||
return false;
|
||||
|
||||
if (!as_generator("public partial class Constants {\n").generate(sink, attributes::unused, context))
|
||||
if (!as_generator("public partial class Constants\n{\n").generate(sink, attributes::unused, context))
|
||||
return false;
|
||||
|
||||
std::string literal;
|
||||
|
@ -58,11 +58,12 @@ struct constant_definition_generator
|
|||
}
|
||||
|
||||
// declare variable
|
||||
if (!as_generator(scope_tab(1)
|
||||
if (!as_generator(documentation(1)
|
||||
<< scope_tab(1)
|
||||
<< "public static readonly " << type
|
||||
<< " " << utils::remove_all(constant.name, '_')
|
||||
<< " = " << literal << ";\n")
|
||||
.generate(sink, constant.base_type, context))
|
||||
.generate(sink, std::make_tuple(constant, constant.base_type), context))
|
||||
return false;
|
||||
|
||||
// FIXME missing documentation generator
|
||||
|
|
|
@ -261,7 +261,7 @@ database_load(options_type const& opts)
|
|||
<< "No input file.";
|
||||
assert(false && "Error parsing input file");
|
||||
}
|
||||
if (!::eolian_state_file_parse(opts.state, opts.in_file.c_str()))
|
||||
if (!::eolian_state_file_path_parse(opts.state, opts.in_file.c_str()))
|
||||
{
|
||||
EINA_CXX_DOM_LOG_ERR(eolian_mono::domain)
|
||||
<< "Failed parsing: " << opts.in_file << ".";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cxx_header_src += join_paths(file_location, 'Efl.hh')
|
||||
|
||||
install_headers(join_paths('..', file_location, 'cxx', 'efl_part_impl.hh'),
|
||||
subdir: join_paths(dir_package_include, 'cxx')
|
||||
subdir: join_paths(package_version_name, 'cxx')
|
||||
)
|
||||
|
|
|
@ -50,5 +50,5 @@ eina_cxx = declare_dependency(
|
|||
)
|
||||
|
||||
install_headers(eina_cxx_header_src,
|
||||
subdir: dir_package_include
|
||||
subdir: package_version_name
|
||||
)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
cxx_header_src += files(join_paths('..', file_location, 'Efl_Ui.hh'))
|
|
@ -11,7 +11,7 @@ cxx_sublibs = [
|
|||
['Evas', false, true, true, []],
|
||||
['Edje', false, false, true, []],
|
||||
['Eldbus', true, true, true, []],
|
||||
['Elementary', false, true, true, []]
|
||||
['Elementary', true, true, true, []]
|
||||
]
|
||||
|
||||
increased_dependency = []
|
||||
|
@ -30,7 +30,6 @@ foreach lib : cxx_sublibs
|
|||
'-DNEED_RUN_IN_TREE=1'
|
||||
]
|
||||
|
||||
dir_package_include = package_version_name
|
||||
dir_package_modules = join_paths(dir_lib, package_name, 'modules')
|
||||
cxx_generator_target = []
|
||||
cxx_header_src = []
|
||||
|
@ -50,7 +49,7 @@ foreach lib : cxx_sublibs
|
|||
input : join_paths(subdir_file_location, cxx_gen_file),
|
||||
output : [cxx_gen_file + '.hh', cxx_gen_file + '.impl.hh'],
|
||||
install : true,
|
||||
install_dir : join_paths(dir_package_include, eo_file_subdir),
|
||||
install_dir : join_paths(dir_include, package_version_name, eo_file_subdir),
|
||||
command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories,
|
||||
'-o', join_paths(meson.current_build_dir(), cxx_gen_file + '.hh'),
|
||||
'@INPUT@'])
|
||||
|
@ -64,7 +63,7 @@ foreach lib : cxx_sublibs
|
|||
input : eo_file_list,
|
||||
output : [lib[0] + '.eo.hh'],
|
||||
install : true,
|
||||
install_dir : join_paths(dir_package_include),
|
||||
install_dir : join_paths(dir_include, package_version_name),
|
||||
command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories, '-m',
|
||||
'-o', '@OUTPUT@',
|
||||
'@INPUT@'])
|
||||
|
@ -97,7 +96,7 @@ foreach lib : cxx_sublibs
|
|||
endforeach
|
||||
|
||||
install_headers(cxx_header_src,
|
||||
subdir: dir_package_include
|
||||
subdir: package_version_name,
|
||||
)
|
||||
|
||||
pkgconfig.generate(
|
||||
|
|
|
@ -310,7 +310,8 @@ ffi.cdef [[
|
|||
Eina_Iterator *eolian_state_eot_file_paths_get(const Eolian_State *state);
|
||||
Eina_Iterator *eolian_state_eo_files_get(const Eolian_State *state);
|
||||
Eina_Iterator *eolian_state_eot_files_get(const Eolian_State *state);
|
||||
const Eolian_Unit *eolian_state_file_parse(Eolian_State *state, const char *filepath);
|
||||
const Eolian_Unit *eolian_state_file_parse(Eolian_State *state, const char *filename);
|
||||
const Eolian_Unit *eolian_state_file_path_parse(Eolian_State *state, const char *filepath);
|
||||
Eina_Bool eolian_state_all_eo_files_parse(Eolian_State *state);
|
||||
Eina_Bool eolian_state_all_eot_files_parse(Eolian_State *state);
|
||||
Eina_Bool eolian_state_check(const Eolian_State *state);
|
||||
|
@ -755,8 +756,16 @@ ffi.metatype("Eolian_State", {
|
|||
return eolian.eolian_state_system_directory_add(self) ~= 0
|
||||
end,
|
||||
|
||||
file_parse = function(self, fpath)
|
||||
local v = eolian.eolian_state_file_parse(self, fpath)
|
||||
file_parse = function(self, fname)
|
||||
local v = eolian.eolian_state_file_parse(self, fname)
|
||||
if v == nil then
|
||||
return nil
|
||||
end
|
||||
return v
|
||||
end,
|
||||
|
||||
file_path_parse = function(self, fpath)
|
||||
local v = eolian.eolian_state_file_path_parse(self, fpath)
|
||||
if v == nil then
|
||||
return nil
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ static class UnsafeNativeMethods
|
|||
|
||||
static UnsafeNativeMethods()
|
||||
{
|
||||
_evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>("evas", "evas_init");
|
||||
_evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>(efl.Libs.Evas, "evas_init");
|
||||
}
|
||||
|
||||
public static void evas_init()
|
||||
|
|
|
@ -53,14 +53,6 @@ blacklisted_files = [
|
|||
'evas_canvas3d_primitive.eo',
|
||||
'evas_canvas3d_scene.eo',
|
||||
'evas_canvas3d_texture.eo',
|
||||
'efl_canvas_vg_object.eo',
|
||||
'efl_vg.eo',
|
||||
'efl_vg_container.eo',
|
||||
'efl_vg_gradient.eo',
|
||||
'efl_vg_gradient_radial.eo',
|
||||
'efl_vg_gradient_linear.eo',
|
||||
'efl_vg_root_node.eo',
|
||||
'efl_vg_shape.eo.cs',
|
||||
'efl_io_buffer.eo',
|
||||
'efl_io_queue.eo',
|
||||
'efl_io_sizer.eo',
|
||||
|
@ -94,8 +86,8 @@ blacklisted_files = [
|
|||
efl_mono_lib = library('eflcustomexportsmono',
|
||||
join_paths('..', '..', 'lib', 'efl_mono', 'efl_custom_exports_mono.c'),
|
||||
install : true,
|
||||
install_dir : join_paths(dir_lib, 'efl-mono-'+version_major),
|
||||
dependencies : [eo, eina, ecore]
|
||||
dependencies : [eo, eina, ecore],
|
||||
version : meson.project_version()
|
||||
)
|
||||
|
||||
beta_option = []
|
||||
|
|
|
@ -7,7 +7,6 @@ examples = [
|
|||
'ecore_file_download_example',
|
||||
'ecore_idler_example',
|
||||
'ecore_job_example',
|
||||
'ecore_pipe_simple_example',
|
||||
'ecore_poller_example',
|
||||
'ecore_thread_example',
|
||||
'ecore_time_functions_example',
|
||||
|
@ -15,6 +14,10 @@ examples = [
|
|||
'ecore_getopt_example'
|
||||
]
|
||||
|
||||
if config_h.has('HAVE_FORK')
|
||||
examples += 'ecore_pipe_simple_example'
|
||||
endif
|
||||
|
||||
gnutls = dependency('gnutls', required : false)
|
||||
if gnutls.found()
|
||||
examples += ['ecore_fd_handler_gnutls_example']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define EFL_CXXPERIMENTAL // for background part
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` box_cxx_example_02.cc -o box_cxx_example_02
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
#include <iostream>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define EFL_CXXPERIMENTAL
|
||||
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using namespace std::placeholders;
|
||||
using efl::eo::add;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
#warning This example can not be implemented with EO APIs... FIXME
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
#warning This example can not be implemented with EO APIs... FIXME
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
||||
|
|
|
@ -56,10 +56,10 @@ elm_main(int argc, char **argv)
|
|||
// TEST#1 : Create Grid
|
||||
gd->grid = grid = EoGenerate(EFL_UI_GRID_CLASS, box, (horiz ? EFL_UI_DIR_HORIZONTAL : EFL_UI_DIR_VERTICAL));
|
||||
efl_ui_grid_item_size_set(grid, EINA_SIZE2D(100, 120)); // 4X4
|
||||
efl_pack_padding_set(grid, 5.0, 5.0, EINA_TRUE);
|
||||
efl_pack_align_set(grid, 0.5, 0.5);
|
||||
efl_gfx_arrangement_content_padding_set(grid, 5.0, 5.0, EINA_TRUE);
|
||||
efl_gfx_arrangement_content_align_set(grid, 0.5, 0.5);
|
||||
efl_pack_end(box, grid);
|
||||
|
||||
|
||||
// TEST#2 : Set Item Default Size
|
||||
|
||||
Efl_Ui_Grid_Item *target = NULL;
|
||||
|
|
|
@ -87,10 +87,10 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
);
|
||||
|
||||
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
|
||||
efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
|
||||
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
|
||||
, efl_ui_list_view_layout_factory_set(efl_added, factory)
|
||||
|
|
|
@ -33,8 +33,8 @@ 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_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
|
||||
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);
|
||||
efl_ui_list_view_layout_factory_set(li, factory);
|
||||
|
|
|
@ -223,7 +223,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_property_bind(factory, "efl.text", "filename");
|
||||
efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
|
||||
efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
|
||||
|
||||
priv->list1 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model));
|
||||
efl_event_callback_add(priv->list1, EFL_UI_LIST_VIEW_EVENT_ITEM_REALIZED, _realized_1_cb, priv);
|
||||
|
@ -235,7 +235,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
|||
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
|
||||
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");
|
||||
efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
|
||||
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);
|
||||
evas_object_size_hint_weight_set(priv->list2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
* gcc -g filter_example.c -o filter_example `pkg-config --cflags --libs elementary`
|
||||
*/
|
||||
#define EFL_BETA_API_SUPPORT 1
|
||||
#include <Elementary.h>
|
||||
|
||||
typedef struct _Filter
|
||||
{
|
||||
const char *name;
|
||||
const char *code;
|
||||
} Filter;
|
||||
|
||||
static Filter filters[] = {
|
||||
{ "no", NULL },
|
||||
{ "blend",
|
||||
"blend { color = '#fff8' }" },
|
||||
{ "blur",
|
||||
"blur { 15 }" },
|
||||
{ "grow",
|
||||
"a = buffer { 'rgba' }\n"
|
||||
"blend { dst = a }\n"
|
||||
"grow { 6, src = a }" },
|
||||
{ "curve",
|
||||
"a = buffer ('alpha')\n"
|
||||
"blur ({ 4, dst = a })\n"
|
||||
"p = {}\n"
|
||||
"p[0] = 0\n"
|
||||
"p[20] = 0\n"
|
||||
"p[60] = 255\n"
|
||||
"p[160] = 255\n"
|
||||
"p[200] = 0\n"
|
||||
"p[255] = 0\n"
|
||||
"curve ({ points = p, src = a, dst = a })\n"
|
||||
"blend ({ src = a, color = 'white' })\n" },
|
||||
{ "fill",
|
||||
"fill { color = 'darkblue' }" },
|
||||
{ "mask",
|
||||
"a = buffer ('alpha')\n"
|
||||
"blur ({ 6, dst = a })\n"
|
||||
"p = {}\n"
|
||||
"p[0] = 255\n"
|
||||
"p[128] = 255\n"
|
||||
"p[255] = 0\n"
|
||||
"curve ({ points = p, src = a, dst = a })\n"
|
||||
"blend ({ color = 'black' })\n"
|
||||
"mask ({ mask = a, color = 'cyan' })" },
|
||||
{ "bump",
|
||||
"a = buffer { 'alpha' }\n"
|
||||
"grow { 5, dst = a }\n"
|
||||
"blur { 6, src = a , dst = a }\n"
|
||||
"bump { map = a, color = '#f60', specular = 1, compensate = true }" },
|
||||
{ "trans",
|
||||
"t = buffer ('alpha')\n"
|
||||
"transform ({ oy = 20, dst = t })\n"
|
||||
"blend ({ src = t, color = '#fff8' })\n"
|
||||
"blend ({ color = 'white' })" },
|
||||
};
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
||||
{
|
||||
Filter *f;
|
||||
unsigned int i;
|
||||
char buf[PATH_MAX];
|
||||
Eo *win, *scroller, *hbox, *box, *text, *img;
|
||||
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
elm_app_info_set(elm_main, "elementary", "images");
|
||||
|
||||
win = elm_win_util_standard_add("Gfx Filter Test", "Gfx Filter Test");
|
||||
elm_win_autodel_set(win, EINA_TRUE);
|
||||
|
||||
scroller = elm_scroller_add(win);
|
||||
evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_win_resize_object_add(win, scroller);
|
||||
evas_object_show(scroller);
|
||||
|
||||
hbox = elm_box_add(win);
|
||||
elm_box_horizontal_set(hbox, EINA_TRUE);
|
||||
evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_object_content_set(scroller, hbox);
|
||||
evas_object_show(hbox);
|
||||
|
||||
box = elm_box_add(win);
|
||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_box_pack_end(hbox, box);
|
||||
evas_object_show(box);
|
||||
|
||||
for (i = 0; i < EINA_C_ARRAY_LENGTH(filters); i++)
|
||||
{
|
||||
f = &filters[i];
|
||||
text = evas_object_text_add(evas_object_evas_get(win));
|
||||
evas_object_size_hint_align_set(text, 0, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_min_set(text, 100, 100);
|
||||
evas_object_text_font_set(text, "Sans:style=Bold", 50);
|
||||
evas_object_text_text_set(text, f->name);
|
||||
elm_box_pack_end(box, text);
|
||||
evas_object_show(text);
|
||||
|
||||
efl_gfx_filter_program_set(text, f->code, f->name);
|
||||
}
|
||||
|
||||
box = elm_box_add(win);
|
||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
elm_box_pack_end(hbox, box);
|
||||
evas_object_show(box);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
|
||||
for (i = 0; i < EINA_C_ARRAY_LENGTH(filters); i++)
|
||||
{
|
||||
f = &filters[i];
|
||||
img = evas_object_image_filled_add(evas_object_evas_get(win));
|
||||
evas_object_size_hint_align_set(img, 0, EVAS_HINT_FILL);
|
||||
evas_object_image_file_set(img, buf, 0);
|
||||
evas_object_size_hint_min_set(img, 100, 100);
|
||||
elm_box_pack_end(box, img);
|
||||
evas_object_show(img);
|
||||
|
||||
efl_gfx_filter_program_set(img, f->code, f->name);
|
||||
}
|
||||
|
||||
evas_object_resize(win, 400, 400);
|
||||
evas_object_show(win);
|
||||
|
||||
elm_run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
ELM_MAIN()
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
EAPI_MAIN int
|
||||
elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
#warning This example can not be implemented with EO APIs... FIXME
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ examples = [
|
|||
'fileselector_example',
|
||||
'fileviewlist',
|
||||
'filemvc',
|
||||
'filter_example',
|
||||
'flip_example_01',
|
||||
'flipselector_example',
|
||||
'frame_example_01',
|
||||
|
@ -121,6 +122,35 @@ examples = [
|
|||
foreach example : examples
|
||||
executable(example, example + '.c', dependencies: [elementary, ecore, eio])
|
||||
endforeach
|
||||
if get_option('bindings').contains('cxx')
|
||||
cxx_examples = [
|
||||
'bg_cxx_example_01',
|
||||
'bg_cxx_example_02',
|
||||
'box_cxx_example_02',
|
||||
'button_cxx_example_00',
|
||||
'button_cxx_example_01',
|
||||
'calendar_cxx_example_01',
|
||||
'calendar_cxx_example_02',
|
||||
'calendar_cxx_example_03',
|
||||
'calendar_cxx_example_04',
|
||||
'calendar_cxx_example_05',
|
||||
'clock_cxx_example',
|
||||
'icon_cxx_example_01',
|
||||
'menu_cxx_example_01',
|
||||
'popup_cxx_example',
|
||||
'radio_cxx_example_01',
|
||||
'slider_cxx_example',
|
||||
'spinner_cxx_example',
|
||||
'table_cxx_example_01',
|
||||
'table_cxx_example_02',
|
||||
'toolbar_cxx_example_01',
|
||||
]
|
||||
|
||||
foreach example : cxx_examples
|
||||
executable(example, example + '.cc', dependencies: [elementary_cxx])
|
||||
endforeach
|
||||
|
||||
endif
|
||||
|
||||
edc_files = [
|
||||
'codegen_example.edc',
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
#define EFL_CXXPERIMENTAL
|
||||
|
||||
#include <Evas.hh>
|
||||
#include <Efl_Ui.h>
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
#include <iostream>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
#include <iostream>
|
||||
|
||||
using efl::eo::instantiate;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define EFL_CXXPERIMENTAL
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#include <Elementary.hh>
|
||||
#include <Efl_Ui.hh>
|
||||
|
||||
using namespace std::placeholders;
|
||||
using efl::eo::instantiate;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue