From d90d23bdd605d3f07958ea22153f3ed056c90b6a Mon Sep 17 00:00:00 2001 From: Savio Sena Date: Sat, 20 Sep 2014 04:43:28 -0300 Subject: [PATCH] Initial listing of remaining tests. --- src/bin/Makefile.am | 211 ++++++++++++-- src/bin/cxx/font_effect_blur_alpha.cc | 59 ++++ src/bin/cxx/font_effect_blur_alpha_capi.h | 30 ++ .../image_blend_many_smooth_same_scaled.cc | 107 +++++++ ...image_blend_many_smooth_same_scaled_capi.h | 30 ++ .../cxx/image_blend_nearest_same_scaled.cc | 106 +++++++ .../image_blend_nearest_same_scaled_capi.h | 30 ++ src/bin/cxx/image_blend_nearest_scaled.cc | 106 +++++++ src/bin/cxx/image_blend_nearest_scaled_capi.h | 30 ++ .../image_blend_nearest_solid_same_scaled.cc | 106 +++++++ ...age_blend_nearest_solid_same_scaled_capi.h | 30 ++ .../cxx/image_blend_nearest_solid_scaled.cc | 106 +++++++ .../image_blend_nearest_solid_scaled_capi.h | 30 ++ src/bin/cxx/image_blend_occlude1.cc | 119 ++++++++ src/bin/cxx/image_blend_occlude1_capi.h | 30 ++ src/bin/cxx/image_blend_occlude1_few.cc | 122 ++++++++ src/bin/cxx/image_blend_occlude1_few_capi.h | 30 ++ src/bin/cxx/image_blend_occlude1_many.cc | 122 ++++++++ src/bin/cxx/image_blend_occlude1_many_capi.h | 30 ++ src/bin/cxx/image_blend_occlude1_very_many.cc | 122 ++++++++ .../cxx/image_blend_occlude1_very_many_capi.h | 30 ++ src/bin/cxx/image_blend_occlude2.cc | 119 ++++++++ src/bin/cxx/image_blend_occlude2_capi.h | 30 ++ src/bin/cxx/image_blend_occlude2_few.cc | 122 ++++++++ src/bin/cxx/image_blend_occlude2_few_capi.h | 30 ++ src/bin/cxx/image_blend_occlude2_many.cc | 122 ++++++++ src/bin/cxx/image_blend_occlude2_many_capi.h | 30 ++ src/bin/cxx/image_blend_occlude2_very_many.cc | 122 ++++++++ .../cxx/image_blend_occlude2_very_many_capi.h | 30 ++ src/bin/cxx/image_blend_occlude3.cc | 119 ++++++++ src/bin/cxx/image_blend_occlude3_capi.h | 30 ++ src/bin/cxx/image_blend_occlude3_few.cc | 122 ++++++++ src/bin/cxx/image_blend_occlude3_few_capi.h | 30 ++ src/bin/cxx/image_blend_occlude3_many.cc | 122 ++++++++ src/bin/cxx/image_blend_occlude3_many_capi.h | 30 ++ src/bin/cxx/image_blend_occlude3_very_many.cc | 122 ++++++++ .../cxx/image_blend_occlude3_very_many_capi.h | 30 ++ src/bin/cxx/image_blend_occlude_capi.h | 30 ++ src/bin/cxx/image_blend_smooth_same_scaled.cc | 106 +++++++ .../cxx/image_blend_smooth_same_scaled_capi.h | 30 ++ src/bin/cxx/image_blend_smooth_scaled.cc | 106 +++++++ src/bin/cxx/image_blend_smooth_scaled_capi.h | 30 ++ .../image_blend_smooth_solid_same_scaled.cc | 106 +++++++ ...mage_blend_smooth_solid_same_scaled_capi.h | 30 ++ .../cxx/image_blend_smooth_solid_scaled.cc | 106 +++++++ .../image_blend_smooth_solid_scaled_capi.h | 30 ++ .../cxx/image_blend_solid_middle_border.cc | 107 +++++++ .../image_blend_solid_middle_border_capi.h | 30 ++ .../cxx/image_blend_solid_middle_unscaled.cc | 104 +++++++ .../image_blend_solid_middle_unscaled_capi.h | 30 ++ src/bin/cxx/image_blend_unscaled.cc | 102 +++++++ src/bin/cxx/image_blend_unscaled_capi.h | 30 ++ src/bin/cxx/image_crossfade.cc | 102 +++++++ src/bin/cxx/image_crossfade_capi.h | 30 ++ src/bin/cxx/image_data_argb.cc | 125 +++++++++ src/bin/cxx/image_data_argb_alpha.cc | 136 +++++++++ src/bin/cxx/image_data_argb_alpha_capi.h | 30 ++ src/bin/cxx/image_data_argb_capi.h | 30 ++ src/bin/cxx/image_data_ycbcr601pl.cc | 143 ++++++++++ src/bin/cxx/image_data_ycbcr601pl_capi.h | 30 ++ ...ata_ycbcr601pl_map_nearest_solid_rotate.cc | 150 ++++++++++ ...ycbcr601pl_map_nearest_solid_rotate_capi.h | 30 ++ .../image_data_ycbcr601pl_map_solid_rotate.cc | 148 ++++++++++ ...ge_data_ycbcr601pl_map_solid_rotate_capi.h | 30 ++ .../cxx/image_data_ycbcr601pl_wide_stride.cc | 180 ++++++++++++ .../image_data_ycbcr601pl_wide_stride_capi.h | 30 ++ src/bin/cxx/image_map_3d_1.cc | 263 ++++++++++++++++++ src/bin/cxx/image_map_3d_1_capi.h | 30 ++ src/bin/cxx/image_map_3d_2.cc | 261 +++++++++++++++++ src/bin/cxx/image_map_3d_2_capi.h | 30 ++ src/bin/cxx/image_map_3d_3.cc | 255 +++++++++++++++++ src/bin/cxx/image_map_3d_3_capi.h | 30 ++ src/bin/cxx/image_map_3d_4.cc | 253 +++++++++++++++++ src/bin/cxx/image_map_3d_4_capi.h | 30 ++ src/bin/cxx/image_map_3d_5.cc | 243 ++++++++++++++++ src/bin/cxx/image_map_3d_5_capi.h | 30 ++ src/bin/cxx/image_map_3d_6.cc | 240 ++++++++++++++++ src/bin/cxx/image_map_3d_6_capi.h | 30 ++ src/bin/cxx/image_map_3d_flow.cc | 234 ++++++++++++++++ src/bin/cxx/image_map_3d_flow_capi.h | 30 ++ .../image_map_color_alpha_nearest_rotate.cc | 119 ++++++++ ...mage_map_color_alpha_nearest_rotate_capi.h | 30 ++ ...ge_map_color_alpha_nearest_solid_rotate.cc | 119 ++++++++ ...ap_color_alpha_nearest_solid_rotate_capi.h | 30 ++ src/bin/cxx/image_map_color_alpha_rotate.cc | 117 ++++++++ .../cxx/image_map_color_alpha_rotate_capi.h | 30 ++ .../cxx/image_map_color_alpha_solid_rotate.cc | 116 ++++++++ .../image_map_color_alpha_solid_rotate_capi.h | 30 ++ src/bin/cxx/image_map_color_nearest_rotate.cc | 119 ++++++++ .../cxx/image_map_color_nearest_rotate_capi.h | 30 ++ .../image_map_color_nearest_solid_rotate.cc | 119 ++++++++ ...mage_map_color_nearest_solid_rotate_capi.h | 30 ++ src/bin/cxx/image_map_color_rotate.cc | 117 ++++++++ src/bin/cxx/image_map_color_rotate_capi.h | 30 ++ src/bin/cxx/image_map_color_solid_rotate.cc | 117 ++++++++ .../cxx/image_map_color_solid_rotate_capi.h | 30 ++ src/bin/cxx/image_map_nearest_rotate.cc | 114 ++++++++ src/bin/cxx/image_map_nearest_rotate_capi.h | 30 ++ src/bin/cxx/image_map_nearest_solid_rotate.cc | 114 ++++++++ .../cxx/image_map_nearest_solid_rotate_capi.h | 30 ++ src/bin/cxx/image_map_rotate.cc | 110 ++++++++ src/bin/cxx/image_map_rotate_capi.h | 30 ++ src/bin/cxx/image_map_solid_rotate.cc | 112 ++++++++ src/bin/cxx/image_map_solid_rotate_capi.h | 30 ++ src/bin/cxx/image_quality_scale.cc | 104 +++++++ src/bin/cxx/image_quality_scale_capi.h | 30 ++ src/bin/cxx/line_blend.cc | 143 ++++++++++ src/bin/cxx/line_blend_capi.h | 30 ++ src/bin/cxx/proxy_image.cc | 113 ++++++++ src/bin/cxx/proxy_image_capi.h | 30 ++ src/bin/cxx/proxy_image_offscreen.cc | 114 ++++++++ src/bin/cxx/proxy_image_offscreen_capi.h | 30 ++ src/bin/cxx/proxy_text_fixed.cc | 127 +++++++++ src/bin/cxx/proxy_text_fixed_capi.h | 30 ++ src/bin/cxx/proxy_text_random.cc | 147 ++++++++++ src/bin/cxx/proxy_text_random_capi.h | 30 ++ src/bin/cxx/rect_blend.cc | 111 ++++++++ src/bin/cxx/rect_blend_capi.h | 30 ++ src/bin/cxx/rect_blend_few.cc | 112 ++++++++ src/bin/cxx/rect_blend_few_capi.h | 30 ++ src/bin/cxx/rect_blend_pow2.cc | 112 ++++++++ src/bin/cxx/rect_blend_pow2_capi.h | 30 ++ src/bin/cxx/rect_blend_pow2_few.cc | 113 ++++++++ src/bin/cxx/rect_blend_pow2_few_capi.h | 30 ++ src/bin/cxx/rect_solid.cc | 111 ++++++++ src/bin/cxx/rect_solid_capi.h | 30 ++ src/bin/cxx/rect_solid_few.cc | 112 ++++++++ src/bin/cxx/rect_solid_few_capi.h | 30 ++ src/bin/cxx/tests.h | 105 +++++++ src/bin/cxx/text_basic.cc | 102 +++++++ src/bin/cxx/text_basic_capi.h | 30 ++ src/bin/cxx/text_change.cc | 125 +++++++++ src/bin/cxx/text_change_capi.h | 30 ++ src/bin/cxx/text_styles.cc | 112 ++++++++ src/bin/cxx/text_styles_capi.h | 30 ++ src/bin/cxx/text_styles_different_strings.cc | 123 ++++++++ .../cxx/text_styles_different_strings_capi.h | 30 ++ src/bin/cxx/textblock_auto_align.cc | 126 +++++++++ src/bin/cxx/textblock_auto_align_capi.h | 30 ++ src/bin/cxx/textblock_basic.cc | 189 +++++++++++++ src/bin/cxx/textblock_basic_capi.h | 30 ++ src/bin/cxx/textblock_intl.cc | 159 +++++++++++ src/bin/cxx/textblock_intl_capi.h | 30 ++ src/bin/cxx/textblock_text_append.cc | 175 ++++++++++++ src/bin/cxx/textblock_text_append_capi.h | 30 ++ src/bin/cxx/widgets__*_capi.h | 30 ++ src/bin/cxx/widgets_file_icons.cc | 142 ++++++++++ src/bin/cxx/widgets_file_icons_2.cc | 140 ++++++++++ src/bin/cxx/widgets_file_icons_2_capi.h | 31 +++ src/bin/cxx/widgets_file_icons_2_grouped.cc | 149 ++++++++++ .../cxx/widgets_file_icons_2_grouped_capi.h | 31 +++ src/bin/cxx/widgets_file_icons_2_same.cc | 125 +++++++++ src/bin/cxx/widgets_file_icons_2_same_capi.h | 31 +++ .../cxx/widgets_file_icons_2_same_grouped.cc | 129 +++++++++ .../widgets_file_icons_2_same_grouped_capi.h | 31 +++ src/bin/cxx/widgets_file_icons_3.cc | 140 ++++++++++ src/bin/cxx/widgets_file_icons_3_capi.h | 31 +++ src/bin/cxx/widgets_file_icons_4.cc | 140 ++++++++++ src/bin/cxx/widgets_file_icons_4_capi.h | 31 +++ src/bin/cxx/widgets_file_icons_capi.h | 31 +++ src/bin/cxx/widgets_list_1.cc | 152 ++++++++++ src/bin/cxx/widgets_list_1_capi.h | 31 +++ src/bin/cxx/widgets_list_1_grouped.cc | 160 +++++++++++ src/bin/cxx/widgets_list_1_grouped_capi.h | 31 +++ src/bin/cxx/widgets_list_2.cc | 152 ++++++++++ src/bin/cxx/widgets_list_2_capi.h | 31 +++ src/bin/cxx/widgets_list_2_grouped.cc | 160 +++++++++++ src/bin/cxx/widgets_list_2_grouped_capi.h | 31 +++ src/bin/cxx/widgets_list_3.cc | 183 ++++++++++++ src/bin/cxx/widgets_list_3_capi.h | 31 +++ src/bin/cxx/widgets_list_3_grouped.cc | 200 +++++++++++++ src/bin/cxx/widgets_list_3_grouped_capi.h | 31 +++ src/bin/cxx/widgets_list_4.cc | 180 ++++++++++++ src/bin/cxx/widgets_list_4_capi.h | 31 +++ src/bin/cxx/widgets_list_4_grouped.cc | 199 +++++++++++++ src/bin/cxx/widgets_list_4_grouped_capi.h | 31 +++ src/bin/tests.h | 19 +- 177 files changed, 14748 insertions(+), 31 deletions(-) create mode 100644 src/bin/cxx/font_effect_blur_alpha.cc create mode 100644 src/bin/cxx/font_effect_blur_alpha_capi.h create mode 100644 src/bin/cxx/image_blend_many_smooth_same_scaled.cc create mode 100644 src/bin/cxx/image_blend_many_smooth_same_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_nearest_same_scaled.cc create mode 100644 src/bin/cxx/image_blend_nearest_same_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_nearest_scaled.cc create mode 100644 src/bin/cxx/image_blend_nearest_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_nearest_solid_same_scaled.cc create mode 100644 src/bin/cxx/image_blend_nearest_solid_same_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_nearest_solid_scaled.cc create mode 100644 src/bin/cxx/image_blend_nearest_solid_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_occlude1.cc create mode 100644 src/bin/cxx/image_blend_occlude1_capi.h create mode 100644 src/bin/cxx/image_blend_occlude1_few.cc create mode 100644 src/bin/cxx/image_blend_occlude1_few_capi.h create mode 100644 src/bin/cxx/image_blend_occlude1_many.cc create mode 100644 src/bin/cxx/image_blend_occlude1_many_capi.h create mode 100644 src/bin/cxx/image_blend_occlude1_very_many.cc create mode 100644 src/bin/cxx/image_blend_occlude1_very_many_capi.h create mode 100644 src/bin/cxx/image_blend_occlude2.cc create mode 100644 src/bin/cxx/image_blend_occlude2_capi.h create mode 100644 src/bin/cxx/image_blend_occlude2_few.cc create mode 100644 src/bin/cxx/image_blend_occlude2_few_capi.h create mode 100644 src/bin/cxx/image_blend_occlude2_many.cc create mode 100644 src/bin/cxx/image_blend_occlude2_many_capi.h create mode 100644 src/bin/cxx/image_blend_occlude2_very_many.cc create mode 100644 src/bin/cxx/image_blend_occlude2_very_many_capi.h create mode 100644 src/bin/cxx/image_blend_occlude3.cc create mode 100644 src/bin/cxx/image_blend_occlude3_capi.h create mode 100644 src/bin/cxx/image_blend_occlude3_few.cc create mode 100644 src/bin/cxx/image_blend_occlude3_few_capi.h create mode 100644 src/bin/cxx/image_blend_occlude3_many.cc create mode 100644 src/bin/cxx/image_blend_occlude3_many_capi.h create mode 100644 src/bin/cxx/image_blend_occlude3_very_many.cc create mode 100644 src/bin/cxx/image_blend_occlude3_very_many_capi.h create mode 100644 src/bin/cxx/image_blend_occlude_capi.h create mode 100644 src/bin/cxx/image_blend_smooth_same_scaled.cc create mode 100644 src/bin/cxx/image_blend_smooth_same_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_smooth_scaled.cc create mode 100644 src/bin/cxx/image_blend_smooth_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_smooth_solid_same_scaled.cc create mode 100644 src/bin/cxx/image_blend_smooth_solid_same_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_smooth_solid_scaled.cc create mode 100644 src/bin/cxx/image_blend_smooth_solid_scaled_capi.h create mode 100644 src/bin/cxx/image_blend_solid_middle_border.cc create mode 100644 src/bin/cxx/image_blend_solid_middle_border_capi.h create mode 100644 src/bin/cxx/image_blend_solid_middle_unscaled.cc create mode 100644 src/bin/cxx/image_blend_solid_middle_unscaled_capi.h create mode 100644 src/bin/cxx/image_blend_unscaled.cc create mode 100644 src/bin/cxx/image_blend_unscaled_capi.h create mode 100644 src/bin/cxx/image_crossfade.cc create mode 100644 src/bin/cxx/image_crossfade_capi.h create mode 100644 src/bin/cxx/image_data_argb.cc create mode 100644 src/bin/cxx/image_data_argb_alpha.cc create mode 100644 src/bin/cxx/image_data_argb_alpha_capi.h create mode 100644 src/bin/cxx/image_data_argb_capi.h create mode 100644 src/bin/cxx/image_data_ycbcr601pl.cc create mode 100644 src/bin/cxx/image_data_ycbcr601pl_capi.h create mode 100644 src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc create mode 100644 src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate_capi.h create mode 100644 src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc create mode 100644 src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate_capi.h create mode 100644 src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc create mode 100644 src/bin/cxx/image_data_ycbcr601pl_wide_stride_capi.h create mode 100644 src/bin/cxx/image_map_3d_1.cc create mode 100644 src/bin/cxx/image_map_3d_1_capi.h create mode 100644 src/bin/cxx/image_map_3d_2.cc create mode 100644 src/bin/cxx/image_map_3d_2_capi.h create mode 100644 src/bin/cxx/image_map_3d_3.cc create mode 100644 src/bin/cxx/image_map_3d_3_capi.h create mode 100644 src/bin/cxx/image_map_3d_4.cc create mode 100644 src/bin/cxx/image_map_3d_4_capi.h create mode 100644 src/bin/cxx/image_map_3d_5.cc create mode 100644 src/bin/cxx/image_map_3d_5_capi.h create mode 100644 src/bin/cxx/image_map_3d_6.cc create mode 100644 src/bin/cxx/image_map_3d_6_capi.h create mode 100644 src/bin/cxx/image_map_3d_flow.cc create mode 100644 src/bin/cxx/image_map_3d_flow_capi.h create mode 100644 src/bin/cxx/image_map_color_alpha_nearest_rotate.cc create mode 100644 src/bin/cxx/image_map_color_alpha_nearest_rotate_capi.h create mode 100644 src/bin/cxx/image_map_color_alpha_nearest_solid_rotate.cc create mode 100644 src/bin/cxx/image_map_color_alpha_nearest_solid_rotate_capi.h create mode 100644 src/bin/cxx/image_map_color_alpha_rotate.cc create mode 100644 src/bin/cxx/image_map_color_alpha_rotate_capi.h create mode 100644 src/bin/cxx/image_map_color_alpha_solid_rotate.cc create mode 100644 src/bin/cxx/image_map_color_alpha_solid_rotate_capi.h create mode 100644 src/bin/cxx/image_map_color_nearest_rotate.cc create mode 100644 src/bin/cxx/image_map_color_nearest_rotate_capi.h create mode 100644 src/bin/cxx/image_map_color_nearest_solid_rotate.cc create mode 100644 src/bin/cxx/image_map_color_nearest_solid_rotate_capi.h create mode 100644 src/bin/cxx/image_map_color_rotate.cc create mode 100644 src/bin/cxx/image_map_color_rotate_capi.h create mode 100644 src/bin/cxx/image_map_color_solid_rotate.cc create mode 100644 src/bin/cxx/image_map_color_solid_rotate_capi.h create mode 100644 src/bin/cxx/image_map_nearest_rotate.cc create mode 100644 src/bin/cxx/image_map_nearest_rotate_capi.h create mode 100644 src/bin/cxx/image_map_nearest_solid_rotate.cc create mode 100644 src/bin/cxx/image_map_nearest_solid_rotate_capi.h create mode 100644 src/bin/cxx/image_map_rotate.cc create mode 100644 src/bin/cxx/image_map_rotate_capi.h create mode 100644 src/bin/cxx/image_map_solid_rotate.cc create mode 100644 src/bin/cxx/image_map_solid_rotate_capi.h create mode 100644 src/bin/cxx/image_quality_scale.cc create mode 100644 src/bin/cxx/image_quality_scale_capi.h create mode 100644 src/bin/cxx/line_blend.cc create mode 100644 src/bin/cxx/line_blend_capi.h create mode 100644 src/bin/cxx/proxy_image.cc create mode 100644 src/bin/cxx/proxy_image_capi.h create mode 100644 src/bin/cxx/proxy_image_offscreen.cc create mode 100644 src/bin/cxx/proxy_image_offscreen_capi.h create mode 100644 src/bin/cxx/proxy_text_fixed.cc create mode 100644 src/bin/cxx/proxy_text_fixed_capi.h create mode 100644 src/bin/cxx/proxy_text_random.cc create mode 100644 src/bin/cxx/proxy_text_random_capi.h create mode 100644 src/bin/cxx/rect_blend.cc create mode 100644 src/bin/cxx/rect_blend_capi.h create mode 100644 src/bin/cxx/rect_blend_few.cc create mode 100644 src/bin/cxx/rect_blend_few_capi.h create mode 100644 src/bin/cxx/rect_blend_pow2.cc create mode 100644 src/bin/cxx/rect_blend_pow2_capi.h create mode 100644 src/bin/cxx/rect_blend_pow2_few.cc create mode 100644 src/bin/cxx/rect_blend_pow2_few_capi.h create mode 100644 src/bin/cxx/rect_solid.cc create mode 100644 src/bin/cxx/rect_solid_capi.h create mode 100644 src/bin/cxx/rect_solid_few.cc create mode 100644 src/bin/cxx/rect_solid_few_capi.h create mode 100644 src/bin/cxx/tests.h create mode 100644 src/bin/cxx/text_basic.cc create mode 100644 src/bin/cxx/text_basic_capi.h create mode 100644 src/bin/cxx/text_change.cc create mode 100644 src/bin/cxx/text_change_capi.h create mode 100644 src/bin/cxx/text_styles.cc create mode 100644 src/bin/cxx/text_styles_capi.h create mode 100644 src/bin/cxx/text_styles_different_strings.cc create mode 100644 src/bin/cxx/text_styles_different_strings_capi.h create mode 100644 src/bin/cxx/textblock_auto_align.cc create mode 100644 src/bin/cxx/textblock_auto_align_capi.h create mode 100644 src/bin/cxx/textblock_basic.cc create mode 100644 src/bin/cxx/textblock_basic_capi.h create mode 100644 src/bin/cxx/textblock_intl.cc create mode 100644 src/bin/cxx/textblock_intl_capi.h create mode 100644 src/bin/cxx/textblock_text_append.cc create mode 100644 src/bin/cxx/textblock_text_append_capi.h create mode 100644 src/bin/cxx/widgets__*_capi.h create mode 100644 src/bin/cxx/widgets_file_icons.cc create mode 100644 src/bin/cxx/widgets_file_icons_2.cc create mode 100644 src/bin/cxx/widgets_file_icons_2_capi.h create mode 100644 src/bin/cxx/widgets_file_icons_2_grouped.cc create mode 100644 src/bin/cxx/widgets_file_icons_2_grouped_capi.h create mode 100644 src/bin/cxx/widgets_file_icons_2_same.cc create mode 100644 src/bin/cxx/widgets_file_icons_2_same_capi.h create mode 100644 src/bin/cxx/widgets_file_icons_2_same_grouped.cc create mode 100644 src/bin/cxx/widgets_file_icons_2_same_grouped_capi.h create mode 100644 src/bin/cxx/widgets_file_icons_3.cc create mode 100644 src/bin/cxx/widgets_file_icons_3_capi.h create mode 100644 src/bin/cxx/widgets_file_icons_4.cc create mode 100644 src/bin/cxx/widgets_file_icons_4_capi.h create mode 100644 src/bin/cxx/widgets_file_icons_capi.h create mode 100644 src/bin/cxx/widgets_list_1.cc create mode 100644 src/bin/cxx/widgets_list_1_capi.h create mode 100644 src/bin/cxx/widgets_list_1_grouped.cc create mode 100644 src/bin/cxx/widgets_list_1_grouped_capi.h create mode 100644 src/bin/cxx/widgets_list_2.cc create mode 100644 src/bin/cxx/widgets_list_2_capi.h create mode 100644 src/bin/cxx/widgets_list_2_grouped.cc create mode 100644 src/bin/cxx/widgets_list_2_grouped_capi.h create mode 100644 src/bin/cxx/widgets_list_3.cc create mode 100644 src/bin/cxx/widgets_list_3_capi.h create mode 100644 src/bin/cxx/widgets_list_3_grouped.cc create mode 100644 src/bin/cxx/widgets_list_3_grouped_capi.h create mode 100644 src/bin/cxx/widgets_list_4.cc create mode 100644 src/bin/cxx/widgets_list_4_capi.h create mode 100644 src/bin/cxx/widgets_list_4_grouped.cc create mode 100644 src/bin/cxx/widgets_list_4_grouped_capi.h diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index c7c6ee4..c732326 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -13,6 +13,198 @@ AM_CPPFLAGS = \ bin_PROGRAMS = expedite bin_SCRIPTS = expedite-cmp +cxx_sources = \ +cxx/font_effect_blur_alpha.cc \ +cxx/font_effect_blur_alpha_capi.h \ +cxx/image_blend_border.cc \ +cxx/image_blend_border_capi.h \ +cxx/image_blend_border_recolor.cc \ +cxx/image_blend_border_recolor_capi.h \ +cxx/image_blend_fade_pow2_unscaled.cc \ +cxx/image_blend_fade_pow2_unscaled_capi.h \ +cxx/image_blend_fade_unscaled.cc \ +cxx/image_blend_fade_unscaled_capi.h \ +cxx/image_blend_many_smooth_same_scaled.cc \ +cxx/image_blend_many_smooth_same_scaled_capi.h \ +cxx/image_blend_nearest_same_scaled.cc \ +cxx/image_blend_nearest_same_scaled_capi.h \ +cxx/image_blend_nearest_scaled.cc \ +cxx/image_blend_nearest_scaled_capi.h \ +cxx/image_blend_nearest_solid_same_scaled.cc \ +cxx/image_blend_nearest_solid_same_scaled_capi.h \ +cxx/image_blend_nearest_solid_scaled.cc \ +cxx/image_blend_nearest_solid_scaled_capi.h \ +cxx/image_blend_occlude1.cc \ +cxx/image_blend_occlude1_capi.h \ +cxx/image_blend_occlude1_few.cc \ +cxx/image_blend_occlude1_few_capi.h \ +cxx/image_blend_occlude1_many.cc \ +cxx/image_blend_occlude1_many_capi.h \ +cxx/image_blend_occlude1_very_many.cc \ +cxx/image_blend_occlude1_very_many_capi.h \ +cxx/image_blend_occlude2.cc \ +cxx/image_blend_occlude2_capi.h \ +cxx/image_blend_occlude2_few.cc \ +cxx/image_blend_occlude2_few_capi.h \ +cxx/image_blend_occlude2_many.cc \ +cxx/image_blend_occlude2_many_capi.h \ +cxx/image_blend_occlude2_very_many.cc \ +cxx/image_blend_occlude2_very_many_capi.h \ +cxx/image_blend_occlude3.cc \ +cxx/image_blend_occlude3_capi.h \ +cxx/image_blend_occlude3_few.cc \ +cxx/image_blend_occlude3_few_capi.h \ +cxx/image_blend_occlude3_many.cc \ +cxx/image_blend_occlude3_many_capi.h \ +cxx/image_blend_occlude3_very_many.cc \ +cxx/image_blend_occlude3_very_many_capi.h \ +cxx/image_blend_occlude_capi.h \ +cxx/image_blend_smooth_same_scaled.cc \ +cxx/image_blend_smooth_same_scaled_capi.h \ +cxx/image_blend_smooth_scaled.cc \ +cxx/image_blend_smooth_scaled_capi.h \ +cxx/image_blend_smooth_solid_same_scaled.cc \ +cxx/image_blend_smooth_solid_same_scaled_capi.h \ +cxx/image_blend_smooth_solid_scaled.cc \ +cxx/image_blend_smooth_solid_scaled_capi.h \ +cxx/image_blend_solid_border.cc \ +cxx/image_blend_solid_border_capi.h \ +cxx/image_blend_solid_fade_pow2_unscaled.cc \ +cxx/image_blend_solid_fade_pow2_unscaled_capi.h \ +cxx/image_blend_solid_fade_unscaled.cc \ +cxx/image_blend_solid_fade_unscaled_capi.h \ +cxx/image_blend_solid_middle_border.cc \ +cxx/image_blend_solid_middle_border_capi.h \ +cxx/image_blend_solid_middle_unscaled.cc \ +cxx/image_blend_solid_middle_unscaled_capi.h \ +cxx/image_blend_solid_unscaled.cc \ +cxx/image_blend_solid_unscaled_capi.h \ +cxx/image_blend_unscaled.cc \ +cxx/image_blend_unscaled_capi.h \ +cxx/image_crossfade.cc \ +cxx/image_crossfade_capi.h \ +cxx/image_data_argb.cc \ +cxx/image_data_argb_alpha.cc \ +cxx/image_data_argb_alpha_capi.h \ +cxx/image_data_argb_capi.h \ +cxx/image_data_ycbcr601pl.cc \ +cxx/image_data_ycbcr601pl_capi.h \ +cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc \ +cxx/image_data_ycbcr601pl_map_nearest_solid_rotate_capi.h \ +cxx/image_data_ycbcr601pl_map_solid_rotate.cc \ +cxx/image_data_ycbcr601pl_map_solid_rotate_capi.h \ +cxx/image_data_ycbcr601pl_wide_stride.cc \ +cxx/image_data_ycbcr601pl_wide_stride_capi.h \ +cxx/image_map_3d_1.cc \ +cxx/image_map_3d_1_capi.h \ +cxx/image_map_3d_2.cc \ +cxx/image_map_3d_2_capi.h \ +cxx/image_map_3d_3.cc \ +cxx/image_map_3d_3_capi.h \ +cxx/image_map_3d_4.cc \ +cxx/image_map_3d_4_capi.h \ +cxx/image_map_3d_5.cc \ +cxx/image_map_3d_5_capi.h \ +cxx/image_map_3d_6.cc \ +cxx/image_map_3d_6_capi.h \ +cxx/image_map_3d_flow.cc \ +cxx/image_map_3d_flow_capi.h \ +cxx/image_map_color_alpha_nearest_rotate.cc \ +cxx/image_map_color_alpha_nearest_rotate_capi.h \ +cxx/image_map_color_alpha_nearest_solid_rotate.cc \ +cxx/image_map_color_alpha_nearest_solid_rotate_capi.h \ +cxx/image_map_color_alpha_rotate.cc \ +cxx/image_map_color_alpha_rotate_capi.h \ +cxx/image_map_color_alpha_solid_rotate.cc \ +cxx/image_map_color_alpha_solid_rotate_capi.h \ +cxx/image_map_color_nearest_rotate.cc \ +cxx/image_map_color_nearest_rotate_capi.h \ +cxx/image_map_color_nearest_solid_rotate.cc \ +cxx/image_map_color_nearest_solid_rotate_capi.h \ +cxx/image_map_color_rotate.cc \ +cxx/image_map_color_rotate_capi.h \ +cxx/image_map_color_solid_rotate.cc \ +cxx/image_map_color_solid_rotate_capi.h \ +cxx/image_map_nearest_rotate.cc \ +cxx/image_map_nearest_rotate_capi.h \ +cxx/image_map_nearest_solid_rotate.cc \ +cxx/image_map_nearest_solid_rotate_capi.h \ +cxx/image_map_rotate.cc \ +cxx/image_map_rotate_capi.h \ +cxx/image_map_solid_rotate.cc \ +cxx/image_map_solid_rotate_capi.h \ +cxx/image_quality_scale.cc \ +cxx/image_quality_scale_capi.h \ +cxx/line_blend.cc \ +cxx/line_blend_capi.h \ +cxx/proxy_image.cc \ +cxx/proxy_image_capi.h \ +cxx/proxy_image_offscreen.cc \ +cxx/proxy_image_offscreen_capi.h \ +cxx/proxy_text_fixed.cc \ +cxx/proxy_text_fixed_capi.h \ +cxx/proxy_text_random.cc \ +cxx/proxy_text_random_capi.h \ +cxx/rect_blend.cc \ +cxx/rect_blend_capi.h \ +cxx/rect_blend_few.cc \ +cxx/rect_blend_few_capi.h \ +cxx/rect_blend_pow2.cc \ +cxx/rect_blend_pow2_capi.h \ +cxx/rect_blend_pow2_few.cc \ +cxx/rect_blend_pow2_few_capi.h \ +cxx/rect_solid.cc \ +cxx/rect_solid_capi.h \ +cxx/rect_solid_few.cc \ +cxx/rect_solid_few_capi.h \ +cxx/text_basic.cc \ +cxx/text_basic_capi.h \ +cxx/text_change.cc \ +cxx/text_change_capi.h \ +cxx/text_styles.cc \ +cxx/text_styles_capi.h \ +cxx/text_styles_different_strings.cc \ +cxx/text_styles_different_strings_capi.h \ +cxx/textblock_auto_align.cc \ +cxx/textblock_auto_align_capi.h \ +cxx/textblock_basic.cc \ +cxx/textblock_basic_capi.h \ +cxx/textblock_intl.cc \ +cxx/textblock_intl_capi.h \ +cxx/textblock_text_append.cc \ +cxx/textblock_text_append_capi.h \ +cxx/widgets__*_capi.h \ +cxx/widgets_file_icons.cc \ +cxx/widgets_file_icons_2.cc \ +cxx/widgets_file_icons_2_capi.h \ +cxx/widgets_file_icons_2_grouped.cc \ +cxx/widgets_file_icons_2_grouped_capi.h \ +cxx/widgets_file_icons_2_same.cc \ +cxx/widgets_file_icons_2_same_capi.h \ +cxx/widgets_file_icons_2_same_grouped.cc \ +cxx/widgets_file_icons_2_same_grouped_capi.h \ +cxx/widgets_file_icons_3.cc \ +cxx/widgets_file_icons_3_capi.h \ +cxx/widgets_file_icons_4.cc \ +cxx/widgets_file_icons_4_capi.h \ +cxx/widgets_file_icons_capi.h \ +cxx/widgets_list_1.cc \ +cxx/widgets_list_1_capi.h \ +cxx/widgets_list_1_grouped.cc \ +cxx/widgets_list_1_grouped_capi.h \ +cxx/widgets_list_2.cc \ +cxx/widgets_list_2_capi.h \ +cxx/widgets_list_2_grouped.cc \ +cxx/widgets_list_2_grouped_capi.h \ +cxx/widgets_list_3.cc \ +cxx/widgets_list_3_capi.h \ +cxx/widgets_list_3_grouped.cc \ +cxx/widgets_list_3_grouped_capi.h \ +cxx/widgets_list_4.cc \ +cxx/widgets_list_4_capi.h \ +cxx/widgets_list_4_grouped.cc \ +cxx/widgets_list_4_grouped_capi.h + expedite_SOURCES = \ main.c main.h \ ui.c ui.h \ @@ -36,20 +228,10 @@ widgets_list_4_grouped.c \ image_blend_unscaled.c \ image_blend_solid_middle_unscaled.c \ image_blend_fade_unscaled.c \ -cxx/image_blend_fade_unscaled.cc \ -cxx/image_blend_fade_unscaled_capi.h \ image_blend_fade_pow2_unscaled.c \ -cxx/image_blend_fade_pow2_unscaled.cc \ -cxx/image_blend_fade_pow2_unscaled_capi.h \ image_blend_solid_unscaled.c \ -cxx/image_blend_solid_unscaled.cc \ -cxx/image_blend_solid_unscaled_capi.h \ image_blend_solid_fade_unscaled.c \ -cxx/image_blend_solid_fade_unscaled.cc \ -cxx/image_blend_solid_fade_unscaled_capi.h \ image_blend_solid_fade_pow2_unscaled.c \ -cxx/image_blend_solid_fade_pow2_unscaled.cc \ -cxx/image_blend_solid_fade_pow2_unscaled_capi.h \ image_blend_nearest_scaled.c \ image_blend_nearest_solid_scaled.c \ image_blend_smooth_scaled.c \ @@ -59,15 +241,9 @@ image_blend_nearest_solid_same_scaled.c \ image_blend_smooth_same_scaled.c \ image_blend_smooth_solid_same_scaled.c \ image_blend_border.c \ -cxx/image_blend_border.cc \ -cxx/image_blend_border_capi.h \ image_blend_border_recolor.c \ -cxx/image_blend_border_recolor.cc \ -cxx/image_blend_border_recolor_capi.h \ image_blend_solid_middle_border.c \ image_blend_solid_border.c \ -cxx/image_blend_solid_border.cc \ -cxx/image_blend_solid_border_acpi.h \ image_map_rotate.c \ image_map_solid_rotate.c \ image_map_nearest_rotate.c \ @@ -128,7 +304,8 @@ proxy_text_random.c \ line_blend.c \ image_blend_many_smooth_same_scaled.c \ font_effect_blur_alpha.c \ -font_effect_blur_color.c +font_effect_blur_color.c \ +${cxx_sources} # \ # image_mask.c \ # image_mask_2.c \ diff --git a/src/bin/cxx/font_effect_blur_alpha.cc b/src/bin/cxx/font_effect_blur_alpha.cc new file mode 100644 index 0000000..0f3cd79 --- /dev/null +++ b/src/bin/cxx/font_effect_blur_alpha.cc @@ -0,0 +1,59 @@ +# include "main.h" + +#include "ui.h" + + +/* standard var */ +static int done = 0; +extern int win_w, win_h; +/* private data */ +static Evas_Object *text; +static const int MAX_BLUR = 100; + +/* setup */ +static void _setup(void) +{ + + Evas_Object *o; + int w,h; + + o = evas_object_text_add(G_evas); + evas_object_color_set(o, 0, 0, 0, 255); + evas_object_text_font_set(o, "Vera-Bold", 80); + evas_object_text_text_set(o, "Font Effect"); + evas_object_show(o); + evas_object_geometry_get(o, NULL, NULL, &w, &h); + evas_object_move(o, (win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) - MAX_BLUR); + text = o; + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + evas_object_del(text); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + char buf[256]; + char *str = "padding_set(%d);blur(%d,color=black);"; + sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1)); + eo_do(text, evas_obj_text_filter_program_set(buf)); + + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} diff --git a/src/bin/cxx/font_effect_blur_alpha_capi.h b/src/bin/cxx/font_effect_blur_alpha_capi.h new file mode 100644 index 0000000..0dc4ece --- /dev/null +++ b/src/bin/cxx/font_effect_blur_alpha_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME font_effect_blur_alpha_cxx_start +#define NAME "Font Effect Blur (Alpha)" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_many_smooth_same_scaled.cc b/src/bin/cxx/image_blend_many_smooth_same_scaled.cc new file mode 100644 index 0000000..2695b8f --- /dev/null +++ b/src/bin/cxx/image_blend_many_smooth_same_scaled.cc @@ -0,0 +1,107 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_many_smooth_down_scaled_start +#define NAME "Image Blend Many Smooth Down Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#define MANYNUM 8192 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[MANYNUM]; + +/* setup */ +static void _setup(void) +{ + int i, w, h, n; + Evas_Object *o; + for (i = 0; i < MANYNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + n = rnd() % 100; + w = 3 + ((n * (60 - 3)) / 100); + h = 4 + ((n * (80 - 4)) / 100); + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + efl_image_smooth_scale_set(1), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < MANYNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < MANYNUM; i++) + { + eo_do(o_images[i], evas_obj_size_get(&w, &h)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (win_w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (win_h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_many_smooth_same_scaled_capi.h b/src/bin/cxx/image_blend_many_smooth_same_scaled_capi.h new file mode 100644 index 0000000..0fce8c7 --- /dev/null +++ b/src/bin/cxx/image_blend_many_smooth_same_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_many_smooth_same_scaled_cxx_start +#define NAME "Image Blend Many Smooth Down Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_nearest_same_scaled.cc b/src/bin/cxx/image_blend_nearest_same_scaled.cc new file mode 100644 index 0000000..2845b0e --- /dev/null +++ b/src/bin/cxx/image_blend_nearest_same_scaled.cc @@ -0,0 +1,106 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_nearest_same_scaled_start +#define NAME "Image Blend Nearest Same Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 40 + ((i % 3) * (w0 / 2)); + h = 40 + ((i % 3) * (h0 / 2)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_nearest_same_scaled_capi.h b/src/bin/cxx/image_blend_nearest_same_scaled_capi.h new file mode 100644 index 0000000..81ea14f --- /dev/null +++ b/src/bin/cxx/image_blend_nearest_same_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_nearest_same_scaled_cxx_start +#define NAME "Image Blend Nearest Same Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_nearest_scaled.cc b/src/bin/cxx/image_blend_nearest_scaled.cc new file mode 100644 index 0000000..9255a84 --- /dev/null +++ b/src/bin/cxx/image_blend_nearest_scaled.cc @@ -0,0 +1,106 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_nearest_scaled_start +#define NAME "Image Blend Nearest Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_nearest_scaled_capi.h b/src/bin/cxx/image_blend_nearest_scaled_capi.h new file mode 100644 index 0000000..063b30d --- /dev/null +++ b/src/bin/cxx/image_blend_nearest_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_nearest_scaled_cxx_start +#define NAME "Image Blend Nearest Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc b/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc new file mode 100644 index 0000000..7b31fbc --- /dev/null +++ b/src/bin/cxx/image_blend_nearest_solid_same_scaled.cc @@ -0,0 +1,106 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_nearest_solid_same_scaled_start +#define NAME "Image Blend Nearest Solid Same Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 40 + ((i % 3) * (w0 / 2)); + h = 40 + ((i % 3) * (h0 / 2)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_nearest_solid_same_scaled_capi.h b/src/bin/cxx/image_blend_nearest_solid_same_scaled_capi.h new file mode 100644 index 0000000..d3c5264 --- /dev/null +++ b/src/bin/cxx/image_blend_nearest_solid_same_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_nearest_solid_same_scaled_cxx_start +#define NAME "Image Blend Nearest Solid Same Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_nearest_solid_scaled.cc b/src/bin/cxx/image_blend_nearest_solid_scaled.cc new file mode 100644 index 0000000..a990f84 --- /dev/null +++ b/src/bin/cxx/image_blend_nearest_solid_scaled.cc @@ -0,0 +1,106 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_nearest_solid_scaled_start +#define NAME "Image Blend Nearest Solid Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_nearest_solid_scaled_capi.h b/src/bin/cxx/image_blend_nearest_solid_scaled_capi.h new file mode 100644 index 0000000..d2c244b --- /dev/null +++ b/src/bin/cxx/image_blend_nearest_solid_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_nearest_solid_scaled_cxx_start +#define NAME "Image Blend Nearest Solid Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude1.cc b/src/bin/cxx/image_blend_occlude1.cc new file mode 100644 index 0000000..6830ee4 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude1.cc @@ -0,0 +1,119 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude1_start +#define NAME "Image Blend Occlude 1" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i < (OBNUM / 2)) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i < (OBNUM / 2)) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude1_capi.h b/src/bin/cxx/image_blend_occlude1_capi.h new file mode 100644 index 0000000..13f5726 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude1_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude1_cxx_start +#define NAME "Image Blend Occlude 1" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude1_few.cc b/src/bin/cxx/image_blend_occlude1_few.cc new file mode 100644 index 0000000..0519669 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude1_few.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude1_few_start +#define NAME "Image Blend Occlude 1 Few" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 32 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i < (OBNUM / 2)) + { + eo_do(o, efl_file_set(PACKAGE_DATA_DIR"/data/logo.png", NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(PACKAGE_DATA_DIR"/data/image.png", NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i < (OBNUM / 2)) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude1_few_capi.h b/src/bin/cxx/image_blend_occlude1_few_capi.h new file mode 100644 index 0000000..853f7a1 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude1_few_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude1_few_cxx_start +#define NAME "Image Blend Occlude 1 Few" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude1_many.cc b/src/bin/cxx/image_blend_occlude1_many.cc new file mode 100644 index 0000000..669e9eb --- /dev/null +++ b/src/bin/cxx/image_blend_occlude1_many.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude1_many_start +#define NAME "Image Blend Occlude 1 Many" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 320 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i < (OBNUM / 2)) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i < (OBNUM / 2)) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude1_many_capi.h b/src/bin/cxx/image_blend_occlude1_many_capi.h new file mode 100644 index 0000000..95b4416 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude1_many_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude1_many_cxx_start +#define NAME "Image Blend Occlude 1 Many" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude1_very_many.cc b/src/bin/cxx/image_blend_occlude1_very_many.cc new file mode 100644 index 0000000..7c0a55a --- /dev/null +++ b/src/bin/cxx/image_blend_occlude1_very_many.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude1_very_many_start +#define NAME "Image Blend Occlude 1 Very Many" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 1600 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i < (OBNUM / 2)) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i < (OBNUM / 2)) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude1_very_many_capi.h b/src/bin/cxx/image_blend_occlude1_very_many_capi.h new file mode 100644 index 0000000..b642bba --- /dev/null +++ b/src/bin/cxx/image_blend_occlude1_very_many_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude1_very_many_cxx_start +#define NAME "Image Blend Occlude 1 Very Many" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude2.cc b/src/bin/cxx/image_blend_occlude2.cc new file mode 100644 index 0000000..1686422 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude2.cc @@ -0,0 +1,119 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude2_start +#define NAME "Image Blend Occlude 2" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i & 0x1) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i & 0x1) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude2_capi.h b/src/bin/cxx/image_blend_occlude2_capi.h new file mode 100644 index 0000000..ea09270 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude2_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude2_cxx_start +#define NAME "Image Blend Occlude 2" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude2_few.cc b/src/bin/cxx/image_blend_occlude2_few.cc new file mode 100644 index 0000000..15ea683 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude2_few.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude2_few_start +#define NAME "Image Blend Occlude 2 Few" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 32 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i & 0x1) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i & 0x1) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude2_few_capi.h b/src/bin/cxx/image_blend_occlude2_few_capi.h new file mode 100644 index 0000000..9562620 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude2_few_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude2_few_cxx_start +#define NAME "Image Blend Occlude 2 Few" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude2_many.cc b/src/bin/cxx/image_blend_occlude2_many.cc new file mode 100644 index 0000000..715580f --- /dev/null +++ b/src/bin/cxx/image_blend_occlude2_many.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude2_many_start +#define NAME "Image Blend Occlude 2 Many" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 320 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i & 0x1) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i & 0x1) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude2_many_capi.h b/src/bin/cxx/image_blend_occlude2_many_capi.h new file mode 100644 index 0000000..9d33b59 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude2_many_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude2_many_cxx_start +#define NAME "Image Blend Occlude 2 Many" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude2_very_many.cc b/src/bin/cxx/image_blend_occlude2_very_many.cc new file mode 100644 index 0000000..2bab38c --- /dev/null +++ b/src/bin/cxx/image_blend_occlude2_very_many.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude2_very_many_start +#define NAME "Image Blend Occlude 2 Very Many" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 1600 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i & 0x1) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i & 0x1) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude2_very_many_capi.h b/src/bin/cxx/image_blend_occlude2_very_many_capi.h new file mode 100644 index 0000000..c9c0ee9 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude2_very_many_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude2_very_many_cxx_start +#define NAME "Image Blend Occlude 2 Very Many" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude3.cc b/src/bin/cxx/image_blend_occlude3.cc new file mode 100644 index 0000000..8f6cc99 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude3.cc @@ -0,0 +1,119 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude3_start +#define NAME "Image Blend Occlude 3" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i > (OBNUM / 2)) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i > (OBNUM / 2)) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude3_capi.h b/src/bin/cxx/image_blend_occlude3_capi.h new file mode 100644 index 0000000..b5b539e --- /dev/null +++ b/src/bin/cxx/image_blend_occlude3_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude3_cxx_start +#define NAME "Image Blend Occlude 3" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude3_few.cc b/src/bin/cxx/image_blend_occlude3_few.cc new file mode 100644 index 0000000..919369a --- /dev/null +++ b/src/bin/cxx/image_blend_occlude3_few.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude3_few_start +#define NAME "Image Blend Occlude 3 Few" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 32 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i > (OBNUM / 2)) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i > (OBNUM / 2)) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude3_few_capi.h b/src/bin/cxx/image_blend_occlude3_few_capi.h new file mode 100644 index 0000000..5c5d652 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude3_few_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude3_few_cxx_start +#define NAME "Image Blend Occlude 3 Few" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude3_many.cc b/src/bin/cxx/image_blend_occlude3_many.cc new file mode 100644 index 0000000..1cd214f --- /dev/null +++ b/src/bin/cxx/image_blend_occlude3_many.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude3_many_start +#define NAME "Image Blend Occlude 3 Many" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 320 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i > (OBNUM / 2)) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i > (OBNUM / 2)) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude3_many_capi.h b/src/bin/cxx/image_blend_occlude3_many_capi.h new file mode 100644 index 0000000..91be559 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude3_many_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude3_many_cxx_start +#define NAME "Image Blend Occlude 3 Many" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude3_very_many.cc b/src/bin/cxx/image_blend_occlude3_very_many.cc new file mode 100644 index 0000000..5380a1a --- /dev/null +++ b/src/bin/cxx/image_blend_occlude3_very_many.cc @@ -0,0 +1,122 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude3_very_many_start +#define NAME "Image Blend Occlude 3 Very Many" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 1600 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + if (i > (OBNUM / 2)) + { + eo_do(o, efl_file_set(build_path("logo.png"), NULL)); + } + else + { + Evas_Coord x, y; + + x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8); + y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8); + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_position_set(x, y)); + } + eo_do(o, + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + if (i > (OBNUM / 2)) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_occlude3_very_many_capi.h b/src/bin/cxx/image_blend_occlude3_very_many_capi.h new file mode 100644 index 0000000..50c0f97 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude3_very_many_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude3_very_many_cxx_start +#define NAME "Image Blend Occlude 3 Very Many" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_occlude_capi.h b/src/bin/cxx/image_blend_occlude_capi.h new file mode 100644 index 0000000..ff70a52 --- /dev/null +++ b/src/bin/cxx/image_blend_occlude_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_occlude_cxx_start + + + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_smooth_same_scaled.cc b/src/bin/cxx/image_blend_smooth_same_scaled.cc new file mode 100644 index 0000000..c18d2cd --- /dev/null +++ b/src/bin/cxx/image_blend_smooth_same_scaled.cc @@ -0,0 +1,106 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_smooth_same_scaled_start +#define NAME "Image Blend Smooth Same Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + efl_image_smooth_scale_set(1), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 40 + ((i % 3) * (w0 / 2)); + h = 40 + ((i % 3) * (h0 / 2)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_smooth_same_scaled_capi.h b/src/bin/cxx/image_blend_smooth_same_scaled_capi.h new file mode 100644 index 0000000..75ff4ec --- /dev/null +++ b/src/bin/cxx/image_blend_smooth_same_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_smooth_same_scaled_cxx_start +#define NAME "Image Blend Smooth Same Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_smooth_scaled.cc b/src/bin/cxx/image_blend_smooth_scaled.cc new file mode 100644 index 0000000..ab40f80 --- /dev/null +++ b/src/bin/cxx/image_blend_smooth_scaled.cc @@ -0,0 +1,106 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_smooth_scaled_start +#define NAME "Image Blend Smooth Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + efl_image_smooth_scale_set(1), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_smooth_scaled_capi.h b/src/bin/cxx/image_blend_smooth_scaled_capi.h new file mode 100644 index 0000000..6cea94e --- /dev/null +++ b/src/bin/cxx/image_blend_smooth_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_smooth_scaled_cxx_start +#define NAME "Image Blend Smooth Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_smooth_solid_same_scaled.cc b/src/bin/cxx/image_blend_smooth_solid_same_scaled.cc new file mode 100644 index 0000000..529ef89 --- /dev/null +++ b/src/bin/cxx/image_blend_smooth_solid_same_scaled.cc @@ -0,0 +1,106 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_smooth_solid_same_scaled_start +#define NAME "Image Blend Smooth Solid Same Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + efl_image_smooth_scale_set(1), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 40 + ((i % 3) * (w0 / 2)); + h = 40 + ((i % 3) * (h0 / 2)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_smooth_solid_same_scaled_capi.h b/src/bin/cxx/image_blend_smooth_solid_same_scaled_capi.h new file mode 100644 index 0000000..83347a7 --- /dev/null +++ b/src/bin/cxx/image_blend_smooth_solid_same_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_smooth_solid_same_scaled_cxx_start +#define NAME "Image Blend Smooth Solid Same Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_smooth_solid_scaled.cc b/src/bin/cxx/image_blend_smooth_solid_scaled.cc new file mode 100644 index 0000000..af039c3 --- /dev/null +++ b/src/bin/cxx/image_blend_smooth_solid_scaled.cc @@ -0,0 +1,106 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_smooth_solid_scaled_start +#define NAME "Image Blend Smooth Solid Scaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + efl_image_smooth_scale_set(1), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_smooth_solid_scaled_capi.h b/src/bin/cxx/image_blend_smooth_solid_scaled_capi.h new file mode 100644 index 0000000..76a6d11 --- /dev/null +++ b/src/bin/cxx/image_blend_smooth_solid_scaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_smooth_solid_scaled_cxx_start +#define NAME "Image Blend Smooth Solid Scaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_solid_middle_border.cc b/src/bin/cxx/image_blend_solid_middle_border.cc new file mode 100644 index 0000000..350d837 --- /dev/null +++ b/src/bin/cxx/image_blend_solid_middle_border.cc @@ -0,0 +1,107 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_solid_middle_border +#define NAME "Image Blend Solid Middle Border" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("bar.png"), NULL), + evas_obj_image_border_set(6, 6, 6, 6), + evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_solid_middle_border_capi.h b/src/bin/cxx/image_blend_solid_middle_border_capi.h new file mode 100644 index 0000000..a7e549b --- /dev/null +++ b/src/bin/cxx/image_blend_solid_middle_border_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_solid_middle_border_cxx_start +#define NAME "Image Blend Solid Middle Border" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_solid_middle_unscaled.cc b/src/bin/cxx/image_blend_solid_middle_unscaled.cc new file mode 100644 index 0000000..d0cfcb1 --- /dev/null +++ b/src/bin/cxx/image_blend_solid_middle_unscaled.cc @@ -0,0 +1,104 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_solid_middle_unscaled_start +#define NAME "Image Blend Solid Middle Unscaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_image_border_set(43, 48, 48, 83), + evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_SOLID), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_solid_middle_unscaled_capi.h b/src/bin/cxx/image_blend_solid_middle_unscaled_capi.h new file mode 100644 index 0000000..58a5ef5 --- /dev/null +++ b/src/bin/cxx/image_blend_solid_middle_unscaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_solid_middle_unscaled_cxx_start +#define NAME "Image Blend Solid Middle Unscaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_blend_unscaled.cc b/src/bin/cxx/image_blend_unscaled.cc new file mode 100644 index 0000000..fb0f575 --- /dev/null +++ b/src/bin/cxx/image_blend_unscaled.cc @@ -0,0 +1,102 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_unscaled_start +#define NAME "Image Blend Unscaled" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_blend_unscaled_capi.h b/src/bin/cxx/image_blend_unscaled_capi.h new file mode 100644 index 0000000..836d930 --- /dev/null +++ b/src/bin/cxx/image_blend_unscaled_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_unscaled_cxx_start +#define NAME "Image Blend Unscaled" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_crossfade.cc b/src/bin/cxx/image_crossfade.cc new file mode 100644 index 0000000..c26c4c6 --- /dev/null +++ b/src/bin/cxx/image_crossfade.cc @@ -0,0 +1,102 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_crossfade_start +#define NAME "Image Crossfade" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[2]; + +/* setup */ +static void _setup(void) +{ + Evas_Object *o; + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[0] = o; + eo_do(o, + efl_file_set(build_path("im1.png"), NULL), + evas_obj_image_fill_set(0, 0, 720, 420), + evas_obj_size_set(720, 420), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[1] = o; + eo_do(o, + efl_file_set(build_path("im2.png"), NULL), + evas_obj_image_fill_set(0, 0, 720, 420), + evas_obj_size_set(720, 420), + evas_obj_visibility_set(EINA_TRUE)); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < 2; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int a; + + a = f & 0x1f; + a = ((a << 3) | (a >> 2)) & 0xff; + eo_do(o_images[1], evas_obj_color_set(a, a, a, a)); + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_crossfade_capi.h b/src/bin/cxx/image_crossfade_capi.h new file mode 100644 index 0000000..8686ad2 --- /dev/null +++ b/src/bin/cxx/image_crossfade_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_crossfade_cxx_start +#define NAME "Image Crossfade" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_data_argb.cc b/src/bin/cxx/image_data_argb.cc new file mode 100644 index 0000000..f65f48c --- /dev/null +++ b/src/bin/cxx/image_data_argb.cc @@ -0,0 +1,125 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_argb_start +#define NAME "Image Data ARGB" +#define ICON "data.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[1]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < 1; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), + evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888), + evas_obj_image_size_set(640, 480), + evas_obj_image_alpha_set(0), + evas_obj_image_fill_set(0, 0, 640, 480), + evas_obj_size_set(640, 480), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < 1; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i, st; + Evas_Coord x, y, w, h; + for (i = 0; i < 1; i++) + { + unsigned int *data, *p; + + w = 640; + h = 480; + x = (win_w / 2) - (w / 2); + y = (win_h / 2) - (h / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h), + data = evas_obj_image_data_get(1), + st = evas_obj_image_stride_get()); + st = st >> 2; + p = data; + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + *p = ((((x * y) + f) << 8) ^ (x - y - f)) | 0xff000000; + p++; + } + p += (st - w); + } + eo_do(o_images[i], + evas_obj_image_data_set(data), + evas_obj_image_data_update_add( 0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_data_argb_alpha.cc b/src/bin/cxx/image_data_argb_alpha.cc new file mode 100644 index 0000000..22c0ac1 --- /dev/null +++ b/src/bin/cxx/image_data_argb_alpha.cc @@ -0,0 +1,136 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_argb_alpha_start +#define NAME "Image Data ARGB Alpha" +#define ICON "data.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[1]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < 1; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), + evas_obj_image_colorspace_set(EVAS_COLORSPACE_ARGB8888), + evas_obj_image_size_set(640, 480), + evas_obj_image_alpha_set(1), + evas_obj_image_fill_set(0, 0, 640, 480), + evas_obj_size_set(640, 480), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < 1; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i, st; + Evas_Coord x, y, w, h; + for (i = 0; i < 1; i++) + { + unsigned int *data, *p; + int a, r, g, b; + w = 640; + h = 480; + x = (win_w / 2) - (w / 2); + y = (win_h / 2) - (h / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h), + data = evas_obj_image_data_get(1), + st = evas_obj_image_stride_get()); + st = st >> 2; + p = data; + for (y = 0; y < h; y++) + { + for (x = 0; x < w; x++) + { + r = (x * y / 7) + f; + g = (x / 2); + b = (y / 2); + a = (x + y); + r &= 0xff; + g &= 0xff; + b &= 0xff; + a &= 0xff; + r = (a * r) / 255; + g = (a * g) / 255; + b = (a * b) / 255; + *p = (a << 24) | (r << 16) | (g << 8) | b; + p++; + } + p += (st - w); + } + eo_do(o_images[i], + evas_obj_image_data_set(data), + evas_obj_image_data_update_add( 0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_data_argb_alpha_capi.h b/src/bin/cxx/image_data_argb_alpha_capi.h new file mode 100644 index 0000000..feb8ee6 --- /dev/null +++ b/src/bin/cxx/image_data_argb_alpha_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_argb_alpha_cxx_start +#define NAME "Image Data ARGB Alpha" +#define ICON "data.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_data_argb_capi.h b/src/bin/cxx/image_data_argb_capi.h new file mode 100644 index 0000000..b90692e --- /dev/null +++ b/src/bin/cxx/image_data_argb_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_argb_cxx_start +#define NAME "Image Data ARGB" +#define ICON "data.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_data_ycbcr601pl.cc b/src/bin/cxx/image_data_ycbcr601pl.cc new file mode 100644 index 0000000..7bc9548 --- /dev/null +++ b/src/bin/cxx/image_data_ycbcr601pl.cc @@ -0,0 +1,143 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_ycbcr601pl_start +#define NAME "Image Data YCbCr 601 Pointer List" +#define ICON "data.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[1]; +static unsigned char *yp = NULL, *up = NULL, *vp = NULL; + +/* setup */ +static void _setup(void) +{ + int i, y; + FILE *f; + unsigned char **data, **lp; + Evas_Object *o; + for (i = 0; i < 1; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), + evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL), + evas_obj_image_size_set(640, 480), + evas_obj_image_alpha_set(0), + evas_obj_image_fill_set(0, 0, 640, 480), + evas_obj_size_set(640, 480), + evas_obj_visibility_set(EINA_TRUE)); + yp = malloc(640 * 480); + up = malloc(320 * 240); + vp = malloc(320 * 240); + f = fopen(build_path("tp.yuv"), "rb"); + if (f) + { + fread(yp, 640 * 480, 1, f); + fread(up, 320 * 240, 1, f); + fread(vp, 320 * 240, 1, f); + fclose(f); + } + data = evas_object_image_data_get(o_images[i], 1); + lp = data; + for (y = 0; y < 480; y++) + { + *lp = yp + (y * 640); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = up + (y * 320); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = vp + (y * 320); + lp++; + } + eo_do(o_images[i], evas_obj_image_data_set(data)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < 1; i++) eo_del(o_images[i]); + free(yp); + free(up); + free(vp); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < 1; i++) + { + w = 640; + h = 480; + x = (win_w / 2) - (w / 2); + y = (win_h / 2) - (h / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h), + evas_obj_image_data_update_add( 0, 0, 640, 480)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_data_ycbcr601pl_capi.h b/src/bin/cxx/image_data_ycbcr601pl_capi.h new file mode 100644 index 0000000..6f10280 --- /dev/null +++ b/src/bin/cxx/image_data_ycbcr601pl_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_ycbcr601pl_cxx_start +#define NAME "Image Data YCbCr 601 Pointer List" +#define ICON "data.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc b/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc new file mode 100644 index 0000000..c892cd3 --- /dev/null +++ b/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate.cc @@ -0,0 +1,150 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_ycbcr601pl_map_nearest_solid_rotate_start +#define NAME "Image Data YCbCr 601 Pointer List Map Nearest Solid Rotate" +#define ICON "data.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[1]; +static unsigned char *yp = NULL, *up = NULL, *vp = NULL; + +/* setup */ +static void _setup(void) +{ + int i, y; + FILE *f; + unsigned char **data, **lp; + Evas_Object *o; + for (i = 0; i < 1; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), + evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL), + evas_obj_image_size_set(640, 480), + evas_obj_image_alpha_set(0), + evas_obj_image_fill_set(0, 0, 640, 480), + evas_obj_size_set(640, 480), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + yp = malloc(640 * 480); + up = malloc(320 * 240); + vp = malloc(320 * 240); + f = fopen(build_path("tp.yuv"), "rb"); + if (f) + { + fread(yp, 640 * 480, 1, f); + fread(up, 320 * 240, 1, f); + fread(vp, 320 * 240, 1, f); + fclose(f); + } + data = evas_object_image_data_get(o_images[i], 1); + lp = data; + for (y = 0; y < 480; y++) + { + *lp = yp + (y * 640); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = up + (y * 320); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = vp + (y * 320); + lp++; + } + eo_do(o_images[i], evas_obj_image_data_set(data)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < 1; i++) eo_del(o_images[i]); + free(yp); + free(up); + free(vp); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + for (i = 0; i < 1; i++) + { + w = 640; + h = 480; + x = (win_w / 2) - (w / 2); + y = (win_h / 2) - (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate_capi.h b/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate_capi.h new file mode 100644 index 0000000..f71e312 --- /dev/null +++ b/src/bin/cxx/image_data_ycbcr601pl_map_nearest_solid_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_ycbcr601pl_map_nearest_solid_rotate_cxx_start +#define NAME "Image Data YCbCr 601 Pointer List Map Nearest Solid Rotate" +#define ICON "data.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc b/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc new file mode 100644 index 0000000..eeaf785 --- /dev/null +++ b/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate.cc @@ -0,0 +1,148 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_ycbcr601pl_map_solid_rotate_start +#define NAME "Image Data YCbCr 601 Pointer List Map Solid Rotate" +#define ICON "data.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[1]; +static unsigned char *yp = NULL, *up = NULL, *vp = NULL; + +/* setup */ +static void _setup(void) +{ + int i, y; + FILE *f; + unsigned char **data, **lp; + Evas_Object *o; + for (i = 0; i < 1; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), + evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL), + evas_obj_image_size_set(640, 480), + evas_obj_image_alpha_set(0), + evas_obj_image_fill_set(0, 0, 640, 480), + evas_obj_size_set(640, 480), + evas_obj_visibility_set(EINA_TRUE)); + yp = malloc(640 * 480); + up = malloc(320 * 240); + vp = malloc(320 * 240); + f = fopen(build_path("tp.yuv"), "rb"); + if (f) + { + fread(yp, 640 * 480, 1, f); + fread(up, 320 * 240, 1, f); + fread(vp, 320 * 240, 1, f); + fclose(f); + } + data = evas_object_image_data_get(o_images[i], 1); + lp = data; + for (y = 0; y < 480; y++) + { + *lp = yp + (y * 640); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = up + (y * 320); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = vp + (y * 320); + lp++; + } + eo_do(o_images[i], evas_obj_image_data_set(data)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < 1; i++) eo_del(o_images[i]); + free(yp); + free(up); + free(vp); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + for (i = 0; i < 1; i++) + { + w = 640; + h = 480; + x = (win_w / 2) - (w / 2); + y = (win_h / 2) - (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate_capi.h b/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate_capi.h new file mode 100644 index 0000000..07dec15 --- /dev/null +++ b/src/bin/cxx/image_data_ycbcr601pl_map_solid_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_ycbcr601pl_map_solid_rotate_cxx_start +#define NAME "Image Data YCbCr 601 Pointer List Map Solid Rotate" +#define ICON "data.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc b/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc new file mode 100644 index 0000000..71488a2 --- /dev/null +++ b/src/bin/cxx/image_data_ycbcr601pl_wide_stride.cc @@ -0,0 +1,180 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_ycbcr601pl_wide_stride_start +#define NAME "Image Data YCbCr 601 Pointer List Wide Stride" +#define ICON "data.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[1]; +static unsigned char *yp = NULL, *up = NULL, *vp = NULL; + +/* setup */ +static void _setup(void) +{ + int i, y; + FILE *f; + unsigned char **data, **lp; + Evas_Object *o; + for (i = 0; i < 1; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), + evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL), + evas_obj_image_size_set(320, 480), + evas_obj_image_alpha_set(0), + evas_obj_image_fill_set(0, 0, 640, 480), + evas_obj_size_set(640, 480), + evas_obj_visibility_set(EINA_TRUE)); + yp = malloc(640 * 480); + up = malloc(320 * 240); + vp = malloc(320 * 240); + f = fopen(build_path("tp.yuv"), "rb"); + if (f) + { + fread(yp, 640 * 480, 1, f); + fread(up, 320 * 240, 1, f); + fread(vp, 320 * 240, 1, f); + fclose(f); + } + data = evas_object_image_data_get(o_images[i], 1); + if (data) + { + lp = data; + for (y = 0; y < 480; y++) + { + *lp = yp + (y * 640); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = up + (y * 320); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = vp + (y * 320); + lp++; + } + eo_do(o_images[i], + evas_obj_image_data_set(data), + evas_obj_image_data_update_add( 0, 0, 320, 480)); + } + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < 1; i++) eo_del(o_images[i]); + free(yp); + free(up); + free(vp); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < 1; i++) + { + unsigned char **data, **lp; + + w = 640; + h = 480; + x = (win_w / 2) - (w / 2); + y = (win_h / 2) - (h / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + + w = 320 - 16 + f; + if (w < 1) w = 1; + else if (w > 640) w = 640; + + w &= ~0x1; + + eo_do(o_images[i], evas_obj_image_size_set(w, 480)); + data = evas_object_image_data_get(o_images[i], 1); + if (data) + { + lp = data; + for (y = 0; y < 480; y++) + { + *lp = yp + (y * 640); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = up + (y * 320); + lp++; + } + for (y = 0; y < 240; y++) + { + *lp = vp + (y * 320); + lp++; + } + eo_do(o_images[i], + evas_obj_image_data_set(data), + evas_obj_image_data_update_add( 0, 0, w, 480)); + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_data_ycbcr601pl_wide_stride_capi.h b/src/bin/cxx/image_data_ycbcr601pl_wide_stride_capi.h new file mode 100644 index 0000000..5c378be --- /dev/null +++ b/src/bin/cxx/image_data_ycbcr601pl_wide_stride_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_data_ycbcr601pl_wide_stride_cxx_start +#define NAME "Image Data YCbCr 601 Pointer List Wide Stride" +#define ICON "data.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_3d_1.cc b/src/bin/cxx/image_map_3d_1.cc new file mode 100644 index 0000000..c61e43a --- /dev/null +++ b/src/bin/cxx/image_map_3d_1.cc @@ -0,0 +1,263 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_1_start +#define NAME "Image Map 3D 1" +#define ICON "3d.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +typedef struct _Point +{ + Evas_Coord x, y, z, u, v; +} Point; + +typedef struct _Side +{ + Evas_Object *o; + Point pt[4]; +} Side; + +typedef struct _Cube +{ + Side side[6]; +} Cube; + +/* standard var */ +static int done = 0; + +/* private data */ +static Cube *cubes[5]; + +#define POINT(n, p, xx, yy, zz, uu, vv) \ + c->side[n].pt[p].x = xx; \ + c->side[n].pt[p].y = yy; \ + c->side[n].pt[p].z = zz; \ + c->side[n].pt[p].u = uu; \ + c->side[n].pt[p].v = vv + +static Cube * +_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) +{ + Cube *c; + int i; + + w -= (w / 2); + h -= (h / 2); + d -= (d / 2); + c = calloc(1, sizeof(Cube)); + for (i = 0; i < 6; i++) + { + Evas_Object *o; + char buf[256]; + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + c->side[i].o = o; + snprintf(buf, sizeof(buf), "cube%i.png", i + 1); + eo_do(o, + efl_file_set(build_path(buf), NULL), + evas_obj_image_fill_set(0, 0, 256, 256), + evas_obj_size_set(256, 256), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + POINT(0, 0, -w, -h, -d, 0, 0); + POINT(0, 1, w, -h, -d, 256, 0); + POINT(0, 2, w, h, -d, 256, 256); + POINT(0, 3, -w, h, -d, 0, 256); + + POINT(1, 0, w, -h, -d, 0, 0); + POINT(1, 1, w, -h, d, 256, 0); + POINT(1, 2, w, h, d, 256, 256); + POINT(1, 3, w, h, -d, 0, 256); + + POINT(2, 0, w, -h, d, 0, 0); + POINT(2, 1, -w, -h, d, 256, 0); + POINT(2, 2, -w, h, d, 256, 256); + POINT(2, 3, w, h, d, 0, 256); + + POINT(3, 0, -w, -h, d, 0, 0); + POINT(3, 1, -w, -h, -d, 256, 0); + POINT(3, 2, -w, h, -d, 256, 256); + POINT(3, 3, -w, h, d, 0, 256); + + POINT(4, 0, -w, -h, d, 0, 0); + POINT(4, 1, w, -h, d, 256, 0); + POINT(4, 2, w, -h, -d, 256, 256); + POINT(4, 3, -w, -h, -d, 0, 256); + + POINT(5, 0, -w, h, -d, 0, 0); + POINT(5, 1, w, h, -d, 256, 0); + POINT(5, 2, w, h, d, 256, 256); + POINT(5, 3, -w, h, d, 0, 256); + + return c; +} + +static void +_cube_pos(Cube *c, + Evas_Coord x, Evas_Coord y, Evas_Coord z, + double dx, double dy, double dz) +{ + static Evas_Map *m = NULL; + int i, j, order[6], sorted; + Evas_Coord mz[6]; + + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + + for (i = 0; i < 6; i++) + { + Evas_Coord tz[4]; + + for (j = 0; j < 4; j++) + { + evas_map_point_coord_set(m, j, + c->side[i].pt[j].x + x, + c->side[i].pt[j].y + y, + c->side[i].pt[j].z + z); + evas_map_point_image_uv_set(m, j, + c->side[i].pt[j].u, + c->side[i].pt[j].v); + evas_map_point_color_set(m, j, 255, 255, 255, 255); + } + evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); + evas_map_util_3d_lighting(m, -1000, -1000, -1000, + 255, 255, 255, + 20, 20, 20); + evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512); + if (evas_map_util_clockwise_get(m)) + { + eo_do(c->side[i].o, + evas_obj_map_enable_set(1), + evas_obj_map_set(m), + evas_obj_visibility_set(EINA_TRUE)); + } + else + { + eo_do(c->side[i].o, evas_obj_visibility_set(EINA_FALSE)); + } + + order[i] = i; + for (j = 0; j < 4; j++) + evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); + mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; + } + sorted = 0; + do + { + sorted = 1; + for (i = 0; i < 5; i++) + { + if (mz[order[i]] > mz[order[i + 1]]) + { + j = order[i]; + order[i] = order[i + 1]; + order[i + 1] = j; + sorted = 0; + } + } + } + while (!sorted); + + eo_do(c->side[order[0]].o, evas_obj_raise()); + for (i = 1; i < 6; i++) + eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o)); +} + +static void +_cube_free(Cube *c) +{ + int i; + + for (i = 0; i < 6; i++) eo_del(c->side[i].o); + free(c); +} + +/* setup */ +static void _setup(void) +{ + cubes[0] = _cube_new(128, 128, 256); + cubes[1] = _cube_new(256, 128, 128); + cubes[2] = _cube_new(256, 256, 128); + cubes[3] = _cube_new(128, 256, 128); + cubes[4] = _cube_new(256, 256, 256); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + _cube_free(cubes[0]); + _cube_free(cubes[1]); + _cube_free(cubes[2]); + _cube_free(cubes[3]); + _cube_free(cubes[4]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + _cube_pos(cubes[0], + (win_w / 2) - 640, (win_h / 2) - 256, 512, + f / 2.0, f, f / 3.0); + _cube_pos(cubes[1], + (win_w / 2) + 512, (win_h / 2) - 128, 384, + f / 3.0, f / 2.0, f / 4.0); + _cube_pos(cubes[2], + (win_w / 2) - 384, (win_h / 2) + 128, 256, + f / 2.0, f / 3.0, f); + _cube_pos(cubes[3], + (win_w / 2) + 256, (win_h / 2) + 64, 128, + f, f / 5.0, f / 2.0); + _cube_pos(cubes[4], + (win_w / 2), (win_h / 2), 0, + f / 4.0, f / 3.0, f / 5.0); + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_3d_1_capi.h b/src/bin/cxx/image_map_3d_1_capi.h new file mode 100644 index 0000000..f0e396d --- /dev/null +++ b/src/bin/cxx/image_map_3d_1_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_1_cxx_start +#define NAME "Image Map 3D 1" +#define ICON "3d.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_3d_2.cc b/src/bin/cxx/image_map_3d_2.cc new file mode 100644 index 0000000..21351da --- /dev/null +++ b/src/bin/cxx/image_map_3d_2.cc @@ -0,0 +1,261 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_2_start +#define NAME "Image Map 3D 2" +#define ICON "3d.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +typedef struct _Point +{ + Evas_Coord x, y, z, u, v; +} Point; + +typedef struct _Side +{ + Evas_Object *o; + Point pt[4]; +} Side; + +typedef struct _Cube +{ + Side side[6]; +} Cube; + +/* standard var */ +static int done = 0; + +/* private data */ +static Cube *cubes[5]; + +#define POINT(n, p, xx, yy, zz, uu, vv) \ + c->side[n].pt[p].x = xx; \ + c->side[n].pt[p].y = yy; \ + c->side[n].pt[p].z = zz; \ + c->side[n].pt[p].u = uu; \ + c->side[n].pt[p].v = vv + +static Cube * +_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) +{ + Cube *c; + int i; + + w -= (w / 2); + h -= (h / 2); + d -= (d / 2); + c = calloc(1, sizeof(Cube)); + for (i = 0; i < 6; i++) + { + Evas_Object *o; + char buf[256]; + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + c->side[i].o = o; + snprintf(buf, sizeof(buf), "cube%i.png", i + 1); + eo_do(o, + efl_file_set(build_path(buf), NULL), + evas_obj_image_fill_set(0, 0, 256, 256), + evas_obj_size_set(256, 256), + evas_obj_visibility_set(EINA_TRUE)); + } + POINT(0, 0, -w, -h, -d, 0, 0); + POINT(0, 1, w, -h, -d, 256, 0); + POINT(0, 2, w, h, -d, 256, 256); + POINT(0, 3, -w, h, -d, 0, 256); + + POINT(1, 0, w, -h, -d, 0, 0); + POINT(1, 1, w, -h, d, 256, 0); + POINT(1, 2, w, h, d, 256, 256); + POINT(1, 3, w, h, -d, 0, 256); + + POINT(2, 0, w, -h, d, 0, 0); + POINT(2, 1, -w, -h, d, 256, 0); + POINT(2, 2, -w, h, d, 256, 256); + POINT(2, 3, w, h, d, 0, 256); + + POINT(3, 0, -w, -h, d, 0, 0); + POINT(3, 1, -w, -h, -d, 256, 0); + POINT(3, 2, -w, h, -d, 256, 256); + POINT(3, 3, -w, h, d, 0, 256); + + POINT(4, 0, -w, -h, d, 0, 0); + POINT(4, 1, w, -h, d, 256, 0); + POINT(4, 2, w, -h, -d, 256, 256); + POINT(4, 3, -w, -h, -d, 0, 256); + + POINT(5, 0, -w, h, -d, 0, 0); + POINT(5, 1, w, h, -d, 256, 0); + POINT(5, 2, w, h, d, 256, 256); + POINT(5, 3, -w, h, d, 0, 256); + + return c; +} + +static void +_cube_pos(Cube *c, + Evas_Coord x, Evas_Coord y, Evas_Coord z, + double dx, double dy, double dz) +{ + static Evas_Map *m = NULL; + int i, j, order[6], sorted; + Evas_Coord mz[6]; + + if (!m) m = evas_map_new(4); + + for (i = 0; i < 6; i++) + { + Evas_Coord tz[4]; + + for (j = 0; j < 4; j++) + { + evas_map_point_coord_set(m, j, + c->side[i].pt[j].x + x, + c->side[i].pt[j].y + y, + c->side[i].pt[j].z + z); + evas_map_point_image_uv_set(m, j, + c->side[i].pt[j].u, + c->side[i].pt[j].v); + evas_map_point_color_set(m, j, 255, 255, 255, 255); + } + evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); + evas_map_util_3d_lighting(m, -1000, -1000, -1000, + 255, 255, 255, + 20, 20, 20); + evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512); + if (evas_map_util_clockwise_get(m)) + { + eo_do(c->side[i].o, + evas_obj_map_enable_set(1), + evas_obj_map_set(m), + evas_obj_visibility_set(EINA_TRUE)); + } + else + { + eo_do(c->side[i].o, evas_obj_visibility_set(EINA_FALSE)); + } + + order[i] = i; + for (j = 0; j < 4; j++) + evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); + mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; + } + sorted = 0; + do + { + sorted = 1; + for (i = 0; i < 5; i++) + { + if (mz[order[i]] > mz[order[i + 1]]) + { + j = order[i]; + order[i] = order[i + 1]; + order[i + 1] = j; + sorted = 0; + } + } + } + while (!sorted); + + eo_do(c->side[order[0]].o, evas_obj_raise()); + for (i = 1; i < 6; i++) + eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o)); +} + +static void +_cube_free(Cube *c) +{ + int i; + + for (i = 0; i < 6; i++) eo_del(c->side[i].o); + free(c); +} + +/* setup */ +static void _setup(void) +{ + cubes[0] = _cube_new(128, 128, 256); + cubes[1] = _cube_new(256, 128, 128); + cubes[2] = _cube_new(256, 256, 128); + cubes[3] = _cube_new(128, 256, 128); + cubes[4] = _cube_new(256, 256, 256); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + _cube_free(cubes[0]); + _cube_free(cubes[1]); + _cube_free(cubes[2]); + _cube_free(cubes[3]); + _cube_free(cubes[4]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + _cube_pos(cubes[0], + (win_w / 2) - 640, (win_h / 2) - 256, 512, + f / 2.0, f, f / 3.0); + _cube_pos(cubes[1], + (win_w / 2) + 512, (win_h / 2) - 128, 384, + f / 3.0, f / 2.0, f / 4.0); + _cube_pos(cubes[2], + (win_w / 2) - 384, (win_h / 2) + 128, 256, + f / 2.0, f / 3.0, f); + _cube_pos(cubes[3], + (win_w / 2) + 256, (win_h / 2) + 64, 128, + f, f / 5.0, f / 2.0); + _cube_pos(cubes[4], + (win_w / 2), (win_h / 2), 0, + f / 4.0, f / 3.0, f / 5.0); + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_3d_2_capi.h b/src/bin/cxx/image_map_3d_2_capi.h new file mode 100644 index 0000000..bc8c0b2 --- /dev/null +++ b/src/bin/cxx/image_map_3d_2_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_2_cxx_start +#define NAME "Image Map 3D 2" +#define ICON "3d.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_3d_3.cc b/src/bin/cxx/image_map_3d_3.cc new file mode 100644 index 0000000..4a6c2cb --- /dev/null +++ b/src/bin/cxx/image_map_3d_3.cc @@ -0,0 +1,255 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_3_start +#define NAME "Image Map 3D 3" +#define ICON "3d.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +typedef struct _Point +{ + Evas_Coord x, y, z, u, v; +} Point; + +typedef struct _Side +{ + Evas_Object *o; + Point pt[4]; +} Side; + +typedef struct _Cube +{ + Side side[6]; +} Cube; + +/* standard var */ +static int done = 0; + +/* private data */ +static Cube *cubes[5]; + +#define POINT(n, p, xx, yy, zz, uu, vv) \ + c->side[n].pt[p].x = xx; \ + c->side[n].pt[p].y = yy; \ + c->side[n].pt[p].z = zz; \ + c->side[n].pt[p].u = uu; \ + c->side[n].pt[p].v = vv + +static Cube * +_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) +{ + Cube *c; + int i; + + w -= (w / 2); + h -= (h / 2); + d -= (d / 2); + c = calloc(1, sizeof(Cube)); + for (i = 0; i < 6; i++) + { + Evas_Object *o; + char buf[256]; + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + c->side[i].o = o; + snprintf(buf, sizeof(buf), "cube%i.png", i + 1); + eo_do(o, + efl_file_set(build_path(buf), NULL), + evas_obj_image_fill_set(0, 0, 256, 256), + evas_obj_size_set(256, 256), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + POINT(0, 0, -w, -h, -d, 0, 0); + POINT(0, 1, w, -h, -d, 256, 0); + POINT(0, 2, w, h, -d, 256, 256); + POINT(0, 3, -w, h, -d, 0, 256); + + POINT(1, 0, w, -h, -d, 0, 0); + POINT(1, 1, w, -h, d, 256, 0); + POINT(1, 2, w, h, d, 256, 256); + POINT(1, 3, w, h, -d, 0, 256); + + POINT(2, 0, w, -h, d, 0, 0); + POINT(2, 1, -w, -h, d, 256, 0); + POINT(2, 2, -w, h, d, 256, 256); + POINT(2, 3, w, h, d, 0, 256); + + POINT(3, 0, -w, -h, d, 0, 0); + POINT(3, 1, -w, -h, -d, 256, 0); + POINT(3, 2, -w, h, -d, 256, 256); + POINT(3, 3, -w, h, d, 0, 256); + + POINT(4, 0, -w, -h, d, 0, 0); + POINT(4, 1, w, -h, d, 256, 0); + POINT(4, 2, w, -h, -d, 256, 256); + POINT(4, 3, -w, -h, -d, 0, 256); + + POINT(5, 0, -w, h, -d, 0, 0); + POINT(5, 1, w, h, -d, 256, 0); + POINT(5, 2, w, h, d, 256, 256); + POINT(5, 3, -w, h, d, 0, 256); + + return c; +} + +static void +_cube_pos(Cube *c, + Evas_Coord x, Evas_Coord y, Evas_Coord z, + double dx, double dy, double dz) +{ + static Evas_Map *m = NULL; + int i, j, order[6], sorted; + Evas_Coord mz[6]; + + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + + for (i = 0; i < 6; i++) + { + Evas_Coord tz[4]; + + for (j = 0; j < 4; j++) + { + evas_map_point_coord_set(m, j, + c->side[i].pt[j].x + x, + c->side[i].pt[j].y + y, + c->side[i].pt[j].z + z); + evas_map_point_image_uv_set(m, j, + c->side[i].pt[j].u, + c->side[i].pt[j].v); + evas_map_point_color_set(m, j, 255, 255, 255, 128); + } + evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); + evas_map_util_3d_lighting(m, -1000, -1000, -1000, + 255, 255, 255, + 20, 20, 20); + evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512); + eo_do(c->side[i].o, + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + + order[i] = i; + for (j = 0; j < 4; j++) + evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); + mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; + } + sorted = 0; + do + { + sorted = 1; + for (i = 0; i < 5; i++) + { + if (mz[order[i]] > mz[order[i + 1]]) + { + j = order[i]; + order[i] = order[i + 1]; + order[i + 1] = j; + sorted = 0; + } + } + } + while (!sorted); + + eo_do(c->side[order[0]].o, evas_obj_raise()); + for (i = 1; i < 6; i++) + eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o)); +} + +static void +_cube_free(Cube *c) +{ + int i; + + for (i = 0; i < 6; i++) eo_del(c->side[i].o); + free(c); +} + +/* setup */ +static void _setup(void) +{ + cubes[0] = _cube_new(128, 128, 256); + cubes[1] = _cube_new(256, 128, 128); + cubes[2] = _cube_new(256, 256, 128); + cubes[3] = _cube_new(128, 256, 128); + cubes[4] = _cube_new(256, 256, 256); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + _cube_free(cubes[0]); + _cube_free(cubes[1]); + _cube_free(cubes[2]); + _cube_free(cubes[3]); + _cube_free(cubes[4]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + _cube_pos(cubes[0], + (win_w / 2) - 640, (win_h / 2) - 256, 512, + f / 2.0, f, f / 3.0); + _cube_pos(cubes[1], + (win_w / 2) + 512, (win_h / 2) - 128, 384, + f / 3.0, f / 2.0, f / 4.0); + _cube_pos(cubes[2], + (win_w / 2) - 384, (win_h / 2) + 128, 256, + f / 2.0, f / 3.0, f); + _cube_pos(cubes[3], + (win_w / 2) + 256, (win_h / 2) + 64, 128, + f, f / 5.0, f / 2.0); + _cube_pos(cubes[4], + (win_w / 2), (win_h / 2), 0, + f / 4.0, f / 3.0, f / 5.0); + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_3d_3_capi.h b/src/bin/cxx/image_map_3d_3_capi.h new file mode 100644 index 0000000..e9779ed --- /dev/null +++ b/src/bin/cxx/image_map_3d_3_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_3_cxx_start +#define NAME "Image Map 3D 3" +#define ICON "3d.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_3d_4.cc b/src/bin/cxx/image_map_3d_4.cc new file mode 100644 index 0000000..964fb4b --- /dev/null +++ b/src/bin/cxx/image_map_3d_4.cc @@ -0,0 +1,253 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_4_start +#define NAME "Image Map 3D 4" +#define ICON "3d.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +typedef struct _Point +{ + Evas_Coord x, y, z, u, v; +} Point; + +typedef struct _Side +{ + Evas_Object *o; + Point pt[4]; +} Side; + +typedef struct _Cube +{ + Side side[6]; +} Cube; + +/* standard var */ +static int done = 0; + +/* private data */ +static Cube *cubes[5]; + +#define POINT(n, p, xx, yy, zz, uu, vv) \ + c->side[n].pt[p].x = xx; \ + c->side[n].pt[p].y = yy; \ + c->side[n].pt[p].z = zz; \ + c->side[n].pt[p].u = uu; \ + c->side[n].pt[p].v = vv + +static Cube * +_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) +{ + Cube *c; + int i; + + w -= (w / 2); + h -= (h / 2); + d -= (d / 2); + c = calloc(1, sizeof(Cube)); + for (i = 0; i < 6; i++) + { + Evas_Object *o; + char buf[256]; + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + c->side[i].o = o; + snprintf(buf, sizeof(buf), "cube%i.png", i + 1); + eo_do(o, + efl_file_set(build_path(buf), NULL), + evas_obj_image_fill_set(0, 0, 256, 256), + evas_obj_size_set(256, 256), + evas_obj_visibility_set(EINA_TRUE)); + } + POINT(0, 0, -w, -h, -d, 0, 0); + POINT(0, 1, w, -h, -d, 256, 0); + POINT(0, 2, w, h, -d, 256, 256); + POINT(0, 3, -w, h, -d, 0, 256); + + POINT(1, 0, w, -h, -d, 0, 0); + POINT(1, 1, w, -h, d, 256, 0); + POINT(1, 2, w, h, d, 256, 256); + POINT(1, 3, w, h, -d, 0, 256); + + POINT(2, 0, w, -h, d, 0, 0); + POINT(2, 1, -w, -h, d, 256, 0); + POINT(2, 2, -w, h, d, 256, 256); + POINT(2, 3, w, h, d, 0, 256); + + POINT(3, 0, -w, -h, d, 0, 0); + POINT(3, 1, -w, -h, -d, 256, 0); + POINT(3, 2, -w, h, -d, 256, 256); + POINT(3, 3, -w, h, d, 0, 256); + + POINT(4, 0, -w, -h, d, 0, 0); + POINT(4, 1, w, -h, d, 256, 0); + POINT(4, 2, w, -h, -d, 256, 256); + POINT(4, 3, -w, -h, -d, 0, 256); + + POINT(5, 0, -w, h, -d, 0, 0); + POINT(5, 1, w, h, -d, 256, 0); + POINT(5, 2, w, h, d, 256, 256); + POINT(5, 3, -w, h, d, 0, 256); + + return c; +} + +static void +_cube_pos(Cube *c, + Evas_Coord x, Evas_Coord y, Evas_Coord z, + double dx, double dy, double dz) +{ + static Evas_Map *m = NULL; + int i, j, order[6], sorted; + Evas_Coord mz[6]; + + if (!m) m = evas_map_new(4); + + for (i = 0; i < 6; i++) + { + Evas_Coord tz[4]; + + for (j = 0; j < 4; j++) + { + evas_map_point_coord_set(m, j, + c->side[i].pt[j].x + x, + c->side[i].pt[j].y + y, + c->side[i].pt[j].z + z); + evas_map_point_image_uv_set(m, j, + c->side[i].pt[j].u, + c->side[i].pt[j].v); + evas_map_point_color_set(m, j, 255, 255, 255, 128); + } + evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); + evas_map_util_3d_lighting(m, -1000, -1000, -1000, + 255, 255, 255, + 20, 20, 20); + evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), 0, 512); + eo_do(c->side[i].o, + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + + order[i] = i; + for (j = 0; j < 4; j++) + evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); + mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; + } + sorted = 0; + do + { + sorted = 1; + for (i = 0; i < 5; i++) + { + if (mz[order[i]] > mz[order[i + 1]]) + { + j = order[i]; + order[i] = order[i + 1]; + order[i + 1] = j; + sorted = 0; + } + } + } + while (!sorted); + + eo_do(c->side[order[0]].o, evas_obj_raise()); + for (i = 1; i < 6; i++) + eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o)); +} + +static void +_cube_free(Cube *c) +{ + int i; + + for (i = 0; i < 6; i++) eo_del(c->side[i].o); + free(c); +} + +/* setup */ +static void _setup(void) +{ + cubes[0] = _cube_new(128, 128, 256); + cubes[1] = _cube_new(256, 128, 128); + cubes[2] = _cube_new(256, 256, 128); + cubes[3] = _cube_new(128, 256, 128); + cubes[4] = _cube_new(256, 256, 256); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + _cube_free(cubes[0]); + _cube_free(cubes[1]); + _cube_free(cubes[2]); + _cube_free(cubes[3]); + _cube_free(cubes[4]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + _cube_pos(cubes[0], + (win_w / 2) - 640, (win_h / 2) - 256, 512, + f / 2.0, f, f / 3.0); + _cube_pos(cubes[1], + (win_w / 2) + 512, (win_h / 2) - 128, 384, + f / 3.0, f / 2.0, f / 4.0); + _cube_pos(cubes[2], + (win_w / 2) - 384, (win_h / 2) + 128, 256, + f / 2.0, f / 3.0, f); + _cube_pos(cubes[3], + (win_w / 2) + 256, (win_h / 2) + 64, 128, + f, f / 5.0, f / 2.0); + _cube_pos(cubes[4], + (win_w / 2), (win_h / 2), 0, + f / 4.0, f / 3.0, f / 5.0); + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_3d_4_capi.h b/src/bin/cxx/image_map_3d_4_capi.h new file mode 100644 index 0000000..2968bb4 --- /dev/null +++ b/src/bin/cxx/image_map_3d_4_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_4_cxx_start +#define NAME "Image Map 3D 4" +#define ICON "3d.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_3d_5.cc b/src/bin/cxx/image_map_3d_5.cc new file mode 100644 index 0000000..ac931eb --- /dev/null +++ b/src/bin/cxx/image_map_3d_5.cc @@ -0,0 +1,243 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_5_start +#define NAME "Image Map 3D 5" +#define ICON "3d.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +typedef struct _Point +{ + Evas_Coord x, y, z, u, v; +} Point; + +typedef struct _Side +{ + Evas_Object *o; + Point pt[4]; +} Side; + +typedef struct _Cube +{ + Side side[6]; +} Cube; + +/* standard var */ +static int done = 0; + +/* private data */ +static Cube *cubes[1]; + +#define POINT(n, p, xx, yy, zz, uu, vv) \ + c->side[n].pt[p].x = xx; \ + c->side[n].pt[p].y = yy; \ + c->side[n].pt[p].z = zz; \ + c->side[n].pt[p].u = uu; \ + c->side[n].pt[p].v = vv + +static Cube * +_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) +{ + Cube *c; + int i; + + w -= (w / 2); + h -= (h / 2); + d -= (d / 2); + c = calloc(1, sizeof(Cube)); + for (i = 0; i < 6; i++) + { + Evas_Object *o; + char buf[256]; + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + c->side[i].o = o; + snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1); + eo_do(o, + efl_file_set(build_path(buf), NULL), + evas_obj_image_fill_set(0, 0, 720, 420), + evas_obj_size_set(720, 420), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + POINT(0, 0, -w, -h, -d, 0, 0); + POINT(0, 1, w, -h, -d, 720, 0); + POINT(0, 2, w, h, -d, 720, 420); + POINT(0, 3, -w, h, -d, 0, 420); + + POINT(1, 0, w, -h, -d, 0, 0); + POINT(1, 1, w, -h, d, 720, 0); + POINT(1, 2, w, h, d, 720, 420); + POINT(1, 3, w, h, -d, 0, 420); + + POINT(2, 0, w, -h, d, 0, 0); + POINT(2, 1, -w, -h, d, 720, 0); + POINT(2, 2, -w, h, d, 720, 420); + POINT(2, 3, w, h, d, 0, 420); + + POINT(3, 0, -w, -h, d, 0, 0); + POINT(3, 1, -w, -h, -d, 720, 0); + POINT(3, 2, -w, h, -d, 720, 420); + POINT(3, 3, -w, h, d, 0, 420); + + POINT(4, 0, -w, -h, d, 0, 0); + POINT(4, 1, w, -h, d, 720, 0); + POINT(4, 2, w, -h, -d, 720, 420); + POINT(4, 3, -w, -h, -d, 0, 420); + + POINT(5, 0, -w, h, -d, 0, 0); + POINT(5, 1, w, h, -d, 720, 0); + POINT(5, 2, w, h, d, 720, 420); + POINT(5, 3, -w, h, d, 0, 420); + + return c; +} + +static void +_cube_pos(Cube *c, + Evas_Coord x, Evas_Coord y, Evas_Coord z, + double dx, double dy, double dz) +{ + static Evas_Map *m = NULL; + int i, j, order[6], sorted; + Evas_Coord mz[6]; + + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + + for (i = 0; i < 6; i++) + { + Evas_Coord tz[4]; + + for (j = 0; j < 4; j++) + { + evas_map_point_coord_set(m, j, + c->side[i].pt[j].x + x, + c->side[i].pt[j].y + y, + c->side[i].pt[j].z + z); + evas_map_point_image_uv_set(m, j, + c->side[i].pt[j].u, + c->side[i].pt[j].v); + evas_map_point_color_set(m, j, 255, 255, 255, 255); + } + evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); + evas_map_util_3d_lighting(m, -1000, win_h / 2, -1000, + 255, 255, 255, + 20, 20, 20); + evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720); + if (evas_map_util_clockwise_get(m)) + { + eo_do(c->side[i].o, + evas_obj_map_enable_set(1), + evas_obj_map_set(m), + evas_obj_visibility_set(EINA_TRUE)); + } + else + { + eo_do(c->side[i].o, evas_obj_visibility_set(EINA_FALSE)); + } + + order[i] = i; + for (j = 0; j < 4; j++) + evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); + mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; + } + sorted = 0; + do + { + sorted = 1; + for (i = 0; i < 5; i++) + { + if (mz[order[i]] > mz[order[i + 1]]) + { + j = order[i]; + order[i] = order[i + 1]; + order[i + 1] = j; + sorted = 0; + } + } + } + while (!sorted); + + eo_do(c->side[order[0]].o, evas_obj_raise()); + for (i = 1; i < 6; i++) + eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o)); +} + +static void +_cube_free(Cube *c) +{ + int i; + + for (i = 0; i < 6; i++) eo_del(c->side[i].o); + free(c); +} + +/* setup */ +static void _setup(void) +{ + cubes[0] = _cube_new(720, 420, 720); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + _cube_free(cubes[0]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + _cube_pos(cubes[0], + (win_w / 2), (win_h / 2), 0, + 0, f, 0); + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_3d_5_capi.h b/src/bin/cxx/image_map_3d_5_capi.h new file mode 100644 index 0000000..f8c72fd --- /dev/null +++ b/src/bin/cxx/image_map_3d_5_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_5_cxx_start +#define NAME "Image Map 3D 5" +#define ICON "3d.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_3d_6.cc b/src/bin/cxx/image_map_3d_6.cc new file mode 100644 index 0000000..99e7d10 --- /dev/null +++ b/src/bin/cxx/image_map_3d_6.cc @@ -0,0 +1,240 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_6_start +#define NAME "Image Map 3D 6" +#define ICON "3d.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +typedef struct _Point +{ + Evas_Coord x, y, z, u, v; +} Point; + +typedef struct _Side +{ + Evas_Object *o; + Point pt[4]; +} Side; + +typedef struct _Cube +{ + Side side[6]; +} Cube; + +/* standard var */ +static int done = 0; + +/* private data */ +static Cube *cubes[1]; + +#define POINT(n, p, xx, yy, zz, uu, vv) \ + c->side[n].pt[p].x = xx; \ + c->side[n].pt[p].y = yy; \ + c->side[n].pt[p].z = zz; \ + c->side[n].pt[p].u = uu; \ + c->side[n].pt[p].v = vv + +static Cube * +_cube_new(Evas_Coord w, Evas_Coord h, Evas_Coord d) +{ + Cube *c; + int i; + + w -= (w / 2); + h -= (h / 2); + d -= (d / 2); + c = calloc(1, sizeof(Cube)); + for (i = 0; i < 6; i++) + { + Evas_Object *o; + char buf[256]; + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + c->side[i].o = o; + snprintf(buf, sizeof(buf), "im%i.png", (i % 2) + 1); + eo_do(o, + efl_file_set(build_path(buf), NULL), + evas_obj_image_fill_set(0, 0, 720, 420), + evas_obj_size_set(720, 420), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + POINT(0, 0, -w, -h, -d, 0, 0); + POINT(0, 1, w, -h, -d, 720, 0); + POINT(0, 2, w, h, -d, 720, 420); + POINT(0, 3, -w, h, -d, 0, 420); + + POINT(1, 0, w, -h, -d, 0, 0); + POINT(1, 1, w, -h, d, 720, 0); + POINT(1, 2, w, h, d, 720, 420); + POINT(1, 3, w, h, -d, 0, 420); + + POINT(2, 0, w, -h, d, 0, 0); + POINT(2, 1, -w, -h, d, 720, 0); + POINT(2, 2, -w, h, d, 720, 420); + POINT(2, 3, w, h, d, 0, 420); + + POINT(3, 0, -w, -h, d, 0, 0); + POINT(3, 1, -w, -h, -d, 720, 0); + POINT(3, 2, -w, h, -d, 720, 420); + POINT(3, 3, -w, h, d, 0, 420); + + POINT(4, 0, -w, -h, d, 0, 0); + POINT(4, 1, w, -h, d, 720, 0); + POINT(4, 2, w, -h, -d, 720, 420); + POINT(4, 3, -w, -h, -d, 0, 420); + + POINT(5, 0, -w, h, -d, 0, 0); + POINT(5, 1, w, h, -d, 720, 0); + POINT(5, 2, w, h, d, 720, 420); + POINT(5, 3, -w, h, d, 0, 420); + + return c; +} + +static void +_cube_pos(Cube *c, + Evas_Coord x, Evas_Coord y, Evas_Coord z, + double dx, double dy, double dz) +{ + static Evas_Map *m = NULL; + int i, j, order[6], sorted; + Evas_Coord mz[6]; + + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + + for (i = 0; i < 6; i++) + { + Evas_Coord tz[4]; + + for (j = 0; j < 4; j++) + { + evas_map_point_coord_set(m, j, + c->side[i].pt[j].x + x, + c->side[i].pt[j].y + y, + c->side[i].pt[j].z + z); + evas_map_point_image_uv_set(m, j, + c->side[i].pt[j].u, + c->side[i].pt[j].v); + evas_map_point_color_set(m, j, 255, 255, 255, 255); + } + evas_map_util_3d_rotate(m, dx, dy, dz, x, y, z); + evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -360, 720); + if (evas_map_util_clockwise_get(m)) + { + eo_do(c->side[i].o, + evas_obj_map_enable_set(1), + evas_obj_map_set(m), + evas_obj_visibility_set(EINA_TRUE)); + } + else + { + eo_do(c->side[i].o, evas_obj_visibility_set(EINA_FALSE)); + } + + order[i] = i; + for (j = 0; j < 4; j++) + evas_map_point_coord_get(m, j, NULL, NULL, &(tz[j])); + mz[i] = (tz[0] + tz[1] + tz[2] + tz[3]) / 4; + } + sorted = 0; + do + { + sorted = 1; + for (i = 0; i < 5; i++) + { + if (mz[order[i]] > mz[order[i + 1]]) + { + j = order[i]; + order[i] = order[i + 1]; + order[i + 1] = j; + sorted = 0; + } + } + } + while (!sorted); + + eo_do(c->side[order[0]].o, evas_obj_raise()); + for (i = 1; i < 6; i++) + eo_do(c->side[order[i]].o, evas_obj_stack_below(c->side[order[i - 1]].o)); +} + +static void +_cube_free(Cube *c) +{ + int i; + + for (i = 0; i < 6; i++) eo_del(c->side[i].o); + free(c); +} + +/* setup */ +static void _setup(void) +{ + cubes[0] = _cube_new(720, 420, 720); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + _cube_free(cubes[0]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + _cube_pos(cubes[0], + (win_w / 2), (win_h / 2), 0, + 0, f, 0); + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_3d_6_capi.h b/src/bin/cxx/image_map_3d_6_capi.h new file mode 100644 index 0000000..d5cec4c --- /dev/null +++ b/src/bin/cxx/image_map_3d_6_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_6_cxx_start +#define NAME "Image Map 3D 6" +#define ICON "3d.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_3d_flow.cc b/src/bin/cxx/image_map_3d_flow.cc new file mode 100644 index 0000000..0120c9d --- /dev/null +++ b/src/bin/cxx/image_map_3d_flow.cc @@ -0,0 +1,234 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_flow_start +#define NAME "Image Map 3D Flow" +#define ICON "3d.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +#define CNUM 48 + +/* private data */ +static Evas_Object *o_images[CNUM]; +static Evas_Object *o_reflec[CNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < CNUM; i++) + { + char buf[256]; + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); + eo_do(o, + efl_file_set(build_path(buf), NULL), + evas_obj_image_fill_set(0, 0, 256, 256), + evas_obj_size_set(256, 256), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_reflec[i] = o; + snprintf(buf, sizeof(buf), "cube%i.png", (i % 6) + 1); + eo_do(o, + efl_file_set(build_path(buf), NULL), + evas_obj_image_fill_set(0, 0, 256, 256), + evas_obj_size_set(256, 256), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < CNUM; i++) + { + eo_del(o_images[i]); + eo_del(o_reflec[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, xx, yy, w, h, c, z; + int center = 150; + double ang, n; + + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + + for (i = 0; i < CNUM; i++) + { + x = (win_w / 2); + y = (win_h / 2); + w = 256; + h = 256; + + c = (i - (CNUM / 2)) * (w / 4); + c += (f % (6 * (w / 4))); + + ang = (double)c / (double)center; + if (ang > 0.0) ang = ang * ang; + else ang = -ang * ang; + ang *= -90.0; + if (ang > 90.0) ang = 90.0; + else if (ang < -90.0) ang = -90.0; + + if ((c > (-center)) && (c <= (center))) + { + n = (double)c / (double)center; + if (c > 0) + { + n = 1.0 - n; + n = 1.0 - (n * n); + } + else + { + n = -(-1.0 - n); + n = -(1.0 - (n * n)); + } + c = n * center * 2.0; + } + else if (c <= (-center)) + c = (c + center) - (center * 2); + else if (c > (center)) + c = (c - center) + (center * 2); + + z = 0; + if ((c > (-center)) && (c <= (center))) + { + z = (c * (w / 2)) / center; + if (z < 0) z = -z; + z = (w / 2) - z; + } + + x += c; + + x -= (w / 2); + xx = x + w; + + y -= (h / 2); + yy = y + h; + + if (c <= 0) + { + eo_do(o_images[i], evas_obj_raise()); + eo_do(o_reflec[i], evas_obj_raise()); + } + else + { + eo_do(o_images[i], evas_obj_lower()); + eo_do(o_reflec[i], evas_obj_lower()); + } + + evas_map_point_coord_set (m, 0, x, y, -z); + evas_map_point_image_uv_set(m, 0, 0, 0); + evas_map_point_color_set (m, 0, 255, 255, 255, 255); + + evas_map_point_coord_set (m, 1, xx, y, -z); + evas_map_point_image_uv_set(m, 1, 256, 0); + evas_map_point_color_set (m, 1, 255, 255, 255, 255); + + evas_map_point_coord_set (m, 2, xx, yy, -z); + evas_map_point_image_uv_set(m, 2, 256, 256); + evas_map_point_color_set (m, 2, 255, 255, 255, 255); + + evas_map_point_coord_set (m, 3, x, yy, -z); + evas_map_point_image_uv_set(m, 3, 0, 256); + evas_map_point_color_set (m, 3, 255, 255, 255, 255); + + evas_map_util_3d_rotate(m, 0, ang, 0, + x + (w / 2), y + (h / 2), 0); + evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + + evas_map_point_coord_set (m, 0, x, yy, -z); + evas_map_point_image_uv_set(m, 0, 0, 256); + evas_map_point_color_set (m, 0, 128, 128, 128, 128); + + evas_map_point_coord_set (m, 1, xx, yy, -z); + evas_map_point_image_uv_set(m, 1, 256, 256); + evas_map_point_color_set (m, 1, 128, 128, 128, 128); + + evas_map_point_coord_set (m, 2, xx, yy + h, -z); + evas_map_point_image_uv_set(m, 2, 256, 0); + evas_map_point_color_set (m, 2, 0, 0, 0, 0); + + evas_map_point_coord_set (m, 3, x, yy + h, -z); + evas_map_point_image_uv_set(m, 3, 0, 0); + evas_map_point_color_set (m, 3, 0, 0, 0, 0); + + evas_map_util_3d_rotate(m, 0, ang, 0, + x + (w / 2), y + (h / 2), 0); + evas_map_util_3d_perspective(m, (win_w / 2), (win_h / 2), -256, 512); + + eo_do(o_reflec[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_3d_flow_capi.h b/src/bin/cxx/image_map_3d_flow_capi.h new file mode 100644 index 0000000..69e0f4b --- /dev/null +++ b/src/bin/cxx/image_map_3d_flow_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_3d_flow_cxx_start +#define NAME "Image Map 3D Flow" +#define ICON "3d.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_color_alpha_nearest_rotate.cc b/src/bin/cxx/image_map_color_alpha_nearest_rotate.cc new file mode 100644 index 0000000..e048cad --- /dev/null +++ b/src/bin/cxx/image_map_color_alpha_nearest_rotate.cc @@ -0,0 +1,119 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_alpha_nearest_rotate_start +#define NAME "Image Map Color Alpha Nearest Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_point_color_set(m, 0, 255, 255, 255, 255); + evas_map_point_color_set(m, 1, 255, 0, 0, 255); + evas_map_point_color_set(m, 2, 0, 0, 255, 255); + evas_map_point_color_set(m, 3, 0, 0, 0, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_color_alpha_nearest_rotate_capi.h b/src/bin/cxx/image_map_color_alpha_nearest_rotate_capi.h new file mode 100644 index 0000000..a19b5ec --- /dev/null +++ b/src/bin/cxx/image_map_color_alpha_nearest_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_alpha_nearest_rotate_cxx_start +#define NAME "Image Map Color Alpha Nearest Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate.cc b/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate.cc new file mode 100644 index 0000000..a2042cb --- /dev/null +++ b/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate.cc @@ -0,0 +1,119 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_alpha_nearest_solid_rotate_start +#define NAME "Image Map Color Alpha Nearest Solid Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_point_color_set(m, 0, 255, 255, 255, 255); + evas_map_point_color_set(m, 1, 255, 0, 0, 255); + evas_map_point_color_set(m, 2, 0, 0, 255, 255); + evas_map_point_color_set(m, 3, 0, 0, 0, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate_capi.h b/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate_capi.h new file mode 100644 index 0000000..5ca231f --- /dev/null +++ b/src/bin/cxx/image_map_color_alpha_nearest_solid_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_alpha_nearest_solid_rotate_cxx_start +#define NAME "Image Map Color Alpha Nearest Solid Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_color_alpha_rotate.cc b/src/bin/cxx/image_map_color_alpha_rotate.cc new file mode 100644 index 0000000..4b6a01f --- /dev/null +++ b/src/bin/cxx/image_map_color_alpha_rotate.cc @@ -0,0 +1,117 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_alpha_rotate_start +#define NAME "Image Map Color Alpha Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_point_color_set(m, 0, 255, 255, 255, 255); + evas_map_point_color_set(m, 1, 255, 0, 0, 255); + evas_map_point_color_set(m, 2, 0, 0, 255, 255); + evas_map_point_color_set(m, 3, 0, 0, 0, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_color_alpha_rotate_capi.h b/src/bin/cxx/image_map_color_alpha_rotate_capi.h new file mode 100644 index 0000000..357d5e7 --- /dev/null +++ b/src/bin/cxx/image_map_color_alpha_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_alpha_rotate_cxx_start +#define NAME "Image Map Color Alpha Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_color_alpha_solid_rotate.cc b/src/bin/cxx/image_map_color_alpha_solid_rotate.cc new file mode 100644 index 0000000..d2c3224 --- /dev/null +++ b/src/bin/cxx/image_map_color_alpha_solid_rotate.cc @@ -0,0 +1,116 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_alpha_solid_rotate_start +#define NAME "Image Map Color Alpha Solid Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_point_color_set(m, 0, 255, 255, 255, 255); + evas_map_point_color_set(m, 1, 255, 0, 0, 255); + evas_map_point_color_set(m, 2, 0, 0, 255, 255); + evas_map_point_color_set(m, 3, 0, 0, 0, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_color_alpha_solid_rotate_capi.h b/src/bin/cxx/image_map_color_alpha_solid_rotate_capi.h new file mode 100644 index 0000000..dc7038f --- /dev/null +++ b/src/bin/cxx/image_map_color_alpha_solid_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_alpha_solid_rotate_cxx_start +#define NAME "Image Map Color Alpha Solid Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_color_nearest_rotate.cc b/src/bin/cxx/image_map_color_nearest_rotate.cc new file mode 100644 index 0000000..45aa0e0 --- /dev/null +++ b/src/bin/cxx/image_map_color_nearest_rotate.cc @@ -0,0 +1,119 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_nearest_rotate_start +#define NAME "Image Map Color Nearest Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_point_color_set(m, 0, 255, 255, 255, 255); + evas_map_point_color_set(m, 1, 255, 0, 0, 255); + evas_map_point_color_set(m, 2, 0, 0, 255, 255); + evas_map_point_color_set(m, 3, 0, 255, 0, 255); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_color_nearest_rotate_capi.h b/src/bin/cxx/image_map_color_nearest_rotate_capi.h new file mode 100644 index 0000000..c8eec71 --- /dev/null +++ b/src/bin/cxx/image_map_color_nearest_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_nearest_rotate_cxx_start +#define NAME "Image Map Color Nearest Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_color_nearest_solid_rotate.cc b/src/bin/cxx/image_map_color_nearest_solid_rotate.cc new file mode 100644 index 0000000..77f6baf --- /dev/null +++ b/src/bin/cxx/image_map_color_nearest_solid_rotate.cc @@ -0,0 +1,119 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_nearest_solid_rotate_start +#define NAME "Image Map Color Nearest Solid Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_point_color_set(m, 0, 255, 255, 255, 255); + evas_map_point_color_set(m, 1, 255, 0, 0, 255); + evas_map_point_color_set(m, 2, 0, 0, 255, 255); + evas_map_point_color_set(m, 3, 0, 255, 0, 255); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_color_nearest_solid_rotate_capi.h b/src/bin/cxx/image_map_color_nearest_solid_rotate_capi.h new file mode 100644 index 0000000..c457a77 --- /dev/null +++ b/src/bin/cxx/image_map_color_nearest_solid_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_nearest_solid_rotate_cxx_start +#define NAME "Image Map Color Nearest Solid Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_color_rotate.cc b/src/bin/cxx/image_map_color_rotate.cc new file mode 100644 index 0000000..d83b7a3 --- /dev/null +++ b/src/bin/cxx/image_map_color_rotate.cc @@ -0,0 +1,117 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_rotate_start +#define NAME "Image Map Color Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_point_color_set(m, 0, 255, 255, 255, 255); + evas_map_point_color_set(m, 1, 255, 0, 0, 255); + evas_map_point_color_set(m, 2, 0, 0, 255, 255); + evas_map_point_color_set(m, 3, 0, 255, 0, 255); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_color_rotate_capi.h b/src/bin/cxx/image_map_color_rotate_capi.h new file mode 100644 index 0000000..a85b63f --- /dev/null +++ b/src/bin/cxx/image_map_color_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_rotate_cxx_start +#define NAME "Image Map Color Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_color_solid_rotate.cc b/src/bin/cxx/image_map_color_solid_rotate.cc new file mode 100644 index 0000000..932e3ee --- /dev/null +++ b/src/bin/cxx/image_map_color_solid_rotate.cc @@ -0,0 +1,117 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_solid_rotate_start +#define NAME "Image Map Color Solid Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_point_color_set(m, 0, 255, 255, 255, 255); + evas_map_point_color_set(m, 1, 255, 0, 0, 255); + evas_map_point_color_set(m, 2, 0, 0, 255, 255); + evas_map_point_color_set(m, 3, 0, 255, 0, 255); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_color_solid_rotate_capi.h b/src/bin/cxx/image_map_color_solid_rotate_capi.h new file mode 100644 index 0000000..a8b1e4e --- /dev/null +++ b/src/bin/cxx/image_map_color_solid_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_color_solid_rotate_cxx_start +#define NAME "Image Map Color Solid Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_nearest_rotate.cc b/src/bin/cxx/image_map_nearest_rotate.cc new file mode 100644 index 0000000..4f93f39 --- /dev/null +++ b/src/bin/cxx/image_map_nearest_rotate.cc @@ -0,0 +1,114 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_nearest_rotate_start +#define NAME "Image Map Nearest Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_nearest_rotate_capi.h b/src/bin/cxx/image_map_nearest_rotate_capi.h new file mode 100644 index 0000000..0861069 --- /dev/null +++ b/src/bin/cxx/image_map_nearest_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_nearest_rotate_cxx_start +#define NAME "Image Map Nearest Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_nearest_solid_rotate.cc b/src/bin/cxx/image_map_nearest_solid_rotate.cc new file mode 100644 index 0000000..e384087 --- /dev/null +++ b/src/bin/cxx/image_map_nearest_solid_rotate.cc @@ -0,0 +1,114 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_nearest_solid_rotate_start +#define NAME "Image Map Nearest Solid Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + efl_image_smooth_scale_set(0), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + evas_map_smooth_set(m, 0); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_nearest_solid_rotate_capi.h b/src/bin/cxx/image_map_nearest_solid_rotate_capi.h new file mode 100644 index 0000000..72a4020 --- /dev/null +++ b/src/bin/cxx/image_map_nearest_solid_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_nearest_solid_rotate_cxx_start +#define NAME "Image Map Nearest Solid Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_rotate.cc b/src/bin/cxx/image_map_rotate.cc new file mode 100644 index 0000000..462fe3a --- /dev/null +++ b/src/bin/cxx/image_map_rotate.cc @@ -0,0 +1,110 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_rotate_start +#define NAME "Image Map Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_rotate_capi.h b/src/bin/cxx/image_map_rotate_capi.h new file mode 100644 index 0000000..3dbd877 --- /dev/null +++ b/src/bin/cxx/image_map_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_rotate_cxx_start +#define NAME "Image Map Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_map_solid_rotate.cc b/src/bin/cxx/image_map_solid_rotate.cc new file mode 100644 index 0000000..3bdaf11 --- /dev/null +++ b/src/bin/cxx/image_map_solid_rotate.cc @@ -0,0 +1,112 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_solid_rotate_start +#define NAME "Image Map Solid Rotate" +#define ICON "map.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < (OBNUM / 2); i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + efl_file_set(build_path("image.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < (OBNUM / 2); i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + static Evas_Map *m = NULL; + Evas_Coord x, y, w, h; + if (!m) m = evas_map_new(4); + for (i = 0; i < (OBNUM / 2); i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + + evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); + + evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2)); + + eo_do(o_images[i], + evas_obj_map_enable_set(1), + evas_obj_map_set(m)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + _setup(); + ui_func_set(_key, _loop); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_map_solid_rotate_capi.h b/src/bin/cxx/image_map_solid_rotate_capi.h new file mode 100644 index 0000000..5ad51c7 --- /dev/null +++ b/src/bin/cxx/image_map_solid_rotate_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_map_solid_rotate_cxx_start +#define NAME "Image Map Solid Rotate" +#define ICON "map.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/image_quality_scale.cc b/src/bin/cxx/image_quality_scale.cc new file mode 100644 index 0000000..e038f3a --- /dev/null +++ b/src/bin/cxx/image_quality_scale.cc @@ -0,0 +1,104 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_quality_scale_start +#define NAME "Image Quality Scale" +#define ICON "data.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_images[1]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < 1; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path("tp.png"), NULL), + evas_obj_image_fill_set(0, 0, 640, 480), + evas_obj_size_set(640, 480), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < 1; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < 1; i++) + { + w = 640; + h = 480; + w *= (f / 100.0) * 4.0; + h *= (f / 100.0) * 4.0; + x = (win_w / 2) - (w / 2); + y = (win_h / 2) - (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y), + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/image_quality_scale_capi.h b/src/bin/cxx/image_quality_scale_capi.h new file mode 100644 index 0000000..5796c96 --- /dev/null +++ b/src/bin/cxx/image_quality_scale_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_quality_scale_cxx_start +#define NAME "Image Quality Scale" +#define ICON "data.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/line_blend.cc b/src/bin/cxx/line_blend.cc new file mode 100644 index 0000000..6f5d51f --- /dev/null +++ b/src/bin/cxx/line_blend.cc @@ -0,0 +1,143 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME line_blend_start +#define NAME "Line Blend" +#define ICON "rect.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + int r, g, b, a; + + o = eo_add(EVAS_LINE_CLASS, G_evas); + o_images[i] = o; + a = (rnd()&0xff) / 2; + r = ((rnd()&0xff) * a) / 255; + g = ((rnd()&0xff) * a) / 255; + b = ((rnd()&0xff) * a) / 255; + eo_do(o, + evas_obj_color_set(r, g, b, a), + evas_obj_line_xy_set(((win_w / 2) * (rnd()&0xff)) / 255, + ((win_h / 2) * (rnd()&0xff)) / 255, + ((win_w / 2) * (rnd()&0xff)) / 255 + (win_w / 2), + ((win_h / 2) * (rnd()&0xff)) / 255 + (win_h / 2)), + evas_obj_visibility_set(EINA_TRUE)); + + + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +#define PI (double) 3.141592654 + +static void +_rotate_point(Evas_Coord *ox, Evas_Coord *oy, int r) +{ + double d; + double x, y; + double angle; + + x = *ox - (win_w / 2); + y = *oy - (win_h / 2); + + d = sqrt(x * x + y * y); + + angle = atan((double) y / (double) x); + if (x < 0) angle -= PI; + + switch (r & 0x3) + { + case 0: angle += 1 * PI / 180; break; + case 1: angle += -1 * PI / 180; break; + case 2: angle += 7 * PI / 180; break; + case 3: angle += -1 * PI / 180; break; + } + + *ox = d * cos(angle) + (win_w / 2); + *oy = d * sin(angle) + (win_h / 2); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord ox1, oy1, ox2, oy2; + Evas_Object *o; + + for (i = 0; i < OBNUM; i++) + { + o = o_images[i]; + eo_do(o, evas_obj_line_xy_get(&ox1, &oy1, &ox2, &oy2)); + + _rotate_point(&ox1, &oy1, i); + _rotate_point(&ox2, &oy2, i); + eo_do(o, evas_obj_line_xy_set(ox1, oy1, ox2, oy2)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/line_blend_capi.h b/src/bin/cxx/line_blend_capi.h new file mode 100644 index 0000000..b8cf077 --- /dev/null +++ b/src/bin/cxx/line_blend_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME line_blend_cxx_start +#define NAME "Line Blend" +#define ICON "rect.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/proxy_image.cc b/src/bin/cxx/proxy_image.cc new file mode 100644 index 0000000..f7e51f9 --- /dev/null +++ b/src/bin/cxx/proxy_image.cc @@ -0,0 +1,113 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_unscaled_proxy_start +#define NAME "Image Blend Unscaled Proxy" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o,*src; + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + eo_do(o, + efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_visibility_set(EINA_TRUE)); + src = o; + o_images[0] = src; + + for (i = 1; i < OBNUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, + evas_obj_image_source_set(src), + evas_obj_size_set(120, 160), + evas_obj_image_fill_set(0,0,120,160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON + diff --git a/src/bin/cxx/proxy_image_capi.h b/src/bin/cxx/proxy_image_capi.h new file mode 100644 index 0000000..114edb8 --- /dev/null +++ b/src/bin/cxx/proxy_image_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME proxy_image_cxx_start +#define NAME "Image Blend Unscaled Proxy" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/proxy_image_offscreen.cc b/src/bin/cxx/proxy_image_offscreen.cc new file mode 100644 index 0000000..e876486 --- /dev/null +++ b/src/bin/cxx/proxy_image_offscreen.cc @@ -0,0 +1,114 @@ +/** + * This tests that proxy works fine if the proxy (of an image) works when + * offscreen. + */ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME image_blend_unscaled_proxy_start +#define NAME "Proxy Offscreen" +#define ICON "blend.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o,*src; + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + eo_do(o, efl_file_set(build_path("logo.png"), NULL), + evas_obj_image_fill_set(0, 0, 120, 160), + evas_obj_size_set(120, 160), + evas_obj_position_set(-400, -300)); + src = o; + + for (i = 0; i < OBNUM / 2; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_source_set(src, NULL), + evas_obj_size_set(120, 160), + evas_obj_image_fill_set(0,0,120,160), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + w = 120; + h = 160; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2); + eo_do(o_images[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON + diff --git a/src/bin/cxx/proxy_image_offscreen_capi.h b/src/bin/cxx/proxy_image_offscreen_capi.h new file mode 100644 index 0000000..8201f1c --- /dev/null +++ b/src/bin/cxx/proxy_image_offscreen_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME proxy_image_offscreen_cxx_start +#define NAME "Proxy Offscreen" +#define ICON "blend.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/proxy_text_fixed.cc b/src/bin/cxx/proxy_text_fixed.cc new file mode 100644 index 0000000..0e29eb3 --- /dev/null +++ b/src/bin/cxx/proxy_text_fixed.cc @@ -0,0 +1,127 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME proxy_text_fixed +#define NAME "Proxy Text Fixed" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_texts[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i,w,h; + Evas_Object *o,*s; + Evas_Text_Style_Type st; + + st = EVAS_TEXT_STYLE_SHADOW; + for (i = 0; st <= EVAS_TEXT_STYLE_FAR_SOFT_SHADOW; i++) + { + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, + efl_text_properties_font_set("Vera-Bold", 20), + efl_text_set("This is a test string"), + evas_obj_text_style_set(st), + evas_obj_color_set(255, 255, 255, 255), + evas_obj_text_shadow_color_set(0, 0, 0, 24), + evas_obj_text_glow_color_set(100, 80, 40, 100), + evas_obj_text_glow2_color_set(50, 10, 5, 50), + evas_obj_text_outline_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + st++; + } + st = i; + + for ( ; i < OBNUM ; i ++) + { + s = o_texts[i % st]; + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, evas_obj_image_source_set(s)); + /* FIXME s == NULL*/ + eo_do(s, evas_obj_size_get(&w, &h)); + eo_do(o, + evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h), + evas_obj_visibility_set(EINA_TRUE)); + } + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + eo_do(o_texts[i], evas_obj_size_get(&w, &h)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); + eo_do(o_texts[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/proxy_text_fixed_capi.h b/src/bin/cxx/proxy_text_fixed_capi.h new file mode 100644 index 0000000..608665f --- /dev/null +++ b/src/bin/cxx/proxy_text_fixed_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME proxy_text_fixed_cxx_start +#define NAME "Proxy Text Fixed" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/proxy_text_random.cc b/src/bin/cxx/proxy_text_random.cc new file mode 100644 index 0000000..85c5821 --- /dev/null +++ b/src/bin/cxx/proxy_text_random.cc @@ -0,0 +1,147 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME proxy_text_random +#define NAME "Proxy Text Random" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_texts[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i = 0; + Evas_Object *o; + Evas_Coord x, y, w, h; + char buf[1024]; + const char *strs[] = { + "Big", "Smelly", "Fish", "Pants", "Octopus", "Garden", "There", "I", + "Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy", + "Fiddly", "Family", "Lair", "Monkeys", "Magazine" + }; + srnd(); + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[0] = o; + snprintf(buf, sizeof(buf), "%s %s %s %s.", + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))]); + + eo_do(o, + efl_text_properties_font_set("Vera-Bold", 20), + efl_text_set(buf), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_size_get(&w, &h)); + x = (win_w / 2) - (w / 2); + x += sin((double)((i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)((i * 28)) / (43.8 * SLOW)) * (w / 2); + eo_do(o, + evas_obj_position_set(x, y), + evas_obj_visibility_set(EINA_TRUE)); + for (i = 1 ; i < OBNUM ; i ++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, + evas_obj_image_source_set(o_texts[0])); + eo_do(o_texts[0], evas_obj_size_get(&w, &h)); + eo_do(o, evas_obj_size_set(w, h), + evas_obj_image_fill_set(0, 0, w, h)); + x = (win_w / 2) - (w / 2); + x += sin((double)((i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)((i * 28)) / (43.8 * SLOW)) * (w / 2); + eo_do(o, evas_obj_position_set(x, y), + evas_obj_visibility_set(EINA_TRUE)); + } + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i,w,h; + char buf[1024]; + const char *strs[] = { + "Big", "Smelly", "Fish", "Pants", "Octopus", "Garden", "There", "I", + "Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy", + "Fiddly", "Family", "Lair", "Monkeys", "Magazine" + }; + snprintf(buf, sizeof(buf), "%s %s %s %s.", + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))]); + eo_do(o_texts[0], + efl_text_set(buf), + evas_obj_size_get(&w, &h)); + for (i = 1; i < OBNUM; i++) + { + eo_do(o_texts[i], + evas_obj_size_set(w,h), + evas_obj_image_fill_set(0,0,w,h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/proxy_text_random_capi.h b/src/bin/cxx/proxy_text_random_capi.h new file mode 100644 index 0000000..fc0df26 --- /dev/null +++ b/src/bin/cxx/proxy_text_random_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME proxy_text_random_cxx_start +#define NAME "Proxy Text Random" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/rect_blend.cc b/src/bin/cxx/rect_blend.cc new file mode 100644 index 0000000..06f3644 --- /dev/null +++ b/src/bin/cxx/rect_blend.cc @@ -0,0 +1,111 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_blend_start +#define NAME "Rect Blend" +#define ICON "rect.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + int r, g, b, a; + + o = eo_add(EVAS_RECTANGLE_CLASS, G_evas); + o_images[i] = o; + a = rnd()&0xff; + r = ((rnd()&0xff) * a) / 255; + g = ((rnd()&0xff) * a) / 255; + b = ((rnd()&0xff) * a) / 255; + eo_do(o, + evas_obj_color_set(r, g, b, a), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/rect_blend_capi.h b/src/bin/cxx/rect_blend_capi.h new file mode 100644 index 0000000..8f2dcf0 --- /dev/null +++ b/src/bin/cxx/rect_blend_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_blend_cxx_start +#define NAME "Rect Blend" +#define ICON "rect.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/rect_blend_few.cc b/src/bin/cxx/rect_blend_few.cc new file mode 100644 index 0000000..9ceb71b --- /dev/null +++ b/src/bin/cxx/rect_blend_few.cc @@ -0,0 +1,112 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_blend_few_start +#define NAME "Rect Blend Few" +#define ICON "rect.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 3 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + int r, g, b, a; + + o = eo_add(EVAS_RECTANGLE_CLASS, G_evas); + o_images[i] = o; + a = rnd()&0xff; + r = ((rnd()&0xff) * a) / 255; + g = ((rnd()&0xff) * a) / 255; + b = ((rnd()&0xff) * a) / 255; + eo_do(o, evas_obj_color_set(r, g, b, a), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], evas_obj_position_set(x, y), + evas_obj_size_set(w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/rect_blend_few_capi.h b/src/bin/cxx/rect_blend_few_capi.h new file mode 100644 index 0000000..cf39784 --- /dev/null +++ b/src/bin/cxx/rect_blend_few_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_blend_few_cxx_start +#define NAME "Rect Blend Few" +#define ICON "rect.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/rect_blend_pow2.cc b/src/bin/cxx/rect_blend_pow2.cc new file mode 100644 index 0000000..5d34a52 --- /dev/null +++ b/src/bin/cxx/rect_blend_pow2.cc @@ -0,0 +1,112 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_blend_pow2_start +#define NAME "Rect Blend Power 2" +#define ICON "rect.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + int r, g, b, a; + + o = eo_add(EVAS_RECTANGLE_CLASS, G_evas); + o_images[i] = o; + a = 256 - (1 << ((rnd() % 8) + 1)); + if (a < 128) a = 128; + r = ((rnd()&0xff) * a) / 255; + g = ((rnd()&0xff) * a) / 255; + b = ((rnd()&0xff) * a) / 255; + eo_do(o, + evas_obj_color_set(r, g, b, a), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/rect_blend_pow2_capi.h b/src/bin/cxx/rect_blend_pow2_capi.h new file mode 100644 index 0000000..627c9ce --- /dev/null +++ b/src/bin/cxx/rect_blend_pow2_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_blend_pow2_cxx_start +#define NAME "Rect Blend Power 2" +#define ICON "rect.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/rect_blend_pow2_few.cc b/src/bin/cxx/rect_blend_pow2_few.cc new file mode 100644 index 0000000..53d0e9e --- /dev/null +++ b/src/bin/cxx/rect_blend_pow2_few.cc @@ -0,0 +1,113 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_blend_pow2_few_start +#define NAME "Rect Blend Power 2 Few" +#define ICON "rect.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 3 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + int r, g, b, a; + + o = eo_add(EVAS_RECTANGLE_CLASS, G_evas); + o_images[i] = o; + a = 256 - (1 << ((rnd() % 8) + 1)); + if (a < 128) a = 128; + r = ((rnd()&0xff) * a) / 255; + g = ((rnd()&0xff) * a) / 255; + b = ((rnd()&0xff) * a) / 255; + eo_do(o, evas_obj_color_set(r, g, b, a), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], evas_obj_position_set(x, y), + evas_obj_size_set(w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/rect_blend_pow2_few_capi.h b/src/bin/cxx/rect_blend_pow2_few_capi.h new file mode 100644 index 0000000..3d84725 --- /dev/null +++ b/src/bin/cxx/rect_blend_pow2_few_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_blend_pow2_few_cxx_start +#define NAME "Rect Blend Power 2 Few" +#define ICON "rect.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/rect_solid.cc b/src/bin/cxx/rect_solid.cc new file mode 100644 index 0000000..a4df617 --- /dev/null +++ b/src/bin/cxx/rect_solid.cc @@ -0,0 +1,111 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_solid_start +#define NAME "Rect Solid" +#define ICON "rect.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + int r, g, b, a; + + o = eo_add(EVAS_RECTANGLE_CLASS, G_evas); + o_images[i] = o; + a = 0xff; + r = ((rnd()&0xff) * a) / 255; + g = ((rnd()&0xff) * a) / 255; + b = ((rnd()&0xff) * a) / 255; + eo_do(o, + evas_obj_color_set(r, g, b, a), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], + evas_obj_position_set(x, y), + evas_obj_size_set(w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/rect_solid_capi.h b/src/bin/cxx/rect_solid_capi.h new file mode 100644 index 0000000..599bfe7 --- /dev/null +++ b/src/bin/cxx/rect_solid_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_solid_cxx_start +#define NAME "Rect Solid" +#define ICON "rect.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/rect_solid_few.cc b/src/bin/cxx/rect_solid_few.cc new file mode 100644 index 0000000..ebfd495 --- /dev/null +++ b/src/bin/cxx/rect_solid_few.cc @@ -0,0 +1,112 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_solid_few_start +#define NAME "Rect Solid Few" +#define ICON "rect.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +#undef OBNUM +#define OBNUM 3 + +/* standard var */ +static int done = 0; +/* private data */ +static Evas_Object *o_images[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + srnd(); + for (i = 0; i < OBNUM; i++) + { + int r, g, b, a; + + o = eo_add(EVAS_RECTANGLE_CLASS, G_evas); + o_images[i] = o; + a = 0xff; + r = ((rnd()&0xff) * a) / 255; + g = ((rnd()&0xff) * a) / 255; + b = ((rnd()&0xff) * a) / 255; + eo_do(o, evas_obj_color_set(r, g, b, a), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_images[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h, w0, h0; + for (i = 0; i < OBNUM; i++) + { + w0 = 80; + h0 = 80; + w = 5 + ((1.0 + cos((double)(f + (i * 10)) / (7.4 * SLOW) )) * w0 * 2); + h = 5 + ((1.0 + sin((double)(f + (i * 19)) / (12.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2); + eo_do(o_images[i], evas_obj_position_set(x, y), + evas_obj_size_set(w, h)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/rect_solid_few_capi.h b/src/bin/cxx/rect_solid_few_capi.h new file mode 100644 index 0000000..3a75199 --- /dev/null +++ b/src/bin/cxx/rect_solid_few_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME rect_solid_few_cxx_start +#define NAME "Rect Solid Few" +#define ICON "rect.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/tests.h b/src/bin/cxx/tests.h new file mode 100644 index 0000000..affde96 --- /dev/null +++ b/src/bin/cxx/tests.h @@ -0,0 +1,105 @@ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "cxx/font_effect_blur_alpha_capi.h" +#include "cxx/image_blend_border_capi.h" +#include "cxx/image_blend_border_recolor_capi.h" +#include "cxx/image_blend_fade_pow2_unscaled_capi.h" +#include "cxx/image_blend_fade_unscaled_capi.h" +#include "cxx/image_blend_many_smooth_same_scaled_capi.h" +#include "cxx/image_blend_nearest_same_scaled_capi.h" +#include "cxx/image_blend_nearest_scaled_capi.h" +#include "cxx/image_blend_nearest_solid_same_scaled_capi.h" +#include "cxx/image_blend_nearest_solid_scaled_capi.h" +#include "cxx/image_blend_occlude1_capi.h" +#include "cxx/image_blend_occlude1_few_capi.h" +#include "cxx/image_blend_occlude1_many_capi.h" +#include "cxx/image_blend_occlude1_very_many_capi.h" +#include "cxx/image_blend_occlude2_capi.h" +#include "cxx/image_blend_occlude2_few_capi.h" +#include "cxx/image_blend_occlude2_many_capi.h" +#include "cxx/image_blend_occlude2_very_many_capi.h" +#include "cxx/image_blend_occlude3_capi.h" +#include "cxx/image_blend_occlude3_few_capi.h" +#include "cxx/image_blend_occlude3_many_capi.h" +#include "cxx/image_blend_occlude3_very_many_capi.h" +#include "cxx/image_blend_occlude_capi.h" +#include "cxx/image_blend_smooth_same_scaled_capi.h" +#include "cxx/image_blend_smooth_scaled_capi.h" +#include "cxx/image_blend_smooth_solid_same_scaled_capi.h" +#include "cxx/image_blend_smooth_solid_scaled_capi.h" +#include "cxx/image_blend_solid_border_capi.h" +#include "cxx/image_blend_solid_fade_pow2_unscaled_capi.h" +#include "cxx/image_blend_solid_fade_unscaled_capi.h" +#include "cxx/image_blend_solid_middle_border_capi.h" +#include "cxx/image_blend_solid_middle_unscaled_capi.h" +#include "cxx/image_blend_solid_unscaled_capi.h" +#include "cxx/image_blend_unscaled_capi.h" +#include "cxx/image_crossfade_capi.h" +#include "cxx/image_data_argb_alpha_capi.h" +#include "cxx/image_data_argb_capi.h" +#include "cxx/image_data_ycbcr601pl_capi.h" +#include "cxx/image_data_ycbcr601pl_map_nearest_solid_rotate_capi.h" +#include "cxx/image_data_ycbcr601pl_map_solid_rotate_capi.h" +#include "cxx/image_data_ycbcr601pl_wide_stride_capi.h" +#include "cxx/image_map_3d_1_capi.h" +#include "cxx/image_map_3d_2_capi.h" +#include "cxx/image_map_3d_3_capi.h" +#include "cxx/image_map_3d_4_capi.h" +#include "cxx/image_map_3d_5_capi.h" +#include "cxx/image_map_3d_6_capi.h" +#include "cxx/image_map_3d_flow_capi.h" +#include "cxx/image_map_color_alpha_nearest_rotate_capi.h" +#include "cxx/image_map_color_alpha_nearest_solid_rotate_capi.h" +#include "cxx/image_map_color_alpha_rotate_capi.h" +#include "cxx/image_map_color_alpha_solid_rotate_capi.h" +#include "cxx/image_map_color_nearest_rotate_capi.h" +#include "cxx/image_map_color_nearest_solid_rotate_capi.h" +#include "cxx/image_map_color_rotate_capi.h" +#include "cxx/image_map_color_solid_rotate_capi.h" +#include "cxx/image_map_nearest_rotate_capi.h" +#include "cxx/image_map_nearest_solid_rotate_capi.h" +#include "cxx/image_map_rotate_capi.h" +#include "cxx/image_map_solid_rotate_capi.h" +#include "cxx/image_quality_scale_capi.h" +#include "cxx/line_blend_capi.h" +#include "cxx/proxy_image_capi.h" +#include "cxx/proxy_image_offscreen_capi.h" +#include "cxx/proxy_text_fixed_capi.h" +#include "cxx/proxy_text_random_capi.h" +#include "cxx/rect_blend_capi.h" +#include "cxx/rect_blend_few_capi.h" +#include "cxx/rect_blend_pow2_capi.h" +#include "cxx/rect_blend_pow2_few_capi.h" +#include "cxx/rect_solid_capi.h" +#include "cxx/rect_solid_few_capi.h" +#include "cxx/text_basic_capi.h" +#include "cxx/text_change_capi.h" +#include "cxx/text_styles_capi.h" +#include "cxx/text_styles_different_strings_capi.h" +#include "cxx/textblock_auto_align_capi.h" +#include "cxx/textblock_basic_capi.h" +#include "cxx/textblock_intl_capi.h" +#include "cxx/textblock_text_append_capi.h" +#include "cxx/widgets__*_capi.h" +#include "cxx/widgets_file_icons_2_capi.h" +#include "cxx/widgets_file_icons_2_grouped_capi.h" +#include "cxx/widgets_file_icons_2_same_capi.h" +#include "cxx/widgets_file_icons_2_same_grouped_capi.h" +#include "cxx/widgets_file_icons_3_capi.h" +#include "cxx/widgets_file_icons_4_capi.h" +#include "cxx/widgets_file_icons_capi.h" +#include "cxx/widgets_list_1_capi.h" +#include "cxx/widgets_list_1_grouped_capi.h" +#include "cxx/widgets_list_2_capi.h" +#include "cxx/widgets_list_2_grouped_capi.h" +#include "cxx/widgets_list_3_capi.h" +#include "cxx/widgets_list_3_grouped_capi.h" +#include "cxx/widgets_list_4_capi.h" +#include "cxx/widgets_list_4_grouped_capi.h" + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/text_basic.cc b/src/bin/cxx/text_basic.cc new file mode 100644 index 0000000..692c3d7 --- /dev/null +++ b/src/bin/cxx/text_basic.cc @@ -0,0 +1,102 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME text_basic_start +#define NAME "Text Basic" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_texts[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 20), + efl_text_set("This is a test string"), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + eo_do(o_texts[i], evas_obj_size_get(&w, &h)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); + eo_do(o_texts[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/text_basic_capi.h b/src/bin/cxx/text_basic_capi.h new file mode 100644 index 0000000..35e231c --- /dev/null +++ b/src/bin/cxx/text_basic_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME text_basic_cxx_start +#define NAME "Text Basic" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/text_change.cc b/src/bin/cxx/text_change.cc new file mode 100644 index 0000000..c4e880d --- /dev/null +++ b/src/bin/cxx/text_change.cc @@ -0,0 +1,125 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME text_change_start +#define NAME "Text Change" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_texts[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + Evas_Coord x, y, w, h; + char buf[1024]; + const char *strs[] = { + "Big", "Smelly", "Fish", "Pants", "Octopus", "Garden", "There", "I", + "Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy", + "Fiddly", "Family", "Lair", "Monkeys", "Magazine" + }; + srnd(); + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 20)); + snprintf(buf, sizeof(buf), "%s %s %s %s.", + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))]); + eo_do(o, efl_text_set(buf), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_size_get(&w, &h)); + x = (win_w / 2) - (w / 2); + x += sin((double)((i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)((i * 28)) / (43.8 * SLOW)) * (w / 2); + eo_do(o, evas_obj_position_set(x, y), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + char buf[1024]; + const char *strs[] = { + "Big", "Smelly", "Fish", "Pants", "Octopus", "Garden", "There", "I", + "Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy", + "Fiddly", "Family", "Lair", "Monkeys", "Magazine" + }; + for (i = 0; i < OBNUM; i++) + { + snprintf(buf, sizeof(buf), "%s %s %s %s.", + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))]); + eo_do(o_texts[i], efl_text_set(buf)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/text_change_capi.h b/src/bin/cxx/text_change_capi.h new file mode 100644 index 0000000..b9d8306 --- /dev/null +++ b/src/bin/cxx/text_change_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME text_change_cxx_start +#define NAME "Text Change" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/text_styles.cc b/src/bin/cxx/text_styles.cc new file mode 100644 index 0000000..3460812 --- /dev/null +++ b/src/bin/cxx/text_styles.cc @@ -0,0 +1,112 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME text_styles_start +#define NAME "Text Styles" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_texts[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + Evas_Text_Style_Type st; + + st = EVAS_TEXT_STYLE_SHADOW; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, + efl_text_properties_font_set("Vera-Bold", 20), + efl_text_set("This is a test string"), + evas_obj_text_style_set(st), + evas_obj_color_set(255, 255, 255, 255), + evas_obj_text_shadow_color_set(0, 0, 0, 24), + evas_obj_text_glow_color_set(100, 80, 40, 100), + evas_obj_text_glow2_color_set(50, 10, 5, 50), + evas_obj_text_outline_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + st++; + if (st > EVAS_TEXT_STYLE_FAR_SOFT_SHADOW) st = EVAS_TEXT_STYLE_SHADOW; + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + eo_do(o_texts[i], evas_obj_size_get(&w, &h)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); + eo_do(o_texts[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/text_styles_capi.h b/src/bin/cxx/text_styles_capi.h new file mode 100644 index 0000000..7700608 --- /dev/null +++ b/src/bin/cxx/text_styles_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME text_styles_cxx_start +#define NAME "Text Styles" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/text_styles_different_strings.cc b/src/bin/cxx/text_styles_different_strings.cc new file mode 100644 index 0000000..ffc3b63 --- /dev/null +++ b/src/bin/cxx/text_styles_different_strings.cc @@ -0,0 +1,123 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME text_styles_different_strings_start +#define NAME "Text Styles Different Strings" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_texts[OBNUM]; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + Evas_Text_Style_Type st; + char buf[1024]; + const char *strs[] = { + "Big", "Smelly", "Fish", "Pants", "Octopus", "Garden", "There", "I", + "Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy", + "Fiddly", "Family", "Lair", "Monkeys", "Magazine" + }; + + srnd(); + st = EVAS_TEXT_STYLE_SHADOW; + for (i = 0; i < OBNUM; i++) + { + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 20)); + snprintf(buf, sizeof(buf), "%s %s %s %s.", + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))], + strs[rnd() % (sizeof(strs) / sizeof(char *))]); + eo_do(o, efl_text_set(buf), + evas_obj_text_style_set(st), + evas_obj_color_set(255, 255, 255, 255), + evas_obj_text_shadow_color_set(0, 0, 0, 24), + evas_obj_text_glow_color_set(100, 80, 40, 100), + evas_obj_text_glow2_color_set(50, 10, 5, 50), + evas_obj_text_outline_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + st++; + if (st > EVAS_TEXT_STYLE_FAR_SOFT_SHADOW) st = EVAS_TEXT_STYLE_SHADOW; + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < OBNUM; i++) eo_del(o_texts[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, w, h; + for (i = 0; i < OBNUM; i++) + { + eo_do(o_texts[i], evas_obj_size_get(&w, &h)); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2); + eo_do(o_texts[i], evas_obj_position_set(x, y)); + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/text_styles_different_strings_capi.h b/src/bin/cxx/text_styles_different_strings_capi.h new file mode 100644 index 0000000..c5f0794 --- /dev/null +++ b/src/bin/cxx/text_styles_different_strings_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME text_styles_different_strings_cxx_start +#define NAME "Text Styles Different Strings" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/textblock_auto_align.cc b/src/bin/cxx/textblock_auto_align.cc new file mode 100644 index 0000000..bc6c4dc --- /dev/null +++ b/src/bin/cxx/textblock_auto_align.cc @@ -0,0 +1,126 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME textblock_auto_align_start +#define NAME "Textblock auto align" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_text; + +/* setup */ +static void _setup(void) +{ + Evas_Object *o; + Evas_Textblock_Style *st; + + o = eo_add(EVAS_TEXTBLOCK_CLASS, G_evas); + o_text = o; + st = evas_textblock_style_new(); + evas_textblock_style_set + (st, + "DEFAULT='font=Sans font_size=10 color=#000000 wrap=word'" + ); + eo_do(o, + evas_obj_textblock_style_set(st), + evas_obj_textblock_clear(), + evas_obj_textblock_text_markup_set( + "This is a test of auto alignment in Evas" + "
" + "This text should be left aligned" + "\xE2\x80\x8FThis text should be right aligned" + "\xE2\x80\x8FThis text should be right aligned
" + "Same as this text." + "This text should be left aligned
" + "\xE2\x80\x8FSame as this text." + "

