~ubuntu-branches/ubuntu/trusty/goocanvas/trusty-proposed

« back to all changes in this revision

Viewing changes to src/goocanvasutils.c

  • Committer: Bazaar Package Importer
  • Author(s): Jose Carlos Garcia Sogo
  • Date: 2007-05-14 22:49:11 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070514224911-vyv39khpicv46oe2
Tags: 0.8-2
Link gtk-doc to /usr/share/doc/libgoocanvas-dev (Closes: #423410)

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
}
309
309
 
310
310
 
 
311
GType
 
312
goo_cairo_hint_metrics_get_type (void)
 
313
{
 
314
  static GType etype = 0;
 
315
  if (etype == 0) {
 
316
    static const GEnumValue values[] = {
 
317
      { CAIRO_HINT_METRICS_DEFAULT, "CAIRO_HINT_METRICS_DEFAULT", "default" },
 
318
      { CAIRO_HINT_METRICS_OFF, "CAIRO_HINT_METRICS_OFF", "off" },
 
319
      { CAIRO_HINT_METRICS_ON, "CAIRO_HINT_METRICS_ON", "on" },
 
320
      { 0, NULL, NULL }
 
321
    };
 
322
    etype = g_enum_register_static ("GooCairoHintMetrics", values);
 
323
  }
 
324
  return etype;
 
325
}
 
326
 
 
327
 
311
328
/**
312
329
 * goo_canvas_line_dash_ref:
313
330
 * @dash: a #GooCanvasLineDash.
418
435
}
419
436
 
420
437
cairo_matrix_t*
421
 
goo_cairo_matrix_copy   (cairo_matrix_t *matrix)
 
438
goo_cairo_matrix_copy   (const cairo_matrix_t *matrix)
422
439
{
423
440
  cairo_matrix_t *matrix_copy;
424
441
 
425
442
  if (!matrix)
426
443
    return NULL;
427
444
 
428
 
  matrix_copy = g_new (cairo_matrix_t, 1);
 
445
  matrix_copy = g_slice_new (cairo_matrix_t);
429
446
  *matrix_copy = *matrix;
430
447
 
431
448
  return matrix_copy;
432
449
}
433
450
 
434
451
 
 
452
void
 
453
goo_cairo_matrix_free   (cairo_matrix_t *matrix)
 
454
{
 
455
  g_slice_free (cairo_matrix_t, matrix);
 
456
}
 
457
 
 
458
 
435
459
GType
436
460
goo_cairo_matrix_get_type (void)
437
461
{
441
465
    type_cairo_matrix = g_boxed_type_register_static
442
466
      ("GooCairoMatrix", 
443
467
       (GBoxedCopyFunc) goo_cairo_matrix_copy,
444
 
       (GBoxedFreeFunc) g_free);
 
468
       (GBoxedFreeFunc) goo_cairo_matrix_free);
445
469
 
446
470
  return type_cairo_matrix;
447
471
}
1126
1150
}
1127
1151
 
1128
1152
 
 
1153
/* This is a copy of _gtk_boolean_handled_accumulator. */
 
1154
gboolean
 
1155
goo_canvas_boolean_handled_accumulator (GSignalInvocationHint *ihint,
 
1156
                                        GValue                *return_accu,
 
1157
                                        const GValue          *handler_return,
 
1158
                                        gpointer               dummy)
 
1159
{
 
1160
  gboolean continue_emission;
 
1161
  gboolean signal_handled;
 
1162
  
 
1163
  signal_handled = g_value_get_boolean (handler_return);
 
1164
  g_value_set_boolean (return_accu, signal_handled);
 
1165
  continue_emission = !signal_handled;
 
1166
  
 
1167
  return continue_emission;
 
1168
}
 
1169
 
1129
1170
 
1130
1171