Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/eXene/lib/window/selection-server-sig.sml
ViewVC logotype

Annotation of /sml/trunk/src/eXene/lib/window/selection-server-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 704 - (view) (download)

1 : monnier 2 (* selection-server-sig.sml
2 :     *
3 :     * COPYRIGHT (c) 1994 by AT&T Bell Laboratories. See COPYRIGHT file for details.
4 :     *
5 :     * This is the lowest-level interface to the ICCCM selection protocol.
6 :     * There is one selection server per display connection.
7 :     *
8 :     * NOTES:
9 :     * - what about incremental transfers?
10 :     * - currently these operations take a window as an argument, since the
11 :     * protocol requires one. The selection server could allocate an unmapped
12 :     * window to serve as the source of ids, which would make selections
13 :     * independent of specific windows. Let's see how the higher-level interfaces
14 :     * work out first.
15 :     *
16 :     *)
17 :    
18 :     signature SELECTION_SERVER =
19 :     sig
20 :    
21 :     type selection_server
22 :     type selection_handle
23 :    
24 : jhr 704 type atom = XProtTypes.atom
25 :     type time = XTime.time
26 : monnier 2
27 :     val mkServer : XDisplay.xdisplay
28 :     -> (XEventTypes.xevent CML.chan * selection_server)
29 :    
30 :     (** Selection owner operations **)
31 :    
32 :     val acquireSelection : selection_server
33 :     -> (XProtTypes.win_id * atom * time)
34 :     -> selection_handle option
35 :    
36 :     val selectionOf : selection_handle -> atom
37 :     val timeOf : selection_handle -> time
38 :    
39 :     val requestEvt : selection_handle -> {
40 :     target : atom,
41 : jhr 704 time : time option,
42 : monnier 2 reply : XProtTypes.prop_val option -> unit
43 :     } CML.event
44 :     (* this event is enabled once for each request for the selection. The
45 :     * target field is the requested target type; the time field is the
46 :     * server-time of the gesture that caused the request, and the reply
47 : jhr 704 * field is a function for sending the reply. Strictly speaking
48 :     * this violates the ICCC specification, but applications may choose
49 :     * to accept it.
50 : monnier 2 *)
51 :    
52 :     val releaseEvt : selection_handle -> unit CML.event
53 :     (* this event becomes enabled when the selection is lost; either by
54 :     * the owner releasing it, or by some other client acquiring ownership.
55 :     *)
56 :    
57 :     val releaseSelection : selection_handle -> unit
58 :     (* release ownership of the selection *)
59 :    
60 :    
61 :     (** Selection requestor operations **)
62 :    
63 :     val requestSelection : selection_server -> {
64 :     win : XProtTypes.win_id,
65 :     selection : atom,
66 :     target : atom,
67 :     property : atom,
68 :     time : time
69 :     } -> XProtTypes.prop_val option CML.event
70 :     (* request the value of the selection. the win field is the requesting
71 :     * window, the selection field is the requested selection, the target
72 :     * field is the requested target type, and the time field is the server-
73 :     * time of the gesture causing the request. This returns an event
74 :     * that will become enabled when the reply is received.
75 :     *)
76 :    
77 :     end; (* SELECTION_SERVER *)
78 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0