|
CTWM
|
#include "ctwm.h"#include <stdio.h>#include <stdlib.h>#include "events.h"#include "util.h"#include "otp.h"#include "functions_defs.h"#include "add_window.h"#include "colormaps.h"#include "screen.h"#include "drawing.h"#include "r_area.h"#include "r_area_list.h"#include "r_layout.h"#include "win_decorations.h"#include "win_ops.h"#include "win_resize.h"#include "win_utils.h"#include "workspace_manager.h"#include "iconmgr.h"Go to the source code of this file.
Macros | |
| #define | MINHEIGHT 0 /* had been 32 */ |
| #define | MINWIDTH 0 /* had been 60 */ |
| #define | makemult(a, b) |
Functions | |
| static void | DisplaySize (TwmWindow *tmp_win, int width, int height) |
| static void | do_auto_clamp (TwmWindow *tmp_win, XEvent *evp) |
| void | OpaqueResizeSize (TwmWindow *tmp_win) |
| void | StartResize (XEvent *evp, TwmWindow *tmp_win, bool fromtitlebar, bool from3dborder) |
| void | MenuStartResize (TwmWindow *tmp_win, int x, int y, int w, int h) |
| void | AddStartResize (TwmWindow *tmp_win, int x, int y, int w, int h) |
| void | MenuDoResize (int x_root, int y_root, TwmWindow *tmp_win) |
| void | DoResize (int x_root, int y_root, TwmWindow *tmp_win) |
| void | EndResize (void) |
| void | MenuEndResize (TwmWindow *tmp_win) |
| void | AddEndResize (TwmWindow *tmp_win) |
| void | ConstrainSize (TwmWindow *tmp_win, unsigned int *widthp, unsigned int *heightp) |
| void | fullzoom (TwmWindow *tmp_win, int func) |
| void | unzoom (TwmWindow *tmp_win) |
| void | savegeometry (TwmWindow *tmp_win) |
| void | restoregeometry (TwmWindow *tmp_win) |
| void | ChangeSize (char *in_string, TwmWindow *tmp_win) |
| void | resizeFromCenter (Window w, TwmWindow *tmp_win) |
Variables | |
| static int | dragx |
| static int | dragy |
| static unsigned int | dragWidth |
| static unsigned int | dragHeight |
| static int | origx |
| static int | origy |
| static int | origWidth |
| static int | origHeight |
| static int | clampTop |
| static int | clampBottom |
| static int | clampLeft |
| static int | clampRight |
| static int | clampDX |
| static int | clampDY |
| static int | last_width |
| static int | last_height |
| static unsigned int | resizeGrabMask |
| #define makemult | ( | a, | |
| b ) |
Referenced by ConstrainSize().
| #define MINHEIGHT 0 /* had been 32 */ |
Definition at line 49 of file win_resize.c.
Referenced by DoResize(), and MenuDoResize().
| #define MINWIDTH 0 /* had been 60 */ |
Definition at line 50 of file win_resize.c.
Referenced by DoResize(), and MenuDoResize().
| void AddEndResize | ( | TwmWindow * | tmp_win | ) |
Definition at line 702 of file win_resize.c.
References AddingH, AddingW, AddingX, AddingY, ConstrainSize(), dragHeight, dragWidth, dragx, dragy, and TwmWindow::frame_bw.
Referenced by AddWindow().
| void AddStartResize | ( | TwmWindow * | tmp_win, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h ) |
Definition at line 284 of file win_resize.c.
References clampBottom, clampDX, clampDY, clampLeft, clampRight, clampTop, DisplaySize(), dpy, dragHeight, dragWidth, dragx, dragy, TwmWindow::frame_bw, last_height, last_width, origHeight, origWidth, origx, origy, resizeGrabMask, Scr, x, and y.
Referenced by AddWindow().
| void ChangeSize | ( | char * | in_string, |
| TwmWindow * | tmp_win ) |
Definition at line 1179 of file win_resize.c.
References dpy, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, Isdigit, ProgramName, SetupWindow(), TwmWindow::title_height, and TwmWindow::w.
Referenced by f_changesize_impl().
| void ConstrainSize | ( | TwmWindow * | tmp_win, |
| unsigned int * | widthp, | ||
| unsigned int * | heightp ) |
Definition at line 727 of file win_resize.c.
References TwmWindow::frame_bw3D, TwmWindow::hints, makemult, min(), Scr, and TwmWindow::title_height.
Referenced by AddEndResize(), AddWindow(), DoResize(), EndResize(), f_initsize_impl(), f_moveresize_impl(), fillwindow(), fullzoom(), MenuDoResize(), and MenuEndResize().
|
static |
Definition at line 574 of file win_resize.c.
References dpy, Draw3DBorder(), FB, TwmWindow::frame_bw3D, TwmWindow::hints, last_height, last_width, off, Scr, SIZE_HINDENT, SIZE_VINDENT, and TwmWindow::title_height.
Referenced by AddStartResize(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 76 of file win_resize.c.
References clampBottom, clampDX, clampDY, clampLeft, clampRight, clampTop, dpy, dragHeight, dragWidth, dragx, dragy, Scr, TwmWindow::title_height, x, and y.
Referenced by StartResize().
| void DoResize | ( | int | x_root, |
| int | y_root, | ||
| TwmWindow * | tmp_win ) |
Definition at line 439 of file win_resize.c.
References BottomCursor, BottomLeftCursor, BottomRightCursor, clampBottom, clampDX, clampDY, clampLeft, clampRight, clampTop, ConstrainSize(), TwmWindow::curcurs, DisplaySize(), dpy, dragHeight, dragWidth, dragx, dragy, TwmWindow::frame_bw, TwmWindow::frame_bw3D, LeftCursor, MINHEIGHT, MINWIDTH, MoveOutline(), origHeight, origWidth, origx, origy, resizeGrabMask, resizeWhenAdd, RightCursor, Scr, SetupWindow(), TwmWindow::title_height, TopCursor, TopLeftCursor, and TopRightCursor.
Referenced by AddWindow(), and HandleMotionNotify().
| void EndResize | ( | void | ) |
Definition at line 633 of file win_resize.c.
References IconMgr::columns, ConstrainSize(), IconMgr::cur_columns, dpy, dragHeight, dragWidth, dragx, dragy, TwmWindow::frame_bw, TwmWindow::frame_bw3D, TwmWindow::frame_height, TwmWindow::frame_width, GetTwmWindow(), TwmWindow::iconmgrp, TwmWindow::isiconmgr, MoveOutline(), OtpRaise(), PackIconManager(), ResizeWindow, Scr, SetupWindow(), UninstallRootColormap(), unzoom(), IconMgr::width, WinWin, and WMapRaise().
Referenced by HandleButtonRelease().
| void fullzoom | ( | TwmWindow * | tmp_win, |
| int | func ) |
Definition at line 896 of file win_resize.c.
References ConstrainSize(), dpy, dragHeight, dragWidth, dragx, dragy, EWMH_STATE_MAXIMIZED_VERT, EwmhSet_NET_WM_STATE(), TwmWindow::frame, TwmWindow::frame_bw, TwmWindow::frame_bw3D, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, RArea::height, OtpRaise(), OtpRestackWindow(), OtpSetAflag(), RAreaInvalid(), RAreaIsValid(), RAreaListNew(), RAreaNew(), RLayoutFindBottomEdge(), RLayoutFindLeftEdge(), RLayoutFindMonitorBottomEdge(), RLayoutFindMonitorLeftEdge(), RLayoutFindMonitorRightEdge(), RLayoutFindMonitorTopEdge(), RLayoutFindRightEdge(), RLayoutFindTopEdge(), RLayoutFree(), RLayoutFull(), RLayoutFull1(), RLayoutFullHoriz(), RLayoutFullHoriz1(), RLayoutFullVert(), RLayoutFullVert1(), RLayoutNew(), TwmWindow::save_frame_height, TwmWindow::save_frame_width, TwmWindow::save_frame_x, TwmWindow::save_frame_y, Scr, SetupWindow(), TwmWindow::squeezed, TwmWindow::title_height, unzoom(), TwmWindow::w, RArea::width, WinWin, RArea::x, RArea::y, ZOOM_NONE, and TwmWindow::zoomed.
Referenced by EwmhClientMessage_NET_WM_STATEchange(), f_bottomzoom_impl(), f_fullscreenzoom_impl(), f_fullzoom_impl(), f_horizoom_impl(), f_leftzoom_impl(), f_rightzoom_impl(), f_topzoom_impl(), f_xbottomzoom_impl(), f_xfullscreenzoom_impl(), f_xfullzoom_impl(), f_xhorizoom_impl(), f_xleftzoom_impl(), f_xrightzoom_impl(), f_xtopzoom_impl(), f_xzoom_impl(), f_zoom_impl(), and fillwindow().
| void MenuDoResize | ( | int | x_root, |
| int | y_root, | ||
| TwmWindow * | tmp_win ) |
Definition at line 305 of file win_resize.c.
References BottomCursor, BottomLeftCursor, BottomRightCursor, clampBottom, clampDX, clampDY, clampLeft, clampRight, clampTop, ConstrainSize(), TwmWindow::curcurs, DisplaySize(), dpy, dragHeight, dragWidth, dragx, dragy, TwmWindow::frame_bw, TwmWindow::frame_bw3D, LeftCursor, MINHEIGHT, MINWIDTH, MoveOutline(), origHeight, origWidth, origx, origy, resizeGrabMask, RightCursor, Scr, SetupWindow(), TwmWindow::title_height, TopCursor, TopLeftCursor, and TopRightCursor.
Referenced by resizeFromCenter().
| void MenuEndResize | ( | TwmWindow * | tmp_win | ) |
Definition at line 681 of file win_resize.c.
References AddingH, AddingW, AddingX, AddingY, ConstrainSize(), dpy, dragHeight, dragWidth, dragx, dragy, TwmWindow::frame_bw, MoveOutline(), Scr, and SetupWindow().
Referenced by resizeFromCenter().
| void MenuStartResize | ( | TwmWindow * | tmp_win, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h ) |
Definition at line 241 of file win_resize.c.
References clampBottom, clampDX, clampDY, clampLeft, clampRight, clampTop, DisplaySize(), dpy, dragHeight, dragWidth, dragx, dragy, TwmWindow::frame_bw, TwmWindow::frame_bw3D, last_height, last_width, MoveOutline(), MoveResizeSizeWindow(), origHeight, origWidth, origx, origy, resizeGrabMask, Scr, SIZE_HINDENT, SIZE_VINDENT, TwmWindow::title_height, x, and y.
Referenced by resizeFromCenter().
| void OpaqueResizeSize | ( | TwmWindow * | tmp_win | ) |
Definition at line 138 of file win_resize.c.
References TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::OpaqueResize, and Scr.
Referenced by f_resize_impl().
| void resizeFromCenter | ( | Window | w, |
| TwmWindow * | tmp_win ) |
Definition at line 1322 of file win_resize.c.
References AddingH, AddingW, AddingX, AddingY, TwmWindow::attr, Cancel, DispatchEvent2(), dpy, DragHeight, DragWidth, Event, TwmWindow::frame_bw, TwmWindow::frame_bw3D, JunkBW, JunkChild, JunkDepth, JunkMask, JunkRoot, JunkX, JunkY, MenuDoResize(), MenuEndResize(), MenuStartResize(), origDragX, origDragY, Scr, and TwmWindow::title_height.
Referenced by f_resize_impl().
| void restoregeometry | ( | TwmWindow * | tmp_win | ) |
Definition at line 1160 of file win_resize.c.
References TwmWindow::_savegeometry::height, TwmWindow::savegeometry, SetupWindow(), TwmWindow::_savegeometry::width, TwmWindow::_savegeometry::x, x, TwmWindow::_savegeometry::y, and y.
Referenced by f_restoregeometry_impl().
| void savegeometry | ( | TwmWindow * | tmp_win | ) |
Definition at line 1149 of file win_resize.c.
References TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, TwmWindow::_savegeometry::height, TwmWindow::savegeometry, TwmWindow::_savegeometry::width, TwmWindow::_savegeometry::x, and TwmWindow::_savegeometry::y.
Referenced by AddWindow(), and f_savegeometry_impl().
| void StartResize | ( | XEvent * | evp, |
| TwmWindow * | tmp_win, | ||
| bool | fromtitlebar, | ||
| bool | from3dborder ) |
Definition at line 183 of file win_resize.c.
References clampBottom, clampDX, clampDY, clampLeft, clampRight, clampTop, TwmWindow::curcurs, DisplaySize(), do_auto_clamp(), dpy, dragHeight, dragWidth, dragx, dragy, TwmWindow::frame, TwmWindow::frame_bw, TwmWindow::frame_bw3D, InstallRootColormap(), last_height, last_width, MoveOutline(), MoveResizeSizeWindow(), origHeight, origWidth, origx, origy, resizeGrabMask, resizeWhenAdd, ResizeWindow, Scr, SIZE_HINDENT, SIZE_VINDENT, and TwmWindow::title_height.
Referenced by f_resize_impl().
| void unzoom | ( | TwmWindow * | tmp_win | ) |
Definition at line 1135 of file win_resize.c.
References OtpClearAflag(), OtpRestackWindow(), ZOOM_NONE, and TwmWindow::zoomed.
Referenced by EndResize(), fullzoom(), and HandleConfigureRequest().
|
static |
Definition at line 63 of file win_resize.c.
Referenced by AddStartResize(), do_auto_clamp(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 66 of file win_resize.c.
Referenced by AddStartResize(), do_auto_clamp(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 67 of file win_resize.c.
Referenced by AddStartResize(), do_auto_clamp(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 64 of file win_resize.c.
Referenced by AddStartResize(), do_auto_clamp(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 65 of file win_resize.c.
Referenced by AddStartResize(), do_auto_clamp(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 62 of file win_resize.c.
Referenced by AddStartResize(), do_auto_clamp(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 55 of file win_resize.c.
Referenced by AddEndResize(), AddStartResize(), do_auto_clamp(), DoResize(), EndResize(), fullzoom(), MenuDoResize(), MenuEndResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 54 of file win_resize.c.
Referenced by AddEndResize(), AddStartResize(), do_auto_clamp(), DoResize(), EndResize(), fullzoom(), MenuDoResize(), MenuEndResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 52 of file win_resize.c.
Referenced by AddEndResize(), AddStartResize(), do_auto_clamp(), DoResize(), EndResize(), fullzoom(), MenuDoResize(), MenuEndResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 53 of file win_resize.c.
Referenced by AddEndResize(), AddStartResize(), do_auto_clamp(), DoResize(), EndResize(), fullzoom(), MenuDoResize(), MenuEndResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 70 of file win_resize.c.
Referenced by AddStartResize(), DisplaySize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 69 of file win_resize.c.
Referenced by AddStartResize(), DisplaySize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 60 of file win_resize.c.
Referenced by AddStartResize(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 59 of file win_resize.c.
Referenced by AddStartResize(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 57 of file win_resize.c.
Referenced by AddStartResize(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 58 of file win_resize.c.
Referenced by AddStartResize(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().
|
static |
Definition at line 72 of file win_resize.c.
Referenced by AddStartResize(), DoResize(), MenuDoResize(), MenuStartResize(), and StartResize().