<br>
Hello list,<br>
<br>
I'm a MAEMO beginner and I try to run a binary on a nokia 770. I have two problems, maybe some of you can help me :-)<br>
<br>
1/<br>
My program initialises an evas (enlightenment) that uses the X11 software engine using this code :<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<pre> Window win;
XSetWindowAttributes attr;
XClassHint chint;
disp = XOpenDisplay(NULL);
<b>if</b> (!disp)
{
printf(<span style="color: rgb(221, 0, 0);">"Error: cannot open display.</span><span style="color: rgb(255, 0, 255);">\n</span><span style="color: rgb(221, 0, 0);">"</span>);
exit(-<span style="color: rgb(0, 0, 255);">1</span>);
}
attr.backing_store = NotUseful;
attr.colormap = DefaultColormap(disp, DefaultScreen(disp));
attr.border_pixel = <span style="color: rgb(0, 0, 255);">0</span>;
attr.background_pixmap = None;
attr.event_mask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask |StructureNotifyMask |KeyPressMask;
attr.bit_gravity = ForgetGravity;
win = XCreateWindow(disp, DefaultRootWindow(disp), <span style="color: rgb(0, 0, 255);">0</span>, <span style="color: rgb(0, 0, 255);">0</span>, win_w, win_h, <span style="color: rgb(0, 0, 255);">0</span>,
DefaultDepth(disp, DefaultScreen(disp)), InputOutput,
DefaultVisual(disp, DefaultScreen(disp)),
CWBackingStore | CWColormap |
CWBackPixmap | CWBorderPixel |
CWBitGravity | CWEventMask, &attr);
XSetClassHint(disp, win, &chint);
<span style="color: rgb(0, 128, 0);">#if 0</span>
szhints.flags = PMinSize | PMaxSize | PSize | USSize;
szhints.min_width = szhints.max_width = win_w;
szhints.min_height = szhints.max_height = win_h;
XSetWMNormalHints(disp, win, &szhints);
<span style="color: rgb(0, 128, 0);">#endif</span>
XMapWindow(disp, win);
XSync(disp, False);
<span style="color: rgb(128, 128, 128);"><i></i></span>
evas_init();
evas = evas_new();
evas_output_method_set(evas, evas_render_method_lookup(<span style="color: rgb(221, 0, 0);">"software_x11"</span>));
evas_output_size_set(evas, win_w, win_h);
evas_output_viewport_set(evas, <span style="color: rgb(0, 0, 255);">0</span>, <span style="color: rgb(0, 0, 255);">0</span>, win_w, win_h);</pre><span style="font-style: italic;"></span>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<pre> {
Evas_Engine_Info_Software_X11 *einfo;
einfo = (Evas_Engine_Info_Software_X11 *) evas_engine_info_get(evas);
<span style="color: rgb(128, 128, 128);"><i></i></span>
einfo->info.display = disp;
einfo->info.visual = DefaultVisual(disp, DefaultScreen(disp));
einfo->info.colormap = DefaultColormap(disp, DefaultScreen(disp));
einfo->info.drawable = win;
einfo->info.depth = DefaultDepth(disp, DefaultScreen(disp));
einfo->info.rotation = <span style="color: rgb(0, 0, 255);">0</span>;
einfo->info.debug = <span style="color: rgb(0, 0, 255);">0</span>;
evas_engine_info_set(evas, (Evas_Engine_Info *) einfo);
}</pre><br>
<br>
This program works well in PC environment and in scratchbox MAEMO
environment, but I have a segmentation fault when I launch it on Nokia
770 on line <span style="font-style: italic;"><span style="font-style: italic;"><br>
</span>einfo->info.display = display;<br>
<br>
</span>I don't understand why, maybe because of the X11 software engine ? <span style="font-style: italic;"><br>
<br>
</span>(NB) Before launching the program, I have to make a <span style="font-style: italic;"><br>
export DISPLAY=:0<br>
<br>
<span style="font-style: italic;"><span style="font-style: italic;"></span></span></span>2/ Second problem :<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<pre> imlib_context_set_image(buffer);
imlib_save_image("file.jpg");
evas_object_del(tmp);
tmp = evas_object_image_add(evas);
evas_image_cache_reload (evas);<span style="color: rgb(128, 128, 128);"><i></i></span>
evas_object_image_file_set(tmp, "file.jpg", NULL);</pre><br>
The function <span style="font-style: italic;">imlib_save_image </span>works
well in PC environment and in scratchbox MAEMO environment, but on the
Nokia770, no file.jpg is created and I don't have any error code in
return.<br>
<br>
That's why <span style="font-style: italic;">evas_object_image_file_set</span> return a segmentation fault after.<br>
<br>
Any idea to explain why <span style="font-style: italic;">imlib_save_image("file.jpg") </span>creates no<span style="font-style: italic;"> </span>file.jpg ? I execute the program in <span style="font-style: italic;">
/home/username </span>on nokia770.<span style="font-style: italic;"><br>
<span style="font-style: italic;"><br>
</span></span>Thanks a lot in advance for your response,<br>
<br>
Seb<br>
<span style="font-style: italic;"><span style="font-style: italic;"></span><br>
</span><span style="font-style: italic;"><br>
<span style="font-style: italic;"><span style="font-style: italic;"></span><br>
<br>
</span></span><br>
<br>