" + "The word 'זה' should be the rightmost, 'טקסט' after, and 'בעברית' last
" + "in the following text:" + "זה טקסט בעברית" + "
" + "In the next text, the paragraph should be right aligned and the
" + "words should appear in the following order: 'דוגמה' first, 'of' second,
" + "‎'טקסט' third, 'english' fourth and 'in' fifth, counting from right to left" + "דוגמה of טקסט in english." + ), + evas_obj_visibility_set(EINA_TRUE)); + evas_textblock_style_free(st); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + eo_del(o_text); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + Evas_Coord x, y, w, h, w0, h0; + int i = 0; + + eo_do(o_text, evas_obj_textblock_size_native_get(&w0, &h0)); + w = w0; + h = h0; + w += fabs(sin((double)(f + (i * 13)) / (31.1 * SLOW))) * (w0); + x = (win_w / 2) - (w / 2); + y = (win_h / 2) - (h0 / 2); + eo_do(o_text, + evas_obj_position_set(x, y), + evas_obj_size_set(w, h)); + + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/textblock_auto_align_capi.h b/src/bin/cxx/textblock_auto_align_capi.h new file mode 100644 index 0000000..6a802f0 --- /dev/null +++ b/src/bin/cxx/textblock_auto_align_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME textblock_auto_align_cxx_start +#define NAME "Textblock auto align" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/textblock_basic.cc b/src/bin/cxx/textblock_basic.cc new file mode 100644 index 0000000..fee4518 --- /dev/null +++ b/src/bin/cxx/textblock_basic.cc @@ -0,0 +1,189 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME textblock_basic_start +#define NAME "Textblock Basic" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_text; + +/* setup */ +static void _setup(void) +{ + Evas_Object *o; + Evas_Textblock_Style *st; + + o = eo_add(EVAS_TEXTBLOCK_CLASS, G_evas); + o_text = o; + st = evas_textblock_style_new(); + evas_textblock_style_set + (st, + "DEFAULT='font=Vera,Kochi font_size=8 align=left color=#000000 wrap=word'" + "center='+ font=Vera,Kochi font_size=10 align=center'" + "/center='- \n'" + "right='+ font=Vera,Kochi font_size=10 align=right'" + "/right='- \n'" + "blockquote='+ left_margin=+24 right_margin=+24 font=Vera,Kochi font_size=10 align=left'" + "h1='+ font_size=20'" + "red='+ color=#ff0000'" + "p='+ font=Vera,Kochi font_size=10 align=left'" + "/p='- \n'" + ); + eo_do(o, + evas_obj_textblock_style_set(st), + evas_obj_textblock_clear(), + evas_obj_textblock_text_markup_set( + "

