gtk+ win32 cursors



hi, just made the following changes to

static HCURSOR
_gdk_win32_data_to_wcursor (GdkCursorType cursor_type)

in gdkcursor-win32.c and IMHO makes all the gtk+ apps on my win32 machine
fit in much nicer with the rest of the win32 environment. I'm sure this is not the complete
mapping.  But it covers enough for my needs.  I wanted to know if anyone has
any objections to loading cursors this way in win32?

thanks,
-todd

static HCURSOR
_gdk_win32_data_to_wcursor (GdkCursorType cursor_type)
{
 gint i, j, x, y, ofs;
 HCURSOR rv = NULL;
 gint w, h;
 guchar *and_plane, *xor_plane;
#ifdef _WIN32
   switch( cursor_type ){
   case GDK_WATCH:
       return LoadCursor( NULL, IDC_WAIT );
       break;
   case GDK_XTERM:
       return LoadCursor( NULL, IDC_IBEAM );
       break;
   case GDK_BOTTOM_LEFT_CORNER:
   case GDK_TOP_LEFT_CORNER:
       return LoadCursor( NULL, IDC_SIZENWSE );
       break;
   case GDK_BOTTOM_RIGHT_CORNER:
   case GDK_TOP_RIGHT_CORNER:
       return LoadCursor( NULL, IDC_SIZENESW );
       break;
   case GDK_DOUBLE_ARROW:
   case GDK_TOP_SIDE:
       return LoadCursor( NULL, IDC_SIZENS );
       break;
   case GDK_SB_H_DOUBLE_ARROW:
       return LoadCursor( NULL, IDC_SIZEWE );
       break;
   case GDK_HAND1:
   case GDK_HAND2:
       return LoadCursor( NULL, IDC_HAND );
       break;
   case GDK_TOP_LEFT_ARROW:
   case GDK_RIGHT_PTR:
   case GDK_LEFT_PTR:
   case GDK_ARROW:
       return LoadCursor( NULL, IDC_ARROW );
       break;
   }
#endif




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]