CTWM
Loading...
Searching...
No Matches
/usr/src/RPM/BUILD/ctwm-4.1.0/occupation.c File Reference
#include "ctwm.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <X11/Xatom.h>
#include "add_window.h"
#include "ctwm_atoms.h"
#include "drawing.h"
#include "events.h"
#include "iconmgr.h"
#include "list.h"
#include "screen.h"
#include "occupation.h"
#include "otp.h"
#include "util.h"
#include "vscreen.h"
#include "win_iconify.h"
#include "win_regions.h"
#include "win_utils.h"
#include "workspace_manager.h"
#include "workspace_utils.h"
Include dependency graph for occupation.c:

Go to the source code of this file.

Macros

#define EVT   (ButtonPressMask | ButtonReleaseMask | ExposureMask)
#define BTN_IPT_CTX(win)

Functions

static int GetMaskFromResource (TwmWindow *win, char *res)
static char * mk_nullsep_string (const char *prop, int len)
static bool CanChangeOccupation (TwmWindow **twm_winp)
void SetupOccupation (TwmWindow *twm_win, int occupation_hint)
void AddToWorkSpace (char *wname, TwmWindow *twm_win)
void RemoveFromWorkSpace (char *wname, TwmWindow *twm_win)
void ToggleOccupation (char *wname, TwmWindow *twm_win)
void MoveToNextWorkSpace (VirtualScreen *vs, TwmWindow *twm_win)
void MoveToNextWorkSpaceAndFollow (VirtualScreen *vs, TwmWindow *twm_win)
void MoveToPrevWorkSpace (VirtualScreen *vs, TwmWindow *twm_win)
void MoveToPrevWorkSpaceAndFollow (VirtualScreen *vs, TwmWindow *twm_win)
void WmgrRedoOccupation (TwmWindow *win)
void WMgrRemoveFromCurrentWorkSpace (VirtualScreen *vs, TwmWindow *win)
void WMgrAddToCurrentWorkSpaceAndWarp (VirtualScreen *vs, char *winname)
void OccupyAll (TwmWindow *twm_win)
void CreateOccupyWindow (void)
void ResizeOccupyWindow (TwmWindow *win)
void PaintOccupyWindow (void)
void OccupyHandleButtonEvent (XEvent *event)
void Occupy (TwmWindow *twm_win)
void ChangeOccupation (TwmWindow *tmp_win, int newoccupation)
bool AddToClientsList (char *workspace, char *client)
unsigned int GetMaskFromProperty (unsigned char *_prop, unsigned long len)
int GetPropertyFromMask (unsigned int mask, char **prop)

Variables

int fullOccupation = 0
TwmWindowoccupyWin = NULL
static XrmOptionDescRec table []
static ColorPair occupyButtoncp
static char * ok_string = "OK"
static char * cancel_string = "Cancel"
static char * everywhere_string = "All"

Macro Definition Documentation

◆ BTN_IPT_CTX

#define BTN_IPT_CTX ( win)
Value:
XSelectInput(dpy, (win), EVT); \
XSaveContext(dpy, (win), TwmContext, (XPointer) tmp_win); \
XSaveContext(dpy, (win), ScreenContext, (XPointer) Scr);
XContext ScreenContext
Definition ctwm_main.c:121
Display * dpy
Definition ctwm_main.c:84
XContext TwmContext
Definition ctwm_main.c:119
#define Scr
#define EVT

Referenced by CreateOccupyWindow().

◆ EVT

#define EVT   (ButtonPressMask | ButtonReleaseMask | ExposureMask)

Function Documentation

◆ AddToClientsList()

bool AddToClientsList ( char * workspace,
char * client )

Definition at line 1412 of file occupation.c.

References AddToList(), WorkSpace::clientlist, GetWorkspace(), WorkSpace::next, and Scr.

◆ AddToWorkSpace()

void AddToWorkSpace ( char * wname,
TwmWindow * twm_win )

◆ CanChangeOccupation()

◆ ChangeOccupation()

◆ CreateOccupyWindow()

◆ GetMaskFromProperty()

unsigned int GetMaskFromProperty ( unsigned char * _prop,
unsigned long len )

◆ GetMaskFromResource()

int GetMaskFromResource ( TwmWindow * win,
char * res )
static

◆ GetPropertyFromMask()

int GetPropertyFromMask ( unsigned int mask,
char ** prop )

◆ mk_nullsep_string()

char * mk_nullsep_string ( const char * prop,
int len )
static

Definition at line 1625 of file occupation.c.

References len.

Referenced by GetMaskFromProperty(), and GetPropertyFromMask().

◆ MoveToNextWorkSpace()

◆ MoveToNextWorkSpaceAndFollow()

void MoveToNextWorkSpaceAndFollow ( VirtualScreen * vs,
TwmWindow * twm_win )

◆ MoveToPrevWorkSpace()

◆ MoveToPrevWorkSpaceAndFollow()

void MoveToPrevWorkSpaceAndFollow ( VirtualScreen * vs,
TwmWindow * twm_win )

◆ Occupy()

◆ OccupyAll()

void OccupyAll ( TwmWindow * twm_win)

Definition at line 549 of file occupation.c.

References CanChangeOccupation(), ChangeOccupation(), fullOccupation, and Scr.

Referenced by f_occupyall_impl().

◆ OccupyHandleButtonEvent()

◆ PaintOccupyWindow()

◆ RemoveFromWorkSpace()

void RemoveFromWorkSpace ( char * wname,
TwmWindow * twm_win )

◆ ResizeOccupyWindow()

◆ SetupOccupation()

◆ ToggleOccupation()

void ToggleOccupation ( char * wname,
TwmWindow * twm_win )

◆ WMgrAddToCurrentWorkSpaceAndWarp()

◆ WmgrRedoOccupation()

◆ WMgrRemoveFromCurrentWorkSpace()

void WMgrRemoveFromCurrentWorkSpace ( VirtualScreen * vs,
TwmWindow * win )

Variable Documentation

◆ cancel_string

char * cancel_string = "Cancel"
static

Definition at line 581 of file occupation.c.

Referenced by CreateOccupyWindow(), and PaintOccupyWindow().

◆ everywhere_string

char * everywhere_string = "All"
static

Definition at line 582 of file occupation.c.

Referenced by CreateOccupyWindow(), and PaintOccupyWindow().

◆ fullOccupation

◆ occupyButtoncp

ColorPair occupyButtoncp
static

Definition at line 578 of file occupation.c.

Referenced by CreateOccupyWindow(), and PaintOccupyWindow().

◆ occupyWin

TwmWindow* occupyWin = NULL

◆ ok_string

char* ok_string = "OK"
static

Definition at line 580 of file occupation.c.

Referenced by CreateOccupyWindow(), and PaintOccupyWindow().

◆ table

XrmOptionDescRec table[]
static
Initial value:
= {
{"-xrm", NULL, XrmoptionResArg, (XPointer) NULL},
}

Definition at line 55 of file occupation.c.