CTWM
Loading...
Searching...
No Matches
Macros | Functions | Variables
/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 charmk_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 charok_string = "OK"
 
static charcancel_string = "Cancel"
 
static chareverywhere_string = "All"
 

Macro Definition Documentation

◆ BTN_IPT_CTX

#define BTN_IPT_CTX ( win)
Value:
XSelectInput(dpy, (win), EVT); \
static int PlaceX
Definition add_window.c:82
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

◆ EVT

Function Documentation

◆ AddToClientsList()

bool AddToClientsList ( char * workspace,
char * client )

Definition at line 1412 of file occupation.c.

References AddToList(), GetWorkspace(), PlaceX, and Scr.

◆ AddToWorkSpace()

void AddToWorkSpace ( char * wname,
TwmWindow * twm_win )

◆ CanChangeOccupation()

static bool CanChangeOccupation ( TwmWindow ** twm_winp)
static

◆ ChangeOccupation()

void ChangeOccupation ( TwmWindow * tmp_win,
int newoccupation )

◆ CreateOccupyWindow()

void CreateOccupyWindow ( void )

◆ GetMaskFromProperty()

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

◆ GetMaskFromResource()

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

◆ GetPropertyFromMask()

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

◆ mk_nullsep_string()

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

Definition at line 1625 of file occupation.c.

References len, and PlaceX.

Referenced by GetMaskFromProperty(), and GetPropertyFromMask().

◆ MoveToNextWorkSpace()

void MoveToNextWorkSpace ( VirtualScreen * vs,
TwmWindow * twm_win )

◆ MoveToNextWorkSpaceAndFollow()

void MoveToNextWorkSpaceAndFollow ( VirtualScreen * vs,
TwmWindow * twm_win )

◆ MoveToPrevWorkSpace()

void MoveToPrevWorkSpace ( VirtualScreen * vs,
TwmWindow * twm_win )

◆ MoveToPrevWorkSpaceAndFollow()

void MoveToPrevWorkSpaceAndFollow ( VirtualScreen * vs,
TwmWindow * twm_win )

◆ Occupy()

void Occupy ( TwmWindow * twm_win)

◆ OccupyAll()

void OccupyAll ( TwmWindow * twm_win)

Definition at line 549 of file occupation.c.

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

Referenced by f_occupyall_impl().

◆ OccupyHandleButtonEvent()

void OccupyHandleButtonEvent ( XEvent * event)

◆ PaintOccupyWindow()

void PaintOccupyWindow ( void )

◆ RemoveFromWorkSpace()

void RemoveFromWorkSpace ( char * wname,
TwmWindow * twm_win )

◆ ResizeOccupyWindow()

void ResizeOccupyWindow ( TwmWindow * win)

Definition at line 874 of file occupation.c.

References TwmWindow::attr, dpy, MAX, PlaceX, Scr, x, and y.

Referenced by CreateOccupyWindow(), SetupFrame(), and WMapSetupWindow().

◆ SetupOccupation()

void SetupOccupation ( TwmWindow * twm_win,
int occupation_hint )

◆ ToggleOccupation()

void ToggleOccupation ( char * wname,
TwmWindow * twm_win )

◆ WMgrAddToCurrentWorkSpaceAndWarp()

void WMgrAddToCurrentWorkSpaceAndWarp ( VirtualScreen * vs,
char * winname )

◆ WmgrRedoOccupation()

void WmgrRedoOccupation ( TwmWindow * win)

◆ 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

int fullOccupation = 0

◆ 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:
= {
}

Definition at line 55 of file occupation.c.

Referenced by SetupOccupation().