Logo Search packages:      
Sourcecode: inkscape version File versions

static void sp_knot_class_init ( SPKnotClass klass  )  [static]

SPKnot vtable initialization.

Definition at line 97 of file knot.cpp.

References Geom::distance(), and sp_knot_dispose().

{
    GObjectClass *object_class = (GObjectClass*)klass;

    parent_class = (GObjectClass*) g_type_class_peek_parent(klass);

    object_class->dispose = sp_knot_dispose;

    knot_signals[EVENT] = g_signal_new("event",
                                       G_TYPE_FROM_CLASS(klass),
                                       G_SIGNAL_RUN_LAST,
                                       G_STRUCT_OFFSET(SPKnotClass, event),
                                       NULL, NULL,
                                       sp_marshal_BOOLEAN__POINTER,
                                       G_TYPE_BOOLEAN, 1,
                                       GDK_TYPE_EVENT);

    knot_signals[CLICKED] = g_signal_new("clicked",
                                         G_TYPE_FROM_CLASS(klass),
                                         G_SIGNAL_RUN_FIRST,
                                         G_STRUCT_OFFSET(SPKnotClass, clicked),
                                         NULL, NULL,
                                         sp_marshal_NONE__UINT,
                                         G_TYPE_NONE, 1,
                                         G_TYPE_UINT);

    knot_signals[DOUBLECLICKED] = g_signal_new("doubleclicked",
                                               G_TYPE_FROM_CLASS(klass),
                                               G_SIGNAL_RUN_FIRST,
                                               G_STRUCT_OFFSET(SPKnotClass, doubleclicked),
                                               NULL, NULL,
                                               sp_marshal_NONE__UINT,
                                               G_TYPE_NONE, 1,
                                               G_TYPE_UINT);

    knot_signals[GRABBED] = g_signal_new("grabbed",
                                          G_TYPE_FROM_CLASS(klass),
                                          G_SIGNAL_RUN_FIRST,
                                          G_STRUCT_OFFSET(SPKnotClass, grabbed),
                                          NULL, NULL,
                                          sp_marshal_NONE__UINT,
                                          G_TYPE_NONE, 1,
                                          G_TYPE_UINT);

    knot_signals[UNGRABBED] = g_signal_new("ungrabbed",
                                  G_TYPE_FROM_CLASS(klass),
                                  G_SIGNAL_RUN_FIRST,
                                  G_STRUCT_OFFSET(SPKnotClass, ungrabbed),
                                  NULL, NULL,
                                  sp_marshal_NONE__UINT,
                                  G_TYPE_NONE, 1,
                                  G_TYPE_UINT);

    knot_signals[MOVED] = g_signal_new("moved",
                                        G_TYPE_FROM_CLASS(klass),
                                        G_SIGNAL_RUN_FIRST,
                                        G_STRUCT_OFFSET(SPKnotClass, moved),
                                        NULL, NULL,
                                        sp_marshal_NONE__POINTER_UINT,
                                        G_TYPE_NONE, 2,
                                        G_TYPE_POINTER, G_TYPE_UINT);

    knot_signals[REQUEST] = g_signal_new("request",
                                         G_TYPE_FROM_CLASS(klass),
                                         G_SIGNAL_RUN_LAST,
                                         G_STRUCT_OFFSET(SPKnotClass, request),
                                         NULL, NULL,
                                         sp_marshal_BOOLEAN__POINTER_UINT,
                                         G_TYPE_BOOLEAN, 2,
                                         G_TYPE_POINTER, G_TYPE_UINT);

    knot_signals[DISTANCE] = g_signal_new("distance",
                                           G_TYPE_FROM_CLASS(klass),
                                           G_SIGNAL_RUN_LAST,
                                           G_STRUCT_OFFSET(SPKnotClass, distance),
                                           NULL, NULL,
                                           sp_marshal_DOUBLE__POINTER_UINT,
                                           G_TYPE_DOUBLE, 2,
                                           G_TYPE_POINTER, G_TYPE_UINT);

    const gchar *nograbenv = getenv("INKSCAPE_NO_GRAB");
    nograb = (nograbenv && *nograbenv && (*nograbenv != '0'));
}


Generated by  Doxygen 1.6.0   Back to index