Compare commits
37 Commits
devs/lauro
...
master
Author | SHA1 | Date |
---|---|---|
Wander Lairson Costa | 9db3724e47 | |
Vincent Torri | 7c4bebe47e | |
Hermet Park | d6a3eb3dec | |
Hermet Park | 7746bbb039 | |
Hermet Park | 46e328404c | |
Hermet Park | 1c16ed647b | |
Hermet Park | 5ca60ccf22 | |
Hermet Park | deb3905a32 | |
Hermet Park | cac6ca6a9a | |
Hermet Park | b72d775b10 | |
Hermet Park | aee23715a2 | |
Hermet Park | 7dca83b4e5 | |
Hermet Park | a4d6ef526a | |
Hermet Park | b84865bb12 | |
Hermet Park | 67771fd4a6 | |
Hermet Park | 4828d1a5d5 | |
Hermet Park | f3e0448bd3 | |
Hermet Park | d540c8420b | |
Hermet Park | 7874ae718f | |
Hermet Park | 03324357ed | |
Hermet Park | cf48e97379 | |
Hermet Park | ae6cf1318b | |
Hermet Park | 9bb9dba018 | |
Hermet Park | 858246e2dd | |
Hermet Park | a2bc36a91d | |
Cedric BAIL | 08dd13567e | |
Cedric Bail | ac6a3bcb44 | |
Cedric Bail | 105e6568a4 | |
Ali Alzyod | dc6c931dc2 | |
Cedric BAIL | 4e6dd92826 | |
Cedric BAIL | 6c2c96b622 | |
Mike Blumenkrantz | ba687d4b20 | |
Mike Blumenkrantz | 735ca81d6b | |
Mike Blumenkrantz | 37093983bf | |
Mike Blumenkrantz | 3a1058aab1 | |
Lauro Moura | 9fd3c26a5e | |
Cedric BAIL | b624cde117 |
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"project_id" : "expedite",
|
||||
"conduit_uri" : "https://phab.enlightenment.org/"
|
||||
"projects" : "expedite",
|
||||
"conduit_uri" : "https://phab.enlightenment.org/",
|
||||
"phabricator.uri" : "https://phab.enlightenment.org/"
|
||||
}
|
||||
|
|
73
configure.ac
73
configure.ac
|
@ -3,14 +3,14 @@ dnl Process this file with autoconf to produce a configure script.
|
|||
# get rid of that stupid cache mechanism
|
||||
rm -f config.cache
|
||||
|
||||
AC_INIT([expedite], [1.11.99], [enlightenment-devel@lists.sourceforge.net])
|
||||
AC_INIT([expedite], [1.23.0], [enlightenment-devel@lists.sourceforge.net])
|
||||
AC_PREREQ([2.52])
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
|
||||
AM_INIT_AUTOMAKE([1.6 dist-xz])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
@ -18,38 +18,12 @@ PKG_PROG_PKG_CONFIG
|
|||
|
||||
### Checks for programs
|
||||
|
||||
AC_ISC_POSIX
|
||||
m4_ifdef([AC_PROG_OBJC],
|
||||
[
|
||||
AC_PROG_OBJC
|
||||
_AM_DEPENDENCIES(OBJC)
|
||||
],
|
||||
[
|
||||
AC_CHECK_TOOL([OBJC], [gcc])
|
||||
AC_SUBST([OBJC])
|
||||
AC_SUBST([OBJCFLAGS])
|
||||
]
|
||||
)
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
|
||||
LT_PROG_RC
|
||||
|
||||
|
||||
|
||||
### Checks for libraries
|
||||
|
||||
# Evil library for compilation on Windows
|
||||
|
||||
case "$host_os" in
|
||||
mingw32*)
|
||||
PKG_CHECK_MODULES([EVIL], [evil >= 1.7.99])
|
||||
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
|
||||
;;
|
||||
esac
|
||||
|
||||
# EFL dependencies
|
||||
efl_version="1.20.0"
|
||||
efl_version="1.23.0"
|
||||
requirement_expedite=" \
|
||||
eo >= ${efl_version} \
|
||||
efl >= ${efl_version} \
|
||||
|
@ -66,20 +40,14 @@ PKG_CHECK_MODULES([EFL], [${requirement_expedite}])
|
|||
EFL_ENABLE_EO_API_SUPPORT
|
||||
EFL_ENABLE_BETA_API_SUPPORT
|
||||
|
||||
|
||||
### Checks for header files
|
||||
|
||||
|
||||
### Checks for types
|
||||
|
||||
|
||||
### Checks for structures
|
||||
|
||||
|
||||
### Checks for compiler characteristics
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AC_PROG_CC_C99
|
||||
AM_PROG_CC_C_O
|
||||
AC_C___ATTRIBUTE__
|
||||
|
@ -88,43 +56,8 @@ if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
|
|||
AC_MSG_ERROR([expedite requires a c99-capable compiler])
|
||||
fi
|
||||
|
||||
WIN32_CFLAGS=""
|
||||
case "$host_os" in
|
||||
cegcc*)
|
||||
WIN32_CFLAGS="-mwin32"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(WIN32_CFLAGS)
|
||||
|
||||
EXPEDITE_CXXFLAGS=""
|
||||
AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_save="${CXXFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS} -fno-rtti -fno-exceptions"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]])],
|
||||
[have_cxx_flags="yes"],
|
||||
[have_cxx_flags="no"])
|
||||
AC_MSG_CHECKING([whether the compiler supports -fno-rtti -fno-exceptions])
|
||||
AC_MSG_RESULT([${have_cxx_flags}])
|
||||
CXXFLAGS="${CXXFLAGS_save}"
|
||||
if test "x${have_cxx_flags}" = "xyes" ; then
|
||||
EXPEDITE_CXXFLAGS="-fno-rtti -fno-exceptions"
|
||||
fi
|
||||
AC_LANG_POP([C++])
|
||||
AC_SUBST(EXPEDITE_CXXFLAGS)
|
||||
|
||||
|
||||
### Checks for linker characteristics
|
||||
|
||||
lt_enable_auto_import=""
|
||||
case "$host_os" in
|
||||
mingw* | cegcc*)
|
||||
lt_enable_auto_import="-Wl,--enable-auto-import"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(lt_enable_auto_import)
|
||||
|
||||
|
||||
### Checks for library functions
|
||||
|
||||
AC_CHECK_FUNCS([sync])
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
|
@ -17,6 +17,8 @@ files = [ 'Kochi.ttf',
|
|||
'image.png',
|
||||
'bar.png',
|
||||
'frame.png',
|
||||
'stretch.png',
|
||||
'9patch_test.9.png',
|
||||
'pan.png',
|
||||
'tp.png',
|
||||
'tp.yuv',
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
|
@ -1,5 +1,5 @@
|
|||
project('expedite', 'c',
|
||||
version: '1.11.99',
|
||||
version: '1.23.0',
|
||||
default_options: ['c_std=gnu99'],
|
||||
license: 'BSD')
|
||||
|
||||
|
@ -39,7 +39,7 @@ if host_os == 'linux'
|
|||
config_data.set('_POSIX_1_SOURCE', 1)
|
||||
endif
|
||||
|
||||
efl_version = '1.22.0'
|
||||
efl_version = '1.23.0'
|
||||
efl_deps = ['eina',
|
||||
'eet',
|
||||
'eo',
|
||||
|
|
|
@ -6,8 +6,7 @@ AM_CPPFLAGS = \
|
|||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||
@EFL_CFLAGS@ \
|
||||
@EVIL_CFLAGS@
|
||||
@EFL_CFLAGS@
|
||||
|
||||
bin_PROGRAMS = expedite
|
||||
bin_SCRIPTS = expedite-cmp
|
||||
|
@ -50,6 +49,8 @@ image_blend_smooth_solid_same_scaled.c \
|
|||
image_blend_border.c \
|
||||
image_blend_solid_middle_border.c \
|
||||
image_blend_solid_border.c \
|
||||
image_blend_solid_stretch.c \
|
||||
image_blend_solid_9patch.c \
|
||||
image_blend_border_recolor.c \
|
||||
image_map_rotate.c \
|
||||
image_map_solid_rotate.c \
|
||||
|
@ -86,6 +87,7 @@ textblock_basic.c \
|
|||
textblock_intl.c \
|
||||
textblock_auto_align.c \
|
||||
textblock_text_append.c \
|
||||
textblock_text_fill_format.c \
|
||||
rect_blend.c \
|
||||
rect_blend_pow2.c \
|
||||
rect_solid.c \
|
||||
|
@ -108,6 +110,8 @@ poly_blend.c \
|
|||
proxy_image.c \
|
||||
proxy_text_fixed.c \
|
||||
proxy_text_random.c \
|
||||
proxy_textblock.c \
|
||||
proxy_image_clipped.c \
|
||||
line_blend.c \
|
||||
image_blend_many_smooth_same_scaled.c \
|
||||
font_effect_blur_alpha.c \
|
||||
|
@ -125,6 +129,7 @@ image_mask_10.c \
|
|||
image_mask_11.c \
|
||||
image_mask_12.c \
|
||||
image_mask_13.c \
|
||||
image_mask_clipped.c \
|
||||
vg_basic_rect.c \
|
||||
vg_basic_circle.c \
|
||||
vg_basic_gradient.c \
|
||||
|
@ -134,12 +139,6 @@ snapshot_widgets_file_icons.c
|
|||
# image_mask_14.c \
|
||||
# image_mask_15.c
|
||||
|
||||
expedite_CFLAGS = @WIN32_CFLAGS@
|
||||
expedite_CXXFLAGS = @EXPEDITE_CXXFLAGS@
|
||||
expedite_LDADD = @EFL_LIBS@ @EVIL_LIBS@ -lm
|
||||
expedite_LDFLAGS = @lt_enable_auto_import@
|
||||
|
||||
.rc.lo:
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
|
||||
expedite_LDADD = @EFL_LIBS@ -lm
|
||||
|
||||
EXTRA_DIST = $(bin_SCRIPTS)
|
||||
|
|
|
@ -6,32 +6,28 @@ static void
|
|||
_setup(void)
|
||||
{
|
||||
Evas_Object *o;
|
||||
Evas_Textblock_Style *st;
|
||||
|
||||
o = evas_object_textblock_add(evas);
|
||||
o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas);
|
||||
efl_gfx_entity_position_set(o, EINA_POSITION2D(10, 40));
|
||||
efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w - 20, win_h - 50));
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
st = evas_textblock_style_new();
|
||||
evas_textblock_style_set
|
||||
(st,
|
||||
"DEFAULT='font=Vera font_size=8 align=left color=#000 wrap=word'"
|
||||
"center='+ font=Vera font_size=10 align=center'"
|
||||
"/center='- \n \n'"
|
||||
"p='+ font=Vera font_size=10 align=left'"
|
||||
"/p='- \n \n'"
|
||||
);
|
||||
evas_object_textblock_style_set(o, st);
|
||||
evas_object_textblock_clear(o);
|
||||
evas_object_textblock_text_markup_set
|
||||
(o, "<center>"
|
||||
|
||||
efl_text_font_family_set(o, "Vera");
|
||||
efl_text_font_size_set(o, 10);
|
||||
efl_text_color_set(o, 0, 0, 0, 255);
|
||||
efl_text_multiline_set(o, EINA_TRUE);
|
||||
efl_text_horizontal_align_set(o, 0.5);
|
||||
efl_text_wrap_set(o, EFL_TEXT_FORMAT_WRAP_WORD);
|
||||
|
||||
efl_text_markup_set
|
||||
(o,
|
||||
"Enlightenment used to be a window manager project, but "
|
||||
"since has changed a lot to become a miniature desktop and mobile "
|
||||
"device environment all of its own. It is now made up of many "
|
||||
"components (libraries and applications) that have specific uses. "
|
||||
"It is very large, and so requires more testing and demonstration."
|
||||
"</center>"
|
||||
|
||||
"</br>"
|
||||
"<center>"
|
||||
"Expedite is a full test suite for Evas, which is one of the "
|
||||
"core components of the Enlightenment Foundation Libraries. Evas "
|
||||
|
@ -39,9 +35,8 @@ _setup(void)
|
|||
"render to many targets, including framebuffer, X11, OpenGL, memory, "
|
||||
"DirectFB and other targets to boot. It handles high level graphic "
|
||||
"layout descriptions that applications set up, dealing with the hard "
|
||||
"work of doing the drawing for them."
|
||||
"</center>");
|
||||
evas_textblock_style_free(st);
|
||||
"work of doing the drawing for them.");
|
||||
|
||||
o_text = o;
|
||||
ui_fps(0.0);
|
||||
}
|
||||
|
@ -72,6 +67,5 @@ _key(const char *key)
|
|||
void
|
||||
about_start(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
|
|
|
@ -1,288 +0,0 @@
|
|||
#include "main.h"
|
||||
|
||||
#include <windowsx.h>
|
||||
#include <Evas_Engine_Direct3D.h>
|
||||
|
||||
|
||||
static HWND window;
|
||||
static HINSTANCE instance;
|
||||
|
||||
|
||||
static LRESULT CALLBACK
|
||||
MainWndProc(HWND hwnd,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
return 0;
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
case WM_CLOSE:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
case WM_PAINT: {
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc;
|
||||
|
||||
hdc = BeginPaint (window, &ps);
|
||||
evas_damage_rectangle_add(evas,
|
||||
ps.rcPaint.left, ps.rcPaint.top,
|
||||
ps.rcPaint.right - ps.rcPaint.left,
|
||||
ps.rcPaint.bottom - ps.rcPaint.top);
|
||||
EndPaint(window, &ps);
|
||||
return 0;
|
||||
}
|
||||
case WM_SIZING:
|
||||
{
|
||||
PRECT rect = (PRECT)lParam;
|
||||
|
||||
evas_output_viewport_set(evas, 0, 0,
|
||||
rect->right - rect->left,
|
||||
rect->bottom - rect->top);
|
||||
evas_output_size_set(evas,
|
||||
rect->right - rect->left,
|
||||
rect->bottom - rect->top);
|
||||
win_w = rect->right - rect->left;
|
||||
win_h = rect->bottom - rect->top;
|
||||
return 0;
|
||||
}
|
||||
case WM_RBUTTONDOWN:
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
|
||||
return 0;
|
||||
case WM_LBUTTONDOWN:
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
|
||||
return 0;
|
||||
case WM_LBUTTONUP:
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
evas_event_feed_mouse_up(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
|
||||
return 0;
|
||||
case WM_RBUTTONUP:
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
evas_event_feed_mouse_up(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
|
||||
return 0;
|
||||
case WM_MOUSEMOVE:
|
||||
if (!evas_pointer_inside_get(evas)) evas_event_feed_mouse_in(evas, 0, NULL);
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
return 0;
|
||||
case WM_MOUSELEAVE:
|
||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
||||
return 0;
|
||||
/* FIXME : can't find an event when the mouse is entering */
|
||||
case WM_KEYDOWN:
|
||||
case WM_SYSKEYDOWN: {
|
||||
int key;
|
||||
|
||||
key = LOWORD(wParam);
|
||||
|
||||
if ((key == VK_SHIFT) ||
|
||||
(key == VK_LSHIFT) ||
|
||||
(key == VK_RSHIFT))
|
||||
evas_key_modifier_on(evas, "Shift");
|
||||
if ((key == VK_CONTROL) ||
|
||||
(key == VK_LCONTROL) ||
|
||||
(key == VK_RCONTROL))
|
||||
evas_key_modifier_on(evas, "Control");
|
||||
if ((key == VK_MENU) ||
|
||||
(key == VK_LMENU) ||
|
||||
(key == VK_RMENU))
|
||||
evas_key_modifier_on(evas, "Alt");
|
||||
if ((key == VK_LWIN) ||
|
||||
(key == VK_RWIN))
|
||||
evas_key_modifier_on(evas, "Super");
|
||||
|
||||
if (key == VK_CAPITAL)
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
|
||||
evas_key_lock_off(evas, "Caps_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Caps_Lock");
|
||||
}
|
||||
if (key == VK_NUMLOCK)
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock"))
|
||||
evas_key_lock_off(evas, "Num_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Num_Lock");
|
||||
}
|
||||
if (key == VK_SCROLL)
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock"))
|
||||
evas_key_lock_off(evas, "Scroll_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Scroll_Lock");
|
||||
}
|
||||
if (key == VK_ESCAPE)
|
||||
evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
|
||||
if (key == VK_RETURN)
|
||||
evas_event_feed_key_down(evas, "Return", "Return", NULL, NULL, 0, NULL);
|
||||
if (key == VK_LEFT)
|
||||
evas_event_feed_key_down(evas, "Left", "Left", NULL, NULL, 0, NULL);
|
||||
if (key == VK_RIGHT)
|
||||
evas_event_feed_key_down(evas, "Right", "Right", NULL, NULL, 0, NULL);
|
||||
if (key == 81)
|
||||
evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
||||
if (key == 113)
|
||||
evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL);
|
||||
return 0;
|
||||
}
|
||||
case WM_KEYUP:
|
||||
case WM_SYSKEYUP: {
|
||||
int key;
|
||||
|
||||
key = LOWORD(wParam);
|
||||
|
||||
if ((key == VK_SHIFT) ||
|
||||
(key == VK_LSHIFT) ||
|
||||
(key == VK_RSHIFT))
|
||||
evas_key_modifier_off(evas, "Shift");
|
||||
if ((key == VK_CONTROL) ||
|
||||
(key == VK_LCONTROL) ||
|
||||
(key == VK_RCONTROL))
|
||||
evas_key_modifier_off(evas, "Control");
|
||||
if ((key == VK_MENU) ||
|
||||
(key == VK_LMENU) ||
|
||||
(key == VK_RMENU))
|
||||
evas_key_modifier_off(evas, "Alt");
|
||||
if ((key == VK_LWIN) ||
|
||||
(key == VK_RWIN))
|
||||
evas_key_modifier_off(evas, "Super");
|
||||
if (key == VK_ESCAPE)
|
||||
evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
|
||||
if (key == VK_RETURN)
|
||||
evas_event_feed_key_up(evas, "Return", "Return", NULL, NULL, 0, NULL);
|
||||
if (key == VK_LEFT)
|
||||
evas_event_feed_key_up(evas, "Left", "Left", NULL, NULL, 0, NULL);
|
||||
if (key == VK_RIGHT)
|
||||
evas_event_feed_key_up(evas, "Right", "Right", NULL, NULL, 0, NULL);
|
||||
if (key == 81)
|
||||
evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
||||
if (key == 113)
|
||||
evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL);
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
engine_direct3d_args(const char *engine, int width, int height)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
RECT rect;
|
||||
HDC dc;
|
||||
MSG msg;
|
||||
Evas_Engine_Info_Direct3D *einfo;
|
||||
DWORD style;
|
||||
int depth;
|
||||
int i;
|
||||
|
||||
instance = GetModuleHandle(NULL);
|
||||
if (!instance) return EINA_FALSE;
|
||||
|
||||
wc.style = 0;
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = instance;
|
||||
wc.hIcon = LoadIcon (NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor (NULL, IDC_ARROW);
|
||||
wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName = "Evas_Direct3D_Test";
|
||||
|
||||
if(!RegisterClass(&wc))
|
||||
goto free_library;
|
||||
|
||||
rect.left = 0;
|
||||
rect.top = 0;
|
||||
rect.right = width;
|
||||
rect.bottom = height;
|
||||
AdjustWindowRect (&rect, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, FALSE);
|
||||
|
||||
window = CreateWindowEx(0,
|
||||
"Evas_Direct3D_Test",
|
||||
"Evas_Direct3D_Test",
|
||||
WS_OVERLAPPEDWINDOW | WS_SIZEBOX,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
NULL, NULL, instance, NULL);
|
||||
if (!window)
|
||||
goto unregister_class;
|
||||
|
||||
/* make the window non resizable */
|
||||
style = GetWindowLong(window, GWL_STYLE);
|
||||
style &= ~WS_THICKFRAME;
|
||||
if (!SetWindowLong(window, GWL_STYLE, style))
|
||||
goto unregister_class;
|
||||
|
||||
dc = GetDC(NULL);
|
||||
if (!dc)
|
||||
goto destroy_window;
|
||||
|
||||
depth = GetDeviceCaps(dc, BITSPIXEL);
|
||||
ReleaseDC(NULL, dc);
|
||||
|
||||
evas_output_method_set(evas, evas_render_method_lookup("direct3d"));
|
||||
einfo = (Evas_Engine_Info_Direct3D *)evas_engine_info_get(evas);
|
||||
if (!einfo)
|
||||
{
|
||||
fprintf(stderr, "Evas does not support the Direct3D Engine\n");
|
||||
goto destroy_window;
|
||||
}
|
||||
|
||||
einfo->info.window = window;
|
||||
einfo->info.depth = depth;
|
||||
einfo->info.rotation = 0;
|
||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *)einfo))
|
||||
{
|
||||
printf("Evas can not setup the informations of the Direct3D Engine\n");
|
||||
goto destroy_window;
|
||||
}
|
||||
|
||||
/* the second parameter is ignored, as it's the first call of ShowWindow */
|
||||
ShowWindow(window, SW_SHOWDEFAULT);
|
||||
UpdateWindow(window);
|
||||
|
||||
return EINA_TRUE;
|
||||
|
||||
destroy_window:
|
||||
DestroyWindow(window);
|
||||
unregister_class:
|
||||
UnregisterClass("Evas_Direct3D_Test", instance);
|
||||
free_library:
|
||||
FreeLibrary(instance);
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
engine_direct3d_loop(void)
|
||||
{
|
||||
MSG msg;
|
||||
int res;
|
||||
|
||||
again:
|
||||
if (!PeekMessage (&msg, window, 0, 0, PM_NOREMOVE))
|
||||
return;
|
||||
|
||||
res = GetMessage (&msg, NULL, 0, 0);
|
||||
TranslateMessage (&msg);
|
||||
DispatchMessage (&msg);
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
void
|
||||
engine_direct3d_shutdown(void)
|
||||
{
|
||||
DestroyWindow(window);
|
||||
UnregisterClass("Evas_Direct3D_Test", instance);
|
||||
FreeLibrary(instance);
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
HI_RES_AWARE CEUX {1}
|
|
@ -1,291 +0,0 @@
|
|||
#include "main.h"
|
||||
|
||||
#include <windowsx.h>
|
||||
#include <Evas_Engine_Software_DDraw.h>
|
||||
|
||||
|
||||
static HWND window;
|
||||
static HINSTANCE instance;
|
||||
|
||||
|
||||
static LRESULT CALLBACK
|
||||
MainWndProc(HWND hwnd,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
return 0;
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
case WM_CLOSE:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
case WM_WINDOWPOSCHANGED: {
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc;
|
||||
|
||||
hdc = BeginPaint (window, &ps);
|
||||
evas_damage_rectangle_add(evas,
|
||||
ps.rcPaint.left, ps.rcPaint.top,
|
||||
ps.rcPaint.right - ps.rcPaint.left,
|
||||
ps.rcPaint.bottom - ps.rcPaint.top);
|
||||
EndPaint(window, &ps);
|
||||
return 0;
|
||||
}
|
||||
case WM_SIZING:
|
||||
{
|
||||
PRECT rect = (PRECT)lParam;
|
||||
|
||||
evas_output_viewport_set(evas, 0, 0,
|
||||
rect->right - rect->left,
|
||||
rect->bottom - rect->top);
|
||||
evas_output_size_set(evas,
|
||||
rect->right - rect->left,
|
||||
rect->bottom - rect->top);
|
||||
win_w = rect->right - rect->left;
|
||||
win_h = rect->bottom - rect->top;
|
||||
return 0;
|
||||
}
|
||||
case WM_RBUTTONDOWN:
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
|
||||
return 0;
|
||||
case WM_LBUTTONDOWN:
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
|
||||
return 0;
|
||||
case WM_LBUTTONUP:
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
evas_event_feed_mouse_up(evas, 1, EVAS_BUTTON_NONE, 0, NULL);
|
||||
return 0;
|
||||
case WM_RBUTTONUP:
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
evas_event_feed_mouse_up(evas, 3, EVAS_BUTTON_NONE, 0, NULL);
|
||||
return 0;
|
||||
case WM_MOUSEMOVE:
|
||||
if (!evas_pointer_inside_get(evas)) evas_event_feed_mouse_in(evas, 0, NULL);
|
||||
evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL);
|
||||
return 0;
|
||||
case WM_MOUSELEAVE:
|
||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
||||
return 0;
|
||||
/* FIXME : can't find an event when the mouse is entering */
|
||||
case WM_KEYDOWN:
|
||||
case WM_SYSKEYDOWN: {
|
||||
int key;
|
||||
|
||||
key = LOWORD(wParam);
|
||||
|
||||
if ((key == VK_SHIFT) ||
|
||||
(key == VK_LSHIFT) ||
|
||||
(key == VK_RSHIFT))
|
||||
evas_key_modifier_on(evas, "Shift");
|
||||
if ((key == VK_CONTROL) ||
|
||||
(key == VK_LCONTROL) ||
|
||||
(key == VK_RCONTROL))
|
||||
evas_key_modifier_on(evas, "Control");
|
||||
if ((key == VK_MENU) ||
|
||||
(key == VK_LMENU) ||
|
||||
(key == VK_RMENU))
|
||||
evas_key_modifier_on(evas, "Alt");
|
||||
if ((key == VK_LWIN) ||
|
||||
(key == VK_RWIN))
|
||||
evas_key_modifier_on(evas, "Super");
|
||||
|
||||
if (key == VK_CAPITAL)
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
|
||||
evas_key_lock_off(evas, "Caps_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Caps_Lock");
|
||||
}
|
||||
if (key == VK_NUMLOCK)
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock"))
|
||||
evas_key_lock_off(evas, "Num_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Num_Lock");
|
||||
}
|
||||
if (key == VK_SCROLL)
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock"))
|
||||
evas_key_lock_off(evas, "Scroll_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Scroll_Lock");
|
||||
}
|
||||
if (key == VK_ESCAPE)
|
||||
evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
|
||||
if (key == VK_RETURN)
|
||||
evas_event_feed_key_down(evas, "Return", "Return", NULL, NULL, 0, NULL);
|
||||
if (key == VK_LEFT)
|
||||
evas_event_feed_key_down(evas, "Left", "Left", NULL, NULL, 0, NULL);
|
||||
if (key == VK_RIGHT)
|
||||
evas_event_feed_key_down(evas, "Right", "Right", NULL, NULL, 0, NULL);
|
||||
if (key == 81)
|
||||
evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
||||
if (key == 113)
|
||||
evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL);
|
||||
return 0;
|
||||
}
|
||||
case WM_KEYUP:
|
||||
case WM_SYSKEYUP: {
|
||||
int key;
|
||||
|
||||
key = LOWORD(wParam);
|
||||
|
||||
if ((key == VK_SHIFT) ||
|
||||
(key == VK_LSHIFT) ||
|
||||
(key == VK_RSHIFT))
|
||||
evas_key_modifier_off(evas, "Shift");
|
||||
if ((key == VK_CONTROL) ||
|
||||
(key == VK_LCONTROL) ||
|
||||
(key == VK_RCONTROL))
|
||||
evas_key_modifier_off(evas, "Control");
|
||||
if ((key == VK_MENU) ||
|
||||
(key == VK_LMENU) ||
|
||||
(key == VK_RMENU))
|
||||
evas_key_modifier_off(evas, "Alt");
|
||||
if ((key == VK_LWIN) ||
|
||||
(key == VK_RWIN))
|
||||
evas_key_modifier_off(evas, "Super");
|
||||
if (key == VK_ESCAPE)
|
||||
evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL);
|
||||
if (key == VK_RETURN)
|
||||
evas_event_feed_key_up(evas, "Return", "Return", NULL, NULL, 0, NULL);
|
||||
if (key == VK_LEFT)
|
||||
evas_event_feed_key_up(evas, "Left", "Left", NULL, NULL, 0, NULL);
|
||||
if (key == VK_RIGHT)
|
||||
evas_event_feed_key_up(evas, "Right", "Right", NULL, NULL, 0, NULL);
|
||||
if (key == 81)
|
||||
evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL);
|
||||
if (key == 113)
|
||||
evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL);
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
engine_software_ddraw_args(const char *engine, int width, int height)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
RECT rect;
|
||||
HDC dc;
|
||||
Evas_Engine_Info_Software_DDraw *einfo;
|
||||
DWORD style;
|
||||
DWORD exstyle;
|
||||
int depth;
|
||||
int i;
|
||||
|
||||
instance = GetModuleHandle(NULL);
|
||||
if (!instance) return 0;
|
||||
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = instance;
|
||||
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName = "Evas_Software_DDraw_Test";
|
||||
|
||||
if(!RegisterClass(&wc))
|
||||
goto free_library;
|
||||
|
||||
style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX;
|
||||
exstyle = 0;
|
||||
|
||||
rect.left = 0;
|
||||
rect.top = 0;
|
||||
rect.right = width;
|
||||
rect.bottom = height;
|
||||
AdjustWindowRectEx (&rect, style, FALSE, exstyle);
|
||||
|
||||
window = CreateWindowEx(exstyle,
|
||||
"Evas_Software_DDraw_Test",
|
||||
"Evas_Software_DDraw_Test",
|
||||
style,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
rect.right - rect.left, rect.bottom - rect.top,
|
||||
NULL, NULL, instance, NULL);
|
||||
if (!window)
|
||||
goto unregister_class;
|
||||
|
||||
/* make the window non resizable */
|
||||
style = GetWindowLong(window, GWL_STYLE);
|
||||
style &= ~WS_THICKFRAME;
|
||||
if (!SetWindowLong(window, GWL_STYLE, style))
|
||||
goto destroy_window;
|
||||
|
||||
dc = GetDC(NULL);
|
||||
if (!dc)
|
||||
goto destroy_window;
|
||||
|
||||
depth = GetDeviceCaps(dc, BITSPIXEL);
|
||||
ReleaseDC(NULL, dc);
|
||||
|
||||
evas_output_method_set(evas, evas_render_method_lookup("software_ddraw"));
|
||||
einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(evas);
|
||||
if (!einfo)
|
||||
{
|
||||
fprintf(stderr, "Evas does not support the Software DirectDraw Engine\n");
|
||||
goto destroy_window;
|
||||
}
|
||||
|
||||
einfo->info.window = window;
|
||||
einfo->info.depth = depth;
|
||||
einfo->info.rotation = 0;
|
||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
||||
{
|
||||
printf("Evas can not setup the informations of the Software DirectDraw Engine\n");
|
||||
goto destroy_window;
|
||||
}
|
||||
|
||||
/* the second parameter is ignored, as it's the first call of ShowWindow */
|
||||
ShowWindow(window, SW_SHOWDEFAULT);
|
||||
UpdateWindow(window);
|
||||
|
||||
return 1;
|
||||
|
||||
destroy_window:
|
||||
DestroyWindow(window);
|
||||
unregister_class:
|
||||
UnregisterClass("Evas_Software_DDraw_Test", instance);
|
||||
free_library:
|
||||
FreeLibrary(instance);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
engine_software_ddraw_loop(void)
|
||||
{
|
||||
MSG msg;
|
||||
int res;
|
||||
|
||||
again:
|
||||
if (!PeekMessage (&msg, window, 0, 0, PM_NOREMOVE))
|
||||
return;
|
||||
|
||||
res = GetMessage (&msg, NULL, 0, 0);
|
||||
TranslateMessage (&msg);
|
||||
DispatchMessage (&msg);
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
void
|
||||
engine_software_ddraw_shutdown(void)
|
||||
{
|
||||
DestroyWindow(window);
|
||||
UnregisterClass("Evas_Software_DDraw_Test", instance);
|
||||
FreeLibrary(instance);
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
|
@ -56,10 +58,16 @@ tests = []
|
|||
for f in files:
|
||||
d = data[f] = {}
|
||||
for row in csv.reader(open(f)):
|
||||
if len(row) < 2:
|
||||
continue
|
||||
t = row[1].strip()
|
||||
try:
|
||||
val = float(row[0])
|
||||
except ValueError:
|
||||
continue
|
||||
if f == ref_f:
|
||||
tests.append(t)
|
||||
d[t] = float(row[0])
|
||||
d[t] = val
|
||||
max_test_name = max(len(t), max_test_name)
|
||||
|
||||
def report_text():
|
||||
|
@ -68,12 +76,12 @@ def report_text():
|
|||
fmtsize = len(options.format % {"value": 12345.67, "percentual": 1234.56})
|
||||
hdrfmt = "%%%d.%ds" % (fmtsize, fmtsize)
|
||||
|
||||
print test_name_fmt % "\\",
|
||||
print "%7.7s" % (files[0][-7:],),
|
||||
print(test_name_fmt % "\\", end=' ')
|
||||
print("%7.7s" % (files[0][-7:],), end=' ')
|
||||
for f in files[1:]:
|
||||
n, e = os.path.splitext(f)
|
||||
print hdrfmt % n[-fmtsize:],
|
||||
print
|
||||
print(hdrfmt % n[-fmtsize:], end=' ')
|
||||
print()
|
||||
|
||||
if options.color and os.environ.get("TERM", "") in (
|
||||
"xterm", "xterm-color", "rxvt", "rxvt-unicode", "screen",
|
||||
|
@ -90,14 +98,14 @@ def report_text():
|
|||
|
||||
|
||||
def print_row(test):
|
||||
print test_name_fmt % test,
|
||||
print(test_name_fmt % test, end=' ')
|
||||
ref_val = data[ref_f][test]
|
||||
print "%7.2f" % ref_val,
|
||||
print("%7.2f" % ref_val, end=' ')
|
||||
for f in others_f:
|
||||
try:
|
||||
val = data[f][test]
|
||||
except KeyError:
|
||||
print "-?????-",
|
||||
print("-?????-", end=' ')
|
||||
continue
|
||||
|
||||
percent = (val - ref_val) / ref_val
|
||||
|
@ -111,9 +119,9 @@ def report_text():
|
|||
fmt = options.format % {"value": val, "percentual": percent * 100}
|
||||
if len(fmt) < fmtsize:
|
||||
fmt = hdrfmt % fmt
|
||||
print "%s%s%s" % (c, fmt, color_reset),
|
||||
print("%s%s%s" % (c, fmt, color_reset), end=' ')
|
||||
|
||||
print
|
||||
print()
|
||||
|
||||
for t in tests:
|
||||
print_row(t)
|
||||
|
@ -123,7 +131,7 @@ def report_html():
|
|||
import time
|
||||
|
||||
fnames = [os.path.basename(f) for f in files]
|
||||
print """\
|
||||
print("""\
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
|
@ -156,9 +164,9 @@ def report_html():
|
|||
border-bottom: 1px dashed #ccc;
|
||||
}
|
||||
td.test-name, thead tr td { text-align: right; }\
|
||||
"""
|
||||
""")
|
||||
if options.color:
|
||||
print """\
|
||||
print("""\
|
||||
td.value-good { background-color: #aaffaa; }
|
||||
td.value-bad { background-color: #ffaaaa; }
|
||||
td.value-missing { background-color: #ffffaa; }
|
||||
|
@ -168,9 +176,9 @@ def report_html():
|
|||
background-color: #d9d9d9;
|
||||
border-bottom: 1px dashed #ccc;
|
||||
}
|
||||
"""
|
||||
""")
|
||||
|
||||
print """
|
||||
print("""
|
||||
</style>
|
||||
<body>
|
||||
<p>Comparison sheet for %(files)s, created at %(date)s.</p>
|
||||
|
@ -180,17 +188,17 @@ def report_html():
|
|||
<td>\\</td>\
|
||||
""" % {"files": ", ".join(fnames),
|
||||
"date": time.asctime(),
|
||||
}
|
||||
})
|
||||
|
||||
for f in fnames:
|
||||
print """\
|
||||
print("""\
|
||||
<td>%s</td>\
|
||||
""" % f
|
||||
print """\
|
||||
""" % f)
|
||||
print("""\
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>\
|
||||
"""
|
||||
""")
|
||||
|
||||
def print_row(test):
|
||||
ref_val = data[ref_f][test]
|
||||
|
@ -199,19 +207,19 @@ def report_html():
|
|||
else:
|
||||
extra_cls = ""
|
||||
|
||||
print """\
|
||||
print("""\
|
||||
<tr%s>
|
||||
<td class="test-name">%s</td>
|
||||
<td class="value-reference">%7.2f</td>\
|
||||
""" % (extra_cls, test, ref_val)
|
||||
""" % (extra_cls, test, ref_val))
|
||||
|
||||
for f in others_f:
|
||||
try:
|
||||
val = data[f][test]
|
||||
except KeyError:
|
||||
print """\
|
||||
print("""\
|
||||
<td class="value-missing">-?????-</td>\
|
||||
"""
|
||||
""")
|
||||
continue
|
||||
|
||||
percent = (val - ref_val) / ref_val
|
||||
|
@ -224,23 +232,23 @@ def report_html():
|
|||
|
||||
v = options.format % {"value": val, "percentual": percent * 100}
|
||||
|
||||
print """\
|
||||
print("""\
|
||||
<td class="value-%s">%s</td>\
|
||||
""" % (c, v)
|
||||
""" % (c, v))
|
||||
|
||||
print """\
|
||||
print("""\
|
||||
</tr>\
|
||||
"""
|
||||
""")
|
||||
|
||||
for t in tests:
|
||||
print_row(t)
|
||||
|
||||
print """\
|
||||
print("""\
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
""")
|
||||
|
||||
if options.report == "text":
|
||||
report_text()
|
||||
|
|
|
@ -92,8 +92,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -26,7 +26,7 @@ static void _setup(void)
|
|||
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
o_images[i] = o;
|
||||
efl_file_simple_load(o, build_path("bar.png"), NULL);
|
||||
efl_gfx_image_border_set(o, 6, 6, 6, 6);
|
||||
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,7 @@ static void _setup(void)
|
|||
o_images[i] = o;
|
||||
efl_file_simple_load(o, build_path("pan.png"), NULL);
|
||||
efl_gfx_color_set(o, 64, 64, 64, 255);
|
||||
efl_gfx_image_border_set(o, 3, 3, 3, 3);
|
||||
efl_gfx_image_border_insets_set(o, 3, 3, 3, 3);
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
|
@ -95,8 +95,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -96,8 +96,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -96,8 +96,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -107,8 +107,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -59,6 +59,7 @@ static void _cleanup(void)
|
|||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
static int k = 0;
|
||||
int i;
|
||||
Evas_Coord x, y, w, h;
|
||||
for (i = 0; i < OBNUM; i++)
|
||||
|
@ -68,12 +69,13 @@ static void _loop(double t, int f)
|
|||
w = 120;
|
||||
h = 160;
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||
}
|
||||
}
|
||||
++k;
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
|
@ -110,8 +112,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -110,8 +110,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -110,8 +110,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -107,8 +107,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -59,6 +59,7 @@ static void _cleanup(void)
|
|||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
static int k = 0;
|
||||
int i;
|
||||
Evas_Coord x, y, w, h;
|
||||
for (i = 0; i < OBNUM; i++)
|
||||
|
@ -68,12 +69,13 @@ static void _loop(double t, int f)
|
|||
w = 120;
|
||||
h = 160;
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||
}
|
||||
}
|
||||
k++;
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
|
@ -110,8 +112,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -110,8 +110,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -110,8 +110,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -107,8 +107,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -59,21 +59,23 @@ static void _cleanup(void)
|
|||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
static int k = 0;
|
||||
int i;
|
||||
Evas_Coord x, y, w, h;
|
||||
for (i = 0; i < OBNUM; i++)
|
||||
{
|
||||
if (i > (OBNUM / 2))
|
||||
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);
|
||||
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||
}
|
||||
}
|
||||
++k;
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
|
@ -110,8 +112,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -110,8 +110,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -110,8 +110,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_solid_9patch_start
|
||||
#define NAME "Image Blend Solid 9patch"
|
||||
#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 = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
o_images[i] = o;
|
||||
efl_file_simple_load(o, build_path("9patch_test.9.png"), NULL);
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < OBNUM; i++) efl_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))) * w0 * 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);
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(const 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
|
|
@ -26,7 +26,7 @@ static void _setup(void)
|
|||
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
o_images[i] = o;
|
||||
efl_file_simple_load(o, build_path("frame.png"), NULL);
|
||||
efl_gfx_image_border_set(o, 8, 8, 8, 8);
|
||||
efl_gfx_image_border_insets_set(o, 8, 8, 8, 8);
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -96,8 +96,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -95,8 +95,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -26,8 +26,8 @@ static void _setup(void)
|
|||
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
o_images[i] = o;
|
||||
efl_file_simple_load(o, build_path("bar.png"), NULL);
|
||||
efl_gfx_image_border_set(o, 6, 6, 6, 6);
|
||||
efl_gfx_image_border_center_fill_set(o, EFL_GFX_BORDER_FILL_MODE_SOLID);
|
||||
efl_gfx_image_border_insets_set(o, 6, 6, 6, 6);
|
||||
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
|
@ -95,8 +95,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -28,8 +28,8 @@ static void _setup(void)
|
|||
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||
efl_gfx_image_border_set(o, 43, 48, 48, 83);
|
||||
efl_gfx_image_border_center_fill_set(o, EFL_GFX_BORDER_FILL_MODE_SOLID);
|
||||
efl_gfx_image_border_insets_set(o, 43, 48, 48, 83);
|
||||
efl_gfx_image_center_fill_mode_set(o, EFL_GFX_CENTER_FILL_MODE_SOLID);
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
|
@ -93,8 +93,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_solid_stretch_start
|
||||
#define NAME "Image Blend Solid Stretch"
|
||||
#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];
|
||||
|
||||
// Each offset is relative to the last block
|
||||
static const Efl_Gfx_Image_Stretch_Region hsz[] = { { 8, 8 }, { 16, 55 } };
|
||||
static const Efl_Gfx_Image_Stretch_Region vsz[] = { { 8, 8 }, { 16, 12 } };
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
int i;
|
||||
Evas_Object *o;
|
||||
for (i = 0; i < OBNUM; i++)
|
||||
{
|
||||
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
o_images[i] = o;
|
||||
efl_file_simple_load(o, build_path("stretch.png"), NULL);
|
||||
efl_gfx_image_stretch_region_set(o, EINA_C_ARRAY_ITERATOR_NEW(hsz),
|
||||
EINA_C_ARRAY_ITERATOR_NEW(vsz));
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < OBNUM; i++) efl_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))) * w0 * 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);
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(const 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
|
|
@ -91,8 +91,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -91,8 +91,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -90,8 +90,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -129,8 +129,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -141,8 +141,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -115,8 +115,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -121,8 +121,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -120,8 +120,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -141,8 +141,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -251,8 +251,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -249,8 +249,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -243,8 +243,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -241,8 +241,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -231,8 +231,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -228,8 +228,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -220,8 +220,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -107,8 +107,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -107,8 +107,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -105,8 +105,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -104,8 +104,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -107,8 +107,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -107,8 +107,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -105,8 +105,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -105,8 +105,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -102,8 +102,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -102,8 +102,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -100,8 +100,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -100,8 +100,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
_setup();
|
||||
ui_func_set(_key, _loop);
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -101,8 +101,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -107,8 +107,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -113,8 +113,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -109,8 +109,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -109,8 +109,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -101,8 +101,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -101,8 +101,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -103,8 +103,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -103,8 +103,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -103,8 +103,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -108,8 +108,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -103,8 +103,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -114,8 +114,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_mask_clipped
|
||||
#define NAME "Image Mask Clipped"
|
||||
#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];
|
||||
static Evas_Object *o_mask;
|
||||
static Evas_Object *o_clip;
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
int i;
|
||||
Evas_Object *o;
|
||||
|
||||
o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
o_clip = o;
|
||||
efl_gfx_entity_size_set(o, EINA_SIZE2D(180, 105));
|
||||
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 180) / 2, (win_h - 105) / 2));
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
|
||||
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
o_mask = o;
|
||||
efl_file_simple_load(o, build_path("e-logo-mask.png"), NULL);
|
||||
efl_gfx_fill_set(o, EINA_RECT(0, 0, 720, 420));
|
||||
efl_gfx_entity_size_set(o, EINA_SIZE2D(720, 420));
|
||||
evas_object_clip_set(o, o_clip);
|
||||
efl_canvas_object_has_fixed_size_set(o, 1);
|
||||
efl_gfx_entity_position_set(o, EINA_POSITION2D((win_w - 720) / 2, (win_h - 420) / 2));
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
|
||||
for (i = 0; i < OBNUM; i++)
|
||||
{
|
||||
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
o_images[i] = o;
|
||||
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||
efl_gfx_fill_set(o, EINA_RECT(0, 0, 360, 480));
|
||||
efl_gfx_entity_size_set(o, EINA_SIZE2D(360, 480));
|
||||
efl_gfx_image_smooth_scale_set(o, 0);
|
||||
evas_object_clip_set(o, o_mask);
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < OBNUM; i++) efl_del(o_images[i]);
|
||||
efl_del(o_mask);
|
||||
efl_del(o_clip);
|
||||
}
|
||||
|
||||
/* 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);
|
||||
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||
efl_gfx_entity_size_set(o_images[i], EINA_SIZE2D(w, h));
|
||||
efl_gfx_fill_set(o_images[i], EINA_RECT(0, 0, w, h));
|
||||
}
|
||||
w = (sin((double)f) * 720 + 840) / 2.2;
|
||||
h = (sin((double)f) * 720 + 840) / 2.2;
|
||||
efl_gfx_entity_size_set(o_mask, EINA_SIZE2D(w, h));
|
||||
efl_gfx_entity_position_set(o_mask, EINA_POSITION2D((win_w - w) / 2, (win_h - h) / 2));
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(const 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
|
|
@ -94,8 +94,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -129,8 +129,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -1163,12 +1163,13 @@ static const Expedite_Resolution resolutions[] = {
|
|||
{ "pal", 720 , 576 },
|
||||
{ "480p", 720 , 480 },
|
||||
{ "720p", 1280, 720 },
|
||||
{ "720p-p", 720, 1280 },
|
||||
{ "1050p", 1680, 1050},
|
||||
{ "1080p", 1920, 1080},
|
||||
{ "1080p-p", 1080, 1920},
|
||||
{ "wsvga", 1024, 600 },
|
||||
{ "wsvga-p", 600 , 1024},
|
||||
{ "s9", 1600, 900 },
|
||||
{ "watch-360", 360, 360},
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -1305,7 +1306,7 @@ main(int argc, char **argv)
|
|||
unsigned int i;
|
||||
|
||||
fprintf(stderr, "Known resolution :\n");
|
||||
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++)
|
||||
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
|
||||
fprintf(stderr, " * %s\t%ix%i\n", resolutions[i].name,
|
||||
resolutions[i].width, resolutions[i].height);
|
||||
return 0;
|
||||
|
@ -1315,7 +1316,7 @@ main(int argc, char **argv)
|
|||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++)
|
||||
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
|
||||
if (!strcmp(resolutions[i].name, resolution))
|
||||
break;
|
||||
if (i == sizeof(resolutions)/sizeof(resolutions[0]))
|
||||
|
|
|
@ -20,15 +20,6 @@
|
|||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EVIL
|
||||
# include <Evil.h>
|
||||
#endif
|
||||
|
||||
#include <Efl_Ui.h>
|
||||
#include <Evas.h>
|
||||
#include <Ecore.h>
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ expedite_sources = [ 'main.c',
|
|||
'image_blend_border.c',
|
||||
'image_blend_solid_middle_border.c',
|
||||
'image_blend_solid_border.c',
|
||||
'image_blend_solid_stretch.c',
|
||||
'image_blend_solid_9patch.c',
|
||||
'image_blend_border_recolor.c',
|
||||
'image_map_rotate.c',
|
||||
'image_map_solid_rotate.c',
|
||||
|
@ -74,6 +76,7 @@ expedite_sources = [ 'main.c',
|
|||
'textblock_intl.c',
|
||||
'textblock_auto_align.c',
|
||||
'textblock_text_append.c',
|
||||
'textblock_text_fill_format.c',
|
||||
'rect_blend.c',
|
||||
'rect_blend_pow2.c',
|
||||
'rect_solid.c',
|
||||
|
@ -94,6 +97,8 @@ expedite_sources = [ 'main.c',
|
|||
'image_blend_occlude3_very_many.c',
|
||||
'poly_blend.c',
|
||||
'proxy_image.c',
|
||||
'proxy_image_clipped.c',
|
||||
'proxy_textblock.c',
|
||||
'proxy_text_fixed.c',
|
||||
'proxy_text_random.c',
|
||||
'line_blend.c',
|
||||
|
@ -113,6 +118,7 @@ expedite_sources = [ 'main.c',
|
|||
'image_mask_11.c',
|
||||
'image_mask_12.c',
|
||||
'image_mask_13.c',
|
||||
'image_mask_clipped.c',
|
||||
'vg_basic_rect.c',
|
||||
'vg_basic_circle.c',
|
||||
'vg_basic_gradient.c',
|
||||
|
|
|
@ -143,8 +143,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -100,8 +100,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME image_blend_clipped_proxy_start
|
||||
#define NAME "Image Blend Clipped 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 * 2];
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
int i;
|
||||
Evas_Object *o,*src;
|
||||
|
||||
o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
|
||||
efl_file_simple_load(o, build_path("logo.png"), NULL);
|
||||
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
src = o;
|
||||
o_images[0] = src;
|
||||
|
||||
for (i = 1; i < OBNUM; i += 2)
|
||||
{
|
||||
Eo *clip;
|
||||
o = efl_add(EFL_CANVAS_PROXY_CLASS, evas);
|
||||
o_images[i] = o;
|
||||
efl_canvas_proxy_source_set(o, src);
|
||||
efl_gfx_entity_size_set(o, EINA_SIZE2D(120, 160));
|
||||
efl_gfx_fill_set(o, EINA_RECT(0, 0, 120, 160));
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
|
||||
clip = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
o_images[i + 1] = clip;
|
||||
efl_canvas_object_clipper_set(o, clip);
|
||||
efl_gfx_entity_size_set(clip, EINA_SIZE2D(120, 80));
|
||||
efl_canvas_object_has_fixed_size_set(o, 1);
|
||||
efl_gfx_entity_visible_set(clip, EINA_TRUE);
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < OBNUM * 2; i++) efl_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 * 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);
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||
if (i < 1) continue;
|
||||
i++;
|
||||
if ((i - 1) % 4)
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y + h / 2));
|
||||
else
|
||||
efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(const 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
|
||||
|
|
@ -103,8 +103,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,8 @@ static void _setup(void)
|
|||
{
|
||||
o = evas_object_text_add(evas);
|
||||
o_texts[i] = o;
|
||||
efl_text_font_set(o, "Vera-Bold", 20);
|
||||
efl_text_font_family_set(o, "Vera-Bold");
|
||||
efl_text_font_size_set(o, 20);
|
||||
efl_text_set(o, "This is a test string");
|
||||
evas_object_text_style_set(o, st);
|
||||
efl_gfx_color_set(o, 255, 255, 255, 255);
|
||||
|
@ -115,8 +116,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,8 @@ static void _setup(void)
|
|||
strs[rnd() % (sizeof(strs) / sizeof(char *))],
|
||||
strs[rnd() % (sizeof(strs) / sizeof(char *))]);
|
||||
|
||||
efl_text_font_set(o, "Vera-Bold", 20);
|
||||
efl_text_font_family_set(o, "Vera-Bold");
|
||||
efl_text_font_size_set(o, 20);
|
||||
efl_text_set(o, buf);
|
||||
efl_gfx_color_set(o, 0, 0, 0, 255);
|
||||
exp_size_get(o, &w, &h);
|
||||
|
@ -132,8 +133,7 @@ void FNAME(void);
|
|||
# ifndef UI
|
||||
void FNAME(void)
|
||||
{
|
||||
ui_func_set(_key, _loop);
|
||||
_setup();
|
||||
ui_func_set(_key, _loop, _setup);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
#undef FNAME
|
||||
#undef NAME
|
||||
#undef ICON
|
||||
|
||||
/* metadata */
|
||||
#define FNAME proxy_textblock_start
|
||||
#define NAME "Proxy Textblock"
|
||||
#define ICON "text.png"
|
||||
|
||||
#ifndef PROTO
|
||||
# ifndef UI
|
||||
# include "main.h"
|
||||
|
||||
#undef OBNUM
|
||||
#define OBNUM 4
|
||||
|
||||
/* standard var */
|
||||
static int done = 0;
|
||||
|
||||
/* private data */
|
||||
static Evas_Object *o_texts[OBNUM];
|
||||
|
||||
//uncomment to test vs plain textblock render perf
|
||||
//#define PROXY_CMP 1
|
||||
|
||||
/* setup */
|
||||
static void _setup(void)
|
||||
{
|
||||
int i;
|
||||
Evas_Object *o, *clip, *proxy;
|
||||
|
||||
for (i = 0; i < OBNUM; i++)
|
||||
{
|
||||
o = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, evas);
|
||||
o_texts[i] = o;
|
||||
efl_text_font_family_set(o, "Vera-Bold");
|
||||
efl_text_font_size_set(o, 12);
|
||||
efl_text_wrap_set(o, EFL_TEXT_FORMAT_WRAP_WORD);
|
||||
efl_text_multiline_set(o, 1);
|
||||
efl_text_set(o,
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
|
||||
"eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut "
|
||||
"enim ad minim veniam, quis nostrud exercitation ullamco laboris "
|
||||
"nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in "
|
||||
"reprehenderit in voluptate velit esse cillum dolore eu fugiat "
|
||||
"nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in "
|
||||
"culpa qui officia deserunt mollit anim id est laborum."
|
||||
);
|
||||
efl_text_color_set(o, 0, 0, 0, 255);
|
||||
efl_gfx_entity_size_set(o, EINA_SIZE2D(480, 160));
|
||||
efl_gfx_entity_visible_set(o, EINA_TRUE);
|
||||
|
||||
i++;
|
||||
clip = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
o_texts[i] = clip;
|
||||
efl_canvas_object_clipper_set(o, clip);
|
||||
#ifdef PROXY_CMP
|
||||
efl_gfx_entity_size_set(clip, EINA_SIZE2D(480, 160));
|
||||
#else
|
||||
efl_gfx_entity_size_set(clip, EINA_SIZE2D(480, 80));
|
||||
#endif
|
||||
efl_gfx_entity_visible_set(clip, EINA_TRUE);
|
||||
efl_canvas_object_has_fixed_size_set(o, 1);
|
||||
|
||||
i++;
|
||||
proxy = efl_add(EFL_CANVAS_PROXY_CLASS, evas);
|
||||
o_texts[i] = proxy;
|
||||
efl_canvas_proxy_source_set(proxy, o);
|
||||
efl_canvas_proxy_source_clip_set(proxy, EINA_FALSE);
|
||||
/* only draw the lower half of the proxy object */
|
||||
efl_gfx_fill_set(proxy, EINA_RECT(0, 80, 480, 80));
|
||||
efl_gfx_entity_size_set(proxy, EINA_SIZE2D(480, 160));
|
||||
#ifdef PROXY_CMP
|
||||
efl_gfx_entity_visible_set(proxy, EINA_FALSE);
|
||||
#else
|
||||
efl_gfx_entity_visible_set(proxy, EINA_TRUE);
|
||||
#endif
|
||||
|
||||
i++;
|
||||
/* restrict the sampling of the source text to the lower half */
|
||||
clip = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
|
||||
o_texts[i] = clip;
|
||||
efl_canvas_object_clipper_set(proxy, clip);
|
||||
efl_gfx_entity_size_set(clip, EINA_SIZE2D(480, 80));
|
||||
#ifdef PROXY_CMP
|
||||
efl_gfx_entity_visible_set(clip, EINA_FALSE);
|
||||
#else
|
||||
efl_gfx_entity_visible_set(clip, EINA_TRUE);
|
||||
efl_canvas_object_has_fixed_size_set(proxy, 1);
|
||||
#endif
|
||||
}
|
||||
done = 0;
|
||||
}
|
||||
|
||||
/* cleanup */
|
||||
static void _cleanup(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < OBNUM; i++) efl_del(o_texts[i]);
|
||||
}
|
||||
|
||||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
static int k = 0;
|
||||
int i;
|
||||
Evas_Coord x, y, w, h;
|
||||
for (i = 0; i < OBNUM; i++)
|
||||
{
|
||||
w = 480;
|
||||
h = 160;
|
||||
x = (win_w / 2) - (w / 2);
|
||||
x += sin((double)(f + ((i + k) * 13)) / (36.7 * SLOW)) * (w / 2);
|
||||
y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + ((i + k) * 28)) / (43.8 * SLOW)) * (h / 2);
|
||||
efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x, y));
|
||||
i++;
|
||||
efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x, y));
|
||||
i++;
|
||||
efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x, y));
|
||||
i++;
|
||||
efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x, y + (h / 2)));
|
||||
}
|
||||
++k;
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
/* prepend special key handlers if interactive (before STD) */
|
||||
static void _key(const 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
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue