OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [services/] [gfx/] [mw/] [v2_0/] [doc/] [nano-X/] [html/] [nano-x-selections.html] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
<HTML
2
><HEAD
3
><TITLE
4
>selections</TITLE
5
><META
6
NAME="GENERATOR"
7
CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
8
REL="HOME"
9
TITLE="Nano-X API Reference Manual"
10
HREF="index.html"><LINK
11
REL="UP"
12
TITLE="libnano-X"
13
HREF="libnano-x.html"><LINK
14
REL="PREVIOUS"
15
TITLE="regions"
16
HREF="nano-x-regions.html"><LINK
17
REL="NEXT"
18
TITLE="misc"
19
HREF="nano-x-misc.html"></HEAD
20
><BODY
21
BGCOLOR="#FFFFFF"
22
TEXT="#000000"
23
><DIV
24
CLASS="NAVHEADER"
25
><TABLE
26
WIDTH="100%"
27
BORDER="0"
28
BGCOLOR="#000000"
29
CELLPADDING="1"
30
CELLSPACING="0"
31
><TR
32
><TH
33
COLSPAN="4"
34
ALIGN="center"
35
><FONT
36
COLOR="#FFFFFF"
37
SIZE="5"
38
>Nano-X API Reference Manual</FONT
39
></TH
40
></TR
41
><TR
42
><TD
43
WIDTH="25%"
44
BGCOLOR="#C00000"
45
ALIGN="left"
46
><A
47
HREF="nano-x-regions.html"
48
><FONT
49
COLOR="#FFFFFF"
50
SIZE="3"
51
><B
52
>&#60;&#60;&#60; Previous Page</B
53
></FONT
54
></A
55
></TD
56
><TD
57
WIDTH="25%"
58
BGCOLOR="#0000C0"
59
ALIGN="center"
60
><FONT
61
COLOR="#FFFFFF"
62
SIZE="3"
63
><B
64
><A
65
HREF="index.html"
66
><FONT
67
COLOR="#FFFFFF"
68
SIZE="3"
69
><B
70
>Home</B
71
></FONT
72
></A
73
></B
74
></FONT
75
></TD
76
><TD
77
WIDTH="25%"
78
BGCOLOR="#00C000"
79
ALIGN="center"
80
><FONT
81
COLOR="#FFFFFF"
82
SIZE="3"
83
><B
84
><A
85
HREF="libnano-x.html"
86
><FONT
87
COLOR="#FFFFFF"
88
SIZE="3"
89
><B
90
>Up</B
91
></FONT
92
></A
93
></B
94
></FONT
95
></TD
96
><TD
97
WIDTH="25%"
98
BGCOLOR="#C00000"
99
ALIGN="right"
100
><A
101
HREF="nano-x-misc.html"
102
><FONT
103
COLOR="#FFFFFF"
104
SIZE="3"
105
><B
106
>Next Page &#62;&#62;&#62;</B
107
></FONT
108
></A
109
></TD
110
></TR
111
></TABLE
112
></DIV
113
><H1
114
>selections</H1
115
><DIV
116
CLASS="REFNAMEDIV"
117
><A
118
NAME="AEN2977"
119
></A
120
><H2
121
>Name</H2
122
>selections &#8212; </DIV
123
><DIV
124
CLASS="REFSYNOPSISDIV"
125
><A
126
NAME="AEN2980"
127
></A
128
><H2
129
>Synopsis</H2
130
><TABLE
131
BORDER="0"
132
BGCOLOR="#D6E8FF"
133
WIDTH="100%"
134
CELLPADDING="6"
135
><TR
136
><TD
137
><PRE
138
CLASS="SYNOPSIS"
139
>&#13;
140
 
