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