ekg2
Strona główna
Dodatkowe strony
Moduły
Struktury Danych
Pliki
Lista plików
Globalne
All
Struktury Danych
Pliki
Funkcje
Zmienne
Definicje typów
Wyliczenia
Wartości wyliczeń
Definicje
Grupay
Strony
remote
windows.h
Idź do dokumentacji tego pliku.
1
/* $Id: windows.h 4412 2008-08-17 12:28:15Z peres $ */
2
3
/*
4
* (C) Copyright 2003 Wojtek Kaniewski <wojtekka@irc.pl>
5
* 2004 Piotr Kupisiewicz <deli@rzepaknet.us>
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License Version 2 as
9
* published by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
*/
20
21
#ifndef __EKG_WINDOWS_H
22
#define __EKG_WINDOWS_H
23
24
#include "ekg2-config.h"
25
26
#include <time.h>
27
28
#ifdef HAVE_REGEX_H
29
#include <sys/types.h>
30
#include <regex.h>
31
#endif
32
33
#include "
sessions.h
"
34
#include "
themes.h
"
35
36
typedef
struct
{
37
void
*w;
/* window, if NULL it means current */
38
int
casense : 2;
/* 0 - ignore case; 1 - don't ignore case, -1 - use global variable */
39
unsigned
int
lock : 1;
/* if 0, don't update */
40
unsigned
int
isregex : 1;
/* 1 - in target regexp */
41
#ifdef HAVE_REGEX_H
42
regex_t reg;
/* regexp compilated expression */
43
#endif
44
char
*expression;
/* expression */
45
}
window_lastlog_t
;
46
47
typedef
struct
window
{
48
struct
window
*
next
;
49
50
unsigned
short
id
;
/* ekg2-remote: OK */
51
char
*
target
;
/* ekg2-remote: OK */
52
char
*
alias
;
/* ekg2-remote: OK */
53
session_t
*
session
;
/* ekg2-remote: OK */
54
55
unsigned
short
left
,
top
;
/* pozycja (x, y) względem początku ekranu */
56
unsigned
short
width
,
height
;
/* wymiary okna */
57
58
unsigned
int
act
: 2;
/* activity: 1 - status/junk; 2 - msg ; 3 - msg to us */
59
unsigned
int
in_typing
: 1;
/* user is composing a message to us */
60
unsigned
int
in_active
: 1;
/* user has sent some kind of message,
61
so we can start sending composing to him/her */
62
unsigned
int
out_active
: 1;
/* we 'started' sending messages to user (considered
63
ourselves active), so we shall say goodbye when done */
64
unsigned
int
more
: 1;
/* pojawiło się coś poza ekranem */
65
unsigned
int
floating
: 1;
/* czy pływające? */
66
unsigned
int
doodle
: 1;
/* czy do gryzmolenia? [we don't set it anywhere] */
67
68
unsigned
int
frames
: 4;
/* informacje o ramkach */
69
unsigned
int
edge
: 4;
/* okienko brzegowe */
70
71
unsigned
int
nowrap
: 1;
/* nie zawijamy linii */
72
unsigned
int
hide
: 1;
/* ukrywamy, bo jest zbyt duże */
73
74
time_t
last_update
;
/* czas ostatniego uaktualnienia */
75
unsigned
short
lock
;
/* ekg2-remote, always: 0, shoulnd't hurt (only CPU a little) */
/* sometimes... */
76
77
struct
userlist
*
userlist
;
/* sometimes window may require separate userlist */
78
79
window_lastlog_t
*
lastlog
;
/* prywatne informacje lastloga */
80
void
*
private
;
/* prywatne informacje ui */
81
82
/* ekg2-remote ABI */
83
char
*
irctopic
;
84
char
*
irctopicby
;
85
char
*
ircmode
;
86
}
window_t
;
87
88
typedef
enum
{
89
EKG_WINACT_NONE
= 0,
/* No activity in window */
90
EKG_WINACT_JUNK
,
/* Junks: status change, irc join/part, etc. */
91
EKG_WINACT_MSG
,
/* Message, but not to us */
92
EKG_WINACT_IMPORTANT
/* important message */
93
}
winact_t
;
94
95
extern
window_t
*
windows
;
96
extern
window_t
*
window_debug
;
97
extern
window_t
*
window_status
;
98
extern
window_t
*
window_current
;
99
100
extern
window_lastlog_t
*
lastlog_current
;
101
102
window_t
*
window_find
(
const
char
*target);
103
window_t
*
window_find_sa
(
session_t
*
session
,
const
char
*target,
int
session_null_means_no_session);
104
105
#define window_find_s(s, target) window_find_sa(s, target, 1)
/* XXX, need checking */
106
window_t
*
window_find_ptr
(
window_t
*w);
107
window_t
*
window_new
(
const
char
*target,
session_t
*
session
,
int
new_id);
108
window_t
*
remote_window_new
(
int
id
,
const
char
*target);
109
void
window_kill
(
window_t
*w);
110
void
remote_window_kill
(
int
id
);
111
void
window_switch
(
int
id
);
112
void
remote_window_switch
(
int
id
);
113
window_t
*
window_exist
(
int
id
);
114
void
print_window_w
(
window_t
*w,
int
activity,
const
char
*theme, ...);
/* themes.c */
115
void
remote_print_window
(
int
id
, time_t ts,
char
*data);
116
char
*
window_target
(
window_t
*
window
);
117
118
void
window_session_set
(
window_t
*w,
session_t
*new_session);
119
int
window_session_cycle
(
window_t
*w);
120
121
void
windows_destroy
(
void
);
122
123
void
windows_lock_all
();
124
void
windows_unlock_all
();
125
126
#endif
/* __EKG_WINDOW_H */
127
128
/*
129
* Local Variables:
130
* mode: c
131
* c-file-style: "k&r"
132
* c-basic-offset: 8
133
* indent-tabs-mode: t
134
* End:
135
*/
Wygenerowano N, 10 lut 2013 05:08:19 dla ekg2 programem
1.8.3.1