mirror of https://github.com/adamdruppe/arsd.git
whitespace mods
This commit is contained in:
parent
9dd559b284
commit
d7c19998c5
|
@ -878,7 +878,7 @@ version(Windows) {
|
||||||
/*
|
/*
|
||||||
From MSDN:
|
From MSDN:
|
||||||
|
|
||||||
You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
|
You can also use the GET_X_LPARAM or GET_Y_LPARAM macro to extract the x- or y-coordinate.
|
||||||
|
|
||||||
Important Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x- and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
|
Important Do not use the LOWORD or HIWORD macros to extract the x- and y- coordinates of the cursor position because these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x- and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.
|
||||||
|
|
||||||
|
@ -3638,8 +3638,8 @@ struct KeyEvent {
|
||||||
|
|
||||||
SimpleWindow window; /// associated Window
|
SimpleWindow window; /// associated Window
|
||||||
|
|
||||||
// convert key event to simplified string representation a-la emacs
|
// convert key event to simplified string representation a-la emacs
|
||||||
const(char)[] toStrBuf(bool growdest=false) (char[] dest) const nothrow @trusted {
|
const(char)[] toStrBuf(bool growdest=false) (char[] dest) const nothrow @trusted {
|
||||||
uint dpos = 0;
|
uint dpos = 0;
|
||||||
void put (const(char)[] s...) nothrow @trusted {
|
void put (const(char)[] s...) nothrow @trusted {
|
||||||
static if (growdest) {
|
static if (growdest) {
|
||||||
|
@ -3666,12 +3666,12 @@ const(char)[] toStrBuf(bool growdest=false) (char[] dest) const nothrow @trusted
|
||||||
|
|
||||||
put("Unknown");
|
put("Unknown");
|
||||||
return dest[0..dpos];
|
return dest[0..dpos];
|
||||||
}
|
}
|
||||||
|
|
||||||
string toStr() () { return cast(string)toStrBuf!true(null); } // it is safe to cast here
|
string toStr() () { return cast(string)toStrBuf!true(null); } // it is safe to cast here
|
||||||
|
|
||||||
// sorry for pasta, but i don't want to create new struct in `opEquals()`
|
// sorry for pasta, but i don't want to create new struct in `opEquals()`
|
||||||
static KeyEvent parse (const(char)[] name) nothrow @trusted @nogc {
|
static KeyEvent parse (const(char)[] name) nothrow @trusted @nogc {
|
||||||
KeyEvent res;
|
KeyEvent res;
|
||||||
while (name.length && name.ptr[0] <= ' ') name = name[1..$];
|
while (name.length && name.ptr[0] <= ' ') name = name[1..$];
|
||||||
while (name.length && name[$-1] <= ' ') name = name[0..$-1];
|
while (name.length && name[$-1] <= ' ') name = name[0..$-1];
|
||||||
|
@ -3717,9 +3717,9 @@ static KeyEvent parse (const(char)[] name) nothrow @trusted @nogc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res; // at least modifier state, lol
|
return res; // at least modifier state, lol
|
||||||
}
|
}
|
||||||
|
|
||||||
bool opEquals() (const(char)[] name) const nothrow @trusted @nogc {
|
bool opEquals() (const(char)[] name) const nothrow @trusted @nogc {
|
||||||
while (name.length && name.ptr[0] <= ' ') name = name[1..$];
|
while (name.length && name.ptr[0] <= ' ') name = name[1..$];
|
||||||
while (name.length && name[$-1] <= ' ') name = name[0..$-1];
|
while (name.length && name[$-1] <= ' ') name = name[0..$-1];
|
||||||
if (!this.key) return (name.length == 0);
|
if (!this.key) return (name.length == 0);
|
||||||
|
@ -3765,7 +3765,7 @@ bool opEquals() (const(char)[] name) const nothrow @trusted @nogc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Type of a [MouseEvent]
|
/// Type of a [MouseEvent]
|
||||||
|
@ -8545,27 +8545,21 @@ KeySym XKeycodeToKeysym(
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
int XConvertSelection(Display *display, Atom selection, Atom target,
|
int XConvertSelection(Display *display, Atom selection, Atom target, Atom property, Window requestor, Time time);
|
||||||
Atom property, Window requestor, Time time);
|
|
||||||
|
|
||||||
int XFree(void*);
|
int XFree(void*);
|
||||||
int XDeleteProperty(Display *display, Window w, Atom property);
|
int XDeleteProperty(Display *display, Window w, Atom property);
|
||||||
|
|
||||||
int XChangeProperty(Display *display, Window w, Atom property, Atom
|
int XChangeProperty(Display *display, Window w, Atom property, Atom type, int format, int mode, in void *data, int nelements);
|
||||||
type, int format, int mode, in void *data, int nelements);
|
|
||||||
|
|
||||||
|
int XGetWindowProperty(Display *display, Window w, Atom property, arch_long
|
||||||
|
|
||||||
int XGetWindowProperty(Display *display, Window w, Atom property, arch_long
|
|
||||||
long_offset, arch_long long_length, Bool del, Atom req_type, Atom
|
long_offset, arch_long long_length, Bool del, Atom req_type, Atom
|
||||||
*actual_type_return, int *actual_format_return, arch_ulong
|
*actual_type_return, int *actual_format_return, arch_ulong
|
||||||
*nitems_return, arch_ulong *bytes_after_return, void** prop_return);
|
*nitems_return, arch_ulong *bytes_after_return, void** prop_return);
|
||||||
|
|
||||||
int XSetSelectionOwner(Display *display, Atom selection, Window owner,
|
int XSetSelectionOwner(Display *display, Atom selection, Window owner, Time time);
|
||||||
Time time);
|
|
||||||
|
|
||||||
Window XGetSelectionOwner(Display *display, Atom selection);
|
|
||||||
|
|
||||||
|
Window XGetSelectionOwner(Display *display, Atom selection);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -8893,16 +8887,12 @@ struct XFontStruct {
|
||||||
uint direction; /* Direction the font is painted */
|
uint direction; /* Direction the font is painted */
|
||||||
uint min_char_or_byte2; /* First character */
|
uint min_char_or_byte2; /* First character */
|
||||||
uint max_char_or_byte2; /* Last character */
|
uint max_char_or_byte2; /* Last character */
|
||||||
uint min_byte1; /* First row that exists (for two-byte
|
uint min_byte1; /* First row that exists (for two-byte fonts) */
|
||||||
* fonts) */
|
uint max_byte1; /* Last row that exists (for two-byte fonts) */
|
||||||
uint max_byte1; /* Last row that exists (for two-byte
|
Bool all_chars_exist; /* Flag if all characters have nonzero size */
|
||||||
* fonts) */
|
|
||||||
Bool all_chars_exist; /* Flag if all characters have nonzero
|
|
||||||
* size */
|
|
||||||
uint default_char; /* Char to print for undefined character */
|
uint default_char; /* Char to print for undefined character */
|
||||||
int n_properties; /* How many properties there are */
|
int n_properties; /* How many properties there are */
|
||||||
XFontProp *properties; /* Pointer to array of additional
|
XFontProp *properties; /* Pointer to array of additional properties*/
|
||||||
* properties*/
|
|
||||||
XCharStruct min_bounds; /* Minimum bounds over all existing char*/
|
XCharStruct min_bounds; /* Minimum bounds over all existing char*/
|
||||||
XCharStruct max_bounds; /* Maximum bounds over all existing char*/
|
XCharStruct max_bounds; /* Maximum bounds over all existing char*/
|
||||||
XCharStruct *per_char; /* first_char to last_char information */
|
XCharStruct *per_char; /* first_char to last_char information */
|
||||||
|
@ -9039,7 +9029,7 @@ int XMoveResizeWindow(Display*, Window, int, int, uint, uint);
|
||||||
int XMoveWindow(Display*, Window, int, int);
|
int XMoveWindow(Display*, Window, int, int);
|
||||||
int XResizeWindow(Display *display, Window w, uint width, uint height);
|
int XResizeWindow(Display *display, Window w, uint width, uint height);
|
||||||
|
|
||||||
Colormap XCreateColormap(Display *display, Window w, Visual *visual, int alloc);
|
Colormap XCreateColormap(Display *display, Window w, Visual *visual, int alloc);
|
||||||
|
|
||||||
enum CWBackPixmap = (1L<<0);
|
enum CWBackPixmap = (1L<<0);
|
||||||
enum CWBackPixel = (1L<<1);
|
enum CWBackPixel = (1L<<1);
|
||||||
|
@ -9180,8 +9170,7 @@ int XDestroyWindow(
|
||||||
Window /* w */
|
Window /* w */
|
||||||
);
|
);
|
||||||
|
|
||||||
int XDestroyImage(
|
int XDestroyImage(XImage*);
|
||||||
XImage*);
|
|
||||||
|
|
||||||
int XSelectInput(
|
int XSelectInput(
|
||||||
Display* /* display */,
|
Display* /* display */,
|
||||||
|
@ -9240,19 +9229,13 @@ Status XGetWMNormalHints(Display *display, Window w, XSizeHints *hints, c_long*
|
||||||
/* Size hints mask bits */
|
/* Size hints mask bits */
|
||||||
|
|
||||||
enum USPosition = (1L << 0) /* user specified x, y */;
|
enum USPosition = (1L << 0) /* user specified x, y */;
|
||||||
enum USSize = (1L << 1) /* user specified width, height
|
enum USSize = (1L << 1) /* user specified width, height */;
|
||||||
*/;
|
enum PPosition = (1L << 2) /* program specified position */;
|
||||||
enum PPosition = (1L << 2) /* program specified position
|
|
||||||
*/;
|
|
||||||
enum PSize = (1L << 3) /* program specified size */;
|
enum PSize = (1L << 3) /* program specified size */;
|
||||||
enum PMinSize = (1L << 4) /* program specified minimum
|
enum PMinSize = (1L << 4) /* program specified minimum size */;
|
||||||
size */;
|
enum PMaxSize = (1L << 5) /* program specified maximum size */;
|
||||||
enum PMaxSize = (1L << 5) /* program specified maximum
|
enum PResizeInc = (1L << 6) /* program specified resize increments */;
|
||||||
size */;
|
enum PAspect = (1L << 7) /* program specified min and max aspect ratios */;
|
||||||
enum PResizeInc = (1L << 6) /* program specified resize
|
|
||||||
increments */;
|
|
||||||
enum PAspect = (1L << 7) /* program specified min and
|
|
||||||
max aspect ratios */;
|
|
||||||
enum PBaseSize = (1L << 8);
|
enum PBaseSize = (1L << 8);
|
||||||
enum PWinGravity = (1L << 9);
|
enum PWinGravity = (1L << 9);
|
||||||
enum PAllHints = (PPosition|PSize| PMinSize|PMaxSize| PResizeInc|PAspect);
|
enum PAllHints = (PPosition|PSize| PMinSize|PMaxSize| PResizeInc|PAspect);
|
||||||
|
|
Loading…
Reference in New Issue