File: XfceSMClient.html

package info (click to toggle)
libxfce4ui 4.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,040 kB
  • sloc: sh: 11,143; ansic: 4,759; makefile: 322; perl: 92; xml: 68
file content (1147 lines) | stat: -rw-r--r-- 65,631 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>XfceSMClient</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Libxfce4ui Reference Manual">
<link rel="up" href="libxfce4ui-sm.html" title="Part V. Xfce Session Management Support">
<link rel="prev" href="libxfce4ui-sm.html" title="Part V. Xfce Session Management Support">
<link rel="next" href="ix01.html" title="Index">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libxfce4ui-sm.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libxfce4ui-sm.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Libxfce4ui Reference Manual</th>
<td><a accesskey="n" href="ix01.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#XfceSMClient.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#XfceSMClient.description" class="shortcut">Description</a>
                   | 
                  <a href="#XfceSMClient.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#XfceSMClient.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#XfceSMClient.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="XfceSMClient"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="XfceSMClient.top_of_page"></a>XfceSMClient</span></h2>
<p>XfceSMClient — Session management client</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="XfceSMClient.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="XfceSMClient.synopsis"></a><h2>Synopsis</h2>
<a name="XfceSMClientRestartStyle"></a><a name="XfceSMClientShutdownHint"></a><pre class="synopsis">
#include &lt;libxfce4ui/libxfce4ui.h&gt;

                    <a class="link" href="XfceSMClient.html#XfceSMClient-struct" title="XfceSMClient">XfceSMClient</a>;
enum                <a class="link" href="XfceSMClient.html#XfceSMClientPriority" title="enum XfceSMClientPriority">XfceSMClientPriority</a>;
enum                <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle-enum" title="enum XfceSMClientRestartStyle">XfceSMClientRestartStyle</a>;
enum                <a class="link" href="XfceSMClient.html#XfceSMClientShutdownHint-enum" title="enum XfceSMClientShutdownHint">XfceSMClientShutdownHint</a>;
<span class="returnvalue">GOptionGroup</span> *      <a class="link" href="XfceSMClient.html#xfce-sm-client-get-option-group" title="xfce_sm_client_get_option_group ()">xfce_sm_client_get_option_group</a>     (<em class="parameter"><code><span class="type">gint</span> argc</code></em>,
                                                         <em class="parameter"><code><span class="type">gchar</span> **argv</code></em>);
<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> *      <a class="link" href="XfceSMClient.html#xfce-sm-client-get" title="xfce_sm_client_get ()">xfce_sm_client_get</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> *      <a class="link" href="XfceSMClient.html#xfce-sm-client-get-with-argv" title="xfce_sm_client_get_with_argv ()">xfce_sm_client_get_with_argv</a>        (<em class="parameter"><code><span class="type">gint</span> argc</code></em>,
                                                         <em class="parameter"><code><span class="type">gchar</span> **argv</code></em>,
                                                         <em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>,
                                                         <em class="parameter"><code><span class="type">guchar</span> priority</code></em>);
