Clipboard - some questions
Currently I'm working on an implementation of clipboard
access on OS/2 Warp. Some of you may remember my last
comment on this issue that this doesn't really work as I'd
like to have it, and vim doesn't support the * register on
OS/2 till now. Unfortunatley I'm relly no C-guru, so I'd
need some help from the people who know the source a bit
better than me...
Well, I run into some probelms as I don't get the calling
mechanisms for the functions you use in vim. As far as I
understand it I have to define the following functions
which should be called from within ui.c. Additionally I
think the first two are only used for vim to see internally
if * is representing the current clipboard or not. That is
in my case I'd tell vim "no it's not the actual contents get
it again" as I don't own the clipboard for my own and any
app could change the contents. This is to my understaning
done like in windows, so these functions are pretty simple.
The _own_ function just returns a FAIL, the _lose_ function
does nothing at all.
Ok, so far so good. Now, as far as I
understand the other sourcefiles refering to the clipboard
(os_win32.c e.g.) the _request_ function should write the
contents of the system clipboard to the * register and do
nothing else, all other functions are done within ui.c and I
don't need to care about them. _set_ on the other hand
should write the current contents of the * register to the
system clipboard. Is this correct so far?
Now I tried to simply write a static string to * and the
clipboard respectively to see if the calling mechanism works
at all. But it obviously does not. :( What would I need to
do for vim to see my functions? The compiler and linker are
happy with my declaration, so at least they see the functions
and resolves them, but vim doesn't even call them. (I added
some printf() to the functions which obviously never get's
To fill the registers or read the registers I came to the
conclusion that I should use
clip_yank_selection(type, str, len) -> copies string str of
type and length len to the * register
clip_get_selection() -> fills the current selected text
nto the * register
CU/2 (( In the beginning was The Word.
Alexander Wagner )) And The Word was Content-type: text/plain
Team OS/2 Franken (( -=[ Team OS/2 Germany #294 ]=-
Please use only A.Wagner@... or A.Wagner@... for
replies, even if some other addresses may appear. Thanks!
--> Get my PGP-key with Subject: Request for PGP-Keys <--