* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
gdk_device_list_slave_devices (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
- g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER, NULL);
+ g_return_val_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER, NULL);
return g_list_copy (device->slaves);
}
g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_GRAB_SUCCESS);
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_GRAB_SUCCESS);
- if (_gdk_native_windows)
- native = window;
- else
- native = gdk_window_get_toplevel (window);
+ native = gdk_window_get_toplevel (window);
while (native->window_type == GDK_WINDOW_OFFSCREEN)
{
return pos;
}
+void
+_gdk_device_get_axis_info (GdkDevice *device,
+ guint index_,
+ GdkAtom *label_atom,
+ GdkAxisUse *use,
+ gdouble *min_value,
+ gdouble *max_value,
+ gdouble *resolution)
+{
+ GdkAxisInfo *info;
+
+ g_return_if_fail (GDK_IS_DEVICE (device));
+ g_return_if_fail (index_ < device->axes->len);
+
+ info = &g_array_index (device->axes, GdkAxisInfo, index_);
+
+ *label_atom = info->label;
+ *use = info->use;
+ *min_value = info->min_value;
+ *max_value = info->max_value;
+ *resolution = info->resolution;
+}
+
void
_gdk_device_set_keys (GdkDevice *device,
guint num_keys)
return NULL;
}
-GdkAxisUse
-_gdk_device_get_axis_use (GdkDevice *device,
- guint index_)
-{
- GdkAxisInfo info;
-
- info = g_array_index (device->axes, GdkAxisInfo, index_);
- return info.use;
-}
-
gboolean
_gdk_device_translate_window_coord (GdkDevice *device,
GdkWindow *window,
return TRUE;
}
-gboolean
+void
_gdk_device_query_state (GdkDevice *device,
GdkWindow *window,
GdkWindow **root_window,
gint *win_y,
GdkModifierType *mask)
{
- return GDK_DEVICE_GET_CLASS (device)->query_state (device,
- window,
- root_window,
- child_window,
- root_x,
- root_y,
- win_x,
- win_y,
- mask);
+ GDK_DEVICE_GET_CLASS (device)->query_state (device,
+ window,
+ root_window,
+ child_window,
+ root_x,
+ root_y,
+ win_x,
+ win_y,
+ mask);
}
GdkWindow *