This file is indexed.

/usr/include/pigment-0.3/pgm/pgmdrawable.h is in libpigment0.3-dev 0.3.17-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil -*-
 *
 * Pigment media rendering library
 *
 * Copyright © 2006, 2007, 2008 Fluendo Embedded S.L.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author(s): Loïc Molinari <loic@fluendo.com>
 *            Julien Moutte <julien@fluendo.com>
 */

#ifndef __PGM_DRAWABLE_H__
#define __PGM_DRAWABLE_H__

#include <gst/gst.h>
#include "pgmcommon.h"
#include "pgmlinearalgebra.h"
#include "pgmevents.h"

G_BEGIN_DECLS

#define PGM_TYPE_DRAWABLE \
  (pgm_drawable_get_type ())
#define PGM_DRAWABLE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), PGM_TYPE_DRAWABLE, PgmDrawable))
#define PGM_DRAWABLE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), PGM_TYPE_DRAWABLE, PgmDrawableClass))
#define PGM_IS_DRAWABLE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), PGM_TYPE_DRAWABLE))
#define PGM_IS_DRAWABLE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), PGM_TYPE_DRAWABLE))
#define PGM_DRAWABLE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS((obj), PGM_TYPE_DRAWABLE, PgmDrawableClass))

typedef struct _PgmDrawable      PgmDrawable;
typedef struct _PgmDrawableClass PgmDrawableClass;

/**
 * PgmDrawableLayer:
 * @PGM_DRAWABLE_UNBOUND: Not bound to a #Canvas.
 * @PGM_DRAWABLE_FAR: Layer of drawables drawn behind the other layers.
 * @PGM_DRAWABLE_MIDDLE: Layer of drawables drawn over the drawables in the
 * far layer and behind the drawables in the near one.
 * @PGM_DRAWABLE_NEAR: Layer of drawables drawn over the other layers.
 *
 * The rendering layers.
 */
typedef enum {
  PGM_DRAWABLE_UNBOUND,
  PGM_DRAWABLE_FAR,
  PGM_DRAWABLE_MIDDLE,
  PGM_DRAWABLE_NEAR
} PgmDrawableLayer;

/* FIXME: These are not all properties (esp. PGM_DRAWABLE_REGENERATE), could be
 *        an idea to change the name from property to something else
 *        (operation?) */
