Apply window-jump fix (D. Fries).
[fvwm.git] / modules / FvwmPager / FvwmPager.h
blob69276dc9fca4f0b68b1df9bd3442d95c0b0b57e2
1 /* -*-c-*- */
2 #include "libs/Picture.h"
3 #include "libs/vpacket.h"
4 #include "libs/Flocale.h"
6 typedef struct ScreenInfo
8 unsigned long screen;
9 int MyDisplayWidth; /* my copy of DisplayWidth(dpy, screen) */
10 int MyDisplayHeight; /* my copy of DisplayHeight(dpy, screen) */
12 char *FvwmRoot; /* the head of the fvwm window list */
14 Window Root;
15 Window Pager_w;
16 Window label_w;
17 Window balloon_w;
19 Font PagerFont; /* font struct for window labels in pager (optional)*/
21 GC NormalGC; /* used for window names and setting backgrounds */
22 GC MiniIconGC; /* used for clipping mini-icons */
23 GC whGC, wsGC, ahGC, asGC; /* used for 3d shadows on mini-windows */
24 GC label_gc;
25 GC balloon_gc;
27 int balloon_desk;
28 char *balloon_label; /* the label displayed inside the balloon */
29 char *Hilite; /* the fvwm window that is highlighted
30 * except for networking delays, this is the
31 * window which REALLY has the focus */
32 unsigned VScale; /* Panner scale factor */
33 int VxMax; /* Max location for top left of virt desk*/
34 int VyMax;
35 int VxPages; /* desktop size */
36 int VyPages;
37 int VWidth; /* Size of virtual desktop */
38 int VHeight;
39 int Vx; /* Current loc for top left of virt desk */
40 int Vy;
41 int CurrentDesk;
42 Pixmap sticky_gray_pixmap;
43 Pixmap light_gray_pixmap;
44 Pixmap gray_pixmap;
45 Pixel black;
46 } ScreenInfo;
48 typedef struct pager_window
50 char *t;
51 Window w;
52 Window frame;
53 int x;
54 int y;
55 int width;
56 int height;
57 int desk;
58 int frame_x;
59 int frame_y;
60 int frame_width;
61 int frame_height;
62 int title_height;
63 int border_width;
64 int icon_x;
65 int icon_y;
66 int icon_width;
67 int icon_height;
68 Pixel text;
69 Pixel back;
70 window_flags flags;
71 action_flags allowed_actions;
72 struct
74 unsigned is_mapped : 1;
75 } myflags;
76 Window icon_w;
77 Window icon_pixmap_w;
78 char *icon_name;
79 char *window_name;
80 char *res_name;
81 char *res_class;
82 char *window_label; /* This is displayed inside the mini window */
83 FvwmPicture mini_icon;
84 int pager_view_x;
85 int pager_view_y;
86 int pager_view_width;
87 int pager_view_height;
88 int icon_view_x;
89 int icon_view_y;
90 int icon_view_width;
91 int icon_view_height;
93 Window PagerView;
94 Window IconView;
96 struct pager_window *next;
97 } PagerWindow;
99 typedef struct balloon_window
101 FlocaleFont *Ffont;
102 int height; /* height of balloon window based on font */
103 int desk;
104 } BalloonWindow;
106 typedef struct desk_info
108 Window w;
109 Window title_w;
110 Window CPagerWin;
111 FvwmPicture *bgPixmap; /* Pixmap used as background. */
112 BalloonWindow balloon;
113 int colorset;
114 int highcolorset;
115 int ballooncolorset;
116 char *Dcolor;
117 char *label;
118 GC NormalGC;
119 GC DashedGC; /* used the the pages boundary lines */
120 GC HiliteGC; /* used for hilighting the active desk */
121 GC rvGC; /* used for drawing hilighted desk title */
122 } DeskInfo;
124 typedef struct pager_string_list
126 struct pager_string_list *next;
127 int desk;
128 int colorset;
129 int highcolorset;
130 int ballooncolorset;
131 char *Dcolor;
132 char *label;
133 FvwmPicture *bgPixmap; /* Pixmap used as background. */
134 } PagerStringList;
138 * Subroutine Prototypes
141 char *GetNextToken(char *indata,char **token);
142 void Loop(int *fd);
143 RETSIGTYPE DeadPipe(int nonsense);
144 void process_message(FvwmPacket*);
145 void ParseOptions(void);
147 void list_add(unsigned long *body);
148 void list_configure(unsigned long *body);
149 void list_config_info(unsigned long *body);
150 void list_destroy(unsigned long *body);
151 void list_focus(unsigned long *body);
152 void list_toggle(unsigned long *body);
153 void list_new_page(unsigned long *body);
154 void list_new_desk(unsigned long *body);
155 void list_raise(unsigned long *body);
156 void list_lower(unsigned long *body);
157 void list_unknown(unsigned long *body);
158 void list_iconify(unsigned long *body);
159 void list_deiconify(unsigned long *body, unsigned long length);
160 void list_window_name(unsigned long *body,unsigned long type);
161 void list_icon_name(unsigned long *body);
162 void list_class(unsigned long *body);
163 void list_res_name(unsigned long *body);
164 void list_mini_icon(unsigned long *body);
165 void list_restack(unsigned long *body, unsigned long length);
166 void list_property_change(unsigned long *body);
167 void list_end(void);
168 void list_reply(unsigned long *body);
169 int My_XNextEvent(Display *dpy, XEvent *event);
171 /* Stuff in x_pager.c */
172 void change_colorset(int colorset);
173 void initialize_pager(void);
174 void initialize_viz_pager(void);
175 Pixel GetColor(char *name);
176 void DispatchEvent(XEvent *Event);
177 void ReConfigure(void);
178 void ReConfigureAll(void);
179 void update_pr_transparent_windows(void);
180 void MovePage(Bool is_new_desk);
181 void DrawGrid(int desk,int erase,Window ew,XRectangle *r);
182 void DrawIconGrid(int erase);
183 void SwitchToDesk(int Desk);
184 void SwitchToDeskAndPage(int Desk, XEvent *Event);
185 void AddNewWindow(PagerWindow *prev);
186 void MoveResizePagerView(PagerWindow *t, Bool do_force_redraw);
187 void ChangeDeskForWindow(PagerWindow *t,long newdesk);
188 void MoveStickyWindow(Bool is_new_page, Bool is_new_desk);
189 void Hilight(PagerWindow *, int);
190 void Scroll(int window_w, int window_h, int x, int y, int Desk,
191 Bool do_scroll_icon);
192 void MoveWindow(XEvent *Event);
193 void BorderWindow(PagerWindow *t);
194 void BorderIconWindow(PagerWindow *t);
195 void LabelWindow(PagerWindow *t);
196 void LabelIconWindow(PagerWindow *t);
197 void PictureWindow(PagerWindow *t);
198 void PictureIconWindow(PagerWindow *t);
199 void ReConfigureIcons(Bool do_reconfigure_desk_only);
200 void IconSwitchPage(XEvent *Event);
201 void IconMoveWindow(XEvent *Event,PagerWindow *t);
202 void HandleEnterNotify(XEvent *Event);
203 void HandleExpose(XEvent *Event);
204 void MapBalloonWindow(PagerWindow *t, Bool is_icon_view);
205 void UnmapBalloonWindow(void);
206 void DrawInBalloonWindow(int i);
207 void HandleScrollDone(void);