Top |
gboolean | can-focus | Read / Write |
gchar * | description | Read / Write |
GooCanvasItem * | parent | Read / Write |
GooCanvasPointerEvents | pointer-events | Read / Write |
gchar * | title | Read / Write |
gchar * | tooltip | Read / Write |
GooCairoMatrix * | transform | Read / Write |
GooCanvasItemVisibility | visibility | Read / Write |
gdouble | visibility-threshold | Read / Write |
void | animation-finished | Run Last |
gboolean | button-press-event | Run Last |
gboolean | button-release-event | Run Last |
void | child-notify | No Hooks |
gboolean | enter-notify-event | Run Last |
gboolean | focus-in-event | Run Last |
gboolean | focus-out-event | Run Last |
gboolean | grab-broken-event | Run Last |
gboolean | key-press-event | Run Last |
gboolean | key-release-event | Run Last |
gboolean | leave-notify-event | Run Last |
gboolean | motion-notify-event | Run Last |
gboolean | query-tooltip | Run Last |
gboolean | scroll-event | Run Last |
GooCanvasItem is implemented by GooCanvasEllipse, GooCanvasGrid, GooCanvasGroup, GooCanvasImage, GooCanvasItemSimple, GooCanvasPath, GooCanvasPolyline, GooCanvasRect, GooCanvasTable, GooCanvasText and GooCanvasWidget.
GooCanvasItem defines the interface that canvas items must implement, and contains methods for operating on canvas items.
void goo_canvas_item_translate (GooCanvasItem *item
,gdouble tx
,gdouble ty
);
Translates the origin of the item's coordinate system by the given amounts.
void goo_canvas_item_scale (GooCanvasItem *item
,gdouble sx
,gdouble sy
);
Scales the item's coordinate system by the given amounts.
void goo_canvas_item_rotate (GooCanvasItem *item
,gdouble degrees
,gdouble cx
,gdouble cy
);
Rotates the item's coordinate system by the given amount, about the given origin.
void goo_canvas_item_skew_x (GooCanvasItem *item
,gdouble degrees
,gdouble cx
,gdouble cy
);
Skews the item's coordinate system along the x axis by the given amount, about the given origin.
void goo_canvas_item_skew_y (GooCanvasItem *item
,gdouble degrees
,gdouble cx
,gdouble cy
);
Skews the item's coordinate system along the y axis by the given amount, about the given origin.
gboolean goo_canvas_item_get_transform (GooCanvasItem *item
,cairo_matrix_t *transform
);
Gets the transformation matrix of an item.
void goo_canvas_item_set_transform (GooCanvasItem *item
,const cairo_matrix_t *transform
);
Sets the transformation matrix of an item.
gboolean goo_canvas_item_get_simple_transform (GooCanvasItem *item
,gdouble *x
,gdouble *y
,gdouble *scale
,gdouble *rotation
);
This function can be used to get the position, scale and rotation of an
item, providing that the item has a simple transformation matrix
(e.g. set with goo_canvas_item_set_simple_transform()
, or using a
combination of simple translate, scale and rotate operations). If the item
has a complex transformation matrix the results will be incorrect.
item |
an item. |
|
x |
returns the x coordinate of the origin of the item's coordinate space. |
[out] |
y |
returns the y coordinate of the origin of the item's coordinate space. |
[out] |
scale |
returns the scale of the item. |
[out] |
rotation |
returns the clockwise rotation of the item, in degrees (0-360). |
[out] |
void goo_canvas_item_set_simple_transform (GooCanvasItem *item
,gdouble x
,gdouble y
,gdouble scale
,gdouble rotation
);
A convenience function to set the item's transformation matrix.
void goo_canvas_item_get_bounds (GooCanvasItem *item
,GooCanvasBounds *bounds
);
Gets the bounds of the item.
Note that the bounds includes the entire fill and stroke extents of the item, whether they are painted or not.
gboolean
goo_canvas_item_is_visible (GooCanvasItem *item
);
Checks if the item is visible.
This entails checking the item's own visibility setting, as well as those of its ancestors.
Note that the item may be scrolled off the screen and so may not be actually visible to the user.
gboolean
goo_canvas_item_get_is_static (GooCanvasItem *item
);
Returns TRUE
if the item is static. Static items do not move or change
size when the canvas is scrolled or the scale changes.
void goo_canvas_item_set_is_static (GooCanvasItem *item
,gboolean is_static
);
Notifies the item that it is static. Static items do not move or change size when the canvas is scrolled or the scale changes.
Container items such as GooCanvasGroup should call this function when children are added, to notify children whether they are static or not. Containers should also pass on any changes in their own status to children.
void goo_canvas_item_animate (GooCanvasItem *item
,gdouble x
,gdouble y
,gdouble scale
,gdouble degrees
,gboolean absolute
,gint duration
,gint step_time
,GooCanvasAnimateType type
);
Animates an item from its current position to the given offsets, scale and rotation.
item |
an item. |
|
x |
the final x coordinate. |
|
y |
the final y coordinate. |
|
scale |
the final scale. |
|
degrees |
the final rotation. This can be negative to rotate anticlockwise, and can also be greater than 360 to rotate a number of times. |
|
absolute |
if the |
|
duration |
the duration of the animation, in milliseconds (1/1000ths of a second). |
|
step_time |
the time between each animation step, in milliseconds. |
|
type |
specifies what happens when the animation finishes. |
void
goo_canvas_item_stop_animation (GooCanvasItem *item
);
Stops any current animation for the given item, leaving it at its current position.
void goo_canvas_item_raise (GooCanvasItem *item
,GooCanvasItem *above
);
Raises an item in the stacking order.
void goo_canvas_item_lower (GooCanvasItem *item
,GooCanvasItem *below
);
Lowers an item in the stacking order.
void
goo_canvas_item_remove (GooCanvasItem *item
);
Removes an item from its parent. If the item is in a canvas it will be removed.
This would normally also result in the item being freed.
GooCanvas *
goo_canvas_item_get_canvas (GooCanvasItem *item
);
Returns the GooCanvas containing the given GooCanvasItem.
void goo_canvas_item_set_canvas (GooCanvasItem *item
,GooCanvas *canvas
);
This function is only intended to be used when implementing new canvas items, specifically container items such as GooCanvasGroup.
It sets the canvas of the item.
GooCanvasItem *
goo_canvas_item_get_parent (GooCanvasItem *item
);
Gets the parent of the given item.
void goo_canvas_item_set_parent (GooCanvasItem *item
,GooCanvasItem *parent
);
This function is only intended to be used when implementing new canvas items (specifically container items such as GooCanvasGroup). It sets the parent of the child item.
This function cannot be used to add an item to a group or to change the parent of an item. To do that use the “parent” property.
GooCanvasItemModel *
goo_canvas_item_get_model (GooCanvasItem *item
);
Gets the model of the given canvas item.
void goo_canvas_item_set_model (GooCanvasItem *item
,GooCanvasItemModel *model
);
Sets the model of the given canvas item.
gboolean
goo_canvas_item_is_container (GooCanvasItem *item
);
Tests to see if the given item is a container.
gint
goo_canvas_item_get_n_children (GooCanvasItem *item
);
Gets the number of children of the container.
GooCanvasItem * goo_canvas_item_get_child (GooCanvasItem *item
,gint child_num
);
Gets the child item at the given stack position.
gint goo_canvas_item_find_child (GooCanvasItem *item
,GooCanvasItem *child
);
Attempts to find the given child item with the container's stack.
void goo_canvas_item_add_child (GooCanvasItem *item
,GooCanvasItem *child
,gint position
);
Adds a child item to a container item at the given stack position.
void goo_canvas_item_move_child (GooCanvasItem *item
,gint old_position
,gint new_position
);
Moves a child item to a new stack position within the container.
void goo_canvas_item_remove_child (GooCanvasItem *item
,gint child_num
);
Removes the child item at the given position.
gboolean goo_canvas_item_get_transform_for_child (GooCanvasItem *item
,GooCanvasItem *child
,cairo_matrix_t *transform
);
Gets the transformation matrix of an item combined with any special transform needed for the given child. These special transforms are used by layout items such as GooCanvasTable.
GooCanvasStyle *
goo_canvas_item_get_style (GooCanvasItem *item
);
Gets the item's style. If the item doesn't have its own style it will return its parent's style.
void goo_canvas_item_set_style (GooCanvasItem *item
,GooCanvasStyle *style
);
Sets the item's style, by copying the properties from the given style.
void
goo_canvas_item_request_update (GooCanvasItem *item
);
This function is only intended to be used when implementing new canvas items.
It requests that an update of the item is scheduled. It will be performed as soon as the application is idle, and before the canvas is redrawn.
void
goo_canvas_item_ensure_updated (GooCanvasItem *item
);
This function is only intended to be used when implementing new canvas items.
It updates the canvas immediately, if an update is scheduled. This ensures that all item bounds are up-to-date.
void goo_canvas_item_update (GooCanvasItem *item
,gboolean entire_tree
,cairo_t *cr
,GooCanvasBounds *bounds
);
This function is only intended to be used when implementing new canvas items, specifically container items such as GooCanvasGroup.
Updates the item, if needed, and any children.
item |
||
entire_tree |
if the entire subtree should be updated. |
|
cr |
a cairo context. |
|
bounds |
a GooCanvasBounds to return the new bounds in. |
gboolean goo_canvas_item_get_requested_area (GooCanvasItem *item
,cairo_t *cr
,GooCanvasBounds *requested_area
);
This function is only intended to be used when implementing new canvas items, specifically layout items such as GooCanvasTable.
It gets the requested area of a child item.
item |
||
cr |
a cairo context. |
|
requested_area |
a GooCanvasBounds to return the requested area in, in the parent's coordinate space. |
gboolean goo_canvas_item_get_requested_area_for_width (GooCanvasItem *item
,cairo_t *cr
,gdouble width
,GooCanvasBounds *requested_area
);
This function is only intended to be used when implementing new canvas items, specifically layout items such as GooCanvasTable.
It gets the requested area of a child item, assuming it is allocated the given width. This is useful for text items whose requested height may change depending on the allocated width.
item |
||
cr |
a cairo context. |
|
width |
the allocated width. |
|
requested_area |
a GooCanvasBounds to return the requested area in, in the
parent's coordinate space. If |
Since: 2.0.1
gdouble goo_canvas_item_get_requested_height (GooCanvasItem *item
,cairo_t *cr
,gdouble width
);
This function is only intended to be used when implementing new canvas items, specifically layout items such as GooCanvasTable.
It gets the requested height of a child item, assuming it is allocated the given width. This is useful for text items whose requested height may change depending on the allocated width.
void goo_canvas_item_allocate_area (GooCanvasItem *item
,cairo_t *cr
,const GooCanvasBounds *requested_area
,const GooCanvasBounds *allocated_area
,gdouble x_offset
,gdouble y_offset
);
This function is only intended to be used when implementing new canvas items, specifically layout items such as GooCanvasTable.
It allocates an area to a child GooCanvasItem.
Note that the parent layout item will use a transform to move each of its children for the layout, so there is no need for the child item to reposition itself. It only needs to recalculate its device bounds.
To help recalculate the item's device bounds, the x_offset
and y_offset
of the child item's allocated position from its requested position are
provided. Simple items can just add these to their bounds.
item |
||
cr |
a cairo context. |
|
requested_area |
the area that the item originally requested, in the parent's coordinate space. |
|
allocated_area |
the area that the item has been allocated, in the parent's coordinate space. |
|
x_offset |
the x offset of the allocated area from the requested area in the device coordinate space. |
|
y_offset |
the y offset of the allocated area from the requested area in the device coordinate space. |
GList * goo_canvas_item_get_items_at (GooCanvasItem *item
,gdouble x
,gdouble y
,cairo_t *cr
,gboolean is_pointer_event
,gboolean parent_is_visible
,GList *found_items
);
This function is only intended to be used when implementing new canvas items, specifically container items such as GooCanvasGroup.
It gets the items at the given point.
item |
||
x |
the x coordinate of the point. |
|
y |
the y coordinate of the point. |
|
cr |
a cairo contect. |
|
is_pointer_event |
|
|
parent_is_visible |
|
|
found_items |
the list of items found so far. |
[element-type GooCanvas.CanvasItem] |
void goo_canvas_item_paint (GooCanvasItem *item
,cairo_t *cr
,const GooCanvasBounds *bounds
,gdouble scale
);
This function is only intended to be used when implementing new canvas items, specifically container items such as GooCanvasGroup.
It paints the item and all children if they intersect the given bounds.
Note that the scale
argument may be different to the current scale in the
GooCanvasItem, e.g. when the canvas is being printed.
item |
||
cr |
a cairo context. |
|
bounds |
the bounds that need to be repainted, in device space. |
|
scale |
the scale to use to determine whether an item should be painted. See “visibility-threshold”. |
void goo_canvas_item_class_install_child_property (GObjectClass *iclass
,guint property_id
,GParamSpec *pspec
);
This function is only intended to be used when implementing new canvas items, specifically layout container items such as GooCanvasTable.
It installs a child property on a canvas item class.
GParamSpec ** goo_canvas_item_class_list_child_properties (GObjectClass *iclass
,guint *n_properties
);
This function is only intended to be used when implementing new canvas items, specifically layout container items such as GooCanvasTable.
It returns all child properties of a canvas item class.
GParamSpec * goo_canvas_item_class_find_child_property (GObjectClass *iclass
,const gchar *property_name
);
This function is only intended to be used when implementing new canvas items, specifically layout container items such as GooCanvasTable.
It finds a child property of a canvas item class by name.
void goo_canvas_item_get_child_property (GooCanvasItem *item
,GooCanvasItem *child
,const gchar *property_name
,GValue *value
);
Gets a child property of child
.
item |
||
child |
a child GooCanvasItem. |
|
property_name |
the name of the child property to get. |
|
value |
a location to return the value. |
void goo_canvas_item_set_child_property (GooCanvasItem *item
,GooCanvasItem *child
,const gchar *property_name
,const GValue *value
);
Sets a child property of child
.
item |
||
child |
a child GooCanvasItem. |
|
property_name |
the name of the child property to set. |
|
value |
the value to set the property to. |
void goo_canvas_item_get_child_properties (GooCanvasItem *item
,GooCanvasItem *child
,...
);
Gets the values of one or more child properties of child
.
item |
||
child |
a child GooCanvasItem. |
|
... |
pairs of property names and value pointers, and a terminating |
void goo_canvas_item_get_child_properties_valist (GooCanvasItem *item
,GooCanvasItem *child
,va_list var_args
);
Gets the values of one or more child properties of child
.
item |
||
child |
a child GooCanvasItem. |
|
var_args |
pairs of property names and value pointers, and a terminating
|
void goo_canvas_item_set_child_properties (GooCanvasItem *item
,GooCanvasItem *child
,...
);
Sets the values of one or more child properties of child
.
item |
||
child |
a child GooCanvasItem. |
|
... |
pairs of property names and values, and a terminating |
void goo_canvas_item_set_child_properties_valist (GooCanvasItem *item
,GooCanvasItem *child
,va_list var_args
);
Sets the values of one or more child properties of child
.
item |
||
child |
a child GooCanvasItem. |
|
var_args |
pairs of property names and values, and a terminating |
typedef struct _GooCanvasItem GooCanvasItem;
GooCanvasItem is a typedef used for objects that implement the GooCanvasItem interface.
(There is no actual GooCanvasItem struct, since it is only an interface. But using 'GooCanvasItem' is more helpful than using 'GObject'.)
struct GooCanvasItemIface { /* Virtual methods that group items must implement. */ GooCanvas* (* get_canvas) (GooCanvasItem *item); void (* set_canvas) (GooCanvasItem *item, GooCanvas *canvas); gint (* get_n_children) (GooCanvasItem *item); GooCanvasItem* (* get_child) (GooCanvasItem *item, gint child_num); void (* request_update) (GooCanvasItem *item); /* Virtual methods that group items may implement. */ void (* add_child) (GooCanvasItem *item, GooCanvasItem *child, gint position); void (* move_child) (GooCanvasItem *item, gint old_position, gint new_position); void (* remove_child) (GooCanvasItem *item, gint child_num); void (* get_child_property) (GooCanvasItem *item, GooCanvasItem *child, guint property_id, GValue *value, GParamSpec *pspec); void (* set_child_property) (GooCanvasItem *item, GooCanvasItem *child, guint property_id, const GValue *value, GParamSpec *pspec); gboolean (* get_transform_for_child) (GooCanvasItem *item, GooCanvasItem *child, cairo_matrix_t *transform); /* Virtual methods that all canvas items must implement. */ GooCanvasItem* (* get_parent) (GooCanvasItem *item); void (* set_parent) (GooCanvasItem *item, GooCanvasItem *parent); void (* get_bounds) (GooCanvasItem *item, GooCanvasBounds *bounds); GList* (* get_items_at) (GooCanvasItem *item, gdouble x, gdouble y, cairo_t *cr, gboolean is_pointer_event, gboolean parent_is_visible, GList *found_items); void (* update) (GooCanvasItem *item, gboolean entire_tree, cairo_t *cr, GooCanvasBounds *bounds); void (* paint) (GooCanvasItem *item, cairo_t *cr, const GooCanvasBounds *bounds, gdouble scale); gboolean (* get_requested_area) (GooCanvasItem *item, cairo_t *cr, GooCanvasBounds *requested_area); void (* allocate_area) (GooCanvasItem *item, cairo_t *cr, const GooCanvasBounds *requested_area, const GooCanvasBounds *allocated_area, gdouble x_offset, gdouble y_offset); /* Virtual methods that canvas items may implement. */ gboolean (* get_transform) (GooCanvasItem *item, cairo_matrix_t *transform); void (* set_transform) (GooCanvasItem *item, const cairo_matrix_t *transform); GooCanvasStyle* (* get_style) (GooCanvasItem *item); void (* set_style) (GooCanvasItem *item, GooCanvasStyle *style); gboolean (* is_visible) (GooCanvasItem *item); gdouble (* get_requested_height) (GooCanvasItem *item, cairo_t *cr, gdouble width); /* Virtual methods that model/view items must implement. */ GooCanvasItemModel* (* get_model) (GooCanvasItem *item); void (* set_model) (GooCanvasItem *item, GooCanvasItemModel *model); /* Signals. */ gboolean (* enter_notify_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventCrossing *event); gboolean (* leave_notify_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventCrossing *event); gboolean (* motion_notify_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventMotion *event); gboolean (* button_press_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventButton *event); gboolean (* button_release_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventButton *event); gboolean (* focus_in_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventFocus *event); gboolean (* focus_out_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventFocus *event); gboolean (* key_press_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventKey *event); gboolean (* key_release_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventKey *event); gboolean (* grab_broken_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventGrabBroken *event); void (* child_notify) (GooCanvasItem *item, GParamSpec *pspec); gboolean (* query_tooltip) (GooCanvasItem *item, gdouble x, gdouble y, gboolean keyboard_tooltip, GtkTooltip *tooltip); gboolean (* get_is_static) (GooCanvasItem *item); void (* set_is_static) (GooCanvasItem *item, gboolean is_static); void (* animation_finished) (GooCanvasItem *item, gboolean stopped); gboolean (* scroll_event) (GooCanvasItem *item, GooCanvasItem *target, GdkEventScroll *event); gboolean (* get_requested_area_for_width)(GooCanvasItem *item, cairo_t *cr, gdouble width, GooCanvasBounds *requested_area); };
GooCanvasItemIFace holds the virtual methods that make up the GooCanvasItem interface.
Simple canvas items only need to implement the get_parent()
, set_parent()
,
get_bounds()
, get_items_at()
, update()
and paint()
methods (and also
get_requested_area()
and allocate_area()
if they are going to be used
inside a layout container like GooCanvasTable).
Items that support transforms should also implement get_transform()
and
set_transform()
. Items that support styles should implement get_style()
and set_style()
.
Container items must implement get_canvas()
, set_canvas()
,
get_n_children()
, get_child()
and request_update()
. Containers that support
dynamic changes to their children should implement add_child()
,
move_child()
and remove_child()
. Layout containers like GooCanvasTable
may implement get_child_property()
, set_child_property()
and
get_transform_for_child()
.
returns the canvas the item is in. |
||
sets the canvas the item is in. |
||
returns the number of children of the item. |
||
returns the child at the given index. |
||
requests that an update is scheduled. |
||
adds a child. |
||
moves a child up or down the stacking order. |
||
removes a child. |
||
gets a child property of a given child item, e.g. the "row" or "column" property of an item in a GooCanvasTable. |
||
sets a child property for a given child item. |
||
gets the transform used to lay out a given child. |
||
gets the item's parent. |
||
sets the item's parent. |
||
gets the bounds of the item. |
||
gets all the items at the given point. |
||
updates the item, if needed. It recalculates the bounds of the item and requests redraws of parts of the canvas if necessary. |
||
renders the item to the given cairo context. |
||
returns the requested area of the item, in its parent's coordinate space. This is only used for items in layout containers such as GooCanvasTable. |
||
allocates the item's area, in its parent's coordinate space. The item must recalculate its bounds and request redraws of parts of the canvas if necessary. This is only used for items in layout containers such as GooCanvasTable. |
||
gets the item's transformation matrix. |
||
sets the item's transformation matrix. |
||
gets the item's style. |
||
sets the item's style. |
||
returns |
||
returns the requested height of the item,
given a particular allocated width, using the parent's coordinate space.
Note that this method should only be used if the position of the item
remains unchanged. If the position might change use
|
||
gets the model that the canvas item is viewing. |
||
sets the model that the canvas item will view. |
||
signal emitted when the mouse enters the item. |
||
signal emitted when the mouse leaves the item. |
||
signal emitted when the mouse moves within the item. |
||
signal emitted when a mouse button is pressed within the item. |
||
signal emitted when a mouse button is released. |
||
signal emitted when the item receices the keyboard focus. |
||
signal emitted when the item loses the keyboard focus. |
||
signal emitted when a key is pressed. |
||
signal emitted when a key is released. |
||
signal emitted when a grab that the item has is lost. |
||
signal emitted when a child property is changed. |
||
signal emitted to query the tooltip of an item. |
||
returns |
||
notifies the item whether it is static or not. |
||
signal emitted when the item's animation has finished. |
||
signal emitted when the mouse wheel is activated within the item. |
||
returns the requested bounds of the item, given a particular allocated width, using the parent's coordinate space. |
“can-focus”
property “can-focus” gboolean
If the item can take the keyboard focus.
Flags: Read / Write
Default value: FALSE
“description”
property “description” gchar *
A description of the item for use by assistive technologies.
Flags: Read / Write
Default value: NULL
“pointer-events”
property“pointer-events” GooCanvasPointerEvents
Specifies when the item receives pointer events.
Flags: Read / Write
Default value: GOO_CANVAS_EVENTS_VISIBLE_MASK | GOO_CANVAS_EVENTS_PAINTED_MASK | GOO_CANVAS_EVENTS_FILL_MASK | GOO_CANVAS_EVENTS_STROKE_MASK
“title”
property “title” gchar *
A short context-rich description of the item for use by assistive technologies.
Flags: Read / Write
Default value: NULL
“tooltip”
property “tooltip” gchar *
The tooltip to display for the item, or NULL
to display no tooltip.
Note that this property has no effect unless the
“has-tooltip” property is set to TRUE
on the GooCanvas
containing this item.
Flags: Read / Write
Default value: NULL
“transform”
property“transform” GooCairoMatrix *
The transformation matrix of the item.
Flags: Read / Write
“visibility”
property“visibility” GooCanvasItemVisibility
When the canvas item is visible.
Flags: Read / Write
Default value: GOO_CANVAS_ITEM_VISIBLE
“animation-finished”
signalvoid user_function (GooCanvasItem *item, gboolean stopped, gpointer user_data)
Emitted when the item animation has finished.
item |
the item that received the signal. |
|
stopped |
if the animation was explicitly stopped. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“button-press-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when a mouse button is pressed in an item.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. The x & y fields contain the mouse position in the item's coordinate space. The x_root & y_root fields contain the same coordinates converted to the canvas coordinate space. |
[type Gdk.EventButton] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“button-release-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when a mouse button is released in an item.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. The x & y fields contain the mouse position in the item's coordinate space. The x_root & y_root fields contain the same coordinates converted to the canvas coordinate space. |
[type Gdk.EventButton] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“child-notify”
signalvoid user_function (GooCanvasItem *item, GParamSpec *pspec, gpointer user_data)
Emitted for each child property that has changed. The signal's detail holds the property name.
item |
the item that received the signal. |
|
pspec |
the GParamSpec of the changed child property. |
[type GObject.ParamSpec] |
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“enter-notify-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when the mouse enters an item.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. The x & y fields contain the mouse position in the item's coordinate space. The x_root & y_root fields contain the same coordinates converted to the canvas coordinate space. |
[type Gdk.EventCrossing] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“focus-in-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when the item receives the keyboard focus.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. |
[type Gdk.EventFocus] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“focus-out-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when the item loses the keyboard focus.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. |
[type Gdk.EventFocus] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“grab-broken-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when the item's keyboard or pointer grab was lost unexpectedly.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. |
[type Gdk.EventGrabBroken] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“key-press-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when a key is pressed and the item has the keyboard focus.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. |
[type Gdk.EventKey] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“key-release-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when a key is released and the item has the keyboard focus.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. |
[type Gdk.EventKey] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“leave-notify-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when the mouse leaves an item.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. The x & y fields contain the mouse position in the item's coordinate space. The x_root & y_root fields contain the same coordinates converted to the canvas coordinate space. |
[type Gdk.EventCrossing] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“motion-notify-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when the mouse moves within an item.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. The x & y fields contain the mouse position in the item's coordinate space. The x_root & y_root fields contain the same coordinates converted to the canvas coordinate space. |
[type Gdk.EventMotion] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“query-tooltip”
signalgboolean user_function (GooCanvasItem *item, gdouble x, gdouble y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data)
Emitted when the mouse has paused over the item for a certain amount of time, or the tooltip was requested via the keyboard.
Note that if keyboard_mode
is TRUE
, the values of x
and y
are
undefined and should not be used.
If the item wants to display a tooltip it should update tooltip
and return TRUE
.
item |
the item which received the signal. |
|
x |
the x coordinate of the mouse. |
|
y |
the y coordinate of the mouse. |
|
keyboard_mode |
|
|
tooltip |
a GtkTooltip. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“scroll-event”
signalgboolean user_function (GooCanvasItem *item, GooCanvasItem *target_item, GdkEvent *event, gpointer user_data)
Emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned in an item.
item |
the item that received the signal. |
|
target_item |
the target of the event. |
|
event |
the event data. The x & y fields contain the mouse position in the item's coordinate space. The x_root & y_root fields contain the same coordinates converted to the canvas coordinate space. |
[type Gdk.EventScroll] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last