mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
82 lines
2.1 KiB
C
82 lines
2.1 KiB
C
|
/* GDK - The GIMP Drawing Kit
|
||
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* This library 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
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public
|
||
|
* License along with this library; if not, write to the
|
||
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||
|
* Boston, MA 02111-1307, USA.
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
|
||
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||
|
* files for a list of changes. These files are distributed with
|
||
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||
|
*/
|
||
|
|
||
|
#include "gdkfb.h"
|
||
|
#include "gdkprivate-fb.h"
|
||
|
#include "gdkcursor.h"
|
||
|
|
||
|
GdkCursor*
|
||
|
gdk_cursor_new (GdkCursorType cursor_type)
|
||
|
{
|
||
|
GdkCursorPrivateFB *private;
|
||
|
GdkCursor *cursor;
|
||
|
|
||
|
return NULL;
|
||
|
|
||
|
private = g_new0(GdkCursorPrivateFB, 1);
|
||
|
cursor = (GdkCursor*) private;
|
||
|
cursor->type = cursor_type;
|
||
|
cursor->ref_count = 1;
|
||
|
|
||
|
return cursor;
|
||
|
}
|
||
|
|
||
|
GdkCursor*
|
||
|
gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||
|
GdkPixmap *mask,
|
||
|
GdkColor *fg,
|
||
|
GdkColor *bg,
|
||
|
gint x,
|
||
|
gint y)
|
||
|
{
|
||
|
GdkCursorPrivateFB *private;
|
||
|
GdkCursor *cursor;
|
||
|
|
||
|
g_return_val_if_fail (source != NULL, NULL);
|
||
|
|
||
|
private = g_new (GdkCursorPrivateFB, 1);
|
||
|
cursor = (GdkCursor *) private;
|
||
|
cursor->type = GDK_CURSOR_IS_PIXMAP;
|
||
|
cursor->ref_count = 1;
|
||
|
private->cursor = gdk_pixmap_ref(source);
|
||
|
private->mask = gdk_pixmap_ref(mask);
|
||
|
|
||
|
return cursor;
|
||
|
}
|
||
|
|
||
|
void
|
||
|
_gdk_cursor_destroy (GdkCursor *cursor)
|
||
|
{
|
||
|
GdkCursorPrivateFB *private;
|
||
|
|
||
|
g_return_if_fail (cursor != NULL);
|
||
|
g_return_if_fail (cursor->ref_count == 0);
|
||
|
|
||
|
private = (GdkCursorPrivateFB *) cursor;
|
||
|
|
||
|
g_free (private);
|
||
|
}
|