|
CTWM
|
#include "ctwm.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <X11/extensions/shape.h>#include "gram.tab.h"#include "image.h"#include "iconmgr.h"#include "screen.h"#include "drawing.h"#include "occupation.h"#include "r_area.h"#include "r_layout.h"#include "win_utils.h"#include "workspace_manager.h"#include "win_decorations.h"Go to the source code of this file.
Macros | |
| #define | MARGIN (16 - 1) /* one "average" cursor width - 1 */ |
| #define | MKWIN() |
| #define | MKWIN() |
| #define | CORNERLEN (Scr->TitleHeight + tmp_win->frame_bw3D) |
Enumerations | |
| enum | CornerType { TopLeft , TopRight , BottomRight , BottomLeft } |
Functions | |
| static void | ComputeWindowTitleOffsets (TwmWindow *tmp_win, unsigned int width, bool squeeze) |
| static void | CreateHighlightWindows (TwmWindow *tmp_win) |
| static void | CreateLowlightWindows (TwmWindow *tmp_win) |
| static void | Draw3DCorner (Window w, int x, int y, int width, int height, int thick, int bw, ColorPair cp, CornerType type) |
| void | SetupWindow (TwmWindow *tmp_win, int x, int y, int w, int h, int bw) |
| void | SetupFrame (TwmWindow *tmp_win, int x, int y, int w, int h, int bw, bool sendEvent) |
| void | SetFrameShape (TwmWindow *tmp) |
| void | ComputeTitleLocation (TwmWindow *tmp) |
| void | CreateWindowTitlebarButtons (TwmWindow *tmp_win) |
| void | DeleteHighlightWindows (TwmWindow *tmp_win) |
| void | PaintTitle (TwmWindow *tmp_win) |
| void | PaintTitleButtons (TwmWindow *tmp_win) |
| void | PaintTitleButton (TwmWindow *tmp_win, TBWindow *tbw) |
| void | PaintBorders (TwmWindow *tmp_win, bool focus) |
| void | SetBorderCursor (TwmWindow *tmp_win, int x, int y) |
| #define CORNERLEN (Scr->TitleHeight + tmp_win->frame_bw3D) |
Referenced by PaintBorders().
| #define MARGIN (16 - 1) /* one "average" cursor width - 1 */ |
| #define MKWIN | ( | ) |
| #define MKWIN | ( | ) |
Referenced by CreateHighlightWindows(), and CreateLowlightWindows().
| enum CornerType |
| Enumerator | |
|---|---|
| TopLeft | |
| TopRight | |
| BottomRight | |
| BottomLeft | |
Definition at line 34 of file win_decorations.c.
| void ComputeTitleLocation | ( | TwmWindow * | tmp | ) |
Definition at line 604 of file win_decorations.c.
References SqueezeInfo::denom, TwmWindow::frame_bw, TwmWindow::frame_bw3D, TwmWindow::frame_width, SqueezeInfo::justify, SqueezeInfo::num, SIJ_CENTER, SIJ_LEFT, SIJ_RIGHT, TwmWindow::squeeze_info, TwmWindow::squeezed, TwmWindow::title_width, TwmWindow::title_x, and TwmWindow::title_y.
Referenced by AddWindow(), and SetFrameShape().
|
static |
Definition at line 828 of file win_decorations.c.
References TwmWindow::highlightxl, TwmWindow::highlightxr, TwmWindow::hilite_wr, TwmWindow::name_width, TwmWindow::name_x, TwmWindow::rightx, Scr, TwmWindow::squeeze_info, TwmWindow::squeezed, TJ_CENTER, TJ_LEFT, TJ_RIGHT, and TJ_UNDEF.
Referenced by CreateWindowTitlebarButtons(), and SetupFrame().
|
static |
Definition at line 967 of file win_decorations.c.
References AllocImage(), ColorPair::back, dpy, ColorPair::fore, get_blackgray_size(), GetImage(), Image::height, TwmWindow::hilite_wl, TwmWindow::hilite_wr, TwmWindow::HiliteImage, mk_blackgray_pixmap(), MKWIN, Image::pixmap, Scr, TwmWindow::title, TwmWindow::title_w, TwmWindow::titlehighlight, TJ_LEFT, TJ_RIGHT, Image::width, and y.
Referenced by CreateWindowTitlebarButtons().
|
static |
Definition at line 1095 of file win_decorations.c.
References dpy, ColorPair::fore, GetImage(), TwmWindow::lolite_wl, TwmWindow::lolite_wr, TwmWindow::LoliteImage, MKWIN, Image::pixmap, Scr, ColorPair::shadc, ColorPair::shadd, TwmWindow::title, TwmWindow::titlehighlight, TJ_LEFT, TJ_RIGHT, and y.
Referenced by CreateWindowTitlebarButtons().
| void CreateWindowTitlebarButtons | ( | TwmWindow * | tmp_win | ) |
Definition at line 661 of file win_decorations.c.
References TwmWindow::attr, ColorPair::back, ComputeWindowTitleOffsets(), CreateHighlightWindows(), CreateLowlightWindows(), dpy, ColorPair::fore, GetImage(), TwmWindow::hilite_wl, TwmWindow::hilite_wr, TBWindow::image, TBWindow::info, TwmWindow::lolite_wl, TwmWindow::lolite_wr, TitleButton::name, TitleButton::next, ProgramName, TitleButton::rightside, TwmWindow::rightx, Scr, TBPM_QUESTION, TwmWindow::title, TwmWindow::title_height, TwmWindow::title_w, TwmWindow::titlebuttons, TBWindow::window, x, and y.
Referenced by AddWindow().
| void DeleteHighlightWindows | ( | TwmWindow * | tmp_win | ) |
Definition at line 1075 of file win_decorations.c.
References dpy, TwmWindow::HiliteImage, Image::pixmap, and Scr.
Referenced by HandleDestroyNotify().
|
static |
Definition at line 1321 of file win_decorations.c.
References BottomLeft, BottomRight, dpy, Draw3DBorder(), off, on, Scr, TopLeft, TopRight, x, and y.
Referenced by PaintBorders().
| void PaintBorders | ( | TwmWindow * | tmp_win, |
| bool | focus ) |
Definition at line 1385 of file win_decorations.c.
References TwmWindow::border_tile, TwmWindow::borderC, BottomLeft, BottomRight, CORNERLEN, Draw3DBorder(), Draw3DCorner(), TwmWindow::frame, TwmWindow::frame_bw3D, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::highlight, off, on, Scr, TwmWindow::squeeze_info, TwmWindow::squeezed, TwmWindow::title_height, TwmWindow::title_width, TwmWindow::title_x, TopLeft, and TopRight.
Referenced by HandleExpose(), PaintAllDecoration(), and SetFocusVisualAttributes().
| void PaintTitle | ( | TwmWindow * | tmp_win | ) |
Definition at line 1189 of file win_decorations.c.
References ColorPair::back, dpy, Draw3DBorder(), FB, ColorPair::fore, len, TwmWindow::name, TwmWindow::name_x, off, on, Scr, TwmWindow::title, TwmWindow::title_height, TwmWindow::title_w, and TwmWindow::title_width.
Referenced by HandleExpose(), and PaintAllDecoration().
Definition at line 1297 of file win_decorations.c.
References dpy, TitleButton::dstx, TitleButton::dsty, TitleButton::height, TBWindow::image, TBWindow::info, Image::pixmap, Scr, TitleButton::srcx, TitleButton::srcy, TitleButton::width, and TBWindow::window.
Referenced by HandleExpose(), and PaintTitleButtons().
| void PaintTitleButtons | ( | TwmWindow * | tmp_win | ) |
Definition at line 1282 of file win_decorations.c.
References PaintTitleButton(), Scr, and TwmWindow::titlebuttons.
Referenced by PaintAllDecoration().
| void SetBorderCursor | ( | TwmWindow * | tmp_win, |
| int | x, | ||
| int | y ) |
Definition at line 1513 of file win_decorations.c.
References BottomCursor, BottomLeftCursor, BottomRightCursor, TwmWindow::curcurs, dpy, TwmWindow::frame, TwmWindow::frame_bw, TwmWindow::frame_bw3D, TwmWindow::frame_height, TwmWindow::frame_width, LeftCursor, RightCursor, Scr, TopCursor, TopLeftCursor, TopRightCursor, x, and y.
Referenced by HandleEnterNotify(), and HandleMotionNotify().
| void SetFrameShape | ( | TwmWindow * | tmp | ) |
Definition at line 489 of file win_decorations.c.
References TwmWindow::attr, ComputeTitleLocation(), dpy, TwmWindow::frame, TwmWindow::frame_bw, TwmWindow::frame_bw3D, Scr, TwmWindow::squeeze_info, TwmWindow::squeezed, TwmWindow::title_height, TwmWindow::title_w, TwmWindow::title_width, TwmWindow::title_x, TwmWindow::title_y, TwmWindow::w, and TwmWindow::wShaped.
Referenced by f_movetitlebar_impl(), HandleShapeNotify(), and SetupFrame().
| void SetupFrame | ( | TwmWindow * | tmp_win, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| int | bw, | ||
| bool | sendEvent ) |
Definition at line 77 of file win_decorations.c.
References TwmWindow::actual_frame_x, TwmWindow::actual_frame_y, TwmWindow::attr, ComputeWindowTitleOffsets(), dpy, TwmWindow::frame, TwmWindow::frame_bw, TwmWindow::frame_bw3D, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, HasShape, IconMgr::height, TwmWindow::heightEverChangedByUser, TwmWindow::highlightxl, TwmWindow::highlightxr, TwmWindow::hilite_wl, TwmWindow::hilite_wr, TwmWindow::iconmgrp, TwmWindow::isiconmgr, TwmWindow::isoccupy, TwmWindow::lolite_wl, TwmWindow::lolite_wr, MARGIN, TwmWindow::name_x, TwmWindow::old_bw, RAreaNew(), ResizeOccupyWindow(), TwmWindow::rightx, RLayoutFindBottomEdge(), RLayoutFindLeftEdge(), RLayoutFindRightEdge(), RLayoutFindTopEdge(), Scr, SetFrameShape(), TwmWindow::squeeze_info, TwmWindow::squeezed, TwmWindow::title_height, TwmWindow::title_w, TwmWindow::title_width, TwmWindow::title_x, TwmWindow::title_y, OccupyWindow::twm_win, TwmWindow::UnmapByMovingFarAway, visible(), TwmWindow::w, IconMgr::width, TwmWindow::widthEverChangedByUser, WMapSetupWindow(), TwmWindow::wShaped, x, and y.
Referenced by AddWindow(), HandleConfigureRequest(), and SetupWindow().
| void SetupWindow | ( | TwmWindow * | tmp_win, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| int | bw ) |
Definition at line 71 of file win_decorations.c.
References SetupFrame(), x, and y.
Referenced by apply_window_name(), ChangeSize(), DoResize(), EndResize(), f_initsize_impl(), f_moveresize_impl(), fillwindow(), fittocontent(), fullzoom(), HandleButtonRelease(), jump(), MenuDoResize(), MenuEndResize(), movewindow(), PackIconManager(), packwindow(), RescueWindows(), restoregeometry(), Squeeze(), TryToPush_be(), and WMgrHandleButtonEvent().