Evas_Object and Evas are defined as the same type. Thus it is not possible to
overload a function with the only difference (beside the return type) that one
has a parameter from type Evas_Object and the other one from type Evas.

These function are never used and thus can be removed without problems.
---
There are more non-used functions which create problems on systems like
MIPS, arm, ...

https://sources.debian.net/src/exactimage/0.9.1-2/debian/patches/abs-int64_t.patch/

ImageIterator2.hh:
  accu& abs()

https://sources.debian.net/src/exactimage/0.9.1-2/debian/patches/utility-timer-dead-code.patch/

Timer.cc
  Utility::TimebaseTimer::TimebaseTimer

utility/Timer.hh
  class TimebaseTimer


See http://bugs.debian.org/583281

 gfx/X11Helper.cc | 109 -------------------------------------------------------
 gfx/X11Helper.hh |  11 ------
 2 files changed, 120 deletions(-)

diff --git a/gfx/X11Helper.cc b/gfx/X11Helper.cc
index 7b94e3e..2cd79e1 100644
--- a/gfx/X11Helper.cc
+++ b/gfx/X11Helper.cc
@@ -123,115 +123,6 @@ Visual* X11Window::ColorVisual (Display* dpy, Window 
window) {
   XGetWindowAttributes (dpy, window, &xgwa);
   return xgwa.visual;
 }
-  
-Evas_Object* X11Window::CaptureIntoEvasImage (Evas* evas,
-                                             Display* dpy,
-                                             Window window,
-                                             int x, int y, int w, int h)
-{
-  // create the new Evas object ;-)
-  Evas_Object* ob = evas_object_image_add(evas);
-  evas_object_resize (ob, w, h);
-    
-  CaptureIntoEvasImage (ob, dpy, window, x, y, w, h);
-    
-  return ob;
-}
-  
-void X11Window::CaptureIntoEvasImage (Evas_Object* ob,
-                                     Display* dpy,
-                                     Window window,
-                                     int x, int y, int w, int h)
-{
-  if (window == 0)
-    window = DefaultRootWindow(dpy);
-    
-  XColor *colors = 0;
-  
-  // places content of a rectangle from drawable into an image
-  XImage* ximage = XGetImage (dpy, window, x, y, w, h, ~0L, ZPixmap);
-    
-  // only needed to get valid r,g,b masks - I do not why ximage
-  // does ont include those ...
-  XImage* ximage2 =  XCreateImage (dpy, X11Window::ColorVisual (dpy, window),
-                                  32, ZPixmap, 0, 0,
-                                  w, h, 32, 0);
-    
-  // resize the Evas image to the proper size ...
-  evas_object_image_size_set (ob, w, h); // !must be first!
-  evas_object_image_fill_set(ob, 0, 0, w, h); // !and don't move me, too!
-  uint8_t* data = (uint8_t*) evas_object_image_data_get (ob, 1);
-    
-  // Get Colormap
-  Screen *dscreen = DefaultScreenOfDisplay (dpy);
-  Visual *dvisual = DefaultVisualOfScreen (dscreen);
-  if (X11Window::visual_class (dscreen, dvisual) == PseudoColor ||
-      X11Window::visual_class (dscreen, dvisual) == GrayScale)
-    {
-      Colormap cmap = DefaultColormapOfScreen(dscreen);
-      int ncolors = X11Window::visual_cells (dscreen, dvisual);
-      int i;
-       
-      std::cout << "ncolors: " << ncolors << std::endl;
-       
-      colors = (XColor*) calloc (sizeof (*colors), ncolors+1);
-      for (i = 0; i < ncolors; i++)
-       colors[i].pixel = i;
-      XQueryColors (dpy, cmap, colors, ncolors);
-    }
-    
-  // Translate the server-ordered image to a client-ordered image.
-  uint32_t srmsk = ximage2->red_mask;
-  uint32_t sgmsk = ximage2->green_mask;
-  uint32_t sbmsk = ximage2->blue_mask;
-    
-  if (!srmsk && !sgmsk && !sbmsk) {
-    srmsk = 0xf800;
-    sgmsk = 0x7e0;
-    sbmsk = 0x1f;
-  }
-    
-  int8_t srpos = first_bit_set (srmsk);
-  int8_t sgpos = first_bit_set (sgmsk);
-  int8_t sbpos = first_bit_set (sbmsk);
-    
-  int8_t srscl = 8 - bits_set (srmsk);
-  int8_t sgscl = 8 - bits_set (sgmsk);
-  int8_t sbscl = 8 - bits_set (sbmsk);
-    
-  uint32_t* data_ptr = (uint32_t*) data;
-    
-  for (int y = 0; y < h; ++y)
-    for (int x = 0; x < w; ++x)
-      {
-       uint32_t sp = XGetPixel (ximage, x, y);
-       uint8_t sr, sg, sb;
-         
-       if (colors) {
-         sr = colors[sp].red;
-         sg = colors[sp].green;
-         sb = colors[sp].blue;
-       }
-       else {
-         sr = ((sp & srmsk) >> srpos) << srscl;
-         sg = ((sp & sgmsk) >> sgpos) << sgscl;
-         sb = ((sp & sbmsk) >> sbpos) << sbscl;
-       }
-
-       *data_ptr++ = 0xff << 24 | sr << 16 | sg << 8 | sb;
-      }
-    
-  evas_object_image_data_update_add (ob, 0, 0, w, h); // !we got updated!
-  evas_object_image_data_set (ob, data); // !and set the data! (?)
-  
-  if (colors) {
-    free (colors);
-    colors = 0;
-  }
-    
-  XDestroyImage (ximage2);
-  XDestroyImage (ximage);
-}
 
 int X11Window::screen_number (Screen *screen)
 {
diff --git a/gfx/X11Helper.hh b/gfx/X11Helper.hh
index a29e65f..db8854a 100644
--- a/gfx/X11Helper.hh
+++ b/gfx/X11Helper.hh
@@ -73,17 +73,6 @@ class X11Window
   
   static int Depth (Display* dpy, Window window);
   static Visual* ColorVisual (Display* dpy, Window window);
-
-  static Evas_Object* CaptureIntoEvasImage (Evas* evas,
-                                           Display* dpy,
-                                           Window window,
-                                           int x, int y, int w, int h);
-
-  static void CaptureIntoEvasImage (Evas_Object* ob,
-                                   Display* dpy,
-                                   Window window,
-                                   int x, int y, int w, int h);
-  
   static void StayOnTop (Display* dpy, Window win);
   
 private:
-- 
2.1.4

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe exact-image

Reply via email to