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
ekg
windows.h
Idź do dokumentacji tego pliku.
1
/* $Id$ */
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 "
commands.h
"
27
#include "
dynstuff.h
"
28
#include "
sessions.h
"
29
#include "
themes.h
"
30
31
#ifdef HAVE_REGEX_H
32
#include <sys/types.h>
33
#include <regex.h>
34
#endif
35
36
#ifdef __cplusplus
37
extern
"C"
{
38
#endif
39
40
typedef
struct
{
41
void
*
w
;
/* window, if NULL it means current */
42
int
casense : 2;
/* 0 - ignore case; 1 - don't ignore case, -1 - use global variable */
43
unsigned
int
lock : 1;
/* if 0, don't update */
44
unsigned
int
isregex : 1;
/* 1 - in target regexp */
45
#ifdef HAVE_REGEX_H
46
regex_t reg;
/* regexp compilated expression */
47
#endif
48
char
*
expression
;
/* expression */
49
}
window_lastlog_t
;
50
51
typedef
enum
{
52
EKG_WINACT_NONE
= 0,
/* No activity in window */
53
EKG_WINACT_JUNK
,
/* Junks: status change, irc join/part, etc. */
54
EKG_WINACT_MSG
,
/* Message, but not to us */
55
EKG_WINACT_IMPORTANT
/* important message */
56
}
winact_t
;
57
58
typedef
struct
window
{
59
struct
window
*
next
;
60
61
unsigned
short
id
;
/* numer okna */
62
char
*
target
;
/* nick query albo inna nazwa albo NULL */
63
char
*
alias
;
/* name for display */
64
session_t
*
session
;
/* której sesji dotyczy okno */
65
66
unsigned
short
left
,
top
;
/* pozycja (x, y) względem początku ekranu */
67
unsigned
short
width
,
height
;
/* wymiary okna */
68
69
unsigned
int
act
:
EKG_WINACT_MSG
;
/* activity: 1 - status/junk; 2 - msg ; 3 - msg to us */
70
unsigned
int
in_typing
: 1;
/* user is composing a message to us */
71
unsigned
int
in_active
: 1;
/* user has sent some kind of message,
72
so we can start sending composing to him/her */
73
unsigned
int
out_active
: 1;
/* we 'started' sending messages to user (considered
74
ourselves active), so we shall say goodbye when done */
75
unsigned
int
more
: 1;
/* pojawiło się coś poza ekranem */
76
unsigned
int
floating
: 1;
/* czy pływające? */
77
unsigned
int
doodle
: 1;
/* czy do gryzmolenia? [we don't set it anywhere] */
78
79
unsigned
int
frames
: 4;
/* informacje o ramkach */
80
unsigned
int
edge
: 4;
/* okienko brzegowe */
81
82
unsigned
int
nowrap
: 1;
/* nie zawijamy linii */
83
unsigned
int
hide
: 1;
/* ukrywamy, bo jest zbyt duże */
84
85
time_t
last_update
;
/* czas ostatniego uaktualnienia */
86
unsigned
short
lock
;
/* blokowanie zmian w obrębie komendy */
87
88
struct
userlist
*
userlist
;
/* sometimes window may require separate userlist */
89
90
window_lastlog_t
*
lastlog
;
/* prywatne informacje lastloga */
91
void
*
priv_data
;
/* prywatne informacje ui */
92
}
window_t
;
93
94
#ifndef EKG2_WIN32_NOFUNCTION
95
96
extern
window_t
*
windows
;
97
extern
window_t
*
window_debug
;
98
extern
window_t
*
window_status
;
99
extern
window_t
*
window_current
;
100
101
extern
window_lastlog_t
*
lastlog_current
;
102
103
window_t
*
window_find
(
const
char
*target);
104
window_t
*
window_find_sa
(
session_t
*session,
const
char
*target,
int
session_null_means_no_session);
105
106
#define window_find_s(s, target) window_find_sa(s, target, 1)
/* XXX, need checking */
107
window_t
*
window_find_ptr
(
window_t
*w);
108
window_t
*
window_new
(
const
char
*target,
session_t
*session,
int
new_id);
109
void
window_kill
(
window_t
*w);
110
void
window_switch
(
int
id
);
111
window_t
*
window_exist
(
int
id
);
112
void
window_print
(
window_t
*w,
fstring_t
*
line
);
113
void
print_window_w
(
window_t
*w,
int
activity,
const
char
*theme, ...);
/* themes.c */
114
char
*
window_target
(
window_t
*
window
);
115
116
void
window_session_set
(
window_t
*w,
session_t
*newsession);
117
int
window_session_cycle
(
window_t
*w);
118
119
int
window_lock_inc
(
window_t
*w);
120
int
window_lock_dec
(
window_t
*w);
121
122
void
windows_destroy
(
void
);
123
#endif
124
125
COMMAND
(
cmd_window
);
126
127
#ifdef __cplusplus
128
}
129
#endif
130
131
#endif
/* __EKG_WINDOW_H */
132
133
/*
134
* Local Variables:
135
* mode: c
136
* c-file-style: "k&r"
137
* c-basic-offset: 8
138
* indent-tabs-mode: t
139
* End:
140
*/
Wygenerowano Śr, 10 paź 2012 05:11:34 dla ekg2 programem
1.8.1.1