141
void        <A
142
HREF="nano-x-selections.html#GRSETSELECTIONOWNER"
143
>GrSetSelectionOwner</A
144
>             (<GTKDOCLINK
145
HREF="GR-WINDOW-ID-CAPS"
146
>GR_WINDOW_ID</GTKDOCLINK
147
> wid,
148
                                             <GTKDOCLINK
149
HREF="GR-CHAR-CAPS"
150
>GR_CHAR</GTKDOCLINK
151
> *typelist);
152
<GTKDOCLINK
153
HREF="GR-WINDOW-ID-CAPS"
154
>GR_WINDOW_ID</GTKDOCLINK
155
> <A
156
HREF="nano-x-selections.html#GRGETSELECTIONOWNER"
157
>GrGetSelectionOwner</A
158
>            (<GTKDOCLINK
159
HREF="GR-CHAR-CAPS"
160
>GR_CHAR</GTKDOCLINK
161
> **typelist);
162
void        <A
163
HREF="nano-x-selections.html#GRREQUESTCLIENTDATA"
164
>GrRequestClientData</A
165
>             (<GTKDOCLINK
166
HREF="GR-WINDOW-ID-CAPS"
167
>GR_WINDOW_ID</GTKDOCLINK
168
> wid,
169
                                             <GTKDOCLINK
170
HREF="GR-WINDOW-ID-CAPS"
171
>GR_WINDOW_ID</GTKDOCLINK
172
> rid,
173
                                             <GTKDOCLINK
174
HREF="GR-SERIALNO-CAPS"
175
>GR_SERIALNO</GTKDOCLINK
176
> serial,
177
                                             <GTKDOCLINK
178
HREF="GR-MIMETYPE-CAPS"
179
>GR_MIMETYPE</GTKDOCLINK
180
> mimetype);
181
void        <A
182
HREF="nano-x-selections.html#GRSENDCLIENTDATA"
183
>GrSendClientData</A
184
>                (<GTKDOCLINK
185
HREF="GR-WINDOW-ID-CAPS"
186
>GR_WINDOW_ID</GTKDOCLINK
187
> wid,
188
                                             <GTKDOCLINK
189
HREF="GR-WINDOW-ID-CAPS"
190
>GR_WINDOW_ID</GTKDOCLINK
191
> did,
192
                                             <GTKDOCLINK
193
HREF="GR-SERIALNO-CAPS"
194
>GR_SERIALNO</GTKDOCLINK
195
> serial,
196
                                             <GTKDOCLINK
197
HREF="GR-LENGTH-CAPS"
198
>GR_LENGTH</GTKDOCLINK
199
> len,
200
                                             <GTKDOCLINK
201
HREF="GR-LENGTH-CAPS"
202
>GR_LENGTH</GTKDOCLINK
203
> thislen,
204
                                             void *data);</PRE
