1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
/*
* [ ctwm ]
*
* Copyright 1992, 2005, 2007 Stefan Monnier.
*
* Permission to use, copy, modify and distribute this software [ctwm] and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting documen-
* tation, and that the name of Stefan Monnier not be used in adverti-
* sing or publicity pertaining to distribution of the software without
* specific, written prior permission. Stefan Monnier make no represen-
* tations about the suitability of this software for any purpose. It is
* provided "as is" without express or implied warranty.
*
* Stefan Monnier DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
* EVENT SHALL Stefan Monnier BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* Author: Stefan Monnier [ monnier@lia.di.epfl.ch ]
*
* $Id: otp.h,v 1.7 2005/04/08 16:59:17 monnier Exp $
*
* handles all the OnTopPriority-related issues.
*
*/
#ifndef _CTWM_OTP_H
#define _CTWM_OTP_H
/* kind of window */
typedef enum WinType { WinWin, IconWin } WinType;
/* Wrapper functions to maintain the internal list uptodate. */
int ReparentWindow(Display *display, TwmWindow *twm_win,
WinType wintype, Window parent, int x, int y);
void ReparentWindowAndIcon(Display *display, TwmWindow *twm_win,
Window parent, int win_x, int win_y,
int icon_x, int icon_y);
/* misc functions that are not specific to OTP */
bool isTransientOf(TwmWindow *, TwmWindow *);
bool isSmallTransientOf(TwmWindow *, TwmWindow *);
bool isGroupLeaderOf(TwmWindow *, TwmWindow *);
bool isGroupLeader(TwmWindow *);
/* functions to "move" windows */
void OtpRaise(TwmWindow *, WinType);
void OtpLower(TwmWindow *, WinType);
void OtpRaiseLower(TwmWindow *, WinType);
void OtpTinyRaise(TwmWindow *, WinType);
void OtpTinyLower(TwmWindow *, WinType);
void OtpCirculateSubwindows(VirtualScreen *vs, int direction);
void OtpHandleCirculateNotify(VirtualScreen *vs, TwmWindow *twm_win,
WinType wintype, int place);
/* functions to change a window's OTP value */
void OtpSetPriority(TwmWindow *, WinType, int, int);
void OtpChangePriority(TwmWindow *, WinType, int);
void OtpSwitchPriority(TwmWindow *, WinType);
void OtpToggleSwitching(TwmWindow *, WinType);
void OtpRecomputeValues(TwmWindow *);
void OtpForcePlacement(TwmWindow *, int, TwmWindow *);
void OtpReassignIcon(TwmWindow *twm_win, Icon *old_icon);
void OtpFreeIcon(TwmWindow *twm_win);
/* functions to manage the preferences. The second arg specifies icon prefs */
void OtpScrInitData(ScreenInfo *);
name_list **OtpScrSwitchingL(ScreenInfo *, WinType);
name_list **OtpScrPriorityL(ScreenInfo *, WinType, int);
void OtpScrSetSwitching(ScreenInfo *, WinType, bool);
void OtpScrSetZero(ScreenInfo *, WinType, int);
/* functions to inform OTP-manager of window creation/destruction */
void OtpAdd(TwmWindow *, WinType);
void OtpRemove(TwmWindow *, WinType);
/* Iterators. */
TwmWindow *OtpBottomWin(void);
TwmWindow *OtpTopWin(void);
TwmWindow *OtpNextWinUp(TwmWindow *);
TwmWindow *OtpNextWinDown(TwmWindow *);
/* Other access functions */
int OtpGetPriority(TwmWindow *twm_win);
/* Other debugging functions */
bool OtpCheckConsistency(void);
#endif /* _CTWM_OTP_H */
|