summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-01-23 10:28:38 -0500
committerMike Blumenkrantz <zmike@samsung.com>2014-01-23 10:34:12 -0500
commit7d53ae97ee084d452fbdc339ec125feb5d4ad721 (patch)
tree8917b4363033afd3c7b8749f32904f7032d241dd /src/tests
parent4614d8b0fbf56afdbe2bf09ddfdce39ac9ea8446 (diff)
downloadenlightenment-7d53ae97ee084d452fbdc339ec125feb5d4ad721.tar.gz
add shaped input window test of doom
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/shaped_input.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/tests/shaped_input.c b/src/tests/shaped_input.c
new file mode 100644
index 0000000000..ebe9f6ad81
--- /dev/null
+++ b/src/tests/shaped_input.c
@@ -0,0 +1,46 @@
+#include <Ecore_X.h>
+
+static Ecore_X_Window a;
+static unsigned int i, j;
+static Ecore_X_Rectangle rects[10000];
+
+static Eina_Bool
+_shape(void *d EINA_UNUSED)
+{
+ unsigned int num = (i * 100) + j;
+ fprintf(stderr, "%u: %d,%d %dx%d\n", i, j, 1, 1);
+ rects[num].x = i;
+ rects[num].y = j;
+ rects[num].width = 1;
+ rects[num].height = 1;
+ ecore_x_window_shape_input_rectangles_set(a, (Ecore_X_Rectangle*)rects, 10000);
+ j++;
+ if (j == 100)
+ {
+ i++;
+ j = 0;
+ }
+ if (i == 100)
+ {
+ i = 0;
+ memset(&rects, 0, sizeof(rects));
+ ecore_x_window_shape_input_rectangles_set(a, (Ecore_X_Rectangle*)rects, 10000);
+ }
+ return EINA_TRUE;
+}
+
+int
+main(void)
+{
+ ecore_x_init(NULL);
+
+ a = ecore_x_window_input_new(0, 0, 0, 100, 100);
+ ecore_x_window_show(a);
+
+ ecore_timer_add(0.01, _shape, NULL);
+
+
+ ecore_x_icccm_name_class_set(a, "shaped_input", "test");
+ ecore_main_loop_begin();
+ return 0;
+}