Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2007-04-05 16:42:07 +0400
committerMatt Ebb <matt@mke3.net>2007-04-05 16:42:07 +0400
commitbbceedced0ecf1426d90faf5f36136f688853ab6 (patch)
treeded71b41ad8ae8434112e9c7627385dce27b5513 /source/blender/include
parent54f57cca0872924f3b9ed3a329ef767365fafcc9 (diff)
* Tablet support fixup
This commit should hopefully fix some of the problems some people were having with tablet support in sculpt mode, and also the problems I made visible with my previous commit related to number field dragging. Now, all the ghost related stuff is tucked away in ghostwinlay.c and a simple Blender API, similar to the existing get_mbut() for example, is provided to access the tablet data. As with the other mouse related data in Blender, the tablet data is cached upon each mouse move or click, in the Window struct. You can now just use: float get_pressure(void); void get_tilt(float *xtilt, float *ytilt); short get_activedevice(void); to get such data from the tablet. Documentation on the returned data is in ghostwinlay.c in the _Window struct definition. Brecht and Nicholas, I've updated the painting and sculpt code and it works just fine here, you may want to give it a check though to make sure I haven't done anything silly.
Diffstat (limited to 'source/blender/include')
-rw-r--r--source/blender/include/BIF_mywindow.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/include/BIF_mywindow.h b/source/blender/include/BIF_mywindow.h
index c5456ab7dd5..28de60d2bc0 100644
--- a/source/blender/include/BIF_mywindow.h
+++ b/source/blender/include/BIF_mywindow.h
@@ -122,7 +122,13 @@ void BIF_wait_for_statechange(void);
short get_mbut(void);
short get_qual(void);
void getmouse(short *mval);
-const struct GHOST_TabletData* get_tablet_data();
+
+float get_pressure(void);
+void get_tilt(float *xtilt, float *ytilt);
+#define DEV_MOUSE 0
+#define DEV_STYLUS 1
+#define DEV_ERASER 2
+short get_activedevice(void);
void warp_pointer(int x, int y);