2 #ifndef FVWMLIB_FSCRREN_H
3 #define FVWMLIB_FSCRREN_H
5 /* needs X11/Xlib.h and X11/Xutil.h */
17 FSCREEN_SPEC_GLOBAL
= 'g',
18 FSCREEN_SPEC_CURRENT
= 'c',
19 FSCREEN_SPEC_PRIMARY
= 'p',
20 FSCREEN_SPEC_WINDOW
= 'w'
33 #define FSCREEN_MANGLE_USPOS_HINTS_MAGIC ((short)-32109)
37 Bool
FScreenIsEnabled(void);
38 Bool
FScreenIsSLSEnabled(void);
39 void FScreenInit(Display
*dpy
);
40 void FScreenOnOff(Bool do_enable
);
41 Bool
FScreenConfigureSLSSize(int width
, int height
);
42 Bool
FScreenConfigureSLSScreens(int nscreens
, char *args
);
43 void FScreenSLSOnOff(Bool do_enable
);
44 /* Intended to be called by modules. Simply pass in the parameter from the
45 * config string sent by fvwm. */
46 void FScreenConfigureModule(char *args
);
47 const char* FScreenGetConfiguration(void); /* For use by fvwm */
48 void FScreenSetDefaultModuleScreen(char *scr_spec
);
49 void FScreenDisableRandR(void);
51 void FScreenSetPrimaryScreen(int scr
);
54 Bool
FScreenGetScrRect(
55 fscreen_scr_arg
*arg
, fscreen_scr_t screen
, int *x
, int *y
,
58 fscreen_scr_arg
*arg
, fscreen_scr_t screen
);
59 void FScreenTranslateCoordinates(
60 fscreen_scr_arg
*arg_src
, fscreen_scr_t screen_src
,
61 fscreen_scr_arg
*arg_dest
, fscreen_scr_t screen_dest
,
63 void FScreenGetResistanceRect(
64 int wx
, int wy
, unsigned int ww
, unsigned int wh
, int *x0
, int *y0
,
66 Bool
FScreenIsRectangleOnScreen(
67 fscreen_scr_arg
*arg
, fscreen_scr_t screen
, rectangle
*rec
);
68 void FScreenSpecToString(char *dest
, int space
, fscreen_scr_t screen
);
70 /* Clipping/positioning */
71 int FScreenClipToScreen(
72 fscreen_scr_arg
*arg
, fscreen_scr_t screen
, int *x
, int *y
, int w
,
74 void FScreenCenterOnScreen(
75 fscreen_scr_arg
*arg
, fscreen_scr_t screen
, int *x
, int *y
, int w
,
78 /* Geometry management */
79 int FScreenGetScreenArgument(char *scr_spec
, fscreen_scr_spec_t default_screen
);
80 int FScreenParseGeometryWithScreen(
81 char *parsestring
, int *x_return
, int *y_return
,
82 unsigned int *width_return
, unsigned int *height_return
,
84 int FScreenParseGeometry(
85 char *parsestring
, int *x_return
, int *y_return
,
86 unsigned int *width_return
, unsigned int *height_return
);
87 int FScreenGetGeometry(
88 char *parsestring
, int *x_return
, int *y_return
,
89 int *width_return
, int *height_return
, XSizeHints
*hints
, int flags
);
90 void FScreenMangleScreenIntoUSPosHints(fscreen_scr_t screen
, XSizeHints
*hints
);
91 fscreen_scr_t
FScreenFetchMangledScreenFromUSPosHints(XSizeHints
*hints
);
94 int FScreenGetRandrEventType(void);
95 Bool
FScreenHandleRandrEvent(
96 XEvent
*event
, int *old_w
, int *old_h
, int *new_w
, int *new_h
);
98 #endif /* FVWMLIB_FSCRREN_H */