|
CTWM
|
#include "ctwm.h"#include <stdio.h>#include <stdlib.h>#include "colormaps.h"#include "events.h"#include "event_handlers.h"#include "functions.h"#include "functions_defs.h"#include "functions_internal.h"#include "icons.h"#include "otp.h"#include "parse.h"#include "r_area.h"#include "r_layout.h"#include "screen.h"#include "util.h"#include "vscreen.h"#include "win_decorations.h"#include "win_ops.h"#include "win_resize.h"#include "win_utils.h"#include "workspace_manager.h"#include "xparsegeometry.h"Go to the source code of this file.
Enumerations | |
| enum | MoveFillDir { MFD_BOTTOM , MFD_LEFT , MFD_RIGHT , MFD_TOP } |
Functions | |
| static int | FindConstraint (TwmWindow *tmp_win, MoveFillDir direction) |
| static bool | belongs_to_twm_window (TwmWindow *t, Window w) |
| static void | movewindow (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_move_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_forcemove_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_movepack_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_movepush_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| static void | packwindow (TwmWindow *tmp_win, const char *direction) |
| void | f_pack_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| static void | jump (TwmWindow *tmp_win, MoveFillDir direction, const char *action) |
| void | f_jumpleft_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_jumpright_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_jumpdown_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_jumpup_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_resize_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_zoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_horizoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_fullzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_fullscreenzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_leftzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_rightzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_topzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_bottomzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_xzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_xhorizoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_xfullzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_xfullscreenzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_xleftzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_xrightzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_xtopzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_xbottomzoom_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| static void | fillwindow (TwmWindow *tmp_win, const char *direction) |
| void | f_fill_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_initsize_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_moveresize_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_changesize_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_savegeometry_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
| void | f_restoregeometry_impl (int func, void *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, bool pulldown) |
Variables | |
| bool | ConstMove = false |
| CMoveDir | ConstMoveDir |
| int | ConstMoveX |
| int | ConstMoveY |
| int | ConstMoveXL |
| int | ConstMoveXR |
| int | ConstMoveYT |
| int | ConstMoveYB |
| int | MoveFunction |
| int | ResizeOrigX |
| int | ResizeOrigY |
| enum MoveFillDir |
| Enumerator | |
|---|---|
| MFD_BOTTOM | |
| MFD_LEFT | |
| MFD_RIGHT | |
| MFD_TOP | |
Definition at line 35 of file functions_win_moveresize.c.
|
static |
Definition at line 1443 of file functions_win_moveresize.c.
References Icon::bm_w, TwmWindow::frame, TwmWindow::hilite_wl, TwmWindow::hilite_wr, TwmWindow::icon, Scr, TwmWindow::title_w, TwmWindow::titlebuttons, Icon::w, and TBWindow::window.
Referenced by f_resize_impl(), and movewindow().
| void f_bottomzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 987 of file functions_win_moveresize.c.
References fullzoom().
| void f_changesize_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1290 of file functions_win_moveresize.c.
References ChangeSize().
| void f_fill_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1032 of file functions_win_moveresize.c.
References dpy, and fillwindow().
| void f_forcemove_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 101 of file functions_win_moveresize.c.
References EF_ARGS, and movewindow().
| void f_fullscreenzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 971 of file functions_win_moveresize.c.
References fullzoom().
| void f_fullzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 967 of file functions_win_moveresize.c.
References fullzoom().
| void f_horizoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 963 of file functions_win_moveresize.c.
References fullzoom().
| void f_initsize_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1174 of file functions_win_moveresize.c.
References ConstrainSize(), SetupWindow(), x, and y.
| void f_jumpdown_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 778 of file functions_win_moveresize.c.
References jump(), and MFD_BOTTOM.
| void f_jumpleft_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 770 of file functions_win_moveresize.c.
| void f_jumpright_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 774 of file functions_win_moveresize.c.
| void f_jumpup_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 782 of file functions_win_moveresize.c.
| void f_leftzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 975 of file functions_win_moveresize.c.
References fullzoom().
| void f_move_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 97 of file functions_win_moveresize.c.
References EF_ARGS, and movewindow().
| void f_movepack_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 105 of file functions_win_moveresize.c.
References EF_ARGS, and movewindow().
| void f_movepush_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 109 of file functions_win_moveresize.c.
References EF_ARGS, and movewindow().
| void f_moveresize_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1229 of file functions_win_moveresize.c.
References ConstrainSize(), dpy, RLayoutXParseGeometry(), Scr, SetupWindow(), x, and y.
| void f_pack_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 700 of file functions_win_moveresize.c.
References dpy, and packwindow().
| void f_resize_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 883 of file functions_win_moveresize.c.
References belongs_to_twm_window(), C_FRAME, C_ROOT, C_TITLE, C_WINDOW, Cancel, Context, cur_fromMenu(), DispatchEvent2(), dpy, Event, EventHandler, func_reset_cursor, HandleUnknown(), OpaqueResizeSize(), PopDownMenu(), resizeFromCenter(), ResizeOrigX, ResizeOrigY, Scr, and StartResize().
| void f_restoregeometry_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1305 of file functions_win_moveresize.c.
References restoregeometry().
| void f_rightzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 979 of file functions_win_moveresize.c.
References fullzoom().
| void f_savegeometry_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1300 of file functions_win_moveresize.c.
References savegeometry().
| void f_topzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 983 of file functions_win_moveresize.c.
References fullzoom().
| void f_xbottomzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1020 of file functions_win_moveresize.c.
References fullzoom().
| void f_xfullscreenzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1004 of file functions_win_moveresize.c.
References fullzoom().
| void f_xfullzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1000 of file functions_win_moveresize.c.
References fullzoom().
| void f_xhorizoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 996 of file functions_win_moveresize.c.
References fullzoom().
| void f_xleftzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1008 of file functions_win_moveresize.c.
References fullzoom().
| void f_xrightzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1012 of file functions_win_moveresize.c.
References fullzoom().
| void f_xtopzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 1016 of file functions_win_moveresize.c.
References fullzoom().
| void f_xzoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 992 of file functions_win_moveresize.c.
References fullzoom().
| void f_zoom_impl | ( | int | func, |
| void * | action, | ||
| Window | w, | ||
| TwmWindow * | tmp_win, | ||
| XEvent * | eventp, | ||
| int | context, | ||
| bool | pulldown ) |
Definition at line 959 of file functions_win_moveresize.c.
References fullzoom().
|
static |
Definition at line 1042 of file functions_win_moveresize.c.
References ConstrainSize(), FindConstraint(), TwmWindow::frame_bw, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, fullzoom(), MFD_BOTTOM, MFD_LEFT, MFD_RIGHT, MFD_TOP, TwmWindow::save_frame_height, TwmWindow::save_frame_width, TwmWindow::save_frame_x, TwmWindow::save_frame_y, Scr, SetupWindow(), ZOOM_NONE, and TwmWindow::zoomed.
Referenced by f_fill_impl().
|
static |
Definition at line 1325 of file functions_win_moveresize.c.
References TwmWindow::frame_bw, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, TwmWindow::mapped, MAX, MFD_BOTTOM, MFD_LEFT, MFD_RIGHT, MFD_TOP, MIN, TwmWindow::next, RAreaNew(), RLayoutFindMonitorBottomEdge(), RLayoutFindMonitorLeftEdge(), RLayoutFindMonitorRightEdge(), RLayoutFindMonitorTopEdge(), Scr, and visible().
Referenced by fillwindow(), jump(), and packwindow().
|
static |
Definition at line 788 of file functions_win_moveresize.c.
References dpy, FindConstraint(), TwmWindow::frame_bw, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, MFD_BOTTOM, MFD_LEFT, MFD_RIGHT, MFD_TOP, OtpRaise(), Scr, SetupWindow(), TwmWindow::squeezed, and WinWin.
Referenced by f_jumpdown_impl(), f_jumpleft_impl(), f_jumpright_impl(), and f_jumpup_impl().
|
static |
Definition at line 116 of file functions_win_moveresize.c.
References belongs_to_twm_window(), C_ICON, Cancel, ConstMove, ConstMoveDir, ConstMoveX, ConstMoveXL, ConstMoveXR, ConstMoveY, ConstMoveYB, ConstMoveYT, ConstrainByBorders(), ConstrainedMoveTime, CurrentDragX, CurrentDragY, DispatchEvent2(), DisplayPosition(), dpy, DragBW, DragHeight, DragWidth, DragWindow, DragX, DragY, EF_FULLPROTO, Event, EventHandler, FixRootEvent(), TwmWindow::frame, func_reset_cursor, HandleUnknown(), TwmWindow::icon, IconWin, InstallRootColormap(), JunkChild, JunkDepth, JunkMask, JunkRoot, JunkX, JunkY, last_time, LeftButt, menuFromFrameOrWindowOrTitlebar, MiddleButt, MOVE_HORIZ, MOVE_NONE, MOVE_VERT, MoveFunction, MoveOutline(), MoveResizeSizeWindow(), origDragX, origDragY, OtpRaise(), PopDownMenu(), RightButt, Scr, SetupWindow(), SIZE_HINDENT, SIZE_VINDENT, TryToGrid(), TryToPack(), TryToPush(), TwmContext, UninstallRootColormap(), Icon::w, WindowMoved, WinWin, and WMapSetupWindow().
Referenced by f_forcemove_impl(), f_move_impl(), f_movepack_impl(), and f_movepush_impl().
|
static |
Definition at line 710 of file functions_win_moveresize.c.
References dpy, FindConstraint(), TwmWindow::frame, TwmWindow::frame_bw, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, MFD_BOTTOM, MFD_LEFT, MFD_RIGHT, MFD_TOP, OtpRaise(), Scr, SetupWindow(), WinWin, x, and y.
Referenced by f_pack_impl().
| bool ConstMove = false |
Definition at line 53 of file functions_win_moveresize.c.
Referenced by HandleButtonRelease(), and movewindow().
| CMoveDir ConstMoveDir |
Definition at line 54 of file functions_win_moveresize.c.
Referenced by HandleButtonRelease(), and movewindow().
| int ConstMoveX |
Definition at line 55 of file functions_win_moveresize.c.
Referenced by HandleButtonRelease(), and movewindow().
| int ConstMoveXL |
Definition at line 57 of file functions_win_moveresize.c.
Referenced by movewindow().
| int ConstMoveXR |
Definition at line 58 of file functions_win_moveresize.c.
Referenced by movewindow().
| int ConstMoveY |
Definition at line 56 of file functions_win_moveresize.c.
Referenced by HandleButtonRelease(), and movewindow().
| int ConstMoveYB |
Definition at line 60 of file functions_win_moveresize.c.
Referenced by movewindow().
| int ConstMoveYT |
Definition at line 59 of file functions_win_moveresize.c.
Referenced by movewindow().
| int MoveFunction |
Definition at line 69 of file functions_win_moveresize.c.
Referenced by HandleButtonRelease(), and movewindow().
| int ResizeOrigX |
Definition at line 75 of file functions_win_moveresize.c.
Referenced by f_resize_impl(), and HandleMotionNotify().
| int ResizeOrigY |
Definition at line 76 of file functions_win_moveresize.c.
Referenced by f_resize_impl(), and HandleMotionNotify().