summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-01-19 14:37:56 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-01-19 14:37:56 +0000
commit56e0ee04fce77dc84560bc360c554418204e9471 (patch)
tree183054d678002a2cdbc4b805cd995b6fc6fca59b /gdk
parentfad37a600ea169d839d050a3655cac7a6ce3c5cb (diff)
downloadgtk+-56e0ee04fce77dc84560bc360c554418204e9471.tar.gz
Add a function to obtain the last user interaction time. (#163119, Elijah
2005-01-19 Matthias Clasen <mclasen@redhat.com> * gdk/gdk.symbols: * gdk/x11/gdkx.h: * gdk/x11/gdkdisplay-x11.c (gdk_x11_display_get_user_time): Add a function to obtain the last user interaction time. (#163119, Elijah Newren)
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdk.symbols1
-rw-r--r--gdk/x11/gdkdisplay-x11.c19
-rw-r--r--gdk/x11/gdkx.h1
3 files changed, 21 insertions, 0 deletions
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index c3e7a04079..e4f5cf3de8 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -605,6 +605,7 @@ gdk_x11_colormap_get_xcolormap
gdk_x11_colormap_get_xdisplay
gdk_x11_cursor_get_xcursor
gdk_x11_cursor_get_xdisplay
+gdk_x11_display_get_user_time
gdk_x11_display_get_xdisplay
gdk_x11_display_grab
gdk_x11_display_ungrab
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 4f29331ec0..ba0883ce27 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1162,3 +1162,22 @@ gdk_display_store_clipboard (GdkDisplay *display,
gdk_error_trap_pop ();
}
+
+/**
+ * gdk_x11_display_get_user_time:
+ * @display: a #GdkDisplay
+ *
+ * Returns the timestamp of the last user interaction on
+ * @display. The timestamp is taken from events caused
+ * by user interaction such as key presses or pointer
+ * movements. See gdk_x11_window_set_user_time().
+ *
+ * Returns: the timestamp of the last user interaction
+ *
+ * Since: 2.8
+ */
+guint32
+gdk_x11_display_get_user_time (GdkDisplay *display)
+{
+ return GDK_DISPLAY_X11 (display)->user_time;
+}
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index 51646f4f96..2e933b7069 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -139,6 +139,7 @@ GdkColormap *gdk_x11_colormap_foreign_new (GdkVisual *visual,
gpointer gdk_xid_table_lookup_for_display (GdkDisplay *display,
XID xid);
guint32 gdk_x11_get_server_time (GdkWindow *window);
+guint32 gdk_x11_display_get_user_time (GdkDisplay *display);
/* returns TRUE if we support the given WM spec feature */
gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,