1998-06-06 12:06:56 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (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
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
2000-12-17 05:37:03 +08:00
|
|
|
|
1999-03-07 20:56:03 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
#include <errno.h>
|
2000-12-29 23:22:01 +08:00
|
|
|
#include <stdio.h>
|
1998-06-06 12:06:56 +08:00
|
|
|
#include <string.h>
|
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
#include <gtk/gtk.h>
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-01-24 02:49:44 +08:00
|
|
|
#include "libgimpcolor/gimpcolor.h"
|
2001-05-22 04:30:16 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2001-01-24 02:49:44 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "widgets-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "core/gimp.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimpbrush.h"
|
|
|
|
#include "core/gimpcontainer.h"
|
|
|
|
#include "core/gimpdatafactory.h"
|
|
|
|
#include "core/gimpgradient.h"
|
|
|
|
#include "core/gimppattern.h"
|
2001-05-10 06:34:59 +08:00
|
|
|
#include "core/gimptoolinfo.h"
|
2001-02-21 20:18:09 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
#include "gimpdeviceinfo.h"
|
|
|
|
#include "gimpdevices.h"
|
2001-04-11 09:13:53 +08:00
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
#include "gimprc.h"
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
#define GIMP_DEVICE_MANAGER_DATA_KEY "gimp-device-manager"
|
|
|
|
#define GIMP_DEVICE_MANAGER_DATA_KEY "gimp-device-manager"
|
2000-12-29 23:22:01 +08:00
|
|
|
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
typedef struct _GimpDeviceManager GimpDeviceManager;
|
1998-08-01 06:44:26 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
struct _GimpDeviceManager
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GList *device_info_list;
|
|
|
|
GdkDevice *current_device;
|
|
|
|
GimpDeviceChangeNotify change_notify;
|
1998-06-06 12:06:56 +08:00
|
|
|
};
|
|
|
|
|
2001-01-08 05:07:14 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* local function prototypes */
|
2001-02-11 03:35:29 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
static GimpDeviceManager * gimp_device_manager_get (Gimp *gimp);
|
2001-02-11 03:35:29 +08:00
|
|
|
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* public functions */
|
2001-02-11 03:35:29 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
void
|
|
|
|
gimp_devices_init (Gimp *gimp,
|
|
|
|
GimpDeviceChangeNotify change_notify)
|
|
|
|
{
|
|
|
|
GimpDeviceManager *manager;
|
|
|
|
GdkDevice *device;
|
|
|
|
GimpDeviceInfo *device_info;
|
|
|
|
GList *list;
|
2001-12-02 05:02:34 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (gimp_device_manager_get (gimp) == NULL);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager = g_new0 (GimpDeviceManager, 1);
|
2001-01-08 05:07:14 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_object_set_data_full (G_OBJECT (gimp),
|
|
|
|
GIMP_DEVICE_MANAGER_DATA_KEY, manager,
|
|
|
|
(GDestroyNotify) g_free);
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager->current_device = gdk_device_get_core_pointer ();
|
|
|
|
manager->change_notify = change_notify;
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* create device info structures for present devices */
|
|
|
|
for (list = gdk_devices_list (); list; list = g_list_next (list))
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
device = (GdkDevice *) list->data;
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = gimp_device_info_new (gimp, device->name);
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager->device_info_list = g_list_append (manager->device_info_list,
|
|
|
|
device_info);
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_device_info_set_from_device (device_info, device);
|
1999-10-27 02:27:27 +08:00
|
|
|
}
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
void
|
|
|
|
gimp_devices_exit (Gimp *gimp)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceManager *manager;
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
|
2001-11-18 00:32:34 +08:00
|
|
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager = gimp_device_manager_get (gimp);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (manager != NULL);
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_list_foreach (manager->device_info_list, (GFunc) g_object_unref, NULL);
|
|
|
|
g_list_free (manager->device_info_list);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_object_set_data (G_OBJECT (gimp), GIMP_DEVICE_MANAGER_DATA_KEY, NULL);
|
1998-08-13 23:25:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_devices_restore (Gimp *gimp)
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceManager *manager;
|
|
|
|
GimpDeviceInfo *device_info;
|
|
|
|
GimpContext *user_context;
|
|
|
|
gchar *filename;
|
1998-08-13 23:25:41 +08:00
|
|
|
|
2001-11-18 00:32:34 +08:00
|
|
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager = gimp_device_manager_get (gimp);
|
|
|
|
|
|
|
|
g_return_if_fail (manager != NULL);
|
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
/* Augment with information from rc file */
|
1999-03-07 20:56:03 +08:00
|
|
|
filename = gimp_personal_rc_file ("devicerc");
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-11 03:16:16 +08:00
|
|
|
gimprc_parse_file (filename);
|
1999-03-07 20:56:03 +08:00
|
|
|
g_free (filename);
|
1998-08-13 23:25:41 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = gimp_device_info_get_by_device (manager->current_device);
|
1998-08-13 23:25:41 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (GIMP_IS_DEVICE_INFO (device_info));
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
user_context = gimp_get_user_context (gimp);
|
2001-01-15 09:48:53 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_copy_properties (GIMP_CONTEXT (device_info), user_context,
|
|
|
|
GIMP_DEVICE_INFO_CONTEXT_MASK);
|
|
|
|
gimp_context_set_parent (GIMP_CONTEXT (device_info), user_context);
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
void
|
|
|
|
gimp_devices_save (Gimp *gimp)
|
2001-12-02 05:02:34 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceManager *manager;
|
|
|
|
gchar *filename;
|
|
|
|
FILE *fp;
|
2001-12-02 05:02:34 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
2001-12-02 05:02:34 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager = gimp_device_manager_get (gimp);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (manager != NULL);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
filename = gimp_personal_rc_file ("devicerc");
|
|
|
|
fp = fopen (filename, "wb");
|
|
|
|
|
|
|
|
if (fp)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
g_list_foreach (manager->device_info_list,
|
|
|
|
(GFunc) gimp_device_info_save, fp);
|
|
|
|
fclose (fp);
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
g_warning ("%s: could not open \"%s\" for writing: %s",
|
|
|
|
G_STRLOC, filename, g_strerror (errno));
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_free (filename);
|
|
|
|
}
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
GdkDevice *
|
|
|
|
gimp_devices_get_current (Gimp *gimp)
|
|
|
|
{
|
|
|
|
GimpDeviceManager *manager;
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
1998-08-01 06:44:26 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager = gimp_device_manager_get (gimp);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_val_if_fail (manager != NULL, NULL);
|
1998-08-01 06:44:26 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
return manager->current_device;
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
|
1999-11-14 18:50:19 +08:00
|
|
|
void
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_devices_select_device (Gimp *gimp,
|
|
|
|
GdkDevice *new_device)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceManager *manager;
|
|
|
|
GimpDeviceInfo *current_device_info;
|
|
|
|
GimpDeviceInfo *new_device_info;
|
|
|
|
GimpContext *user_context;
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-02 05:02:34 +08:00
|
|
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
|
|
|
g_return_if_fail (GDK_IS_DEVICE (new_device));
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager = gimp_device_manager_get (gimp);
|
|
|
|
|
|
|
|
g_return_if_fail (manager != NULL);
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
current_device_info = gimp_device_info_get_by_device (manager->current_device);
|
|
|
|
new_device_info = gimp_device_info_get_by_device (new_device);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (GIMP_IS_DEVICE_INFO (current_device_info));
|
|
|
|
g_return_if_fail (GIMP_IS_DEVICE_INFO (new_device_info));
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_unset_parent (GIMP_CONTEXT (current_device_info));
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager->current_device = new_device;
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
user_context = gimp_get_user_context (gimp);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_context_copy_properties (GIMP_CONTEXT (new_device_info), user_context,
|
|
|
|
GIMP_DEVICE_INFO_CONTEXT_MASK);
|
|
|
|
gimp_context_set_parent (GIMP_CONTEXT (new_device_info), user_context);
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (manager->change_notify)
|
|
|
|
manager->change_notify (gimp);
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
gboolean
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_devices_check_change (Gimp *gimp,
|
|
|
|
GdkEvent *event)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceManager *manager;
|
|
|
|
GdkDevice *device;
|
1998-06-06 12:06:56 +08:00
|
|
|
|
2001-12-02 05:02:34 +08:00
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
|
|
|
|
g_return_val_if_fail (event != NULL, FALSE);
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager = gimp_device_manager_get (gimp);
|
|
|
|
|
|
|
|
g_return_val_if_fail (manager != NULL, FALSE);
|
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
switch (event->type)
|
|
|
|
{
|
|
|
|
case GDK_MOTION_NOTIFY:
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
device = ((GdkEventMotion *) event)->device;
|
1998-06-06 12:06:56 +08:00
|
|
|
break;
|
2001-11-09 03:14:51 +08:00
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
case GDK_BUTTON_PRESS:
|
2001-11-09 03:14:51 +08:00
|
|
|
case GDK_2BUTTON_PRESS:
|
|
|
|
case GDK_3BUTTON_PRESS:
|
1998-06-06 12:06:56 +08:00
|
|
|
case GDK_BUTTON_RELEASE:
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
device = ((GdkEventButton *) event)->device;
|
1998-06-06 12:06:56 +08:00
|
|
|
break;
|
2001-11-09 03:14:51 +08:00
|
|
|
|
|
|
|
case GDK_PROXIMITY_IN:
|
1998-06-06 12:06:56 +08:00
|
|
|
case GDK_PROXIMITY_OUT:
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
device = ((GdkEventProximity *) event)->device;
|
1998-06-06 12:06:56 +08:00
|
|
|
break;
|
2001-11-09 03:14:51 +08:00
|
|
|
|
|
|
|
case GDK_SCROLL:
|
|
|
|
device = ((GdkEventScroll *) event)->device;
|
|
|
|
break;
|
|
|
|
|
1998-06-06 12:06:56 +08:00
|
|
|
default:
|
2001-12-08 01:39:51 +08:00
|
|
|
device = manager->current_device;
|
2001-11-09 03:14:51 +08:00
|
|
|
break;
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (device != manager->current_device)
|
1998-06-06 12:06:56 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_devices_select_device (gimp, device);
|
1998-06-06 12:06:56 +08:00
|
|
|
return TRUE;
|
|
|
|
}
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-25 05:27:11 +08:00
|
|
|
|
|
|
|
return FALSE;
|
1998-06-06 12:06:56 +08:00
|
|
|
}
|
|
|
|
|
1998-07-21 08:15:24 +08:00
|
|
|
void
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_devices_rc_update (Gimp *gimp,
|
|
|
|
const gchar *name,
|
|
|
|
GimpDeviceValues values,
|
|
|
|
GdkInputMode mode,
|
|
|
|
gint num_axes,
|
|
|
|
const GdkAxisUse *axes,
|
|
|
|
gint num_keys,
|
|
|
|
const GdkDeviceKey *keys,
|
|
|
|
const gchar *tool_name,
|
|
|
|
const GimpRGB *foreground,
|
|
|
|
const GimpRGB *background,
|
|
|
|
const gchar *brush_name,
|
|
|
|
const gchar *pattern_name,
|
|
|
|
const gchar *gradient_name)
|
2001-12-02 05:02:34 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
GimpDeviceManager *manager;
|
|
|
|
GimpDeviceInfo *device_info = NULL;
|
|
|
|
GList *list;
|
1998-08-13 23:25:41 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
|
|
|
g_return_if_fail (name != NULL);
|
1999-10-28 23:05:49 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager = gimp_device_manager_get (gimp);
|
1999-09-04 11:36:54 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
g_return_if_fail (manager != NULL);
|
1999-09-04 11:36:54 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* Find device if we have it */
|
|
|
|
for (list = manager->device_info_list; list; list = g_list_next (list))
|
1999-09-04 11:36:54 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
if (! strcmp (GIMP_OBJECT (list->data)->name, name))
|
|
|
|
{
|
|
|
|
device_info = GIMP_DEVICE_INFO (list->data);
|
|
|
|
break;
|
|
|
|
}
|
1999-09-04 11:36:54 +08:00
|
|
|
}
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
if (! device_info)
|
1999-09-04 11:36:54 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
device_info = gimp_device_info_new (gimp, name);
|
1999-10-10 04:33:53 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
manager->device_info_list = g_list_append (manager->device_info_list,
|
|
|
|
device_info);
|
1999-09-05 18:45:07 +08:00
|
|
|
}
|
2001-12-08 01:39:51 +08:00
|
|
|
else if (! device_info->device)
|
1999-10-28 23:05:49 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
g_warning ("%s: called multiple times for not present device",
|
|
|
|
G_STRLOC);
|
|
|
|
return;
|
1999-10-28 23:05:49 +08:00
|
|
|
}
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
gimp_device_info_set_from_rc (device_info,
|
|
|
|
values,
|
|
|
|
mode,
|
|
|
|
num_axes, axes,
|
|
|
|
num_keys, keys,
|
|
|
|
tool_name,
|
|
|
|
foreground, background,
|
|
|
|
brush_name,
|
|
|
|
pattern_name,
|
|
|
|
gradient_name);
|
1999-09-05 18:45:07 +08:00
|
|
|
}
|
1999-10-27 02:27:27 +08:00
|
|
|
|
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
/* private functions */
|
1999-10-27 02:27:27 +08:00
|
|
|
|
2001-12-08 01:39:51 +08:00
|
|
|
static GimpDeviceManager *
|
|
|
|
gimp_device_manager_get (Gimp *gimp)
|
1999-10-27 02:27:27 +08:00
|
|
|
{
|
2001-12-08 01:39:51 +08:00
|
|
|
return g_object_get_data (G_OBJECT (gimp), GIMP_DEVICE_MANAGER_DATA_KEY);
|
1999-10-27 02:27:27 +08:00
|
|
|
}
|