JWM Source Documentation
Data Structures | Macros | Typedefs | Functions | Variables
background.c File Reference

Background control functions. More...

#include "jwm.h"
#include "background.h"
#include "misc.h"
#include "error.h"
#include "command.h"
#include "color.h"
#include "main.h"
#include "icon.h"
#include "image.h"
#include "gradient.h"
#include "hint.h"

Go to the source code of this file.

Data Structures

struct  BackgroundNode
 Structure to represent a background for one or more desktops. More...
 

Macros

#define BACKGROUND_SOLID   0
 Solid color background.
 
#define BACKGROUND_GRADIENT   1
 Gradient background.
 
#define BACKGROUND_COMMAND   2
 Command to run.
 
#define BACKGROUND_STRETCH   3
 Stretched image.
 
#define BACKGROUND_TILE   4
 Tiled image.
 
#define BACKGROUND_SCALE   5
 Scaled image.
 

Typedefs

typedef unsigned char BackgroundType
 Enumeration of background types.
 
typedef struct BackgroundNode BackgroundNode
 Structure to represent a background for one or more desktops.
 

Functions

static void LoadGradientBackground (BackgroundNode *bp)
 Load a gradient background.
 
static void LoadImageBackground (BackgroundNode *bp)
 Load an image background.
 
void InitializeBackgrounds (void)
 Initialize any data needed for background support.
 
void StartupBackgrounds (void)
 Startup background support.
 
void ShutdownBackgrounds (void)
 Shutdown background support.
 
void DestroyBackgrounds (void)
 Release any data needed for background support.
 
void SetBackground (int desktop, const char *type, const char *value)
 Set the background to use for the specified desktops.
 
void LoadBackground (int desktop)
 Load the background for the specified desktop.
 

Variables

static BackgroundNodebackgrounds
 Linked list of backgrounds.
 
static BackgroundNodedefaultBackground
 The default background.
 
static BackgroundNodelastBackground
 The last background loaded.
 

Detailed Description

Background control functions.

Author
Joe Wingbermuehle
Date
2007

Definition in file background.c.

Macro Definition Documentation

#define BACKGROUND_COMMAND   2

Command to run.

Definition at line 26 of file background.c.

Referenced by LoadBackground(), SetBackground(), and StartupBackgrounds().

#define BACKGROUND_GRADIENT   1

Gradient background.

Definition at line 25 of file background.c.

Referenced by SetBackground(), and StartupBackgrounds().

#define BACKGROUND_SCALE   5

Scaled image.

Definition at line 29 of file background.c.

Referenced by LoadImageBackground(), SetBackground(), and StartupBackgrounds().

#define BACKGROUND_SOLID   0

Solid color background.

Definition at line 24 of file background.c.

Referenced by SetBackground(), and StartupBackgrounds().

#define BACKGROUND_STRETCH   3

Stretched image.

Definition at line 27 of file background.c.

Referenced by SetBackground(), and StartupBackgrounds().

#define BACKGROUND_TILE   4

Tiled image.

Definition at line 28 of file background.c.

Referenced by LoadImageBackground(), SetBackground(), and StartupBackgrounds().

Typedef Documentation

Structure to represent a background for one or more desktops.

typedef unsigned char BackgroundType

Enumeration of background types.

Definition at line 23 of file background.c.

Function Documentation

void DestroyBackgrounds ( void  )

Release any data needed for background support.

Definition at line 108 of file background.c.

References BackgroundNode::next, Release, and BackgroundNode::value.

Referenced by Destroy().

void InitializeBackgrounds ( void  )

Initialize any data needed for background support.

Definition at line 53 of file background.c.

Referenced by Initialize().

void LoadBackground ( int  desktop)
void LoadGradientBackground ( BackgroundNode bp)
static
void LoadImageBackground ( BackgroundNode bp)
static
void SetBackground ( int  desktop,
const char *  type,
const char *  value 
)
void ShutdownBackgrounds ( void  )

Shutdown background support.

Definition at line 96 of file background.c.

References display, JXFreePixmap, BackgroundNode::next, and BackgroundNode::pixmap.

Referenced by Shutdown().

void StartupBackgrounds ( void  )

Variable Documentation

BackgroundNode* backgrounds
static

Linked list of backgrounds.

Definition at line 41 of file background.c.

Referenced by SetBackground().

BackgroundNode* defaultBackground
static

The default background.

Definition at line 44 of file background.c.

Referenced by LoadBackground().

BackgroundNode* lastBackground
static

The last background loaded.

Definition at line 47 of file background.c.

joewing.net / Projects / JWM