summaryrefslogtreecommitdiff
path: root/ipl/packs/loadfuncpp/examples/coexp.cpp
blob: 6c3b1d1cfc6d0dc73d0fcfd0b0275f557f3cb8e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

/* Example of a C++ extension to icon via loadfunc,
 * without garbage collection difficulties.
 * Type 'make <platform>' to build.
 * For available <platform>s type 'make'.
 * Carl Sturtivant, 2007/9/25
 */

#include "loadfuncpp.h"

extern "C" int activate(int argc, value argv[]) {
	argv[0] = argv[1].activate();
    return SUCCEEDED;
}

extern "C" int refresh(int argc, value argv[]) {
	argv[0] = argv[1].refreshed();
    return SUCCEEDED;
}