[maemo-developers] [maemo-developers] Help! Enlightenment on MAEMO / Nokia770
From: Seb Dev sebdev at gmail.comDate: Fri Jul 21 10:51:36 EEST 2006
- Previous message: [maemo-developers] SmallBASIC for OS2006
- Next message: [maemo-developers] Problem with GDB and threads...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> Hello,
>
> I try to run a binary on a nokia 770. I have a problem, maybe some of you
> can help me :-)
>
> 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
>
> Thanks a lot for your response,
>
> Seb Dev
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20060721/b50c7320/attachment.htm
- Previous message: [maemo-developers] SmallBASIC for OS2006
- Next message: [maemo-developers] Problem with GDB and threads...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
