1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- 2 3 mwm.h for the Openbox window manager 4 Copyright (c) 2003-2007 Dana Jansens 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 See the COPYING file for a copy of the GNU General Public License. 17 */ 18 19 #ifndef __ob__mwm_h 20 #define __ob__mwm_h 21 22 #include <glib.h> 23 24 typedef struct _ObMwmHints ObMwmHints; 25 26 /*! The MWM Hints as retrieved from the window property 27 This structure only contains 3 elements, even though the Motif 2.0 28 structure contains 5. We only use the first 3, so that is all gets 29 defined. 30 */ 31 struct _ObMwmHints 32 { 33 /*! A bitmask of ObMwmFlags values */ 34 guint flags; 35 /*! A bitmask of ObMwmFunctions values */ 36 guint functions; 37 /*! A bitmask of ObMwmDecorations values */ 38 guint decorations; 39 }; 40 41 /*! The number of elements in the ObMwmHints struct */ 42 #define OB_MWM_ELEMENTS 3 43 44 /*! Possible flags for MWM Hints (defined by Motif 2.0) */ 45 typedef enum 46 { 47 OB_MWM_FLAG_FUNCTIONS = 1 << 0, /*!< The MMW Hints define funcs */ 48 OB_MWM_FLAG_DECORATIONS = 1 << 1 /*!< The MWM Hints define decor */ 49 } ObMwmFlags; 50 51 /*! Possible functions for MWM Hints (defined by Motif 2.0) */ 52 typedef enum 53 { 54 OB_MWM_FUNC_ALL = 1 << 0, /*!< All functions */ 55 OB_MWM_FUNC_RESIZE = 1 << 1, /*!< Allow resizing */ 56 OB_MWM_FUNC_MOVE = 1 << 2, /*!< Allow moving */ 57 OB_MWM_FUNC_ICONIFY = 1 << 3, /*!< Allow to be iconfied */ 58 OB_MWM_FUNC_MAXIMIZE = 1 << 4 /*!< Allow to be maximized */ 59 #if 0 60 OM_MWM_FUNC_CLOSE = 1 << 5 /*!< Allow to be closed */ 61 #endif 62 } ObMwmFunctions; 63 64 /*! Possible decorations for MWM Hints (defined by Motif 2.0) */ 65 typedef enum 66 { 67 OB_MWM_DECOR_ALL = 1 << 0, /*!< All decorations */ 68 OB_MWM_DECOR_BORDER = 1 << 1, /*!< Show a border */ 69 OB_MWM_DECOR_HANDLE = 1 << 2, /*!< Show a handle (bottom) */ 70 OB_MWM_DECOR_TITLE = 1 << 3, /*!< Show a titlebar */ 71 #if 0 72 OB_MWM_DECOR_MENU = 1 << 4, /*!< Show a menu */ 73 #endif 74 OB_MWM_DECOR_ICONIFY = 1 << 5, /*!< Show an iconify button */ 75 OB_MWM_DECOR_MAXIMIZE = 1 << 6 /*!< Show a maximize button */ 76 } ObMwmDecorations; 77 78 #endif 79