4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
9 #ifndef ION_IONCORE_FRAME_H
10 #define ION_IONCORE_FRAME_H
12 #include <libtu/stringstore.h>
13 #include <libtu/setparam.h>
14 #include <libextl/extl.h>
21 #include "rectangle.h"
23 #include "frame-tabs-recalc.h"
25 #define FRAME_KEEP_FLAGS 0x0001
26 #define FRAME_SAVED_VERT 0x0008
27 #define FRAME_SAVED_HORIZ 0x0010
28 #define FRAME_SHADED 0x0020
29 #define FRAME_SHADED_TOGGLE 0x0040
30 /*#define FRAME_DEST_EMPTY 0x0100*/
31 #define FRAME_MAXED_VERT 0x0200
32 #define FRAME_MAXED_HORIZ 0x0400
33 #define FRAME_MIN_HORIZ 0x0800
35 /*#define FRAME_SZH_USEMINMAX 0x1000 */
36 /*#define FRAME_FWD_CWIN_RQGEOM 0x2000 */
45 FRAME_MODE_UNKNOWN_ALT
,
46 FRAME_MODE_FLOATING_ALT
,
47 FRAME_MODE_TRANSIENT_ALT
64 WRectangle saved_geom
;
67 void *quasiact_source
;
72 GrTransparency tr_mode
;
77 WFrameBarMode barmode
;
79 /* Parameters to calculate tab sizes. */
80 TabCalcParams tabs_params
;
85 extern WFrame
*create_frame(WWindow
*parent
, const WFitParams
*fp
,
86 WFrameMode mode
, char *name
);
87 extern bool frame_init(WFrame
*frame
, WWindow
*parent
, const WFitParams
*fp
,
88 WFrameMode mode
, char *name
);
89 extern void frame_deinit(WFrame
*frame
);
90 extern bool frame_rqclose(WFrame
*frame
);
94 extern void frame_set_mode(WFrame
*frame
, WFrameMode mode
);
95 extern WFrameMode
frame_mode(WFrame
*frame
);
97 /* Resize and reparent */
98 extern bool frame_fitrep(WFrame
*frame
, WWindow
*par
, const WFitParams
*fp
);
99 extern void frame_size_hints(WFrame
*frame
, WSizeHints
*hints_ret
);
102 extern void frame_activated(WFrame
*frame
);
103 extern void frame_inactivated(WFrame
*frame
);
106 extern int frame_nth_tab_w(WFrame
*frame
, int n
);
107 extern int frame_nth_tab_x(WFrame
*frame
, int n
);
108 extern int frame_tab_at_x(WFrame
*frame
, int x
);
109 extern void frame_update_attr_nth(WFrame
*frame
, int i
);
111 extern bool frame_set_shaded(WFrame
*frame
, int sp
);
112 extern bool frame_is_shaded(WFrame
*frame
);
113 extern bool frame_set_numbers(WFrame
*frame
, int sp
);
114 extern bool frame_is_numbers(WFrame
*frame
);
116 extern int frame_default_index(WFrame
*frame
);
119 extern void frame_managed_notify(WFrame
*frame
, WRegion
*sub
, WRegionNotify how
);
120 extern bool frame_managed_rqdispose(WFrame
*frame
, WRegion
*reg
);
122 extern WPHolder
*frame_prepare_manage_transient(WFrame
*frame
,
123 const WClientWin
*transient
,
124 const WManageParams
*param
,
128 extern ExtlTab
frame_get_configuration(WFrame
*frame
);
129 extern WRegion
*frame_load(WWindow
*par
, const WFitParams
*fp
, ExtlTab tab
);
130 extern void frame_do_load(WFrame
*frame
, ExtlTab tab
);
132 extern WHook
*frame_managed_changed_hook
;
134 extern WFrameMode
framemode_unalt(WFrameMode mode
);
136 #endif /* ION_IONCORE_FRAME_H */