summaryrefslogtreecommitdiff
path: root/gdk/x11/gdktestutils-x11.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-12-16 01:21:49 -0500
committerMatthias Clasen <mclasen@redhat.com>2010-12-21 12:07:02 -0500
commitafa0ebf36bda82182d8b2c9a28fd777927d93374 (patch)
tree8faa94aac07c88131ad97e4dd824bef86fbe49e0 /gdk/x11/gdktestutils-x11.c
parent28abd0c75f8ce806c11e0873bf514137f008c3c6 (diff)
downloadgtk+-afa0ebf36bda82182d8b2c9a28fd777927d93374.tar.gz
Add vfuncs for gdk_test apis
Diffstat (limited to 'gdk/x11/gdktestutils-x11.c')
-rw-r--r--gdk/x11/gdktestutils-x11.c95
1 files changed, 13 insertions, 82 deletions
diff --git a/gdk/x11/gdktestutils-x11.c b/gdk/x11/gdktestutils-x11.c
index 0068bbea60..7b5916f7ec 100644
--- a/gdk/x11/gdktestutils-x11.c
+++ b/gdk/x11/gdktestutils-x11.c
@@ -27,19 +27,8 @@
#include <X11/Xlib.h>
-/**
- * gdk_test_render_sync:
- * @window: a mapped #GdkWindow
- *
- * This function retrieves a pixel from @window to force the windowing
- * system to carry out any pending rendering commands.
- * This function is intended to be used to syncronize with rendering
- * pipelines, to benchmark windowing system rendering operations.
- *
- * Since: 2.14
- **/
void
-gdk_test_render_sync (GdkWindow *window)
+_gdk_x11_window_sync_rendering (GdkWindow *window)
{
Display *display = GDK_WINDOW_XDISPLAY (window);
XImage *ximage;
@@ -53,44 +42,13 @@ gdk_test_render_sync (GdkWindow *window)
XDestroyImage (ximage);
}
-/**
- * gdk_test_simulate_key
- * @window: a #GdkWindow to simulate a key event for.
- * @x: x coordinate within @window for the key event.
- * @y: y coordinate within @window for the key event.
- * @keyval: A GDK keyboard value.
- * @modifiers: Keyboard modifiers the event is setup with.
- * @key_pressrelease: either %GDK_KEY_PRESS or %GDK_KEY_RELEASE
- *
- * This function is intended to be used in GTK+ test programs.
- * If (@x,@y) are > (-1,-1), it will warp the mouse pointer to
- * the given (@x,@y) corrdinates within @window and simulate a
- * key press or release event.
- *
- * When the mouse pointer is warped to the target location, use
- * of this function outside of test programs that run in their
- * own virtual windowing system (e.g. Xvfb) is not recommended.
- * If (@x,@y) are passed as (-1,-1), the mouse pointer will not
- * be warped and @window origin will be used as mouse pointer
- * location for the event.
- *
- * Also, gtk_test_simulate_key() is a fairly low level function,
- * for most testing purposes, gtk_test_widget_send_key() is the
- * right function to call which will generate a key press event
- * followed by its accompanying key release event.
- *
- * Returns: whether all actions neccessary for a key event simulation
- * were carried out successfully.
- *
- * Since: 2.14
- **/
gboolean
-gdk_test_simulate_key (GdkWindow *window,
- gint x,
- gint y,
- guint keyval,
- GdkModifierType modifiers,
- GdkEventType key_pressrelease)
+_gdk_x11_window_simulate_key (GdkWindow *window,
+ gint x,
+ gint y,
+ guint keyval,
+ GdkModifierType modifiers,
+ GdkEventType key_pressrelease)
{
GdkScreen *screen;
GdkKeymapKey *keys = NULL;
@@ -162,40 +120,13 @@ gdk_test_simulate_key (GdkWindow *window,
return success;
}
-/**
- * gdk_test_simulate_button
- * @window: a #GdkWindow to simulate a button event for.
- * @x: x coordinate within @window for the button event.
- * @y: y coordinate within @window for the button event.
- * @button: Number of the pointer button for the event, usually 1, 2 or 3.
- * @modifiers: Keyboard modifiers the event is setup with.
- * @button_pressrelease: either %GDK_BUTTON_PRESS or %GDK_BUTTON_RELEASE
- *
- * This function is intended to be used in GTK+ test programs.
- * It will warp the mouse pointer to the given (@x,@y) corrdinates
- * within @window and simulate a button press or release event.
- * Because the mouse pointer needs to be warped to the target
- * location, use of this function outside of test programs that
- * run in their own virtual windowing system (e.g. Xvfb) is not
- * recommended.
- *
- * Also, gtk_test_simulate_button() is a fairly low level function,
- * for most testing purposes, gtk_test_widget_click() is the right
- * function to call which will generate a button press event followed
- * by its accompanying button release event.
- *
- * Returns: whether all actions neccessary for a button event simulation
- * were carried out successfully.
- *
- * Since: 2.14
- **/
gboolean
-gdk_test_simulate_button (GdkWindow *window,
- gint x,
- gint y,
- guint button, /*1..3*/
- GdkModifierType modifiers,
- GdkEventType button_pressrelease)
+_gdk_x11_window_simulate_button (GdkWindow *window,
+ gint x,
+ gint y,
+ guint button, /*1..3*/
+ GdkModifierType modifiers,
+ GdkEventType button_pressrelease)
{
GdkScreen *screen;
XButtonEvent xev = {