|
CTWM
|
#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"Go to the source code of this file.
Macros | |
| #define | LOADFONT(fld) |
| #define | MARGIN 20 |
Functions | |
| char * | ExpandFilePath (char *path) |
| char * | ExpandFilename (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 | |
| FILE * | tracefile = NULL |
| #define LOADFONT | ( | fld | ) |
Referenced by CreateFonts().
| #define MARGIN 20 |
Referenced by RescueWindows(), and SetupFrame().
| void CreateFonts | ( | ScreenInfo * | scr | ) |
Load up our various defined fonts.
Definition at line 383 of file util.c.
References ScreenInfo::HaveFonts, and LOADFONT.
Referenced by AddToMenu(), and ctwm_main().
| void DebugTrace | ( | char * | file | ) |
Backend for f.trace.
Definition at line 553 of file util.c.
References tracefile.
Referenced by f_trace_impl().
| char * ExpandFilename | ( | const char * | name | ) |
| char * ExpandFilePath | ( | char * | path | ) |
| void GetColor | ( | int | kind, |
| Pixel * | what, | ||
| const char * | name ) |
Get info from the server about a given color.
Definition at line 154 of file util.c.
References dpy, StdCmap::maps, StdCmap::next, StdCmap::nmaps, ProgramName, and Scr.
Referenced by AddToMenu(), AddWorkSpace(), assign_var_savecolor(), CreateOccupyWindow(), ctwm_main(), do_color_keyword(), do_colorlist_keyword(), GetColorFromList(), GetRoot(), GetShadeColors(), MakeMenu(), WMapCreateCurrentBackGround(), and WMapCreateDefaultBackGround().
|
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, ProgramName, Scr, and MyFont::y.
| void GetShadeColors | ( | ColorPair * | cp | ) |
Try and create a 'shaded' version of a color for prettier UI.
Definition at line 245 of file util.c.
References ColorPair::back, dpy, GetColor(), Scr, ColorPair::shadc, and ColorPair::shadd.
Referenced by AddIconManager(), AddToMenu(), AddWindow(), AddWorkSpace(), apply_window_name(), CreateIconWindow(), CreateOccupyWindow(), CreateWorkSpaceManager(), ctwm_main(), MakeMenu(), and WMapAddWindowToWorkspace().
| void RescueWindows | ( | void | ) |
Backend for f.rescuewindows.
Definition at line 471 of file util.c.
References dpy, TwmWindow::frame_bw, TwmWindow::frame_height, TwmWindow::frame_width, TwmWindow::frame_x, TwmWindow::frame_y, VirtualScreen::h, TwmWindow::icon, MARGIN, TwmWindow::next, Scr, SetupWindow(), TwmWindow::vs, Icon::w, VirtualScreen::w, Icon::w_height, Icon::w_width, Icon::w_x, Icon::w_y, x, and y.
Referenced by f_rescuewindows_impl().
| void safe_strncpy | ( | char * | dest, |
| const char * | src, | ||
| size_t | size ) |
Definition at line 586 of file util.c.
Referenced by GetMaskFromProperty(), RedirectToCaptive(), and SetupOccupation().
| 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, and MyFont::avg_height.
Referenced by DrawIconManagerIconName().
| FILE* tracefile = NULL |
Definition at line 59 of file util.c.
Referenced by DebugTrace(), dumpevent(), TryToAnimate(), and WMapRestack().