Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / messages.h
blob4ff216b11e6a8abdc06ac5eec14ad5a2380616c2
1 #ifndef MESSAGES_H
2 #define MESSAGES_H
4 #include <sys/types.h>
5 #include <sys/ipc.h>
6 #include <sys/msg.h>
8 #define MESSAGE_TO_PLUGIN 1
9 #define MESSAGE_FROM_PLUGIN 2
10 #include "messages.inc"
12 class Messages
14 public:
15 Messages(int input_flag, int output_flag, int id = -1);
16 ~Messages();
18 char* get_message_buffer();
20 int read_message(char *text);
21 char* read_message_raw(); // return the raw text in the buffer
22 int read_message(int *command, char *text);
23 long read_message(); // return the number contained in the message
24 int read_message(long *value1, long *value2);
25 int read_message(long *command, long *value1, long *value2);
26 int read_message(long *command, long *value1, long *value2, long *value3);
27 float read_message_f();
28 int read_message_f(float *value1, float *value2);
29 int read_message_f(float *value1, float *value2, float *value3);
30 int read_message_f(float *value1, float *value2, float *value3, float *value4);
32 int write_message(char *text);
33 int write_message_raw(); // send the text currently in the buffer
34 int write_message(int command, char *text);
35 int write_message_flagged(int output_flag, int command);
36 int write_message(int number);
37 int write_message(long command, long value);
38 int write_message(long command, long value1, long value2);
39 int write_message(long command, long value1, long value2, long value3);
40 int write_message_f(float number);
41 int write_message_f(float value1, float value2);
42 int write_message_f(float value1, float value2, float value3);
43 int write_message_f(float value1, float value2, float value3, float value4);
44 int get_id();
46 int msgid;
47 int client;
48 int input_flag;
49 int output_flag;
50 struct buffer_ {
51 long mtype;
52 char text[MESSAGESIZE];
53 } buffer;
56 #endif
58 // Local Variables:
59 // mode: C++
60 // c-file-style: "linux"
61 // End: