?? mwm.h
字號:
char *item2; /* the character string displayed on right */ char *action; /* action to be performed */ short x; /* x coordinate for text (item) */ short x2; /* x coordinate for text (item2) */ short y_offset; /* y coordinate for item */ short y_height; /* y height for item */ short func; /* twm built in function */ long val1; /* values needed for F_SCROLL */ long val2; long val1_unit; /* units for val1, val2 */ long val2_unit; /* pixels (unit=1) or percent of screen * (unit = Scr.d_width/d_height */ short state; /* video state, 0 = normal, 1 = reversed */ short strlen; /* strlen(item) */ short strlen2; /* strlen(item2) */ short hotkey; /* Hot key offset (pete@tecc.co.uk). 0 - No hot key +ve - offset to hot key char in item -ve - offset to hot key char in item2 (offsets have 1 added, so +1 or -1 refer to the *first* character) */ struct MenuRoot *menu; /* sub-menu */} MenuItem;typedef struct MenuRoot { struct MenuItem *first; /* first item in menu */ struct MenuItem *last; /* last item in menu */ struct MenuRoot *next; /* next in list of root menus */ char *name; /* name of root */ Window w; /* the window of the menu */ short height; /* height of the menu */ short width; /* width of the menu for 1st col */ short width2; /* width of the menu for 2nd col */ short items; /* number of items in the menu */ Bool in_use;} MenuRoot;typedef struct MouseButton { struct MouseButton *next; int func; /* the function number */ MenuRoot *menu; /* menu if func is F_POPUP */ MenuItem *item; /* action to perform if func != F_POPUP */ int button; int context; int modifier; int mask; int count; int val1; int val2; long val1_unit; /* units for val1, val2 */ long val2_unit; /* pixels (unit=1) or percent of screen * (unit = Scr.d_width/d_height */} MouseButton;typedef struct FuncKey { struct FuncKey *next; /* next in the list of function keys */ char *name; /* key name */ KeyCode keycode; /* X keycode */ int cont; /* context */ int mods; /* modifiers */ int func; /* function to perform */ MenuRoot *menu; /* menu if func is F_POPUP */ char *action; /* action string (if any) */ int val1; /* values needed for F_SCROLL */ int val2; long val1_unit; /* units for val1, val2 */ long val2_unit; /* pixels (unit=1) or percent of screen */} FuncKey;#define MENU_ERROR -1#define MENU_NOP 0#define MENU_DONE 1#define SUBMENU_DONE 2#define SIZE_HINDENT 5#define SIZE_VINDENT 3#define MAX_WINDOW_WIDTH 32767#define MAX_WINDOW_HEIGHT 32767/* * for each window that is on the display, one of these structures * is allocated and linked into a list */typedef struct MwmWindow { struct MwmWindow *next; /* next mwm window */ struct MwmWindow *prev; /* prev mwm window */ struct MwmWindow *ancestor; /* family lineage order */ struct MwmWindow *child; /* family lineage order */ struct MwmWindow *focus_in_tree; /* focus in family */ long client_decoration; long client_functions; Boolean focus_auto_raise; String icon_image; Pixel icon_image_background; Pixel icon_image_bottom_shadow_color; Pixmap icon_image_bottom_shadow_pixmap; Pixel icon_image_foreground; Pixel icon_image_top_shadow_color; Pixmap icon_image_top_shadow_pixmap; Pixel matte_background; Pixel matte_bottom_shadow_color; Pixmap matte_bottom_shadow_pixmap; Pixel matte_foreground; Pixel matte_top_shadow_color; Pixmap matte_top_shadow_pixmap; Dimension matte_width; Size maximum_client_size; Boolean use_client_icon; unsigned char use_p_position; String window_menu; char *name; /* name of the window */ Window w; /* the child window */ Window frame; /* the frame window */ Window parent; /* Ugly Ugly Ugly - it looks like you * HAVE to reparent the app window into * a window whose size = app window, * or else you can't keep xv and matlab * happy at the same time! */ Window title; /* the title bar window */ Window sides[4]; Window corners[4]; /* Corner pieces */ Window menub; Window minimizeb; Window maximizeb; Window icon_w; /* the icon window */ Window icon_pixmap_w; /* the icon window */ Window icon_borders[4]; Window icon_frame; Window transientfor; Window pager_view; Window shield; /* for application modality & refresh */ int wShaped; /* is this a shaped window */ int frame_x; /* x position of frame */ int frame_y; /* y position of frame */ int frame_width; /* width of frame */ int frame_height; /* height of frame */ int boundary_width; int corner_width; int old_bw; /* border width before reparenting */ int bw; int title_x; int title_y; int title_height; /* height of the title bar */ int title_width; /* width of the title bar */ int icon_x_loc; /* icon window x coordinate */ int icon_xl_loc; /* icon label window x coordinate */ int icon_y_loc; /* icon window y coordiante */ int icon_w_width; /* width of the icon window */ int icon_w_height; /* height of the icon window */ int icon_t_width; /* width of the icon title window */ int icon_p_width; /* width of the icon pixmap window */ int icon_p_height; /* height of the icon pixmap window */ int icon_border_width; /* does this icon have borders? */ Pixmap icon_pixmap; /* pixmap for the icon */ int icon_depth; /* Drawable depth for the icon */ Pixmap icon_mask_pixmap; /* pixmap for the icon mask */ XWindowAttributes attr; /* the child window attributes */ XSizeHints hints; /* normal hints */ XWMHints *wmhints; /* WM hints */ XClassHint classhint; int Desk; /* Tells which desktop this window is on */ int FocusDesk; /* Where (if at all) was it focussed */ int DeIconifyDesk; /* Desk to deiconify to, for StubbornIcons */ unsigned long flags; char *icon_bitmap_file; char *icon_label; char *icon_active_label; int orig_x; /* unmaximized x coordinate */ int orig_y; /* unmaximized y coordinate */ int orig_wd; /* unmaximized window width */ int orig_ht; /* unmaximized window height */ int xdiff, ydiff; /* used to restore window position on exit */ MwmHints *mwm_hints; char *mwm_menu; Atom *mwm_messages; unsigned long num_messages; int functions; int decorations; Window *cmap_windows; /* Colormap windows property */ int number_cmap_windows; /* Should generally be 0 */ int focus_sequence; unsigned long buttons; MenuRoot *custom_menu;} MwmWindow;/* * windows without titles */#define NO_NAME "Untitled"/* * Cursor types */#define POSITION_CURS 0 /* upper Left corner cursor */#define TITLE_CURS 1 /* title-bar cursor */#define DEFAULT_CURS 2 /* cursor for apps to inherit */#define SYS_CURS 3 /* sys-menu and iconify boxes cursor */#define MOVE_CURS 4 /* resize cursor */#define WAIT_CURS 5 /* wait a while cursor */#define MENU_CURS 6 /* menu cursor */#define SELECT_CURS 7 /* dot cursor for f.move, etc. from menus */#define DESTROY_CURS 8 /* skull and cross bones, f.destroy */#define TOP_CURS 9#define RIGHT_CURS 10#define BOTTOM_CURS 11#define LEFT_CURS 12#define TOP_LEFT_CURS 13#define TOP_RIGHT_CURS 14#define BOT_LEFT_CURS 15#define BOT_RIGHT_CURS 16#define SYS_MODAL_CURS 17#define HOURGLASS_CURS 18#define MAX_CURSORS 19/* * Maximum number of icon boxes that are allowed */#define MAX_BOXES 4typedef struct { Window win; int isMapped;} PanFrame;typedef struct ScreenInfo { String button_bindings; Boolean clean_text; Boolean fade_normal_icon; Geometry feedback_geometry; Dimension frame_border_width; Geometry icon_box_geometry; String icon_box_name; String icon_box_sb_display_policy; XmString icon_box_title; long icon_decoration; Size icon_image_maximum; Size icon_image_minimum; unsigned char icon_placement; Dimension icon_placement_margin; String key_bindings; Boolean limit_resize; Size maximum_maximum_size; Boolean move_opaque; Dimension resize_border_width; Boolean resize_cursors; long transient_decoration; long transient_functions; Boolean use_icon_box; /* instance vars */ unsigned long screen; /* screen number */ String screen_name; int d_depth; /* copy of DefaultDepth(dpy, screen) */ int d_width; /* copy of DisplayWidth(dpy, screen) */ int d_height; /* copy of DisplayHeight(dpy, screen) */ Window root_win; /* the root window */ Window size_win; /* the resize dimensions window */ Window no_focus_win; /* focus window when nobody has it */ Window pager_win; /* pager window */ Window pager_child_win; Window pressed_win; /* the decoration window pressed */ Window restart_win; Window quit_win; Window toggle_win; Window shield_win; MwmWindow mwm_root; /* the head of the mwm window list */ MwmWindow *mwm_colormap; /* mwm colormap window */ MwmWindow *mwm_pager; /* the pager window */ MwmWindow *mwm_pushed; /* saved window to install when pushes * drops to zero */ MwmWindow *mwm_highlight; /* the mwm window that is highlighted * except for networking delays, this * is the window which has the focus */ MwmWindow *mwm_focus; /* Last window which Mwm gave the focus * to; NOT the window that really has *the focus */ MwmWindow *mwm_last_focus; /* Window which had focus before mwm * stole it to do moves/menus/etc. */ MwmWindow *mwm_last_raised; /* Last window which was raised. Used * for raise lower func. */ MwmWindow *mwm_grabbing; MwmWindow *mwm_event; /* for choosing highlight window on a * button or key event */ MwmWindow *top; /* for stacking order */ MwmWindow *bottom; /* for stacking order */ Colormap last_cmap; int alt_mask; int smart_placement; int root_pushes; /* current push level to install root colormap windows */ int event_context; Cursor cursors[MAX_CURSORS]; GC resize_GC; GC matte_ts_GC; GC matte_bs_GC; PanFrame panner_top, panner_left, panner_right, panner_bottom; ComponentInfo components[MWM_MAX_COMPONENTS]; unsigned virt_scale; /* Panner scale factor */ int virt_x_max; /* Max location for top left of virt desk */ int virt_y_max; int virt_x; /* X Dimension of virtual desktop */ int virt_y; /* Y Dimension of virtual desktop */ int edge_scroll_x; int edge_scroll_y; int pager_x; int pager_y; MouseButton *buttons; FuncKey *keys; MenuRoot **popups; int num_popups; int max_popups; char *DefaultIcon; /* Icon to use when no other icons are found */ unsigned char buttons2grab; /* buttons to grab in click to focus mode */ unsigned long flags; int icon_boxes[MAX_BOXES][4]; int num_icon_boxes; int ScrollResistance; /* resistance to scrolling in desktop */ int MoveResistance; /* res to moving windows over viewport edge */ int OpaqueSize; int current_desk; /* The current desktop number */ char *IconPath; char *PixmapPath;} ScreenInfo;/* * for the flags value - these used to be seperate Bool's */#define CirculateSkipIcons 0x0001#define StubbornIcons 0x0002#define StubbornPlacement 0x0004#define StubbornIconPlacement 0x0008#define OpaqueResize 0x0010/* * management info for the whole window manager */typedef struct MwmInternalInfo { Boolean auto_key_focus; Time auto_raise_delay; String bitmap_directory; Boolean client_auto_place; unsigned char colormap_focus_policy; String config_file; Boolean deiconify_key_focus; Time double_click_time; Boolean enable_warp; Boolean enforce_key_focus; Boolean icon_auto_place; Boolean icon_click;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -