Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdkcursor.h
Go to the documentation of this file.
1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/*
19 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
20 * file for a list of people on the GTK+ Team. See the ChangeLog
21 * files for a list of changes. These files are distributed with
22 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23 */
24
25#pragma once
26
27#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
28#error "Only <gdk/gdk.h> can be included directly."
29#endif
30
31#include <gdk/gdktypes.h>
32
34
35#define GDK_TYPE_CURSOR (gdk_cursor_get_type ())
36#define GDK_CURSOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_CURSOR, GdkCursor))
37#define GDK_IS_CURSOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_CURSOR))
38
39/* Cursors
40 */
41
44
47 int hotspot_x,
48 int hotspot_y,
49 GdkCursor *fallback);
52 GdkCursor *fallback);
53
54/**
55 * GdkCursorGetTextureCallback:
56 * @cursor: the `GdkCursor`
57 * @cursor_size: the nominal cursor size, in application pixels
58 * @scale: the device scale
59 * @width: (out): return location for the actual cursor width,
60 * in application pixels
61 * @height: (out): return location for the actual cursor height,
62 * in application pixels
63 * @hotspot_x: (out): return location for the hotspot X position,
64 * in application pixels
65 * @hotspot_y: (out): return location for the hotspot Y position,
66 * in application pixels
67 * @data: User data for the callback
68 *
69 * The type of callback used by a dynamic `GdkCursor` to generate
70 * a texture for the cursor image at the given @cursor_size
71 * and @scale.
72 *
73 * The actual cursor size in application pixels may be different
74 * from @cursor_size x @cursor_size, and will be returned in
75 * @width, @height. The returned texture should have a size that
76 * corresponds to the actual cursor size, in device pixels (i.e.
77 * application pixels, multiplied by @scale).
78 *
79 * This function may fail and return `NULL`, in which case
80 * the fallback cursor will be used.
81 *
82 * Returns: (nullable) (transfer full): the cursor image, or
83 * `NULL` if none could be produced.
84 */
85typedef GdkTexture * (* GdkCursorGetTextureCallback) (GdkCursor *cursor,
86 int cursor_size,
87 double scale,
88 int *width,
89 int *height,
90 int *hotspot_x,
91 int *hotspot_y,
92 gpointer data);
93
96 gpointer data,
97 GDestroyNotify destroy,
98 GdkCursor *fallback);
99
103const char *gdk_cursor_get_name (GdkCursor *cursor);
110
112
114
#define GDK_AVAILABLE_IN_4_16
#define GDK_AVAILABLE_IN_ALL
GDK_AVAILABLE_IN_ALL int gdk_cursor_get_hotspot_x(GdkCursor *cursor)
GDK_AVAILABLE_IN_ALL GdkCursor * gdk_cursor_new_from_name(const char *name, GdkCursor *fallback)
GdkTexture *(* GdkCursorGetTextureCallback)(GdkCursor *cursor, int cursor_size, double scale, int *width, int *height, int *hotspot_x, int *hotspot_y, gpointer data)
Definition gdkcursor.h:85
GDK_AVAILABLE_IN_ALL GdkCursor * gdk_cursor_new_from_texture(GdkTexture *texture, int hotspot_x, int hotspot_y, GdkCursor *fallback)
GDK_AVAILABLE_IN_ALL GdkCursor * gdk_cursor_get_fallback(GdkCursor *cursor)
GDK_AVAILABLE_IN_ALL int gdk_cursor_get_hotspot_y(GdkCursor *cursor)
GDK_AVAILABLE_IN_ALL GType gdk_cursor_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_4_16 GdkCursor * gdk_cursor_new_from_callback(GdkCursorGetTextureCallback callback, gpointer data, GDestroyNotify destroy, GdkCursor *fallback)
GDK_AVAILABLE_IN_ALL GdkTexture * gdk_cursor_get_texture(GdkCursor *cursor)
GDK_AVAILABLE_IN_ALL const char * gdk_cursor_get_name(GdkCursor *cursor)
struct _GdkCursor GdkCursor
Definition gdktypes.h:81
struct _GdkTexture GdkTexture
Definition gdktypes.h:82
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
gsize GType
Definition gtype.h:427
void * gpointer
Definition gtypes.h:109
void(* GDestroyNotify)(gpointer data)
Definition gtypes.h:140
const char * name
Definition lsqlite3.c:2154