/[emacs]/emacs/src/image.c
ViewVC logotype

Diff of /emacs/src/image.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41 by mituharu, Tue Nov 15 03:18:26 2005 UTC revision 1.42 by cyd, Wed Nov 16 05:49:18 2005 UTC
# Line 3716  xpm_image_p (object) Line 3716  xpm_image_p (object)
3716    
3717  #endif /* HAVE_XPM || MAC_OS */  #endif /* HAVE_XPM || MAC_OS */
3718    
3719    #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
3720    int
3721    x_create_bitmap_from_xpm_data (f, bits)
3722         struct frame *f;
3723         char **bits;
3724    {
3725      Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
3726      int id, rc;
3727      XpmAttributes attrs;
3728      Pixmap bitmap, mask;
3729    
3730      bzero (&attrs, sizeof attrs);
3731    
3732      rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
3733                                    bits, &bitmap, &mask, &attrs);
3734      if (rc != XpmSuccess)
3735        return -1;
3736    
3737      id = x_allocate_bitmap_record (f);
3738    
3739      dpyinfo->bitmaps[id - 1].pixmap = bitmap;
3740      dpyinfo->bitmaps[id - 1].have_mask = 1;
3741      dpyinfo->bitmaps[id - 1].mask = mask;
3742      dpyinfo->bitmaps[id - 1].file = NULL;
3743      dpyinfo->bitmaps[id - 1].height = attrs.height;
3744      dpyinfo->bitmaps[id - 1].width = attrs.width;
3745      dpyinfo->bitmaps[id - 1].depth = attrs.depth;
3746      dpyinfo->bitmaps[id - 1].refcount = 1;
3747    
3748      XpmFreeAttributes (&attrs);
3749      return id;
3750    }
3751    #endif /* HAVE_X_WINDOWS */
3752    
3753  /* Load image IMG which will be displayed on frame F.  Value is  /* Load image IMG which will be displayed on frame F.  Value is
3754     non-zero if successful.  */     non-zero if successful.  */
3755    

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26