CTWM
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
/usr/src/RPM/BUILD/ctwm-4.1.0/win_decorations.c File Reference
#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"
Include dependency graph for win_decorations.c:

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)
 

Macro Definition Documentation

◆ CORNERLEN

#define CORNERLEN   (Scr->TitleHeight + tmp_win->frame_bw3D)

◆ MARGIN

#define MARGIN   (16 - 1) /* one "average" cursor width - 1 */

◆ MKWIN [1/2]

#define MKWIN ( )
Value:
XCreateWindow(dpy, tmp_win->title_w, 0, y, \
Scr->TBInfo.width, h, \
0, Scr->d_depth, CopyFromParent, \
Scr->d_visual, valuemask, &attributes)
static int PlaceX
Definition add_window.c:82
Display * dpy
Definition ctwm_main.c:84
#define Scr
int y
Definition menus.c:70

◆ MKWIN [2/2]

#define MKWIN ( )
Value:
XCreateWindow(dpy, tmp_win->title_w, 0, y, \
Scr->TBInfo.width, h, \
0, Scr->d_depth, CopyFromParent, \
Scr->d_visual, valuemask, &attributes)

Enumeration Type Documentation

◆ CornerType

Enumerator
TopLeft 
TopRight 
BottomRight 
BottomLeft 

Definition at line 34 of file win_decorations.c.

Function Documentation

◆ ComputeTitleLocation()

void ComputeTitleLocation ( TwmWindow * tmp)

Definition at line 604 of file win_decorations.c.

References SqueezeInfo::num, PlaceX, SIJ_CENTER, SIJ_LEFT, and SIJ_RIGHT.

Referenced by AddWindow(), and SetFrameShape().

◆ ComputeWindowTitleOffsets()

static void ComputeWindowTitleOffsets ( TwmWindow * tmp_win,
unsigned int width,
bool squeeze )
static

Definition at line 828 of file win_decorations.c.

References PlaceX, Scr, TJ_CENTER, TJ_LEFT, TJ_RIGHT, and TJ_UNDEF.

Referenced by CreateWindowTitlebarButtons(), and SetupFrame().

◆ CreateHighlightWindows()

static void CreateHighlightWindows ( TwmWindow * tmp_win)
static

◆ CreateLowlightWindows()

static void CreateLowlightWindows ( TwmWindow * tmp_win)
static

◆ CreateWindowTitlebarButtons()

void CreateWindowTitlebarButtons ( TwmWindow * tmp_win)

◆ DeleteHighlightWindows()

void DeleteHighlightWindows ( TwmWindow * tmp_win)

Definition at line 1075 of file win_decorations.c.

References dpy, PlaceX, and Scr.

Referenced by HandleDestroyNotify().

◆ Draw3DCorner()

static void Draw3DCorner ( Window w,
int x,
int y,
int width,
int height,
int thick,
int bw,
ColorPair cp,
CornerType type )
static

Definition at line 1321 of file win_decorations.c.

References BottomLeft, BottomRight, dpy, Draw3DBorder(), off, on, PlaceX, Scr, TopLeft, TopRight, x, and y.

Referenced by PaintBorders().

◆ PaintBorders()

void PaintBorders ( TwmWindow * tmp_win,
bool focus )

◆ PaintTitle()

void PaintTitle ( TwmWindow * tmp_win)

Definition at line 1189 of file win_decorations.c.

References dpy, Draw3DBorder(), FB, len, off, on, PlaceX, and Scr.

Referenced by HandleExpose(), and PaintAllDecoration().

◆ PaintTitleButton()

void PaintTitleButton ( TwmWindow * tmp_win,
TBWindow * tbw )

Definition at line 1297 of file win_decorations.c.

References dpy, PlaceX, and Scr.

Referenced by HandleExpose(), and PaintTitleButtons().

◆ PaintTitleButtons()

void PaintTitleButtons ( TwmWindow * tmp_win)

Definition at line 1282 of file win_decorations.c.

References PaintTitleButton(), PlaceX, and Scr.

Referenced by PaintAllDecoration().

◆ SetBorderCursor()

void SetBorderCursor ( TwmWindow * tmp_win,
int x,
int y )

◆ SetFrameShape()

void SetFrameShape ( TwmWindow * tmp)

Definition at line 489 of file win_decorations.c.

References ComputeTitleLocation(), dpy, PlaceX, and Scr.

Referenced by f_movetitlebar_impl(), HandleShapeNotify(), and SetupFrame().

◆ SetupFrame()

void SetupFrame ( TwmWindow * tmp_win,
int x,
int y,
int w,
int h,
int bw,
bool sendEvent )

◆ SetupWindow()

void SetupWindow ( TwmWindow * tmp_win,
int x,
int y,
int w,
int h,
int bw )