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 "commands.h"
00027 #include "dynstuff.h"
00028 #include "sessions.h"
00029 #include "themes.h"
00030
00031 #ifdef HAVE_REGEX_H
00032 #include <sys/types.h>
00033 #include <regex.h>
00034 #endif
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040 typedef struct {
00041 void *w;
00042 int casense : 2;
00043 unsigned int lock : 1;
00044 unsigned int isregex : 1;
00045 #ifdef HAVE_REGEX_H
00046 regex_t reg;
00047 #endif
00048 char *expression;
00049 } window_lastlog_t;
00050
00051 typedef enum {
00052 EKG_WINACT_NONE = 0,
00053 EKG_WINACT_JUNK,
00054 EKG_WINACT_MSG,
00055 EKG_WINACT_IMPORTANT
00056 } winact_t;
00057
00058 typedef struct window {
00059 struct window *next;
00060
00061 unsigned short id;
00062 char *target;
00063 char *alias;
00064 session_t *session;
00065
00066 unsigned short left, top;
00067 unsigned short width, height;
00068
00069 unsigned int act : EKG_WINACT_MSG;
00070 unsigned int in_typing : 1;
00071 unsigned int in_active : 1;
00072
00073 unsigned int out_active : 1;
00074
00075 unsigned int more : 1;
00076 unsigned int floating : 1;
00077 unsigned int doodle : 1;
00078
00079 unsigned int frames : 4;
00080 unsigned int edge : 4;
00081
00082 unsigned int nowrap : 1;
00083 unsigned int hide : 1;
00084
00085 time_t last_update;
00086 unsigned short lock;
00087
00088 struct userlist *userlist;
00089
00090 window_lastlog_t *lastlog;
00091 void *priv_data;
00092 } window_t;
00093
00094 #ifndef EKG2_WIN32_NOFUNCTION
00095
00096 extern window_t *windows;
00097 extern window_t *window_debug;
00098 extern window_t *window_status;
00099 extern window_t *window_current;
00100
00101 extern window_lastlog_t *lastlog_current;
00102
00103 window_t *window_find(const char *target);
00104 window_t *window_find_sa(session_t *session, const char *target, int session_null_means_no_session);
00105
00106 #define window_find_s(s, target) window_find_sa(s, target, 1)
00107 window_t *window_find_ptr(window_t *w);
00108 window_t *window_new(const char *target, session_t *session, int new_id);
00109 void window_kill(window_t *w);
00110 void window_switch(int id);
00111 window_t *window_exist(int id);
00112 void window_print(window_t *w, fstring_t *line);
00113 void print_window_w(window_t *w, int activity, const char *theme, ...);
00114 char *window_target(window_t *window);
00115
00116 void window_session_set(window_t *w, session_t *newsession);
00117 int window_session_cycle(window_t *w);
00118
00119 int window_lock_inc(window_t *w);
00120 int window_lock_dec(window_t *w);
00121
00122 void windows_destroy(void);
00123 #endif
00124
00125 COMMAND(cmd_window);
00126
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130
00131 #endif
00132
00133
00134
00135
00136
00137
00138
00139
00140