CTWM
Loading...
Searching...
No Matches
Macros | Functions | Variables
/usr/src/RPM/BUILD/ctwm-4.1.0/util.c File Reference
#include "ctwm.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <signal.h>
#include <sys/time.h>
#include "animate.h"
#include "add_window.h"
#include "cursor.h"
#include "drawing.h"
#include "gram.tab.h"
#include "iconmgr.h"
#include "icons.h"
#include "image.h"
#include "screen.h"
#include "util.h"
#include "vscreen.h"
#include "win_decorations.h"
#include "win_resize.h"
Include dependency graph for util.c:

Go to the source code of this file.

Macros

#define LOADFONT(fld)   (GetFont(&scr->fld##Font))
 
#define MARGIN   20
 

Functions

charExpandFilePath (char *path)
 
charExpandFilename (const char *name)
 
void GetColor (int kind, Pixel *what, const char *name)
 Get info from the server about a given color.
 
void GetShadeColors (ColorPair *cp)
 Try and create a 'shaded' version of a color for prettier UI.
 
bool UpdateFont (MyFont *font, int height)
 Try adjusting a font's height.
 
static void GetFont (MyFont *font)
 Load up fontsets from the X server.
 
void CreateFonts (ScreenInfo *scr)
 Load up our various defined fonts.
 
void RescueWindows (void)
 Backend for f.rescuewindows.
 
void DebugTrace (char *file)
 Backend for f.trace.
 
void safe_strncpy (char *dest, const char *src, size_t size)
 

Variables

FILEtracefile = NULL
 

Macro Definition Documentation

◆ LOADFONT

#define LOADFONT ( fld)    (GetFont(&scr->fld##Font))

◆ MARGIN

#define MARGIN   20

Function Documentation

◆ CreateFonts()

void CreateFonts ( ScreenInfo * scr)

Load up our various defined fonts.

Definition at line 383 of file util.c.

References ScreenInfo::HaveFonts, LOADFONT, and PlaceX.

Referenced by AddToMenu(), and ctwm_main().

◆ DebugTrace()

void DebugTrace ( char * file)

Backend for f.trace.

Definition at line 553 of file util.c.

References PlaceX, and tracefile.

Referenced by f_trace_impl().

◆ ExpandFilename()

char * ExpandFilename ( const char * name)

Definition at line 131 of file util.c.

References Home, and PlaceX.

Referenced by FindBitmap().

◆ ExpandFilePath()

char * ExpandFilePath ( char * path)

Definition at line 67 of file util.c.

References Home, HomeLen, len, and PlaceX.

Referenced by do_string_keyword().

◆ GetColor()

void GetColor ( int kind,
Pixel * what,
const char * name )

◆ GetFont()

static void GetFont ( MyFont * font)
static

Load up fontsets from the X server.

Only used by CreateFonts() below.

Definition at line 314 of file util.c.

References MyFont::ascent, MyFont::avg_count, MyFont::avg_fheight, MyFont::avg_height, MyFont::basename, MyFont::descent, dpy, MyFont::font_set, MyFont::height, MaxSize, PlaceX, ProgramName, Scr, and MyFont::y.

◆ GetShadeColors()

void GetShadeColors ( ColorPair * cp)

◆ RescueWindows()

void RescueWindows ( void )

◆ safe_strncpy()

void safe_strncpy ( char * dest,
const char * src,
size_t size )

Definition at line 586 of file util.c.

References PlaceX.

Referenced by GetMaskFromProperty(), RedirectToCaptive(), and SetupOccupation().

◆ UpdateFont()

bool UpdateFont ( MyFont * font,
int height )

Try adjusting a font's height.

Used in drawing the icon manager.

Definition at line 292 of file util.c.

References MyFont::avg_count, MyFont::avg_fheight, MyFont::avg_height, and PlaceX.

Referenced by DrawIconManagerIconName().

Variable Documentation

◆ tracefile

FILE* tracefile = NULL

Definition at line 59 of file util.c.

Referenced by DebugTrace(), dumpevent(), TryToAnimate(), and WMapRestack().