CTWM
|
#include "ctwm.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "add_window.h"
#include "colormaps.h"
#include "drawing.h"
#include "events.h"
#include "functions.h"
#include "functions_defs.h"
#include "gram.tab.h"
#include "iconmgr.h"
#include "icons_builtin.h"
#include "icons.h"
#include "image.h"
#include "list.h"
#include "occupation.h"
#include "otp.h"
#include "screen.h"
#include "util.h"
#include "vscreen.h"
#include "win_iconify.h"
#include "win_resize.h"
#include "win_utils.h"
#include "workspace_manager.h"
Go to the source code of this file.
Macros | |
#define | SHADOWWIDTH 5 /* in pixels */ |
#define | ENTRY_SPACING 4 |
#define | SETDEF(btn, ctx, func) AddFuncButton(btn, ctx, 0, func, NULL, NULL) |
#define | UNUSED_PIXEL ((unsigned long) (~0)) /* more than 24 bits */ |
#define | MSLEN (2 + 2 + 5 * 3 + 5 * 3) |
#define | DO(mask, str) |
#define | Over1Mask (1<<30) |
#define | OverAllMask (1<<31) |
Variables | ||
MenuRoot * | ActiveMenu = NULL | |
MenuItem * | ActiveItem = NULL | |
bool | menuFromFrameOrWindowOrTitlebar = false | |
char * | CurrentSelectedWorkspace | |
int | AlternateKeymap | |
bool | AlternateContext | |
int | MenuDepth = 0 | |
struct { | ||
int x | ||
int y | ||
} | MenuOrigins [10/*max number of nested menus */] | |
static bool | addingdefaults = false | |
static bool | fromMenu | |
#define ENTRY_SPACING 4 |
Definition at line 82 of file menus.c.
Referenced by MakeMenu(), and Paint3DEntry().
#define MSLEN (2 + 2 + 5 * 3 + 5 * 3) |
#define Over1Mask (1<<30) |
#define OverAllMask (1<<31) |
Definition at line 81 of file menus.c.
Referenced by PopUpMenu().
Definition at line 223 of file menus.c.
References addingdefaults, C_ICON, C_ICONMGR, C_TITLE, PlaceX, and SETDEF.
Referenced by InitTitlebarButtons().
Definition at line 171 of file menus.c.
References addingdefaults, cont, PlaceX, and Scr.
Referenced by GotButton().
MenuItem * AddToMenu | ( | MenuRoot * | menu, |
char * | item, | ||
char * | action, | ||
MenuRoot * | sub, | ||
int | func, | ||
char * | fore, | ||
char * | back ) |
Definition at line 732 of file menus.c.
References CreateFonts(), MenuRoot::defaultitem, dpy, MenuRoot::first, GetColor(), GetShadeColors(), MenuItem::item, MenuRoot::items, MenuRoot::last, MenuItem::next, PlaceX, MenuItem::prev, MenuRoot::pull, Scr, and MenuRoot::width.
Referenced by GotButton(), MakeWorkspacesMenu(), and PopUpMenu().
Definition at line 1517 of file menus.c.
References dpy, MenuRoot::first, MenuContext, MenuItem::next, PlaceX, Scr, ScreenContext, MenuRoot::shadow, and MenuRoot::w.
Referenced by PopUpMenu().
Definition at line 1476 of file menus.c.
References dpy, MenuRoot::mapped, MRM_UNMAPPED, PlaceX, Scr, MenuRoot::shadow, and MenuRoot::w.
Referenced by HandleEnterNotify(), and PopDownMenu().
Definition at line 851 of file menus.c.
References dpy, ENTRY_SPACING, GetColor(), GetShadeColors(), MenuItem::item_num, MAX, MenuContext, MRM_NEVER, MRM_UNMAPPED, MenuItem::next, PlaceX, Scr, ScreenContext, and UNUSED_PIXEL.
Referenced by f_pin_impl(), MakeMenus(), MakeWorkspacesMenu(), and PopUpMenu().
Definition at line 836 of file menus.c.
References MakeMenu(), MenuRoot::pinned, PlaceX, and Scr.
Referenced by ctwm_main().
Definition at line 442 of file menus.c.
References AddToMenu(), MakeMenu(), WorkSpace::name, WorkSpace::next, PlaceX, and Scr.
Referenced by ctwm_main().
Definition at line 1538 of file menus.c.
References ActiveMenu, ButtonPressed, ConstrainByBorders1(), cont, DispatchEvent(), dpy, Event, MenuRoot::height, MenuDepth, MenuOrigins, MenuRoot::pinned, PlaceX, Scr, MenuRoot::w, MenuRoot::width, MenuRoot::x, and MenuRoot::y.
Referenced by HandleButtonPress().
Definition at line 637 of file menus.c.
References MRM_NEVER, NewMenuRoot(), PlaceX, Scr, TWM_ALLICONS, TWM_ALLWINDOWS, TWM_ICONS, TWM_KEYS, TWM_VISIBLE, TWM_WINDOWS, TWM_WORKSPACES, and UNUSED_PIXEL.
Referenced by GetRoot(), and NewMenuRoot().
Definition at line 256 of file menus.c.
References Create3DMenuIcon(), dpy, Draw3DBorder(), ENTRY_SPACING, FB, off, PlaceX, Scr, x, and y.
Referenced by PaintEntry().
Definition at line 242 of file menus.c.
References Paint3DEntry(), PaintNormalEntry(), PlaceX, and Scr.
Referenced by HandleEnterNotify(), HandleKeyPress(), PaintMenu(), PopDownMenu(), and UpdateMenu().
Definition at line 419 of file menus.c.
References dpy, Draw3DBorder(), off, PaintEntry(), PlaceX, and Scr.
Referenced by HandleExpose().
Definition at line 334 of file menus.c.
References CreateMenuIcon(), dpy, FB, PlaceX, Scr, x, and y.
Referenced by PaintEntry().
Definition at line 1442 of file menus.c.
References ActiveItem, ActiveMenu, C_FRAME, C_ICON, C_TITLE, C_WINDOW, Context, dpy, HideMenu(), MenuDepth, menuFromFrameOrWindowOrTitlebar, PaintEntry(), PlaceX, MenuRoot::prev, MenuItem::state, and UninstallRootColormap().
Referenced by f_exec_impl(), f_movetitlebar_impl(), f_pin_impl(), f_resize_impl(), HandleButtonPress(), HandleButtonRelease(), HandleKeyPress(), HandleLeaveNotify(), and movewindow().
Definition at line 1130 of file menus.c.
References ActiveMenu, AddToMenu(), ColorPair::back, ConstrainByLayout(), CurrentSelectedWorkspace, DestroyMenu(), dpy, MenuRoot::entered, MenuRoot::first, ColorPair::fore, MenuRoot::height, MenuRoot::highlight, InstallRootColormap(), MenuRoot::items, MenuRoot::last, LookInList(), MakeMenu(), MenuRoot::mapped, MenuDepth, MenuOrigins, mk_twmkeys_entry(), MRM_MAPPED, MRM_NEVER, FuncKey::next, OCCUPY, MenuRoot::pinned, PlaceX, MenuRoot::prev, Scr, MenuRoot::shadow, SHADOWWIDTH, UNUSED_PIXEL, MenuRoot::w, MenuRoot::width, x, MenuRoot::x, y, and MenuRoot::y.
Referenced by do_key_menu(), do_menu(), HandleEnterNotify(), and UpdateMenu().
Definition at line 487 of file menus.c.
References ActiveItem, ActiveMenu, Cancel, CurrentSelectedWorkspace, DispatchEvent(), dpy, MenuRoot::entered, Event, MenuRoot::first, fromMenu, MenuItem::func, MenuRoot::height, MenuItem::item, MenuItem::item_num, JunkChild, JunkMask, JunkRoot, MAXMENUDEPTH, MenuDepth, menuFromFrameOrWindowOrTitlebar, MenuOrigins, PaintEntry(), PlaceX, PopUpMenu(), Scr, ScreenContext, MenuItem::state, MenuItem::sub, MenuRoot::w, MenuRoot::width, x, MenuRoot::x, and y.
Referenced by do_key_menu(), do_menu(), and HandleEnterNotify().
Definition at line 1626 of file menus.c.
References MenuRoot::defaultitem, dpy, Event, MenuRoot::first, MenuRoot::height, MenuRoot::last, MenuItem::next, PlaceX, root, Scr, MenuRoot::w, MenuRoot::width, x, and y.
Referenced by HandleButtonRelease().
Definition at line 59 of file menus.c.
Referenced by f_menu_impl(), HandleButtonPress(), HandleButtonRelease(), HandleEnterNotify(), HandleKeyPress(), PopDownMenu(), and UpdateMenu().
Definition at line 58 of file menus.c.
Referenced by AutoLowerWindow(), AutoRaiseWindow(), f_pin_impl(), HandleButtonPress(), HandleButtonRelease(), HandleEnterNotify(), HandleKeyPress(), HandleLeaveNotify(), MoveMenu(), PopDownMenu(), PopUpMenu(), and UpdateMenu().
Definition at line 72 of file menus.c.
Referenced by AddDefaultFuncButtons(), and AddFuncButton().
bool AlternateContext |
Definition at line 65 of file menus.c.
Referenced by f_altcontext_impl(), HandleButtonPress(), HandleButtonRelease(), and HandleKeyPress().
int AlternateKeymap |
Definition at line 64 of file menus.c.
Referenced by f_altkeymap_impl(), HandleButtonPress(), HandleButtonRelease(), and HandleKeyPress().
char* CurrentSelectedWorkspace |
Definition at line 61 of file menus.c.
Referenced by HandleKeyPress(), PopUpMenu(), and UpdateMenu().
|
static |
Definition at line 480 of file menus.c.
Referenced by cur_fromMenu(), and UpdateMenu().
int MenuDepth = 0 |
Definition at line 67 of file menus.c.
Referenced by HandleEnterNotify(), HandleKeyPress(), MoveMenu(), PopDownMenu(), PopUpMenu(), and UpdateMenu().
Definition at line 60 of file menus.c.
Referenced by DispatchEvent2(), f_movetitlebar_impl(), HandleButtonPress(), movewindow(), PopDownMenu(), and UpdateMenu().
Referenced by MoveMenu(), PopUpMenu(), and UpdateMenu().
int x |
Definition at line 69 of file menus.c.
Referenced by add_layout_override_entry(), AddStartResize(), AddWindow(), AnimateIcons(), ConfigureCaptiveRootWindow(), ConstrainedToWinBox(), convert_for_16(), convert_for_16(), convert_for_32(), convert_for_32(), CreateIconWindow(), createWindowBoxes(), CreateWindowTitlebarButtons(), CreateWorkSpaceManagerWindow(), DisplayPosition(), do_auto_clamp(), do_key_menu(), do_menu(), Draw3DBorder(), Draw3DCorner(), EwmhHandle_NET_WM_ICONNotify(), ExtractIcon(), f_initsize_impl(), f_moveresize_impl(), fittocontent(), GetGravityOffsets(), GetWindowConfig(), HandleButtonPress(), HandleConfigureRequest(), HandleEnterNotify(), HandlePropertyNotify(), IconUp(), Identify(), InitVirtualScreens(), LoadJpegImage(), LoadXwdImage(), MaskScreen(), MenuStartResize(), MoveIconManager(), MoveOutline(), MoveResizeSizeWindow(), Occupy(), packwindow(), Paint3DEntry(), PaintIcon(), PaintNormalEntry(), PopUpMenu(), RAreaContainsXY(), RAreaListBigArea(), RAreaNew(), RAreaNewStatic(), RedoIconName(), ReparentWindow(), RescueWindows(), ReshapeIcon(), ResizeOccupyWindow(), restoregeometry(), RLayoutGetAreaAtXY(), RLayoutXParseGeometry(), SetBorderCursor(), SetupFrame(), SetupWindow(), SweepWindow(), TryToGrid(), TryToPack(), TryToPush(), TryToPush_be(), UpdateMenu(), Vanish(), WarpCursorToDefaultEntry(), WarpToScreen(), WarpToWindow(), WMapRedrawWindow(), WMapSetupWindow(), XrandrNewLayout(), and Zoom().
int y |
Definition at line 70 of file menus.c.
Referenced by add_layout_override_entry(), AddStartResize(), AddWindow(), ConfigureCaptiveRootWindow(), ConstrainedToWinBox(), convert_for_16(), convert_for_16(), convert_for_32(), convert_for_32(), CreateHighlightWindows(), CreateLowlightWindows(), createWindowBoxes(), CreateWindowTitlebarButtons(), CreateWorkSpaceManagerWindow(), DisplayPosition(), do_auto_clamp(), do_key_menu(), do_menu(), Draw3DBorder(), Draw3DCorner(), ExtractIcon(), f_initsize_impl(), f_moveresize_impl(), fittocontent(), GetGravityOffsets(), GetWindowConfig(), HandleButtonPress(), HandleConfigureRequest(), HandleEnterNotify(), IconUp(), Identify(), InitVirtualScreens(), LoadJpegImage(), LoadXwdImage(), MaskScreen(), MenuStartResize(), MoveOutline(), MoveResizeSizeWindow(), Occupy(), packwindow(), Paint3DEntry(), PaintNormalEntry(), PopUpMenu(), RAreaContainsXY(), RAreaListBigArea(), RAreaNew(), RAreaNewStatic(), ReparentWindow(), RescueWindows(), ResizeOccupyWindow(), restoregeometry(), RLayoutGetAreaAtXY(), RLayoutXParseGeometry(), SetBorderCursor(), SetupFrame(), SetupWindow(), SweepWindow(), TryToGrid(), TryToPack(), TryToPush(), TryToPush_be(), UpdateMenu(), Vanish(), WarpCursorToDefaultEntry(), WarpToScreen(), WarpToWindow(), WMapRedrawWindow(), WMapSetupWindow(), XrandrNewLayout(), and Zoom().