Point package:gtk
Represents the x and y coordinate of a point.
Grabs the pointer (usually a mouse) so that all events are passed to
this application until the pointer is ungrabbed with
pointerUngrab, or the grab window becomes unviewable. This
overrides any previous pointer grab by this client.
Pointer grabs are used for operations which need complete control over
mouse events, even if the mouse leaves the application. For example in
GTK+ it is used for Drag and Drop, for dragging the handle in the
GtkHPaned and GtkVPaned widgets, and for resizing columns in GtkCList
widgets.
Note that if the event mask of an X window has selected both button
press and button release events, then a button press event will cause
an automatic pointer grab until the button is released. X does this
automatically since most applications expect to receive button press
and release events in pairs. It is equivalent to a pointer grab on the
window with
owner_events set to
True.
If you set up anything at the time you take the grab that needs to be
cleaned up when the grab ends, you should handle the
GdkEventGrabBroken events that are emitted when the grab ends
unvoluntarily.
Returns True if the pointer on the default display is
currently grabbed by this application.
Note that this does not take the inmplicit pointer grab on button
presses into account.
Ungrabs the pointer on the default display, if it is grabbed by this
application.
Checks if a point it is within a region.
Obtains the location of the mouse pointer in widget coordinates.
Widget coordinates are a bit odd; for historical reasons, they are
defined as
widgetGetParentWindow coordinates for widgets that
are not
NoWindow widgets, and are relative to the widget's
allocation's (x,y) for widgets that are
NoWindow widgets.
Gets the current location of the pointer and the current modifier mask
for a given display.
Obtains the window underneath the mouse pointer, returning the
location of the pointer in that window in winX, winY
for screen. Returns Nothing if the window under the
mouse pointer is not known to GDK (for example, belongs to another
application).
Test if the pointer is grabbed.
Release any pointer grab.
Moves the pointer of
display to the point
x,
y on the screen
screen, unless the
pointer is confined to a window by a grab, in which case it will be
moved as far as allowed by the grab. Warping the pointer creates
events as if the user had moved the mouse instantaneously to the
destination.
Note that the pointer should normally be under the control of the
user. This function was added to cover some rare use cases like
keyboard navigation support for the color picker in the
ColorSelectionDialog.
- Available since Gdk version 2.8
Obtains the current pointer position and modifier state.
- The position is given in coordinates relative to the given
window.
- The return value is (Just win, x, y, mod) where
win is the window over which the mouse currently resides and
mod denotes the keyboard modifiers currently being
depressed.
- The return value is Nothing for the window if the mouse
cursor is not over a known window.
Draw several points into a
Drawable.
- This function is more efficient than calling drawPoint on
several points.
Returns the monitor number in which the point (x,y)
is located.
Fetches the set of attach points for an icon. An attach point is a
location in the icon that can be used as anchor points for attaching
emblems or overlays to the icon.
Font size in points.
Allowed values: >= 0
Default value: 0
Scroll to a coordinate.
- Scrolls the tree view such that the top-left corner of the visible
area is treeX, treeY, where treeX and
treeY are specified in tree window coordinates. The
TreeView must be realized before this function is called. If it
isn't, you probably want to use treeViewScrollToCell.
Font size in points.
Allowed values: >= 0
Default value: 0