void call_actor_func(caStack* stack) { #if 0 // actorList disabled const char* actorSymbol = circa_string_input(stack, 0); caValue* msg = circa_input(stack, 1); if (stack->world == NULL) { circa_output_error(stack, "Stack was not created with World"); return; } circa_actor_run_message(stack->world, actorName, msg); #endif }
void GLWidget::onInputEvent(caValue* event) { scripts_pre_message_send(); caValue* msg = circa_alloc_list(2); circa_set_string(circa_index(msg, 0), "onInputEvent"); circa_move(event, circa_index(msg, 1)); circa_dealloc_value(event); circa_actor_run_message(g_world, "View", msg); circa_dealloc_value(msg); scripts_post_message_send(); }
int main(int argc, char** argv) { caWorld* world = circa_initialize(); circa_add_module_search_path(world, "tests/embed"); int iteration = 0; while (true) { caValue* value = circa_alloc_value(); circa_set_int(value, iteration); circa_actor_run_message(world, "TestA", value); sleep(1); iteration++; } circa_shutdown(world); }
void GLWidget::paintEvent(QPaintEvent*) { QPainter painter; painter.begin(this); painter.setRenderHint(QPainter::Antialiasing); scripts_pre_message_send(); // call onPaintEvent caValue* msg = circa_alloc_list(2); circa_set_string(circa_index(msg, 0), "onPaintEvent"); circa_set_typed_pointer(circa_index(msg, 1), circa_find_type(NULL, "Painter"), &painter); circa_actor_run_message(g_world, "View", msg); circa_dealloc_value(msg); scripts_post_message_send(); painter.end(); }