2007-12-04 15:40:31 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2011-06-23 22:30:58 +08:00
|
|
|
* gimpinputdevicestore-gudev.c
|
|
|
|
* Input device store based on GUdev, the hardware abstraction layer.
|
2007-12-04 15:40:31 +08:00
|
|
|
* Copyright (C) 2007 Sven Neumann <sven@gimp.org>
|
2011-06-23 22:30:58 +08:00
|
|
|
* 2011 Michael Natterer <mitch@gimp.org>
|
2007-12-04 15:40:31 +08:00
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2007-12-04 15:40:31 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2007-12-04 15:40:31 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2007-12-04 15:40:31 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2007-12-06 04:17:24 +08:00
|
|
|
#include "gimpinputdevicestore.h"
|
|
|
|
|
2008-11-12 19:19:31 +08:00
|
|
|
#include "libgimpmodule/gimpmodule.h"
|
|
|
|
|
2007-12-06 04:17:24 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
#ifdef HAVE_LIBGUDEV
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
#include <gudev/gudev.h>
|
2007-12-04 15:40:31 +08:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
COLUMN_IDENTIFIER,
|
2007-12-04 15:40:31 +08:00
|
|
|
COLUMN_LABEL,
|
2011-06-23 22:30:58 +08:00
|
|
|
COLUMN_DEVICE_FILE,
|
2007-12-04 15:40:31 +08:00
|
|
|
NUM_COLUMNS
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
|
|
|
PROP_CONSTRUCT_ERROR
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
DEVICE_ADDED,
|
|
|
|
DEVICE_REMOVED,
|
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _GimpInputDeviceStoreClass GimpInputDeviceStoreClass;
|
|
|
|
|
|
|
|
struct _GimpInputDeviceStore
|
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
GtkListStore parent_instance;
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
GUdevClient *client;
|
|
|
|
GError *error;
|
2007-12-04 15:40:31 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct _GimpInputDeviceStoreClass
|
|
|
|
{
|
|
|
|
GtkListStoreClass parent_class;
|
|
|
|
|
2008-01-11 20:45:00 +08:00
|
|
|
void (* device_added) (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
const gchar *identifier);
|
2008-01-11 20:45:00 +08:00
|
|
|
void (* device_removed) (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
const gchar *identifier);
|
2007-12-04 15:40:31 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static void gimp_input_device_store_finalize (GObject *object);
|
2008-01-11 20:45:00 +08:00
|
|
|
|
2007-12-04 15:40:31 +08:00
|
|
|
static gboolean gimp_input_device_store_add (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
GUdevDevice *device);
|
2007-12-04 15:40:31 +08:00
|
|
|
static gboolean gimp_input_device_store_remove (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
GUdevDevice *device);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
static void gimp_input_device_store_uevent (GUdevClient *client,
|
|
|
|
const gchar *action,
|
|
|
|
GUdevDevice *device,
|
|
|
|
GimpInputDeviceStore *store);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
|
|
|
|
2008-01-11 20:45:00 +08:00
|
|
|
G_DEFINE_DYNAMIC_TYPE (GimpInputDeviceStore, gimp_input_device_store,
|
|
|
|
GTK_TYPE_LIST_STORE)
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2008-01-11 20:45:00 +08:00
|
|
|
static guint store_signals[LAST_SIGNAL] = { 0 };
|
2007-12-04 15:40:31 +08:00
|
|
|
|
|
|
|
|
2008-01-11 20:45:00 +08:00
|
|
|
void
|
|
|
|
gimp_input_device_store_register_types (GTypeModule *module)
|
|
|
|
{
|
|
|
|
gimp_input_device_store_register_type (module);
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_input_device_store_class_init (GimpInputDeviceStoreClass *klass)
|
|
|
|
{
|
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
|
|
|
|
|
|
store_signals[DEVICE_ADDED] =
|
|
|
|
g_signal_new ("device-added",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_FIRST,
|
|
|
|
G_STRUCT_OFFSET (GimpInputDeviceStoreClass, device_added),
|
|
|
|
NULL, NULL,
|
|
|
|
g_cclosure_marshal_VOID__STRING,
|
|
|
|
G_TYPE_NONE, 1, G_TYPE_STRING);
|
|
|
|
|
|
|
|
store_signals[DEVICE_REMOVED] =
|
|
|
|
g_signal_new ("device-removed",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_FIRST,
|
|
|
|
G_STRUCT_OFFSET (GimpInputDeviceStoreClass, device_removed),
|
|
|
|
NULL, NULL,
|
|
|
|
g_cclosure_marshal_VOID__STRING,
|
|
|
|
G_TYPE_NONE, 1, G_TYPE_STRING);
|
|
|
|
|
|
|
|
object_class->finalize = gimp_input_device_store_finalize;
|
|
|
|
|
|
|
|
klass->device_added = NULL;
|
|
|
|
klass->device_removed = NULL;
|
|
|
|
}
|
|
|
|
|
2008-01-11 20:45:00 +08:00
|
|
|
static void
|
|
|
|
gimp_input_device_store_class_finalize (GimpInputDeviceStoreClass *klass)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2007-12-04 15:40:31 +08:00
|
|
|
static void
|
|
|
|
gimp_input_device_store_init (GimpInputDeviceStore *store)
|
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
GType types[] = { G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING };
|
|
|
|
const gchar *subsystems[] = { "input", NULL };
|
|
|
|
GList *devices;
|
|
|
|
GList *list;
|
2007-12-04 15:40:31 +08:00
|
|
|
|
|
|
|
gtk_list_store_set_column_types (GTK_LIST_STORE (store),
|
|
|
|
G_N_ELEMENTS (types), types);
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
store->client = g_udev_client_new (subsystems);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
devices = g_udev_client_query_by_subsystem (store->client, "input");
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
for (list = devices; list; list = g_list_next (list))
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
GUdevDevice *device = list->data;
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
gimp_input_device_store_add (store, device);
|
|
|
|
g_object_unref (device);
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
g_list_free (devices);
|
|
|
|
|
|
|
|
g_signal_connect (store->client, "uevent",
|
|
|
|
G_CALLBACK (gimp_input_device_store_uevent),
|
|
|
|
store);
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gimp_input_device_store_finalize (GObject *object)
|
|
|
|
{
|
|
|
|
GimpInputDeviceStore *store = GIMP_INPUT_DEVICE_STORE (object);
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
if (store->client)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
g_object_unref (store->client);
|
|
|
|
store->client = NULL;
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (store->error)
|
|
|
|
{
|
|
|
|
g_error_free (store->error);
|
|
|
|
store->error = NULL;
|
|
|
|
}
|
|
|
|
|
2008-01-11 20:45:00 +08:00
|
|
|
G_OBJECT_CLASS (gimp_input_device_store_parent_class)->finalize (object);
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gimp_input_device_store_lookup (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
const gchar *identifier,
|
2007-12-04 15:40:31 +08:00
|
|
|
GtkTreeIter *iter)
|
|
|
|
{
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL (store);
|
2016-03-26 22:59:26 +08:00
|
|
|
GValue value = G_VALUE_INIT;
|
2007-12-04 15:40:31 +08:00
|
|
|
gboolean iter_valid;
|
|
|
|
|
|
|
|
for (iter_valid = gtk_tree_model_get_iter_first (model, iter);
|
|
|
|
iter_valid;
|
|
|
|
iter_valid = gtk_tree_model_iter_next (model, iter))
|
|
|
|
{
|
|
|
|
const gchar *str;
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
gtk_tree_model_get_value (model, iter, COLUMN_IDENTIFIER, &value);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
|
|
|
str = g_value_get_string (&value);
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
if (strcmp (str, identifier) == 0)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
|
|
|
g_value_unset (&value);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_value_unset (&value);
|
|
|
|
}
|
|
|
|
|
|
|
|
return iter_valid;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* insert in alphabetic order */
|
|
|
|
static void
|
|
|
|
gimp_input_device_store_insert (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
const gchar *identifier,
|
|
|
|
const gchar *label,
|
|
|
|
const gchar *device_file)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL (store);
|
|
|
|
GtkTreeIter iter;
|
2016-03-26 22:59:26 +08:00
|
|
|
GValue value = G_VALUE_INIT;
|
2007-12-04 15:40:31 +08:00
|
|
|
gint pos = 0;
|
|
|
|
gboolean iter_valid;
|
|
|
|
|
|
|
|
for (iter_valid = gtk_tree_model_get_iter_first (model, &iter);
|
|
|
|
iter_valid;
|
|
|
|
iter_valid = gtk_tree_model_iter_next (model, &iter), pos++)
|
|
|
|
{
|
|
|
|
const gchar *str;
|
|
|
|
|
|
|
|
gtk_tree_model_get_value (model, &iter, COLUMN_LABEL, &value);
|
|
|
|
|
|
|
|
str = g_value_get_string (&value);
|
|
|
|
|
|
|
|
if (g_utf8_collate (label, str) < 0)
|
|
|
|
{
|
|
|
|
g_value_unset (&value);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_value_unset (&value);
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_list_store_insert_with_values (GTK_LIST_STORE (store), &iter, pos,
|
2011-06-23 22:30:58 +08:00
|
|
|
COLUMN_IDENTIFIER, identifier,
|
|
|
|
COLUMN_LABEL, label,
|
|
|
|
COLUMN_DEVICE_FILE, device_file,
|
2007-12-04 15:40:31 +08:00
|
|
|
-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gimp_input_device_store_add (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
GUdevDevice *device)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
const gchar *device_file = g_udev_device_get_device_file (device);
|
|
|
|
#if 0
|
|
|
|
const gchar *path = g_udev_device_get_sysfs_path (device);
|
|
|
|
#endif
|
|
|
|
const gchar *name = g_udev_device_get_sysfs_attr (device, "name");
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
g_printerr ("\ndevice added: %s, %s, %s\n",
|
|
|
|
name ? name : "NULL",
|
|
|
|
device_file ? device_file : "NULL",
|
|
|
|
path);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (device_file)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
if (name)
|
|
|
|
{
|
|
|
|
GtkTreeIter unused;
|
|
|
|
|
|
|
|
if (! gimp_input_device_store_lookup (store, name, &unused))
|
|
|
|
{
|
|
|
|
gimp_input_device_store_insert (store, name, name, device_file);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
g_signal_emit (store, store_signals[DEVICE_ADDED], 0,
|
|
|
|
name);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
GUdevDevice *parent = g_udev_device_get_parent (device);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-27 05:39:05 +08:00
|
|
|
if (parent)
|
2011-06-23 22:30:58 +08:00
|
|
|
{
|
2011-06-27 05:39:05 +08:00
|
|
|
const gchar *parent_name;
|
|
|
|
|
|
|
|
parent_name = g_udev_device_get_sysfs_attr (parent, "name");
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-27 05:39:05 +08:00
|
|
|
if (parent_name)
|
2011-06-23 22:30:58 +08:00
|
|
|
{
|
2011-06-27 05:39:05 +08:00
|
|
|
GtkTreeIter unused;
|
|
|
|
|
|
|
|
if (! gimp_input_device_store_lookup (store, parent_name,
|
|
|
|
&unused))
|
|
|
|
{
|
|
|
|
gimp_input_device_store_insert (store,
|
|
|
|
parent_name, parent_name,
|
|
|
|
device_file);
|
2011-06-23 22:30:58 +08:00
|
|
|
|
2011-06-27 05:39:05 +08:00
|
|
|
g_signal_emit (store, store_signals[DEVICE_ADDED], 0,
|
|
|
|
parent_name);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-27 05:39:05 +08:00
|
|
|
g_object_unref (parent);
|
|
|
|
return TRUE;
|
|
|
|
}
|
2011-06-23 22:30:58 +08:00
|
|
|
}
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-27 05:39:05 +08:00
|
|
|
g_object_unref (parent);
|
|
|
|
}
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
return FALSE;
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gimp_input_device_store_remove (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
GUdevDevice *device)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
const gchar *name = g_udev_device_get_sysfs_attr (device, "name");
|
2007-12-04 15:40:31 +08:00
|
|
|
GtkTreeIter iter;
|
|
|
|
|
2011-09-27 04:35:45 +08:00
|
|
|
if (name)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-09-27 04:35:45 +08:00
|
|
|
if (gimp_input_device_store_lookup (store, name, &iter))
|
|
|
|
{
|
|
|
|
gtk_list_store_remove (GTK_LIST_STORE (store), &iter);
|
2011-06-23 22:30:58 +08:00
|
|
|
|
2011-09-27 04:35:45 +08:00
|
|
|
g_signal_emit (store, store_signals[DEVICE_REMOVED], 0, name);
|
2011-06-23 22:30:58 +08:00
|
|
|
|
2011-09-27 04:35:45 +08:00
|
|
|
return TRUE;
|
|
|
|
}
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-06-23 22:30:58 +08:00
|
|
|
gimp_input_device_store_uevent (GUdevClient *client,
|
|
|
|
const gchar *action,
|
|
|
|
GUdevDevice *device,
|
|
|
|
GimpInputDeviceStore *store)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
if (! strcmp (action, "add"))
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
gimp_input_device_store_add (store, device);
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
2011-06-23 22:30:58 +08:00
|
|
|
else if (! strcmp (action, "remove"))
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
gimp_input_device_store_remove (store, device);
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GimpInputDeviceStore *
|
|
|
|
gimp_input_device_store_new (void)
|
|
|
|
{
|
|
|
|
return g_object_new (GIMP_TYPE_INPUT_DEVICE_STORE, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
gchar *
|
|
|
|
gimp_input_device_store_get_device_file (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
const gchar *identifier)
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
g_return_val_if_fail (GIMP_IS_INPUT_DEVICE_STORE (store), NULL);
|
2011-06-23 22:30:58 +08:00
|
|
|
g_return_val_if_fail (identifier != NULL, NULL);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
if (! store->client)
|
2007-12-04 15:40:31 +08:00
|
|
|
return NULL;
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
if (gimp_input_device_store_lookup (store, identifier, &iter))
|
2007-12-04 15:40:31 +08:00
|
|
|
{
|
2011-06-23 22:30:58 +08:00
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL (store);
|
|
|
|
gchar *device_file;
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
gtk_tree_model_get (model, &iter,
|
|
|
|
COLUMN_DEVICE_FILE, &device_file,
|
|
|
|
-1);
|
2007-12-04 15:40:31 +08:00
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
return device_file;
|
2007-12-04 15:40:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
GError *
|
|
|
|
gimp_input_device_store_get_error (GimpInputDeviceStore *store)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (GIMP_IS_INPUT_DEVICE_STORE (store), NULL);
|
|
|
|
|
|
|
|
return store->error ? g_error_copy (store->error) : NULL;
|
|
|
|
}
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
#else /* HAVE_LIBGUDEV */
|
2007-12-06 04:17:24 +08:00
|
|
|
|
2008-01-11 20:45:00 +08:00
|
|
|
void
|
|
|
|
gimp_input_device_store_register_types (GTypeModule *module)
|
|
|
|
{
|
|
|
|
}
|
2007-12-06 04:17:24 +08:00
|
|
|
|
|
|
|
GType
|
2008-01-11 20:45:00 +08:00
|
|
|
gimp_input_device_store_get_type (void)
|
2007-12-06 04:17:24 +08:00
|
|
|
{
|
|
|
|
return G_TYPE_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
GimpInputDeviceStore *
|
|
|
|
gimp_input_device_store_new (void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
gchar *
|
|
|
|
gimp_input_device_store_get_device_file (GimpInputDeviceStore *store,
|
2011-06-23 22:30:58 +08:00
|
|
|
const gchar *identifier)
|
2007-12-06 04:17:24 +08:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
GError *
|
|
|
|
gimp_input_device_store_get_error (GimpInputDeviceStore *store)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-06-23 22:30:58 +08:00
|
|
|
#endif /* HAVE_LIBGUDEV */
|