~ctwm/ctwm/trunk

304.1.2 by Matthew Fuller
Run 'make indent' to reindent the world.
1
/*
554.1.8 by Matthew Fuller
Pull out long form of Stefan's license bits.
2
 * Copyright 1992, 2005, 2007 Stefan Monnier.
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
3
 *
4
 * $Id: otp.h,v 1.7 2005/04/08 16:59:17 monnier Exp $
5
 *
6
 * handles all the OnTopPriority-related issues.
7
 *
8
 */
9
484 by Matthew Fuller
Consistently rename all the include guards so they match the filename,
10
#ifndef _CTWM_OTP_H
11
#define _CTWM_OTP_H
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
12
13
/* kind of window */
14
typedef enum WinType { WinWin, IconWin } WinType;
15
575.2.9 by Matthew Fuller
Hide these #define's behind #ifdef EWMH; currently all the aflags are
16
/* Flags that might alter OTP (currently only EWMH bits) */
17
#ifdef EWMH
575.2.5 by Matthew Fuller
Remove accidentally added ;'s.
18
#define OTP_AFLAG_ABOVE      (1 << 0)
19
#define OTP_AFLAG_BELOW      (1 << 1)
575.2.7 by Matthew Fuller
Actually, add back _FULLSCREEN as an aflag, and add handling to it in
20
#define OTP_AFLAG_FULLSCREEN (1 << 2)
575.2.9 by Matthew Fuller
Hide these #define's behind #ifdef EWMH; currently all the aflags are
21
#endif
575.2.1 by Matthew Fuller
Add separate fields in the OWL for tracking the base and alteration
22
23
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
24
/* Wrapper functions to maintain the internal list uptodate.  */
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
25
int ReparentWindow(Display *display, TwmWindow *twm_win,
26
                   WinType wintype, Window parent, int x, int y);
27
void ReparentWindowAndIcon(Display *display, TwmWindow *twm_win,
28
                           Window parent, int win_x, int win_y,
29
                           int icon_x, int icon_y);
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
30
31
/* misc functions that are not specific to OTP */
492.2.62 by Matthew Fuller
bool-ify otp. Most of these are completely trivial uses for the type
32
bool isTransientOf(TwmWindow *, TwmWindow *);
33
bool isSmallTransientOf(TwmWindow *, TwmWindow *);
34
bool isGroupLeaderOf(TwmWindow *, TwmWindow *);
35
bool isGroupLeader(TwmWindow *);
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
36
37
/* functions to "move" windows */
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
38
void OtpRaise(TwmWindow *, WinType);
39
void OtpLower(TwmWindow *, WinType);
40
void OtpRaiseLower(TwmWindow *, WinType);
41
void OtpTinyRaise(TwmWindow *, WinType);
42
void OtpTinyLower(TwmWindow *, WinType);
43
void OtpCirculateSubwindows(VirtualScreen *vs, int direction);
44
void OtpHandleCirculateNotify(VirtualScreen *vs, TwmWindow *twm_win,
45
                              WinType wintype, int place);
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
46
47
/* functions to change a window's OTP value */
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
48
void OtpSetPriority(TwmWindow *, WinType, int, int);
49
void OtpChangePriority(TwmWindow *, WinType, int);
50
void OtpSwitchPriority(TwmWindow *, WinType);
51
void OtpToggleSwitching(TwmWindow *, WinType);
575.2.18 by Matthew Fuller
Rename these funcs to better describe just what they do, and make them
52
void OtpRecomputePrefs(TwmWindow *);
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
53
void OtpForcePlacement(TwmWindow *, int, TwmWindow *);
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
54
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
55
void OtpReassignIcon(TwmWindow *twm_win, Icon *old_icon);
56
void OtpFreeIcon(TwmWindow *twm_win);
302.1.21 by Olaf 'Rhialto' Seibert
Improve tracking where Icon's Images come from, so that they can be freed
57
575.2.55 by Matthew Fuller
These flag bitmaps are unsigned, so make stuff manipulating them so as
58
void OtpSetAflagMask(TwmWindow *twm_win, unsigned mask, unsigned setto);
59
void OtpSetAflag(TwmWindow *twm_win, unsigned flag);
60
void OtpClearAflag(TwmWindow *twm_win, unsigned flag);
575.2.78 by Matthew Fuller
Better name.
61
void OtpStashAflagsFirstTime(TwmWindow *twm_win);
575.2.26 by Matthew Fuller
Break out the 'redo stacking' inner bit there into a separate func.
62
void OtpRestackWindow(TwmWindow *twm_win);
575.2.25 by Matthew Fuller
Rework the accepting of above/below messages in EWMH to set the flags
63
659.2.1 by Matthew Fuller
Commit original run at avoiding crashes with transient windows of
64
void OtpUnfocusWindow(TwmWindow *twm_win);
65
void OtpFocusWindow(TwmWindow *twm_win);
66
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
67
/* functions to manage the preferences. The second arg specifies icon prefs */
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
68
void OtpScrInitData(ScreenInfo *);
69
name_list **OtpScrSwitchingL(ScreenInfo *, WinType);
70
name_list **OtpScrPriorityL(ScreenInfo *, WinType, int);
492.2.62 by Matthew Fuller
bool-ify otp. Most of these are completely trivial uses for the type
71
void OtpScrSetSwitching(ScreenInfo *, WinType, bool);
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
72
void OtpScrSetZero(ScreenInfo *, WinType, int);
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
73
74
/* functions to inform OTP-manager of window creation/destruction */
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
75
void OtpAdd(TwmWindow *, WinType);
76
void OtpRemove(TwmWindow *, WinType);
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
77
78
/* Iterators.  */
492.2.28 by Matthew Fuller
extern is implicit and the only linkage specifier that's meaningful
79
TwmWindow *OtpBottomWin(void);
80
TwmWindow *OtpTopWin(void);
81
TwmWindow *OtpNextWinUp(TwmWindow *);
82
TwmWindow *OtpNextWinDown(TwmWindow *);
240.1.3 by Rhialto
4 - Added the remaining OnTopPriority changes from Stefan Monnier
83
84
/* Other access functions */
575.2.24 by Matthew Fuller
Create a special function to get the display-form OTP, and use it in
85
int OtpEffectiveDisplayPriority(TwmWindow *twm_win);
575.2.6 by Matthew Fuller
Add some functions for calcing the current effective priority of a
86
int OtpEffectivePriority(TwmWindow *twm_win);
579.1.2 by Matthew Fuller
Add functions to give a quick answer as to whether a window's OTP is
87
bool OtpIsFocusDependent(TwmWindow *twm_win);
240.1.9 by Olaf 'Rhialto' Seibert
More compiler warnings.
88
89
/* Other debugging functions */
492.2.62 by Matthew Fuller
bool-ify otp. Most of these are completely trivial uses for the type
90
bool OtpCheckConsistency(void);
240.1.9 by Olaf 'Rhialto' Seibert
More compiler warnings.
91
484 by Matthew Fuller
Consistently rename all the include guards so they match the filename,
92
#endif /* _CTWM_OTP_H */