Hello list,
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 :-)
1/
My program initialises an evas (enlightenment) that uses the X11 software engine using this code :
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
einfo->info.display = display;
I don't understand why, maybe because of the X11 software engine ?
(NB) Before launching the program, I have to make a
export DISPLAY=:0
2/ Second problem :
The function imlib_save_image 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.
That's why evas_object_image_file_set return a segmentation fault after.
Any idea to explain why imlib_save_image("file.jpg") creates no file.jpg ? I execute the program in /home/username on nokia770.
Thanks a lot in advance for your response,
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 :-)
1/
My program initialises an evas (enlightenment) that uses the X11 software engine using this code :
Window win;
XSetWindowAttributes attr;
XClassHint chint;
disp = XOpenDisplay(NULL);
if (!disp)
{
printf( "Error: cannot open display.\n");
exit(-1);
}
attr.backing_store = NotUseful;
attr.colormap = DefaultColormap(disp, DefaultScreen(disp));
attr.border_pixel = 0;
attr.background_pixmap = None;
attr.event_mask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask |StructureNotifyMask |KeyPressMask;
attr.bit_gravity = ForgetGravity;
win = XCreateWindow(disp, DefaultRootWindow(disp), 0, 0, win_w, win_h, 0,
DefaultDepth(disp, DefaultScreen(disp)), InputOutput,
DefaultVisual(disp, DefaultScreen(disp)),
CWBackingStore | CWColormap |
CWBackPixmap | CWBorderPixel |
CWBitGravity | CWEventMask, &attr);
XSetClassHint(disp, win, &chint);
#if 0 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); #endif
XMapWindow(disp, win); XSync(disp, False); evas_init(); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
evas_output_size_set(evas, win_w, win_h);
evas_output_viewport_set(evas, 0, 0, win_w, win_h);
{
Evas_Engine_Info_Software_X11 *einfo;
einfo = (Evas_Engine_Info_Software_X11 *) evas_engine_info_get(evas);
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 = 0;
einfo->info.debug = 0;
evas_engine_info_set(evas, (Evas_Engine_Info *) einfo);
}
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
einfo->info.display = display;
I don't understand why, maybe because of the X11 software engine ?
(NB) Before launching the program, I have to make a
export DISPLAY=:0
2/ Second problem :
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); evas_object_image_file_set(tmp, "file.jpg", NULL);
The function imlib_save_image 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.
That's why evas_object_image_file_set return a segmentation fault after.
Any idea to explain why imlib_save_image("file.jpg") creates no file.jpg ? I execute the program in /home/username on nokia770.
Thanks a lot in advance for your response,
Seb Dev
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel