The MSG_ID_SET_SONGNAME message now handles streams.
[euphoria.git] / data / themes / iio / iio.edc
1 #include "../common.inc"
2
3 #include "macros/vpanel.edc"
4 #include "macros/fd_entity.edc"
5
6 #define RIGHT "right-"
7 #define LEFT "left-"
8
9         images { 
10 #include "img/images.edc" 
11         }
12
13         fonts { 
14 #include "fonts/fonts.edc"
15         }
16
17 // author: tokyo
18 // esmart.filedialog by atmos
19 // iio for euphoria
20 // various fixed by trill
21
22         collections { 
23         group { name, "euphoria"; min, 413 94; max, 413 94;
24
25         data {
26                 item, "shaped" "you bet";
27         }
28
29         script {
30                 public message (Msg_Type:type, id, ...)
31                 {
32                         switch (id) {
33                                 case MSG_ID_SET_SONGNAME: {
34                                         new buf[128], args_left;
35
36                                         args_left = numargs () - 2;
37
38                                         /* if the one argument is a string, the current song
39                                          * is a stream, and the argument is the stream's name
40                                          * (channel name).
41                                          */
42                                         if (type == MSG_STRING && args_left == 1) {
43                                                 getsarg (2, buf, 128);
44                                                 set_text (PART:"artist_name", buf);
45
46                                                 set_text (PART:"song_name", "");
47                                                 set_text (PART:"album_name", "");
48                                         } else if (type == MSG_STRING_SET && args_left > 1) {
49                                                 getsarg (2, buf, 128);
50                                                 set_text (PART:"artist_name", buf);
51
52                                                 getsarg (3, buf, 128);
53                                                 set_text (PART:"song_name", buf);
54
55                                                 getsarg (4, buf, 128);
56                                                 set_text (PART:"album_name", buf);
57                                         }
58                                 }
59                         }
60                 }
61         }
62
63             parts { 
64 #include "collections/base_to.edc" 
65             }
66             programs { 
67 #include "programs/controls_to.edc" 
68             }
69         }
70
71         group { name, "playlist_item"; min, 122 9; max, 122 9;  
72         parts { 
73 #include "collections/playlist.edc" 
74         }
75         programs { 
76 #include "programs/playlist.edc" 
77             } 
78         }
79 /*
80         group { name, "alternate"; min, 93 187; max, 93 187;
81         parts { 
82 #include "collections/switch.edc" 
83             }
84         programs { 
85 #include "programs/switch.edc" 
86             } 
87         }
88 */
89 group { name, "esmart.filedialog"; min, 413 188; max, 413 9999;
90         data {
91 #include "hashes/containers.edc"
92 #include "hashes/window.edc"
93         }
94
95         parts { 
96 #include "collections/esmart_fd.edc" 
97             }
98         programs { 
99 #include "programs/esmart_fd.edc" 
100             } 
101         }
102         group { name, "esmart.filedialog.file"; min, 80 15; max, 800 15;
103             parts {
104                 FD_ENTITY("file", 1.0 0.5)
105             }
106             programs {
107                 FD_ENTITY_PROGS("file")
108             }
109         }
110         group { name, "esmart.filedialog.directory"; min, 80 15; max, 800 15;
111             parts {
112                 FD_ENTITY("directory", 0.0 0.5)
113             }
114             programs {
115                 FD_ENTITY_DIRECTORY_PROGS("directory")
116             }
117         }
118 }