21 |
*/ |
*/ |
22 |
|
|
23 |
#include "library.h" |
#include "library.h" |
24 |
#if XmVERSION > 1 & XmREVISION > 1 |
|
|
#include <Xm/XpmP.h> |
|
|
#endif /* XmVERSION > 1 & XmREVISION > 1 */ |
|
25 |
|
|
26 |
/* This creates an XmLabel, manages it, and returns it. */ |
/* This creates an XmLabel, manages it, and returns it. */ |
27 |
Widget |
Widget |
47 |
NULL); |
NULL); |
48 |
} |
} |
49 |
|
|
|
Pixmap |
|
|
antiright_pixmap_file(char* filename) |
|
|
{ |
|
|
Pixmap bitmap; |
|
|
int width, height, x_hot, y_hot; |
|
|
XReadBitmapFile(antiright.display, antiright.root_window, filename, |
|
|
&width, &height, &bitmap, &x_hot, &y_hot); |
|
|
return(bitmap); |
|
|
} |
|
50 |
|
|
51 |
void |
void |
52 |
antiright_label_set_bitmap_from_file(Widget label, char* filename) |
antiright_label_set_bitmap_from_file(Widget label, char* filename) |
53 |
{ |
{ |
54 |
XtVaSetValues(label, |
antiright_set_bitmap_from_file(label, filename); |
|
XmNlabelType, XmPIXMAP, |
|
|
XmNlabelPixmap, antiright_pixmap_file(filename), |
|
|
NULL); |
|
55 |
} |
} |
56 |
|
|
57 |
|
|
58 |
void |
void |
59 |
antiright_label_string(Widget label_widget, |
antiright_label_string(Widget label_widget, |
60 |
char *label_string) |
char *label_string) |