/**
 * PgmDrawableProperty:
 * @PGM_DRAWABLE_VISIBILITY: %PgmDrawable visibility property.
 * @PGM_DRAWABLE_SIZE: %PgmDrawable size property.
 * @PGM_DRAWABLE_POSITION: %PgmDrawable position property.
 * @PGM_DRAWABLE_TRANSFORMATION_MATRIX: %PgmDrawable transformation matrix
 * property.
 * @PGM_DRAWABLE_BG_COLOR: %PgmDrawable background color property.
 * @PGM_DRAWABLE_FG_COLOR: %PgmDrawable foreground color property.
 * @PGM_DRAWABLE_OPACITY: %PgmDrawable opacity property.
 * @PGM_DRAWABLE_REGENERATE: %PgmDrawable regenerate property.
 * @PGM_IMAGE_DATA_FILE: %PgmImage file data property.
 * @PGM_IMAGE_DATA_BUFFER: %PgmImage buffer data property.
 * @PGM_IMAGE_DATA_GST_BUFFER: %PgmImage GstBuffer data property.
 * @PGM_IMAGE_DATA_PIXBUF: %PgmImage GdkPixbuf data property.
 * @PGM_IMAGE_DATA_SYSTEM_BUFFER: %PgmImage system buffer data property.
 * @PGM_IMAGE_DATA_IMAGE: %PgmImage image data property.
 * @PGM_IMAGE_DATA_EMPTY: %PgmImage empty data property.
 * @PGM_IMAGE_SYSTEM_BUFFER_CONTENT: %PgmImage system buffer content property.
 * @PGM_IMAGE_MAPPING_MATRIX: %PgmImage mapping matrix data property.
 * @PGM_IMAGE_ALIGNMENT: %PgmImage alignment property.
 * @PGM_IMAGE_LAYOUT: %PgmImage layout property.
 * @PGM_IMAGE_INTERP: %PgmImage interpolation property.
 * @PGM_IMAGE_WRAPPING: %PgmImage wrapping property.
 * @PGM_IMAGE_ASPECT_RATIO: %PgmImage aspect-ratio property.
 * @PGM_IMAGE_BORDER_WIDTH: %PgmImage border width property.
 * @PGM_IMAGE_BORDER_INNER_COLOR: %PgmImage border inner color property.
 * @PGM_IMAGE_BORDER_OUTER_COLOR: %PgmImage border outer color property.
 * @PGM_TEXT_LABEL: %PgmText label property.
 * @PGM_TEXT_MARKUP: %PgmText markup property.
 * @PGM_TEXT_FONT_FAMILY: %PgmText font family property.
 * @PGM_TEXT_HEIGHT: %PgmText height property.
 * @PGM_TEXT_ELLIPSIZE: %PgmText ellipsize property.
 * @PGM_TEXT_JUSTIFY: %PgmText justify property.
 * @PGM_TEXT_ALIGNMENT: %PgmText alignment property.
 * @PGM_TEXT_WRAP: %PgmText wrap property.
 * @PGM_TEXT_GRAVITY: %PgmText gravity property.
 * @PGM_TEXT_STRETCH: %PgmText stretch property.
 * @PGM_TEXT_STYLE: %PgmText style property.
 * @PGM_TEXT_VARIANT: %PgmText variant property.
 * @PGM_TEXT_WEIGHT: %PgmText weight property.
 * @PGM_TEXT_MULTILINE: %PgmText multiline property.
 * @PGM_TEXT_LINE_SPACING: %PgmText line spacing property.
 * @PGM_TEXT_COLOR: %PgmText color property.
 * @PGM_TEXT_OUTLINE_COLOR: %PgmText outline color property.
 * @PGM_TEXT_OUTLINE_WIDTH: %PgmText outline width property.
 * @PGM_TEXT_CAST_SHADOW: %PgmText cast shadow property.
 * @PGM_TEXT_SHADOW_POSITION: %PgmText shadow position property.
 * @PGM_TEXT_SHADOW_COLOR: %PgmText shadow color.
 *
 * The different properties of the drawables.
 */
