Bump gEDA version
[geda-gaf.git] / gschem / src / x_basic.c
blobf83de4e7b9e9785dad70762aa0cf7f70a8373c9b
1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2020 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <config.h>
22 #include <stdio.h>
23 #include <math.h>
25 #include "gschem.h"
27 /*! \todo Finish function documentation!!!
28 * \brief
29 * \par Function Description
32 void x_basic_warp_cursor (GtkWidget* widget, gint x, gint y)
34 GdkScreen *screen;
35 GdkDisplay *display;
36 int window_x, window_y;
38 gdk_window_get_origin (widget->window, &window_x, &window_y);
40 screen = gtk_widget_get_screen (widget);
41 display = gdk_screen_get_display (screen);
43 gdk_display_warp_pointer (display, screen, window_x + x, window_y + y);