Laxkit
0.0.7.1
|
Typedefs | |
typedef anXWindow *(* | Laxkit::NewWindowFunc )(anXWindow *parnt, const char *ntitle, unsigned long style, anXWindow *owner) |
Function that returns a new window. Used in SplitWindow. |
Functions | |
int | Laxkit::IsWindowChild (anXWindow *top, anXWindow *check) |
Check if a window (check) is the same as or is descended from another (top). | |
anXWindow * | Laxkit::TopWindow (anXWindow *win) |
Return the top level window that win is somewhere nested within. | |
const char * | Laxkit::xlib_event_name (int e_type) |
Return name for an xlib core event. | |
void | Laxkit::printxcrossing (anXWindow *win, XEvent *e) |
cerr an XCrossingEvent. This is used in debugging mode.. | |
int | LaxFiles::one_of_them (const char *str, const char **list) |
Return 1 for str in list, or 0. list is NULL terminated list. | |
void | Laxkit::InitLaxCairo () |
Imlib2 support not compiled in, this just prints a warning and returns. | |
void | Laxkit::InitLaxImlib (int megabytes) |
Initialize Imlib2 using settings in anXApp::app. | |
unsigned long | Laxkit::getUniqueNumber () |
Return a unique unsigned long. | |
void | Laxkit::simple_rgb_to_cmyk (double r, double g, double b, double *c, double *m, double *y, double *k) |
Convert an rgb color to cmyk. | |
void | Laxkit::simple_rgb_to_cmyk (double *rgb, double *cmyk) |
Convert an rgb color to cmyk. Fields in range 0..1. | |
void | Laxkit::simple_rgb_to_cmyk (int r, int g, int b, int *c, int *m, int *y, int *k, int max) |
Convert an rgb color to cmyk. Max is maximum value of the field, ie 255 for 8 bit, or 65535 for 16 bit. | |
void | Laxkit::simple_rgb_to_cmyk (int *rgb, int *cmyk, int max) |
Convert an rgb color to cmyk. Max is maximum value of the field, ie 255 for 8 bit, or 65535 for 16 bit. | |
void | Laxkit::simple_cmyk_to_rgb (double c, double m, double y, double k, double *r, double *g, double *b) |
Convert a cmyk color to rgb with components [0..1]. | |
void | Laxkit::simple_cmyk_to_rgb (int c, int m, int y, int k, int *r, int *g, int *b, int max) |
Convert a cmyk color to rgb. Max is maximum value of the field, ie 255 for 8 bit, or 65535 for 16 bit. | |
void | Laxkit::simple_cmyk_to_rgb (int *cmyk, int *rgb, int max) |
Convert a cmyk color to rgb. Max is maximum value of the field, ie 255 for 8 bit, or 65535 for 16 bit. | |
void | Laxkit::simple_cmyk_to_rgb (double *cmyk, double *rgb) |
Convert a cmyk color to rgb. | |
void | Laxkit::simple_rgb_to_hsv (double r, double g, double b, double *h, double *s, double *v) |
void | Laxkit::simple_rgb_to_hsv (int r, int g, int b, int *h, int *s, int *v, int max) |
void | Laxkit::simple_rgb_to_hsv (int *rgb, int *hsv, int max) |
void | Laxkit::simple_rgb_to_hsv (double *rgb, double *hsv) |
void | Laxkit::simple_hsv_to_rgb (double h, double s, double v, double *r, double *g, double *b) |
void | Laxkit::simple_hsv_to_rgb (int h, int s, int v, int *r, int *g, int *b, int max) |
void | Laxkit::simple_hsv_to_rgb (int *hsv, int *rgb, int max) |
void | Laxkit::simple_hsv_to_rgb (double *hsv, double *rgb) |
Stuff that just kind of hangs around...
unsigned long Laxkit::getUniqueNumber | ( | ) |
Return a unique unsigned long.
Keeps a static unsigned long, and increments it by 1 on each call. Starts at 0.
#include <lax/misc.h>
Referenced by Laxkit::FontManagerCairo::Add(), Laxkit::FontManagerXlib::Add(), Laxkit::PopupMenu::addselect(), Laxkit::anXApp::addtimer(), LaxInterfaces::anInterface::anInterface(), Laxkit::anObject::anObject(), Laxkit::anXApp::initX(), Laxkit::LaxFontXlib::LaxFontXlib(), Laxkit::make_id(), Laxkit::FontManagerCairo::MakeFontFromStr(), Laxkit::FontManagerXlib::MakeFontFromStr(), and LaxInterfaces::ViewportWithStack::Refresh().
void Laxkit::InitLaxCairo | ( | ) |
Imlib2 support not compiled in, this just prints a warning and returns.
Cairo support not compiled in, this just prints a warning and returns.
Referenced by Laxkit::anXApp::initX().
void Laxkit::InitLaxImlib | ( | int | megabytes | ) |
Initialize Imlib2 using settings in anXApp::app.
This should be called after anXApp::init() has been called, and of course before using Imlib2 functions.
This will set up the default graphics backend to Imlib. This means all the functions like load_image, image_out, etc, will be based on Imlib calls.
It sets display, visual, and colormap the the defaults of anXApp::app. Also calls imlib_set_cache_size(megabytes * 1024 * 1024), which sets the image cache size to 10megs. You may call this function whenever you want to expand the cache, for instance.
Also sets the default image functions (load_image(), for instance) to imlib based functions that expect LaxImlibImage objects.
References Laxkit::InitImlib2Backend().
Referenced by Laxkit::anXApp::initX().
int Laxkit::IsWindowChild | ( | anXWindow * | top, |
anXWindow * | check | ||
) |
Check if a window (check) is the same as or is descended from another (top).
Returns 1 if top==check, or if check is a child, returns n+1 where n is the number of generations below top. Thus if check is a direct child of top, then return 2. 3 if it is a grandkid, etc.
Otherwise returns 0.
Referenced by Laxkit::DeviceManager::clearReceiver(), and Laxkit::anXApp::destroywindow().
Return 1 for str in list, or 0. list is NULL terminated list.
Referenced by LaxFiles::XMLChunkToAttribute().
void Laxkit::simple_cmyk_to_rgb | ( | double | c, |
double | m, | ||
double | y, | ||
double | k, | ||
double * | r, | ||
double * | g, | ||
double * | b | ||
) |
Convert a cmyk color to rgb with components [0..1].
Warning, does no NULL pointer check, or bounds check.
Referenced by Laxkit::ScreenColor::cmyk(), Laxkit::ScreenColor::cmykf(), Laxkit::simple_cmyk_to_rgb(), and LaxFiles::SimpleColorAttribute().
Convert a cmyk color to rgb. Max is maximum value of the field, ie 255 for 8 bit, or 65535 for 16 bit.
Warning, does no NULL pointer check, or bounds check.
Convert a cmyk color to rgb. Max is maximum value of the field, ie 255 for 8 bit, or 65535 for 16 bit.
Warning, does no NULL pointer check, or bounds check.
References Laxkit::simple_cmyk_to_rgb().
void Laxkit::simple_cmyk_to_rgb | ( | double * | cmyk, |
double * | rgb | ||
) |
Convert a cmyk color to rgb.
Warning, does no NULL pointer check, or bounds check.
References Laxkit::simple_cmyk_to_rgb().
void Laxkit::simple_hsv_to_rgb | ( | double | h, |
double | s, | ||
double | v, | ||
double * | r, | ||
double * | g, | ||
double * | b | ||
) |
hsv all range [0..1].
Referenced by Laxkit::simple_hsv_to_rgb().
hsv all range [0..1].
References Laxkit::simple_hsv_to_rgb().
hsv all range [0..1].
References Laxkit::simple_hsv_to_rgb().
void Laxkit::simple_hsv_to_rgb | ( | double * | hsv, |
double * | rgb | ||
) |
hsv all range [0..1].
References Laxkit::simple_hsv_to_rgb().
void Laxkit::simple_rgb_to_cmyk | ( | double | r, |
double | g, | ||
double | b, | ||
double * | c, | ||
double * | m, | ||
double * | y, | ||
double * | k | ||
) |
Convert an rgb color to cmyk.
Warning, does no NULL pointer check, or bounds check.
Referenced by Laxkit::simple_rgb_to_cmyk().
void Laxkit::simple_rgb_to_cmyk | ( | double * | rgb, |
double * | cmyk | ||
) |
Convert an rgb color to cmyk. Fields in range 0..1.
Warning, does no NULL pointer check, or bounds check.
References Laxkit::simple_rgb_to_cmyk().
void Laxkit::simple_rgb_to_cmyk | ( | int | r, |
int | g, | ||
int | b, | ||
int * | c, | ||
int * | m, | ||
int * | y, | ||
int * | k, | ||
int | max | ||
) |
Convert an rgb color to cmyk. Max is maximum value of the field, ie 255 for 8 bit, or 65535 for 16 bit.
Warning, does no NULL pointer check, or bounds check.
Convert an rgb color to cmyk. Max is maximum value of the field, ie 255 for 8 bit, or 65535 for 16 bit.
Warning, does no NULL pointer check, or bounds check.
References Laxkit::simple_rgb_to_cmyk().
void Laxkit::simple_rgb_to_hsv | ( | double | r, |
double | g, | ||
double | b, | ||
double * | h, | ||
double * | s, | ||
double * | v | ||
) |
rgb all range [0..1].
Referenced by Laxkit::simple_rgb_to_hsv().
rgb all range [0..max].
References Laxkit::simple_rgb_to_hsv().
rgb all range [0..1].
References Laxkit::simple_rgb_to_hsv().
void Laxkit::simple_rgb_to_hsv | ( | double * | rgb, |
double * | hsv | ||
) |
rgb all range [0..1].
References Laxkit::simple_rgb_to_hsv().
anXWindow * Laxkit::TopWindow | ( | anXWindow * | win | ) |
Return the top level window that win is somewhere nested within.
A top level window has win_parent==NULL.
Return name for an xlib core event.
Referenced by Laxkit::eventscreen().