- GtkWidgetClass *widget_class;
-
- widget_class = (GtkWidgetClass*) class;
-
- widget_class->draw = gtk_aspect_frame_draw;
- widget_class->expose_event = gtk_aspect_frame_expose;
- widget_class->size_allocate = gtk_aspect_frame_size_allocate;
+ GObjectClass *gobject_class;
+ GtkFrameClass *frame_class;
+
+ gobject_class = (GObjectClass*) class;
+ frame_class = (GtkFrameClass*) class;
+
+ gobject_class->set_property = gtk_aspect_frame_set_property;
+ gobject_class->get_property = gtk_aspect_frame_get_property;
+
+ frame_class->compute_child_allocation = gtk_aspect_frame_compute_child_allocation;
+
+ g_object_class_install_property (gobject_class,
+ PROP_XALIGN,
+ g_param_spec_float ("xalign",
+ P_("Horizontal Alignment"),
+ P_("X alignment of the child"),
+ 0.0, 1.0, 0.5,
+ GTK_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class,
+ PROP_YALIGN,
+ g_param_spec_float ("yalign",
+ P_("Vertical Alignment"),
+ P_("Y alignment of the child"),
+ 0.0, 1.0, 0.5,
+ GTK_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class,
+ PROP_RATIO,
+ g_param_spec_float ("ratio",
+ P_("Ratio"),
+ P_("Aspect ratio if obey_child is FALSE"),
+ MIN_RATIO, MAX_RATIO, 1.0,
+ GTK_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class,
+ PROP_OBEY_CHILD,
+ g_param_spec_boolean ("obey-child",
+ P_("Obey child"),
+ P_("Force aspect ratio to match that of the frame's child"),
+ TRUE,
+ GTK_PARAM_READWRITE));
+
+ g_type_class_add_private (class, sizeof (GtkAspectFramePrivate));