1
2#ifndef __GTK_GIZMO_H__
3#define __GTK_GIZMO_H__
4
5#include "gtkwidget.h"
6#include "gtkenums.h"
7
8#define GTK_TYPE_GIZMO (gtk_gizmo_get_type ())
9#define GTK_GIZMO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_GIZMO, GtkGizmo))
10#define GTK_GIZMO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_GIZMO, GtkGizmoClass))
11#define GTK_IS_GIZMO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_GIZMO))
12#define GTK_IS_GIZMO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GIZMO))
13#define GTK_GIZMO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_GIZMO, GtkGizmoClass))
14
15typedef struct _GtkGizmo GtkGizmo;
16typedef struct _GtkGizmoClass GtkGizmoClass;
17
18typedef void (* GtkGizmoMeasureFunc) (GtkGizmo *gizmo,
19 GtkOrientation orientation,
20 int for_size,
21 int *minimum,
22 int *natural,
23 int *minimum_baseline,
24 int *natural_baseline);
25typedef void (* GtkGizmoAllocateFunc) (GtkGizmo *gizmo,
26 int width,
27 int height,
28 int baseline);
29typedef void (* GtkGizmoSnapshotFunc) (GtkGizmo *gizmo,
30 GtkSnapshot *snapshot);
31typedef gboolean (* GtkGizmoContainsFunc) (GtkGizmo *gizmo,
32 double x,
33 double y);
34typedef gboolean (* GtkGizmoFocusFunc) (GtkGizmo *gizmo,
35 GtkDirectionType direction);
36typedef gboolean (* GtkGizmoGrabFocusFunc)(GtkGizmo *gizmo);
37
38struct _GtkGizmo
39{
40 GtkWidget parent_instance;
41
42 GtkGizmoMeasureFunc measure_func;
43 GtkGizmoAllocateFunc allocate_func;
44 GtkGizmoSnapshotFunc snapshot_func;
45 GtkGizmoContainsFunc contains_func;
46 GtkGizmoFocusFunc focus_func;
47 GtkGizmoGrabFocusFunc grab_focus_func;
48};
49
50struct _GtkGizmoClass
51{
52 GtkWidgetClass parent_class;
53};
54
55GType gtk_gizmo_get_type (void) G_GNUC_CONST;
56
57GtkWidget *gtk_gizmo_new (const char *css_name,
58 GtkGizmoMeasureFunc measure_func,
59 GtkGizmoAllocateFunc allocate_func,
60 GtkGizmoSnapshotFunc snapshot_func,
61 GtkGizmoContainsFunc contains_func,
62 GtkGizmoFocusFunc focus_func,
63 GtkGizmoGrabFocusFunc grab_focus_func);
64
65GtkWidget *gtk_gizmo_new_with_role (const char *css_name,
66 GtkAccessibleRole role,
67 GtkGizmoMeasureFunc measure_func,
68 GtkGizmoAllocateFunc allocate_func,
69 GtkGizmoSnapshotFunc snapshot_func,
70 GtkGizmoContainsFunc contains_func,
71 GtkGizmoFocusFunc focus_func,
72 GtkGizmoGrabFocusFunc grab_focus_func);
73
74
75#endif
76

source code of gtk/gtk/gtkgizmoprivate.h