* Blender-side stuff for GHOST tablet pressure
authorMatt Ebb <matt@mke3.net>
Thu, 3 Aug 2006 12:25:32 +0000 (12:25 +0000)
committerMatt Ebb <matt@mke3.net>
Thu, 3 Aug 2006 12:25:32 +0000 (12:25 +0000)
source/blender/include/BIF_mywindow.h
source/blender/src/editscreen.c
source/blender/src/ghostwinlay.c
source/blender/src/winlay.h

index d9701064447e5abe31ef533100b6eaf13d10e9c2..3ef28cc039f2ac4dacba2ed3db60ca201735096d 100644 (file)
@@ -121,6 +121,7 @@ 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();
 
 void warp_pointer(int x, int y);
 
index ca5037f59863824ae7a3ff1a3c80ffd2dbde3987..b18d8d4980e127edac03165e1b80dccf09fb5b63 100644 (file)
@@ -44,6 +44,8 @@
 #include <stdio.h>
 #include <math.h>
 
+#include "GHOST_Types.h"
+
 #include "MEM_guardedalloc.h"
 
 #include "PIL_time.h"
@@ -2077,6 +2079,11 @@ short get_mbut(void)
        winlay_process_events(0);
        return window_get_mbut(mainwin);
 }
+const GHOST_TabletData* get_tablet_data()
+{
+       winlay_process_events(0);
+       return window_get_tablet_data(mainwin);
+}
 
 void add_to_mainqueue(Window *win, void *user_data, short evt, short val, char ascii)
 {
@@ -3548,22 +3555,22 @@ void draw_area_emboss(ScrArea *sa)
        glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
 
        /* right  */
-       glColor4ub(0,0,0, 80);
+       glColor4ub(0,0,0, 50);
        sdrawline(sa->winx-1, 0, sa->winx-1, sa->winy-1);
        
        /* bottom  */
        if(sa->headertype!=HEADERDOWN) {
-               glColor4ub(0,0,0, 128);
+               glColor4ub(0,0,0, 80);
                sdrawline(0, 0, sa->winx-1, 0);
        }
        
        /* top  */
        if(sa->headertype!=HEADERTOP) {
-               glColor4ub(255,255,255, 96);
+               glColor4ub(255,255,255, 60);
                sdrawline(0, sa->winy-1, sa->winx-1, sa->winy-1);
        }
        /* left  */
-       glColor4ub(255,255,255, 80);
+       glColor4ub(255,255,255, 50);
        sdrawline(0, 0, 0, sa->winy);
 
        glDisable( GL_BLEND );
index b9796f8b1190ab73ad02b287385e9b92ff66299d..d63574e79f9fc002c3659285bfceebac05301e73 100644 (file)
@@ -714,6 +714,11 @@ void window_get_position(Window *win, int *posx_r, int *posy_r) {
        *posy_r= win->position[1];
 }
 
+const GHOST_TabletData* window_get_tablet_data(Window *win)
+{
+       return GHOST_GetTabletData(win->ghostwin);
+}
+
 void window_get_size(Window *win, int *width_r, int *height_r) {
        *width_r= win->size[0];
        *height_r= win->size[1];
index cd599fb39145e2dc7890e5935c334363b974fe81..6719f9454c12f38671f0f21a4d9675703a21fe01 100644 (file)
@@ -57,6 +57,7 @@ void  window_lower            (Window *win);
 short  window_get_qual         (Window *win);
 short  window_get_mbut         (Window *win);
 void   window_get_mouse        (Window *win, short *mval);
+const struct GHOST_TabletData* window_get_tablet_data(Window *win);
 
 void   window_get_position     (Window *win, int *posx_r, int *poxy_r);