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

Functions for displaying popup windows. More...

#include "jwm.h"
#include "popup.h"
#include "main.h"
#include "color.h"
#include "font.h"
#include "screen.h"
#include "cursor.h"
#include "timing.h"
#include "misc.h"
#include "settings.h"
#include "event.h"
#include "hint.h"

Go to the source code of this file.

Data Structures

struct  PopupType
 

Typedefs

typedef struct PopupType PopupType
 

Functions

static void MeasurePopupText ()
 Calculate dimensions of a popup window given the popup text.
 
static void SignalPopup (const TimeType *now, int x, int y, Window w, void *data)
 Signal popup (this is used to hide popups after awhile).
 
void StartupPopup (void)
 Startup popups.
 
void ShutdownPopup (void)
 Shutdown popups.
 
void ShowPopup (int x, int y, const char *text, const PopupMaskType context)
 Show a popup window.
 
char ProcessPopupEvent (const XEvent *event)
 Process an event on a popup window.
 

Variables

static PopupType popup
 

Detailed Description

Functions for displaying popup windows.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file popup.c.

Typedef Documentation

typedef struct PopupType PopupType

Function Documentation

void MeasurePopupText ( )
static

Calculate dimensions of a popup window given the popup text.

Definition at line 66 of file popup.c.

References CopyString(), FONT_POPUP, GetStringHeight(), GetStringWidth(), PopupType::height, PopupType::lineCount, PopupType::lines, Max, PopupType::text, and PopupType::width.

Referenced by ShowPopup().

char ProcessPopupEvent ( const XEvent *  event)

Process an event on a popup window.

Process a popup event.

Definition at line 220 of file popup.c.

References display, PopupType::height, JXCopyArea, JXDestroyWindow, JXFreePixmap, PopupType::pmap, rootGC, PopupType::width, and PopupType::window.

Referenced by WaitForEvent().

void ShowPopup ( int  x,
int  y,
const char *  text,
const PopupMaskType  context 
)
void ShutdownPopup ( void  )
void SignalPopup ( const TimeType now,
int  x,
int  y,
Window  w,
void *  data 
)
static

Signal popup (this is used to hide popups after awhile).

Definition at line 207 of file popup.c.

References display, JXDestroyWindow, JXFreePixmap, PopupType::mw, PopupType::mx, PopupType::my, PopupType::pmap, and PopupType::window.

Referenced by ShutdownPopup(), and StartupPopup().

void StartupPopup ( void  )

Startup popups.

Definition at line 42 of file popup.c.

References RegisterCallback(), SignalPopup(), PopupType::text, and PopupType::window.

Referenced by Startup().

Variable Documentation

PopupType popup
static

Definition at line 35 of file popup.c.

Referenced by ParseTrayButton(), and SignalTrayButton().

joewing.net / Projects / JWM