Enlightenment CVS committal
Author : dj2
Project : e17
Module : docs
Dir : e17/docs/ewlbook/xml
Modified Files:
appendix-ewl_media_example.xml bookinfo.xml config.xml
getting_started.xml themes.xml widgets.xml
Log Message:
- update to _object_ changes
- fill out some other random stuff
===================================================================
RCS file: /cvsroot/enlightenment/e17/docs/ewlbook/xml/appendix-ewl_media_example.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- appendix-ewl_media_example.xml 23 Jul 2004 03:51:53 -0000 1.2
+++ appendix-ewl_media_example.xml 13 Aug 2004 01:17:12 -0000 1.3
@@ -130,14 +130,14 @@
ewl_window_set_class(EWL_WINDOW(win), "EWL_Media_test");
ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW, del_cb, NULL);
ewl_callback_append(win, EWL_CALLBACK_KEY_UP, key_up_cb, NULL);
- ewl_object_request_size(EWL_OBJECT(win), 320, 280);
- ewl_object_set_fill_policy(EWL_OBJECT(win), EWL_FLAG_FILL_ALL);
+ ewl_object_size_request(EWL_OBJECT(win), 320, 280);
+ ewl_object_fill_policy_set(EWL_OBJECT(win), EWL_FLAG_FILL_ALL);
ewl_widget_show(win);
/* box to contain everything */
b = ewl_vbox_new();
ewl_container_append_child(EWL_CONTAINER(win), b);
- ewl_object_set_fill_policy(EWL_OBJECT(b), EWL_FLAG_FILL_ALL);
+ ewl_object_fill_policy_set(EWL_OBJECT(b), EWL_FLAG_FILL_ALL);
ewl_widget_show(b);
/* create the time widget now so we can pass it to the video as data */
@@ -146,14 +146,14 @@
/* the video */
video = ewl_media_new(file);
ewl_container_append_child(EWL_CONTAINER(b), video);
- ewl_object_set_fill_policy(EWL_OBJECT(video), EWL_FLAG_FILL_ALL);
+ ewl_object_fill_policy_set(EWL_OBJECT(video), EWL_FLAG_FILL_ALL);
ewl_callback_append(video, EWL_CALLBACK_REALIZE, video_realize_cb, NULL);
ewl_callback_append(video, EWL_CALLBACK_VALUE_CHANGED, video_change_cb, time);
ewl_widget_show(video);
/* box to contain contols and scrollers */
controls = ewl_vbox_new();
- ewl_object_set_fill_policy(EWL_OBJECT(controls),
+ ewl_object_fill_policy_set(EWL_OBJECT(controls),
EWL_FLAG_FILL_VSHRINK | EWL_FLAG_FILL_HFILL);
ewl_container_append_child(EWL_CONTAINER(b), controls);
ewl_widget_show(controls);
@@ -190,7 +190,7 @@
/* the video seeker */
seeker = ewl_seeker_new(EWL_ORIENTATION_HORIZONTAL);
ewl_container_append_child(EWL_CONTAINER(b), seeker);
- ewl_object_set_fill_policy(EWL_OBJECT(seeker),
+ ewl_object_fill_policy_set(EWL_OBJECT(seeker),
EWL_FLAG_FILL_VSHRINK | EWL_FLAG_FILL_HFILL);
ewl_seeker_set_value(EWL_SEEKER(seeker), 0.0);
ewl_seeker_set_range(EWL_SEEKER(seeker), 0.0);
@@ -200,8 +200,8 @@
/* the time text spot */
ewl_container_append_child(EWL_CONTAINER(b), time);
- ewl_object_set_insets(EWL_OBJECT(time), 0, 3, 0, 0);
- ewl_object_set_fill_policy(EWL_OBJECT(time), EWL_FLAG_FILL_SHRINK);
+ ewl_object_insets_set(EWL_OBJECT(time), 0, 3, 0, 0);
+ ewl_object_fill_policy_set(EWL_OBJECT(time), EWL_FLAG_FILL_SHRINK);
ewl_widget_show(time);
ewl_main();
===================================================================
RCS file: /cvsroot/enlightenment/e17/docs/ewlbook/xml/bookinfo.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- bookinfo.xml 16 Jul 2004 04:11:17 -0000 1.3
+++ bookinfo.xml 13 Aug 2004 01:17:12 -0000 1.4
@@ -30,6 +30,16 @@
<revremark>Add more widgets, add some hierarchy stuff</revremark>
</revision>
</revhistory>
+
+ <legalnotice>
+ <para>
+ This work is licensed under the Creative Commons NonCommercial-ShareAlike
+ License. To view a copy of this license, visit
+ <ulink url="http://creativecommons.org/licenses/nc-sa/1.0/">
+ http://creativecommons.org/licenses/nc-sa/1.0/</ulink> or send a letter to
+ Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
+ </para>
+ </legalnotice>
<abstract>
<para>
===================================================================
RCS file: /cvsroot/enlightenment/e17/docs/ewlbook/xml/config.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- config.xml 30 Jul 2004 23:03:58 -0000 1.3
+++ config.xml 13 Aug 2004 01:17:12 -0000 1.4
@@ -85,23 +85,24 @@
<title>Application configuration</title>
<para>
The best way for an application to handle its specific configuration is to
-also use Ecore_Config. Doing so is simple and already handles thinks like
-listeners and callbacks for data changes and all that fun stuff.
+also use Ecore_Config. Doing so is simple and already handles things like
+defaults and callbacks for data changes.
</para>
<para>
As a safety precaution you should probably make a call to
<function>ecore_init()</function> in your code before using the
Ecore_Config functions. This will guarantee that Ecore won't be shutdown
-before your finished using it (You will need to make a call to
-<function>ecore_shutdown()</function> when you're done.
+before you're finished using it. This means you will need to make a call to
+<function>ecore_shutdown()</function> when you're finished using
+Ecore_Config.
</para>
<para>
Before you start using Ecore_Config you must make a call to <function>int
ecore_config_init(char *)</function> where the parameter is the name you
want your configuration to appear under in Ecore_Config. This is also the
-name that would be used if you use <command>examine</command> to change your
+name that would be used with <command>examine</command> to change your
configuration data. When you are finished using Ecore_Config you should call
<function>int ecore_config_shutdown(void)</function> to close down the
Ecore_Config system.
===================================================================
RCS file: /cvsroot/enlightenment/e17/docs/ewlbook/xml/getting_started.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- getting_started.xml 28 Jul 2004 20:02:51 -0000 1.5
+++ getting_started.xml 13 Aug 2004 01:17:12 -0000 1.6
@@ -55,7 +55,7 @@
ewl_window_set_title(EWL_WINDOW(win), "EWL Window");
ewl_window_set_name(EWL_WINDOW(win), "EWL_WINDOW");
ewl_window_set_class(EWL_WINDOW(win), "EWLWindow");
- ewl_object_request_size(EWL_OBJECT(win), 200, 100);
+ ewl_object_size_request(EWL_OBJECT(win), 200, 100);
ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW, destroy_cb, NULL);
ewl_widget_show(win);
@@ -161,7 +161,7 @@
ewl_window_set_title(EWL_WINDOW(win), "EWL Window");
ewl_window_set_name(EWL_WINDOW(win), "EWL_WINDOW");
ewl_window_set_class(EWL_WINDOW(win), "EWLWindow");
- ewl_object_request_size(EWL_OBJECT(win), 200, 100);
+ ewl_object_size_request(EWL_OBJECT(win), 200, 100);
ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW, destroy_cb, NULL);
ewl_widget_show(win);
</programlisting>
@@ -177,7 +177,7 @@
<para>
We then proceed to set the base size for the window with a call to
-<function>ewl_object_request_size()</function>. The second and third parameters (200,
100)
+<function>ewl_object_size_request()</function>. The second and third parameters (200,
100)
specify the width and height we wish the window to have on creation. You'll notice
that
this call casts to <literal>EWL_OBJECT()</literal>. This is because of the hierarchy
of
widgets that EWL provides, (further described in the <link
linkend="ch-OjbectHierarchy">
@@ -267,20 +267,20 @@
ewl_window_set_title(EWL_WINDOW(win), "Hello world");
ewl_window_set_class(EWL_WINDOW(win), "hello");
ewl_window_set_name(EWL_WINDOW(win), "hello");
- ewl_object_request_size(EWL_OBJECT(win), 200, 50);
+ ewl_object_size_request(EWL_OBJECT(win), 200, 50);
ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW, destroy_cb, NULL);
ewl_widget_show(win);
/* create the container */
box = ewl_vbox_new();
ewl_container_append_child(EWL_CONTAINER(win), box);
- ewl_object_set_fill_policy(EWL_OBJECT(box), EWL_FLAG_FILL_ALL);
+ ewl_object_fill_policy_set(EWL_OBJECT(box), EWL_FLAG_FILL_ALL);
ewl_widget_show(box);
/* create text label */
label = ewl_text_new(NULL);
ewl_container_append_child(EWL_CONTAINER(box), label);
- ewl_object_set_alignment(EWL_OBJECT(label), EWL_FLAG_ALIGN_CENTER);
+ ewl_object_alignment_set(EWL_OBJECT(label), EWL_FLAG_ALIGN_CENTER);
ewl_text_style_set(EWL_TEXT(label), "soft_shadow");
ewl_text_color_set(EWL_TEXT(label), 255, 0, 0, 255);
ewl_text_text_set(EWL_TEXT(label), "hello");
@@ -289,8 +289,8 @@
/* create the entry */
o = ewl_entry_new("");
ewl_container_append_child(EWL_CONTAINER(box), o);
- ewl_object_set_alignment(EWL_OBJECT(o), EWL_FLAG_ALIGN_CENTER);
- ewl_object_set_padding(EWL_OBJECT(o), 5, 5, 5, 0);
+ ewl_object_alignment_set(EWL_OBJECT(o), EWL_FLAG_ALIGN_CENTER);
+ ewl_object_padding_set(EWL_OBJECT(o), 5, 5, 5, 0);
ewl_text_color_set(EWL_TEXT(EWL_ENTRY(o)->text), 0, 0, 0, 255);
ewl_callback_append(o, EWL_CALLBACK_VALUE_CHANGED, text_update_cb, label);
ewl_widget_show(o);
@@ -376,7 +376,7 @@
<programlisting role="C">
box = ewl_vbox_new();
ewl_container_append_child(EWL_CONTAINER(win), box);
- ewl_object_set_fill_policy(EWL_OBJECT(box), EWL_FLAG_FILL_ALL);
+ ewl_object_fill_policy_set(EWL_OBJECT(box), EWL_FLAG_FILL_ALL);
ewl_widget_show(box);
</programlisting>
<para>
@@ -389,7 +389,7 @@
This places the given widget into the container as the next element. Containers are
packed
from top to bottom, or left to right, so the order elements are inserted into the
container effect there appearance on screen. Lastly, before showing the widget,
-we attach a fill policy with <function>ewl_object_set_fill_policy()</function>. The
fill
+we attach a fill policy with <function>ewl_object_fill_policy_set()</function>. The
fill
policy changes the way the object fills in its available space.
</para>
<para>
@@ -418,7 +418,7 @@
<programlisting role="C">
label = ewl_text_new(NULL);
ewl_container_append_child(EWL_CONTAINER(box), label);
- ewl_object_set_alignment(EWL_OBJECT(label), EWL_FLAG_ALIGN_CENTER);
+ ewl_object_alignment_set(EWL_OBJECT(label), EWL_FLAG_ALIGN_CENTER);
ewl_text_style_set(EWL_TEXT(label), "soft_shadow");
ewl_text_color_set(EWL_TEXT(label), 255, 0, 0, 255);
ewl_text_text_set(EWL_TEXT(label), "Hello");
@@ -437,7 +437,7 @@
<para>
Once the widget is created we attach it to the box
with <function>ewl_container_append_child()</function>. Next we set
-the alignment on the text object though
<function>ewl_object_set_alignment()</function>.
+the alignment on the text object though
<function>ewl_object_alignment_set()</function>.
This specifies how the contents will be aligned within the widget itself.
</para>
@@ -466,8 +466,8 @@
<programlisting role="C">
o = ewl_entry_new("");
ewl_container_append_child(EWL_CONTAINER(box), o);
- ewl_object_set_alignment(EWL_OBJECT(o), EWL_FLAG_ALIGN_CENTER);
- ewl_object_set_padding(EWL_OBJECT(o), 5, 5, 5, 0);
+ ewl_object_alignment_set(EWL_OBJECT(o), EWL_FLAG_ALIGN_CENTER);
+ ewl_object_padding_set(EWL_OBJECT(o), 5, 5, 5, 0);
ewl_text_color_set(EWL_TEXT(EWL_ENTRY(o)->text), 0, 0, 0, 255);
ewl_callback_append(o, EWL_CALLBACK_VALUE_CHANGED, text_update_cb, label);
ewl_widget_show(o);
@@ -477,7 +477,7 @@
<function>ewl_entry_new()</function>. In this case we are giving ""
as the value, but an initial string could be given to be displayed in the entry box.
We do a similar set of initializations to the entry box, setting the alignment and
-setting the text colour to black. The call to
<function>ewl_object_set_padding()</function>
+setting the text colour to black. The call to
<function>ewl_object_padding_set()</function>
sets the amount of padding around the widget. The four parameters are, left, right,
top and bottom.
</para>
===================================================================
RCS file: /cvsroot/enlightenment/e17/docs/ewlbook/xml/themes.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- themes.xml 16 Jul 2004 04:11:17 -0000 1.1
+++ themes.xml 13 Aug 2004 01:17:12 -0000 1.2
@@ -2,7 +2,14 @@
<title>EWL Themes</title>
<para>
-Theming information.
+EWL uses the Edje library to handle off of its theming requirements. The
+themes can either be defined in the configuration file or on the command
+line using the <literal>--ewl-theme</literal> switch.
+</para>
+
+<para>
+The use of Edje for the theming gives EWL a large amount of flexibility and
+provides the themer with a lot of power to customize the look of EWL.
</para>
</chapter>
===================================================================
RCS file: /cvsroot/enlightenment/e17/docs/ewlbook/xml/widgets.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- widgets.xml 23 Jul 2004 13:59:16 -0000 1.8
+++ widgets.xml 13 Aug 2004 01:17:12 -0000 1.9
@@ -92,7 +92,7 @@
<title>Creating a button</title>
<programlisting role="C">
Ewl_Widget *button = ewl_button_new("A button");
- ewl_object_set_alignment(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER);
+ ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER);
ewl_callback_append(button, EWL_CALLBACK_CLICKED, button_cb, NULL);
ewl_widget_show(button);
</programlisting>
@@ -139,8 +139,33 @@
</inlinemediaobject>
</figure>
</para>
+
<para>
+<example id="sec-EwlCheckButtonCode">
+ <title>Creating a checkbutton</title>
+ <programlisting role="C">
+ Ewl_Widget *cb = ewl_checkbutton_new("Label");
+ ewl_checkbutton_set_label_position(EWL_CHECKBUTTON(cb), EWL_FLAG_ALIGN_LEFT);
+ ewl_callback_append(cb, EWL_CALLBACK_VALUE_CHANGED, checkbutton_cb, NULL);
+ ewl_widget_show(cb);
+ </programlisting>
+</example>
</para>
+
+<para>
+<example id="sec-EwlCheckButtonCB">
+ <title>Button Callback</title>
+ <programlisting role="C">
+void checkbutton_cb(Ewl_Widget *w, void *event, void *data) {
+ if (ewl_checkbutton_is_checked(EWL_CHECKBUTTON(w)))
+ printf("checked\n");
+ else
+ printf("Not checked\n");
+}
+ </programlisting>
+</example>
+</para>
+
</sect1>
<!-- ################################### -->
@@ -222,14 +247,14 @@
Ewl_Widget *o = NULL;
o = ewl_text_new("a dialog eh");
- ewl_object_set_alignment(EWL_OBJECT(o),
+ ewl_object_alignment_set(EWL_OBJECT(o),
EWL_FLAG_ALIGN_CENTER);
ewl_widget_show(o);
dialog = ewl_dialog_new(EWL_POSITION_BOTTOM);
ewl_dialog_set_has_separator(EWL_DIALOG(dialog), 0);
ewl_dialog_add_widget(EWL_DIALOG(dialog), o);
- ewl_object_set_alignment(EWL_OBJECT(dialog), EWL_FLAG_ALIGN_CENTER);
+ ewl_object_alignment_set(EWL_OBJECT(dialog), EWL_FLAG_ALIGN_CENTER);
ewl_widget_show(dialog);
o = ewl_dialog_set_button(EWL_STOCK_OK, EWL_RESPONSE_OK);
@@ -354,8 +379,8 @@
<title>Creating an EWL entry box</title>
<programlisting role="C">
Ewl_Widget *entry = ewl_entry_new();
- ewl_object_request_size(EWL_OBJECT(entry), 100, 15);
- ewl_object_set_padding(EWL_OBJECT(entry), 1, 1, 1, 1);
+ ewl_object_size_request(EWL_OBJECT(entry), 100, 15);
+ ewl_object_padding_set(EWL_OBJECT(entry), 1, 1, 1, 1);
ewl_callback_append(entry, EWL_CALLBACK_VALUE_CHANGED, entry_cb, NULL);
ewl_widget_show(entry);
</programlisting>
@@ -363,9 +388,9 @@
The <literal>Ewl_Entry</literal> is a fairly simple object to work with, about the
only required setup is to create the new object and attach a callback for
<literal>EWL_CALLBACK_VALUE_CHANGED</literal> events. This example takes the
-extra steps of setting the size with <function>ewl_object_request_size()</function>
+extra steps of setting the size with <function>ewl_object_size_request()</function>
and adding a little bit of padding to the widget with
-<function>ewl_object_set_padding()</function>.
+<function>ewl_object_padding_set()</function>.
</para>
<para>
@@ -469,7 +494,18 @@
<sect1 id="sec-EwlImage">
<title>ewl_image</title>
<para>
+<example>
+<title>Ewl_Image</title>
+<programlisting>
+ Ewl_Widget *i = ewl_image_new("/usr/foo/img.png", NULL);
+ ewl_widget_show(i);
+</programlisting>
+</example>
+The <function>ewl_image_new()</function> function takes two parameters, the
+path to the image to be loaded and a key for the image data. The key is used
+primarily to load edje groups or keyed data as the image.
</para>
+
</sect1>
<!-- ################################### -->
@@ -943,7 +979,7 @@
ewl_window_set_title(EWL_WINDOW(window), "foo window");
ewl_window_set_class(EWL_WINDOW(window), "foo_class");
ewl_window_set_name(EWL_WINDOW(window), "foo_name");
- ewl_object_request_size(EWL_OBJECT(window), 300, 400);
+ ewl_object_size_request(EWL_OBJECT(window), 300, 400);
ewl_callback_append(window, EWL_CALLBACK_DELETE_WINDOW, win_del_cb, NULL);
ewl_widget_show(window);
</programlisting>
@@ -956,9 +992,9 @@
<para>
Since the window is a <literal>Ewl_Object</literal> like any other, we use the
-<function>ewl_object_request_size()</function> to request the starting size of
-our window. We could have also called
<function>ewl_object_set_minimum_size()</function>
-and <function>ewl_object_set_maximum_size()</function> to constrain the
+<function>ewl_object_size_request()</function> to request the starting size of
+our window. We could have also called
<function>ewl_object_minimum_size_set()</function>
+and <function>ewl_object_maximum_size_set()</function> to constrain the
minimum/maximum sizes of our window.
</para>
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs