static void handle_inst(struct assembler *a, const struct inst_generic *inst, struct inst_reg *r) { const struct inst_desc *desc = container_of(inst, const struct inst_desc, g); uint32_t op; int i; for (i = 0; i < 4; i++) if (r[i].ident) create_marker(a, r[i].ident, a->curlex.line, desc->addr_bits, desc->addr_shift, desc->addr_mask, desc->addr_is_branch == 2); op = inst_gen(desc, r); add_word_to_seg(&a->text, op); }
int main (int argc, char *argv[]) { ClutterActor *actor, *marker, *stage; ChamplainMarkerLayer *layer; GpsCallbackData callback_data; if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, 800, 600); g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL); /* Create the map view */ actor = champlain_view_new (); clutter_actor_set_size (CLUTTER_ACTOR (actor), 800, 600); clutter_container_add_actor (CLUTTER_CONTAINER (stage), actor); /* Create the marker layer */ layer = champlain_marker_layer_new_full (CHAMPLAIN_SELECTION_SINGLE); clutter_actor_show (CLUTTER_ACTOR (layer)); champlain_view_add_layer (CHAMPLAIN_VIEW (actor), CHAMPLAIN_LAYER (layer)); /* Create a marker */ marker = create_marker (); champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker)); /* Finish initialising the map view */ g_object_set (G_OBJECT (actor), "zoom-level", 12, "kinetic-mode", TRUE, NULL); champlain_view_center_on (CHAMPLAIN_VIEW (actor), lat, lon); /* Create callback that updates the map periodically */ callback_data.view = CHAMPLAIN_VIEW (actor); callback_data.marker = CHAMPLAIN_MARKER (marker); g_timeout_add (1000, (GSourceFunc) gps_callback, &callback_data); clutter_actor_show (stage); clutter_main (); return 0; }
static gboolean for_each_thumb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, EogMapPlugin *plugin) { EogImage *image = NULL; gtk_tree_model_get (model, iter, EOG_LIST_STORE_EOG_IMAGE, &image, -1); if (!image) { return FALSE; } create_marker (image, plugin); g_object_unref (image); return FALSE; }