Title


" + "

A pragraph here red text and stuff.

" + "

And escaping < and > as well as & as

normal.

" + "

If you want a newline use <br>
woo a new line!

" + "Right " + "aligned " + "text " + "should " + "go here " + "as it is " + "within " + "right tags " + "to make it align to the " + "right hand " + "side of " + "the textblock." + "

And " + "now we need " + "to test some CO" + "LO" + "R Bla Rai" + " Stuff.

" + "20 Linesize
" + "40 Linesize
" + "100 percent Linerelsize
" + "150 percent Linerelsize
" + "200 percent Linerelsize
" + "" + "
" + "(日本語 カタカナ ひらがな) " + "Round about the cauldron go; " + "In the poison'd entrails throw. " + "Toad, that under cold stone " + "Days and nights has thirty-one " + "Swelter'd venom sleeping got, " + "Boil thou first i' the charmed pot. " + "Double, double toil and trouble; " + "Fire burn, and cauldron bubble. " + "Fillet of a fenny snake, " + "In the cauldron boil and bake; " + "Eye of newt and toe of frog, " + "Wool of bat and tongue of dog, " + "Adder's fork and blind-worm's sting, " + "Lizard's leg and owlet's wing, " + "For a charm of powerful trouble, " + "Like a hell-broth boil and bubble. " + "Double, double toil and trouble; " + "Fire burn and cauldron bubble. " + "Scale of dragon, tooth of wolf, " + "Witches' mummy, maw and gulf " + "Of the ravin'd salt-sea shark, " + "Root of hemlock digg'd i' the dark, " + "Liver of blaspheming Jew, " + "Gall of goat, and slips of yew " + "Silver'd in the moon's eclipse, " + "Nose of Turk and Tartar's lips, " + "Finger of birth-strangled babe " + "Ditch-deliver'd by a drab, " + "Make the gruel thick and slab: " + "Add thereto a tiger's chaudron, " + "For the ingredients of our cauldron. " + "Double, double toil and trouble; " + "Fire burn and cauldron bubble. " + "Cool it with a baboon's blood, " + "Then the charm is firm and good. " + "Heizölrückstoßabdämpfung fløde pingüino kilómetros cœur déçu l'âme " + "plutôt naïve Louÿs rêva crapaüter Íosa Úrmhac Óighe pór Éava Ádhaim" + "
" + ), + evas_obj_visibility_set(EINA_TRUE)); + + evas_textblock_style_free(st); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + eo_del(o_text); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + Evas_Coord x, y, w, h, w0, h0; + int i = 0; + + w0 = 160; + h0 = 120; + w = 150 + ((1.0 + cos((double)(f + (i * 10)) / (37.4 * SLOW) )) * w0 * 2); + h = 50 + ((1.0 + sin((double)(f + (i * 19)) / (52.6 * SLOW) )) * h0 * 2); + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (86.7 * SLOW)) * (w0 / 2); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (93.8 * SLOW)) * (h0 / 2); + eo_do(o_text, + evas_obj_position_set(x, y), + evas_obj_size_set(w, 5000)); + + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/textblock_basic_capi.h b/src/bin/cxx/textblock_basic_capi.h new file mode 100644 index 0000000..78bf1d8 --- /dev/null +++ b/src/bin/cxx/textblock_basic_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME textblock_basic_cxx_start +#define NAME "Textblock Basic" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/textblock_intl.cc b/src/bin/cxx/textblock_intl.cc new file mode 100644 index 0000000..e96935c --- /dev/null +++ b/src/bin/cxx/textblock_intl.cc @@ -0,0 +1,159 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME textblock_intl_start +#define NAME "Textblock Intl" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_text; + +/* setup */ +static void _setup(void) +{ + Evas_Object *o; + Evas_Textblock_Style *st; + + o = eo_add(EVAS_TEXTBLOCK_CLASS, G_evas); + o_text = o; + st = evas_textblock_style_new(); + evas_textblock_style_set + (st, + "DEFAULT='font=Sans font_size=10 align=left color=#000000 wrap=word'" + ); + eo_do(o, + evas_obj_textblock_style_set(st), + evas_obj_textblock_clear(), + evas_obj_textblock_text_markup_set( + "This is a test of International test rendering in Evas
" + "
" + "Danish: 'Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen'
" + "German: 'Heizölrückstoßabdämpfung'
" + "Spanish: 'El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y'
" + "French: 'Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en'
" + "Irish Gaelic: 'D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh'
" + "Hungarian: 'Árvíztűrő tükörfúrógép'
" + "Icelandic: 'Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa'
" + "Japanese (hiragana): 'いろはにほへとちりぬるを'
" + "Japanese (katakana): 'イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム'
" + "Hebrew: 'דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה?‏'
" + "Polish: 'Pchnąć w tę łódź jeża lub ośm skrzyń fig'
" + "Russian: 'В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!'
" + "IPA: 'ˈjunɪˌkoːd'
" + "American Dictionary: 'Ūnĭcōde̽'
" + "Anglo-saxon: 'ᛡᚢᚾᛁᚳᚩᛞ'
" + "Arabic: 'يونِكود'
" + "Armenian: 'Յունիկօդ'
" + "Bengali: 'য়ূনিকোড'
" + "Bopomofo: 'ㄊㄨㄥ˅ ㄧˋ ㄇㄚ˅'
" + "Canadian Syllabics: 'ᔫᗂᑰᑦ'
" + "Cherokee: 'ᏳᏂᎪᏛ'
" + "Chinese: '萬國碼'
" + "Ethiopic: 'ዩኒኮድ'
" + "Georgian: 'უნიკოდი'
" + "Greek: 'Γιούνικοντ'
" + + /* also test the html entity stuff a bit */ + "Greek continued: 'τυλθ'
" + + "Gujarati: 'યૂનિકોડ'
" + "Gurmukhi: 'ਯੂਨਿਕੋਡ'
" + "Hindi: 'यूनिकोड'
" + "Kannada: 'ಯೂನಿಕೋಡ್'
" + "Khmer: 'យូនីគោដ'
" + "Korean: '유니코드'
" + "Malayalam: 'യൂനികോഡ്'
" + "Ogham: 'ᚔᚒᚅᚔᚉᚑᚇ'
" + "Oriya: 'ୟୂନିକୋଡ'
" + "Persian: 'یونی‌کُد'
" + "Sinhala: 'යණනිකෞද්'
" + "Syriac: 'ܝܘܢܝܩܘܕ'
" + "Tamil:'யூனிகோட்'
" + "Telugu: 'యూనికోడ్'
" + "Thai: 'ยูนืโคด'
" + "Tibetan: 'ཨུ་ནི་ཀོཌྲ།'
" + "Yiddish: 'יוניקאָד'
" + ), + evas_obj_visibility_set(EINA_TRUE)); + + evas_textblock_style_free(st); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + eo_del(o_text); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + Evas_Coord x, y, w, h, w0, h0; + int i = 0; + + eo_do(o_text, evas_obj_textblock_size_native_get(&w0, &h0)); + w = w0; + h = h0; + x = (win_w / 2) - (w / 2); + x += sin((double)(f + (i * 13)) / (31.1 * SLOW)) * (w0 / (2 * 2)); + y = (win_h / 2) - (h / 2); + y += cos((double)(f + (i * 28)) / (19.6 * SLOW)) * (h0 / (2 * 2)); + eo_do(o_text, + evas_obj_position_set(x, y), + evas_obj_size_set(w, h)); + + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/textblock_intl_capi.h b/src/bin/cxx/textblock_intl_capi.h new file mode 100644 index 0000000..3aedbaf --- /dev/null +++ b/src/bin/cxx/textblock_intl_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME textblock_intl_cxx_start +#define NAME "Textblock Intl" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/textblock_text_append.cc b/src/bin/cxx/textblock_text_append.cc new file mode 100644 index 0000000..1e38d2a --- /dev/null +++ b/src/bin/cxx/textblock_text_append.cc @@ -0,0 +1,175 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME textblock_text_append_start +#define NAME "Textblock text_append" +#define ICON "text.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; + +/* private data */ +static Evas_Object *o_text; + +/* setup */ +static void _setup(void) +{ + Evas_Object *o; + Evas_Textblock_Style *st; + + o = eo_add(EVAS_TEXTBLOCK_CLASS, G_evas); + o_text = o; + st = evas_textblock_style_new(); + evas_textblock_style_set + (st, + "DEFAULT='font=Sans font_size=10 color=#000000 wrap=word'" + ); + eo_do(o, + evas_obj_textblock_style_set(st), + evas_obj_textblock_clear(), + evas_obj_textblock_text_markup_set( + "This test just appends and removes text from different paragraphs, it's " + "not a very visual test, it's included for benchmarking purposes." +"" +"Enlightenment is the flagship and original name bearer for this project. Once it was just a humble window manager for X11 that wanted to do things differently. To do them better, but it has expanded. This can be confusing so when we refer to Enlightenment, we may mean the project as a whole or just the window manager proper. The libraries behind Enlightenment are referred to as EFL collectively, each with a specific name and purpose." +"" +"The window manager is a lean, fast, modular and very extensible window manager for X11 and Linux. It is classed as a \"desktop shell\" providing the things you need to operate your desktop (or laptop), but is not a whole application suite. This covered launching applications, managing their windows and doing other system tasks like suspending, reboots, managing files etc.
" +"Platform Support
" +"Linux BSD Windows Apple" +"" +"Enlightenment and EFL support several platforms, though Linux is the primary platform of choice for our developers, some make efforts to make things work on FreeBSD and other BSD's, Solaris, MacOS X, Windows (XP, Vista, 7 etc.), Windows CE and more. Compatibility will vary, but most of core EFL support all Linuxes, BSD's, Solaris and other UNIX-like OS's. Mac support should work mostly thanks to the X11 support in OS X, and Windows support exists for most of the core libraries (XP, Vista, 7, CE)." +"" +"Please contact us for more information if you have problems with support in your platform. Just remember we have limited resources and most of them focus on the core open-source targets.
" +"Proven effectiveness" +"" +"Enlightenment libraries already power millions of systems, from mobile phones to set top boxes, desktops, laptops, game systems and more. It is only now being recognized for its forward-thinking approaches, as products and designers want to do more than the boring functional user experiences of the past. This is where EFL excels." +"" +"Free.fr is shipping millions of set top boxes in France, powered by EFL. The Openmoko Freerunner sold thousands of devices with EFL on them. Yellow Dog Linux for the Sony PS3 ships with Enlightenment as the default. EFL has been used on printers, netbooks and more." +"" +"Building Blocks" +"" +"Enlightenment, the window manager is built on top of building blocks known as EFL (the Enlightenment Foundation Libraries). There are more than can be sensibly put into the simple block diagram above, but this covers the essentials.
" +"Simple E stack" +"" +"Pretty much any application written using Core EFL libraries will use one or more of these depending on its needs. It may only need the lower level ones or use all of them to the top of the stack. Each library fulfills a purpose, so it may be skipped if not needed.
" +"CoreCore EFL components are: * Evas
" +" * Eina
" +" * Edje
" +" * Eet
" +" * Ecore
" +" * Efreet
" +" * E_Dbus
" +" * Embryo
" +" * Eeze
" +" * Elementary (window manager will use this in 0.18)Binding support exists for several languages such as: * Python
" +" * Javascript
" +" * Perl
" +" * C++
" +" * RubyThere are other libraries and applications which build on core EFL and function on other systems too, providing more functionality, examples, and utility: * Emotion
" +" * Ethumb
" +" * Exquisite
" +" * Eve
" +" * Edje Editor
" +" * E UPnP
" +" * Enesim
" +" * Expedite
" +" * Epdf
" +" * Exchange
" +" * Eweather
" +" * Rage
" +" * Evil
" +" * Exalt
" +"Devices
" +"LaptopEnlightenment and EFL use desktop Linux systems as a primary method of development because it is fast and simple to do so, but all of it is written with the express goal in mind of also working on devices from Mobile Phones, to Televisions, Netbooks and more.
" +"PhoneWe have run and tested on x86-32, x86-64, Atom, Power-PC, ARM (ARM9, ARM11, Cortex-A8 and more), MIPS, Sparc, and many other architectures. The suggested minimum RAM required for a full Linux system + EFL application is 16MB, but you may be able to get by on 8MB. For full functionality 64MB or more is suggested. As little as a 200Mhz ARM core will provide sufficient processing power (depending on needs).
" +"Various ProcessorsScreens from even less than QVGA (320x240 or 240x320) screens all the way up to and beyond full-HD (1920x1080) are covered by EFL. It has the ability to scale user interfaces to almost any sane resolution, as well as adapt to differing input device resolutions, from mouse and stylus to fat fingers. It can draw displays from e-paper through 8-bit paletted displays, 16bit beautifully dithered ones all the way to full 24/32bit OLED beauties.
" +"Graphics" +"" +"Enlightenment is built by designers and programmers who want others to be able to do more with less. Some of Enlightenment's libraries do not do anything with graphics at all, but it is the ones that do that are the shining stars of the Enlightenment world.Evas is the canvas layer. It is not a drawing library. It is not like OpenGL, Cairo, XRender, GDI, DirectFB etc. It is a scene graph library that retains state of all objects in it. They are created then manipulated until they are no longer needed, at which point they are deleted. This allows the programmer to work in terms that a designer thinks of. It is direct mapping, as opposed to having to convert the concepts into drawing commands in the right order, calculate minimum drawing calls needed to get the job done etc.Evas also handles abstracting the rendering mechanism. With zero changes the same application can move from software to OpenGL rendering, as they all use an abstracted scene graph to describe the world (canvas) to Evas. Evas supports multiple targets, but the most useful are the high-speed software rendering engines and OpenGL (as well as OpenGL-ES 2.0).Evas not only does quality rendering and compositing, but also can scale, rotate and fully 3D transform objects, allowing for sought-after 3D effects in your interfaces. It supplies these abilities in both software and OpenGL rendering, so you are never caught with unexpected loss of features. The software rendering is even fast enough to provide the 3D without any acceleration on devices for simple uses.Edje is a meta-object design library that is somewhere between Flash, PSD, SVG and HTML+CSS. It separates design out from code and into a dynamically loaded data file. This file is compressed and loaded very quickly, along with being cached and shared betweeen instances.This allows design to be provided at runtime by different design (EDJ) files, leaving the programmer to worry about overall application implementation and coarse grained UI as opposed to needing to worry about all the little details that the artists may vary even until the day before shipping the product.
" + ), + evas_obj_position_set(0, 0), + evas_obj_size_set(win_w, win_h), + evas_obj_visibility_set(EINA_TRUE)); + + evas_textblock_style_free(st); + + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + eo_del(o_text); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + Evas_Textblock_Cursor *cur; + static Evas_Textblock_Cursor *cur2; + eo_do(o_text, cur = evas_obj_textblock_cursor_get()); + evas_textblock_cursor_text_append(cur, "*"); + evas_textblock_cursor_char_delete(cur); + + evas_textblock_cursor_paragraph_char_first(cur); + if (!cur2) + { + eo_do(o_text, cur2 = evas_obj_textblock_cursor_new()); + evas_textblock_cursor_paragraph_last(cur2); + evas_textblock_cursor_paragraph_char_first(cur2); + } + if (!evas_textblock_cursor_compare(cur, cur2)) + evas_textblock_cursor_paragraph_first(cur); + else + evas_textblock_cursor_paragraph_next(cur); + + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/textblock_text_append_capi.h b/src/bin/cxx/textblock_text_append_capi.h new file mode 100644 index 0000000..2844e88 --- /dev/null +++ b/src/bin/cxx/textblock_text_append_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME textblock_text_append_cxx_start +#define NAME "Textblock text_append" +#define ICON "text.png" + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets__*_capi.h b/src/bin/cxx/widgets__*_capi.h new file mode 100644 index 0000000..4d3c2b3 --- /dev/null +++ b/src/bin/cxx/widgets__*_capi.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets__*_cxx_start + + + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_file_icons.cc b/src/bin/cxx/widgets_file_icons.cc new file mode 100644 index 0000000..34e3d1f --- /dev/null +++ b/src/bin/cxx/widgets_file_icons.cc @@ -0,0 +1,142 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_start +#define NAME "Widgets File Icons" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_image_fill_set(0, 0, ICON_SIZE, ICON_SIZE), + evas_obj_size_set(ICON_SIZE, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(icons[i % 13]), + evas_obj_text_style_set(EVAS_TEXT_STYLE_FAR_SOFT_SHADOW), + evas_obj_color_set(255, 255, 255, 255), + evas_obj_text_shadow_color_set(0, 0, 0, 24), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x + 8, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE + 16 - tw) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4)); + x += ICON_SIZE + 16; + if (x > win_w) + { + x = 0; + y += ICON_SIZE + 16; + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_file_icons_2.cc b/src/bin/cxx/widgets_file_icons_2.cc new file mode 100644 index 0000000..82ed0cc --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_2.cc @@ -0,0 +1,140 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_2_start +#define NAME "Widgets File Icons 2" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_image_fill_set(0, 0, ICON_SIZE, ICON_SIZE), + evas_obj_size_set(ICON_SIZE, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(icons[i % 13]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x + 8, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE + 16 - tw) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4)); + x += ICON_SIZE + 16; + if (x > win_w) + { + x = 0; + y += ICON_SIZE + 16; + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_file_icons_2_capi.h b/src/bin/cxx/widgets_file_icons_2_capi.h new file mode 100644 index 0000000..500dec4 --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_2_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_2_cxx_start +#define NAME "Widgets File Icons 2" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_file_icons_2_grouped.cc b/src/bin/cxx/widgets_file_icons_2_grouped.cc new file mode 100644 index 0000000..41e53ba --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_2_grouped.cc @@ -0,0 +1,149 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_2_grouped_start +#define NAME "Widgets File Icons 2 Grouped" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_image_fill_set(0, 0, ICON_SIZE, ICON_SIZE), + evas_obj_size_set(ICON_SIZE, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(icons[i % 13]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_raise()); + } + for (i = 0; i < NUM; i++) + { + if (i > 13) + eo_do(o_images[i], evas_obj_stack_above(o_images[i - 13])); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x + 8, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE + 16 - tw) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4)); + x += ICON_SIZE + 16; + if (x > win_w) + { + x = 0; + y += ICON_SIZE + 16; + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_file_icons_2_grouped_capi.h b/src/bin/cxx/widgets_file_icons_2_grouped_capi.h new file mode 100644 index 0000000..5150272 --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_2_grouped_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_2_grouped_cxx_start +#define NAME "Widgets File Icons 2 Grouped" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_file_icons_2_same.cc b/src/bin/cxx/widgets_file_icons_2_same.cc new file mode 100644 index 0000000..a4e9756 --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_2_same.cc @@ -0,0 +1,125 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_2_same_start +#define NAME "Widgets File Icons 2 Same" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "e.png", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path(icons[i % 1]), NULL), + evas_obj_image_fill_set(0, 0, ICON_SIZE, ICON_SIZE), + evas_obj_size_set(ICON_SIZE, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(icons[i % 1]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x + 8, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE + 16 - tw) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4)); + x += ICON_SIZE + 16; + if (x > win_w) + { + x = 0; + y += ICON_SIZE + 16; + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_file_icons_2_same_capi.h b/src/bin/cxx/widgets_file_icons_2_same_capi.h new file mode 100644 index 0000000..d7e3834 --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_2_same_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_2_same_cxx_start +#define NAME "Widgets File Icons 2 Same" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_file_icons_2_same_grouped.cc b/src/bin/cxx/widgets_file_icons_2_same_grouped.cc new file mode 100644 index 0000000..e3a8ffb --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_2_same_grouped.cc @@ -0,0 +1,129 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_2_same_grouped_start +#define NAME "Widgets File Icons 2 Same Grouped" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "e.png", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path(icons[i % 1]), NULL), + evas_obj_image_fill_set(0, 0, ICON_SIZE, ICON_SIZE), + evas_obj_size_set(ICON_SIZE, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(icons[i % 1]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_raise()); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x + 8, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE + 16 - tw) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4)); + x += ICON_SIZE + 16; + if (x > win_w) + { + x = 0; + y += ICON_SIZE + 16; + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_file_icons_2_same_grouped_capi.h b/src/bin/cxx/widgets_file_icons_2_same_grouped_capi.h new file mode 100644 index 0000000..a301b62 --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_2_same_grouped_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_2_same_grouped_cxx_start +#define NAME "Widgets File Icons 2 Same Grouped" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_file_icons_3.cc b/src/bin/cxx/widgets_file_icons_3.cc new file mode 100644 index 0000000..2ee74ed --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_3.cc @@ -0,0 +1,140 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_3_start +#define NAME "Widgets File Icons 3" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 16 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_image_fill_set(0, 0, ICON_SIZE, ICON_SIZE), + evas_obj_size_set(ICON_SIZE, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(icons[i % 13]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x + 8, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE + 16 - tw) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4)); + x += ICON_SIZE + 16; + if (x > win_w) + { + x = 0; + y += ICON_SIZE + 16; + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_file_icons_3_capi.h b/src/bin/cxx/widgets_file_icons_3_capi.h new file mode 100644 index 0000000..96188db --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_3_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_3_cxx_start +#define NAME "Widgets File Icons 3" +#define ICON "widgets.png" +#define ICON_SIZE 16 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_file_icons_4.cc b/src/bin/cxx/widgets_file_icons_4.cc new file mode 100644 index 0000000..7558807 --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_4.cc @@ -0,0 +1,140 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_4_start +#define NAME "Widgets File Icons 4" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 96 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_image_fill_set(0, 0, ICON_SIZE, ICON_SIZE), + evas_obj_size_set(ICON_SIZE, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(icons[i % 13]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x + 8, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE + 16 - tw) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + cent, y + ICON_SIZE + 4)); + x += ICON_SIZE + 16; + if (x > win_w) + { + x = 0; + y += ICON_SIZE + 16; + } + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_file_icons_4_capi.h b/src/bin/cxx/widgets_file_icons_4_capi.h new file mode 100644 index 0000000..9a68aed --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_4_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_4_cxx_start +#define NAME "Widgets File Icons 4" +#define ICON "widgets.png" +#define ICON_SIZE 96 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_file_icons_capi.h b/src/bin/cxx/widgets_file_icons_capi.h new file mode 100644 index 0000000..4de7c0e --- /dev/null +++ b/src/bin/cxx/widgets_file_icons_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_file_icons_cxx_start +#define NAME "Widgets File Icons" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_list_1.cc b/src/bin/cxx/widgets_list_1.cc new file mode 100644 index 0000000..dd7066e --- /dev/null +++ b/src/bin/cxx/widgets_list_1.cc @@ -0,0 +1,152 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_1_start +#define NAME "Widgets List" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *labels[] = +{ + "Andrew", + "Alex", + "Amanda", + "Arthur", + "Astrid", + "Avery", + + "Beethoven", + "Billy", + "Bob", + "Bundy", + + "Candy", + "Carsten", + + "Danny", + "Dennis", + "Dirk", + "Doug", + + "Edmond", + "Erik", + + "Fernando", + "Frank", + "Frederick", + + "Gabby", + "George", + "Gilroy", + "Goodrich", + "Gumby", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path("pan.png"), NULL), + evas_obj_size_set(win_w, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(labels[i % 26]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE - th) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + 8, y + cent)); + y += ICON_SIZE; + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_list_1_capi.h b/src/bin/cxx/widgets_list_1_capi.h new file mode 100644 index 0000000..142c79f --- /dev/null +++ b/src/bin/cxx/widgets_list_1_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_1_cxx_start +#define NAME "Widgets List" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_list_1_grouped.cc b/src/bin/cxx/widgets_list_1_grouped.cc new file mode 100644 index 0000000..93c1d83 --- /dev/null +++ b/src/bin/cxx/widgets_list_1_grouped.cc @@ -0,0 +1,160 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_1_grouped_start +#define NAME "Widgets List Grouped" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *labels[] = +{ + "Andrew", + "Alex", + "Amanda", + "Arthur", + "Astrid", + "Avery", + + "Beethoven", + "Billy", + "Bob", + "Bundy", + + "Candy", + "Carsten", + + "Danny", + "Dennis", + "Dirk", + "Doug", + + "Edmond", + "Erik", + + "Fernando", + "Frank", + "Frederick", + + "Gabby", + "George", + "Gilroy", + "Goodrich", + "Gumby", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path("pan.png"), NULL), + evas_obj_size_set(win_w, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(labels[i % 26]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_raise()); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_texts[i], evas_obj_raise()); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE - th) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + 8, y + cent)); + y += ICON_SIZE; + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_list_1_grouped_capi.h b/src/bin/cxx/widgets_list_1_grouped_capi.h new file mode 100644 index 0000000..2e8f134 --- /dev/null +++ b/src/bin/cxx/widgets_list_1_grouped_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_1_grouped_cxx_start +#define NAME "Widgets List Grouped" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_list_2.cc b/src/bin/cxx/widgets_list_2.cc new file mode 100644 index 0000000..9a93e1c --- /dev/null +++ b/src/bin/cxx/widgets_list_2.cc @@ -0,0 +1,152 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_2_start +#define NAME "Widgets List 2" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 32 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *labels[] = +{ + "Andrew", + "Alex", + "Amanda", + "Arthur", + "Astrid", + "Avery", + + "Beethoven", + "Billy", + "Bob", + "Bundy", + + "Candy", + "Carsten", + + "Danny", + "Dennis", + "Dirk", + "Doug", + + "Edmond", + "Erik", + + "Fernando", + "Frank", + "Frederick", + + "Gabby", + "George", + "Gilroy", + "Goodrich", + "Gumby", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path("pan.png"), NULL), + evas_obj_size_set(win_w, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(labels[i % 26]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE - th) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + 8, y + cent)); + y += ICON_SIZE; + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_list_2_capi.h b/src/bin/cxx/widgets_list_2_capi.h new file mode 100644 index 0000000..b0881af --- /dev/null +++ b/src/bin/cxx/widgets_list_2_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_2_cxx_start +#define NAME "Widgets List 2" +#define ICON "widgets.png" +#define ICON_SIZE 32 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_list_2_grouped.cc b/src/bin/cxx/widgets_list_2_grouped.cc new file mode 100644 index 0000000..b9ea16b --- /dev/null +++ b/src/bin/cxx/widgets_list_2_grouped.cc @@ -0,0 +1,160 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_2_grouped_start +#define NAME "Widgets List 2 Grouped" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *labels[] = +{ + "Andrew", + "Alex", + "Amanda", + "Arthur", + "Astrid", + "Avery", + + "Beethoven", + "Billy", + "Bob", + "Bundy", + + "Candy", + "Carsten", + + "Danny", + "Dennis", + "Dirk", + "Doug", + + "Edmond", + "Erik", + + "Fernando", + "Frank", + "Frederick", + + "Gabby", + "George", + "Gilroy", + "Goodrich", + "Gumby", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path("pan.png"), NULL), + evas_obj_size_set(win_w, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(labels[i % 26]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_raise()); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_texts[i], evas_obj_raise()); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x, y)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE - th) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + 8, y + cent)); + y += ICON_SIZE; + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_list_2_grouped_capi.h b/src/bin/cxx/widgets_list_2_grouped_capi.h new file mode 100644 index 0000000..22feb74 --- /dev/null +++ b/src/bin/cxx/widgets_list_2_grouped_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_2_grouped_cxx_start +#define NAME "Widgets List 2 Grouped" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_list_3.cc b/src/bin/cxx/widgets_list_3.cc new file mode 100644 index 0000000..c655b84 --- /dev/null +++ b/src/bin/cxx/widgets_list_3.cc @@ -0,0 +1,183 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_3_start +#define NAME "Widgets List 3" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_icons[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +static const char *labels[] = +{ + "Andrew", + "Alex", + "Amanda", + "Arthur", + "Astrid", + "Avery", + + "Beethoven", + "Billy", + "Bob", + "Bundy", + + "Candy", + "Carsten", + + "Danny", + "Dennis", + "Dirk", + "Doug", + + "Edmond", + "Erik", + + "Fernando", + "Frank", + "Frederick", + + "Gabby", + "George", + "Gilroy", + "Goodrich", + "Gumby", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path("pan.png"), NULL), + evas_obj_size_set(win_w, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_icons[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_size_set(ICON_SIZE - 8, ICON_SIZE - 8), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(labels[i % 26]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_icons[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x, y)); + eo_do(o_icons[i], evas_obj_position_set(x + 4, y + 4)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE - th) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + 8 + ICON_SIZE + 8, y + cent)); + y += ICON_SIZE; + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_list_3_capi.h b/src/bin/cxx/widgets_list_3_capi.h new file mode 100644 index 0000000..3777093 --- /dev/null +++ b/src/bin/cxx/widgets_list_3_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_3_cxx_start +#define NAME "Widgets List 3" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_list_3_grouped.cc b/src/bin/cxx/widgets_list_3_grouped.cc new file mode 100644 index 0000000..28b92b7 --- /dev/null +++ b/src/bin/cxx/widgets_list_3_grouped.cc @@ -0,0 +1,200 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_3_grouped_start +#define NAME "Widgets List 3 Grouped" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 64 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_icons[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +static const char *labels[] = +{ + "Andrew", + "Alex", + "Amanda", + "Arthur", + "Astrid", + "Avery", + + "Beethoven", + "Billy", + "Bob", + "Bundy", + + "Candy", + "Carsten", + + "Danny", + "Dennis", + "Dirk", + "Doug", + + "Edmond", + "Erik", + + "Fernando", + "Frank", + "Frederick", + + "Gabby", + "George", + "Gilroy", + "Goodrich", + "Gumby", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path("pan.png"), NULL), + evas_obj_size_set(win_w, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_icons[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_size_set(ICON_SIZE - 8, ICON_SIZE - 8), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(labels[i % 26]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_raise()); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_icons[i], evas_obj_raise()); + } + for (i = 0; i < NUM; i++) + { + if (i > 13) + eo_do(o_icons[i], evas_obj_stack_above(o_icons[i - 13])); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_texts[i], evas_obj_raise()); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_icons[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x, y)); + eo_do(o_icons[i], evas_obj_position_set(x + 4, y + 4)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE - th) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + 8 + ICON_SIZE + 8, y + cent)); + y += ICON_SIZE; + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_list_3_grouped_capi.h b/src/bin/cxx/widgets_list_3_grouped_capi.h new file mode 100644 index 0000000..1c9a50a --- /dev/null +++ b/src/bin/cxx/widgets_list_3_grouped_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_3_grouped_cxx_start +#define NAME "Widgets List 3 Grouped" +#define ICON "widgets.png" +#define ICON_SIZE 64 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_list_4.cc b/src/bin/cxx/widgets_list_4.cc new file mode 100644 index 0000000..a624af9 --- /dev/null +++ b/src/bin/cxx/widgets_list_4.cc @@ -0,0 +1,180 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_4_start +#define NAME "Widgets List 4" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 32 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_icons[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +static const char *labels[] = +{ + "Andrew", + "Alex", + "Amanda", + "Arthur", + "Astrid", + "Avery", + + "Beethoven", + "Billy", + "Bob", + "Bundy", + + "Candy", + "Carsten", + + "Danny", + "Dennis", + "Dirk", + "Doug", + + "Edmond", + "Erik", + + "Fernando", + "Frank", + "Frederick", + + "Gabby", + "George", + "Gilroy", + "Goodrich", + "Gumby", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path("pan.png"), NULL), + evas_obj_size_set(win_w, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_icons[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_size_set(ICON_SIZE - 8, ICON_SIZE - 8), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(labels[i % 26]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) eo_del(o_images[i]); + for (i = 0; i < NUM; i++) eo_del(o_icons[i]); + for (i = 0; i < NUM; i++) eo_del(o_texts[i]); +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x, y)); + eo_do(o_icons[i], evas_obj_position_set(x + 4, y + 4)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE - th) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + 8 + ICON_SIZE + 8, y + cent)); + y += ICON_SIZE; + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_list_4_capi.h b/src/bin/cxx/widgets_list_4_capi.h new file mode 100644 index 0000000..f8d455e --- /dev/null +++ b/src/bin/cxx/widgets_list_4_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_4_cxx_start +#define NAME "Widgets List 4" +#define ICON "widgets.png" +#define ICON_SIZE 32 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/cxx/widgets_list_4_grouped.cc b/src/bin/cxx/widgets_list_4_grouped.cc new file mode 100644 index 0000000..9b3166f --- /dev/null +++ b/src/bin/cxx/widgets_list_4_grouped.cc @@ -0,0 +1,199 @@ +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_4_grouped_start +#define NAME "Widgets List 4 Grouped" +#define ICON "widgets.png" + +#ifndef PROTO +# ifndef UI +# include "main.h" + +/* standard var */ +static int done = 0; +/* private data */ +#define NUM 512 +#define ICON_SIZE 32 +static Evas_Object *o_images[NUM]; +static Evas_Object *o_icons[NUM]; +static Evas_Object *o_texts[NUM]; + +static const char *icons[] = +{ + "bug.png", + "bulb.png", + "camera.png", + "colorbox.png", + + "e.png", + "error.png", + "flower.png", + "house.png", + + "mushroom.png", + "pulse.png", + "typewriter.png", + "warning.png", + + "watch.png" +}; + +static const char *labels[] = +{ + "Andrew", + "Alex", + "Amanda", + "Arthur", + "Astrid", + "Avery", + + "Beethoven", + "Billy", + "Bob", + "Bundy", + + "Candy", + "Carsten", + + "Danny", + "Dennis", + "Dirk", + "Doug", + + "Edmond", + "Erik", + + "Fernando", + "Frank", + "Frederick", + + "Gabby", + "George", + "Gilroy", + "Goodrich", + "Gumby", +}; + +/* setup */ +static void _setup(void) +{ + int i; + Evas_Object *o; + for (i = 0; i < NUM; i++) + { + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_images[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path("pan.png"), NULL), + evas_obj_size_set(win_w, ICON_SIZE), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_IMAGE_CLASS, G_evas); + o_icons[i] = o; + eo_do(o, evas_obj_image_filled_set(1), + evas_obj_image_border_set(2, 2, 2, 2), + efl_file_set(build_path(icons[i % 13]), NULL), + evas_obj_size_set(ICON_SIZE - 8, ICON_SIZE - 8), + evas_obj_visibility_set(EINA_TRUE)); + + o = eo_add(EVAS_TEXT_CLASS, G_evas); + o_texts[i] = o; + eo_do(o, efl_text_properties_font_set("Vera-Bold", 10), + efl_text_set(labels[i % 26]), + evas_obj_color_set(0, 0, 0, 255), + evas_obj_visibility_set(EINA_TRUE)); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_raise()); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_icons[i], evas_obj_raise()); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_icons[i], evas_obj_stack_above(o_icons[i - 13])); + } + for (i = 0; i < NUM; i++) + { + eo_do(o_texts[i], evas_obj_raise()); + } + done = 0; +} + +/* cleanup */ +static void _cleanup(void) +{ + int i; + for (i = 0; i < NUM; i++) + { + eo_del(o_images[i]); + eo_del(o_icons[i]); + eo_del(o_texts[i]); + } +} + +/* loop - do things */ +static void _loop(double t, int f) +{ + int i; + Evas_Coord x, y, tw, th, cent; + x = 0; + y = 0 - f; + for (i = 0; i < NUM; i++) + { + eo_do(o_images[i], evas_obj_position_set(x, y)); + eo_do(o_icons[i], evas_obj_position_set(x + 4, y + 4)); + eo_do(o_texts[i], evas_obj_size_get(&tw, &th)); + cent = (ICON_SIZE - th) / 2; + eo_do(o_texts[i], evas_obj_position_set(x + 8 + ICON_SIZE + 8, y + cent)); + y += ICON_SIZE; + } + FPS_STD(NAME); +} + +/* prepend special key handlers if interactive (before STD) */ +static void _key(char *key) +{ + KEY_STD; +} + + + + + + + + + + + + +/* template stuff - ignore */ +# endif +#endif + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef PROTO +# ifndef UI +void FNAME(void) +{ + ui_func_set(_key, _loop); + _setup(); +} +# endif +#endif +#undef FNAME +#undef NAME +#undef ICON diff --git a/src/bin/cxx/widgets_list_4_grouped_capi.h b/src/bin/cxx/widgets_list_4_grouped_capi.h new file mode 100644 index 0000000..6d1b3a8 --- /dev/null +++ b/src/bin/cxx/widgets_list_4_grouped_capi.h @@ -0,0 +1,31 @@ +#ifdef __cplusplus +extern "C" { +#endif + +#undef FNAME +#undef NAME +#undef ICON + +/* metadata */ +#define FNAME widgets_list_4_grouped_cxx_start +#define NAME "Widgets List 4 Grouped" +#define ICON "widgets.png" +#define ICON_SIZE 32 + +#ifdef UI +_ui_menu_item_add(ICON, NAME, FNAME); +#endif + +#ifdef PROTO +void FNAME(void); +#endif + +#ifndef EXPEDITE_CXX_TEST_IMPL +#undef FNAME +#undef NAME +#undef ICON +#endif + +#ifdef __cplusplus +} +#endif diff --git a/src/bin/tests.h b/src/bin/tests.h index d92de4e..e50daaa 100644 --- a/src/bin/tests.h +++ b/src/bin/tests.h @@ -1,19 +1,7 @@ - #ifdef __cplusplus extern "C" { #endif -// C++ tests -#include "cxx/image_blend_border_capi.h" -#include "cxx/image_blend_border_recolor_capi.h" -#include "cxx/image_blend_fade_pow2_unscaled_capi.h" -#include "cxx/image_blend_fade_unscaled_capi.h" - -#include "cxx/image_blend_solid_border_capi.h" -#include "cxx/image_blend_solid_fade_pow2_unscaled_capi.h" -#include "cxx/image_blend_solid_fade_unscaled_capi.h" -#include "cxx/image_blend_solid_unscaled_capi.h" - // C tests /* #include "widgets_file_icons.c" */ /* #include "widgets_file_icons_2.c" */ @@ -45,8 +33,8 @@ extern "C" { /* #include "image_blend_nearest_solid_same_scaled.c" */ /* #include "image_blend_smooth_same_scaled.c" */ /* #include "image_blend_smooth_solid_same_scaled.c" */ -#include "image_blend_border.c" -#include "image_blend_border_recolor.c" +/* #include "image_blend_border.c" */ +/* #include "image_blend_border_recolor.c" */ /* #include "image_blend_solid_middle_border.c" */ /* #include "image_blend_solid_border.c" */ /* #include "image_map_rotate.c" */ @@ -143,3 +131,6 @@ extern "C" { #ifdef __cplusplus } #endif + +// C++ tests +#include "cxx/tests.h"