typedef enum {
  /* PgmDrawable properties */
  PGM_DRAWABLE_VISIBILITY            = 0,
  PGM_DRAWABLE_SIZE                  = 1,
  PGM_DRAWABLE_POSITION              = 2,
  PGM_DRAWABLE_TRANSFORMATION_MATRIX = 3,
  PGM_DRAWABLE_BG_COLOR              = 4,
  PGM_DRAWABLE_FG_COLOR              = 5,
  PGM_DRAWABLE_OPACITY               = 6,
  PGM_DRAWABLE_REGENERATE            = 7,
  /* PgmImage properties */
  PGM_IMAGE_DATA_FILE                = 8,
  PGM_IMAGE_DATA_BUFFER              = 9,
  PGM_IMAGE_DATA_GST_BUFFER          = 10,
  PGM_IMAGE_DATA_PIXBUF              = 11,
  PGM_IMAGE_DATA_SYSTEM_BUFFER       = 12,
  PGM_IMAGE_DATA_IMAGE               = 13,
  PGM_IMAGE_DATA_EMPTY               = 14,
  PGM_IMAGE_SYSTEM_BUFFER_CONTENT    = 15,
  PGM_IMAGE_MAPPING_MATRIX           = 16,
  PGM_IMAGE_ALIGNMENT                = 17,
  PGM_IMAGE_LAYOUT                   = 18,
  PGM_IMAGE_INTERP                   = 19,
  PGM_IMAGE_WRAPPING                 = 20,
  PGM_IMAGE_ASPECT_RATIO             = 21,
  PGM_IMAGE_BORDER_WIDTH             = 22,
  PGM_IMAGE_BORDER_INNER_COLOR       = 23,
  PGM_IMAGE_BORDER_OUTER_COLOR       = 24,
  /* PgmText properties */
  PGM_TEXT_LABEL                     = 25,
  PGM_TEXT_MARKUP                    = 26,
  PGM_TEXT_FONT_FAMILY               = 27,
  PGM_TEXT_HEIGHT                    = 28,
  PGM_TEXT_ELLIPSIZE                 = 29,
  PGM_TEXT_JUSTIFY                   = 30,
  PGM_TEXT_ALIGNMENT                 = 31,
  PGM_TEXT_WRAP                      = 32,
  PGM_TEXT_GRAVITY                   = 33,
  PGM_TEXT_STRETCH                   = 34,
  PGM_TEXT_STYLE                     = 35,
  PGM_TEXT_VARIANT                   = 36,
  PGM_TEXT_WEIGHT                    = 37,
  PGM_TEXT_MULTILINE                 = 38,
  PGM_TEXT_LINE_SPACING              = 39,
  PGM_TEXT_COLOR                     = 40,
  PGM_TEXT_OUTLINE_COLOR             = 41,
  PGM_TEXT_OUTLINE_WIDTH             = 42,
  PGM_TEXT_CAST_SHADOW               = 43,
  PGM_TEXT_SHADOW_POSITION           = 44,
  PGM_TEXT_SHADOW_COLOR              = 45
} PgmDrawableProperty;

/**
 * PgmDrawableFlags:
 * @PGM_DRAWABLE_FLAG_UNPARENTING: Child is being removed from the parent
 * canvas. pgm_canvas_del_drawable() on a child already being removed
 * immediately returns %FALSE.
 * @PGM_DRAWABLE_FLAG_VISIBLE: Drawable is visible.
 * @PGM_DRAWABLE_FLAG_LAST: Offset to define more flags.
 *
 * The standard flags that a drawable may have.
 */
typedef enum {
  PGM_DRAWABLE_FLAG_UNPARENTING = (GST_OBJECT_FLAG_LAST << 0),
  PGM_DRAWABLE_FLAG_VISIBLE     = (GST_OBJECT_FLAG_LAST << 1),
  /* padding */
  PGM_DRAWABLE_FLAG_LAST        = (GST_OBJECT_FLAG_LAST << 16)
} PgmDrawableFlags;

/**
 * PgmDrawablePickingSignal:
 * @PGM_DRAWABLE_PICKING_PRESSED: Pressed signal flag.
 * @PGM_DRAWABLE_PICKING_PRESSURED: Pressured signal flag.
 * @PGM_DRAWABLE_PICKING_RELEASED: Released signal flag.
 * @PGM_DRAWABLE_PICKING_CLICKED: Clicked signal flag.
 * @PGM_DRAWABLE_PICKING_DOUBLE_CLICKED: Double-clicked signal flag.
 * @PGM_DRAWABLE_PICKING_DRAG_BEGIN: Drag-begin signal flag.
 * @PGM_DRAWABLE_PICKING_DRAG_MOTION: Drag-motion signal flag.
 * @PGM_DRAWABLE_PICKING_DRAG_END: Drag-end signal flag.
 * @PGM_DRAWABLE_PICKING_ENTERED: Entered signal flag.
 * @PGM_DRAWABLE_PICKING_SCROLLED: Scrolled signal flag.
 * @PGM_DRAWABLE_PICKING_MOTION: Motion signal flag.
 * @PGM_DRAWABLE_PICKING_MASK: Mask covering all the flags.
 *
 * The mouse picking flags internally used by #PgmViewport.
 */
