forked from enlightenment/efl
tests/ecore_wl2: Fix formatting
NB: No functional changes
This commit is contained in:
parent
73195a34de
commit
5140c43960
|
@ -19,7 +19,8 @@
|
||||||
#define WIDTH 480
|
#define WIDTH 480
|
||||||
#define HEIGHT 360
|
#define HEIGHT 360
|
||||||
|
|
||||||
typedef struct _Test_Data {
|
typedef struct _Test_Data
|
||||||
|
{
|
||||||
Ecore_Wl2_Display *display;
|
Ecore_Wl2_Display *display;
|
||||||
Ecore_Wl2_Window *win;
|
Ecore_Wl2_Window *win;
|
||||||
Ecore_Wl2_Frame_Cb_Handle *frame_callback_handler;
|
Ecore_Wl2_Frame_Cb_Handle *frame_callback_handler;
|
||||||
|
@ -72,16 +73,19 @@ _init_egl(Test_Data *td)
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
td->egl_display = eglGetDisplay((EGLNativeDisplayType)ecore_wl2_display_get(td->display));
|
td->egl_display =
|
||||||
|
eglGetDisplay((EGLNativeDisplayType)ecore_wl2_display_get(td->display));
|
||||||
eglInitialize(td->egl_display, NULL, NULL);
|
eglInitialize(td->egl_display, NULL, NULL);
|
||||||
eglChooseConfig(td->egl_display, attributes, &td->egl_conf, 1, &num_config);
|
eglChooseConfig(td->egl_display, attributes, &td->egl_conf, 1, &num_config);
|
||||||
td->egl_context = eglCreateContext(td->egl_display, td->egl_conf, EGL_NO_CONTEXT, NULL);
|
td->egl_context =
|
||||||
|
eglCreateContext(td->egl_display, td->egl_conf, EGL_NO_CONTEXT, NULL);
|
||||||
|
|
||||||
td->egl_window = wl_egl_window_create(td->surface, td->width, td->height);
|
td->egl_window = wl_egl_window_create(td->surface, td->width, td->height);
|
||||||
td->egl_surface = eglCreateWindowSurface(td->egl_display,
|
td->egl_surface =
|
||||||
td->egl_conf, td->egl_window, NULL);
|
eglCreateWindowSurface(td->egl_display, td->egl_conf, td->egl_window, NULL);
|
||||||
|
|
||||||
eglMakeCurrent(td->egl_display, td->egl_surface, td->egl_surface, td->egl_context);
|
eglMakeCurrent(td->egl_display, td->egl_surface, td->egl_surface,
|
||||||
|
td->egl_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -423,7 +427,9 @@ _test_activated_configure_complete(void *data, int type EINA_UNUSED, void *event
|
||||||
{
|
{
|
||||||
Test_Data *td = data;
|
Test_Data *td = data;
|
||||||
|
|
||||||
td->frame_callback_handler = ecore_wl2_window_frame_callback_add(td->win, _test_activated_frame_cb, td);
|
td->frame_callback_handler =
|
||||||
|
ecore_wl2_window_frame_callback_add(td->win,
|
||||||
|
_test_activated_frame_cb, td);
|
||||||
ecore_wl2_window_commit(td->win, EINA_TRUE);
|
ecore_wl2_window_commit(td->win, EINA_TRUE);
|
||||||
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
@ -463,7 +469,8 @@ EFL_START_TEST(wl2_window_activated)
|
||||||
ecore_wl2_window_show(td->win);
|
ecore_wl2_window_show(td->win);
|
||||||
|
|
||||||
_init_egl(td);
|
_init_egl(td);
|
||||||
td->handler = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
|
td->handler =
|
||||||
|
ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
|
||||||
_test_activated_configure_complete, td);
|
_test_activated_configure_complete, td);
|
||||||
ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_ACTIVATE,
|
ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_ACTIVATE,
|
||||||
_test_activated_window_activate, NULL);
|
_test_activated_window_activate, NULL);
|
||||||
|
@ -603,7 +610,8 @@ _test_commit_configure_complete(void *data, int type EINA_UNUSED, void *event EI
|
||||||
{
|
{
|
||||||
Test_Data *td = data;
|
Test_Data *td = data;
|
||||||
|
|
||||||
td->frame_callback_handler = ecore_wl2_window_frame_callback_add(td->win, _test_commit_frame_cb, td);
|
td->frame_callback_handler =
|
||||||
|
ecore_wl2_window_frame_callback_add(td->win, _test_commit_frame_cb, td);
|
||||||
ecore_wl2_window_commit(td->win, EINA_TRUE);
|
ecore_wl2_window_commit(td->win, EINA_TRUE);
|
||||||
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
@ -633,7 +641,8 @@ EFL_START_TEST(wl2_window_commit)
|
||||||
|
|
||||||
ecore_wl2_window_show(td->win);
|
ecore_wl2_window_show(td->win);
|
||||||
|
|
||||||
td->handler = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
|
td->handler =
|
||||||
|
ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
|
||||||
_test_commit_configure_complete, td);
|
_test_commit_configure_complete, td);
|
||||||
|
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
|
@ -664,7 +673,9 @@ _test_frame_callback_configure_complete(void *data, int type EINA_UNUSED, void *
|
||||||
{
|
{
|
||||||
Test_Data *td = data;
|
Test_Data *td = data;
|
||||||
|
|
||||||
td->frame_callback_handler = ecore_wl2_window_frame_callback_add(td->win, _test_frame_callback_frame_cb, td);
|
td->frame_callback_handler =
|
||||||
|
ecore_wl2_window_frame_callback_add(td->win,
|
||||||
|
_test_frame_callback_frame_cb, td);
|
||||||
ecore_wl2_window_commit(td->win, EINA_TRUE);
|
ecore_wl2_window_commit(td->win, EINA_TRUE);
|
||||||
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
@ -694,7 +705,8 @@ EFL_START_TEST(wl2_window_frame_callback)
|
||||||
|
|
||||||
ecore_wl2_window_show(td->win);
|
ecore_wl2_window_show(td->win);
|
||||||
|
|
||||||
td->handler = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
|
td->handler =
|
||||||
|
ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
|
||||||
_test_frame_callback_configure_complete, td);
|
_test_frame_callback_configure_complete, td);
|
||||||
|
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
|
|
Loading…
Reference in New Issue