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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [mw/] [doc/] [nano-X/] [html/] [nano-x-misc.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 673 markom
<HTML
2
><HEAD
3
><TITLE
4
>misc</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="selections"
16
HREF="nano-x-selections.html"></HEAD
17
><BODY
18
BGCOLOR="#FFFFFF"
19
TEXT="#000000"
20
><DIV
21
CLASS="NAVHEADER"
22
><TABLE
23
WIDTH="100%"
24
BORDER="0"
25
BGCOLOR="#000000"
26
CELLPADDING="1"
27
CELLSPACING="0"
28
><TR
29
><TH
30
COLSPAN="4"
31
ALIGN="center"
32
><FONT
33
COLOR="#FFFFFF"
34
SIZE="5"
35
>Nano-X API Reference Manual</FONT
36
></TH
37
></TR
38
><TR
39
><TD
40
WIDTH="25%"
41
BGCOLOR="#C00000"
42
ALIGN="left"
43
><A
44
HREF="nano-x-selections.html"
45
><FONT
46
COLOR="#FFFFFF"
47
SIZE="3"
48
><B
49
>&#60;&#60;&#60; Previous Page</B
50
></FONT
51
></A
52
></TD
53
><TD
54
WIDTH="25%"
55
BGCOLOR="#0000C0"
56
ALIGN="center"
57
><FONT
58
COLOR="#FFFFFF"
59
SIZE="3"
60
><B
61
><A
62
HREF="index.html"
63
><FONT
64
COLOR="#FFFFFF"
65
SIZE="3"
66
><B
67
>Home</B
68
></FONT
69
></A
70
></B
71
></FONT
72
></TD
73
><TD
74
WIDTH="25%"
75
BGCOLOR="#00C000"
76
ALIGN="center"
77
><FONT
78
COLOR="#FFFFFF"
79
SIZE="3"
80
><B
81
><A
82
HREF="libnano-x.html"
83
><FONT
84
COLOR="#FFFFFF"
85
SIZE="3"
86
><B
87
>Up</B
88
></FONT
89
></A
90
></B
91
></FONT
92
></TD
93
><TD
94
WIDTH="25%"
95
BGCOLOR="#C00000"
96
ALIGN="right"
97
>&nbsp;</TD
98
></TR
99
></TABLE
100
></DIV
101
><H1
102
>misc</H1
103
><DIV
104
CLASS="REFNAMEDIV"
105
><A
106
NAME="AEN3124"
107
></A
108
><H2
109
>Name</H2
110
>misc &#8212; </DIV
111
><DIV
112
CLASS="REFSYNOPSISDIV"
113
><A
114
NAME="AEN3127"
115
></A
116
><H2
117
>Synopsis</H2
118
><TABLE
119
BORDER="0"
120
BGCOLOR="#D6E8FF"
121
WIDTH="100%"
122
CELLPADDING="6"
123
><TR
124
><TD
125
><PRE
126
CLASS="SYNOPSIS"
127
>&#13;
128
 
129
void        <A
130
HREF="nano-x-misc.html#GRREQSHMCMDS"
131
>GrReqShmCmds</A
132
>                    (<GTKDOCLINK
133
HREF="LONG"
134
>long</GTKDOCLINK
135
> shmsize);
136
void        <A
137
HREF="nano-x-misc.html#GRINJECTKEYBOARDEVENT"
138
>GrInjectKeyboardEvent</A
139
>           (<GTKDOCLINK
140
HREF="GR-WINDOW-ID-CAPS"
141
>GR_WINDOW_ID</GTKDOCLINK
142
> wid,
143
                                             <GTKDOCLINK
144
HREF="GR-UNICODE-CAPS"
145
>GR_UNICODE</GTKDOCLINK
146
> uch,
147
                                             <GTKDOCLINK
148
HREF="GR-CHAR-CAPS"
149
>GR_CHAR</GTKDOCLINK
150
> ch,
151
                                             int modif,
152
                                             int special,
153
                                             unsigned char content);
154
void        <A
155
HREF="nano-x-misc.html#GRREGISTERINPUT"
156
>GrRegisterInput</A
157
>                 (int fd);
158
void        <A
159
HREF="nano-x-misc.html#GRPREPARESELECT"
160
>GrPrepareSelect</A
161
>                 (int *maxfd,
162
                                             void *rfdset);
163
void        <A
164
HREF="nano-x-misc.html#GRSERVICESELECT"
165
>GrServiceSelect</A
166
>                 (void *rfdset,
167
                                             <GTKDOCLINK
168
HREF="GR-FNCALLBACKEVENT-CAPS"
169
>GR_FNCALLBACKEVENT</GTKDOCLINK
170
> fncb);
171
void        <A
172
HREF="nano-x-misc.html#GRBELL"
173
>GrBell</A
174
>                          (void);
175
void        <A
176
HREF="nano-x-misc.html#GRSETSCREENSAVERTIMEOUT"
177
>GrSetScreenSaverTimeout</A
178
>         (<GTKDOCLINK
179
HREF="GR-TIMEOUT-CAPS"
180
>GR_TIMEOUT</GTKDOCLINK
181
> timeout);</PRE
182
></TD
183
></TR
184
></TABLE
185
></DIV
186
><DIV
187
CLASS="REFSECT1"
188
><A
189
NAME="AEN3143"
190
></A
191
><H2
192
>Description</H2
193
><P
194
></P
195
></DIV
196
><DIV
197
CLASS="REFSECT1"
198
><A
199
NAME="AEN3146"
200
></A
201
><H2
202
>Details</H2
203
><DIV
204
CLASS="REFSECT2"
205
><A
206
NAME="AEN3148"
207
></A
208
><H3
209
><A
210
NAME="GRREQSHMCMDS"
211
></A
212
>GrReqShmCmds ()</H3
213
><TABLE
214
BORDER="0"
215
BGCOLOR="#D6E8FF"
216
WIDTH="100%"
217
CELLPADDING="6"
218
><TR
219
><TD
220
><PRE
221
CLASS="PROGRAMLISTING"
222
>void        GrReqShmCmds                    (<GTKDOCLINK
223
HREF="LONG"
224
>long</GTKDOCLINK
225
> shmsize);</PRE
226
></TD
227
></TR
228
></TABLE
229
><P
230
>Requests a shared memory area of the specified size to use for transferring
231
command arguments. This is faster but less portable than the standard BSD
232
sockets method of communication (and of course will only work if the client
233
and server are on the same machine). Apart from the initial allocation of
234
the area using this call, the use of shared memory is completely
235
transparent. Additionally, if the allocation fails we silently and
236
automatically fall back on socket communication. It is safe to call this
237
function even if shared memory support is not compiled in; it will simply
238
do nothing.</P
239
><P
240
>FIXME: how does the user decide what size of shared memory area to allocate?</P
241
><P
242
></P
243
><DIV
244
CLASS="INFORMALTABLE"
245
><P
246
></P
247
><TABLE
248
BORDER="0"
249
WIDTH="100%"
250
BGCOLOR="#FFD0D0"
251
CELLSPACING="0"
252
CELLPADDING="4"
253
CLASS="CALSTABLE"
254
><TR
255
><TD
256
WIDTH="20%"
257
ALIGN="RIGHT"
258
VALIGN="TOP"
259
><TT
260
CLASS="PARAMETER"
261
><I
262
>shmsize</I
263
></TT
264
>&nbsp;:</TD
265
><TD
266
WIDTH="80%"
267
ALIGN="LEFT"
268
VALIGN="TOP"
269
> the size of the shared memory area to allocate</TD
270
></TR
271
></TABLE
272
><P
273
></P
274
></DIV
275
></DIV
276
><HR><DIV
277
CLASS="REFSECT2"
278
><A
279
NAME="AEN3165"
280
></A
281
><H3
282
><A
283
NAME="GRINJECTKEYBOARDEVENT"
284
></A
285
>GrInjectKeyboardEvent ()</H3
286
><TABLE
287
BORDER="0"
288
BGCOLOR="#D6E8FF"
289
WIDTH="100%"
290
CELLPADDING="6"
291
><TR
292
><TD
293
><PRE
294
CLASS="PROGRAMLISTING"
295
>void        GrInjectKeyboardEvent           (<GTKDOCLINK
296
HREF="GR-WINDOW-ID-CAPS"
297
>GR_WINDOW_ID</GTKDOCLINK
298
> wid,
299
                                             <GTKDOCLINK
300
HREF="GR-UNICODE-CAPS"
301
>GR_UNICODE</GTKDOCLINK
302
> uch,
303
                                             <GTKDOCLINK
304
HREF="GR-CHAR-CAPS"
305
>GR_CHAR</GTKDOCLINK
306
> ch,
307
                                             int modif,
308
                                             int special,
309
                                             unsigned char content);</PRE
310
></TD
311
></TR
312
></TABLE
313
><P
314
>Sends a keyboard event to the specified window, or to the window with the
315
current keyboard focus if 0 is used as the ID. The other arguments
316
correspond directly to the fields of the same names in the keyboard event
317
structure.</P
318
><P
319
></P
320
><DIV
321
CLASS="INFORMALTABLE"
322
><P
323
></P
324
><TABLE
325
BORDER="0"
326
WIDTH="100%"
327
BGCOLOR="#FFD0D0"
328
CELLSPACING="0"
329
CELLPADDING="4"
330
CLASS="CALSTABLE"
331
><TR
332
><TD
333
WIDTH="20%"
334
ALIGN="RIGHT"
335
VALIGN="TOP"
336
><TT
337
CLASS="PARAMETER"
338
><I
339
>wid</I
340
></TT
341
>&nbsp;:</TD
342
><TD
343
WIDTH="80%"
344
ALIGN="LEFT"
345
VALIGN="TOP"
346
> ID of the window to send the event to, or 0</TD
347
></TR
348
><TR
349
><TD
350
WIDTH="20%"
351
ALIGN="RIGHT"
352
VALIGN="TOP"
353
><TT
354
CLASS="PARAMETER"
355
><I
356
>uch</I
357
></TT
358
>&nbsp;:</TD
359
><TD
360
WIDTH="80%"
361
ALIGN="LEFT"
362
VALIGN="TOP"
363
> 32 bit Unicode keystroke value to inject</TD
364
></TR
365
><TR
366
><TD
367
WIDTH="20%"
368
ALIGN="RIGHT"
369
VALIGN="TOP"
370
><TT
371
CLASS="PARAMETER"
372
><I
373
>ch</I
374
></TT
375
>&nbsp;:</TD
376
><TD
377
WIDTH="80%"
378
ALIGN="LEFT"
379
VALIGN="TOP"
380
> 8 bit ascii keystroke value to inject</TD
381
></TR
382
><TR
383
><TD
384
WIDTH="20%"
385
ALIGN="RIGHT"
386
VALIGN="TOP"
387
><TT
388
CLASS="PARAMETER"
389
><I
390
>modif</I
391
></TT
392
>&nbsp;:</TD
393
><TD
394
WIDTH="80%"
395
ALIGN="LEFT"
396
VALIGN="TOP"
397
>&nbsp;</TD
398
></TR
399
><TR
400
><TD
401
WIDTH="20%"
402
ALIGN="RIGHT"
403
VALIGN="TOP"
404
><TT
405
CLASS="PARAMETER"
406
><I
407
>special</I
408
></TT
409
>&nbsp;:</TD
410
><TD
411
WIDTH="80%"
412
ALIGN="LEFT"
413
VALIGN="TOP"
414
> special keys to inject</TD
415
></TR
416
><TR
417
><TD
418
WIDTH="20%"
419
ALIGN="RIGHT"
420
VALIGN="TOP"
421
><TT
422
CLASS="PARAMETER"
423
><I
424
>content</I
425
></TT
426
>&nbsp;:</TD
427
><TD
428
WIDTH="80%"
429
ALIGN="LEFT"
430
VALIGN="TOP"
431
> mask specifying which arguments are valid</TD
432
></TR
433
></TABLE
434
><P
435
></P
436
></DIV
437
></DIV
438
><HR><DIV
439
CLASS="REFSECT2"
440
><A
441
NAME="AEN3203"
442
></A
443
><H3
444
><A
445
NAME="GRREGISTERINPUT"
446
></A
447
>GrRegisterInput ()</H3
448
><TABLE
449
BORDER="0"
450
BGCOLOR="#D6E8FF"
451
WIDTH="100%"
452
CELLPADDING="6"
453
><TR
454
><TD
455
><PRE
456
CLASS="PROGRAMLISTING"
457
>void        GrRegisterInput                 (int fd);</PRE
458
></TD
459
></TR
460
></TABLE
461
><P
462
>Register an extra file descriptor to monitor in the main <GTKDOCLINK
463
HREF="SELECT"
464
>select</GTKDOCLINK
465
>() call.
466
An event will be returned when the fd has data waiting to be read if that
467
event has been selected for.</P
468
><P
469
></P
470
><DIV
471
CLASS="INFORMALTABLE"
472
><P
473
></P
474
><TABLE
475
BORDER="0"
476
WIDTH="100%"
477
BGCOLOR="#FFD0D0"
478
CELLSPACING="0"
479
CELLPADDING="4"
480
CLASS="CALSTABLE"
481
><TR
482
><TD
483
WIDTH="20%"
484
ALIGN="RIGHT"
485
VALIGN="TOP"
486
><TT
487
CLASS="PARAMETER"
488
><I
489
>fd</I
490
></TT
491
>&nbsp;:</TD
492
><TD
493
WIDTH="80%"
494
ALIGN="LEFT"
495
VALIGN="TOP"
496
> the file descriptor to monitor</TD
497
></TR
498
></TABLE
499
><P
500
></P
501
></DIV
502
></DIV
503
><HR><DIV
504
CLASS="REFSECT2"
505
><A
506
NAME="AEN3219"
507
></A
508
><H3
509
><A
510
NAME="GRPREPARESELECT"
511
></A
512
>GrPrepareSelect ()</H3
513
><TABLE
514
BORDER="0"
515
BGCOLOR="#D6E8FF"
516
WIDTH="100%"
517
CELLPADDING="6"
518
><TR
519
><TD
520
><PRE
521
CLASS="PROGRAMLISTING"
522
>void        GrPrepareSelect                 (int *maxfd,
523
                                             void *rfdset);</PRE
524
></TD
525
></TR
526
></TABLE
527
><P
528
>Prepare for a GrServiceSelect function by asking the server to send the next
529
event but not waiting around for it to arrive and initialising the
530
specified fd_set structure with the client/server socket descriptor and any
531
previously registered external file descriptors. Also compares the current
532
contents of maxfd, the client/server socket descriptor, and the previously
533
registered external file descriptors, and returns the highest of them in
534
maxfd.</P
535
><P
536
></P
537
><DIV
538
CLASS="INFORMALTABLE"
539
><P
540
></P
541
><TABLE
542
BORDER="0"
543
WIDTH="100%"
544
BGCOLOR="#FFD0D0"
545
CELLSPACING="0"
546
CELLPADDING="4"
547
CLASS="CALSTABLE"
548
><TR
549
><TD
550
WIDTH="20%"
551
ALIGN="RIGHT"
552
VALIGN="TOP"
553
><TT
554
CLASS="PARAMETER"
555
><I
556
>maxfd</I
557
></TT
558
>&nbsp;:</TD
559
><TD
560
WIDTH="80%"
561
ALIGN="LEFT"
562
VALIGN="TOP"
563
> pointer to a variable which the highest in use fd will be written to</TD
564
></TR
565
><TR
566
><TD
567
WIDTH="20%"
568
ALIGN="RIGHT"
569
VALIGN="TOP"
570
><TT
571
CLASS="PARAMETER"
572
><I
573
>rfdset</I
574
></TT
575
>&nbsp;:</TD
576
><TD
577
WIDTH="80%"
578
ALIGN="LEFT"
579
VALIGN="TOP"
580
> pointer to the file descriptor set structure to use</TD
581
></TR
582
></TABLE
583
><P
584
></P
585
></DIV
586
></DIV
587
><HR><DIV
588
CLASS="REFSECT2"
589
><A
590
NAME="AEN3238"
591
></A
592
><H3
593
><A
594
NAME="GRSERVICESELECT"
595
></A
596
>GrServiceSelect ()</H3
597
><TABLE
598
BORDER="0"
599
BGCOLOR="#D6E8FF"
600
WIDTH="100%"
601
CELLPADDING="6"
602
><TR
603
><TD
604
><PRE
605
CLASS="PROGRAMLISTING"
606
>void        GrServiceSelect                 (void *rfdset,
607
                                             <GTKDOCLINK
608
HREF="GR-FNCALLBACKEVENT-CAPS"
609
>GR_FNCALLBACKEVENT</GTKDOCLINK
610
> fncb);</PRE
611
></TD
612
></TR
613
></TABLE
614
><P
615
>Used by <A
616
HREF="nano-x-general.html#GRMAINLOOP"
617
>GrMainLoop</A
618
>() to call the specified callback function when an
619
event arrives or there is data waiting on an external fd specified by
620
<A
621
HREF="nano-x-misc.html#GRREGISTERINPUT"
622
>GrRegisterInput</A
623
>().</P
624
><P
625
></P
626
><DIV
627
CLASS="INFORMALTABLE"
628
><P
629
></P
630
><TABLE
631
BORDER="0"
632
WIDTH="100%"
633
BGCOLOR="#FFD0D0"
634
CELLSPACING="0"
635
CELLPADDING="4"
636
CLASS="CALSTABLE"
637
><TR
638
><TD
639
WIDTH="20%"
640
ALIGN="RIGHT"
641
VALIGN="TOP"
642
><TT
643
CLASS="PARAMETER"
644
><I
645
>rfdset</I
646
></TT
647
>&nbsp;:</TD
648
><TD
649
WIDTH="80%"
650
ALIGN="LEFT"
651
VALIGN="TOP"
652
> pointer to the file descriptor set to monitor</TD
653
></TR
654
><TR
655
><TD
656
WIDTH="20%"
657
ALIGN="RIGHT"
658
VALIGN="TOP"
659
><TT
660
CLASS="PARAMETER"
661
><I
662
>fncb</I
663
></TT
664
>&nbsp;:</TD
665
><TD
666
WIDTH="80%"
667
ALIGN="LEFT"
668
VALIGN="TOP"
669
> pointer to the function to call when an event needs handling</TD
670
></TR
671
></TABLE
672
><P
673
></P
674
></DIV
675
></DIV
676
><HR><DIV
677
CLASS="REFSECT2"
678
><A
679
NAME="AEN3260"
680
></A
681
><H3
682
><A
683
NAME="GRBELL"
684
></A
685
>GrBell ()</H3
686
><TABLE
687
BORDER="0"
688
BGCOLOR="#D6E8FF"
689
WIDTH="100%"
690
CELLPADDING="6"
691
><TR
692
><TD
693
><PRE
694
CLASS="PROGRAMLISTING"
695
>void        GrBell                          (void);</PRE
696
></TD
697
></TR
698
></TABLE
699
><P
700
>Asks the server to ring the console bell on behalf of the client (intended
701
for terminal apps to be able to ring the bell on the server even if they
702
are running remotely).</P
703
><P
704
></P
705
></DIV
706
><HR><DIV
707
CLASS="REFSECT2"
708
><A
709
NAME="AEN3266"
710
></A
711
><H3
712
><A
713
NAME="GRSETSCREENSAVERTIMEOUT"
714
></A
715
>GrSetScreenSaverTimeout ()</H3
716
><TABLE
717
BORDER="0"
718
BGCOLOR="#D6E8FF"
719
WIDTH="100%"
720
CELLPADDING="6"
721
><TR
722
><TD
723
><PRE
724
CLASS="PROGRAMLISTING"
725
>void        GrSetScreenSaverTimeout         (<GTKDOCLINK
726
HREF="GR-TIMEOUT-CAPS"
727
>GR_TIMEOUT</GTKDOCLINK
728
> timeout);</PRE
729
></TD
730
></TR
731
></TABLE
732
><P
733
>Sets the number of seconds of inactivity before a screen saver activate
734
event is sent to the root window ID. A value of 0 activates the
735
screen saver immediately, and a value of -1 disables the screen saver
736
function.</P
737
><P
738
></P
739
><DIV
740
CLASS="INFORMALTABLE"
741
><P
742
></P
743
><TABLE
744
BORDER="0"
745
WIDTH="100%"
746
BGCOLOR="#FFD0D0"
747
CELLSPACING="0"
748
CELLPADDING="4"
749
CLASS="CALSTABLE"
750
><TR
751
><TD
752
WIDTH="20%"
753
ALIGN="RIGHT"
754
VALIGN="TOP"
755
><TT
756
CLASS="PARAMETER"
757
><I
758
>timeout</I
759
></TT
760
>&nbsp;:</TD
761
><TD
762
WIDTH="80%"
763
ALIGN="LEFT"
764
VALIGN="TOP"
765
> the number of seconds of inactivity before screen saver activates</TD
766
></TR
767
></TABLE
768
><P
769
></P
770
></DIV
771
></DIV
772
></DIV
773
><DIV
774
CLASS="NAVFOOTER"
775
><BR
776
CLEAR="all"><BR><TABLE
777
WIDTH="100%"
778
BORDER="0"
779
BGCOLOR="#000000"
780
CELLPADDING="1"
781
CELLSPACING="0"
782
><TR
783
><TD
784
WIDTH="25%"
785
BGCOLOR="#C00000"
786
ALIGN="left"
787
><A
788
HREF="nano-x-selections.html"
789
><FONT
790
COLOR="#FFFFFF"
791
SIZE="3"
792
><B
793
>&#60;&#60;&#60; Previous Page</B
794
></FONT
795
></A
796
></TD
797
><TD
798
WIDTH="25%"
799
BGCOLOR="#0000C0"
800
ALIGN="center"
801
><FONT
802
COLOR="#FFFFFF"
803
SIZE="3"
804
><B
805
><A
806
HREF="index.html"
807
><FONT
808
COLOR="#FFFFFF"
809
SIZE="3"
810
><B
811
>Home</B
812
></FONT
813
></A
814
></B
815
></FONT
816
></TD
817
><TD
818
WIDTH="25%"
819
BGCOLOR="#00C000"
820
ALIGN="center"
821
><FONT
822
COLOR="#FFFFFF"
823
SIZE="3"
824
><B
825
><A
826
HREF="libnano-x.html"
827
><FONT
828
COLOR="#FFFFFF"
829
SIZE="3"
830
><B
831
>Up</B
832
></FONT
833
></A
834
></B
835
></FONT
836
></TD
837
><TD
838
WIDTH="25%"
839
BGCOLOR="#C00000"
840
ALIGN="right"
841
>&nbsp;</TD
842
></TR
843
><TR
844
><TD
845
COLSPAN="2"
846
ALIGN="left"
847
><FONT
848
COLOR="#FFFFFF"
849
SIZE="3"
850
><B
851
>selections</B
852
></FONT
853
></TD
854
><TD
855
COLSPAN="2"
856
ALIGN="right"
857
>&nbsp;</TD
858
></TR
859
></TABLE
860
></DIV
861
></BODY
862
></HTML
863
>

powered by: WebSVN 2.1.0

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