]> Pileus Git - ~andy/sunrise/blob - media-plugins/gimp-refocus/files/gimp-refocus-gimp2.6.patch
app-misc/autokey-gtk: Add ~amd64 keyword, EAPI bump
[~andy/sunrise] / media-plugins / gimp-refocus / files / gimp-refocus-gimp2.6.patch
1 diff -ur refocus-0.9.0/configure.in refocus-0.9.0-patched/configure.in
2 --- refocus-0.9.0/configure.in  2010-07-04 16:33:24.307364434 +0200
3 +++ refocus-0.9.0-patched/configure.in  2010-07-04 16:34:09.679615391 +0200
4 @@ -96,13 +96,6 @@
5     AC_DEFINE(PREVIEW_DEBUG)
6  fi
7  
8 -# If we have gcc set the CFLAGS
9 -# This is done here because otherwise configure would use
10 -# these flags for compiling test-programs.
11 -if test "$GCC" = yes; then
12 -   CFLAGS="-Wall -ansi -pedantic -ggdb -fomit-frame-pointer -O3 -funroll-all-loops"
13 -fi
14 -
15  #Check if erf is defined in the mathlibrary
16  AC_CHECK_LIB(m, erf, AC_DEFINE(HAVE_ERF))
17  
18 diff -ur refocus-0.9.0/src/gimppreview.c refocus-0.9.0-patched/src/gimppreview.c
19 --- refocus-0.9.0/src/gimppreview.c     2010-07-04 16:33:24.310366565 +0200
20 +++ refocus-0.9.0-patched/src/gimppreview.c     2010-07-04 16:42:46.016366709 +0200
21 @@ -36,18 +36,18 @@
22  #include "gimppreview.h"
23  
24  
25 -static void gimp_preview_init (GimpPreview * preview);
26 -static void gimp_preview_class_init (GimpPreviewClass * klass);
27 +static void gimp_preview_init (myGimpPreview * preview);
28 +static void gimp_preview_class_init (myGimpPreviewClass * klass);
29  
30  static void gimp_preview_plus_callback (GtkWidget * widget, gpointer data);
31  static void gimp_preview_minus_callback (GtkWidget * widget, gpointer data);
32  static gint gimp_preview_event (GtkWidget * widget, GdkEvent * event,
33                                  gpointer data);
34 -static void gimp_preview_recompute_sizes (GimpPreview * preview,
35 +static void gimp_preview_recompute_sizes (myGimpPreview * preview,
36                                            gdouble newscale);
37 -static void gimp_preview_update_preview (GimpPreview * preview);
38 +static void gimp_preview_update_preview (myGimpPreview * preview);
39  
40 -static void gimp_preview_image_set_size (GimpPreview * preview, gint width,
41 +static void gimp_preview_image_set_size (myGimpPreview * preview, gint width,
42                                           gint height);
43  static void gimp_preview_size_request (GtkWidget * widget,
44                                         GtkRequisition * requisition);
45 @@ -58,7 +58,7 @@
46                                   GtkCallback callback,
47                                   gpointer callback_data);
48  gboolean gimp_preview_update_preview_idle_fun (gpointer data);
49 -void gimp_preview_schedule_update (GimpPreview * preview);
50 +void gimp_preview_schedule_update (myGimpPreview * preview);
51  
52  #define PROGRESS_BAR_HEIGHT (10)
53  #define PREVIEW_SIZE (100)
54 @@ -94,11 +94,11 @@
55  
56  
57  /*
58 - * Apps which use a GimpPreview widget should not be accessing the private
59 + * Apps which use a myGimpPreview widget should not be accessing the private
60   * data!
61   */
62  #define PREVIEW_DATA(preview) \
63 -        ((GimpPreviewData*)(GIMP_PREVIEW (preview)->private_data))
64 +        ((myGimpPreviewData*)(MY_GIMP_PREVIEW (preview)->private_data))
65  
66  typedef struct
67  {
68 @@ -126,7 +126,7 @@
69    GtkWidget *image;
70    GtkWidget *progress_bar;
71  }
72 -GimpPreviewData;
73 +myGimpPreviewData;
74  
75  
76  /* Convert coordinate in preview space to image coordinates */
77 @@ -155,20 +155,20 @@
78    if (!preview_type)
79      {
80        GTypeInfo preview_info = {
81 -        sizeof (GimpPreviewClass),
82 +        sizeof (myGimpPreviewClass),
83          (GBaseInitFunc) NULL,
84          (GBaseFinalizeFunc) NULL,
85          (GClassInitFunc) gimp_preview_class_init,
86          (GClassFinalizeFunc) NULL,
87          (gconstpointer) NULL,   /* class_data */
88 -        sizeof (GimpPreview),
89 +        sizeof (myGimpPreview),
90          0,                      /* n_preallocs */
91          (GInstanceInitFunc) gimp_preview_init,
92          (GTypeValueTable *) NULL /* value_table */
93        };
94  
95        preview_type =
96 -        g_type_register_static (GTK_TYPE_CONTAINER, "GimpPreview",
97 +        g_type_register_static (GTK_TYPE_CONTAINER, "myGimpPreview",
98                                  &preview_info, 0);
99      }
100  
101 @@ -181,7 +181,7 @@
102   * by GTK's internal mechanisms.
103   */
104  static void
105 -gimp_preview_class_init (GimpPreviewClass * klass)
106 +gimp_preview_class_init (myGimpPreviewClass * klass)
107  {
108    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
109    GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
110 @@ -190,7 +190,7 @@
111      g_signal_new ("update_preview",
112                    G_TYPE_FROM_CLASS (klass),
113                    G_SIGNAL_RUN_FIRST,
114 -                  G_STRUCT_OFFSET (GimpPreviewClass, update_preview),
115 +                  G_STRUCT_OFFSET (myGimpPreviewClass, update_preview),
116                    NULL,
117                    NULL,
118                    g_cclosure_marshal_VOID__POINTER,
119 @@ -200,7 +200,7 @@
120      g_signal_new ("preview_changed",
121                    G_TYPE_FROM_CLASS (klass),
122                    G_SIGNAL_RUN_FIRST,
123 -                  G_STRUCT_OFFSET (GimpPreviewClass, preview_changed),
124 +                  G_STRUCT_OFFSET (myGimpPreviewClass, preview_changed),
125                    NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
126  
127    klass->update_preview = NULL;
128 @@ -212,7 +212,7 @@
129  
130  
131  void
132 -gimp_preview_set_scale_amount(GimpPreview *preview, gdouble scale_amount)
133 +gimp_preview_set_scale_amount(myGimpPreview *preview, gdouble scale_amount)
134  {
135    /*
136     * If the caller wants to set the scale amount, let them do so.
137 @@ -269,7 +269,7 @@
138   * by GTK's internal mechanisms.
139   */
140  static void
141 -gimp_preview_init (GimpPreview * preview)
142 +gimp_preview_init (myGimpPreview * preview)
143  {
144    gchar buffer[10];
145  
146 @@ -277,7 +277,7 @@
147    GTK_WIDGET_SET_FLAGS (preview, GTK_NO_WINDOW);
148    GTK_CONTAINER (preview)->resize_mode = GTK_RESIZE_IMMEDIATE;
149  
150 -  preview->private_data = g_malloc0 (sizeof (GimpPreviewData));
151 +  preview->private_data = g_malloc0 (sizeof (myGimpPreviewData));
152  
153  
154    PREVIEW_DATA (preview)->label = gtk_label_new ("");
155 @@ -307,7 +307,7 @@
156  gimp_preview_new_with_args (GimpDrawable * drawable, gint cb_preview_size,
157                              gdouble cb_scale_amount, gint cb_allow_scale)
158  {
159 -  GimpPreview *preview;
160 +  myGimpPreview *preview;
161    GtkWidget *frame;
162    GtkWidget *hbox;
163    GtkWidget *event_box;
164 @@ -337,7 +337,7 @@
165  
166  
167    /* Now allocate the actual preview window. */
168 -  preview = GIMP_PREVIEW (g_object_new (gimp_preview_get_type (), NULL));
169 +  preview = MY_GIMP_PREVIEW (g_object_new (gimp_preview_get_type (), NULL));
170  
171    /* Set the scale amount. */
172    gimp_preview_set_scale_amount(preview, cb_scale_amount);
173 @@ -352,8 +352,8 @@
174        preview_width = i2p (drawable->width, preview->scale);
175        preview_height = i2p (drawable->height, preview->scale);
176  
177 -      GIMP_PREVIEW (preview)->width = preview_width;
178 -      GIMP_PREVIEW (preview)->height = preview_height;
179 +      MY_GIMP_PREVIEW (preview)->width = preview_width;
180 +      MY_GIMP_PREVIEW (preview)->height = preview_height;
181      }
182    else
183      {
184 @@ -454,7 +454,7 @@
185  static void
186  gimp_preview_size_request (GtkWidget * widget, GtkRequisition * requisition)
187  {
188 -  GimpPreview *preview = GIMP_PREVIEW (widget);
189 +  myGimpPreview *preview = MY_GIMP_PREVIEW (widget);
190    GtkRequisition resize_box_requisition;
191  
192  #ifdef PREVIEW_DEBUG
193 @@ -478,7 +478,7 @@
194  static void
195  gimp_preview_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
196  {
197 -  GimpPreview *preview = GIMP_PREVIEW (widget);
198 +  myGimpPreview *preview = MY_GIMP_PREVIEW (widget);
199    GtkAllocation resize_box_allocation, progress_bar_allocation,
200      event_box_allocation;
201    GtkRequisition resize_box_requisition;
202 @@ -543,7 +543,7 @@
203                       gboolean include_internals,
204                       GtkCallback callback, gpointer callback_data)
205  {
206 -  GimpPreview *preview = GIMP_PREVIEW (container);
207 +  myGimpPreview *preview = MY_GIMP_PREVIEW (container);
208  
209    if (PREVIEW_DATA (preview)->resize_box)
210      {
211 @@ -564,7 +564,7 @@
212   * Plug-ins call this to do an update of the preview area.
213   */
214  void
215 -gimp_preview_update (GimpPreview * preview)
216 +gimp_preview_update (myGimpPreview * preview)
217  {
218    gimp_preview_recompute_sizes (preview, preview->scale);
219    gimp_preview_update_preview (preview);
220 @@ -579,11 +579,11 @@
221  static void
222  gimp_preview_plus_callback (GtkWidget * widget, gpointer data)
223  {
224 -  GimpPreview *preview;
225 +  myGimpPreview *preview;
226    gchar buffer[10];
227    gdouble new_scale;
228  
229 -  preview = GIMP_PREVIEW (data);
230 +  preview = MY_GIMP_PREVIEW (data);
231    if (PREVIEW_DATA (preview)->scale_n == PREVIEW_SCALE_LAST)
232      return;
233  
234 @@ -616,11 +616,11 @@
235  static void
236  gimp_preview_minus_callback (GtkWidget * widget, gpointer data)
237  {
238 -  GimpPreview *preview;
239 +  myGimpPreview *preview;
240    gchar buffer[10];
241    gdouble new_scale;
242  
243 -  preview = GIMP_PREVIEW (data);
244 +  preview = MY_GIMP_PREVIEW (data);
245    if (PREVIEW_DATA (preview)->scale_n == 0)
246      return;
247  
248 @@ -651,12 +651,12 @@
249  static gint
250  gimp_preview_event (GtkWidget * widget, GdkEvent * event, gpointer data)
251  {
252 -  GimpPreview *preview;
253 +  myGimpPreview *preview;
254    GdkEventButton *button_event;
255    gint x, y;
256    gint dx, dy;
257  
258 -  preview = GIMP_PREVIEW (data);
259 +  preview = MY_GIMP_PREVIEW (data);
260    button_event = (GdkEventButton *) event;
261  
262    switch (event->type)
263 @@ -733,7 +733,7 @@
264   * This function is also used for initializing the preview.
265   */
266  static void
267 -gimp_preview_recompute_sizes (GimpPreview * preview, gdouble new_scale)
268 +gimp_preview_recompute_sizes (myGimpPreview * preview, gdouble new_scale)
269  {
270  
271    /* The center of the preview in image coordinates.
272 @@ -765,7 +765,7 @@
273  }
274  
275  void
276 -gimp_preview_generate_update_event (GimpPreview * preview)
277 +gimp_preview_generate_update_event (myGimpPreview * preview)
278       /* Signal the user that the preview must be updated */
279  {
280    const gdouble scale = preview->scale;
281 @@ -783,7 +783,7 @@
282             0,
283             preview->drawable->height - image_y);
284  
285 -  GimpPreviewEvent preview_event;
286 +  myGimpPreviewEvent preview_event;
287  
288    preview_event.event_id = PREVIEW_DATA (preview)->current_event_id;
289    preview_event.scale = preview->scale;
290 @@ -814,7 +814,7 @@
291   * to step through source and destination!
292   */
293  static void
294 -gimp_preview_update_preview (GimpPreview * preview)
295 +gimp_preview_update_preview (myGimpPreview * preview)
296  {
297    GimpPixelRgn region;
298    guchar *image_data = NULL;
299 @@ -1012,7 +1012,7 @@
300  
301  
302  void
303 -gimp_preview_force_redraw (GimpPreview * preview)
304 +gimp_preview_force_redraw (myGimpPreview * preview)
305  {
306    gtk_widget_queue_draw (GTK_WIDGET (PREVIEW_DATA (preview)->image));
307  }
308 @@ -1022,7 +1022,7 @@
309  gboolean
310  gimp_preview_update_preview_idle_fun (gpointer data)
311  {
312 -  GimpPreview *preview = GIMP_PREVIEW (data);
313 +  myGimpPreview *preview = MY_GIMP_PREVIEW (data);
314    gint event_id = PREVIEW_DATA (preview)->current_event_id;
315  
316  #ifdef PREVIEW_DEBUG
317 @@ -1041,7 +1041,7 @@
318  }
319  
320  void
321 -gimp_preview_schedule_update (GimpPreview * preview)
322 +gimp_preview_schedule_update (myGimpPreview * preview)
323  {
324    PREVIEW_DATA (preview)->current_event_id++;
325  
326 @@ -1082,7 +1082,7 @@
327  }
328  
329  void
330 -gimp_preview_image_set_size (GimpPreview * preview, gint width, gint height)
331 +gimp_preview_image_set_size (myGimpPreview * preview, gint width, gint height)
332  {
333    const gint real_width = MIN (preview->max_width, width);
334    const gint real_height = MIN (preview->max_height, height);
335 @@ -1120,8 +1120,8 @@
336  
337  /**
338   * gimp_preview_draw_row:
339 - * @preview: the #GimpPreview
340 - * @event_id: event_id that was sent with the #GimpPreviewEvent.
341 + * @preview: the #myGimpPreview
342 + * @event_id: event_id that was sent with the #myGimpPreviewEvent.
343   * @type: the format of the data (e.g. %GIMP_RGBA_IMAGE).
344   * @row:the relative number of the row within the preview.
345   * The top row of the preview is number 0.
346 @@ -1137,7 +1137,7 @@
347   * with the same event-id will be ignored by the preview.
348   **/
349  gboolean
350 -gimp_preview_draw_row (GimpPreview * preview, const gint event_id,
351 +gimp_preview_draw_row (myGimpPreview * preview, const gint event_id,
352                         GimpImageType type, gint row,
353                         const guchar * const data)
354  {
355 @@ -1247,8 +1247,8 @@
356  
357  /**
358   * gimp_preview_draw_unscaled_row:
359 - * @preview: the #GimpPreview
360 - * @event_id: event_id that was sent with the #GimpPreviewEvent.
361 + * @preview: the #myGimpPreview
362 + * @event_id: event_id that was sent with the #myGimpPreviewEvent.
363   * @type: the format of the data (e.g. %GIMP_RGBA_IMAGE).
364   * @row:row is the relative position of the row w.r.t. preview_event->image_y.
365   * The top row has number 0.
366 @@ -1267,7 +1267,7 @@
367   * with the same event-id will be ignored by the preview.
368   **/
369  gboolean
370 -gimp_preview_draw_unscaled_row (GimpPreview * preview, const gint event_id,
371 +gimp_preview_draw_unscaled_row (myGimpPreview * preview, const gint event_id,
372                                  GimpImageType type, const gint row,
373                                  const guchar * const data)
374  {
375 @@ -1445,8 +1445,8 @@
376  
377  /**
378   * gimp_preview_progress_set_fraction:
379 - * @preview: the #GimpPreview.
380 - * @event_id: event_id that was sent with the #GimpPreviewEvent.
381 + * @preview: the #myGimpPreview.
382 + * @event_id: event_id that was sent with the #myGimpPreviewEvent.
383   * @fraction: the fraction completed.
384   *
385   * Set the progress bar of the preview to @fraction completed.
386 @@ -1456,7 +1456,7 @@
387   * with the same event-id will be ignored by the preview.
388   **/
389  gboolean
390 -gimp_preview_progress_set_fraction (GimpPreview * preview,
391 +gimp_preview_progress_set_fraction (myGimpPreview * preview,
392                                      const gint event_id, double fraction)
393  {
394    const gboolean return_status =
395 diff -ur refocus-0.9.0/src/gimppreview.h refocus-0.9.0-patched/src/gimppreview.h
396 --- refocus-0.9.0/src/gimppreview.h     2003-01-30 22:30:18.000000000 +0100
397 +++ refocus-0.9.0-patched/src/gimppreview.h     2010-07-04 16:42:33.885366354 +0200
398 @@ -32,25 +32,25 @@
399  
400  #define PREVIEW_FIXED_SIZE           0
401  #define PREVIEW_DEFAULT_SIZE         -1
402 -#define GIMP_TYPE_PREVIEW            (gimp_preview_get_type ())
403 -#define GIMP_PREVIEW(obj)            (GTK_CHECK_CAST ((obj), GIMP_TYPE_PREVIEW, GimpPreview))
404 -#define GIMP_PREVIEW_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PREVIEW, GimpPreviewClass))
405 -#define GIMP_IS_PREVIEW(obj)         (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PREVIEW))
406 -#define GIMP_IS_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PREVIEW))
407 -typedef struct _GimpPreview GimpPreview;
408 -typedef struct _GimpPreviewClass GimpPreviewClass;
409 -typedef struct _GimpPreviewEvent GimpPreviewEvent;
410 +//#define GIMP_TYPE_PREVIEW            (gimp_preview_get_type ())
411 +#define MY_GIMP_PREVIEW(obj)            (GTK_CHECK_CAST ((obj), GIMP_TYPE_PREVIEW, myGimpPreview))
412 +#define MY_GIMP_PREVIEW_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PREVIEW, myGimpPreviewClass))
413 +//#define GIMP_IS_PREVIEW(obj)         (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PREVIEW))
414 +//#define GIMP_IS_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PREVIEW))
415 +typedef struct _myGimpPreview myGimpPreview;
416 +typedef struct _myGimpPreviewClass myGimpPreviewClass;
417 +typedef struct _myGimpPreviewEvent myGimpPreviewEvent;
418  
419 -struct _GimpPreviewClass
420 +struct _myGimpPreviewClass
421  {
422    GtkContainerClass parent_class;
423  
424 -  void (*update_preview) (GimpPreview * preview, GimpPreviewEvent * event);
425 -  void (*preview_changed) (GimpPreview * preview);
426 +  void (*update_preview) (myGimpPreview * preview, myGimpPreviewEvent * event);
427 +  void (*preview_changed) (myGimpPreview * preview);
428  };
429  
430  
431 -struct _GimpPreview
432 +struct _myGimpPreview
433  {
434    GtkContainer parent;
435  
436 @@ -75,13 +75,13 @@
437  };
438  
439  /**
440 - * GimpPreviewEvent:
441 + * myGimpPreviewEvent:
442   * @event_id: Id of this event. This is needed for gimp_preview_draw_row,
443   * gimp_preview_draw_unscaled_row and gimp_preview_progress_set_fraction.
444   * @scale: Current scale of the preview.
445   *
446   **/
447 -struct _GimpPreviewEvent
448 +struct _myGimpPreviewEvent
449  {
450    gint event_id;                /* Id of this event */
451    gdouble scale;                /* Scale of preview */
452 @@ -113,20 +113,20 @@
453                                         gint preview_size,
454                                         gdouble scale_amount,
455                                         gint allow_scale);
456 -void gimp_preview_update (GimpPreview * preview);
457 +void gimp_preview_update (myGimpPreview * preview);
458  
459 -gboolean gimp_preview_draw_row (GimpPreview * preview, const gint event_id,
460 +gboolean gimp_preview_draw_row (myGimpPreview * preview, const gint event_id,
461                                  GimpImageType type, const gint row,
462                                  const guchar * const data);
463  
464 -gboolean gimp_preview_draw_unscaled_row (GimpPreview * preview,
465 +gboolean gimp_preview_draw_unscaled_row (myGimpPreview * preview,
466                                           const gint event_id,
467                                           GimpImageType type, const gint row,
468                                           const guchar * const data);
469  
470 -void gimp_preview_force_redraw (GimpPreview * preview);
471 +void gimp_preview_force_redraw (myGimpPreview * preview);
472  
473 -gboolean gimp_preview_progress_set_fraction (GimpPreview * preview,
474 +gboolean gimp_preview_progress_set_fraction (myGimpPreview * preview,
475                                               const gint event_id,
476                                               double fraction);
477  
478 diff -ur refocus-0.9.0/src/refocus.c refocus-0.9.0-patched/src/refocus.c
479 --- refocus-0.9.0/src/refocus.c 2010-07-04 16:33:24.312364787 +0200
480 +++ refocus-0.9.0-patched/src/refocus.c 2010-07-04 16:43:02.753363951 +0200
481 @@ -335,7 +335,7 @@
482    (void) data;
483    set_busy_cursor (widget, TRUE);
484    update_matrix ();
485 -  gimp_preview_update (GIMP_PREVIEW (my_widgets.preview));
486 +  gimp_preview_update (MY_GIMP_PREVIEW (my_widgets.preview));
487    set_busy_cursor (widget, FALSE);
488  }
489  
490 @@ -368,11 +368,11 @@
491  {
492    gint event_id = GPOINTER_TO_INT (data);
493    return (gimp_preview_progress_set_fraction
494 -          (GIMP_PREVIEW (my_widgets.preview), event_id, arg));
495 +          (MY_GIMP_PREVIEW (my_widgets.preview), event_id, arg));
496  }
497  
498  static void
499 -preview_callback (GtkWidget * widget, GimpPreviewEvent * event, gpointer data)
500 +preview_callback (GtkWidget * widget, myGimpPreviewEvent * event, gpointer data)
501  {
502    TileSource source;
503    TileSink sink;
504 @@ -392,7 +392,7 @@
505                                        im_width, im_height);
506        tile_sink_init_for_preview (&sink, drawable, image_x, image_y,
507                                    im_width, im_height);
508 -      gimp_preview_progress_set_fraction (GIMP_PREVIEW (my_widgets.preview),
509 +      gimp_preview_progress_set_fraction (MY_GIMP_PREVIEW (my_widgets.preview),
510                                            event->event_id, 0);
511        bd_closure_init (&update_progress_closure,
512                         preview_progress_update_fun,
513 @@ -408,7 +408,7 @@
514          {
515            tile_sink_get_row (&sink, buf, image_x, image_y + row, im_width);
516            event_is_current =
517 -            gimp_preview_draw_unscaled_row (GIMP_PREVIEW (my_widgets.preview),
518 +            gimp_preview_draw_unscaled_row (MY_GIMP_PREVIEW (my_widgets.preview),
519                                              event->event_id,
520                                              gimp_drawable_type (drawable->drawable_id),
521                                              row, buf);
522 @@ -582,7 +582,7 @@
523  
524    gtk_widget_show (dlg);
525    redraw_all ();
526 -  gimp_preview_update (GIMP_PREVIEW (preview));
527 +  gimp_preview_update (MY_GIMP_PREVIEW (preview));
528    gtk_main ();
529    gdk_flush ();
530    return run_flag;