![]() |
![]() |
![]() |
Pigment 0.3 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#include <pgm/pgm.h> enum PgmDrawableLayer; enum PgmDrawableProperty; PgmDrawable; PgmDrawableClass; 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);
"changed" : Run First "clicked" : Run Last "double-clicked" : Run Last "drag-begin" : Run Last "drag-end" : Run Last "drag-motion" : Run Last "entered" : Run Last "left" : Run Last "motion" : Run Last "pressed" : Run Last "pressured" : Run Last "released" : Run Last "scrolled" : Run Last
PgmDrawable represents a visual object on which you can embed media types such as text, images and video, or 2D graphics. It is meant to be a base abstract class for more specific visual objects such as PgmImage or PgmText. Drawables are not visible until they are added to a PgmCanvas. A drawable never knows about physical on screen coordinates such as pixels, and use floating point canvas coordinates. Drawables are positioned in 3D and then projected on a PgmViewport.
The base class implements simple drawing methods that are common to the different subclasses. For example if you want to draw a left aligned green text you would do something like that:
Example 4. Calling drawing functions on a drawable
pgm_drawable_set_fg_color (text, 0, 255, 0, 255); pgm_drawable_set_bg_color (text, 255, 0, 0, 255); pgm_text_set_label (PGM_TEXT (text), "Hello world!");
You are basically using a mix of drawable calls and text calls on the
same object at different level of the object hierarchy.
The changed signal is fired whenever a property of a drawable is changed. There are also signals for handling mouse picking. For instance, you just need to connect a callback to the clicked signal to be notified of a click on a drawable.
Last reviewed on 2007-09-25 (0.3.1)
typedef enum { PGM_DRAWABLE_UNBOUND, PGM_DRAWABLE_FAR, PGM_DRAWABLE_MIDDLE, PGM_DRAWABLE_NEAR } PgmDrawableLayer;
The rendering layers.
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;
The different properties of the drawables.
PgmDrawable visibility property.
|
|
PgmDrawable size property.
|
|
PgmDrawable position property.
|
|
PgmDrawable transformation matrix
property.
|
|
PgmDrawable background color property.
|
|
PgmDrawable foreground color property.
|
|
PgmDrawable opacity property.
|
|
PgmDrawable regenerate property.
|
|
PgmImage file data property.
|
|
PgmImage buffer data property.
|
|
PgmImage GstBuffer data property.
|
|
PgmImage GdkPixbuf data property.
|
|
PgmImage system buffer data property.
|
|
PgmImage image data property.
|
|
PgmImage empty data property.
|
|
PgmImage system buffer content property.
|
|
PgmImage mapping matrix data property.
|
|
PgmImage alignment property.
|
|
PgmImage layout property.
|
|
PgmImage interpolation property.
|
|
PgmImage wrapping property.
|
|
PgmImage aspect-ratio property.
|
|
PgmImage border width property.
|
|
PgmImage border inner color property.
|
|
PgmImage border outer color property.
|
|
PgmText label property.
|
|
PgmText markup property.
|
|
PgmText font family property.
|
|
PgmText height property.
|
|
PgmText ellipsize property.
|
|
PgmText justify property.
|
|
PgmText alignment property.
|
|
PgmText wrap property.
|
|
PgmText gravity property.
|
|
PgmText stretch property.
|
|
PgmText style property.
|
|
PgmText variant property.
|
|
PgmText weight property.
|
|
PgmText multiline property.
|
|
PgmText line spacing property.
|
|
PgmText color property.
|
|
PgmText outline color property.
|
|
PgmText outline width property.
|
|
PgmText cast shadow property.
|
|
PgmText shadow position property.
|
|
PgmText shadow color.
|
typedef struct { /* 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; } PgmDrawable;
Pigment drawable abstract base class.
PgmMat4x4 * |
the drawable transformation matrix. |
gfloat |
the drawable angle of rotation on the x axis. |
gfloat |
the drawable angle of rotation on the y axis. |
gfloat |
the drawable angle of rotation on the z axis. |
PgmDrawableLayer |
the layer the drawable belongs to. |
gfloat |
the drawable position on the x axis. |
gfloat |
the drawable position on the y axis. |
gfloat |
the drawable position on the z axis. |
gfloat |
the drawable original position on the x axis. |
gfloat |
the drawable original position on the y axis. |
gfloat |
the drawable scale factor. |
gfloat |
the drawable width. |
gfloat |
the drawable height. |
gfloat |
the drawable original width. |
gfloat |
the drawable original height. |
gboolean |
the grid aligned boolean. |
guchar |
the drawable foreground red color component. |
guchar |
the drawable foreground green color component. |
guchar |
the drawable foreground blue color component. |
guchar |
the drawable foreground alpha color component. |
guchar |
the drawable background red color component. |
guchar |
the drawable background green color component. |
guchar |
the drawable background blue color component. |
guchar |
the drawable background alpha color component. |
guchar |
the drawable opacity. |
typedef struct { GstObjectClass parent_class; /* 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); } PgmDrawableClass;
The PgmDrawable structure.
GstObjectClass |
the parent class structure. |
|
the "changed" signal. |
|
the "pressed" signal. |
|
the "pressured" signal. |
|
the "released" signal. |
|
the "clicked" signal. |
|
the "double-clicked" signal. |
|
the "scrolled" signal. |
|
the "drag-begin" signal. |
|
the "drag-motion" signal. |
|
the "drag-end" signal. |
|
the "motion" signal. |
|
the "entered" signal. |
|
the "left" signal. |
|
the hide virtual method. |
|
the show virtual method. |
|
the set_size virtual method. |
|
the set_position virtual method. |
|
the set_fg_color virtual method. |
|
the set_bg_color virtual method. |
|
the set_opacity virtual method. |
PgmError pgm_drawable_hide (PgmDrawable *drawable);
Makes drawable
invisible.
MT safe.
|
a PgmDrawable object. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_show (PgmDrawable *drawable);
Makes drawable
visible.
MT safe.
|
a PgmDrawable object. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_is_visible (PgmDrawable *drawable, gboolean *visible);
Retrieves whether drawable
is visible.
MT safe.
|
a PgmDrawable object. |
|
a pointer to a gboolean where the visible state of the drawable is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_size (PgmDrawable *drawable, gfloat width, gfloat height);
Defines drawable
size in canvas units to width
x height
.
MT safe.
|
a PgmDrawable object. |
|
the width of the canvas. |
|
the height of the canvas. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_size (PgmDrawable *drawable, gfloat *width, gfloat *height);
Gets drawable
size in canvas units.
MT safe.
|
a PgmDrawable object. |
|
a pointer to a gfloat where the width of the drawable is going to be stored. |
|
a pointer to a gfloat where the height of the drawable is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_position (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z);
Sets position of drawable
in canvas units.
MT safe.
|
a PgmDrawable object. |
|
the position of drawable on the x axis.
|
|
the position of drawable on the y axis.
|
|
the position of drawable on the z axis.
|
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_position (PgmDrawable *drawable, gfloat *x, gfloat *y, gfloat *z);
Gets drawable
position in canvas units.
MT safe.
|
a PgmDrawable object. |
|
a pointer to a gfloat where the x position of drawable is going to
be stored.
|
|
a pointer to a gfloat where the y position of drawable is going to
be stored.
|
|
a pointer to a gfloat where the z position of drawable is going to
be stored.
|
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_rotation_x (PgmDrawable *drawable, gfloat angle);
Defines the rotation to apply to drawable
on the x axis. The rotation point
is the center of drawable
and the axis is its normal.
MT safe.
|
a PgmDrawable object. |
|
an angle of rotation, in radians. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_rotation_x (PgmDrawable *drawable, gfloat *angle);
Retrieves in angle
the current x rotation angle applied to drawable
.
MT safe.
|
a PgmDrawable object. |
|
a gfloat pointer where the x rotation angle is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_rotation_y (PgmDrawable *drawable, gfloat angle);
Defines the rotation to apply to drawable
on the y axis. The rotation point
is the center of drawable
and the axis is its normal.
MT safe.
|
a PgmDrawable object. |
|
an angle of rotation, in radians. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_rotation_y (PgmDrawable *drawable, gfloat *angle);
Retrieves in angle
the current y rotation angle applied to drawable
.
MT safe.
|
a PgmDrawable object. |
|
a gfloat pointer where the y rotation angle is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_rotation_z (PgmDrawable *drawable, gfloat angle);
Defines the rotation to apply to drawable
on the z axis. The rotation point
is the center of drawable
and the axis is its normal.
MT safe.
|
a PgmDrawable object. |
|
an angle of rotation, in radians. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_rotation_z (PgmDrawable *drawable, gfloat *angle);
Retrieves in angle
the current z rotation angle applied to drawable
.
MT safe.
|
a PgmDrawable object. |
|
a gfloat pointer where the z rotation angle is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_scale (PgmDrawable *drawable, gfloat scale);
Defines the scale to apply to drawable
. The scaling point is the center of
drawable
.
MT safe.
|
a PgmDrawable object. |
|
a scale factor. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_scale (PgmDrawable *drawable, gfloat *scale);
Retrieves in scale
the current scale factor applied to drawable
.
MT safe.
|
a PgmDrawable object. |
|
a gfloat pointer where the scale factor is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_fg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a);
Set the color used for drawing operations on drawable
to (r
,g
,b
,a
).
MT safe.
|
a PgmDrawable object. |
|
the red foreground color. |
|
the green foreground color. |
|
the blue foreground color. |
|
the alpha foreground color. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_fg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a);
Retrieves the color used for drawing operations on drawable
in
(r
,g
,b
,a
).
MT safe.
|
a PgmDrawable object. |
|
a pointer to a guchar where the red foreground color is going to be stored. |
|
a pointer to a guchar where the green foreground color is going to be stored. |
|
a pointer to a guchar where the blue foreground color is going to be stored. |
|
a pointer to a guchar where the alpha foreground color is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_bg_color (PgmDrawable *drawable, guchar r, guchar g, guchar b, guchar a);
Sets the color used to fill the background of drawable
to (r
,g
,b
,a
).
MT safe.
|
a PgmDrawable object. |
|
the red background color. |
|
the green background color. |
|
the blue background color. |
|
the alpha background color. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_bg_color (PgmDrawable *drawable, guchar *r, guchar *g, guchar *b, guchar *a);
Retrieves the color used to fill the background of drawable
in
(r
,g
,b
,a
).
MT safe.
|
A PgmDrawable object. |
|
a pointer to a guchar where the red background color is going to be stored. |
|
a pointer to a guchar where the green background color is going to be stored. |
|
a pointer to a guchar where the blue background color is going to be stored. |
|
a pointer to a guchar where the alpha background color is going to be stored. |
Returns : |
A PgmError indicating success/failure. |
PgmError pgm_drawable_set_opacity (PgmDrawable *drawable, guchar opacity);
Defines the opacity of drawable
to opacity
.
MT safe.
|
a PgmDrawable object. |
|
the opacity of drawable .
|
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_opacity (PgmDrawable *drawable, guchar *opacity);
Retrieves the opacity of drawable
in opacity
.
MT safe.
|
a PgmDrawable object. |
|
a pointer to a guchar where the opacity is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_grid_aligned (PgmDrawable *drawable, gboolean aligned);
Sets whether or not drawable
must be automatically aligned to the pixel
boundaries in the viewport.
MT safe.
|
a PgmDrawable object. |
|
the grid aligned boolean. FALSE by default.
|
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_grid_aligned (PgmDrawable *drawable, gboolean *aligned);
Gets whether or not drawable
must be automatically aligned to the pixel
boundaries in the viewport.
MT safe.
|
a PgmDrawable object. |
|
a pointer to a gboolean where the grid aligned boolean is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_set_drag_distance (PgmDrawable *drawable, guchar distance);
Defines the drag distance of drawable
to distance
. The drag distance is the
distance in pixels the user has to cover with a mouse button pressed to
trigger the 'drag-begin' signal.
MT safe.
|
a PgmDrawable object. |
|
the drag distance of drawable . 5 by default.
|
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_get_drag_distance (PgmDrawable *drawable, guchar *distance);
Retrieves the drag distance of drawable
in distance
.
MT safe.
|
a PgmDrawable object. |
|
a pointer to a guchar where the drag distance is going to be stored. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_regenerate (PgmDrawable *drawable);
Forces a regeneration of the drawable.
MT safe.
|
a PgmDrawable object. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_from_canvas (PgmDrawable *drawable, gfloat *x_drawable, gfloat *y_drawable, gfloat x_canvas, gfloat y_canvas, gfloat z_canvas);
Converts a position in the canvas into its orthogonal projection in the plane
of drawable
, with the (0,0) coordinate in that plane being the upper left
corner of drawable
.
|
a PgmDrawable object. |
|
where to return the x coordinate in the drawable plane.
|
|
where to return the y coordinate in the drawable plane.
|
|
x coordinate in the canvas space. |
|
y coordinate in the canvas space. |
|
z coordinate in the canvas space. |
Returns : |
a PgmError indicating success/failure. |
PgmError pgm_drawable_to_canvas (PgmDrawable *drawable, gfloat *x_canvas, gfloat *y_canvas, gfloat *z_canvas, gfloat x_drawable, gfloat y_drawable);
Converts a position in the plane of drawable
into the canvas space.
|
a PgmDrawable object. |
|
where to return the x coordinate in the canvas space. |
|
where to return the y coordinate in the canvas space. |
|
where to return the z coordinate in the canvas space. |
|
x coordinate in the drawable plane.
|
|
y coordinate in the drawable plane.
|
Returns : |
a PgmError indicating success/failure. |
"changed"
signalvoid user_function (PgmDrawable *drawable, PgmDrawableProperty property, gpointer user_data) : Run First
Will be emitted after property
of drawable
is changed.
|
the PgmDrawable |
|
the PgmDrawableProperty changed in drawable
|
|
user data set when the signal handler was connected. |
"clicked"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last
Will be emitted after drawable
is clicked.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the click on drawable
|
|
the y coordinate of the point intersecting the click on drawable
|
|
the z coordinate of the point intersecting the click on drawable
|
|
the PgmButtonType |
|
the timestamp of the button press event |
|
the pressure force, set to 0 when not used with a touch screen |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"double-clicked"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, gpointer user_data) : Run Last
Will be emitted after drawable
is clicked.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the double-click on
drawable
|
|
the y coordinate of the point intersecting the double-click on
drawable
|
|
the z coordinate of the point intersecting the double-click on
drawable
|
|
the PgmButtonType |
|
the timestamp of the button press event |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"drag-begin"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last
Will be emitted after drawable
is initially dragged. You can for instance
use that signal to change drawable
properties or store the intersecting
point for further computations during the "drag-motion" signal emission.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the initial click on
drawable
|
|
the y coordinate of the point intersecting the initial click on
drawable
|
|
the z coordinate of the point intersecting the initial click on
drawable
|
|
the PgmButtonType |
|
the timestamp of the motion event |
|
the pressure force, set to 0 when not used with a touch screen |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"drag-end"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, gpointer user_data) : Run Last
Will be emitted after drawable
is released. This signal is emitted on all
the drawables which have received a "drag-begin" signal.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the release event on
the dragged drawable plane
|
|
the y coordinate of the point intersecting the release event on
the dragged drawable plane
|
|
the z coordinate of the point intersecting the release event on
the dragged drawable plane
|
|
the PgmButtonType |
|
the timestamp of the motion event |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"drag-motion"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last
Will be emitted after drawable
is dragged.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the cursor position on
the dragged drawable plane
|
|
the y coordinate of the point intersecting the cursor position on
the dragged drawable plane
|
|
the z coordinate of the point intersecting the cursor position on
the dragged drawable plane
|
|
the PgmButtonType |
|
the timestamp of the motion event |
|
the pressure force, set to 0 when not used with a touch screen |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"entered"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time, gpointer user_data) : Run Last
Will be emitted when the pointer enters the drawable
area.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the y coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the z coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the timestamp of the motion event |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if drawables under drawable should not be in "entered" state
until the pointer leaves drawable , FALSE otherwise.
|
"left"
signalvoid user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time, gpointer user_data) : Run Last
Will be emitted when the pointer leaves the drawable
area.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the y coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the z coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the timestamp of the motion event |
|
user data set when the signal handler was connected. |
"motion"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, guint time, gpointer user_data) : Run Last
Will be emitted when the pointer is moved over drawable
.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the y coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the z coordinate of the point intersecting the cursor position on
the drawable plane
|
|
the timestamp of the motion event |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"pressed"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last
Will be emitted after drawable
is pressed.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the click on drawable
|
|
the y coordinate of the point intersecting the click on drawable
|
|
the z coordinate of the point intersecting the click on drawable
|
|
the PgmButtonType |
|
the timestamp of the button press event |
|
the pressure force, set to 0 when not used with a touch screen |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"pressured"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, guint pressure, gpointer user_data) : Run Last
Will be emitted after the touch pressure on drawable
change.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the click on drawable
|
|
the y coordinate of the point intersecting the click on drawable
|
|
the z coordinate of the point intersecting the click on drawable
|
|
the PgmButtonType |
|
the timestamp of the button press event |
|
the pressure force |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"released"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmButtonType button, guint time, gpointer user_data) : Run Last
Will be emitted after drawable
is released.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the click on drawable
plane
|
|
the y coordinate of the point intersecting the click on drawable
plane
|
|
the z coordinate of the point intersecting the click on drawable
plane
|
|
the PgmButtonType |
|
the timestamp of the button release event |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |
"scrolled"
signalgboolean user_function (PgmDrawable *drawable, gfloat x, gfloat y, gfloat z, PgmScrollDirection direction, guint time, gpointer user_data) : Run Last
Will be emitted after drawable
is scrolled.
|
the PgmDrawable |
|
the x coordinate of the point intersecting the scroll on drawable
|
|
the y coordinate of the point intersecting the scroll on drawable
|
|
the z coordinate of the point intersecting the scroll on drawable
|
|
the PgmScrollDirection |
|
the timestamp of the scroll event |
|
user data set when the signal handler was connected. |
Returns : |
TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. |