typedef enum {
  PGM_DRAWABLE_PICKING_PRESSED        = (1 << 0),
  PGM_DRAWABLE_PICKING_PRESSURED      = (1 << 1),
  PGM_DRAWABLE_PICKING_RELEASED       = (1 << 2),
  PGM_DRAWABLE_PICKING_CLICKED        = (1 << 3),
  PGM_DRAWABLE_PICKING_DOUBLE_CLICKED = (1 << 4),
  PGM_DRAWABLE_PICKING_DRAG_BEGIN     = (1 << 5),
  PGM_DRAWABLE_PICKING_DRAG_MOTION    = (1 << 6),
  PGM_DRAWABLE_PICKING_DRAG_END       = (1 << 7),
  PGM_DRAWABLE_PICKING_ENTERED        = (1 << 8),
  PGM_DRAWABLE_PICKING_SCROLLED       = (1 << 9),
  PGM_DRAWABLE_PICKING_MOTION         = (1 << 10),
  PGM_DRAWABLE_PICKING_MASK           = 0x7FF
} PgmDrawablePickingSignal;

/**
 * PgmDrawable:
 * @transformation_matrix: the drawable transformation matrix.
 * @angle_x: the drawable angle of rotation on the x axis.
 * @angle_y: the drawable angle of rotation on the y axis.
 * @angle_z: the drawable angle of rotation on the z axis.
 * @layer: the layer the drawable belongs to.
 * @x: the drawable position on the x axis.
 * @y: the drawable position on the y axis.
 * @z: the drawable position on the z axis.
 * @orig_x: the drawable original position on the x axis.
 * @orig_y: the drawable original position on the y axis.
 * @width: the drawable width.
 * @height: the drawable height.
 * @orig_width: the drawable original width.
 * @orig_height: the drawable original height.
 * @grid_aligned: the grid aligned boolean.
 * @scale: the drawable scale factor.
 * @fg_r: the drawable foreground red color component.
 * @fg_g: the drawable foreground green color component.
 * @fg_b: the drawable foreground blue color component.
 * @fg_a: the drawable foreground alpha color component.
 * @bg_r: the drawable background red color component.
 * @bg_g: the drawable background green color component.
 * @bg_b: the drawable background blue color component.
 * @bg_a: the drawable background alpha color component.
 * @opacity: the drawable opacity.
 *
 * Pigment drawable abstract base class.
 */
struct _PgmDrawable {
  GstObject parent;

  /*< public >*/
  /* Transformation */
  PgmMat4x4 *transformation_matrix;
  gfloat angle_x, angle_y, angle_z;

  /* Layer */
  PgmDrawableLayer layer;

  /* Position */
  gfloat x, y, z;
  gfloat orig_x, orig_y;

  /* Scale */
  gfloat scale;

  /* Size */
  gfloat width, height;
  gfloat orig_width, orig_height;
  gboolean grid_aligned;

  /* Colors */
  guchar fg_r, fg_g, fg_b, fg_a;
  guchar bg_r, bg_g, bg_b, bg_a;

  /* Opacity */
  guchar opacity;

  /*< private >*/
  /* Position and orientation of the drawable */
  PgmVec3 origin;
  PgmVec3 plane_vector_i;
  PgmVec3 plane_vector_j;

  /* Mouse picking */
  PgmVec3  press_point;
  PgmVec3  viewport_press_point;
  guint32  pressure;
  guint32  release_time;
  gboolean mouse_over;
  guint16  drag_mask;
  guint16  press_mask;
  guint16  release_button;
  guchar   drag_distance;

  /* Flags */
  guint8 flags;
};

