Idź do dokumentacji tego pliku.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EKG_WINDOWS_H
00022 #define __EKG_WINDOWS_H
00023
00024 #include "ekg2-config.h"
00025
00026 #include <time.h>
00027
00028 #ifdef HAVE_REGEX_H
00029 #include <sys/types.h>
00030 #include <regex.h>
00031 #endif
00032
00033 #include "sessions.h"
00034 #include "themes.h"
00035
00036 typedef struct {
00037 void *w;
00038 int casense : 2;
00039 unsigned int lock : 1;
00040 unsigned int isregex : 1;
00041 #ifdef HAVE_REGEX_H
00042 regex_t reg;
00043 #endif
00044 char *expression;
00045 } window_lastlog_t;
00046
00047 typedef struct window {
00048 struct window *next;
00049
00050 unsigned short id;
00051 char *target;
00052 char *alias;
00053 session_t *session;
00054
00055 unsigned short left, top;
00056 unsigned short width, height;
00057
00058 unsigned int act : 2;
00059 unsigned int in_typing : 1;
00060 unsigned int in_active : 1;
00061
00062 unsigned int out_active : 1;
00063
00064 unsigned int more : 1;
00065 unsigned int floating : 1;
00066 unsigned int doodle : 1;
00067
00068 unsigned int frames : 4;
00069 unsigned int edge : 4;
00070
00071 unsigned int nowrap : 1;
00072 unsigned int hide : 1;
00073
00074 time_t last_update;
00075 unsigned short lock;
00076
00077 struct userlist *userlist;
00078
00079 window_lastlog_t *lastlog;
00080 void *private;
00081
00082
00083 char *irctopic;
00084 char *irctopicby;
00085 char *ircmode;
00086 } window_t;
00087
00088 typedef enum {
00089 EKG_WINACT_NONE = 0,
00090 EKG_WINACT_JUNK,
00091 EKG_WINACT_MSG,
00092 EKG_WINACT_IMPORTANT
00093 } winact_t;
00094
00095 extern window_t *windows;
00096 extern window_t *window_debug;
00097 extern window_t *window_status;
00098 extern window_t *window_current;
00099
00100 extern window_lastlog_t *lastlog_current;
00101
00102 window_t *window_find(const char *target);
00103 window_t *window_find_sa(session_t *session, const char *target, int session_null_means_no_session);
00104
00105 #define window_find_s(s, target) window_find_sa(s, target, 1)
00106 window_t *window_find_ptr(window_t *w);
00107 window_t *window_new(const char *target, session_t *session, int new_id);
00108 window_t *remote_window_new(int id, const char *target);
00109 void window_kill(window_t *w);
00110 void remote_window_kill(int id);
00111 void window_switch(int id);
00112 void remote_window_switch(int id);
00113 window_t *window_exist(int id);
00114 void print_window_w(window_t *w, int activity, const char *theme, ...);
00115 void remote_print_window(int id, time_t ts, char *data);
00116 char *window_target(window_t *window);
00117
00118 void window_session_set(window_t *w, session_t *new_session);
00119 int window_session_cycle(window_t *w);
00120
00121 void windows_destroy(void);
00122
00123 void windows_lock_all();
00124 void windows_unlock_all();
00125
00126 #endif
00127
00128
00129
00130
00131
00132
00133
00134
00135