diff options
author | lemort | 2008-01-21 09:50:11 +0000 |
---|---|---|
committer | lemort | 2008-01-21 09:50:11 +0000 |
commit | cfcdf878e9b01161605f74f079119109dd07d4aa (patch) | |
tree | c2dab1ad8d25f4565c57478d288da3af196f9acf /generic/WindowUtils.h | |
parent | f897309da7f5d145e504ccf427e8821cbda7c1e6 (diff) | |
download | tkzinc-cfcdf878e9b01161605f74f079119109dd07d4aa.zip tkzinc-cfcdf878e9b01161605f74f079119109dd07d4aa.tar.gz tkzinc-cfcdf878e9b01161605f74f079119109dd07d4aa.tar.bz2 tkzinc-cfcdf878e9b01161605f74f079119109dd07d4aa.tar.xz |
Ajout d'une pseudo-librairie de fonctions utiles au reparentage de fenetre. Le code a ete externalise pour ne pas polluer/allonger le code de Window.c
Cette pseudo librairie conteient des fonctions pour:
- trouver une fenetre a partir de son nom
- enlever/restaurer la decoration d'une fenetre
- enlever une fenetre de la barre des taches
Diffstat (limited to 'generic/WindowUtils.h')
-rw-r--r-- | generic/WindowUtils.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/generic/WindowUtils.h b/generic/WindowUtils.h new file mode 100644 index 0000000..e641580 --- /dev/null +++ b/generic/WindowUtils.h @@ -0,0 +1,98 @@ +/* + * WindowUtils.h -- routines to manipulate windows + * + * Authors : Christophe Berthuet, Alexandre Lemort + * Creation date : Fri oct 12 14:47:42 2007 + * + */ + + +#include "tkZinc.h" + + +#ifdef _WIN32 +/* Windows */ +#include <windows.h> + +#else +/* Linux */ +#include <X11/Xlib.h> +#include <X11/Xutil.h> + +#endif /* ifdef _WIN32 */ + + + + + + + +/* +************************************* + * + * Platform specific functions + * + ************************************* + */ +#ifdef _WIN32 + +/* + *----------------------------------- + * + * Win32 + * + *----------------------------------- + */ + +/* + * Retrieves the window handler of a window identified by its title + */ +HWND SearchWindowByTitle(char *title, Display *display, HWND root, int depth); + + +/* + * Add/remove window decoration + */ +void restoreWindowStyle(HWND window, LONG windowStyle); +LONG removeWindowDecoration(HWND window); + + + +#else + + +/* + *----------------------------------- + * + * Linux + * + *----------------------------------- + */ + + +/* + * Retrieves the window handler of a window identified by its title + */ +Window SearchWindowByTitle(char *title, Display *display, Window root, int depth); + + +/* + * Withdraw a window from desktop + */ +void withdrawWindowFromDesktop (Display *display, Window window, int screenNum); + + +#endif /* ifdef _WIN32 */ + + + + +/* + ************************************ + * + * Common functions + * + ************************************ + */ + + |