⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mwm.h

📁 安装DDD之前
💻 H
📖 第 1 页 / 共 3 页
字号:
/* $Id: mwm.h,v 1.1 2004/08/28 19:25:46 dannybackx Exp $ *//*****************************************************************************//**       Copyright 1988 by Evans & Sutherland Computer Corporation,        **//**                          Salt Lake City, Utah                           **//**  Portions Copyright 1989 by the Massachusetts Institute of Technology   **//**                        Cambridge, Massachusetts                         **//**                                                                         **//**                           All Rights Reserved                           **//**                                                                         **//**    Permission to use, copy, modify, and distribute this software and    **//**    its documentation  for  any  purpose  and  without  fee is hereby    **//**    granted, provided that the above copyright notice appear  in  all    **//**    copies and that both  that  copyright  notice  and  this  permis-    **//**    sion  notice appear in supporting  documentation,  and  that  the    **//**    names of Evans & Sutherland and M.I.T. not be used in advertising    **//**    in publicity pertaining to distribution of the  software  without    **//**    specific, written prior permission.                                  **//**                                                                         **//**    EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD    **//**    TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES  OF  MERCHANT-    **//**    ABILITY  AND  FITNESS,  IN  NO  EVENT SHALL EVANS & SUTHERLAND OR    **//**    M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL  DAM-    **//**    AGES OR  ANY DAMAGES WHATSOEVER  RESULTING FROM LOSS OF USE, DATA    **//**    OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER    **//**    TORTIOUS ACTION, ARISING OUT OF OR IN  CONNECTION  WITH  THE  USE    **//**    OR PERFORMANCE OF THIS SOFTWARE.                                     **//*****************************************************************************//**************************************************************************** * This module is based on Twm, but has been siginificantly modified  * by Rob Nation  ****************************************************************************//*********************************************************************** * The rest of it is all my fault -- MLM * mwm - "LessTif Window Manager" * * Copyright (C) 1995-2002 LessTif Development Team * ***********************************************************************/#ifndef _MWM_H#define _MWM_H#include <limits.h>#include <Xm/Xm.h>#include <Xm/MwmUtil.h>/* * path components */#define MWM_SHELL_NAME		"MWMSHELL"#define SHELL_NAME		"SHELL"#define DEFAULT_SHELL		"/bin/sh"#define DEFAULT_SCREEN		"DISPLAY=:%s.%d"#define DEFAULT_DISPLAY		"DISPLAY=%s:%s.%d"#define DEFAULT_DISPLAY_STRING	"DISPLAY=%s"#define HOME_MWMRC		".mwmrc"	/* precede with $HOME */#define SYSTEM_MWMRC		"system.mwmrc"	/* precede with MWM_DDIR */#define HOME_BINDINGS_FILE	".motifbind"#define MWM_VERSION		"Lesstif mwm Release"#define OPT_MULTISCREEN		"-multiscreen"#define OPT_SCREENS		"-screens"#ifndef MWM_DDIR#define MWM_DDIR "/usr/lib/X11/mwm"#endif#ifndef XINCL_PATH#define XINCL_PATH "/usr/X11/include"#endif#ifdef __EMX__#define MWM_ICONDIR	"/XFree86/include/X11/bitmaps;/XFree86/include/X11/pixmaps"/* amai: this is an ugly hack ... */#ifdef MWM_DDIR#undef MWM_DDIR#endif#define MWM_DDIR (char*)__XOS2RedirRoot("/XFree86/lib/X11/mwm")#else /* !__EMX__ */#define MWM_ICONDIR		XINCL_PATH"/X11/bitmaps:"XINCL_PATH"/X11/pixmaps"#endif/* * builtin defaults, when a configuration file can't be found * Don't change the WIN_MENU_NAME unless you change it in both places */#define DEFAULT_WIN_MENU_NAME		"DefaultWindowMenu"#define DEFAULT_BUTTON_BINDING_NAME	"DefaultButtonBindings"#define DEFAULT_KEY_BINDING_NAME	"DefaultKeyBindings"#define DEFAULT_MWM_WINDOW_MENU \    "Menu DefaultWindowMenu {\n" \	"Restore    Alt<Key>F5     f.restore\n" \	"Move       Alt<Key>F7     f.move\n" \	"Size       Alt<Key>F8     f.resize\n" \	"Minimize   Alt<Key>F9     f.minimize\n" \	"Maximize   Alt<Key>F10    f.maximize\n" \	"Lower      Alt<Key>F3     f.lower\n" \	"no-label                  f.separator\n" \	"Close      Alt<Key>F4     f.kill\n" \    "}"#define DEFAULT_MWM_ROOT_MENU \    "Menu DefaultRootMenu {\n" \	"\"Root Menu\"		f.title\n" \	"\"New Window\"		f.exec		\"xterm &\"\n" \	"\"Shuffle Up\"		f.circle_up\n" \	"\"Shuffle Down\"	f.circle_down\n" \	"\"Refresh\"		f.refresh\n" \	"\"Pack Icons\"		f.pack_icons\n" \	"no-label		f.separator\n" \	"\"Restart...\"		f.restart\n" \	"\"Quit...\"		f.quit_mwm\n" \    "}\n"#define DEFAULT_MWM_KEY_BINDINGS \    "Keys DefaultKeyBindings {\n" \	"Shift<Key>Escape          window|icon        f.post_wmenu\n" \	"Alt<Key>space             window|icon        f.post_wmenu\n" \	"Alt<Key>Tab               root|icon|window   f.next_key\n" \	"Alt Shift<Key>Tab         root|icon|window   f.prev_key\n" \	"Alt<Key>Escape            root|icon|window   f.circle_down\n" \	"Alt Shift<Key>Escape      root|icon|window   f.circle_up\n" \	"Alt Shift Ctrl<Key>exclam root|icon|window   f.set_behavior\n" \	"Alt Ctrl<Key>1            root|icon|window   f.set_behavior\n" \	"Alt<Key>F6                window             f.next_key transient\n" \	"Alt Shift<Key>F6          window             f.prev_key transient\n" \	"Shift<Key>F10             icon               f.post_wmenu\n" \    "}"#define DEFAULT_MWM_BUTTON_BINDINGS \    "Buttons DefaultButtonBindings {\n" \	"<Btn1Down>     icon|frame      f.raise\n" \	"<Btn3Down>     icon|frame      f.post_wmenu\n" \	"<Btn3Down>     root            f.menu DefaultRootMenu\n" \    "}"/* * this next one is for toggling behavior */#define MWM_BEHAVIOR_KEY_BINDINGS \    "Keys  MwmBehaviorButtonBindings {\n" \	"Alt Shift Ctrl<Key>exclam   root|icon|window   f.set_behavior\n" \	"Alt Ctrl<Key>1              root|icon|window   f.set_behavior\n" \    "}"/* * this one is for builtin behaviors that always exist */#define BUILTIN_MWM_BUTTON_BINDINGS \    "Buttons BuiltinButtonBindings {\n" \	"<Btn1Down>	root		f.window_list\n" \	"<Btn3Down>	root		f.menu DefaultRootMenu\n" \	"<Btn1Down>	border		f.resize\n" \	"<Btn1Down>	icon|title	f.move\n"\	"<Btn3Down>	icon|frame	f.post_wmenu\n" \	"<Btn1Down>	menub		f.post_wmenu\n" \	"<Btn1Down>	minimizeb	f.minimize\n" \	"<Btn1Down>	maximizeb	f.maximize\n" \    "}"#define BUILTIN_MENU_BUTTON_BINDINGS \    "Buttons MenuButtonBinding {" \	"<Btn1Click>	menub		f.post_wmenu\n" \    "}"#define BUILTIN_KILL_BUTTON_BINDINGS \    "Buttons KillButtonBinding {" \	"<Btn1Click2>	menub		f.kill\n" \    "}"#define BUILTIN_ICON_BUTTON_BINDINGS \    "Buttons IconButtonBinding {" \	"<Btn1Click>	icon		f.post_wmenu\n" \	"<Btn1Click2>	icon		f.restore\n" \    "}"typedef struct Size {    Dimension       width;    Dimension       height;} Size;typedef XRectangle Geometry;/* * decoration components have resources, too... */typedef struct ComponentInfo {    int             type;    Pixel           background;    Pixmap          background_pixmap;    Pixel           bottom_shadow_color;    Pixmap          bottom_shadow_pixmap;    XmFontList      font_list;    Pixel           foreground;    Boolean         save_under;    Pixel           top_shadow_color;    Pixmap          top_shadow_pixmap;    GC              normal_GC;    GC              grayed_GC;    GC              top_GC;    GC              bot_GC;    XFontStruct    *font;    int             f_height;    int             f_y;    /* frame and icon components have a few more */    Pixel           active_background;    Pixmap          active_background_pixmap;    Pixel           active_bottom_shadow_color;    Pixmap          active_bottom_shadow_pixmap;    Pixel           active_foreground;    Pixel           active_top_shadow_color;    Pixmap          active_top_shadow_pixmap;    GC              active_GC;    GC              active_top_GC;    GC              active_bot_GC;} ComponentInfo;/* * component types */enum {    MWM_MENU,    MWM_FEEDBACK,    MWM_PAGER,    MWM_ICON,    MWM_TITLE_A,    MWM_RESIZE_H,    MWM_BORDER,    MWM_MAXIMIZE_B,    MWM_MINIMIZE_B,    MWM_MENU_B,    MWM_MAX_COMPONENTS};/* * for focus policies.  Other valus are in Xm/Xm.h */enum {    XmKEYBOARD = 2};/* * for icon decorations */#define XmICON_ACTIVELABEL	(1L << 0)#define XmICON_IMAGE		(1L << 1)#define XmICON_LABEL		(1L << 2)/* * for icon placement */#define XmICONS_TOP		(1L << 0)#define XmICONS_BOTTOM		(1L << 1)#define XmICONS_LEFT		(1L << 2)#define XmICONS_RIGHT		(1L << 3)#define XmICONS_TIGHT		(1L << 4)/* * for icon placement */#define MWM_FEEDBACK_ALL	(1L << 0)#define MWM_FEEDBACK_BEHAVIOR	(1L << 1)#define MWM_FEEDBACK_KILL	(1L << 2)#define MWM_FEEDBACK_MOVE	(1L << 3)#define MWM_FEEDBACK_PLACEMENT	(1L << 4)#define MWM_FEEDBACK_QUIT	(1L << 5)#define MWM_FEEDBACK_RESIZE	(1L << 6)#define MWM_FEEDBACK_RESTART	(1L << 7)enum {    XmUSE_PPOSITION_ON,    XmUSE_PPOSITION_OFF,    XmUSE_PPOSITION_NON_ZERO};#ifndef WithdrawnState#define WithdrawnState 0#endif/* * frame width */#define PAN_FRAME_THICKNESS 2/* * the maximum number of mouse buttons mwm knows about * * don't think that upping this to 5 will make everything * hunky-dory with 5 button mouses */#define MAX_BUTTONS 3#define HEIGHT_EXTRA 4		/* Extra height for texts in popus */#define HEIGHT_EXTRA_TITLE 4	/* Extra height for underlining title */#define HEIGHT_SEPARATOR 4	/* Height of separator lines */#define SCROLL_REGION 2		/* region around screen edge that */				/* triggers scrolling *//* * menu label types */enum {   IS_STRING,   IS_BITMAP};#ifndef TRUE#define TRUE	1#define FALSE	0#endif#define NULLSTR ((char *) NULL)/* * contexts for button presses */#define C_NO_CONTEXT	0x0000#define C_WINDOW	0x0001#define C_TITLE		0x0002#define C_ICON		0x0004#define C_ROOT		0x0008#define C_FRAME		0x0010#define C_MENUB		0x0020#define C_MAXIMIZEB	0x0040#define C_MINIMIZEB	0x0080#define C_RALL		(C_MINIMIZEB|C_MAXIMIZEB)#define C_LALL		(C_MENUB)#define C_ALL		(C_WINDOW|C_TITLE|C_ICON|C_ROOT|C_FRAME| \			 C_MINIMIZEB|C_MAXIMIZEB|C_MENUB)/* * window flags definitions  */#define STICKY		0x00000001	/* Does window stick to glass? */#define CIRCULATESKIP	0x00000002#define STARTICONIC	0x00000004#define WINDOWLISTSKIP	0x00000008#define MAPPED		0x00000010	/* is it mapped? */#define ICONIFIED	0x00000020	/* is it an icon now? */#define TRANSIENT	0x00000040	/* is it a transient window? */#define RAISED		0x00000080	/* if a sticky window, does it need to be raised */#define VISIBLE		0x00000100	/* is the window fully visible */#define ICON_OURS	0x00000200	/* is the icon window supplied by the app? */#define XPM_FLAG	0x00000400	/* is the icon window an xpm? */#define PIXMAP_OURS	0x00000800	/* is the icon pixmap ours to free? */#define SHAPED_ICON	0x00001000	/* is the icon shaped? */#define MAXIMIZED	0x00002000	/* is the window maximized? */#define WM_TAKES_FOCUS	0x00004000	/* takes focus */#define WM_DELS_WINDOW	0x00008000	/* accepts DEL_WINDOW message */#define WM_SAVE_SELF	0x00010000	/* accepts DEL_WINDOW message */#define ICON_MOVED	0x00020000	/* has the icon been moved by the user? */#define ICON_UNMAPPED   0x00040000	/* was the icon unmapped, though window is iconified (Transients) */#define MAP_PENDING	0x00080000	/* Sent an XMapWindow, but didn't receive a MapNotify yet. */#define MWM_MESSAGES	0x00100000	/* has a MWM_MESSAGES property *//* * flags to suppress/enable title bar buttons */#define BUTTON1		0x0001#define BUTTON2		0x0002#define BUTTON3		0x0004#define BUTTON4		0x0008#define BUTTON5		0x0010#define BUTTON6		0x0020#define BUTTON7		0x0040#define BUTTON8		0x0080#define BUTTON9		0x0100#define BUTTON10	0x0200#define MAXPOPUPS 50typedef struct MenuItem {    struct MenuItem *next;	/* next menu item */    struct MenuItem *prev;	/* prev menu item */    char           *item;	/* the character string displayed on left */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -