Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkimage.h
Go to the documentation of this file.
1/* GTK - The GIMP Toolkit
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
28#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
29#error "Only <gtk/gtk.h> can be included directly."
30#endif
31
32#include <gio/gio.h>
33#include <gtk/gtkwidget.h>
34
35
37
38#define GTK_TYPE_IMAGE (gtk_image_get_type ())
39#define GTK_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IMAGE, GtkImage))
40#define GTK_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IMAGE))
41
42typedef struct _GtkImage GtkImage;
43
44/**
45 * GtkImageType:
46 * @GTK_IMAGE_EMPTY: there is no image displayed by the widget
47 * @GTK_IMAGE_ICON_NAME: the widget contains a named icon
48 * @GTK_IMAGE_GICON: the widget contains a `GIcon`
49 * @GTK_IMAGE_PAINTABLE: the widget contains a `GdkPaintable`
50 *
51 * Describes the image data representation used by a [class@Gtk.Image].
52 *
53 * If you want to get the image from the widget, you can only get the
54 * currently-stored representation; for instance, if the gtk_image_get_storage_type()
55 * returns %GTK_IMAGE_PAINTABLE, then you can call gtk_image_get_paintable().
56 *
57 * For empty images, you can request any storage type (call any of the "get"
58 * functions), but they will all return %NULL values.
59 */
67
70
74GtkWidget* gtk_image_new_from_file (const char *filename);
76GtkWidget* gtk_image_new_from_resource (const char *resource_path);
80GtkWidget* gtk_image_new_from_paintable (GdkPaintable *paintable);
82GtkWidget* gtk_image_new_from_icon_name (const char *icon_name);
85
90 const char *filename);
93 const char *resource_path);
96 GdkPixbuf *pixbuf);
99 GdkPaintable *paintable);
102 const char *icon_name);
105 GIcon *icon);
108 int pixel_size);
111 GtkIconSize icon_size);
112
115
117GdkPaintable *gtk_image_get_paintable (GtkImage *image);
118
127
129
131
struct _GdkPixbuf GdkPixbuf
#define GDK_DEPRECATED_IN_4_12_FOR(f)
#define GDK_AVAILABLE_IN_ALL
struct _GIcon GIcon
Definition giotypes.h:92
#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)
GtkIconSize
Definition gtkenums.h:234
GDK_AVAILABLE_IN_ALL GtkWidget * gtk_image_new_from_gicon(GIcon *icon)
GDK_AVAILABLE_IN_ALL GdkPaintable * gtk_image_get_paintable(GtkImage *image)
GDK_AVAILABLE_IN_ALL void gtk_image_set_from_gicon(GtkImage *image, GIcon *icon)
GDK_AVAILABLE_IN_ALL void gtk_image_clear(GtkImage *image)
GDK_AVAILABLE_IN_ALL GtkWidget * gtk_image_new_from_icon_name(const char *icon_name)
GDK_AVAILABLE_IN_ALL void gtk_image_set_from_paintable(GtkImage *image, GdkPaintable *paintable)
void gtk_image_set_from_pixbuf(GtkImage *image, GdkPixbuf *pixbuf)
GDK_AVAILABLE_IN_ALL GtkWidget * gtk_image_new_from_file(const char *filename)
GDK_AVAILABLE_IN_ALL GtkImageType gtk_image_get_storage_type(GtkImage *image)
GDK_AVAILABLE_IN_ALL GType gtk_image_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL GIcon * gtk_image_get_gicon(GtkImage *image)
GDK_AVAILABLE_IN_ALL GtkWidget * gtk_image_new(void)
GDK_AVAILABLE_IN_ALL const char * gtk_image_get_icon_name(GtkImage *image)
GDK_AVAILABLE_IN_ALL void gtk_image_set_from_resource(GtkImage *image, const char *resource_path)
GDK_AVAILABLE_IN_ALL void gtk_image_set_from_file(GtkImage *image, const char *filename)
GDK_AVAILABLE_IN_ALL void gtk_image_set_pixel_size(GtkImage *image, int pixel_size)
GDK_AVAILABLE_IN_ALL int gtk_image_get_pixel_size(GtkImage *image)
GtkWidget * gtk_image_new_from_pixbuf(GdkPixbuf *pixbuf)
GDK_AVAILABLE_IN_ALL GtkWidget * gtk_image_new_from_resource(const char *resource_path)
GDK_AVAILABLE_IN_ALL GtkWidget * gtk_image_new_from_paintable(GdkPaintable *paintable)
GtkImageType
Definition gtkimage.h:61
@ GTK_IMAGE_PAINTABLE
Definition gtkimage.h:65
@ GTK_IMAGE_ICON_NAME
Definition gtkimage.h:63
@ GTK_IMAGE_GICON
Definition gtkimage.h:64
@ GTK_IMAGE_EMPTY
Definition gtkimage.h:62
struct _GtkImage GtkImage
Definition gtkimage.h:42
GDK_AVAILABLE_IN_ALL GtkIconSize gtk_image_get_icon_size(GtkImage *image)
GDK_AVAILABLE_IN_ALL void gtk_image_set_icon_size(GtkImage *image, GtkIconSize icon_size)
GDK_AVAILABLE_IN_ALL void gtk_image_set_from_icon_name(GtkImage *image, const char *icon_name)
gsize GType
Definition gtype.h:427