205
></TD
206
></TR
207
></TABLE
208
></DIV
209
><DIV
210
CLASS="REFSECT1"
211
><A
212
NAME="AEN3000"
213
></A
214
><H2
215
>Description</H2
216
><P
217
></P
218
></DIV
219
><DIV
220
CLASS="REFSECT1"
221
><A
222
NAME="AEN3003"
223
></A
224
><H2
225
>Details</H2
226
><DIV
227
CLASS="REFSECT2"
228
><A
229
NAME="AEN3005"
230
></A
231
><H3
232
><A
233
NAME="GRSETSELECTIONOWNER"
234
></A
235
>GrSetSelectionOwner ()</H3
236
><TABLE
237
BORDER="0"
238
BGCOLOR="#D6E8FF"
239
WIDTH="100%"
240
CELLPADDING="6"
241
><TR
242
><TD
243
><PRE
244
CLASS="PROGRAMLISTING"
245
>void        GrSetSelectionOwner             (<GTKDOCLINK
246
HREF="GR-WINDOW-ID-CAPS"
247
>GR_WINDOW_ID</GTKDOCLINK
248
> wid,
249
                                             <GTKDOCLINK
250
HREF="GR-CHAR-CAPS"
251
>GR_CHAR</GTKDOCLINK
252
> *typelist);</PRE
253
></TD
254
></TR
255
></TABLE
256
><P
257
>Sets the current selection (otherwise known as the clipboard) ownership
258
to the specified window. Specifying an owner of 0 disowns the selection.
259
The typelist argument is a list of mime types (seperated by space
260
characters) which the window is able to supply the data as. At least one
261
type must be specified unless you are disowning the selection (typically
262
text/plain for plain ASCII text or text/uri-list for a filename).</P
263
><P
264
>The window which owns the current selection must be prepared to handle
265
SELECTION_LOST events (received when another window takes ownership of the
266
selection) and CLIENT_DATA_REQ events (received when a client wishes to
267
retreive the selection data).</P
268
><P
269
></P
270
><DIV
271
CLASS="INFORMALTABLE"
272
><P
273
></P
274
><TABLE
275
BORDER="0"
276
WIDTH="100%"
277
BGCOLOR="#FFD0D0"
278
CELLSPACING="0"
279
CELLPADDING="4"
280
CLASS="CALSTABLE"
281
><TR
282
><TD
283
WIDTH="20%"
284
ALIGN="RIGHT"
285
VALIGN="TOP"
286
><TT
287
CLASS="PARAMETER"
288
><I
289
>wid</I
290
></TT
291
>&nbsp;:</TD
292
><TD
293
WIDTH="80%"
294
ALIGN="LEFT"
295
VALIGN="TOP"
296
> the ID of the window to set the selection owner to</TD
297
></TR
298
><TR
299
><TD
300
WIDTH="20%"
301
ALIGN="RIGHT"
302
VALIGN="TOP"
303
><TT
304
CLASS="PARAMETER"
305
><I
306
>typelist</I
307
></TT
308
>&nbsp;:</TD
309
><TD
310
WIDTH="80%"
311
ALIGN="LEFT"
312
VALIGN="TOP"
313
> list of mime types selection data can be supplied as</TD
314
></TR
315
></TABLE
316
><P
317
></P
318
></DIV
319
></DIV
320
><HR><DIV
321
CLASS="REFSECT2"
322
><A
323
NAME="AEN3027"
324
></A
325
><H3
326
><A
327
NAME="GRGETSELECTIONOWNER"
328
></A
329
>GrGetSelectionOwner ()</H3
330
><TABLE
331
BORDER="0"
332
BGCOLOR="#D6E8FF"
333
WIDTH="100%"
334
CELLPADDING="6"
335
><TR
336
><TD
337
><PRE
338
CLASS="PROGRAMLISTING"
339
><GTKDOCLINK
340
HREF="GR-WINDOW-ID-CAPS"
341
>GR_WINDOW_ID</GTKDOCLINK
342
> GrGetSelectionOwner            (<GTKDOCLINK
343
HREF="GR-CHAR-CAPS"
344
>GR_CHAR</GTKDOCLINK
345
> **typelist);</PRE
346
></TD
347
></TR
348
></TABLE
349
><P
350
>Finds the window which currently owns the selection and returns its ID,
351
or 0 if no window currently owns the selection. A pointer to the list of
352
mime types the selection owner is capable of supplying is placed in the
353
pointer specified by the typelist argument. The typelist is null terminated,
354
and the fields are seperated by space characters. It is the callers
355
responsibility to free the typelist string, as it is allocated dynamically.
356
If the allocation fails, it will be set to a NULL pointer, so remember to
357
check the value of it before using it.</P
358
><P
359
></P
360
><DIV
361
CLASS="INFORMALTABLE"
362
><P
363
></P
364
><TABLE
365
BORDER="0"
366
WIDTH="100%"
367
BGCOLOR="#FFD0D0"
368
CELLSPACING="0"
369
CELLPADDING="4"
370
CLASS="CALSTABLE"
371
><TR
372
><TD
373
WIDTH="20%"
374
ALIGN="RIGHT"
375
VALIGN="TOP"
376
><TT
377
CLASS="PARAMETER"
378
><I
379
>typelist</I
380
></TT
381
>&nbsp;:</TD
382
><TD
383
WIDTH="80%"
384
ALIGN="LEFT"
385
VALIGN="TOP"
386
> pointer used to return the list of available mime types </TD
387
></TR
388
><TR
389
><TD
390
WIDTH="20%"
391
ALIGN="RIGHT"
392
VALIGN="TOP"
393
><I
394
CLASS="EMPHASIS"
395
>Returns</I
396
> :</TD
397
><TD
398
WIDTH="80%"
399
ALIGN="LEFT"
400
VALIGN="TOP"
401
> the ID of the window which currently owns the selection, or 0</TD
402
></TR
403
></TABLE
404
><P
405
></P
406
></DIV
407
></DIV
408
><HR><DIV
409
CLASS="REFSECT2"
410
><A
411
NAME="AEN3048"
412
></A
413
><H3
414
><A
415
NAME="GRREQUESTCLIENTDATA"
416
></A
417
>GrRequestClientData ()</H3
418
><TABLE
419
BORDER="0"
420
BGCOLOR="#D6E8FF"
421
WIDTH="100%"
422
CELLPADDING="6"
423
><TR
424
><TD
425
><PRE
426
CLASS="PROGRAMLISTING"
427
>void        GrRequestClientData             (<GTKDOCLINK
428
HREF="GR-WINDOW-ID-CAPS"
429
>GR_WINDOW_ID</GTKDOCLINK
430
> wid,
431
                                             <GTKDOCLINK
432
HREF="GR-WINDOW-ID-CAPS"
433
>GR_WINDOW_ID</GTKDOCLINK
434
> rid,
435
                                             <GTKDOCLINK
436
HREF="GR-SERIALNO-CAPS"
437
>GR_SERIALNO</GTKDOCLINK
438
> serial,
439
                                             <GTKDOCLINK
440
HREF="GR-MIMETYPE-CAPS"
441
>GR_MIMETYPE</GTKDOCLINK
442
> mimetype);</PRE
443
></TD
444
></TR
445
></TABLE
446
><P
447
>Sends a CLIENT_DATA_REQ event to the specified window. Used for requesting
448
both selection and "drag and drop" data. The mimetype argument specifies
449
the format of the data you would like to receive, as an index into the list
450
returned by GrGetSelectionOwner (the first type in the list is index 0).
451
The server makes no guarantees as to when, or even if, the client will
452
reply to the request. If the client does reply, the reply will take the
453
form of one or more CLIENT_DATA events. The request serial number is
454
typically a unique ID which the client can assign to a request in order for
455
it to be able to keep track of transfers (CLIENT_DATA events contain the
456
same number in the sid field). Remember to free the data field of the
457
CLIENT_DATA events as they are dynamically allocated. Also note that if
458
the allocation fails the data field will be set to NULL, so you should
459
check the value before using it.</P
460
><P
461
></P
462
><DIV
463
CLASS="INFORMALTABLE"
464
><P
465
></P
466
><TABLE
467
BORDER="0"
468
WIDTH="100%"
469
BGCOLOR="#FFD0D0"
470
CELLSPACING="0"
471
CELLPADDING="4"
472
CLASS="CALSTABLE"
473
><TR
474
><TD
475
WIDTH="20%"
476
ALIGN="RIGHT"
477
VALIGN="TOP"
478
><TT
479
CLASS="PARAMETER"
480
><I
481
>wid</I
482
></TT
483
>&nbsp;:</TD
484
><TD
485
WIDTH="80%"
486
ALIGN="LEFT"
487
VALIGN="TOP"
488
> the ID of the window requesting the data</TD
489
></TR
490
><TR
491
><TD
492
WIDTH="20%"
493
ALIGN="RIGHT"
494
VALIGN="TOP"
495
><TT
496
CLASS="PARAMETER"
497
><I
498
>rid</I
499
></TT
500
>&nbsp;:</TD
501
><TD
502
WIDTH="80%"
503
ALIGN="LEFT"
504
VALIGN="TOP"
505
> the ID of the window to request the data from</TD
506
></TR
507
><TR
508
><TD
509
WIDTH="20%"
510
ALIGN="RIGHT"
511
VALIGN="TOP"
512
><TT
513
CLASS="PARAMETER"
514
><I
515
>serial</I
516
></TT
517
>&nbsp;:</TD
518
><TD
519
WIDTH="80%"
520
ALIGN="LEFT"
521
VALIGN="TOP"
522
> the serial number of the request</TD
523
></TR
524
><TR
525
><TD
526
WIDTH="20%"
527
ALIGN="RIGHT"
528
VALIGN="TOP"
529
><TT
530
CLASS="PARAMETER"
531
><I
532
>mimetype</I
533
></TT
534
>&nbsp;:</TD
535
><TD
536
WIDTH="80%"
537
ALIGN="LEFT"
538
VALIGN="TOP"
539
> the number of the desired mime type to request</TD
540
></TR
541
></TABLE
542
><P
543
></P
544
></DIV
545
></DIV
546
><HR><DIV
547
CLASS="REFSECT2"
548
><A
549
NAME="AEN3079"
550
></A
551
><H3
552
><A
553
NAME="GRSENDCLIENTDATA"
554
></A
555
>GrSendClientData ()</H3
556
><TABLE
557
BORDER="0"
558
BGCOLOR="#D6E8FF"
559
WIDTH="100%"
560
CELLPADDING="6"
561
><TR
562
><TD
563
><PRE
564
CLASS="PROGRAMLISTING"
565
>void        GrSendClientData                (<GTKDOCLINK
566
HREF="GR-WINDOW-ID-CAPS"
567
>GR_WINDOW_ID</GTKDOCLINK
568
> wid,
569
                                             <GTKDOCLINK
570
HREF="GR-WINDOW-ID-CAPS"
571
>GR_WINDOW_ID</GTKDOCLINK
572
> did,
573
                                             <GTKDOCLINK
574
HREF="GR-SERIALNO-CAPS"
575
>GR_SERIALNO</GTKDOCLINK
576
> serial,
577
                                             <GTKDOCLINK
578
HREF="GR-LENGTH-CAPS"
579
>GR_LENGTH</GTKDOCLINK
580
> len,
581
                                             <GTKDOCLINK
582
HREF="GR-LENGTH-CAPS"
583
>GR_LENGTH</GTKDOCLINK
584
> thislen,
585
                                             void *data);</PRE
