summaryrefslogtreecommitdiffstats
path: root/kscreensaver/kdesavers/vm.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit8b2aa1b5301ab60368a03e36df4ff5216726e87d (patch)
tree36163d4ee667c23b5cf232df2f3004cd0a76202a /kscreensaver/kdesavers/vm.h
downloadtdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.tar.gz
tdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/kdesavers/vm.h')
-rw-r--r--kscreensaver/kdesavers/vm.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/kscreensaver/kdesavers/vm.h b/kscreensaver/kdesavers/vm.h
new file mode 100644
index 00000000..dc64d241
--- /dev/null
+++ b/kscreensaver/kdesavers/vm.h
@@ -0,0 +1,52 @@
+#ifndef __VM_H__
+#define __VM_H__
+
+#include <stdlib.h>
+#include <stdio.h> /* !!! */
+#include <limits.h>
+#include "vm_random.h"
+
+#define VM_OP_STOP 1
+#define VM_OP_COPY 2
+#define VM_OP_EXEC 3
+#define VM_OP_WAIT 4
+#define VM_OP_PUSH (INT_MAX/2)
+
+struct tvm_process {
+ int position;
+ int* stack;
+ int stack_top;
+ int age;
+ int reverse;
+ struct tvm_process* next;
+};
+
+struct tvm_pool {
+ int* area;
+ int area_size;
+ struct tvm_process* processes;
+ int max_stack_size;
+ int max_threads_num;
+ int reverse_enabled;
+ struct vm_random_data vm_random_data;
+};
+
+int vm_init_pool( struct tvm_pool** pool,
+ int area_size,
+ int max_stack_size,
+ int max_threads_num );
+void vm_modify( struct tvm_pool* pool,
+ int position,
+ int op );
+void vm_exec( struct tvm_pool* pool,
+ int position,
+ int age,
+ int reverse );
+void vm_enable_reverse( struct tvm_pool* pool,
+ const int enabled );
+int vm_get_reverse( struct tvm_pool* pool );
+void vm_iterate( struct tvm_pool* pool,
+ char* modified );
+void vm_done_pool( struct tvm_pool* pool );
+
+#endif /* !defined( __VM_H__ ) */