"GdkEvent ",
"GdkEventKey ",
"GtkTextView ",
- "GdkEventVisibility ",
"GdkBitmap ",
"GtkTextChildAnchor ",
"GArray ",
GdkEventScroll
GdkEventMotion
GdkEventExpose
-GdkEventVisibility
GdkEventCrossing
GdkEventFocus
GdkEventConfigure
<SUBSECTION>
GdkScrollDirection
-GdkVisibilityState
GdkCrossingMode
GdkNotifyType
GdkPropertyState
case GDK_PAD_GROUP_MODE:
return event->pad_group_mode.time;
case GDK_CLIENT_EVENT:
- case GDK_VISIBILITY_NOTIFY:
case GDK_CONFIGURE:
case GDK_FOCUS_CHANGE:
case GDK_NOTHING:
*state = event->crossing.state;
return TRUE;
case GDK_PROPERTY_NOTIFY:
- case GDK_VISIBILITY_NOTIFY:
case GDK_CLIENT_EVENT:
case GDK_CONFIGURE:
case GDK_FOCUS_CHANGE:
typedef struct _GdkEventAny GdkEventAny;
typedef struct _GdkEventExpose GdkEventExpose;
-typedef struct _GdkEventVisibility GdkEventVisibility;
typedef struct _GdkEventMotion GdkEventMotion;
typedef struct _GdkEventButton GdkEventButton;
typedef struct _GdkEventTouch GdkEventTouch;
* @GDK_DROP_START: a drop operation onto the window has started.
* @GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
* @GDK_CLIENT_EVENT: a message has been received from another application.
- * @GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
* @GDK_SCROLL: the scroll wheel was turned
* @GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
* for the possible window states
GDK_DROP_START = 26,
GDK_DROP_FINISHED = 27,
GDK_CLIENT_EVENT = 28,
- GDK_VISIBILITY_NOTIFY = 29,
GDK_SCROLL = 31,
GDK_WINDOW_STATE = 32,
GDK_OWNER_CHANGE = 34,
GDK_EVENT_LAST /* helper variable for decls */
} GdkEventType;
-/**
- * GdkVisibilityState:
- * @GDK_VISIBILITY_UNOBSCURED: the window is completely visible.
- * @GDK_VISIBILITY_PARTIAL: the window is partially visible.
- * @GDK_VISIBILITY_FULLY_OBSCURED: the window is not visible at all.
- *
- * Specifies the visiblity status of a window for a #GdkEventVisibility.
- */
-typedef enum
-{
- GDK_VISIBILITY_UNOBSCURED,
- GDK_VISIBILITY_PARTIAL,
- GDK_VISIBILITY_FULLY_OBSCURED
-} GdkVisibilityState;
-
/**
* GdkTouchpadGesturePhase:
* @GDK_TOUCHPAD_GESTURE_PHASE_BEGIN: The gesture has begun.
gint count; /* If non-zero, how many more events follow. */
};
-/**
- * GdkEventVisibility:
- * @type: the type of the event (%GDK_VISIBILITY_NOTIFY).
- * @window: the window which received the event.
- * @send_event: %TRUE if the event was sent explicitly.
- * @state: the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED,
- * %GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
- *
- * Generated when the window visibility status has changed.
- *
- * Deprecated: 3.12: Modern composited windowing systems with pervasive
- * transparency make it impossible to track the visibility of a window
- * reliably, so this event can not be guaranteed to provide useful
- * information.
- */
-struct _GdkEventVisibility
-{
- GdkEventType type;
- GdkWindow *window;
- gint8 send_event;
- GdkVisibilityState state;
-};
-
/**
* GdkEventMotion:
* @type: the type of the event.
* @type: the #GdkEventType
* @any: a #GdkEventAny
* @expose: a #GdkEventExpose
- * @visibility: a #GdkEventVisibility
* @motion: a #GdkEventMotion
* @button: a #GdkEventButton
* @touch: a #GdkEventTouch
GdkEventType type;
GdkEventAny any;
GdkEventExpose expose;
- GdkEventVisibility visibility;
GdkEventMotion motion;
GdkEventButton button;
GdkEventTouch touch;
* @GDK_FOCUS_CHANGE_MASK: receive focus change events
* @GDK_STRUCTURE_MASK: receive events about window configuration change
* @GDK_PROPERTY_CHANGE_MASK: receive property change events
- * @GDK_VISIBILITY_NOTIFY_MASK: receive visibility change events
* @GDK_PROXIMITY_IN_MASK: receive proximity in events
* @GDK_PROXIMITY_OUT_MASK: receive proximity out events
* @GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
GDK_FOCUS_CHANGE_MASK = 1 << 14,
GDK_STRUCTURE_MASK = 1 << 15,
GDK_PROPERTY_CHANGE_MASK = 1 << 16,
- GDK_VISIBILITY_NOTIFY_MASK = 1 << 17,
GDK_PROXIMITY_IN_MASK = 1 << 18,
GDK_PROXIMITY_OUT_MASK = 1 << 19,
GDK_SUBSTRUCTURE_MASK = 1 << 20,
window->width = 1;
window->height = 1;
window->toplevel_window_type = -1;
- /* starts hidden */
- window->effective_visibility = GDK_VISIBILITY_NOT_VIEWABLE;
- window->visibility = GDK_VISIBILITY_FULLY_OBSCURED;
- /* Default to unobscured since some backends don't send visibility events */
- window->native_visibility = GDK_VISIBILITY_UNOBSCURED;
window->children_list_node.data = window;
window->device_cursor = g_hash_table_new_full (NULL, NULL,
}
}
-static GdkVisibilityState
-effective_visibility (GdkWindow *window)
-{
- GdkVisibilityState native;
-
- if (!gdk_window_is_viewable (window))
- return GDK_VISIBILITY_NOT_VIEWABLE;
-
- native = window->impl_window->native_visibility;
-
- if (native == GDK_VISIBILITY_FULLY_OBSCURED ||
- window->visibility == GDK_VISIBILITY_FULLY_OBSCURED)
- return GDK_VISIBILITY_FULLY_OBSCURED;
- else if (native == GDK_VISIBILITY_UNOBSCURED)
- return window->visibility;
- else /* native PARTIAL, private partial or unobscured */
- return GDK_VISIBILITY_PARTIAL;
-}
-
-static void
-gdk_window_update_visibility (GdkWindow *window)
-{
- GdkVisibilityState new_visibility;
- GdkEvent *event;
-
- new_visibility = effective_visibility (window);
-
- if (new_visibility != window->effective_visibility)
- {
- window->effective_visibility = new_visibility;
-
- if (new_visibility != GDK_VISIBILITY_NOT_VIEWABLE &&
- window->event_mask & GDK_VISIBILITY_NOTIFY_MASK)
- {
- event = _gdk_make_event (window, GDK_VISIBILITY_NOTIFY,
- NULL, FALSE);
- event->visibility.state = new_visibility;
- }
- }
-}
-
-static void
-gdk_window_update_visibility_recursively (GdkWindow *window,
- GdkWindow *only_for_impl)
-{
- GdkWindow *child;
- GList *l;
-
- gdk_window_update_visibility (window);
- for (l = window->children; l != NULL; l = l->next)
- {
- child = l->data;
- if ((only_for_impl == NULL) ||
- (only_for_impl == child->impl_window))
- gdk_window_update_visibility_recursively (child, only_for_impl);
- }
-}
-
static gboolean
should_apply_clip_as_shape (GdkWindow *window)
{
private->clip_region = new_clip;
}
- if (clip_region_changed)
- {
- GdkVisibilityState visibility;
- gboolean fully_visible;
-
- if (cairo_region_is_empty (private->clip_region))
- visibility = GDK_VISIBILITY_FULLY_OBSCURED;
- else
- {
- if (private->shape)
- {
- fully_visible = cairo_region_equal (private->clip_region,
- private->shape);
- }
- else
- {
- r.x = 0;
- r.y = 0;
- r.width = private->width;
- r.height = private->height;
- fully_visible = region_rect_equal (private->clip_region, &r);
- }
-
- if (fully_visible)
- visibility = GDK_VISIBILITY_UNOBSCURED;
- else
- visibility = GDK_VISIBILITY_PARTIAL;
- }
-
- if (private->visibility != visibility)
- {
- private->visibility = visibility;
- gdk_window_update_visibility (private);
- }
- }
-
/* Update all children, recursively (except for root, where children are not exact). */
if ((abs_pos_changed || clip_region_changed || recalculate_children) &&
private->window_type != GDK_WINDOW_ROOT)
emulate events on children: */
mask |=
GDK_EXPOSURE_MASK |
- GDK_VISIBILITY_NOTIFY_MASK |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
GDK_TOUCH_MASK |
GDK_POINTER_MOTION_MASK |
{
recompute_visible_regions (window, FALSE);
- /* If any decendants became visible we need to send visibility notify */
- gdk_window_update_visibility_recursively (window, NULL);
-
if (gdk_window_is_viewable (window))
gdk_window_invalidate_rect_full (window, NULL, TRUE);
}
gdk_window_clear_old_updated_area (window);
recompute_visible_regions (window, FALSE);
- /* all decendants became non-visible, we need to send visibility notify */
- gdk_window_update_visibility_recursively (window, NULL);
-
if (was_mapped && !gdk_window_has_impl (window))
{
if (window->event_mask & GDK_STRUCTURE_MASK)
case GDK_MAP:
case GDK_UNMAP:
case GDK_CLIENT_EVENT:
- case GDK_VISIBILITY_NOTIFY:
case GDK_DELETE:
case GDK_DESTROY:
case GDK_EXPOSE:
}
#endif
- if (event->type == GDK_VISIBILITY_NOTIFY)
- {
- event_window->native_visibility = event->visibility.state;
- gdk_window_update_visibility_recursively (event_window, event_window);
- goto out;
- }
-
if (event_window->window_type == GDK_WINDOW_ROOT)
goto out;
break;
}
#endif /* G_ENABLE_DEBUG */
-
- if (window == NULL)
- {
- return_val = FALSE;
- break;
- }
-
- event->visibility.type = GDK_VISIBILITY_NOTIFY;
- event->visibility.window = window;
-
- switch (xevent->xvisibility.state)
- {
- case VisibilityFullyObscured:
- event->visibility.state = GDK_VISIBILITY_FULLY_OBSCURED;
- break;
-
- case VisibilityPartiallyObscured:
- event->visibility.state = GDK_VISIBILITY_PARTIAL;
- break;
-
- default:
- case VisibilityUnobscured:
- event->visibility.state = GDK_VISIBILITY_UNOBSCURED;
- break;
- }
-
+ /* not handled */
+ return_val = FALSE;
break;
case CreateNotify:
guint vscroll_policy : 1;
/* Properties */
-
- GdkVisibilityState visibility;
-
GList *children;
gint scroll_x;
priv->scroll_x = 0;
priv->scroll_y = 0;
- priv->visibility = GDK_VISIBILITY_PARTIAL;
priv->freeze_count = 0;
}
case GDK_SELECTION_REQUEST:
case GDK_SELECTION_NOTIFY:
case GDK_CLIENT_EVENT:
- case GDK_VISIBILITY_NOTIFY:
case GDK_WINDOW_STATE:
case GDK_GRAB_BROKEN:
case GDK_DAMAGE:
window = gtk_widget_get_window (widget);
win->window = gdk_window_new_child (window,
- GDK_VISIBILITY_NOTIFY_MASK,
+ 0,
&win->allocation);
gtk_widget_register_window (win->widget, win->window);
width = drag_allocation.width;
height = drag_allocation.height;
tree_view->priv->drag_highlight_window = gdk_window_new_child (gtk_widget_get_window (widget),
- GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK,
+ GDK_POINTER_MOTION_MASK,
&(GdkRectangle){
tree_view->priv->drag_column_x,
0,
}
tree_view->priv->drag_highlight_window = gdk_window_new_popup (gtk_widget_get_display (widget),
- GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK,
+ GDK_POINTER_MOTION_MASK,
&(GdkRectangle) { x, y, width, height });
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
}
tree_view->priv->drag_highlight_window = gdk_window_new_popup (gtk_widget_get_display (widget),
- GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK,
+ GDK_POINTER_MOTION_MASK,
&(GdkRectangle) { x, y, width, height });
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
button_allocation.y = 0;
tree_view->priv->drag_window = gdk_window_new_child (gtk_widget_get_window (GTK_WIDGET (tree_view)),
- GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK,
+ GDK_POINTER_MOTION_MASK,
&button_allocation);
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_window);
/* Non input events get handled right away */
switch ((guint) event->type)
{
- case GDK_VISIBILITY_NOTIFY:
case GDK_EXPOSE:
case GDK_NOTHING:
case GDK_DELETE:
case GDK_PAD_RING:
case GDK_PAD_STRIP:
case GDK_PAD_GROUP_MODE:
- case GDK_VISIBILITY_NOTIFY:
case GDK_EXPOSE:
case GDK_NOTHING:
signal_num = -1;