<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><updated>2010-04-01T11:48:51-05:00</updated><title type="text">Feed for edmann.com</title><link href="http://www.edmann.com/Open-Source/2010/04/01/First-Enlightenment-App/feed/atom.xml" rel="self"/><author><name>edmann.com</name><email>support@arctechnologies.net</email><uri>http://edmann.com</uri></author><id>urn:uuid:61a0877b-9f9a-311b-a922-99fb9d4529c7</id><category term="Open-Source"/><subtitle type="text"></subtitle><entry><title>First Enlightenment App</title><link href="/Open-Source/2010/04/01/First-Enlightenment-App"/><id>urn:uuid:e6e8b15e-bc4c-34c8-ae9e-4a5d56a60a7c</id><updated>2010-04-01T11:39:40-05:00</updated><summary type="html"><![CDATA[<span id="synopsis">&#13;
<p>Well<a href="http://enlightenment.org/"> Enlightenment</a> has come a long ways. I remember getting e16 over 10 years ago and i thought it was awesome back then. It has only gotten better. I have been following the progress over the years and have tried e17 several times. Well now it looks like e17 is getting stable and a new stable release will be out. Now it may be another year i don't know, but things are looking very good.</p>&#13;
<p>I have two apps that i want to do the first is a gui front-end for <a href="http://notmuchmail.org/">notmuchmail</a>. And the other is just a personal project to see if something is very feasible. I will give more input once i have it in a viewable state, right now it would be labelled as vaporware.</p>&#13;
</span>]]></summary><category term="Open Source"/><published>2010-04-01T11:48:51-05:00</published><content type="html"><![CDATA[<p><span id="synopsis">
<p>Well<a href="http://enlightenment.org/"> Enlightenment</a> has come a long ways. I&nbsp;remember getting e16 over 10 years ago and i thought it was awesome back then. It has only gotten better. I&nbsp;have been following the progress over the years and have tried e17 several times. Well now it looks like e17 is getting stable and a new stable release will be out. Now it may be another year i don't know, but things are looking very good.</p>
<p>I&nbsp;have two apps that i want to do the first is a gui front-end for <a href="http://notmuchmail.org/">notmuchmail</a>. And the other is just a personal project to see if something is very feasible. I will give more input once i have it in a viewable state, right now it would be labelled as vaporware.</p>
</span></p>
<p>Well first things first i need to learn E, and so i started with the <a href="http://docs.enlightenment.org/books/cookbook/eflcookbook.html">EFL cookbook</a> on the enlightenment website. Well it must be out of date because i had to fix some things to get the code to compile. Here is the code that i am currently using.</p>
<p><code>#include &lt;errno.h&gt;<br />
#include &lt;string.h&gt;<br />
#include &lt;stdio.h&gt;<br />
#include &lt;unistd.h&gt;<br />
#include &lt;sys/stat.h&gt;<br />
#include &lt;sys/types.h&gt;<br />
#include &lt;Ewl.h&gt;<br />
<br />
#define PROG&nbsp;&nbsp;&nbsp; &quot;EWL Text Viewer&quot;<br />
<br />
/* globals */<br />
static Ewl_Widget *main_win = NULL;<br />
static Ewl_Widget *fd_win = NULL;<br />
<br />
/* pre-declarations */<br />
static void destroy_cb(Ewl_Widget *, void *, void *);<br />
static void destroy_filedialog_cb(Ewl_Widget *, void *, void *);<br />
static void open_file_cb(Ewl_Widget *, void *, void *);<br />
static void home_cb(Ewl_Widget *win, void *ev, void *data);<br />
static void file_menu_open_cb(Ewl_Widget *, void *, void *);<br />
static void key_up_cb(Ewl_Widget *, void *, void *);<br />
<br />
static char *read_file(char *);<br />
static void mk_gui(void);<br />
<br />
<br />
/* lets go */<br />
int main(int argc, char ** argv) {<br />
&nbsp;&nbsp;&nbsp; ewl_init(&amp;argc, argv);<br />
&nbsp;&nbsp;&nbsp; mk_gui();<br />
&nbsp;&nbsp;&nbsp; ewl_main();<br />
&nbsp;&nbsp;&nbsp; return 0;<br />
}<br />
<br />
/* build the main gui */<br />
static void mk_gui(void) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ewl_Widget *box = NULL, *menu_bar = NULL;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ewl_Widget *text_area = NULL, *scroll = NULL;<br />
<br />
&nbsp;&nbsp;&nbsp; /* create the main window */<br />
&nbsp;&nbsp;&nbsp; main_win = ewl_window_new();<br />
&nbsp;&nbsp;&nbsp; ewl_window_title_set(EWL_WINDOW(main_win), PROG);<br />
&nbsp;&nbsp;&nbsp; ewl_window_name_set(EWL_WINDOW(main_win), PROG);<br />
&nbsp;&nbsp;&nbsp; ewl_window_class_set(EWL_WINDOW(main_win), PROG);<br />
<br />
&nbsp;&nbsp;&nbsp; ewl_object_size_request(EWL_OBJECT(main_win), 200, 300);<br />
&nbsp;&nbsp;&nbsp; ewl_object_fill_policy_set(EWL_OBJECT(main_win), EWL_FLAG_FILL_FILL);<br />
<br />
&nbsp;&nbsp; // ewl_callback_append(main_win, EWL_CALLBACK_DELETE_WINDOW, destroy_cb, NULL);<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(main_win);<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /* create the main container */<br />
&nbsp;&nbsp;&nbsp; box = ewl_vbox_new();<br />
&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(main_win), box);<br />
&nbsp;&nbsp;&nbsp; ewl_object_fill_policy_set(EWL_OBJECT(box), EWL_FLAG_FILL_FILL);<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(box);<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /* create the menu bar */<br />
&nbsp;&nbsp;&nbsp; menu_bar = ewl_hbox_new();<br />
&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(box), menu_bar);<br />
&nbsp;&nbsp;&nbsp; ewl_object_fill_policy_set(EWL_OBJECT(menu_bar), EWL_FLAG_FILL_HSHRINK);<br />
&nbsp;&nbsp;&nbsp; ewl_object_alignment_set(EWL_OBJECT(menu_bar), EWL_FLAG_ALIGN_LEFT);<br />
&nbsp;&nbsp;&nbsp; ewl_box_spacing_set(EWL_BOX(menu_bar), 4);<br />
&nbsp;&nbsp;&nbsp; ewl_object_padding_set(EWL_OBJECT(menu_bar), 5, 5, 5, 5);<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(menu_bar);<br />
&nbsp; <br />
&nbsp;&nbsp;&nbsp; /* create the scrollpane */<br />
&nbsp;&nbsp;&nbsp; scroll = ewl_scrollpane_new();<br />
&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(box), scroll);<br />
&nbsp;&nbsp;&nbsp; ewl_object_fill_policy_set(EWL_OBJECT(scroll), EWL_FLAG_FILL_FILL);<br />
&nbsp;&nbsp;&nbsp; /*ewl_scrollpane_hscrollbar_flag_set(EWL_SCROLLPANE(scroll), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EWL_SCROLLPANE_FLAG_AUTO_VISIBLE);<br />
&nbsp;&nbsp;&nbsp; ewl_scrollpane_vscrollbar_flag_set(EWL_SCROLLPANE(scroll), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EWL_SCROLLPANE_FLAG_AUTO_VISIBLE);<br />
*/<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(scroll);<br />
<br />
&nbsp;&nbsp;&nbsp; /* create the text area */<br />
&nbsp;&nbsp;&nbsp; char *content = &quot;This is some content&quot;;<br />
&nbsp;&nbsp;&nbsp; text_area = ewl_text_new();<br />
&nbsp;&nbsp;&nbsp; ewl_text_text_set(EWL_TEXT(text_area), content);<br />
&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(scroll), text_area);<br />
&nbsp;&nbsp;&nbsp; ewl_object_padding_set(EWL_OBJECT(text_area), 1, 1, 1, 1);<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(text_area);<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /* create the menu */<br />
&nbsp;&nbsp;&nbsp; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ewl_Widget *file_menu = NULL, *item = NULL;<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* create the file menu */ <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file_menu = ewl_menu_new();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_button_label_set(EWL_BUTTON(file_menu), &quot;File&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(menu_bar), file_menu);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_widget_show(file_menu);<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* add the open entry to the file menu */ <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item = ewl_menu_item_new();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_button_label_set(EWL_BUTTON(item), &quot;Open&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(file_menu), item);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_callback_append(item, EWL_CALLBACK_CLICKED, file_menu_open_cb, <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text_area);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_widget_show(item);<br />
&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* add the quit entry to the file menu */ <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item = ewl_menu_item_new();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_button_label_set(EWL_BUTTON(item), &quot;Quit&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(file_menu), item);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_callback_append(item, EWL_CALLBACK_CLICKED, destroy_cb, NULL);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_widget_show(item); <br />
&nbsp;&nbsp;&nbsp; }<br />
<br />
&nbsp;&nbsp; }<br />
<br />
/* destroy the app */<br />
static void destroy_cb(Ewl_Widget *win, void *ev, void *data) {<br />
&nbsp;&nbsp;&nbsp; ewl_widget_destroy(win);<br />
&nbsp;&nbsp;&nbsp; ewl_main_quit();<br />
}<br />
<br />
/* the file menu open button callback */<br />
static void file_menu_open_cb(Ewl_Widget *win, void *ev, void *data) {<br />
&nbsp;&nbsp;&nbsp; Ewl_Widget *fd = NULL;<br />
&nbsp;&nbsp;&nbsp; Ewl_Widget *box = NULL;<br />
&nbsp;&nbsp;&nbsp; Ewl_Widget *home = NULL;<br />
<br />
&nbsp;&nbsp;&nbsp; /* create the file dialog window */<br />
&nbsp;&nbsp;&nbsp; fd_win = ewl_window_new();<br />
&nbsp;&nbsp;&nbsp; ewl_window_title_set(EWL_WINDOW(fd_win), PROG &quot; -- file dialog&quot;);<br />
&nbsp;&nbsp;&nbsp; ewl_window_name_set(EWL_WINDOW(fd_win), PROG &quot; -- file dialog&quot;);<br />
&nbsp;&nbsp;&nbsp; ewl_window_class_set(EWL_WINDOW(fd_win), PROG &quot; -- file dialog&quot;);<br />
&nbsp;&nbsp;&nbsp; ewl_object_size_request(EWL_OBJECT(fd_win), 500, 400);<br />
&nbsp;&nbsp;&nbsp; ewl_object_fill_policy_set(EWL_OBJECT(fd_win),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EWL_FLAG_FILL_FILL | EWL_FLAG_FILL_SHRINK);<br />
&nbsp;&nbsp;&nbsp; ewl_callback_append(fd_win, EWL_CALLBACK_DELETE_WINDOW, <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destroy_filedialog_cb, NULL);<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(fd_win);<br />
<br />
&nbsp;&nbsp;&nbsp; /* fd win container */<br />
&nbsp;&nbsp;&nbsp; box = ewl_vbox_new();<br />
&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(fd_win), box);<br />
&nbsp;&nbsp;&nbsp; ewl_object_fill_policy_set(EWL_OBJECT(box),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EWL_FLAG_FILL_FILL | EWL_FLAG_FILL_SHRINK);<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(box);<br />
<br />
&nbsp;&nbsp;&nbsp; /* the file dialog */<br />
&nbsp;&nbsp;&nbsp; fd = ewl_filedialog_new();<br />
&nbsp;&nbsp;&nbsp; ewl_callback_append(fd, EWL_CALLBACK_VALUE_CHANGED, open_file_cb, data);<br />
&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(box), fd);<br />
<br />
&nbsp;&nbsp;&nbsp; /* add a home button */<br />
&nbsp;&nbsp;&nbsp; home = ewl_button_new();<br />
&nbsp;&nbsp;&nbsp; ewl_button_label_set(EWL_BUTTON(home), &quot;Home&quot;);<br />
&nbsp;&nbsp;&nbsp; ewl_callback_append(home, EWL_CALLBACK_CLICKED, home_cb, fd);<br />
&nbsp;&nbsp;&nbsp; ewl_object_fill_policy_set(EWL_OBJECT(home), EWL_FLAG_FILL_HFILL);<br />
&nbsp;&nbsp;&nbsp; ewl_container_child_append(EWL_CONTAINER(fd), home);<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(home);<br />
<br />
&nbsp;&nbsp;&nbsp; ewl_widget_show(fd);<br />
}<br />
<br />
/* close the file dialog */<br />
static void destroy_filedialog_cb(Ewl_Widget *win, void *ev, void *data) {<br />
&nbsp;&nbsp;&nbsp; ewl_widget_hide(win);<br />
&nbsp;&nbsp;&nbsp; ewl_widget_destroy(win);<br />
}<br />
<br />
/* the file dialog open button callback */<br />
static void open_file_cb(Ewl_Widget *w, void *ev, void *data) {<br />
&nbsp;&nbsp;&nbsp; char *text = NULL;<br />
&nbsp;&nbsp;&nbsp; char *filename;<br />
&nbsp;&nbsp;&nbsp; int *response = (int *)ev;<br />
<br />
&nbsp;&nbsp;&nbsp; switch (*response) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EWL_STOCK_OPEN:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename = ewl_filedialog_selected_file_get(EWL_FILEDIALOG(w));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text = read_file(filename);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case EWL_STOCK_CANCEL:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br />
&nbsp;&nbsp;&nbsp; }<br />
<br />
&nbsp;&nbsp;&nbsp; if (text) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_text_text_set(EWL_TEXT(data), text);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; free(text);<br />
&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; text = NULL;<br />
<br />
&nbsp;&nbsp;&nbsp; ewl_widget_hide(fd_win);<br />
}<br />
<br />
<br />
/* the fd home button is clicked */<br />
static void home_cb(Ewl_Widget *win, void *ev, void *data) {<br />
&nbsp;&nbsp;&nbsp; char *home = NULL;<br />
&nbsp;&nbsp;&nbsp; Ewl_Filedialog *fd = data;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; home = getenv(&quot;HOME&quot;);<br />
&nbsp;&nbsp;&nbsp; if (home)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ewl_filedialog_directory_set(fd, home);<br />
}&nbsp;&nbsp; <br />
<br />
/* read a file */<br />
static char *read_file(char *file) {<br />
&nbsp;&nbsp;&nbsp; char *text = NULL;<br />
&nbsp;&nbsp;&nbsp; FILE *f = NULL;<br />
&nbsp;&nbsp;&nbsp; int read = 0, st_ret = 0;<br />
&nbsp;&nbsp;&nbsp; struct stat s;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; f = fopen(file, &quot;r&quot;);<br />
&nbsp;&nbsp;&nbsp; st_ret = stat(file, &amp;s);<br />
<br />
&nbsp;&nbsp;&nbsp; if (st_ret != 0) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (errno == ENOENT)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;not a file %s\n&quot;, file); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return NULL;<br />
&nbsp;&nbsp;&nbsp; }<br />
<br />
&nbsp;&nbsp;&nbsp; text = (char *)malloc(s.st_size * sizeof(char));<br />
&nbsp;&nbsp;&nbsp; read = fread(text, sizeof(char), s.st_size, f); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; fclose(f);<br />
&nbsp;&nbsp;&nbsp; return text;<br />
}<br />
<br />
<br />
/* a key was pressed */<br />
static void key_up_cb(Ewl_Widget *win, void *ev, void *data) {<br />
&nbsp;&nbsp;&nbsp; Ewl_Event_Key_Down *e = (Ewl_Event_Key_Down *)ev;<br />
&nbsp;&nbsp;&nbsp; //Ewl_Scrollpane *scroll = (Ewl_Scrollpane *)data;<br />
&nbsp;&nbsp; double val = 0;<br />
&nbsp;&nbsp;&nbsp; if (!strcmp(e-&gt;base.keyname, &quot;q&quot;)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destroy_cb(win, ev, data);<br />
<br />
&nbsp;&nbsp;&nbsp; } else if (!strcmp(e-&gt;base.keyname, &quot;Left&quot;)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //double val = ewl_scrollpane_hscrollbar_value_get(EWL_SCROLLPANE(scroll));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //double step = ewl_scrollpane_hscrollbar_step_get(EWL_SCROLLPANE(scroll));<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (val != 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; ewl_scrollpane_hscrollbar_value_set(EWL_SCROLLPANE(scroll), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; val - step);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;here&quot;);<br />
&nbsp;&nbsp;&nbsp; } else if (!strcmp(e-&gt;base.keyname, &quot;Right&quot;)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //double val = ewl_scrollpane_hscrollbar_value_get(EWL_SCROLLPANE(scroll));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //double step = ewl_scrollpane_hscrollbar_step_get(EWL_SCROLLPANE(scroll));<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (val != 1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // ewl_scrollpane_vscrollbar_value_set(EWL_SCROLLPANE(scroll), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; val + step);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;here&quot;);<br />
&nbsp;&nbsp;&nbsp; } else if (!strcmp(e-&gt;base.keyname, &quot;Up&quot;)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //double val = ewl_scrollpane_vscrollbar_value_get(EWL_SCROLLPANE(scroll));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // double step = ewl_scrollpane_vscrollbar_step_get(EWL_SCROLLPANE(scroll));<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (val != 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp; ewl_scrollpane_vscrollbar_value_set(EWL_SCROLLPANE(scroll), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; val - step);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;here&quot;); <br />
&nbsp;&nbsp;&nbsp; } else if (!strcmp(e-&gt;base.keyname, &quot;Down&quot;)) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //double val = ewl_scrollpane_vscrollbar_value_get(EWL_SCROLLPANE(scroll));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //double step = ewl_scrollpane_vscrollbar_step_get(EWL_SCROLLPANE(scroll));<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (val != 1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; ewl_scrollpane_vscrollbar_value_set(EWL_SCROLLPANE(scroll), <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; val + step);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;here&quot;);<br />
&nbsp;&nbsp;&nbsp; } <br />
}</code></p>
<p>You can compile the application with the following:</p>
<p><code>gcc -Wall -o ewl_text main.c `pkg-config --cflags --libs ewl`</code></p>
<p>The problem i am having is with the ewl_scrollpane_vscrollbar_* functions. They are throwing errors when i try to use them.</p>
<p><code>implicit declaration of function &lsquo;ewl_scrollpane_hscrollbar_flag_set&rsquo;</code></p>
<p>So i posted my question out on the forum, and i hope to get some help on fixing it.&nbsp;The app does not have scroll bars, and if you load a good size document it looses it's menus from time to time. Not the best, but it's my first shot at this.</p>
<p>If you have any advice let me know.</p>
<h2>Update 4/02/2010</h2>
<p>I found this other getting <a href="http://docs.enlightenment.org/api/ewl/html/getting_started.html">started page</a>. Thought i would share it as well. A few things are wrong in it. On line 114 or around that you need to find ecore_list_goto_first(files); and replace it with ecore_list_first_goto(files); Even after that i could not get files = ecore_file_ls(dir); to work. So i commented out the section. The main goal of this was to figure out why when i closed my app i would get a segfault. Well it seems that it's a problem with the version of enlightenment i am using.</p>
<p>&nbsp;</p>]]></content></entry></feed>