586
></TD
587
></TR
588
></TABLE
589
><P
590
>Used as the response to a CLIENT_DATA_REQ event. Sends the specified data
591
of the specified length to the specified window using the specified source
592
window ID and transfer serial number. Any fragmentation of the data into
593
multiple CLIENT_DATA events which is required is handled automatically.
594
The serial number should always be set to the value supplied by the
595
CLIENT_DATA_REQ event. The thislen parameter is used internally to split
596
the data up into packets. It should be set to the same value as the len
597
parameter.</P
598
><P
599
></P
600
><DIV
601
CLASS="INFORMALTABLE"
602
><P
603
></P
604
><TABLE
605
BORDER="0"
606
WIDTH="100%"
607
BGCOLOR="#FFD0D0"
608
CELLSPACING="0"
609
CELLPADDING="4"
610
CLASS="CALSTABLE"
611
><TR
612
><TD
613
WIDTH="20%"
614
ALIGN="RIGHT"
615
VALIGN="TOP"
616
><TT
617
CLASS="PARAMETER"
618
><I
619
>wid</I
620
></TT
621
>&nbsp;:</TD
622
><TD
623
WIDTH="80%"
624
ALIGN="LEFT"
625
VALIGN="TOP"
626
> the ID of the window sending the data</TD
627
></TR
628
><TR
629
><TD
630
WIDTH="20%"
631
ALIGN="RIGHT"
632
VALIGN="TOP"
633
><TT
634
CLASS="PARAMETER"
635
><I
636
>did</I
637
></TT
638
>&nbsp;:</TD
639
><TD
640
WIDTH="80%"
641
ALIGN="LEFT"
642
VALIGN="TOP"
643
> the ID of the destination window</TD
644
></TR
645
><TR
646
><TD
647
WIDTH="20%"
648
ALIGN="RIGHT"
649
VALIGN="TOP"
650
><TT
651
CLASS="PARAMETER"
652
><I
653
>serial</I
654
></TT
655
>&nbsp;:</TD
656
><TD
657
WIDTH="80%"
658
ALIGN="LEFT"
659
VALIGN="TOP"
660
>&nbsp;</TD
661
></TR
662
><TR
663
><TD
664
WIDTH="20%"
665
ALIGN="RIGHT"
666
VALIGN="TOP"
667
><TT
668
CLASS="PARAMETER"
669
><I
670
>len</I
671
></TT
672
>&nbsp;:</TD
673
><TD
674
WIDTH="80%"
675
ALIGN="LEFT"
676
VALIGN="TOP"
677
> the number of bytes of data to transfer</TD
678
></TR
679
><TR
680
><TD
681
WIDTH="20%"
682
ALIGN="RIGHT"
683
VALIGN="TOP"
684
><TT
685
CLASS="PARAMETER"
686
><I
687
>thislen</I
688
></TT
689
>&nbsp;:</TD
690
><TD
691
WIDTH="80%"
692
ALIGN="LEFT"
693
VALIGN="TOP"
694
> the number of bytes in this packet</TD
695
></TR
696
><TR
697
><TD
698
WIDTH="20%"
699
ALIGN="RIGHT"
700
VALIGN="TOP"
701
><TT
702
CLASS="PARAMETER"
703
><I
704
>data</I
705
></TT
706
>&nbsp;:</TD
707
><TD
708
WIDTH="80%"
709
ALIGN="LEFT"
710
VALIGN="TOP"
711
> pointer to the data to transfer</TD
712
></TR
713
></TABLE
714
><P
715
></P
716
></DIV
717
></DIV
718
></DIV
719
><DIV
720
CLASS="NAVFOOTER"
721
><BR
722
CLEAR="all"><BR><TABLE
723
WIDTH="100%"
724
BORDER="0"
725
BGCOLOR="#000000"
726
CELLPADDING="1"
727
CELLSPACING="0"
728
><TR
729
><TD
730
WIDTH="25%"
731
BGCOLOR="#C00000"
732
ALIGN="left"
733
><A
734
HREF="nano-x-regions.html"
735
><FONT
736
COLOR="#FFFFFF"
737
SIZE="3"
738
><B
739
>&#60;&#60;&#60; Previous Page</B
740
></FONT
741
></A
742
></TD
743
><TD
744
WIDTH="25%"
745
BGCOLOR="#0000C0"
746
ALIGN="center"
747
><FONT
748
COLOR="#FFFFFF"
749
SIZE="3"
750
><B
751
><A
752
HREF="index.html"
753
><FONT
754
COLOR="#FFFFFF"
755
SIZE="3"
756
><B
757
>Home</B
758
></FONT
759
></A
760
></B
761
></FONT
762
></TD
763
><TD
764
WIDTH="25%"
765
BGCOLOR="#00C000"
766
ALIGN="center"
767
><FONT
768
COLOR="#FFFFFF"
769
SIZE="3"
770
><B
771
><A
772
HREF="libnano-x.html"
773
><FONT
774
COLOR="#FFFFFF"
775
SIZE="3"
776
><B
777
>Up</B
778
></FONT
779
></A
780
></B
781
></FONT
782
></TD
783
><TD
784
WIDTH="25%"
785
BGCOLOR="#C00000"
786
ALIGN="right"
787
><A
788
HREF="nano-x-misc.html"
789
><FONT
790
COLOR="#FFFFFF"
791
SIZE="3"
792
><B
793
>Next Page &#62;&#62;&#62;</B
794
></FONT
795
></A
796
></TD
797
></TR
798
><TR
799
><TD
800
COLSPAN="2"
801
ALIGN="left"
802
><FONT
803
COLOR="#FFFFFF"
804
SIZE="3"
805
><B
806
>regions</B
807
></FONT
808
></TD
809
><TD
810
COLSPAN="2"
811
ALIGN="right"
812
><FONT
813
COLOR="#FFFFFF"
814
SIZE="3"
815
><B
816
>misc</B
817
></FONT
818
></TD
819
></TR
820
></TABLE
821
></DIV
822
></BODY
823
></HTML
824
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.