<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> *      <a class="link" href="XfceSMClient.html#xfce-sm-client-get-full" title="xfce_sm_client_get_full ()">xfce_sm_client_get_full</a>             (<em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>,
                                                         <em class="parameter"><code><span class="type">guchar</span> priority</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *resumed_client_id</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *current_directory</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> **restart_command</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *desktop_file</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="XfceSMClient.html#xfce-sm-client-connect" title="xfce_sm_client_connect ()">xfce_sm_client_connect</a>              (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="XfceSMClient.html#xfce-sm-client-disconnect" title="xfce_sm_client_disconnect ()">xfce_sm_client_disconnect</a>           (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="XfceSMClient.html#xfce-sm-client-is-connected" title="xfce_sm_client_is_connected ()">xfce_sm_client_is_connected</a>         (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="XfceSMClient.html#xfce-sm-client-is-resumed" title="xfce_sm_client_is_resumed ()">xfce_sm_client_is_resumed</a>           (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="XfceSMClient.html#xfce-sm-client-set-desktop-file" title="xfce_sm_client_set_desktop_file ()">xfce_sm_client_set_desktop_file</a>     (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *desktop_file</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="XfceSMClient.html#xfce-sm-client-request-shutdown" title="xfce_sm_client_request_shutdown ()">xfce_sm_client_request_shutdown</a>     (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientShutdownHint"><span class="type">XfceSMClientShutdownHint</span></a> shutdown_hint</code></em>);
const <span class="returnvalue">gchar</span> *       <a class="link" href="XfceSMClient.html#xfce-sm-client-get-client-id" title="xfce_sm_client_get_client_id ()">xfce_sm_client_get_client_id</a>        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
const <span class="returnvalue">gchar</span> *       <a class="link" href="XfceSMClient.html#xfce-sm-client-get-state-file" title="xfce_sm_client_get_state_file ()">xfce_sm_client_get_state_file</a>       (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
const <span class="returnvalue">gchar</span> *       <a class="link" href="XfceSMClient.html#xfce-sm-client-get-current-directory" title="xfce_sm_client_get_current_directory ()">xfce_sm_client_get_current_directory</a>
                                                        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="XfceSMClient.html#xfce-sm-client-set-current-directory" title="xfce_sm_client_set_current_directory ()">xfce_sm_client_set_current_directory</a>
                                                        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *current_directory</code></em>);
<span class="returnvalue">guint8</span>              <a class="link" href="XfceSMClient.html#xfce-sm-client-get-priority" title="xfce_sm_client_get_priority ()">xfce_sm_client_get_priority</a>         (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="XfceSMClient.html#xfce-sm-client-set-priority" title="xfce_sm_client_set_priority ()">xfce_sm_client_set_priority</a>         (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><span class="type">guint8</span> priority</code></em>);
const <span class="returnvalue">gchar</span> * const * <a class="link" href="XfceSMClient.html#xfce-sm-client-get-restart-command" title="xfce_sm_client_get_restart_command ()">xfce_sm_client_get_restart_command</a>
                                                        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-command" title="xfce_sm_client_set_restart_command ()">xfce_sm_client_set_restart_command</a>  (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><span class="type">gchar</span> **restart_command</code></em>);
<a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="returnvalue">XfceSMClientRestartStyle</span></a> <a class="link" href="XfceSMClient.html#xfce-sm-client-get-restart-style" title="xfce_sm_client_get_restart_style ()">xfce_sm_client_get_restart_style</a>
                                                        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-style" title="xfce_sm_client_set_restart_style ()">xfce_sm_client_set_restart_style</a>    (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="XfceSMClient.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GObject
   +----XfceSMClient
</pre>
<pre class="synopsis">
  GEnum
   +----XfceSMClientRestartStyle
</pre>
<pre class="synopsis">
  GEnum
   +----XfceSMClientShutdownHint
</pre>
</div>
<div class="refsect1">
<a name="XfceSMClient.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="XfceSMClient.html#XfceSMClient--argc" title='The "argc" property'>argc</a>"                     <span class="type">gint</span>                  : Write / Construct Only
  "<a class="link" href="XfceSMClient.html#XfceSMClient--argv" title='The "argv" property'>argv</a>"                     <span class="type">GStrv</span>                 : Write / Construct Only
  "<a class="link" href="XfceSMClient.html#XfceSMClient--client-id" title='The "client-id" property'>client-id</a>"                <span class="type">gchar</span>*                : Read / Write / Construct Only
  "<a class="link" href="XfceSMClient.html#XfceSMClient--current-directory" title='The "current-directory" property'>current-directory</a>"        <span class="type">gchar</span>*                : Read / Write
  "<a class="link" href="XfceSMClient.html#XfceSMClient--desktop-file" title='The "desktop-file" property'>desktop-file</a>"             <span class="type">gchar</span>*                : Read / Write
  "<a class="link" href="XfceSMClient.html#XfceSMClient--priority" title='The "priority" property'>priority</a>"                 <span class="type">guchar</span>                : Read / Write / Construct
  "<a class="link" href="XfceSMClient.html#XfceSMClient--restart-command" title='The "restart-command" property'>restart-command</a>"          <span class="type">GStrv</span>                 : Read / Write
  "<a class="link" href="XfceSMClient.html#XfceSMClient--restart-style" title='The "restart-style" property'>restart-style</a>"            <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a>  : Read / Write / Construct
  "<a class="link" href="XfceSMClient.html#XfceSMClient--resumed" title='The "resumed" property'>resumed</a>"                  <span class="type">gboolean</span>              : Read
</pre>
</div>
<div class="refsect1">
<a name="XfceSMClient.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="XfceSMClient.html#XfceSMClient-quit" title='The "quit" signal'>quit</a>"                                           : <code class="literal">Run Last</code>
  "<a class="link" href="XfceSMClient.html#XfceSMClient-quit-cancelled" title='The "quit-cancelled" signal'>quit-cancelled</a>"                                 : <code class="literal">Run Last</code>
  "<a class="link" href="XfceSMClient.html#XfceSMClient-quit-requested" title='The "quit-requested" signal'>quit-requested</a>"                                 : <code class="literal">Run Last</code>
  "<a class="link" href="XfceSMClient.html#XfceSMClient-save-state" title='The "save-state" signal'>save-state</a>"                                     : <code class="literal">Run Last</code>
  "<a class="link" href="XfceSMClient.html#XfceSMClient-save-state-extended" title='The "save-state-extended" signal'>save-state-extended</a>"                            : <code class="literal">Run Last</code>
</pre>
</div>
<div class="refsect1">
<a name="XfceSMClient.description"></a><h2>Description</h2>
<p>
<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> is a session management client that speaks the X Session
Management Protocol (XSMP).  It's designed to be easy to use and hide some
of the more esoteric feaures of XSMP from the API user.
</p>
</div>
<div class="refsect1">
<a name="XfceSMClient.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="XfceSMClient-struct"></a><h3>XfceSMClient</h3>
<pre class="programlisting">typedef struct _XfceSMClient XfceSMClient;</pre>
<p>
An opaque struct with only private fields.
</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClientPriority"></a><h3>enum XfceSMClientPriority</h3>
<pre class="programlisting">typedef enum {
    XFCE_SM_CLIENT_PRIORITY_HIGHEST = 0,
    XFCE_SM_CLIENT_PRIORITY_WM = 15,
    XFCE_SM_CLIENT_PRIORITY_CORE = 25,
    XFCE_SM_CLIENT_PRIORITY_DESKTOP = 35,
    XFCE_SM_CLIENT_PRIORITY_DEFAULT = 50,
    XFCE_SM_CLIENT_PRIORITY_LOWEST = 255,
} XfceSMClientPriority;
</pre>
<p>
Some sample priority values for use with <a class="link" href="XfceSMClient.html#xfce-sm-client-set-priority" title="xfce_sm_client_set_priority ()"><code class="function">xfce_sm_client_set_priority()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="XFCE-SM-CLIENT-PRIORITY-HIGHEST:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_PRIORITY_HIGHEST</code></span></p></td>
<td>A high priority value.  You probably
                                  don't want to use this.
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-PRIORITY-WM:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_PRIORITY_WM</code></span></p></td>
<td>A priority value for use by the window manager.
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-PRIORITY-CORE:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_PRIORITY_CORE</code></span></p></td>
<td>A priority value for use by applications that
                               place windows on the screen and possibly set
                               window manager struts.
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-PRIORITY-DESKTOP:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_PRIORITY_DESKTOP</code></span></p></td>
<td>A priority value for use by applications
                                  that draw on the desktop.
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-PRIORITY-DEFAULT:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_PRIORITY_DEFAULT</code></span></p></td>
<td>A priority value for regular applications.
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-PRIORITY-LOWEST:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_PRIORITY_LOWEST</code></span></p></td>
<td>The lowest possible priority value.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClientRestartStyle-enum"></a><h3>enum XfceSMClientRestartStyle</h3>
<pre class="programlisting">typedef enum {
    XFCE_SM_CLIENT_RESTART_NORMAL = 0,
    XFCE_SM_CLIENT_RESTART_IMMEDIATELY,
} XfceSMClientRestartStyle;
</pre>
<p>
An enumeration describing how the session manager should restart
the application.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="XFCE-SM-CLIENT-RESTART-NORMAL:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_RESTART_NORMAL</code></span></p></td>
<td>Only restart the application if it is
                                still running when the session is next
                                saved.
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-RESTART-IMMEDIATELY:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_RESTART_IMMEDIATELY</code></span></p></td>
<td>Immediately restart the application
                                     if it ever quits.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClientShutdownHint-enum"></a><h3>enum XfceSMClientShutdownHint</h3>
<pre class="programlisting">typedef enum {
    XFCE_SM_CLIENT_SHUTDOWN_HINT_ASK = 0,
    XFCE_SM_CLIENT_SHUTDOWN_HINT_LOGOUT,
    XFCE_SM_CLIENT_SHUTDOWN_HINT_HALT,
    XFCE_SM_CLIENT_SHUTDOWN_HINT_REBOOT,
} XfceSMClientShutdownHint;
</pre>
<p>
Hints to the session manager what kind of shutdown the session manager
should perform.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="XFCE-SM-CLIENT-SHUTDOWN-HINT-ASK:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_SHUTDOWN_HINT_ASK</code></span></p></td>
<td>Prompt the user for a choice,
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-SHUTDOWN-HINT-LOGOUT:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_SHUTDOWN_HINT_LOGOUT</code></span></p></td>
<td>End the current session,
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-SHUTDOWN-HINT-HALT:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_SHUTDOWN_HINT_HALT</code></span></p></td>
<td>Shut down the computer.
</td>
</tr>
<tr>
<td><p><a name="XFCE-SM-CLIENT-SHUTDOWN-HINT-REBOOT:CAPS"></a><span class="term"><code class="literal">XFCE_SM_CLIENT_SHUTDOWN_HINT_REBOOT</code></span></p></td>
<td>Restart the computer.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-option-group"></a><h3>xfce_sm_client_get_option_group ()</h3>
<pre class="programlisting"><span class="returnvalue">GOptionGroup</span> *      xfce_sm_client_get_option_group     (<em class="parameter"><code><span class="type">gint</span> argc</code></em>,
                                                         <em class="parameter"><code><span class="type">gchar</span> **argv</code></em>);</pre>
<p>
Constructs a <span class="type">GOptionGroup</span> suitable for use with Glib's
command-line option parser.
</p>
<p>
This function is a bit sneaky in that it will make a copy of
the program's argc and argv <span class="emphasis"><em>before</em></span> GTK+ etc.
has a chance to mess around with it, so <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> can later
construct an accurate restart command.  Instead of calling
<code class="function">gtk_init()</code> or <code class="function">gtk_init_with_args()</code>, instead you'd do something
like:
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
GOptionContext *context = g_option_context_new("");
g_option_context_add_group(context, gtk_get_option_group(TRUE));
g_option_context_add_group(context, xfce_sm_client_get_option_group(argc, argv);
g_option_context_parse(context, &amp;argc, &amp;argv, NULL);
</pre></div>
<p>
</p>
<p>
Error checking is omitted here for brevity, and of course you could
add your app's own options with <code class="function">g_option_context_add_main_entries()</code>
or similar.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>The application's argument count</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>The application's argument vector</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new <span class="type">GOptionGroup</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get"></a><h3>xfce_sm_client_get ()</h3>
<pre class="programlisting"><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> *      xfce_sm_client_get                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Gets the application's SM client instance.  This is best
used with <a class="link" href="XfceSMClient.html#xfce-sm-client-get-option-group" title="xfce_sm_client_get_option_group ()"><code class="function">xfce_sm_client_get_option_group()</code></a> above (and using
the returned <span class="type">GOptionGroup</span> with <code class="function">g_option_context_parse()</code>), as the
command line parsing will figure out many of the SM client's
required property values for you.
</p>
<p>
If you are not using Gtk or Glib's command-line option parser,
take a look at <code class="function">xfce_sm_client_new_with_argv()</code> and
<code class="function">xfce_sm_client_new_full()</code>.
</p>
<p>
If you have already created an <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance using
this function or one of the xfce_sm_client_new_*() functions,
this will return the same instance.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new or existing <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-with-argv"></a><h3>xfce_sm_client_get_with_argv ()</h3>
<pre class="programlisting"><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> *      xfce_sm_client_get_with_argv        (<em class="parameter"><code><span class="type">gint</span> argc</code></em>,
                                                         <em class="parameter"><code><span class="type">gchar</span> **argv</code></em>,
                                                         <em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>,
                                                         <em class="parameter"><code><span class="type">guchar</span> priority</code></em>);</pre>
<p>
Creates a new <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance.  It attempts to
set all required properties using the app's command line.
Note that this function does not actually connect to the session
manager, so other actions can be taken (such as setting custom
properties or connecting signals) before calling
<a class="link" href="XfceSMClient.html#xfce-sm-client-connect" title="xfce_sm_client_connect ()"><code class="function">xfce_sm_client_connect()</code></a>.
</p>
<p>
If you are using Gtk or Glib's command-line option parser,
it is recommended that you use <a class="link" href="XfceSMClient.html#xfce-sm-client-get-option-group" title="xfce_sm_client_get_option_group ()"><code class="function">xfce_sm_client_get_option_group()</code></a>
and <a class="link" href="XfceSMClient.html#xfce-sm-client-get" title="xfce_sm_client_get ()"><code class="function">xfce_sm_client_get()</code></a> instead.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>The number of arguments passed to <code class="function">main()</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>The argument vector passed to <code class="function">main()</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>restart_style</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
<td>A restart priority</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-full"></a><h3>xfce_sm_client_get_full ()</h3>
<pre class="programlisting"><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> *      xfce_sm_client_get_full             (<em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>,
                                                         <em class="parameter"><code><span class="type">guchar</span> priority</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *resumed_client_id</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *current_directory</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> **restart_command</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *desktop_file</code></em>);</pre>
<p>
Creates a new SM client instance, allowing the application
fine-grained control over the initial properties set.
Note that this function does not actually connect to the session
manager, so other actions can be taken (such as setting custom
properties or connecting signals) before calling
<a class="link" href="XfceSMClient.html#xfce-sm-client-connect" title="xfce_sm_client_connect ()"><code class="function">xfce_sm_client_connect()</code></a>.
</p>
<p>
It is recommended to use <a class="link" href="XfceSMClient.html#xfce-sm-client-get-with-argv" title="xfce_sm_client_get_with_argv ()"><code class="function">xfce_sm_client_get_with_argv()</code></a>, or,
if you are using Gtk or Glib's command-line option parser,
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-option-group" title="xfce_sm_client_get_option_group ()"><code class="function">xfce_sm_client_get_option_group()</code></a> and <a class="link" href="XfceSMClient.html#xfce-sm-client-get" title="xfce_sm_client_get ()"><code class="function">xfce_sm_client_get()</code></a> instead.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>restart_style</code></em> :</span></p></td>
<td>An XfceSMClientRestartStyle</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
<td>A restart priority</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>resumed_client_id</code></em> :</span></p></td>
<td>The client id used in the previous session</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>current_directory</code></em> :</span></p></td>
<td>The application's working directory</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>restart_command</code></em> :</span></p></td>
<td>A command that can resume the application's
saved state</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>desktop_file</code></em> :</span></p></td>
<td>The application's .desktop file</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-connect"></a><h3>xfce_sm_client_connect ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            xfce_sm_client_connect              (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Attempts to connect to the session manager.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A <span class="type">GError</span> location.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> otherwise.  If an error
occurs, <em class="parameter"><code>error</code></em> will be set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-disconnect"></a><h3>xfce_sm_client_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                xfce_sm_client_disconnect           (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Disconnects the application from the session manager.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
This may not remove the application from the saved
session (if any) if the user later does not choose to save
the session when logging out.
</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-is-connected"></a><h3>xfce_sm_client_is_connected ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            xfce_sm_client_is_connected         (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Determines whether or not the application has connected to the
session manager.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if connected to the session manager, <code class="literal">FALSE</code> otherwise</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-is-resumed"></a><h3>xfce_sm_client_is_resumed ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            xfce_sm_client_is_resumed           (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Determines whether the application was resumed from a previous
session, or if the application has been started fresh with no
state information associated with it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if resumed from a previous session, <code class="literal">FALSE</code> otherwise</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-set-desktop-file"></a><h3>xfce_sm_client_set_desktop_file ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                xfce_sm_client_set_desktop_file     (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *desktop_file</code></em>);</pre>
<p>
Sets the application's .desktop file.  In addition to informing
the session manager of the .desktop file so it can present localized
names and an icon in session listings and the splash screen, this
also calls <code class="function">g_set_application_name()</code> and
<code class="function">gtk_window_set_default_icon_name()</code> (or
<code class="function">gtk_window_set_default_icon_from_file()</code>) if the Name and Icon
keys are present, respectively.
</p>
<p>
If a relative path to the file is provided, this function will search
the standard application directories as specified by the
<a class="ulink" href="http://standards.freedesktop.org/menu-spec/latest/" target="_top">XDG
Desktop Menu Specification</a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>desktop_file</code></em> :</span></p></td>
<td>The path to the application's .desktop file</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-request-shutdown"></a><h3>xfce_sm_client_request_shutdown ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                xfce_sm_client_request_shutdown     (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientShutdownHint"><span class="type">XfceSMClientShutdownHint</span></a> shutdown_hint</code></em>);</pre>
<p>
Sends a request to the session manager to end the session.
Depending on <em class="parameter"><code>hint</code></em>, the session manager may prompt for a
certain action (log out, halt, reboot, etc.) or may take the
requested action without user intervention.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
The session manager may or may not support all requested
actions, and is also free to ignore the requested action.
</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>shutdown_hint</code></em> :</span></p></td>
<td>The type of shutdown requested</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-client-id"></a><h3>xfce_sm_client_get_client_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       xfce_sm_client_get_client_id        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Retrieves the session client's unique ID.  This ID can
be used to construct a filename used to restore the
application's state.  Note that this value is only
guaranteed to be valid if connected to the session manager.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
Instead of constructing a state filename, it is
recommended to use <a class="link" href="XfceSMClient.html#xfce-sm-client-get-state-file" title="xfce_sm_client_get_state_file ()"><code class="function">xfce_sm_client_get_state_file()</code></a>.
</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an opaque object-owned string</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-state-file"></a><h3>xfce_sm_client_get_state_file ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       xfce_sm_client_get_state_file       (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Constructs a filename that can be used to restore or save
state information.
</p>
<p>
When saving state, ote that this file may already exist (and
may have been used for saving previous state for the
application), so the application should first remove or empty
the file if it requires a fresh state file.
</p>
<p>
On the next application start, this function can be used to
check to see if there is any previous saved state, and, if so,
the state can be restored from the file.
</p>
<p>
This function will use a standard location and naming scheme
and handle state cleanup (setting of the discard command) for you.
</p>
<p>
Before calling this function, the application must have a
valid program identifier set (see <code class="function">xfce_sm_client_set_program()</code>)
and a valid client ID (see <a class="link" href="XfceSMClient.html#xfce-sm-client-get-client-id" title="xfce_sm_client_get_client_id ()"><code class="function">xfce_sm_client_get_client_id()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a file name string, owned by the object or <code class="literal">NULL</code> if
the session client is disabled.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-current-directory"></a><h3>xfce_sm_client_get_current_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *       xfce_sm_client_get_current_directory
                                                        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Retrieves the session client's working directory.  See
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-current-directory" title="xfce_sm_client_set_current_directory ()"><code class="function">xfce_sm_client_set_current_directory()</code></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an object-owned string</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-set-current-directory"></a><h3>xfce_sm_client_set_current_directory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                xfce_sm_client_set_current_directory
                                                        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *current_directory</code></em>);</pre>
<p>
Sets the startup working directory of <em class="parameter"><code>sm_client</code></em> to
<em class="parameter"><code>current_directory</code></em>.  If unset, defaults to the user's
home directory.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>current_directory</code></em> :</span></p></td>
<td>A valid path name</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-priority"></a><h3>xfce_sm_client_get_priority ()</h3>
<pre class="programlisting"><span class="returnvalue">guint8</span>              xfce_sm_client_get_priority         (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Retrieves the session client's restart priority.  See
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-priority" title="xfce_sm_client_set_priority ()"><code class="function">xfce_sm_client_set_priority()</code></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a value from <span class="type">G_MININT8</span> to <span class="type">G_MAXINT8</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-set-priority"></a><h3>xfce_sm_client_set_priority ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                xfce_sm_client_set_priority         (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><span class="type">guint8</span> priority</code></em>);</pre>
<p>
Sets the startup priority for <em class="parameter"><code>sm_client</code></em> to <em class="parameter"><code>priority</code></em>.  Note
that the default priority for applications is 50; lower values
should be reserved for components of the desktop environment.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
<td>A 8-bit signed priority value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-restart-command"></a><h3>xfce_sm_client_get_restart_command ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * const * xfce_sm_client_get_restart_command
                                                        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Retrieves the session client's restart command.  See
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-command" title="xfce_sm_client_set_restart_command ()"><code class="function">xfce_sm_client_set_restart_command()</code></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an object-owned string vector</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-set-restart-command"></a><h3>xfce_sm_client_set_restart_command ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                xfce_sm_client_set_restart_command  (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><span class="type">gchar</span> **restart_command</code></em>);</pre>
<p>
Sets the application's "restart" command, which is used to restart
the application and restore any saved state from the previous
run.
</p>
<p>
If unset, defaults to the command used to start this instance
of the application, with session management related arguments
added (if not already present).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>restart_command</code></em> :</span></p></td>
<td>An argument vector</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-get-restart-style"></a><h3>xfce_sm_client_get_restart_style ()</h3>
<pre class="programlisting"><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="returnvalue">XfceSMClientRestartStyle</span></a> xfce_sm_client_get_restart_style
                                                        (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre>
<p>
Retrieves the session client's restart style.  See
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-style" title="xfce_sm_client_set_restart_style ()"><code class="function">xfce_sm_client_set_restart_style()</code></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a value from the <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> enum</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="xfce-sm-client-set-restart-style"></a><h3>xfce_sm_client_set_restart_style ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                xfce_sm_client_set_restart_style    (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>,
                                                         <em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>);</pre>
<p>
Sets the restart style hint to <em class="parameter"><code>restart_style</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>restart_style</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> value</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="XfceSMClient.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="XfceSMClient--argc"></a><h3>The <code class="literal">"argc"</code> property</h3>
<pre class="programlisting">  "argc"                     <span class="type">gint</span>                  : Write / Construct Only</pre>
<p>Argument count passed to program.</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient--argv"></a><h3>The <code class="literal">"argv"</code> property</h3>
<pre class="programlisting">  "argv"                     <span class="type">GStrv</span>                 : Write / Construct Only</pre>
<p>Argument vector passed to program.</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient--client-id"></a><h3>The <code class="literal">"client-id"</code> property</h3>
<pre class="programlisting">  "client-id"                <span class="type">gchar</span>*                : Read / Write / Construct Only</pre>
<p>A string uniquely identifying the current instance of this client.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient--current-directory"></a><h3>The <code class="literal">"current-directory"</code> property</h3>
<pre class="programlisting">  "current-directory"        <span class="type">gchar</span>*                : Read / Write</pre>
<p>The directory that should be used as the working directory the next time this client is restarted.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient--desktop-file"></a><h3>The <code class="literal">"desktop-file"</code> property</h3>
<pre class="programlisting">  "desktop-file"             <span class="type">gchar</span>*                : Read / Write</pre>
<p>The application's .desktop file.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient--priority"></a><h3>The <code class="literal">"priority"</code> property</h3>
<pre class="programlisting">  "priority"                 <span class="type">guchar</span>                : Read / Write / Construct</pre>
<p>Determines the ordering in which this client is restarted.</p>
<p>Default value: 50</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient--restart-command"></a><h3>The <code class="literal">"restart-command"</code> property</h3>
<pre class="programlisting">  "restart-command"          <span class="type">GStrv</span>                 : Read / Write</pre>
<p>A command used to restart this application, preserving the current state.</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient--restart-style"></a><h3>The <code class="literal">"restart-style"</code> property</h3>
<pre class="programlisting">  "restart-style"            <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a>  : Read / Write / Construct</pre>
<p>Specifies how the client should be restarted by the session manager.</p>
<p>Default value: XFCE_SM_CLIENT_RESTART_NORMAL</p>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient--resumed"></a><h3>The <code class="literal">"resumed"</code> property</h3>
<pre class="programlisting">  "resumed"                  <span class="type">gboolean</span>              : Read</pre>
<p>Whether or not the client was resumed with previous state.</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="XfceSMClient.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="XfceSMClient-quit"></a><h3>The <code class="literal">"quit"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client,
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
<p>
Emitted when the application is required to quit.  This is not
optional: if the client does not quit a short time after receiving
this signal, it will likely be terminated in some other way.  While
not required, the application will usually receive quit-requested
before receiving quit.  If the application does not connect to this
signal, <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> will call <code class="function">exit(3)</code> with
an exit code of zero on behalf of the application.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient-quit-cancelled"></a><h3>The <code class="literal">"quit-cancelled"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client,
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
<p>
Informs the application that it will not need to quit.  In most cases,
quit-cancelled will be emitted a short time after quit-requested.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient-quit-requested"></a><h3>The <code class="literal">"quit-requested"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            user_function                      (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client,
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
<p>
Signals the client that the session manager will soon want the
application to quit, perhaps as a part of ending the session
(but this should not be assumed).  The application can take
this opportunity to prompt the user to save any unsaved work
to disk.
</p>
<p>
This signal also expects a return value from the handler.  If the
application wishes to cancel the quit request (perhaps because the
user selected "Cancel" in prompts to save unsaved work), it should
return <code class="literal">TRUE</code> from the handler.  If the application is satisfied
with possibly needing to quit soon, the handler should return <code class="literal">FALSE</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient-save-state"></a><h3>The <code class="literal">"save-state"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client,
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
<p>
Signals the client that it should save a copy of its current state
such that it could be restarted later in exactly the same state as
it is at the time of signal emission.
</p>
<p>
If the state is simple enough to be encoded in the application's
command line, <a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-command" title="xfce_sm_client_set_restart_command ()"><code class="function">xfce_sm_client_set_restart_command()</code></a> can be used
to set that command line.  For more complex state data,
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-state-file" title="xfce_sm_client_get_state_file ()"><code class="function">xfce_sm_client_get_state_file()</code></a> should be used.
</p>
<p>
The application should attempt to save its state as quickly as
possible, and MUST NOT interact with the user as a part of saving
state.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="XfceSMClient-save-state-extended"></a><h3>The <code class="literal">"save-state-extended"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client,
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">Run Last</code></pre>
<p>
Allows the application to save extra state information after all
other applications in the session have had a chance to save their
state.  This is mainly used by the window manager to save window
positions.  Most applications should not need to connect to this
signal.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sm_client</code></em> :</span></p></td>
<td>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>