2017-04-06 17:17:29 +00:00
|
|
|
|
|
|
|
#ifndef __GTK_GIZMO_H__
|
|
|
|
#define __GTK_GIZMO_H__
|
|
|
|
|
|
|
|
#include "gtkwidget.h"
|
2020-10-14 22:37:14 +00:00
|
|
|
#include "gtkenums.h"
|
2017-04-06 17:17:29 +00:00
|
|
|
|
|
|
|
#define GTK_TYPE_GIZMO (gtk_gizmo_get_type ())
|
|
|
|
#define GTK_GIZMO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_GIZMO, GtkGizmo))
|
|
|
|
#define GTK_GIZMO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_GIZMO, GtkGizmoClass))
|
|
|
|
#define GTK_IS_GIZMO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_GIZMO))
|
|
|
|
#define GTK_IS_GIZMO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GIZMO))
|
|
|
|
#define GTK_GIZMO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_GIZMO, GtkGizmoClass))
|
|
|
|
|
|
|
|
typedef struct _GtkGizmo GtkGizmo;
|
|
|
|
typedef struct _GtkGizmoClass GtkGizmoClass;
|
|
|
|
|
|
|
|
typedef void (* GtkGizmoMeasureFunc) (GtkGizmo *gizmo,
|
|
|
|
GtkOrientation orientation,
|
|
|
|
int for_size,
|
|
|
|
int *minimum,
|
|
|
|
int *natural,
|
|
|
|
int *minimum_baseline,
|
|
|
|
int *natural_baseline);
|
2018-08-16 04:53:03 +00:00
|
|
|
typedef void (* GtkGizmoAllocateFunc) (GtkGizmo *gizmo,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
int baseline);
|
2019-01-18 07:01:40 +00:00
|
|
|
typedef void (* GtkGizmoSnapshotFunc) (GtkGizmo *gizmo,
|
2017-04-06 17:17:29 +00:00
|
|
|
GtkSnapshot *snapshot);
|
2019-04-07 15:47:24 +00:00
|
|
|
typedef gboolean (* GtkGizmoContainsFunc) (GtkGizmo *gizmo,
|
|
|
|
double x,
|
|
|
|
double y);
|
2020-04-08 11:34:38 +00:00
|
|
|
typedef gboolean (* GtkGizmoFocusFunc) (GtkGizmo *gizmo,
|
|
|
|
GtkDirectionType direction);
|
2021-02-17 04:48:48 +00:00
|
|
|
typedef gboolean (* GtkGizmoGrabFocusFunc)(GtkGizmo *gizmo);
|
2017-04-06 17:17:29 +00:00
|
|
|
|
|
|
|
struct _GtkGizmo
|
|
|
|
{
|
|
|
|
GtkWidget parent_instance;
|
|
|
|
|
2020-04-08 11:34:38 +00:00
|
|
|
GtkGizmoMeasureFunc measure_func;
|
|
|
|
GtkGizmoAllocateFunc allocate_func;
|
|
|
|
GtkGizmoSnapshotFunc snapshot_func;
|
|
|
|
GtkGizmoContainsFunc contains_func;
|
|
|
|
GtkGizmoFocusFunc focus_func;
|
|
|
|
GtkGizmoGrabFocusFunc grab_focus_func;
|
2017-04-06 17:17:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkGizmoClass
|
|
|
|
{
|
|
|
|
GtkWidgetClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType gtk_gizmo_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2020-04-08 11:34:38 +00:00
|
|
|
GtkWidget *gtk_gizmo_new (const char *css_name,
|
|
|
|
GtkGizmoMeasureFunc measure_func,
|
|
|
|
GtkGizmoAllocateFunc allocate_func,
|
|
|
|
GtkGizmoSnapshotFunc snapshot_func,
|
|
|
|
GtkGizmoContainsFunc contains_func,
|
|
|
|
GtkGizmoFocusFunc focus_func,
|
|
|
|
GtkGizmoGrabFocusFunc grab_focus_func);
|
2017-04-06 17:17:29 +00:00
|
|
|
|
2020-10-14 22:37:14 +00:00
|
|
|
GtkWidget *gtk_gizmo_new_with_role (const char *css_name,
|
|
|
|
GtkAccessibleRole role,
|
|
|
|
GtkGizmoMeasureFunc measure_func,
|
|
|
|
GtkGizmoAllocateFunc allocate_func,
|
|
|
|
GtkGizmoSnapshotFunc snapshot_func,
|
|
|
|
GtkGizmoContainsFunc contains_func,
|
|
|
|
GtkGizmoFocusFunc focus_func,
|
|
|
|
GtkGizmoGrabFocusFunc grab_focus_func);
|
|
|
|
|
2017-04-06 17:17:29 +00:00
|
|
|
|
|
|
|
#endif
|