예제 #1
0
static GdkCursor *
make_cursor (GdkDisplay *display)
{
  GdkCursor           *cursor;
  GdkPixbuf           *pixbuf;
  static const guint8 *data;

  if (gdk_display_supports_cursor_alpha (display) &&
      gdk_display_supports_cursor_color (display))
    {
      data = cursor_color_picker;
    }
  else
    {
      data = cursor_color_picker_bw;
    }

  pixbuf = gdk_pixbuf_new_from_inline (-1, data, FALSE, NULL);

  cursor = gdk_cursor_new_from_pixbuf (display, pixbuf, 1, 30);

  g_object_unref (pixbuf);

  return cursor;
}
예제 #2
0
static VALUE
rg_supports_cursor_alpha_p(VALUE self)
{
    return CBOOL2RVAL(gdk_display_supports_cursor_alpha(_SELF(self)));
}