/**
 * PgmDrawableClass:
 * @parent_class: the parent class structure.
 * @changed: the "changed" signal.
 * @pressed: the "pressed" signal.
 * @pressured: the "pressured" signal.
 * @released: the "released" signal.
 * @clicked: the "clicked" signal.
 * @double_clicked: the "double-clicked" signal.
 * @scrolled: the "scrolled" signal.
 * @drag_begin: the "drag-begin" signal.
 * @drag_motion: the "drag-motion" signal.
 * @drag_end: the "drag-end" signal.
 * @motion: the "motion" signal.
 * @entered: the "entered" signal.
 * @left: the "left" signal.
 * @hide: the hide virtual method.
 * @show: the show virtual method.
 * @set_size: the set_size virtual method.
 * @set_position: the set_position virtual method.
 * @set_fg_color: the set_fg_color virtual method.
 * @set_bg_color: the set_bg_color virtual method.
 * @set_opacity: the set_opacity virtual method.
 *
 * The #PgmDrawable structure.
 */
struct _PgmDrawableClass {
  GstObjectClass parent_class;

  /*< public >*/

  /* Signals */

  void     (*changed)        (PgmDrawable *drawable,
                              PgmDrawableProperty property);

  gboolean (*pressed)        (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*pressured)      (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*released)       (PgmDrawable *drawable,
                              PgmButtonType button,
                              guint32 time);

  gboolean (*clicked)        (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*double_clicked) (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time);

  gboolean (*scrolled)       (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmScrollDirection direction,
                              guint32 time);

  gboolean (*drag_begin)     (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*drag_motion)    (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time,
                              guint32 pressure);

  gboolean (*drag_end)       (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              PgmButtonType button,
                              guint32 time);

  gboolean (*motion)         (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              guint32 time);

  gboolean (*entered)        (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              guint32 time);

  gboolean (*left)           (PgmDrawable *drawable,
                              gfloat x,
                              gfloat y,
                              gfloat z,
                              guint32 time);

  /* virtual methods for subclasses */

  PgmError (*hide)                      (PgmDrawable *drawable);

  PgmError (*show)                      (PgmDrawable *drawable);

  PgmError (*set_size)                  (PgmDrawable *drawable,
                                         gfloat width,
                                         gfloat height);

  PgmError (*set_position)              (PgmDrawable *drawable,
                                         gfloat x,
                                         gfloat y,
                                         gfloat z);

  PgmError (*set_fg_color)              (PgmDrawable *drawable,
                                         guchar r,
                                         guchar g,
                                         guchar b,
                                         guchar a);

  PgmError (*set_bg_color)              (PgmDrawable *drawable,
                                         guchar r,
                                         guchar g,
                                         guchar b,
                                         guchar a);

  PgmError (*set_opacity)               (PgmDrawable *drawable,
                                         guchar opacity);
};

GType    pgm_drawable_get_type          (void);

PgmError pgm_drawable_hide              (PgmDrawable *drawable);
PgmError pgm_drawable_show              (PgmDrawable *drawable);
PgmError pgm_drawable_is_visible        (PgmDrawable *drawable,
                                         gboolean *visible);

PgmError pgm_drawable_set_size          (PgmDrawable *drawable,
                                         gfloat width,
                                         gfloat height);
PgmError pgm_drawable_get_size          (PgmDrawable *drawable,
                                         gfloat *width,
                                         gfloat *height);

PgmError pgm_drawable_set_position      (PgmDrawable *drawable,
                                         gfloat x,
                                         gfloat y,
                                         gfloat z);
PgmError pgm_drawable_get_position      (PgmDrawable *drawable,
                                         gfloat *x,
                                         gfloat *y,
                                         gfloat *z);

PgmError pgm_drawable_set_rotation_x    (PgmDrawable *drawable,
                                         gfloat angle);
PgmError pgm_drawable_get_rotation_x    (PgmDrawable *drawable,
                                         gfloat *angle);

PgmError pgm_drawable_set_rotation_y    (PgmDrawable *drawable,
                                         gfloat angle);
