Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin/tests/layer


Modified Files:
        ewl_layer_test.c 


Log Message:
- change tabs to spaces (Ewl uses an 8 space indent now instead of a tab)

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/layer/ewl_layer_test.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_layer_test.c    6 Dec 2007 06:58:10 -0000       1.2
+++ ewl_layer_test.c    6 May 2008 20:09:05 -0000       1.3
@@ -1,4 +1,4 @@
-/* vim: set sw=8 ts=8 sts=8 noexpandtab: */
+/* vim: set sw=8 ts=8 sts=8 expandtab: */
 #include "Ewl_Test.h"
 #include "ewl_test_private.h"
 #include "ewl_overlay.h"
@@ -16,11 +16,11 @@
 void
 test_info(Ewl_Test *test)
 {
-       test->name = "Layer";
-       test->tip = "sets the layer of a widget";
-       test->filename = __FILE__;
-       test->func = create_test;
-       test->type = EWL_TEST_TYPE_MISC;
+        test->name = "Layer";
+        test->tip = "sets the layer of a widget";
+        test->filename = __FILE__;
+        test->func = create_test;
+        test->type = EWL_TEST_TYPE_MISC;
 }
 
 static Ewl_Widget * button_row1[20];
@@ -30,142 +30,142 @@
 static int
 create_test(Ewl_Container *box)
 {
-       Ewl_Widget *w, *c, *spec;
-       int i;
+        Ewl_Widget *w, *c, *spec;
+        int i;
 
-       /*
-        * Create the overlay container
-        */
-       c = ewl_overlay_new();
-       ewl_container_child_append(EWL_CONTAINER(box), c);
-       ewl_object_fill_policy_set(EWL_OBJECT(c), EWL_FLAG_FILL_FILL);
-       ewl_widget_show(c);
-
-       /*
-        * Create the spectrum
-        */
-       w = ewl_spectrum_new();
-       ewl_container_child_append(EWL_CONTAINER(c), w);
-       ewl_widget_layer_priority_set(w, 0);
-       spec = w;
-
-       /*
-        * And now create the first row of buttons
-        */
-       for (i = 0; i < 20; i++) {
-               w = ewl_button_new();
-               ewl_button_label_set(EWL_BUTTON(w), "Hide");
-               ewl_container_child_append(EWL_CONTAINER(c), w);
-               ewl_widget_layer_priority_set(w, i - 10);
-               ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
-               ewl_callback_append(w, EWL_CALLBACK_CLICKED,
-                       spectrum_hide, spec);
-               ewl_widget_show(w);
-
-               button_row1[i] = w;
-       }
-
-       /*
-        * Create the second row
-        */
-       for (i = 0; i < 20; i++) {
-               w = ewl_button_new();
-               ewl_button_label_set(EWL_BUTTON(w), "Show");
-               ewl_container_child_append(EWL_CONTAINER(c), w);
-               ewl_widget_layer_priority_set(w, 10 - i);
-               ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
-               ewl_callback_append(w, EWL_CALLBACK_CLICKED,
-                       spectrum_show, spec);
-               ewl_widget_show(w);
-
-               button_row2[i] = w;
-       }
-
-       /*
-        *  the dynamicly layered button
-        */
-       w = ewl_button_new();
-       ewl_button_label_set(EWL_BUTTON(w), "Up/Down");
-       ewl_container_child_append(EWL_CONTAINER(c), w);
-       ewl_widget_layer_priority_set(w, 3);
-       ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
-       ewl_callback_append(w, EWL_CALLBACK_CLICKED,
-                       layer_change, NULL);
-       ewl_widget_show(w);
-       dbutton[0] = w;
-
-       /*
-        * the disabled button
-        */
-       w = ewl_button_new();
-       ewl_button_label_set(EWL_BUTTON(w), "Disabled");
-       ewl_widget_layer_priority_set(w, 2);
-       ewl_container_child_append(EWL_CONTAINER(c), w);
-       ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
-       ewl_object_state_add(EWL_OBJECT(w), EWL_FLAG_STATE_DISABLED);
-       ewl_widget_show(w);
-       dbutton[1] = w;
+        /*
+         * Create the overlay container
+         */
+        c = ewl_overlay_new();
+        ewl_container_child_append(EWL_CONTAINER(box), c);
+        ewl_object_fill_policy_set(EWL_OBJECT(c), EWL_FLAG_FILL_FILL);
+        ewl_widget_show(c);
+
+        /*
+         * Create the spectrum
+         */
+        w = ewl_spectrum_new();
+        ewl_container_child_append(EWL_CONTAINER(c), w);
+        ewl_widget_layer_priority_set(w, 0);
+        spec = w;
+
+        /*
+         * And now create the first row of buttons
+         */
+        for (i = 0; i < 20; i++) {
+               w = ewl_button_new();
+               ewl_button_label_set(EWL_BUTTON(w), "Hide");
+               ewl_container_child_append(EWL_CONTAINER(c), w);
+               ewl_widget_layer_priority_set(w, i - 10);
+               ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
+               ewl_callback_append(w, EWL_CALLBACK_CLICKED,
+                       spectrum_hide, spec);
+               ewl_widget_show(w);
+
+               button_row1[i] = w;
+        }
+
+        /*
+         * Create the second row
+         */
+        for (i = 0; i < 20; i++) {
+               w = ewl_button_new();
+               ewl_button_label_set(EWL_BUTTON(w), "Show");
+               ewl_container_child_append(EWL_CONTAINER(c), w);
+               ewl_widget_layer_priority_set(w, 10 - i);
+               ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
+               ewl_callback_append(w, EWL_CALLBACK_CLICKED,
+                       spectrum_show, spec);
+               ewl_widget_show(w);
+
+               button_row2[i] = w;
+        }
+
+        /*
+         *  the dynamicly layered button
+         */
+        w = ewl_button_new();
+        ewl_button_label_set(EWL_BUTTON(w), "Up/Down");
+        ewl_container_child_append(EWL_CONTAINER(c), w);
+        ewl_widget_layer_priority_set(w, 3);
+        ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
+        ewl_callback_append(w, EWL_CALLBACK_CLICKED,
+                       layer_change, NULL);
+        ewl_widget_show(w);
+        dbutton[0] = w;
+
+        /*
+         * the disabled button
+         */
+        w = ewl_button_new();
+        ewl_button_label_set(EWL_BUTTON(w), "Disabled");
+        ewl_widget_layer_priority_set(w, 2);
+        ewl_container_child_append(EWL_CONTAINER(c), w);
+        ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
+        ewl_object_state_add(EWL_OBJECT(w), EWL_FLAG_STATE_DISABLED);
+        ewl_widget_show(w);
+        dbutton[1] = w;
 
-       ewl_callback_append(c, EWL_CALLBACK_CONFIGURE, configure_cb, NULL);
+        ewl_callback_append(c, EWL_CALLBACK_CONFIGURE, configure_cb, NULL);
 
-       return 1;
+        return 1;
 }
 
 static void
 spectrum_show(Ewl_Widget *w __UNUSED__, void *ev_data __UNUSED__,
-               void *user_data)
+               void *user_data)
 {
-       Ewl_Widget *spec;
+        Ewl_Widget *spec;
 
-       spec = user_data;
-       ewl_widget_show(spec);
-       return;
+        spec = user_data;
+        ewl_widget_show(spec);
+        return;
 }
 
 static void
 spectrum_hide(Ewl_Widget *w __UNUSED__, void *ev_data __UNUSED__,
-               void *user_data)
+               void *user_data)
 {
-       Ewl_Widget *spec;
+        Ewl_Widget *spec;
 
-       spec = user_data;
-       ewl_widget_hide(spec);
-       return;
+        spec = user_data;
+        ewl_widget_hide(spec);
+        return;
 }
 
 static void
 layer_change(Ewl_Widget *w, void *ev_data __UNUSED__,
-               void *user_data __UNUSED__)
+               void *user_data __UNUSED__)
 {
-       if (ewl_widget_layer_priority_get(w) == 3)
-               ewl_widget_layer_priority_set(w, 1);
-       else
-               ewl_widget_layer_priority_set(w, 3);
+        if (ewl_widget_layer_priority_get(w) == 3)
+               ewl_widget_layer_priority_set(w, 1);
+        else
+               ewl_widget_layer_priority_set(w, 3);
 }
 
 static void
 configure_cb(Ewl_Widget *w, void *ev_data __UNUSED__,
-               void *user_data __UNUSED__)
+               void *user_data __UNUSED__)
 {
-       int x, y;
-       int i;
+        int x, y;
+        int i;
 
-       x = CURRENT_X(w);
-       y = CURRENT_Y(w);
-       /*
-        * place the first row of buttons
-        */
-       for (i = 0; i < 20; i++)
-               ewl_object_position_request(EWL_OBJECT(button_row1[i]),
-                                               i * 5 + x, i * 5 + y);
-       /*
-        * place the second row
-        */
-       for (i = 0; i < 20; i++)
-               ewl_object_position_request(EWL_OBJECT(button_row2[i]),
-                                               i * 5 + 40 + x, i * 5 + y);
+        x = CURRENT_X(w);
+        y = CURRENT_Y(w);
+        /*
+         * place the first row of buttons
+         */
+        for (i = 0; i < 20; i++)
+               ewl_object_position_request(EWL_OBJECT(button_row1[i]),
+                                               i * 5 + x, i * 5 + y);
+        /*
+         * place the second row
+         */
+        for (i = 0; i < 20; i++)
+               ewl_object_position_request(EWL_OBJECT(button_row2[i]),
+                                               i * 5 + 40 + x, i * 5 + y);
 
-       ewl_object_position_request(EWL_OBJECT(dbutton[0]), 180 + x, 0 + y);
-       ewl_object_position_request(EWL_OBJECT(dbutton[1]), 220 + x, 20 + y);
+        ewl_object_position_request(EWL_OBJECT(dbutton[0]), 180 + x, 0 + y);
+        ewl_object_position_request(EWL_OBJECT(dbutton[1]), 220 + x, 20 + y);
 }
 



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to