Example #1
0
static void gv_S57_draw_layer(GvLayer *layer, GvViewArea *view)
{
    //GObject *layer = view->layers;
    //char *name = (char *)gv_data_get_name(GV_DATA(layer));
    char *name = (char *)gv_data_get_name(GV_DATA(layer));

    S52_drawLayer(name);
    //S52_drawLayer("DEPARE");
}
Example #2
0
static void gv_S57_layer_setup(GvShapesLayer *layer, GvViewArea *view)
// load S57 --its in "wkt" OGC layer format
{
    //printf("start S52 gv_S57_layer_setup\n");

    if (NULL==layer || NULL==view) {
        PRINTF("ERROR: no GvShapesLayer or GvViewArea\n");
        return;
    }

#ifdef S52_USE_GLIB2
    //g_signal_connect(G_OBJECT(view), "gldraw",
    //                 G_CALLBACK(gv_S57_draw_layer),
    //                 G_OBJECT(view));
    //g_signal_connect(G_OBJECT(layer), "draw",
    //                 G_CALLBACK(gv_S57_draw_layer),
    //                 G_OBJECT(view));
    g_signal_connect(layer, "draw", gv_S57_draw_layer, view);

    //g_signal_connect(G_OBJECT(view), "button-release-event",
    //                 G_CALLBACK(_motion_handle_hint),
    //                 G_OBJECT(view));
    g_signal_connect(view, "button-release-event", _motion_handle_hint, view);


#else
    gtk_signal_connect_object(GTK_OBJECT(view), "gldraw",
                              GTK_SIGNAL_FUNC(gv_S57_draw_layer),
                              GTK_OBJECT(layer));

    gtk_signal_connect_object(GTK_OBJECT(view), "button-release-event",
                              GTK_SIGNAL_FUNC(_motion_handle_hint),
                              GTK_OBJECT(view));
#endif

    //printf("S52 name gv_S57_layer_setup\n");

    //char *name = (char *)gv_data_get_name(GV_DATA(layer));
    char *name = (char *)gv_data_get_name(layer);
    S52_loadLayer(name, (void *)layer);


    //printf("S52 fini gv_S57_layer_setup\n");

    return;
}
Example #3
0
static void gv_S57_layer_setup(GvShapesLayer *layer, GvViewArea *view)
// load S57 --its in "wkt" OGC layer format
{
    //printf("start S52 gv_S57_layer_setup\n");

    if (NULL==layer || NULL==view) {
        PRINTF("ERROR: no GvShapesLayer or GvViewArea\n");
        return;
    }

    g_signal_connect(layer, "draw", gv_S57_draw_layer, view);
    g_signal_connect(view, "button-release-event", _motion_handle_hint, view);

    //printf("S52 name gv_S57_layer_setup\n");

    //char *name = (char *)gv_data_get_name(GV_DATA(layer));
    char *name = (char *)gv_data_get_name(layer);
    S52_loadLayer(name, (void *)layer);


    //printf("S52 fini gv_S57_layer_setup\n");

    return;
}