Changeset 436

Show
Ignore:
Timestamp:
12/19/07 15:08:27 (1 year ago)
Author:
jeffrey
Message:

warning: dereferencing ‘void *’ pointer; error: void value not ignored as it ought to be

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plgtkimageview/IImageTool.xs

    r435 r436  
    77#include <gtkimageview/gtkiimagetool.h> 
    88#include <gtkimageview/image_view_drawer.h> 
     9/*#include <gtkimageview/gdkpixbufdrawcache.h>*/ 
    910 
    1011#include "gtkimageviewperl-gtypes.h" 
    1112#include "gtkimageviewperl-autogen.h" 
     13 
     14 
     15/* 
     16struct DrawSettings { 
     17    gdouble        zoom; 
     18    GdkRectangle   zoom_rect; 
     19    int            widget_x; 
     20    int            widget_y;        
     21    GdkInterpType  interp; 
     22    GdkPixbuf     *pixbuf; 
     23    int            check_color1; 
     24    int            check_color2; 
     25}; 
     26*/ 
     27 
     28static SV * 
     29newSVDrawSettings (DrawSettings * settings) 
     30{ 
     31  HV * hv = newHV(); 
     32  hv_store (hv, "zoom", 4, newSVnv (settings->zoom), 0); 
     33  hv_store (hv, "zoom_rect", 9, newSVGdkRectangle (&settings->zoom_rect), 0); 
     34  hv_store (hv, "widget_x", 8, newSViv (settings->widget_x), 0); 
     35  hv_store (hv, "widget_y", 8, newSViv (settings->widget_y), 0); 
     36  hv_store (hv, "interp", 6, newSVGdkInterpType (settings->interp), 0); 
     37  hv_store (hv, "pixbuf", 6, newSVGdkPixbuf (settings->pixbuf), 0); 
     38  hv_store (hv, "check_color1", 12, newSViv (settings->check_color1), 0); 
     39  hv_store (hv, "check_color2", 12, newSViv (settings->check_color2), 0); 
     40  return newRV_noinc ((SV *) hv); 
     41} 
     42 
     43/* 
     44 * returns a pointer to a DrawSettings you can use until control returns 
     45 * to perl. 
     46 */ 
     47static DrawSettings * 
     48SvDrawSettings (SV * sv) 
     49{ 
     50  HV * hv; 
     51  SV ** svp; 
     52  DrawSettings * settings; 
     53 
     54  hv = (HV*) SvRV (sv); 
     55 
     56  settings = gperl_alloc_temp (sizeof (DrawSettings)); 
     57 
     58  svp = hv_fetch (hv, "zoom", 4, FALSE); 
     59  if (svp) settings->zoom = SvNV (*svp); 
     60 
     61  svp = hv_fetch (hv, "zoom_rect", 9, FALSE); 
     62  if (svp) settings->zoom_rect = *SvGdkRectangle (*svp); 
     63 
     64  svp = hv_fetch (hv, "widget_x", 8, FALSE); 
     65  if (svp) settings->widget_x = SvIV (*svp); 
     66 
     67  svp = hv_fetch (hv, "widget_y", 8, FALSE); 
     68  if (svp) settings->widget_y = SvIV (*svp); 
     69 
     70  svp = hv_fetch (hv, "interp", 6, FALSE); 
     71  if (svp) settings->interp = SvGdkInterpType (*svp); 
     72 
     73  svp = hv_fetch (hv, "check_color1", 12, FALSE); 
     74  if (svp) settings->check_color1 = SvIV (*svp); 
     75 
     76  svp = hv_fetch (hv, "check_color2", 12, FALSE); 
     77  if (svp) settings->check_color2 = SvIV (*svp); 
     78 
     79  return settings; 
     80} 
    1281 
    1382 
     
    43112void 
    44113gtk_iimage_tool_paint_image (tool, opts, drawable) 
    45         GtkIImageTool *        tool 
    46         GdkPixbufDrawOpts *   opts 
    47         GdkDrawable *          drawable 
     114        GtkIImageTool * tool 
     115       DrawSettings * opts 
     116        GdkDrawable *   drawable 
    48117 
    49118GdkCursor * 
     
    52121        int             x 
    53122        int             y 
     123 
  • plgtkimageview/Makefile.PL

    r433 r436  
    7777$depends->add_pm ('ImageView.pm' => '$(INST_LIBDIR)/ImageView.pm'); 
    7878my $cwd = cwd(); 
     79system(q(echo "DrawSettings * T_GPERL_GENERIC_WRAPPER" > 'build/perl.typemap')); 
    7980$depends->add_typemaps (map {File::Spec->catfile($cwd,$_)} 
    80                                               'build/gtkimageviewperl.typemap'); 
     81                                              'build/gtkimageviewperl.typemap', 
     82                                              'build/perl.typemap'); 
    8183 
    8284$depends->install (qw(build/gtkimageviewperl-autogen.h 
  • plgtkimageview/maps

    r434 r436  
    66GTK_TYPE_IMAGE_TOOL_DRAGGER             GtkImageToolDragger     GObject Gtk2::ImageToolDragger 
    77GTK_TYPE_IMAGE_TOOL_SELECTOR            GtkImageToolSelector    GObject Gtk2::ImageToolSelector 
    8 GDK_TYPE_PIXBUF_DRAW_OPTS               GdkPixbufDrawOpts       GBoxed  Gtk2::IImageTool 
    9 GDK_TYPE_PIXBUF_DRAW_CACHE              GdkPixbufDrawCache      GBoxed  Gtk2::IImageTool 
    108GTKIMAGEVIEWPERL_TYPE_GTK_IMAGE_TRANSP  GtkImageTransp          GEnum   Gtk2::ImageView 
    119GDK_TYPE_PIXBUF_DRAW_METHOD             GdkPixbufDrawMethod     GEnum   Gtk2::IImageTool