Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fcf263d

Browse files
made additions
1 parent cee03a0 commit fcf263d

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

‎Source.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,34 @@ static Window root;
77
static int screen;
88

99
Window createWindow(int x, int y, int width, int height, int border, long borderColor, long rgb) {
10-
Window window = XCreateSimpleWindow(display, root, x, y, width, height, border, borderColor, rgb);
10+
Window window = XCreateSimpleWindow(display, root, x, y, width, height, border, (long) borderColor, (long) rgb);
1111
return window;
1212
}
1313

1414
long rgb(int r, int g, int b) {
1515
return b + (g<<8) + (r<<16);
1616
}
1717

18+
long red() {
19+
return rgb(255, 0, 0);
20+
}
21+
22+
long green() {
23+
return rgb(0, 255, 0);
24+
}
25+
26+
long blue() {
27+
return rgb(0, 0, 255);
28+
}
29+
30+
long white() {
31+
return rgb(255, 255, 255);
32+
}
33+
34+
long black() {
35+
return rgb(0, 0, 0);
36+
}
37+
1838
int start(int x, int y, int width, int height, int border, long borderColor, long rgb, char[] windowTitle) {
1939
Window window;
2040

‎Source.i

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22

33
extern Window createWindow(int x, int y, int width, int height, int border, long borderColor, long rgb);
44
extern long rgb(int r, int g, int b);
5+
extern long red();
6+
extern long green();
7+
extern long blue();
8+
extern long white();
9+
extern long black();
510
extern int start(int x, int y, int width, int height, int border, long borderColor, long rgb, char[] windowTitle);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /