summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_interface_fileselector.eo
blob: 3a8e814f325cf9ac7fd749bb4f20ffd9136806a2 (plain)
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
type Elm_Fileselector_Filter_Func: __undefined_type; [[Elementary fileselector filter function type]]

enum Elm.Fileselector.Mode
{
   [[Defines how a file selector widget is to layout its contents
     (file system entries).
   ]]
   legacy: elm_fileselector;
   list = 0, [[Layout as a list.]]
   grid, [[Layout as a grid.]]
   last [[Sentinel value to indicate last enum field during iteration]]
}

enum Elm.Fileselector.Sort
{
   [[Fileselector sorting modes]]
   by_filename_asc = 0, [[Alphabetical sort by ascending filename, default]]
   by_filename_desc, [[Alphabetical sorting by descending filename]]
   by_type_asc, [[Sort by file type]]
   by_type_desc, [[Sort by file type description]]
   by_size_asc, [[Sort by ascending file size]]
   by_size_desc, [[Sort by descending file size]]
   by_modified_asc, [[Sort by ascending modified date]]
   by_modified_desc, [[Sort by descending modified date]]
   last [[Sentinel value to indicate last enum field during iteration]]
}

interface Elm.Interface.Fileselector ()
{
   [[Elementary fileselector interface]]
   eo_prefix: elm_interface_fileselector;
   methods {
      @property folder_only {
         set {
            [[Enable/disable folder-only view for a given file selector widget]]
         }
         get {
            [[Get whether folder-only view is set for a given file selector]]
         }
         values {
            only: bool; [[$true if folder view is set, $false otherwise]]
         }
      }
      @property thumbnail_size {
         set {
            [[Set the size for the thumbnail of the file selector widget's view.]]
         }
         get {
            [[Get the size for the thumbnail of a given file selector widget]]
         }
         values {
            w: int; [[Width]]
            h: int; [[Height]]
         }
      }
      @property hidden_visible {
         set {
            [[Enable or disable visibility of hidden files/directories in the file selector widget.]]
         }
         get {
            [[Get if hiden files/directories in the file selector are visible or not.]]
         }
         values {
            hidden: bool; [[$true if hidden files are visible, $false otherwise]]
         }
      }
      @property sort_method {
         set {
            [[Set the sort method of the file selector widget.]]
         }
         get {
            [[Get the sort method of the file selector widget.]]
         }
         values {
            sort: Elm.Fileselector.Sort; [[Sort method]]
         }
      }
      @property multi_select {
         set {
            [[Enable or disable multi-selection in the fileselector]]
         }
         get {
            [[Gets if multi-selection in fileselector is enabled or disabled.]]
         }
         values {
            multi: bool; [[$true if multiselection is enabled, $false otherwise]]
         }
      }
      @property expandable {
         set {
            [[Enable/disable a tree view in the given file selector widget, <b>if it's in]]
         }
         get {
            [[Get whether tree view is enabled for the given file selector]]
         }
         values {
            expand: bool; [[$true if tree view is expanded, $false otherwise]]
         }
      }
      @property model {
         set {
            [[Set, programmatically, the directory that a given file selector widget will display contents from]]
         }
         get {
            [[Get the directory's model that a given file selector selector widget display contents from]]
         }
         values {
            model: Efl.Model; [[Directory model]]
         }
      }
      @property mode {
         set {
            [[Set the mode in which a given file selector widget will display (layout) file system entries in its view]]
         }
         get {
            [[Get the mode in which a given file selector widget is displaying]]
         }
         values {
            mode: Elm.Fileselector.Mode; [[Fileselector mode]]
         }
      }
      @property is_save {
         set {
            [[Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector widget]]
         }
         get {
            [[Get whether the given file selector is in "saving dialog" mode]]
         }
         values {
            is_save: bool; [[$true if in saving mode, $false otherwise]]
         }
      }
      @property selected_models {
         get {
            [[Get a list of models selected in the fileselector.]]
         }
         values {
            ret: const(list<Efl.Model>); [[List of selected models]]
         }
      }
      @property current_name {
      	 [[ Current name property]]
         set {
         }
         get {
         }
         values {
            name: string; [[Name]]
         }
      }
      selected_model_set {
         [[Set, programmatically, the currently selected file/directory in the given file selector widget]]
         params {
            @in model: Efl.Model; [[Model to be set]]
         }
         return: future<Efl.Model>; [[Promise returning the recorded selected model or error]]
      }
      selected_model_get {
         [[Get the currently selected item's model, in the given file the given file selector widget]]
         return: Efl.Model; [[Selected model]]
      }
      custom_filter_append {
         [[Append custom filter into filter list]]
         params {
            @in func: Elm_Fileselector_Filter_Func; [[Filter function]]
            @in data: void_ptr; [[Data pointer]]
            @in filter_name: string; [[Filter name]]
         }
         return: bool; [[$true on success, $false otherwise]]
      }
      filters_clear {
         [[Clear all filters registered]]
      }
      mime_types_filter_append {
         [[Append mime type based filter into filter list]]
         params {
            @in mime_types: string; [[Mime types]]
            @in filter_name: string; [[Filter name]]
         }
         return: bool; [[$true on success, $false otherwise]]
      }
   }
}