1 |
|
/* |
2 |
|
* clip_unix.cpp - Clipboard handling, Unix implementation |
3 |
|
* |
4 |
< |
* SheepShaver (C) 1997-2003 Christian Bauer and Marc Hellwig |
4 |
> |
* SheepShaver (C) 1997-2004 Christian Bauer and Marc Hellwig |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
127 |
|
// Flag: Don't convert clipboard text |
128 |
|
static bool no_clip_conversion; |
129 |
|
|
130 |
< |
// Flag for PutScrap(): the data was put by GetScrap(), don't bounce it back to the Be side |
130 |
> |
// Flag for PutScrap(): the data was put by GetScrap(), don't bounce it back to the Unix side |
131 |
|
static bool we_put_this_data = false; |
132 |
|
|
133 |
|
// X11 variables |
142 |
|
// Define a byte array (rewrite if it's a bottleneck) |
143 |
|
struct ByteArray : public vector<uint8> { |
144 |
|
void resize(int size) { reserve(size); vector<uint8>::resize(size); } |
145 |
< |
uint8 *data() { return &at(0); } |
145 |
> |
uint8 *data() { return &(*this)[0]; } |
146 |
|
}; |
147 |
|
|
148 |
|
// Clipboard data for requestors |
497 |
|
PW(0x588f), // addq.l #4,sp |
498 |
|
PW(M68K_RTS) |
499 |
|
}; |
500 |
< |
uint32 proc_area = (uint32)proc; |
500 |
> |
uint32 proc_area = Host2MacAddr((uint8 *)proc); |
501 |
|
WriteMacInt32(proc_area + 6, data.size()); |
502 |
|
WriteMacInt32(proc_area + 12, type); |
503 |
|
WriteMacInt32(proc_area + 18, scrap_area); |
556 |
|
// Change requestor property |
557 |
|
XChangeProperty(x_display, req->requestor, req->property, |
558 |
|
xa_targets, 32, |
559 |
< |
PropModeReplace, (uint8 *)&targets.at(0), targets.size()); |
559 |
> |
PropModeReplace, (uint8 *)&targets[0], targets.size()); |
560 |
|
|
561 |
|
return true; |
562 |
|
} |