PgmError pgm_drawable_get_rotation_y    (PgmDrawable *drawable,
                                         gfloat *angle);

PgmError pgm_drawable_set_rotation_z    (PgmDrawable *drawable,
                                         gfloat angle);
PgmError pgm_drawable_get_rotation_z    (PgmDrawable *drawable,
                                         gfloat *angle);

PgmError pgm_drawable_set_scale         (PgmDrawable *drawable,
                                         gfloat scale);
PgmError pgm_drawable_get_scale         (PgmDrawable *drawable,
                                         gfloat *scale);

PgmError pgm_drawable_set_fg_color      (PgmDrawable *drawable,
                                         guchar r,
                                         guchar g,
                                         guchar b,
                                         guchar a);
PgmError pgm_drawable_get_fg_color      (PgmDrawable *drawable,
                                         guchar *r,
                                         guchar *g,
                                         guchar *b,
                                         guchar *a);

PgmError pgm_drawable_set_bg_color      (PgmDrawable *drawable,
                                         guchar r,
                                         guchar g,
                                         guchar b,
                                         guchar a);
PgmError pgm_drawable_get_bg_color      (PgmDrawable *drawable,
                                         guchar *r,
                                         guchar *g,
                                         guchar *b,
                                         guchar *a);

PgmError pgm_drawable_set_opacity       (PgmDrawable *drawable,
                                         guchar opacity);
PgmError pgm_drawable_get_opacity       (PgmDrawable *drawable,
                                         guchar *opacity);

PgmError pgm_drawable_set_grid_aligned  (PgmDrawable *drawable,
                                         gboolean aligned);
PgmError pgm_drawable_get_grid_aligned  (PgmDrawable *drawable,
                                         gboolean *aligned);

PgmError pgm_drawable_set_drag_distance (PgmDrawable *drawable,
                                         guchar distance);
PgmError pgm_drawable_get_drag_distance (PgmDrawable *drawable,
                                         guchar *distance);

PgmError pgm_drawable_regenerate        (PgmDrawable *drawable);

PgmError pgm_drawable_from_canvas       (PgmDrawable *drawable,
                                         gfloat *x_drawable,
                                         gfloat *y_drawable,
                                         gfloat  x_canvas,
                                         gfloat  y_canvas,
                                         gfloat  z_canvas);

PgmError pgm_drawable_to_canvas         (PgmDrawable *drawable,
                                         gfloat *x_canvas,
                                         gfloat *y_canvas,
                                         gfloat *z_canvas,
                                         gfloat  x_drawable,
                                         gfloat  y_drawable);


/* Protected methods */

void _pgm_drawable_emit_changed      (PgmDrawable *drawable,
                                      PgmDrawableProperty property);

void _pgm_drawable_do_press_event    (PgmDrawable *drawable,
                                      PgmEventButton *event,
                                      PgmVec3 *p1,
                                      PgmVec3 *p2,
                                      guint16 *emission_mask);

void _pgm_drawable_do_pressure_event (PgmDrawable *drawable,
                                      PgmEventButton *event,
                                      PgmVec3 *p1,
                                      PgmVec3 *p2,
                                      guint16 *emission_mask);

void _pgm_drawable_do_release_event  (PgmDrawable *drawable,
                                      PgmEventButton *event,
                                      PgmVec3 *p1,
                                      PgmVec3 *p2,
                                      guint16 *emission_mask);

void _pgm_drawable_do_motion_event   (PgmDrawable *drawable,
                                      PgmEventMotion *event,
                                      PgmVec3 *p1,
                                      PgmVec3 *p2,
                                      guint16 *emission_mask);

void _pgm_drawable_do_scroll_event   (PgmDrawable *drawable,
                                      PgmEventScroll *event,
                                      PgmVec3 *p1,
                                      PgmVec3 *p2,
                                      guint16 *emission_mask);

G_END_DECLS

#endif /* __PGM_DRAWABLE_H__ */